xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/xlnx,zynq-pinctrl.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1354d7675SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2354d7675SEmmanuel Vadot%YAML 1.2
3354d7675SEmmanuel Vadot---
4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/xlnx,zynq-pinctrl.yaml#
5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6354d7675SEmmanuel Vadot
7354d7675SEmmanuel Vadottitle: Xilinx Zynq Pinctrl
8354d7675SEmmanuel Vadot
9354d7675SEmmanuel Vadotmaintainers:
10f126890aSEmmanuel Vadot  - Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
11354d7675SEmmanuel Vadot
12354d7675SEmmanuel Vadotdescription: |
13354d7675SEmmanuel Vadot  Please refer to pinctrl-bindings.txt in this directory for details of the
14354d7675SEmmanuel Vadot  common pinctrl bindings used by client devices, including the meaning of the
15354d7675SEmmanuel Vadot  phrase "pin configuration node".
16354d7675SEmmanuel Vadot
17354d7675SEmmanuel Vadot  Zynq's pin configuration nodes act as a container for an arbitrary number of
18354d7675SEmmanuel Vadot  subnodes. Each of these subnodes represents some desired configuration for a
19354d7675SEmmanuel Vadot  pin, a group, or a list of pins or groups. This configuration can include the
20354d7675SEmmanuel Vadot  mux function to select on those pin(s)/group(s), and various pin configuration
21354d7675SEmmanuel Vadot  parameters, such as pull-up, slew rate, etc.
22354d7675SEmmanuel Vadot
23354d7675SEmmanuel Vadot  Each configuration node can consist of multiple nodes describing the pinmux and
24354d7675SEmmanuel Vadot  pinconf options. Those nodes can be pinmux nodes or pinconf nodes.
25354d7675SEmmanuel Vadot
26354d7675SEmmanuel Vadot  The name of each subnode is not important; all subnodes should be enumerated
27354d7675SEmmanuel Vadot  and processed purely based on their content.
28354d7675SEmmanuel Vadot
29354d7675SEmmanuel Vadotproperties:
30354d7675SEmmanuel Vadot  compatible:
31354d7675SEmmanuel Vadot    const: xlnx,zynq-pinctrl
32354d7675SEmmanuel Vadot
33354d7675SEmmanuel Vadot  reg:
34354d7675SEmmanuel Vadot    description: Specifies the base address and size of the SLCR space.
35354d7675SEmmanuel Vadot    maxItems: 1
36354d7675SEmmanuel Vadot
37354d7675SEmmanuel Vadot  syscon:
38354d7675SEmmanuel Vadot    description:
39354d7675SEmmanuel Vadot      phandle to the SLCR.
40354d7675SEmmanuel Vadot
41354d7675SEmmanuel VadotpatternProperties:
42*8d13bc63SEmmanuel Vadot  '^(.*-)?(default|gpio-grp)$':
43354d7675SEmmanuel Vadot    type: object
44354d7675SEmmanuel Vadot    patternProperties:
45354d7675SEmmanuel Vadot      '^mux':
46354d7675SEmmanuel Vadot        type: object
47354d7675SEmmanuel Vadot        description:
48354d7675SEmmanuel Vadot          Pinctrl node's client devices use subnodes for pin muxes,
49354d7675SEmmanuel Vadot          which in turn use below standard properties.
50354d7675SEmmanuel Vadot        $ref: pinmux-node.yaml#
51354d7675SEmmanuel Vadot
52354d7675SEmmanuel Vadot        properties:
53354d7675SEmmanuel Vadot          groups:
54354d7675SEmmanuel Vadot            description:
55354d7675SEmmanuel Vadot              List of groups to select (either this or "pins" must be
56354d7675SEmmanuel Vadot              specified), available groups for this subnode.
57354d7675SEmmanuel Vadot            items:
58354d7675SEmmanuel Vadot              enum: [ethernet0_0_grp, ethernet1_0_grp, mdio0_0_grp,
59354d7675SEmmanuel Vadot                     mdio1_0_grp, qspi0_0_grp, qspi1_0_grp, qspi_fbclk,
60354d7675SEmmanuel Vadot                     qspi_cs1_grp, spi0_0_grp, spi0_1_grp, spi0_2_grp,
61354d7675SEmmanuel Vadot                     spi0_0_ss0, spi0_0_ss1, spi0_0_ss2, spi0_1_ss0,
62354d7675SEmmanuel Vadot                     spi0_1_ss1, spi0_1_ss2, spi0_2_ss0, spi0_2_ss1,
63354d7675SEmmanuel Vadot                     spi0_2_ss2, spi1_0_grp, spi1_1_grp, spi1_2_grp,
64354d7675SEmmanuel Vadot                     spi1_3_grp, spi1_0_ss0, spi1_0_ss1, spi1_0_ss2,
65354d7675SEmmanuel Vadot                     spi1_1_ss0, spi1_1_ss1, spi1_1_ss2, spi1_2_ss0,
66354d7675SEmmanuel Vadot                     spi1_2_ss1, spi1_2_ss2, spi1_3_ss0, spi1_3_ss1,
67354d7675SEmmanuel Vadot                     spi1_3_ss2, sdio0_0_grp, sdio0_1_grp, sdio0_2_grp,
68354d7675SEmmanuel Vadot                     sdio1_0_grp, sdio1_1_grp, sdio1_2_grp, sdio1_3_grp,
69354d7675SEmmanuel Vadot                     sdio0_emio_wp, sdio0_emio_cd, sdio1_emio_wp,
70354d7675SEmmanuel Vadot                     sdio1_emio_cd, smc0_nor, smc0_nor_cs1_grp,
71354d7675SEmmanuel Vadot                     smc0_nor_addr25_grp, smc0_nand, can0_0_grp, can0_1_grp,
72354d7675SEmmanuel Vadot                     can0_2_grp, can0_3_grp, can0_4_grp, can0_5_grp,
73354d7675SEmmanuel Vadot                     can0_6_grp, can0_7_grp, can0_8_grp, can0_9_grp,
74354d7675SEmmanuel Vadot                     can0_10_grp, can1_0_grp, can1_1_grp, can1_2_grp,
75354d7675SEmmanuel Vadot                     can1_3_grp, can1_4_grp, can1_5_grp, can1_6_grp,
76354d7675SEmmanuel Vadot                     can1_7_grp, can1_8_grp, can1_9_grp, can1_10_grp,
77354d7675SEmmanuel Vadot                     can1_11_grp, uart0_0_grp, uart0_1_grp, uart0_2_grp,
78354d7675SEmmanuel Vadot                     uart0_3_grp, uart0_4_grp, uart0_5_grp, uart0_6_grp,
79354d7675SEmmanuel Vadot                     uart0_7_grp, uart0_8_grp, uart0_9_grp, uart0_10_grp,
80354d7675SEmmanuel Vadot                     uart1_0_grp, uart1_1_grp, uart1_2_grp, uart1_3_grp,
81354d7675SEmmanuel Vadot                     uart1_4_grp, uart1_5_grp, uart1_6_grp, uart1_7_grp,
82354d7675SEmmanuel Vadot                     uart1_8_grp, uart1_9_grp, uart1_10_grp, uart1_11_grp,
83354d7675SEmmanuel Vadot                     i2c0_0_grp, i2c0_1_grp, i2c0_2_grp, i2c0_3_grp,
84354d7675SEmmanuel Vadot                     i2c0_4_grp, i2c0_5_grp, i2c0_6_grp, i2c0_7_grp,
85354d7675SEmmanuel Vadot                     i2c0_8_grp, i2c0_9_grp, i2c0_10_grp, i2c1_0_grp,
86354d7675SEmmanuel Vadot                     i2c1_1_grp, i2c1_2_grp, i2c1_3_grp, i2c1_4_grp,
87354d7675SEmmanuel Vadot                     i2c1_5_grp, i2c1_6_grp, i2c1_7_grp, i2c1_8_grp,
88354d7675SEmmanuel Vadot                     i2c1_9_grp, i2c1_10_grp, ttc0_0_grp, ttc0_1_grp,
89354d7675SEmmanuel Vadot                     ttc0_2_grp, ttc1_0_grp, ttc1_1_grp, ttc1_2_grp,
90354d7675SEmmanuel Vadot                     swdt0_0_grp, swdt0_1_grp, swdt0_2_grp, swdt0_3_grp,
91354d7675SEmmanuel Vadot                     swdt0_4_grp, gpio0_0_grp, gpio0_1_grp, gpio0_2_grp,
92354d7675SEmmanuel Vadot                     gpio0_3_grp, gpio0_4_grp, gpio0_5_grp, gpio0_6_grp,
93354d7675SEmmanuel Vadot                     gpio0_7_grp, gpio0_8_grp, gpio0_9_grp, gpio0_10_grp,
94354d7675SEmmanuel Vadot                     gpio0_11_grp, gpio0_12_grp, gpio0_13_grp, gpio0_14_grp,
95354d7675SEmmanuel Vadot                     gpio0_15_grp, gpio0_16_grp, gpio0_17_grp, gpio0_18_grp,
96354d7675SEmmanuel Vadot                     gpio0_19_grp, gpio0_20_grp, gpio0_21_grp, gpio0_22_grp,
97354d7675SEmmanuel Vadot                     gpio0_23_grp, gpio0_24_grp, gpio0_25_grp, gpio0_26_grp,
98354d7675SEmmanuel Vadot                     gpio0_27_grp, gpio0_28_grp, gpio0_29_grp, gpio0_30_grp,
99354d7675SEmmanuel Vadot                     gpio0_31_grp, gpio0_32_grp, gpio0_33_grp, gpio0_34_grp,
100354d7675SEmmanuel Vadot                     gpio0_35_grp, gpio0_36_grp, gpio0_37_grp, gpio0_38_grp,
101354d7675SEmmanuel Vadot                     gpio0_39_grp, gpio0_40_grp, gpio0_41_grp, gpio0_42_grp,
102354d7675SEmmanuel Vadot                     gpio0_43_grp, gpio0_44_grp, gpio0_45_grp, gpio0_46_grp,
103354d7675SEmmanuel Vadot                     gpio0_47_grp, gpio0_48_grp, gpio0_49_grp, gpio0_50_grp,
104354d7675SEmmanuel Vadot                     gpio0_51_grp, gpio0_52_grp, gpio0_53_grp, usb0_0_grp,
105354d7675SEmmanuel Vadot                     usb1_0_grp]
106354d7675SEmmanuel Vadot            maxItems: 54
107354d7675SEmmanuel Vadot
108354d7675SEmmanuel Vadot          function:
109354d7675SEmmanuel Vadot            description:
110354d7675SEmmanuel Vadot              Specify the alternative function to be configured for the
111354d7675SEmmanuel Vadot              given pin groups.
112354d7675SEmmanuel Vadot            enum: [ethernet0, ethernet1, mdio0, mdio1, qspi0, qspi1, qspi_fbclk,
113354d7675SEmmanuel Vadot                   qspi_cs1, spi0, spi0_ss, spi1, spi1_ss, sdio0, sdio0_pc,
114354d7675SEmmanuel Vadot                   sdio0_cd, sdio0_wp, sdio1, sdio1_pc, sdio1_cd, sdio1_wp,
115354d7675SEmmanuel Vadot                   smc0_nor, smc0_nor_cs1, smc0_nor_addr25, smc0_nand, can0,
116354d7675SEmmanuel Vadot                   can1, uart0, uart1, i2c0, i2c1, ttc0, ttc1, swdt0, gpio0,
117354d7675SEmmanuel Vadot                   usb0, usb1]
118354d7675SEmmanuel Vadot
119354d7675SEmmanuel Vadot        required:
120354d7675SEmmanuel Vadot          - groups
121354d7675SEmmanuel Vadot          - function
122354d7675SEmmanuel Vadot
123354d7675SEmmanuel Vadot        additionalProperties: false
124354d7675SEmmanuel Vadot
125354d7675SEmmanuel Vadot      '^conf':
126354d7675SEmmanuel Vadot        type: object
127354d7675SEmmanuel Vadot        description:
128354d7675SEmmanuel Vadot          Pinctrl node's client devices use subnodes for pin configurations,
129354d7675SEmmanuel Vadot          which in turn use the standard properties below.
130354d7675SEmmanuel Vadot        $ref: pincfg-node.yaml#
131354d7675SEmmanuel Vadot
132354d7675SEmmanuel Vadot        properties:
133354d7675SEmmanuel Vadot          groups:
134354d7675SEmmanuel Vadot            description:
135354d7675SEmmanuel Vadot              List of pin groups as mentioned above.
136354d7675SEmmanuel Vadot
137354d7675SEmmanuel Vadot          pins:
138354d7675SEmmanuel Vadot            description:
139354d7675SEmmanuel Vadot              List of pin names to select in this subnode.
140354d7675SEmmanuel Vadot            items:
141354d7675SEmmanuel Vadot              pattern: '^MIO([0-9]|[1-4][0-9]|5[0-3])$'
142354d7675SEmmanuel Vadot            maxItems: 54
143354d7675SEmmanuel Vadot
144354d7675SEmmanuel Vadot          bias-pull-up: true
145354d7675SEmmanuel Vadot
146354d7675SEmmanuel Vadot          bias-pull-down: true
147354d7675SEmmanuel Vadot
148354d7675SEmmanuel Vadot          bias-disable: true
149354d7675SEmmanuel Vadot
150354d7675SEmmanuel Vadot          bias-high-impedance: true
151354d7675SEmmanuel Vadot
152354d7675SEmmanuel Vadot          low-power-enable: true
153354d7675SEmmanuel Vadot
154354d7675SEmmanuel Vadot          low-power-disable: true
155354d7675SEmmanuel Vadot
156354d7675SEmmanuel Vadot          slew-rate:
157354d7675SEmmanuel Vadot            enum: [0, 1]
158354d7675SEmmanuel Vadot
159354d7675SEmmanuel Vadot          power-source:
160354d7675SEmmanuel Vadot            enum: [1, 2, 3, 4]
161354d7675SEmmanuel Vadot
162354d7675SEmmanuel Vadot        oneOf:
163354d7675SEmmanuel Vadot          - required: [ groups ]
164354d7675SEmmanuel Vadot          - required: [ pins ]
165354d7675SEmmanuel Vadot
166354d7675SEmmanuel Vadot        additionalProperties: false
167354d7675SEmmanuel Vadot
168354d7675SEmmanuel Vadot    additionalProperties: false
169354d7675SEmmanuel Vadot
170e67e8565SEmmanuel VadotallOf:
171fac71e4eSEmmanuel Vadot  - $ref: pinctrl.yaml#
172e67e8565SEmmanuel Vadot
173354d7675SEmmanuel Vadotrequired:
174354d7675SEmmanuel Vadot  - compatible
175354d7675SEmmanuel Vadot  - reg
176354d7675SEmmanuel Vadot  - syscon
177354d7675SEmmanuel Vadot
178354d7675SEmmanuel VadotadditionalProperties: false
179354d7675SEmmanuel Vadot
180354d7675SEmmanuel Vadotexamples:
181354d7675SEmmanuel Vadot  - |
182354d7675SEmmanuel Vadot    #include <dt-bindings/pinctrl/pinctrl-zynq.h>
183354d7675SEmmanuel Vadot    pinctrl0: pinctrl@700 {
184354d7675SEmmanuel Vadot       compatible = "xlnx,zynq-pinctrl";
185354d7675SEmmanuel Vadot       reg = <0x700 0x200>;
186354d7675SEmmanuel Vadot       syscon = <&slcr>;
187354d7675SEmmanuel Vadot
188354d7675SEmmanuel Vadot       pinctrl_uart1_default: uart1-default {
189354d7675SEmmanuel Vadot           mux {
190354d7675SEmmanuel Vadot               groups = "uart1_10_grp";
191354d7675SEmmanuel Vadot               function = "uart1";
192354d7675SEmmanuel Vadot           };
193354d7675SEmmanuel Vadot
194354d7675SEmmanuel Vadot           conf {
195354d7675SEmmanuel Vadot               groups = "uart1_10_grp";
196354d7675SEmmanuel Vadot               slew-rate = <0>;
197354d7675SEmmanuel Vadot               power-source = <IO_STANDARD_LVCMOS18>;
198354d7675SEmmanuel Vadot           };
199354d7675SEmmanuel Vadot
200354d7675SEmmanuel Vadot           conf-rx {
201354d7675SEmmanuel Vadot               pins = "MIO49";
202354d7675SEmmanuel Vadot               bias-high-impedance;
203354d7675SEmmanuel Vadot           };
204354d7675SEmmanuel Vadot
205354d7675SEmmanuel Vadot           conf-tx {
206354d7675SEmmanuel Vadot               pins = "MIO48";
207354d7675SEmmanuel Vadot               bias-disable;
208354d7675SEmmanuel Vadot           };
209354d7675SEmmanuel Vadot       };
210354d7675SEmmanuel Vadot    };
211354d7675SEmmanuel Vadot
212354d7675SEmmanuel Vadot    uart1 {
213354d7675SEmmanuel Vadot         pinctrl-names = "default";
214354d7675SEmmanuel Vadot         pinctrl-0 = <&pinctrl_uart1_default>;
215354d7675SEmmanuel Vadot    };
216354d7675SEmmanuel Vadot
217354d7675SEmmanuel Vadot...
218