xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/ingenic,pinctrl.yaml (revision 354d7675fe12ace9cde344cb79c7ded792802f88)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/ingenic,pinctrl.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Ingenic SoCs pin controller devicetree bindings
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotdescription: >
10c66ec88fSEmmanuel Vadot  Please refer to pinctrl-bindings.txt in this directory for details of the
11c66ec88fSEmmanuel Vadot  common pinctrl bindings used by client devices, including the meaning of the
12c66ec88fSEmmanuel Vadot  phrase "pin configuration node".
13c66ec88fSEmmanuel Vadot
14c66ec88fSEmmanuel Vadot  For the Ingenic SoCs, pin control is tightly bound with GPIO ports. All pins
15c66ec88fSEmmanuel Vadot  may be used as GPIOs, multiplexed device functions are configured within the
16c66ec88fSEmmanuel Vadot  GPIO port configuration registers and it is typical to refer to pins using the
17c66ec88fSEmmanuel Vadot  naming scheme "PxN" where x is a character identifying the GPIO port with
18c66ec88fSEmmanuel Vadot  which the pin is associated and N is an integer from 0 to 31 identifying the
19c66ec88fSEmmanuel Vadot  pin within that GPIO port. For example PA0 is the first pin in GPIO port A,
202eb4d8dcSEmmanuel Vadot  and PB31 is the last pin in GPIO port B. The JZ4730, the JZ4740, the JZ4725B,
212eb4d8dcSEmmanuel Vadot  the X1000 and the X1830 contains 4 GPIO ports, PA to PD, for a total of 128
22*354d7675SEmmanuel Vadot  pins. The X2000 and the X2100 contains 5 GPIO ports, PA to PE, for a total of
23*354d7675SEmmanuel Vadot  160 pins. The JZ4750, the JZ4755 the JZ4760, the JZ4770 and the JZ4780 contains
24*354d7675SEmmanuel Vadot  6 GPIO ports, PA to PF, for a total of 192 pins. The JZ4775 contains 7 GPIO
25*354d7675SEmmanuel Vadot  ports, PA to PG, for a total of 224 pins.
26c66ec88fSEmmanuel Vadot
27c66ec88fSEmmanuel Vadotmaintainers:
28c66ec88fSEmmanuel Vadot  - Paul Cercueil <paul@crapouillou.net>
29c66ec88fSEmmanuel Vadot
30c66ec88fSEmmanuel Vadotproperties:
31c66ec88fSEmmanuel Vadot  nodename:
32c66ec88fSEmmanuel Vadot    pattern: "^pinctrl@[0-9a-f]+$"
33c66ec88fSEmmanuel Vadot
34c66ec88fSEmmanuel Vadot  compatible:
35c66ec88fSEmmanuel Vadot    oneOf:
36c66ec88fSEmmanuel Vadot      - enum:
372eb4d8dcSEmmanuel Vadot          - ingenic,jz4730-pinctrl
38c66ec88fSEmmanuel Vadot          - ingenic,jz4740-pinctrl
39c66ec88fSEmmanuel Vadot          - ingenic,jz4725b-pinctrl
402eb4d8dcSEmmanuel Vadot          - ingenic,jz4750-pinctrl
412eb4d8dcSEmmanuel Vadot          - ingenic,jz4755-pinctrl
42c66ec88fSEmmanuel Vadot          - ingenic,jz4760-pinctrl
43c66ec88fSEmmanuel Vadot          - ingenic,jz4770-pinctrl
442eb4d8dcSEmmanuel Vadot          - ingenic,jz4775-pinctrl
45c66ec88fSEmmanuel Vadot          - ingenic,jz4780-pinctrl
46c66ec88fSEmmanuel Vadot          - ingenic,x1000-pinctrl
47c66ec88fSEmmanuel Vadot          - ingenic,x1500-pinctrl
48c66ec88fSEmmanuel Vadot          - ingenic,x1830-pinctrl
492eb4d8dcSEmmanuel Vadot          - ingenic,x2000-pinctrl
50*354d7675SEmmanuel Vadot          - ingenic,x2100-pinctrl
51c66ec88fSEmmanuel Vadot      - items:
52c66ec88fSEmmanuel Vadot          - const: ingenic,jz4760b-pinctrl
53c66ec88fSEmmanuel Vadot          - const: ingenic,jz4760-pinctrl
54c66ec88fSEmmanuel Vadot      - items:
55c66ec88fSEmmanuel Vadot          - const: ingenic,x1000e-pinctrl
56c66ec88fSEmmanuel Vadot          - const: ingenic,x1000-pinctrl
572eb4d8dcSEmmanuel Vadot      - items:
582eb4d8dcSEmmanuel Vadot          - const: ingenic,x2000e-pinctrl
592eb4d8dcSEmmanuel Vadot          - const: ingenic,x2000-pinctrl
60c66ec88fSEmmanuel Vadot
61c66ec88fSEmmanuel Vadot  reg:
62c66ec88fSEmmanuel Vadot    maxItems: 1
63c66ec88fSEmmanuel Vadot
64c66ec88fSEmmanuel Vadot  "#address-cells":
65c66ec88fSEmmanuel Vadot    const: 1
66c66ec88fSEmmanuel Vadot
67c66ec88fSEmmanuel Vadot  "#size-cells":
68c66ec88fSEmmanuel Vadot    const: 0
69c66ec88fSEmmanuel Vadot
70c66ec88fSEmmanuel VadotpatternProperties:
71c66ec88fSEmmanuel Vadot  "^gpio@[0-9]$":
72c66ec88fSEmmanuel Vadot    type: object
73c66ec88fSEmmanuel Vadot    properties:
74c66ec88fSEmmanuel Vadot      compatible:
75c66ec88fSEmmanuel Vadot        enum:
762eb4d8dcSEmmanuel Vadot          - ingenic,jz4730-gpio
77c66ec88fSEmmanuel Vadot          - ingenic,jz4740-gpio
78c66ec88fSEmmanuel Vadot          - ingenic,jz4725b-gpio
792eb4d8dcSEmmanuel Vadot          - ingenic,jz4750-gpio
802eb4d8dcSEmmanuel Vadot          - ingenic,jz4755-gpio
81c66ec88fSEmmanuel Vadot          - ingenic,jz4760-gpio
82c66ec88fSEmmanuel Vadot          - ingenic,jz4770-gpio
832eb4d8dcSEmmanuel Vadot          - ingenic,jz4775-gpio
84c66ec88fSEmmanuel Vadot          - ingenic,jz4780-gpio
85c66ec88fSEmmanuel Vadot          - ingenic,x1000-gpio
86c66ec88fSEmmanuel Vadot          - ingenic,x1500-gpio
87c66ec88fSEmmanuel Vadot          - ingenic,x1830-gpio
882eb4d8dcSEmmanuel Vadot          - ingenic,x2000-gpio
89*354d7675SEmmanuel Vadot          - ingenic,x2100-gpio
90c66ec88fSEmmanuel Vadot
91c66ec88fSEmmanuel Vadot      reg:
92c66ec88fSEmmanuel Vadot        items:
93c66ec88fSEmmanuel Vadot          - description: The GPIO bank number
94c66ec88fSEmmanuel Vadot
95c66ec88fSEmmanuel Vadot      gpio-controller: true
96c66ec88fSEmmanuel Vadot
97c66ec88fSEmmanuel Vadot      "#gpio-cells":
98c66ec88fSEmmanuel Vadot        const: 2
99c66ec88fSEmmanuel Vadot
100c66ec88fSEmmanuel Vadot      gpio-ranges:
101c66ec88fSEmmanuel Vadot        maxItems: 1
102c66ec88fSEmmanuel Vadot
103c66ec88fSEmmanuel Vadot      interrupt-controller: true
104c66ec88fSEmmanuel Vadot
105c66ec88fSEmmanuel Vadot      "#interrupt-cells":
106c66ec88fSEmmanuel Vadot        const: 2
107c66ec88fSEmmanuel Vadot        description:
108c66ec88fSEmmanuel Vadot          Refer to ../interrupt-controller/interrupts.txt for more details.
109c66ec88fSEmmanuel Vadot
110c66ec88fSEmmanuel Vadot      interrupts:
111c66ec88fSEmmanuel Vadot        maxItems: 1
112c66ec88fSEmmanuel Vadot
113c66ec88fSEmmanuel Vadot    required:
114c66ec88fSEmmanuel Vadot      - compatible
115c66ec88fSEmmanuel Vadot      - reg
116c66ec88fSEmmanuel Vadot      - gpio-controller
117c66ec88fSEmmanuel Vadot      - "#gpio-cells"
118c66ec88fSEmmanuel Vadot      - interrupts
119c66ec88fSEmmanuel Vadot      - interrupt-controller
120c66ec88fSEmmanuel Vadot      - "#interrupt-cells"
121c66ec88fSEmmanuel Vadot
122c66ec88fSEmmanuel Vadot    additionalProperties: false
123c66ec88fSEmmanuel Vadot
124c66ec88fSEmmanuel Vadotrequired:
125c66ec88fSEmmanuel Vadot  - compatible
126c66ec88fSEmmanuel Vadot  - reg
127c66ec88fSEmmanuel Vadot  - "#address-cells"
128c66ec88fSEmmanuel Vadot  - "#size-cells"
129c66ec88fSEmmanuel Vadot
130c66ec88fSEmmanuel VadotadditionalProperties:
131c66ec88fSEmmanuel Vadot  anyOf:
132c66ec88fSEmmanuel Vadot    - type: object
133c66ec88fSEmmanuel Vadot      allOf:
134c66ec88fSEmmanuel Vadot        - $ref: pincfg-node.yaml#
135c66ec88fSEmmanuel Vadot        - $ref: pinmux-node.yaml#
136c66ec88fSEmmanuel Vadot
137c66ec88fSEmmanuel Vadot      properties:
138c66ec88fSEmmanuel Vadot        phandle: true
139c66ec88fSEmmanuel Vadot        function: true
140c66ec88fSEmmanuel Vadot        groups: true
141c66ec88fSEmmanuel Vadot        pins: true
142c66ec88fSEmmanuel Vadot        bias-disable: true
143c66ec88fSEmmanuel Vadot        bias-pull-up: true
144c66ec88fSEmmanuel Vadot        bias-pull-down: true
145c66ec88fSEmmanuel Vadot        output-low: true
146c66ec88fSEmmanuel Vadot        output-high: true
147c66ec88fSEmmanuel Vadot      additionalProperties: false
148c66ec88fSEmmanuel Vadot
149c66ec88fSEmmanuel Vadot    - type: object
150c66ec88fSEmmanuel Vadot      properties:
151c66ec88fSEmmanuel Vadot        phandle: true
152c66ec88fSEmmanuel Vadot      additionalProperties:
153c66ec88fSEmmanuel Vadot        type: object
154c66ec88fSEmmanuel Vadot        allOf:
155c66ec88fSEmmanuel Vadot          - $ref: pincfg-node.yaml#
156c66ec88fSEmmanuel Vadot          - $ref: pinmux-node.yaml#
157c66ec88fSEmmanuel Vadot
158c66ec88fSEmmanuel Vadot        properties:
159c66ec88fSEmmanuel Vadot          phandle: true
160c66ec88fSEmmanuel Vadot          function: true
161c66ec88fSEmmanuel Vadot          groups: true
162c66ec88fSEmmanuel Vadot          pins: true
163c66ec88fSEmmanuel Vadot          bias-disable: true
164c66ec88fSEmmanuel Vadot          bias-pull-up: true
165c66ec88fSEmmanuel Vadot          bias-pull-down: true
166c66ec88fSEmmanuel Vadot          output-low: true
167c66ec88fSEmmanuel Vadot          output-high: true
168c66ec88fSEmmanuel Vadot        additionalProperties: false
169c66ec88fSEmmanuel Vadot
170c66ec88fSEmmanuel Vadotexamples:
171c66ec88fSEmmanuel Vadot  - |
172c66ec88fSEmmanuel Vadot    pin-controller@10010000 {
173c66ec88fSEmmanuel Vadot      compatible = "ingenic,jz4770-pinctrl";
174c66ec88fSEmmanuel Vadot      reg = <0x10010000 0x600>;
175c66ec88fSEmmanuel Vadot
176c66ec88fSEmmanuel Vadot      #address-cells = <1>;
177c66ec88fSEmmanuel Vadot      #size-cells = <0>;
178c66ec88fSEmmanuel Vadot
179c66ec88fSEmmanuel Vadot      gpio@0 {
180c66ec88fSEmmanuel Vadot        compatible = "ingenic,jz4770-gpio";
181c66ec88fSEmmanuel Vadot        reg = <0>;
182c66ec88fSEmmanuel Vadot
183c66ec88fSEmmanuel Vadot        gpio-controller;
184c66ec88fSEmmanuel Vadot        gpio-ranges = <&pinctrl 0 0 32>;
185c66ec88fSEmmanuel Vadot        #gpio-cells = <2>;
186c66ec88fSEmmanuel Vadot
187c66ec88fSEmmanuel Vadot        interrupt-controller;
188c66ec88fSEmmanuel Vadot        #interrupt-cells = <2>;
189c66ec88fSEmmanuel Vadot
190c66ec88fSEmmanuel Vadot        interrupt-parent = <&intc>;
191c66ec88fSEmmanuel Vadot        interrupts = <17>;
192c66ec88fSEmmanuel Vadot      };
193c66ec88fSEmmanuel Vadot    };
194