xref: /linux/Documentation/devicetree/bindings/pinctrl/xlnx,pinctrl-zynq.yaml (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
1*cd2807e7SMichal Simek# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*cd2807e7SMichal Simek%YAML 1.2
3*cd2807e7SMichal Simek---
4*cd2807e7SMichal Simek$id: http://devicetree.org/schemas/pinctrl/xlnx,pinctrl-zynq.yaml#
5*cd2807e7SMichal Simek$schema: http://devicetree.org/meta-schemas/core.yaml#
6*cd2807e7SMichal Simek
7*cd2807e7SMichal Simektitle: Xilinx Zynq Pinctrl
8*cd2807e7SMichal Simek
9*cd2807e7SMichal Simekmaintainers:
10*cd2807e7SMichal Simek  - Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
11*cd2807e7SMichal Simek
12*cd2807e7SMichal Simekdescription: |
13*cd2807e7SMichal Simek  Please refer to pinctrl-bindings.txt in this directory for details of the
14*cd2807e7SMichal Simek  common pinctrl bindings used by client devices, including the meaning of the
15*cd2807e7SMichal Simek  phrase "pin configuration node".
16*cd2807e7SMichal Simek
17*cd2807e7SMichal Simek  Zynq's pin configuration nodes act as a container for an arbitrary number of
18*cd2807e7SMichal Simek  subnodes. Each of these subnodes represents some desired configuration for a
19*cd2807e7SMichal Simek  pin, a group, or a list of pins or groups. This configuration can include the
20*cd2807e7SMichal Simek  mux function to select on those pin(s)/group(s), and various pin configuration
21*cd2807e7SMichal Simek  parameters, such as pull-up, slew rate, etc.
22*cd2807e7SMichal Simek
23*cd2807e7SMichal Simek  Each configuration node can consist of multiple nodes describing the pinmux and
24*cd2807e7SMichal Simek  pinconf options. Those nodes can be pinmux nodes or pinconf nodes.
25*cd2807e7SMichal Simek
26*cd2807e7SMichal Simek  The name of each subnode is not important; all subnodes should be enumerated
27*cd2807e7SMichal Simek  and processed purely based on their content.
28*cd2807e7SMichal Simek
29*cd2807e7SMichal Simekproperties:
30*cd2807e7SMichal Simek  compatible:
31*cd2807e7SMichal Simek    const: xlnx,pinctrl-zynq
32*cd2807e7SMichal Simek
33*cd2807e7SMichal Simek  reg:
34*cd2807e7SMichal Simek    description: Specifies the base address and size of the SLCR space.
35*cd2807e7SMichal Simek    maxItems: 1
36*cd2807e7SMichal Simek
37*cd2807e7SMichal Simek  syscon:
38*cd2807e7SMichal Simek    description:
39*cd2807e7SMichal Simek      phandle to the SLCR.
40*cd2807e7SMichal Simek
41*cd2807e7SMichal SimekpatternProperties:
42*cd2807e7SMichal Simek  '^(.*-)?(default|gpio-grp)$':
43*cd2807e7SMichal Simek    type: object
44*cd2807e7SMichal Simek    patternProperties:
45*cd2807e7SMichal Simek      '^mux':
46*cd2807e7SMichal Simek        type: object
47*cd2807e7SMichal Simek        description:
48*cd2807e7SMichal Simek          Pinctrl node's client devices use subnodes for pin muxes,
49*cd2807e7SMichal Simek          which in turn use below standard properties.
50*cd2807e7SMichal Simek        $ref: pinmux-node.yaml#
51*cd2807e7SMichal Simek
52*cd2807e7SMichal Simek        properties:
53*cd2807e7SMichal Simek          groups:
54*cd2807e7SMichal Simek            description:
55*cd2807e7SMichal Simek              List of groups to select (either this or "pins" must be
56*cd2807e7SMichal Simek              specified), available groups for this subnode.
57*cd2807e7SMichal Simek            items:
58*cd2807e7SMichal Simek              enum: [ethernet0_0_grp, ethernet1_0_grp, mdio0_0_grp,
59*cd2807e7SMichal Simek                     mdio1_0_grp, qspi0_0_grp, qspi1_0_grp, qspi_fbclk,
60*cd2807e7SMichal Simek                     qspi_cs1_grp, spi0_0_grp, spi0_1_grp, spi0_2_grp,
61*cd2807e7SMichal Simek                     spi0_0_ss0, spi0_0_ss1, spi0_0_ss2, spi0_1_ss0,
62*cd2807e7SMichal Simek                     spi0_1_ss1, spi0_1_ss2, spi0_2_ss0, spi0_2_ss1,
63*cd2807e7SMichal Simek                     spi0_2_ss2, spi1_0_grp, spi1_1_grp, spi1_2_grp,
64*cd2807e7SMichal Simek                     spi1_3_grp, spi1_0_ss0, spi1_0_ss1, spi1_0_ss2,
65*cd2807e7SMichal Simek                     spi1_1_ss0, spi1_1_ss1, spi1_1_ss2, spi1_2_ss0,
66*cd2807e7SMichal Simek                     spi1_2_ss1, spi1_2_ss2, spi1_3_ss0, spi1_3_ss1,
67*cd2807e7SMichal Simek                     spi1_3_ss2, sdio0_0_grp, sdio0_1_grp, sdio0_2_grp,
68*cd2807e7SMichal Simek                     sdio1_0_grp, sdio1_1_grp, sdio1_2_grp, sdio1_3_grp,
69*cd2807e7SMichal Simek                     sdio0_emio_wp, sdio0_emio_cd, sdio1_emio_wp,
70*cd2807e7SMichal Simek                     sdio1_emio_cd, smc0_nor, smc0_nor_cs1_grp,
71*cd2807e7SMichal Simek                     smc0_nor_addr25_grp, smc0_nand, can0_0_grp, can0_1_grp,
72*cd2807e7SMichal Simek                     can0_2_grp, can0_3_grp, can0_4_grp, can0_5_grp,
73*cd2807e7SMichal Simek                     can0_6_grp, can0_7_grp, can0_8_grp, can0_9_grp,
74*cd2807e7SMichal Simek                     can0_10_grp, can1_0_grp, can1_1_grp, can1_2_grp,
75*cd2807e7SMichal Simek                     can1_3_grp, can1_4_grp, can1_5_grp, can1_6_grp,
76*cd2807e7SMichal Simek                     can1_7_grp, can1_8_grp, can1_9_grp, can1_10_grp,
77*cd2807e7SMichal Simek                     can1_11_grp, uart0_0_grp, uart0_1_grp, uart0_2_grp,
78*cd2807e7SMichal Simek                     uart0_3_grp, uart0_4_grp, uart0_5_grp, uart0_6_grp,
79*cd2807e7SMichal Simek                     uart0_7_grp, uart0_8_grp, uart0_9_grp, uart0_10_grp,
80*cd2807e7SMichal Simek                     uart1_0_grp, uart1_1_grp, uart1_2_grp, uart1_3_grp,
81*cd2807e7SMichal Simek                     uart1_4_grp, uart1_5_grp, uart1_6_grp, uart1_7_grp,
82*cd2807e7SMichal Simek                     uart1_8_grp, uart1_9_grp, uart1_10_grp, uart1_11_grp,
83*cd2807e7SMichal Simek                     i2c0_0_grp, i2c0_1_grp, i2c0_2_grp, i2c0_3_grp,
84*cd2807e7SMichal Simek                     i2c0_4_grp, i2c0_5_grp, i2c0_6_grp, i2c0_7_grp,
85*cd2807e7SMichal Simek                     i2c0_8_grp, i2c0_9_grp, i2c0_10_grp, i2c1_0_grp,
86*cd2807e7SMichal Simek                     i2c1_1_grp, i2c1_2_grp, i2c1_3_grp, i2c1_4_grp,
87*cd2807e7SMichal Simek                     i2c1_5_grp, i2c1_6_grp, i2c1_7_grp, i2c1_8_grp,
88*cd2807e7SMichal Simek                     i2c1_9_grp, i2c1_10_grp, ttc0_0_grp, ttc0_1_grp,
89*cd2807e7SMichal Simek                     ttc0_2_grp, ttc1_0_grp, ttc1_1_grp, ttc1_2_grp,
90*cd2807e7SMichal Simek                     swdt0_0_grp, swdt0_1_grp, swdt0_2_grp, swdt0_3_grp,
91*cd2807e7SMichal Simek                     swdt0_4_grp, gpio0_0_grp, gpio0_1_grp, gpio0_2_grp,
92*cd2807e7SMichal Simek                     gpio0_3_grp, gpio0_4_grp, gpio0_5_grp, gpio0_6_grp,
93*cd2807e7SMichal Simek                     gpio0_7_grp, gpio0_8_grp, gpio0_9_grp, gpio0_10_grp,
94*cd2807e7SMichal Simek                     gpio0_11_grp, gpio0_12_grp, gpio0_13_grp, gpio0_14_grp,
95*cd2807e7SMichal Simek                     gpio0_15_grp, gpio0_16_grp, gpio0_17_grp, gpio0_18_grp,
96*cd2807e7SMichal Simek                     gpio0_19_grp, gpio0_20_grp, gpio0_21_grp, gpio0_22_grp,
97*cd2807e7SMichal Simek                     gpio0_23_grp, gpio0_24_grp, gpio0_25_grp, gpio0_26_grp,
98*cd2807e7SMichal Simek                     gpio0_27_grp, gpio0_28_grp, gpio0_29_grp, gpio0_30_grp,
99*cd2807e7SMichal Simek                     gpio0_31_grp, gpio0_32_grp, gpio0_33_grp, gpio0_34_grp,
100*cd2807e7SMichal Simek                     gpio0_35_grp, gpio0_36_grp, gpio0_37_grp, gpio0_38_grp,
101*cd2807e7SMichal Simek                     gpio0_39_grp, gpio0_40_grp, gpio0_41_grp, gpio0_42_grp,
102*cd2807e7SMichal Simek                     gpio0_43_grp, gpio0_44_grp, gpio0_45_grp, gpio0_46_grp,
103*cd2807e7SMichal Simek                     gpio0_47_grp, gpio0_48_grp, gpio0_49_grp, gpio0_50_grp,
104*cd2807e7SMichal Simek                     gpio0_51_grp, gpio0_52_grp, gpio0_53_grp, usb0_0_grp,
105*cd2807e7SMichal Simek                     usb1_0_grp]
106*cd2807e7SMichal Simek            maxItems: 54
107*cd2807e7SMichal Simek
108*cd2807e7SMichal Simek          function:
109*cd2807e7SMichal Simek            description:
110*cd2807e7SMichal Simek              Specify the alternative function to be configured for the
111*cd2807e7SMichal Simek              given pin groups.
112*cd2807e7SMichal Simek            enum: [ethernet0, ethernet1, mdio0, mdio1, qspi0, qspi1, qspi_fbclk,
113*cd2807e7SMichal Simek                   qspi_cs1, spi0, spi0_ss, spi1, spi1_ss, sdio0, sdio0_pc,
114*cd2807e7SMichal Simek                   sdio0_cd, sdio0_wp, sdio1, sdio1_pc, sdio1_cd, sdio1_wp,
115*cd2807e7SMichal Simek                   smc0_nor, smc0_nor_cs1, smc0_nor_addr25, smc0_nand, can0,
116*cd2807e7SMichal Simek                   can1, uart0, uart1, i2c0, i2c1, ttc0, ttc1, swdt0, gpio0,
117*cd2807e7SMichal Simek                   usb0, usb1]
118*cd2807e7SMichal Simek
119*cd2807e7SMichal Simek        required:
120*cd2807e7SMichal Simek          - groups
121*cd2807e7SMichal Simek          - function
122*cd2807e7SMichal Simek
123*cd2807e7SMichal Simek        additionalProperties: false
124*cd2807e7SMichal Simek
125*cd2807e7SMichal Simek      '^conf':
126*cd2807e7SMichal Simek        type: object
127*cd2807e7SMichal Simek        description:
128*cd2807e7SMichal Simek          Pinctrl node's client devices use subnodes for pin configurations,
129*cd2807e7SMichal Simek          which in turn use the standard properties below.
130*cd2807e7SMichal Simek        $ref: pincfg-node.yaml#
131*cd2807e7SMichal Simek
132*cd2807e7SMichal Simek        properties:
133*cd2807e7SMichal Simek          groups:
134*cd2807e7SMichal Simek            description:
135*cd2807e7SMichal Simek              List of pin groups as mentioned above.
136*cd2807e7SMichal Simek
137*cd2807e7SMichal Simek          pins:
138*cd2807e7SMichal Simek            description:
139*cd2807e7SMichal Simek              List of pin names to select in this subnode.
140*cd2807e7SMichal Simek            items:
141*cd2807e7SMichal Simek              pattern: '^MIO([0-9]|[1-4][0-9]|5[0-3])$'
142*cd2807e7SMichal Simek            maxItems: 54
143*cd2807e7SMichal Simek
144*cd2807e7SMichal Simek          bias-pull-up: true
145*cd2807e7SMichal Simek
146*cd2807e7SMichal Simek          bias-pull-down: true
147*cd2807e7SMichal Simek
148*cd2807e7SMichal Simek          bias-disable: true
149*cd2807e7SMichal Simek
150*cd2807e7SMichal Simek          bias-high-impedance: true
151*cd2807e7SMichal Simek
152*cd2807e7SMichal Simek          low-power-enable: true
153*cd2807e7SMichal Simek
154*cd2807e7SMichal Simek          low-power-disable: true
155*cd2807e7SMichal Simek
156*cd2807e7SMichal Simek          slew-rate:
157*cd2807e7SMichal Simek            enum: [0, 1]
158*cd2807e7SMichal Simek
159*cd2807e7SMichal Simek          power-source:
160*cd2807e7SMichal Simek            enum: [1, 2, 3, 4]
161*cd2807e7SMichal Simek
162*cd2807e7SMichal Simek        oneOf:
163*cd2807e7SMichal Simek          - required: [ groups ]
164*cd2807e7SMichal Simek          - required: [ pins ]
165*cd2807e7SMichal Simek
166*cd2807e7SMichal Simek        additionalProperties: false
167*cd2807e7SMichal Simek
168*cd2807e7SMichal Simek    additionalProperties: false
169*cd2807e7SMichal Simek
170*cd2807e7SMichal SimekallOf:
171*cd2807e7SMichal Simek  - $ref: pinctrl.yaml#
172*cd2807e7SMichal Simek
173*cd2807e7SMichal Simekrequired:
174*cd2807e7SMichal Simek  - compatible
175*cd2807e7SMichal Simek  - reg
176*cd2807e7SMichal Simek  - syscon
177*cd2807e7SMichal Simek
178*cd2807e7SMichal SimekadditionalProperties: false
179*cd2807e7SMichal Simek
180*cd2807e7SMichal Simekexamples:
181*cd2807e7SMichal Simek  - |
182*cd2807e7SMichal Simek    #include <dt-bindings/pinctrl/pinctrl-zynq.h>
183*cd2807e7SMichal Simek    pinctrl0: pinctrl@700 {
184*cd2807e7SMichal Simek       compatible = "xlnx,pinctrl-zynq";
185*cd2807e7SMichal Simek       reg = <0x700 0x200>;
186*cd2807e7SMichal Simek       syscon = <&slcr>;
187*cd2807e7SMichal Simek
188*cd2807e7SMichal Simek       pinctrl_uart1_default: uart1-default {
189*cd2807e7SMichal Simek           mux {
190*cd2807e7SMichal Simek               groups = "uart1_10_grp";
191*cd2807e7SMichal Simek               function = "uart1";
192*cd2807e7SMichal Simek           };
193*cd2807e7SMichal Simek
194*cd2807e7SMichal Simek           conf {
195*cd2807e7SMichal Simek               groups = "uart1_10_grp";
196*cd2807e7SMichal Simek               slew-rate = <0>;
197*cd2807e7SMichal Simek               power-source = <IO_STANDARD_LVCMOS18>;
198*cd2807e7SMichal Simek           };
199*cd2807e7SMichal Simek
200*cd2807e7SMichal Simek           conf-rx {
201*cd2807e7SMichal Simek               pins = "MIO49";
202*cd2807e7SMichal Simek               bias-high-impedance;
203*cd2807e7SMichal Simek           };
204*cd2807e7SMichal Simek
205*cd2807e7SMichal Simek           conf-tx {
206*cd2807e7SMichal Simek               pins = "MIO48";
207*cd2807e7SMichal Simek               bias-disable;
208*cd2807e7SMichal Simek           };
209*cd2807e7SMichal Simek       };
210*cd2807e7SMichal Simek    };
211*cd2807e7SMichal Simek
212*cd2807e7SMichal Simek    uart1 {
213*cd2807e7SMichal Simek         pinctrl-names = "default";
214*cd2807e7SMichal Simek         pinctrl-0 = <&pinctrl_uart1_default>;
215*cd2807e7SMichal Simek    };
216*cd2807e7SMichal Simek
217*cd2807e7SMichal Simek...
218