xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/actions,s500-pinctrl.yaml (revision 6be3386466ab79a84b48429ae66244f21526d3df)
1*6be33864SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*6be33864SEmmanuel Vadot%YAML 1.2
3*6be33864SEmmanuel Vadot---
4*6be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/actions,s500-pinctrl.yaml#
5*6be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*6be33864SEmmanuel Vadot
7*6be33864SEmmanuel Vadottitle: Actions Semi S500 SoC pinmux & GPIO controller
8*6be33864SEmmanuel Vadot
9*6be33864SEmmanuel Vadotmaintainers:
10*6be33864SEmmanuel Vadot  - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
11*6be33864SEmmanuel Vadot  - Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
12*6be33864SEmmanuel Vadot
13*6be33864SEmmanuel Vadotdescription: |
14*6be33864SEmmanuel Vadot  Pinmux & GPIO controller manages pin multiplexing & configuration including
15*6be33864SEmmanuel Vadot  GPIO function selection & GPIO attributes configuration. Please refer to
16*6be33864SEmmanuel Vadot  pinctrl-bindings.txt in this directory for common binding part and usage.
17*6be33864SEmmanuel Vadot
18*6be33864SEmmanuel Vadotproperties:
19*6be33864SEmmanuel Vadot  compatible:
20*6be33864SEmmanuel Vadot    const: actions,s500-pinctrl
21*6be33864SEmmanuel Vadot
22*6be33864SEmmanuel Vadot  reg:
23*6be33864SEmmanuel Vadot    items:
24*6be33864SEmmanuel Vadot      - description: GPIO Output + GPIO Input + GPIO Data
25*6be33864SEmmanuel Vadot      - description: Multiplexing Control
26*6be33864SEmmanuel Vadot      - description: PAD Pull Control + PAD Schmitt Trigger Enable + PAD Control
27*6be33864SEmmanuel Vadot      - description: PAD Drive Capacity Select
28*6be33864SEmmanuel Vadot    minItems: 1
29*6be33864SEmmanuel Vadot    maxItems: 4
30*6be33864SEmmanuel Vadot
31*6be33864SEmmanuel Vadot  clocks:
32*6be33864SEmmanuel Vadot    maxItems: 1
33*6be33864SEmmanuel Vadot
34*6be33864SEmmanuel Vadot  gpio-controller: true
35*6be33864SEmmanuel Vadot
36*6be33864SEmmanuel Vadot  gpio-ranges:
37*6be33864SEmmanuel Vadot    maxItems: 1
38*6be33864SEmmanuel Vadot
39*6be33864SEmmanuel Vadot  '#gpio-cells':
40*6be33864SEmmanuel Vadot    description:
41*6be33864SEmmanuel Vadot      Specifies the pin number and flags, as defined in
42*6be33864SEmmanuel Vadot      include/dt-bindings/gpio/gpio.h
43*6be33864SEmmanuel Vadot    const: 2
44*6be33864SEmmanuel Vadot
45*6be33864SEmmanuel Vadot  interrupt-controller: true
46*6be33864SEmmanuel Vadot
47*6be33864SEmmanuel Vadot  '#interrupt-cells':
48*6be33864SEmmanuel Vadot    description:
49*6be33864SEmmanuel Vadot      Specifies the pin number and flags, as defined in
50*6be33864SEmmanuel Vadot      include/dt-bindings/interrupt-controller/irq.h
51*6be33864SEmmanuel Vadot    const: 2
52*6be33864SEmmanuel Vadot
53*6be33864SEmmanuel Vadot  interrupts:
54*6be33864SEmmanuel Vadot    description:
55*6be33864SEmmanuel Vadot      One interrupt per each of the 5 GPIO ports supported by the controller,
56*6be33864SEmmanuel Vadot      sorted by port number ascending order.
57*6be33864SEmmanuel Vadot    minItems: 5
58*6be33864SEmmanuel Vadot    maxItems: 5
59*6be33864SEmmanuel Vadot
60*6be33864SEmmanuel VadotpatternProperties:
61*6be33864SEmmanuel Vadot  '-pins$':
62*6be33864SEmmanuel Vadot    type: object
63*6be33864SEmmanuel Vadot    patternProperties:
64*6be33864SEmmanuel Vadot      '^(.*-)?pinmux$':
65*6be33864SEmmanuel Vadot        type: object
66*6be33864SEmmanuel Vadot        description:
67*6be33864SEmmanuel Vadot          Pinctrl node's client devices specify pin muxes using subnodes,
68*6be33864SEmmanuel Vadot          which in turn use the standard properties below.
69*6be33864SEmmanuel Vadot        $ref: pinmux-node.yaml#
70*6be33864SEmmanuel Vadot
71*6be33864SEmmanuel Vadot        properties:
72*6be33864SEmmanuel Vadot          groups:
73*6be33864SEmmanuel Vadot            description:
74*6be33864SEmmanuel Vadot              List of gpio pin groups affected by the functions specified in
75*6be33864SEmmanuel Vadot              this subnode.
76*6be33864SEmmanuel Vadot            items:
77*6be33864SEmmanuel Vadot              oneOf:
78*6be33864SEmmanuel Vadot                - enum: [lcd0_d18_mfp, rmii_crs_dv_mfp, rmii_txd0_mfp,
79*6be33864SEmmanuel Vadot                         rmii_txd1_mfp, rmii_txen_mfp, rmii_rxen_mfp, rmii_rxd1_mfp,
80*6be33864SEmmanuel Vadot                         rmii_rxd0_mfp, rmii_ref_clk_mfp, i2s_d0_mfp, i2s_pcm1_mfp,
81*6be33864SEmmanuel Vadot                         i2s0_pcm0_mfp, i2s1_pcm0_mfp, i2s_d1_mfp, ks_in2_mfp,
82*6be33864SEmmanuel Vadot                         ks_in1_mfp, ks_in0_mfp, ks_in3_mfp, ks_out0_mfp,
83*6be33864SEmmanuel Vadot                         ks_out1_mfp, ks_out2_mfp, lvds_o_pn_mfp, dsi_dn0_mfp,
84*6be33864SEmmanuel Vadot                         dsi_dp2_mfp, lcd0_d17_mfp, dsi_dp3_mfp, dsi_dn3_mfp,
85*6be33864SEmmanuel Vadot                         dsi_dp0_mfp, lvds_ee_pn_mfp, spi0_i2c_pcm_mfp,
86*6be33864SEmmanuel Vadot                         spi0_i2s_pcm_mfp, dsi_dnp1_cp_mfp, lvds_e_pn_mfp,
87*6be33864SEmmanuel Vadot                         dsi_dn2_mfp, uart2_rtsb_mfp, uart2_ctsb_mfp, uart3_rtsb_mfp,
88*6be33864SEmmanuel Vadot                         uart3_ctsb_mfp, sd0_d0_mfp, sd0_d1_mfp, sd0_d2_d3_mfp,
89*6be33864SEmmanuel Vadot                         sd1_d0_d3_mfp, sd0_cmd_mfp, sd0_clk_mfp, sd1_cmd_mfp,
90*6be33864SEmmanuel Vadot                         uart0_rx_mfp, clko_25m_mfp, csi_cn_cp_mfp, sens0_ckout_mfp,
91*6be33864SEmmanuel Vadot                         uart0_tx_mfp, i2c0_mfp, csi_dn_dp_mfp, sen0_pclk_mfp,
92*6be33864SEmmanuel Vadot                         pcm1_in_mfp, pcm1_clk_mfp, pcm1_sync_mfp, pcm1_out_mfp,
93*6be33864SEmmanuel Vadot                         dnand_data_wr_mfp, dnand_acle_ce0_mfp, nand_ceb2_mfp,
94*6be33864SEmmanuel Vadot                         nand_ceb3_mfp]
95*6be33864SEmmanuel Vadot            minItems: 1
96*6be33864SEmmanuel Vadot            maxItems: 32
97*6be33864SEmmanuel Vadot
98*6be33864SEmmanuel Vadot          function:
99*6be33864SEmmanuel Vadot            description:
100*6be33864SEmmanuel Vadot              Specify the alternative function to be configured for the
101*6be33864SEmmanuel Vadot              given gpio pin groups.
102*6be33864SEmmanuel Vadot            enum: [nor, eth_rmii, eth_smii, spi0, spi1, spi2, spi3, sens0,
103*6be33864SEmmanuel Vadot                   sens1, uart0, uart1, uart2, uart3, uart4, uart5, uart6, i2s0,
104*6be33864SEmmanuel Vadot                   i2s1, pcm1, pcm0, ks, jtag, pwm0, pwm1, pwm2, pwm3, pwm4, pwm5,
105*6be33864SEmmanuel Vadot                   p0, sd0, sd1, sd2, i2c0, i2c1, i2c3, dsi, lvds, usb30, clko_25m,
106*6be33864SEmmanuel Vadot                   mipi_csi, nand, spdif, ts, lcd0]
107*6be33864SEmmanuel Vadot
108*6be33864SEmmanuel Vadot        required:
109*6be33864SEmmanuel Vadot          - groups
110*6be33864SEmmanuel Vadot          - function
111*6be33864SEmmanuel Vadot
112*6be33864SEmmanuel Vadot        additionalProperties: false
113*6be33864SEmmanuel Vadot
114*6be33864SEmmanuel Vadot      '^(.*-)?pinconf$':
115*6be33864SEmmanuel Vadot        type: object
116*6be33864SEmmanuel Vadot        description:
117*6be33864SEmmanuel Vadot          Pinctrl node's client devices specify pin configurations using
118*6be33864SEmmanuel Vadot          subnodes, which in turn use the standard properties below.
119*6be33864SEmmanuel Vadot        $ref: pincfg-node.yaml#
120*6be33864SEmmanuel Vadot
121*6be33864SEmmanuel Vadot        properties:
122*6be33864SEmmanuel Vadot          groups:
123*6be33864SEmmanuel Vadot            description:
124*6be33864SEmmanuel Vadot              List of gpio pin groups affected by the drive-strength property
125*6be33864SEmmanuel Vadot              specified in this subnode.
126*6be33864SEmmanuel Vadot            items:
127*6be33864SEmmanuel Vadot              oneOf:
128*6be33864SEmmanuel Vadot                - enum: [sirq_drv, rmii_txd01_txen_drv, rmii_rxer_drv,
129*6be33864SEmmanuel Vadot                         rmii_crs_drv, rmii_rxd10_drv, rmii_ref_clk_drv,
130*6be33864SEmmanuel Vadot                         smi_mdc_mdio_drv, i2s_d0_drv, i2s_bclk0_drv, i2s3_drv,
131*6be33864SEmmanuel Vadot                         i2s13_drv, pcm1_drv, ks_in_drv, ks_out_drv, lvds_all_drv,
132*6be33864SEmmanuel Vadot                         lcd_dsi_drv, dsi_drv, sd0_d0_d3_drv, sd1_d0_d3_drv,
133*6be33864SEmmanuel Vadot                         sd0_cmd_drv, sd0_clk_drv, sd1_cmd_drv, sd1_clk_drv,
134*6be33864SEmmanuel Vadot                         spi0_all_drv, uart0_rx_drv, uart0_tx_drv, uart2_all_drv,
135*6be33864SEmmanuel Vadot                         i2c0_all_drv, i2c12_all_drv, sens0_pclk_drv,
136*6be33864SEmmanuel Vadot                         sens0_ckout_drv, uart3_all_drv]
137*6be33864SEmmanuel Vadot            minItems: 1
138*6be33864SEmmanuel Vadot            maxItems: 32
139*6be33864SEmmanuel Vadot
140*6be33864SEmmanuel Vadot          pins:
141*6be33864SEmmanuel Vadot            description:
142*6be33864SEmmanuel Vadot              List of gpio pins affected by the bias-pull-* and
143*6be33864SEmmanuel Vadot              input-schmitt-* properties specified in this subnode.
144*6be33864SEmmanuel Vadot            items:
145*6be33864SEmmanuel Vadot              oneOf:
146*6be33864SEmmanuel Vadot                - enum: [dnand_dqs, dnand_dqsn, eth_txd0, eth_txd1, eth_txen,
147*6be33864SEmmanuel Vadot                         eth_rxer, eth_crs_dv, eth_rxd1, eth_rxd0, eth_ref_clk,
148*6be33864SEmmanuel Vadot                         eth_mdc, eth_mdio, sirq0, sirq1, sirq2, i2s_d0, i2s_bclk0,
149*6be33864SEmmanuel Vadot                         i2s_lrclk0, i2s_mclk0, i2s_d1, i2s_bclk1, i2s_lrclk1,
150*6be33864SEmmanuel Vadot                         i2s_mclk1, ks_in0, ks_in1, ks_in2, ks_in3, ks_out0, ks_out1,
151*6be33864SEmmanuel Vadot                         ks_out2, lvds_oep, lvds_oen, lvds_odp, lvds_odn, lvds_ocp,
152*6be33864SEmmanuel Vadot                         lvds_ocn, lvds_obp, lvds_obn, lvds_oap, lvds_oan, lvds_eep,
153*6be33864SEmmanuel Vadot                         lvds_een, lvds_edp, lvds_edn, lvds_ecp, lvds_ecn, lvds_ebp,
154*6be33864SEmmanuel Vadot                         lvds_ebn, lvds_eap, lvds_ean, lcd0_d18, lcd0_d17, dsi_dp3,
155*6be33864SEmmanuel Vadot                         dsi_dn3, dsi_dp1, dsi_dn1, dsi_cp, dsi_cn, dsi_dp0, dsi_dn0,
156*6be33864SEmmanuel Vadot                         dsi_dp2, dsi_dn2, sd0_d0, sd0_d1, sd0_d2, sd0_d3, sd1_d0,
157*6be33864SEmmanuel Vadot                         sd1_d1, sd1_d2, sd1_d3, sd0_cmd, sd0_clk, sd1_cmd, sd1_clk,
158*6be33864SEmmanuel Vadot                         spi0_sclk, spi0_ss, spi0_miso, spi0_mosi, uart0_rx,
159*6be33864SEmmanuel Vadot                         uart0_tx, i2c0_sclk, i2c0_sdata, sensor0_pclk,
160*6be33864SEmmanuel Vadot                         sensor0_ckout, dnand_ale, dnand_cle, dnand_ceb0, dnand_ceb1,
161*6be33864SEmmanuel Vadot                         dnand_ceb2, dnand_ceb3, uart2_rx, uart2_tx, uart2_rtsb,
162*6be33864SEmmanuel Vadot                         uart2_ctsb, uart3_rx, uart3_tx, uart3_rtsb, uart3_ctsb,
163*6be33864SEmmanuel Vadot                         pcm1_in, pcm1_clk, pcm1_sync, pcm1_out, i2c1_sclk,
164*6be33864SEmmanuel Vadot                         i2c1_sdata, i2c2_sclk, i2c2_sdata, csi_dn0, csi_dp0,
165*6be33864SEmmanuel Vadot                         csi_dn1, csi_dp1, csi_dn2, csi_dp2, csi_dn3, csi_dp3,
166*6be33864SEmmanuel Vadot                         csi_cn, csi_cp, dnand_d0, dnand_d1, dnand_d2, dnand_d3,
167*6be33864SEmmanuel Vadot                         dnand_d4, dnand_d5, dnand_d6, dnand_d7, dnand_rb, dnand_rdb,
168*6be33864SEmmanuel Vadot                         dnand_rdbn, dnand_wrb, porb, clko_25m, bsel, pkg0, pkg1,
169*6be33864SEmmanuel Vadot                         pkg2, pkg3]
170*6be33864SEmmanuel Vadot            minItems: 1
171*6be33864SEmmanuel Vadot            maxItems: 64
172*6be33864SEmmanuel Vadot
173*6be33864SEmmanuel Vadot          bias-pull-up: true
174*6be33864SEmmanuel Vadot          bias-pull-down: true
175*6be33864SEmmanuel Vadot
176*6be33864SEmmanuel Vadot          drive-strength:
177*6be33864SEmmanuel Vadot            description:
178*6be33864SEmmanuel Vadot              Selects the drive strength for the specified pins, in mA.
179*6be33864SEmmanuel Vadot            enum: [2, 4, 8, 12]
180*6be33864SEmmanuel Vadot
181*6be33864SEmmanuel Vadot          input-schmitt-enable: true
182*6be33864SEmmanuel Vadot          input-schmitt-disable: true
183*6be33864SEmmanuel Vadot
184*6be33864SEmmanuel Vadot        additionalProperties: false
185*6be33864SEmmanuel Vadot
186*6be33864SEmmanuel Vadot    additionalProperties: false
187*6be33864SEmmanuel Vadot
188*6be33864SEmmanuel Vadotrequired:
189*6be33864SEmmanuel Vadot  - compatible
190*6be33864SEmmanuel Vadot  - reg
191*6be33864SEmmanuel Vadot  - clocks
192*6be33864SEmmanuel Vadot  - gpio-controller
193*6be33864SEmmanuel Vadot  - gpio-ranges
194*6be33864SEmmanuel Vadot  - '#gpio-cells'
195*6be33864SEmmanuel Vadot  - interrupt-controller
196*6be33864SEmmanuel Vadot  - '#interrupt-cells'
197*6be33864SEmmanuel Vadot  - interrupts
198*6be33864SEmmanuel Vadot
199*6be33864SEmmanuel VadotadditionalProperties: false
200*6be33864SEmmanuel Vadot
201*6be33864SEmmanuel Vadotexamples:
202*6be33864SEmmanuel Vadot  - |
203*6be33864SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
204*6be33864SEmmanuel Vadot    pinctrl: pinctrl@b01b0000 {
205*6be33864SEmmanuel Vadot        compatible = "actions,s500-pinctrl";
206*6be33864SEmmanuel Vadot        reg = <0xb01b0000 0x40>, <0xb01b0040 0x10>,
207*6be33864SEmmanuel Vadot              <0xb01b0060 0x18>, <0xb01b0080 0xc>;
208*6be33864SEmmanuel Vadot        clocks = <&cmu 55>;
209*6be33864SEmmanuel Vadot        gpio-controller;
210*6be33864SEmmanuel Vadot        gpio-ranges = <&pinctrl 0 0 132>;
211*6be33864SEmmanuel Vadot        #gpio-cells = <2>;
212*6be33864SEmmanuel Vadot        interrupt-controller;
213*6be33864SEmmanuel Vadot        #interrupt-cells = <2>;
214*6be33864SEmmanuel Vadot        interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
215*6be33864SEmmanuel Vadot                     <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
216*6be33864SEmmanuel Vadot                     <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
217*6be33864SEmmanuel Vadot                     <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
218*6be33864SEmmanuel Vadot                     <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
219*6be33864SEmmanuel Vadot
220*6be33864SEmmanuel Vadot        mmc0_pins: mmc0-pins {
221*6be33864SEmmanuel Vadot            pinmux {
222*6be33864SEmmanuel Vadot                groups = "sd0_d0_mfp", "sd0_d1_mfp", "sd0_d2_d3_mfp",
223*6be33864SEmmanuel Vadot                         "sd0_cmd_mfp", "sd0_clk_mfp";
224*6be33864SEmmanuel Vadot                function = "sd0";
225*6be33864SEmmanuel Vadot            };
226*6be33864SEmmanuel Vadot
227*6be33864SEmmanuel Vadot            drv-pinconf {
228*6be33864SEmmanuel Vadot                groups = "sd0_d0_d3_drv", "sd0_cmd_drv", "sd0_clk_drv";
229*6be33864SEmmanuel Vadot                drive-strength = <8>;
230*6be33864SEmmanuel Vadot            };
231*6be33864SEmmanuel Vadot
232*6be33864SEmmanuel Vadot            bias-pinconf {
233*6be33864SEmmanuel Vadot                pins = "sd0_d0", "sd0_d1", "sd0_d2",
234*6be33864SEmmanuel Vadot                       "sd0_d3", "sd0_cmd";
235*6be33864SEmmanuel Vadot                bias-pull-up;
236*6be33864SEmmanuel Vadot            };
237*6be33864SEmmanuel Vadot        };
238*6be33864SEmmanuel Vadot    };
239*6be33864SEmmanuel Vadot
240*6be33864SEmmanuel Vadot...
241