File Index
Files and directories
Sign in
FILE

amlogic,pinctrl-a4.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/pinctrl/amlogic,pinctrl-a4.yaml YAML
  1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2%YAML 1.2
  3---
  4$id: http://devicetree.org/schemas/pinctrl/amlogic,pinctrl-a4.yaml#
  5$schema: http://devicetree.org/meta-schemas/core.yaml#
  6
  7title: Amlogic pinmux controller
  8
  9maintainers:
 10  - Xianwei Zhao <xianwei.zhao@amlogic.com>
 11
 12allOf:
 13  - $ref: pinctrl.yaml#
 14
 15properties:
 16  compatible:
 17    oneOf:
 18      - enum:
 19          - amlogic,pinctrl-a4
 20          - amlogic,pinctrl-s6
 21          - amlogic,pinctrl-s7
 22      - items:
 23          - enum:
 24              - amlogic,pinctrl-a5
 25          - const: amlogic,pinctrl-a4
 26      - items:
 27          - enum:
 28              - amlogic,pinctrl-s7d
 29          - const: amlogic,pinctrl-s7
 30
 31  "#address-cells":
 32    const: 2
 33
 34  "#size-cells":
 35    const: 2
 36
 37  ranges: true
 38
 39patternProperties:
 40  "^gpio@[0-9a-f]+$":
 41    type: object
 42
 43    additionalProperties: false
 44    properties:
 45      reg:
 46        minItems: 1
 47        items:
 48          - description: pin config register
 49          - description: pin mux setting register (some special pin fixed function)
 50          - description: pin drive strength register (optional)
 51
 52      reg-names:
 53        minItems: 1
 54        items:
 55          - const: gpio
 56          - const: mux
 57          - const: ds
 58
 59      gpio-controller: true
 60
 61      "#gpio-cells":
 62        const: 2
 63
 64      gpio-ranges:
 65        maxItems: 1
 66
 67    required:
 68      - reg
 69      - reg-names
 70      - gpio-controller
 71      - "#gpio-cells"
 72      - gpio-ranges
 73
 74  "^func-[0-9a-z-]+$":
 75    type: object
 76    additionalProperties: false
 77    patternProperties:
 78      "^group-[0-9a-z-]+$":
 79        type: object
 80        unevaluatedProperties: false
 81        allOf:
 82          - $ref: /schemas/pinctrl/pincfg-node.yaml
 83          - $ref: /schemas/pinctrl/pinmux-node.yaml
 84
 85        required:
 86          - pinmux
 87
 88required:
 89  - compatible
 90  - "#address-cells"
 91  - "#size-cells"
 92  - ranges
 93
 94additionalProperties: false
 95
 96examples:
 97  - |
 98    #include <dt-bindings/pinctrl/amlogic,pinctrl.h>
 99    apb {
100      #address-cells = <2>;
101      #size-cells = <2>;
102      periphs_pinctrl: pinctrl {
103        compatible = "amlogic,pinctrl-a4";
104        #address-cells = <2>;
105        #size-cells = <2>;
106        ranges;
107
108        gpio@4240 {
109          reg = <0 0x4240 0 0x40>, <0 0x4000 0 0x8>;
110          reg-names = "gpio", "mux";
111          gpio-controller;
112          #gpio-cells = <2>;
113          gpio-ranges = <&periphs_pinctrl 0 8 10>;
114        };
115
116        func-uart-b {
117          group-default {
118            pinmux = <AML_PINMUX(AMLOGIC_GPIO_B, 1, 4)>;
119            bias-pull-up;
120            drive-strength-microamp = <4000>;
121          };
122
123          group-pins1 {
124            pinmux = <AML_PINMUX(AMLOGIC_GPIO_B, 5, 2)>;
125            bias-pull-up;
126            drive-strength-microamp = <4000>;
127          };
128        };
129
130        func-uart-c {
131          group-default {
132            pinmux = <AML_PINMUX(AMLOGIC_GPIO_B, 3, 1)>,
133                     <AML_PINMUX(AMLOGIC_GPIO_B, 2, 1)>;
134            bias-pull-up;
135            drive-strength-microamp = <4000>;
136          };
137        };
138      };
139    };
~/ Read-only file preview.