xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8280xp-pinctrl.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c9ccf3a3SEmmanuel Vadot%YAML 1.2
3c9ccf3a3SEmmanuel Vadot---
4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,sc8280xp-pinctrl.yaml#
5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c9ccf3a3SEmmanuel Vadot
7c9ccf3a3SEmmanuel Vadottitle: Qualcomm Technologies, Inc. SC8280XP TLMM block
8c9ccf3a3SEmmanuel Vadot
9c9ccf3a3SEmmanuel Vadotmaintainers:
10c9ccf3a3SEmmanuel Vadot  - Bjorn Andersson <bjorn.andersson@linaro.org>
11c9ccf3a3SEmmanuel Vadot
12c9ccf3a3SEmmanuel Vadotdescription: |
13c9ccf3a3SEmmanuel Vadot  This binding describes the Top Level Mode Multiplexer block found in the
14c9ccf3a3SEmmanuel Vadot  SC8280XP platform.
15c9ccf3a3SEmmanuel Vadot
16c9ccf3a3SEmmanuel VadotallOf:
17c9ccf3a3SEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
18c9ccf3a3SEmmanuel Vadot
19c9ccf3a3SEmmanuel Vadotproperties:
20c9ccf3a3SEmmanuel Vadot  compatible:
21c9ccf3a3SEmmanuel Vadot    const: qcom,sc8280xp-tlmm
22c9ccf3a3SEmmanuel Vadot
23c9ccf3a3SEmmanuel Vadot  reg:
24c9ccf3a3SEmmanuel Vadot    maxItems: 1
25c9ccf3a3SEmmanuel Vadot
26c9ccf3a3SEmmanuel Vadot  interrupts: true
27c9ccf3a3SEmmanuel Vadot  interrupt-controller: true
28c9ccf3a3SEmmanuel Vadot  '#interrupt-cells': true
29c9ccf3a3SEmmanuel Vadot  gpio-controller: true
30c9ccf3a3SEmmanuel Vadot  gpio-reserved-ranges: true
31c9ccf3a3SEmmanuel Vadot  '#gpio-cells': true
32c9ccf3a3SEmmanuel Vadot  gpio-ranges: true
33c9ccf3a3SEmmanuel Vadot  wakeup-parent: true
34c9ccf3a3SEmmanuel Vadot
35c9ccf3a3SEmmanuel Vadotrequired:
36c9ccf3a3SEmmanuel Vadot  - compatible
37c9ccf3a3SEmmanuel Vadot  - reg
38c9ccf3a3SEmmanuel Vadot
39c9ccf3a3SEmmanuel VadotadditionalProperties: false
40c9ccf3a3SEmmanuel Vadot
41c9ccf3a3SEmmanuel VadotpatternProperties:
42c9ccf3a3SEmmanuel Vadot  '-state$':
43c9ccf3a3SEmmanuel Vadot    oneOf:
44c9ccf3a3SEmmanuel Vadot      - $ref: "#/$defs/qcom-sc8280xp-tlmm-state"
45c9ccf3a3SEmmanuel Vadot      - patternProperties:
46*7ef62cebSEmmanuel Vadot          "-pins$":
47c9ccf3a3SEmmanuel Vadot            $ref: "#/$defs/qcom-sc8280xp-tlmm-state"
48*7ef62cebSEmmanuel Vadot        additionalProperties: false
49c9ccf3a3SEmmanuel Vadot
50c9ccf3a3SEmmanuel Vadot'$defs':
51c9ccf3a3SEmmanuel Vadot  qcom-sc8280xp-tlmm-state:
52c9ccf3a3SEmmanuel Vadot    type: object
53c9ccf3a3SEmmanuel Vadot    description:
54c9ccf3a3SEmmanuel Vadot      Pinctrl node's client devices use subnodes for desired pin configuration.
55c9ccf3a3SEmmanuel Vadot      Client device subnodes use below standard properties.
56c9ccf3a3SEmmanuel Vadot
57c9ccf3a3SEmmanuel Vadot    properties:
58c9ccf3a3SEmmanuel Vadot      pins:
59c9ccf3a3SEmmanuel Vadot        description:
60c9ccf3a3SEmmanuel Vadot          List of gpio pins affected by the properties specified in this
61c9ccf3a3SEmmanuel Vadot          subnode.
62c9ccf3a3SEmmanuel Vadot        items:
63c9ccf3a3SEmmanuel Vadot          oneOf:
64c9ccf3a3SEmmanuel Vadot            - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-1][0-9]|22[0-7])$"
65c9ccf3a3SEmmanuel Vadot            - enum: [ sdc2_clk, sdc2_cmd, sdc2_data, ufs_reset, ufs1_reset ]
66c9ccf3a3SEmmanuel Vadot        minItems: 1
67c9ccf3a3SEmmanuel Vadot        maxItems: 16
68c9ccf3a3SEmmanuel Vadot
69c9ccf3a3SEmmanuel Vadot      function:
70c9ccf3a3SEmmanuel Vadot        description:
71c9ccf3a3SEmmanuel Vadot          Specify the alternative function to be configured for the specified
72c9ccf3a3SEmmanuel Vadot          pins.
73c9ccf3a3SEmmanuel Vadot
74c9ccf3a3SEmmanuel Vadot        enum: [ atest_char, atest_usb, audio_ref, cam_mclk, cci_async, cci_i2c,
75c9ccf3a3SEmmanuel Vadot                cci_timer0, cci_timer1, cci_timer2, cci_timer3, cci_timer4,
76c9ccf3a3SEmmanuel Vadot                cci_timer5, cci_timer6, cci_timer7, cci_timer8, cci_timer9,
77c9ccf3a3SEmmanuel Vadot                cmu_rng, cri_trng, cri_trng0, cri_trng1, dbg_out, ddr_bist,
78c9ccf3a3SEmmanuel Vadot                ddr_pxi0, ddr_pxi1, ddr_pxi2, ddr_pxi3, ddr_pxi4, ddr_pxi5,
79c9ccf3a3SEmmanuel Vadot                ddr_pxi6, ddr_pxi7, dp2_hot, dp3_hot, edp0_lcd, edp1_lcd,
80c9ccf3a3SEmmanuel Vadot                edp2_lcd, edp3_lcd, edp_hot, emac0_dll, emac0_mcg0, emac0_mcg1,
81c9ccf3a3SEmmanuel Vadot                emac0_mcg2, emac0_mcg3, emac0_phy, emac0_ptp, emac1_dll0,
82c9ccf3a3SEmmanuel Vadot                emac1_dll1, emac1_mcg0, emac1_mcg1, emac1_mcg2, emac1_mcg3,
83c9ccf3a3SEmmanuel Vadot                emac1_phy, emac1_ptp, gcc_gp1, gcc_gp2, gcc_gp3, gcc_gp4,
84c9ccf3a3SEmmanuel Vadot                gcc_gp5, gpio, hs1_mi2s, hs2_mi2s, hs3_mi2s, ibi_i3c,
85c9ccf3a3SEmmanuel Vadot                jitter_bist, lpass_slimbus, mdp0_vsync0, mdp0_vsync1,
86c9ccf3a3SEmmanuel Vadot                mdp0_vsync2, mdp0_vsync3, mdp0_vsync4, mdp0_vsync5,
87c9ccf3a3SEmmanuel Vadot                mdp0_vsync6, mdp0_vsync7, mdp0_vsync8, mdp1_vsync0,
88c9ccf3a3SEmmanuel Vadot                mdp1_vsync1, mdp1_vsync2, mdp1_vsync3, mdp1_vsync4,
89c9ccf3a3SEmmanuel Vadot                mdp1_vsync5, mdp1_vsync6, mdp1_vsync7, mdp1_vsync8, mdp_vsync,
90c9ccf3a3SEmmanuel Vadot                mi2s0_data0, mi2s0_data1, mi2s0_sck, mi2s0_ws, mi2s1_data0,
91c9ccf3a3SEmmanuel Vadot                mi2s1_data1, mi2s1_sck, mi2s1_ws, mi2s2_data0, mi2s2_data1,
92c9ccf3a3SEmmanuel Vadot                mi2s2_sck, mi2s2_ws, mi2s_mclk1, mi2s_mclk2, pcie2a_clkreq,
93c9ccf3a3SEmmanuel Vadot                pcie2b_clkreq, pcie3a_clkreq, pcie3b_clkreq, pcie4_clkreq,
94c9ccf3a3SEmmanuel Vadot                phase_flag, pll_bist, pll_clk, prng_rosc0, prng_rosc1,
95c9ccf3a3SEmmanuel Vadot                prng_rosc2, prng_rosc3, qdss_cti, qdss_gpio, qspi, qspi_clk,
96c9ccf3a3SEmmanuel Vadot                qspi_cs, qup0, qup1, qup2, qup3, qup4, qup5, qup6, qup7, qup8,
97c9ccf3a3SEmmanuel Vadot                qup9, qup10, qup11, qup12, qup13, qup14, qup15, qup16, qup17,
98c9ccf3a3SEmmanuel Vadot                qup18, qup19, qup20, qup21, qup22, qup23, rgmii_0, rgmii_1,
99c9ccf3a3SEmmanuel Vadot                sd_write, sdc40, sdc42, sdc43, sdc4_clk, sdc4_cmd, tb_trig,
100c9ccf3a3SEmmanuel Vadot                tgu, tsense_pwm1, tsense_pwm2, tsense_pwm3, tsense_pwm4,
101c9ccf3a3SEmmanuel Vadot                usb0_dp, usb0_phy, usb0_sbrx, usb0_sbtx, usb0_usb4, usb1_dp,
102c9ccf3a3SEmmanuel Vadot                usb1_phy, usb1_sbrx, usb1_sbtx, usb1_usb4, usb2phy_ac,
103c9ccf3a3SEmmanuel Vadot                vsense_trigger ]
104c9ccf3a3SEmmanuel Vadot
105c9ccf3a3SEmmanuel Vadot      bias-disable: true
106c9ccf3a3SEmmanuel Vadot      bias-pull-down: true
107c9ccf3a3SEmmanuel Vadot      bias-pull-up: true
108c9ccf3a3SEmmanuel Vadot      drive-strength: true
109c9ccf3a3SEmmanuel Vadot      input-enable: true
110c9ccf3a3SEmmanuel Vadot      output-high: true
111c9ccf3a3SEmmanuel Vadot      output-low: true
112c9ccf3a3SEmmanuel Vadot
113c9ccf3a3SEmmanuel Vadot    required:
114c9ccf3a3SEmmanuel Vadot      - pins
115*7ef62cebSEmmanuel Vadot
116*7ef62cebSEmmanuel Vadot    allOf:
117*7ef62cebSEmmanuel Vadot      - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
118*7ef62cebSEmmanuel Vadot      - if:
119*7ef62cebSEmmanuel Vadot          properties:
120*7ef62cebSEmmanuel Vadot            pins:
121*7ef62cebSEmmanuel Vadot              pattern: "^gpio([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-1][0-9]|22[0-7])$"
122*7ef62cebSEmmanuel Vadot        then:
123*7ef62cebSEmmanuel Vadot          required:
124c9ccf3a3SEmmanuel Vadot            - function
125c9ccf3a3SEmmanuel Vadot
126c9ccf3a3SEmmanuel Vadot    additionalProperties: false
127c9ccf3a3SEmmanuel Vadot
128c9ccf3a3SEmmanuel Vadotexamples:
129c9ccf3a3SEmmanuel Vadot  - |
130c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
131c9ccf3a3SEmmanuel Vadot    pinctrl@f100000 {
132c9ccf3a3SEmmanuel Vadot        compatible = "qcom,sc8280xp-tlmm";
133c9ccf3a3SEmmanuel Vadot        reg = <0x0f100000 0x300000>;
134c9ccf3a3SEmmanuel Vadot        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
135c9ccf3a3SEmmanuel Vadot        gpio-controller;
136c9ccf3a3SEmmanuel Vadot        #gpio-cells = <2>;
137c9ccf3a3SEmmanuel Vadot        interrupt-controller;
138c9ccf3a3SEmmanuel Vadot        #interrupt-cells = <2>;
139c9ccf3a3SEmmanuel Vadot        gpio-ranges = <&tlmm 0 0 230>;
140c9ccf3a3SEmmanuel Vadot
141c9ccf3a3SEmmanuel Vadot        gpio-wo-subnode-state {
142c9ccf3a3SEmmanuel Vadot                pins = "gpio1";
143c9ccf3a3SEmmanuel Vadot                function = "gpio";
144c9ccf3a3SEmmanuel Vadot        };
145c9ccf3a3SEmmanuel Vadot
146c9ccf3a3SEmmanuel Vadot        uart-w-subnodes-state {
147*7ef62cebSEmmanuel Vadot            rx-pins {
148c9ccf3a3SEmmanuel Vadot                pins = "gpio4";
149c9ccf3a3SEmmanuel Vadot                function = "qup14";
150c9ccf3a3SEmmanuel Vadot                bias-pull-up;
151c9ccf3a3SEmmanuel Vadot            };
152c9ccf3a3SEmmanuel Vadot
153*7ef62cebSEmmanuel Vadot            tx-pins {
154c9ccf3a3SEmmanuel Vadot                pins = "gpio5";
155c9ccf3a3SEmmanuel Vadot                function = "qup14";
156c9ccf3a3SEmmanuel Vadot                bias-disable;
157c9ccf3a3SEmmanuel Vadot            };
158c9ccf3a3SEmmanuel Vadot        };
159c9ccf3a3SEmmanuel Vadot    };
160c9ccf3a3SEmmanuel Vadot...
161