xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8250-pinctrl.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
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/qcom,sm8250-pinctrl.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Qualcomm Technologies, Inc. SM8250 TLMM block
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Bjorn Andersson <bjorn.andersson@linaro.org>
11c66ec88fSEmmanuel Vadot
128bab661aSEmmanuel Vadotdescription:
138bab661aSEmmanuel Vadot  Top Level Mode Multiplexer pin controller in the Qualcomm SM8250 SoC.
14c66ec88fSEmmanuel Vadot
15c66ec88fSEmmanuel Vadotproperties:
16c66ec88fSEmmanuel Vadot  compatible:
17c66ec88fSEmmanuel Vadot    const: qcom,sm8250-pinctrl
18c66ec88fSEmmanuel Vadot
19c66ec88fSEmmanuel Vadot  reg:
20c66ec88fSEmmanuel Vadot    maxItems: 3
21c66ec88fSEmmanuel Vadot
22c66ec88fSEmmanuel Vadot  reg-names:
23c66ec88fSEmmanuel Vadot    items:
248bab661aSEmmanuel Vadot      - const: west
258bab661aSEmmanuel Vadot      - const: south
268bab661aSEmmanuel Vadot      - const: north
27c66ec88fSEmmanuel Vadot
28cb7aa33aSEmmanuel Vadot  interrupts:
29cb7aa33aSEmmanuel Vadot    maxItems: 1
30cb7aa33aSEmmanuel Vadot
318bab661aSEmmanuel Vadot  gpio-reserved-ranges:
328bab661aSEmmanuel Vadot    minItems: 1
338bab661aSEmmanuel Vadot    maxItems: 90
348bab661aSEmmanuel Vadot
358bab661aSEmmanuel Vadot  gpio-line-names:
368bab661aSEmmanuel Vadot    maxItems: 180
378bab661aSEmmanuel Vadot
38c66ec88fSEmmanuel VadotpatternProperties:
398bab661aSEmmanuel Vadot  "-state$":
408bab661aSEmmanuel Vadot    oneOf:
418bab661aSEmmanuel Vadot      - $ref: "#/$defs/qcom-sm8250-tlmm-state"
428bab661aSEmmanuel Vadot      - patternProperties:
438bab661aSEmmanuel Vadot          "-pins$":
448bab661aSEmmanuel Vadot            $ref: "#/$defs/qcom-sm8250-tlmm-state"
458bab661aSEmmanuel Vadot        additionalProperties: false
468bab661aSEmmanuel Vadot
478bab661aSEmmanuel Vadot$defs:
488bab661aSEmmanuel Vadot  qcom-sm8250-tlmm-state:
49c66ec88fSEmmanuel Vadot    type: object
508bab661aSEmmanuel Vadot    description:
518bab661aSEmmanuel Vadot      Pinctrl node's client devices use subnodes for desired pin configuration.
528bab661aSEmmanuel Vadot      Client device subnodes use below standard properties.
538bab661aSEmmanuel Vadot    $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
54fac71e4eSEmmanuel Vadot    unevaluatedProperties: false
558bab661aSEmmanuel Vadot
56c66ec88fSEmmanuel Vadot    properties:
57c66ec88fSEmmanuel Vadot      pins:
58c66ec88fSEmmanuel Vadot        description:
59c66ec88fSEmmanuel Vadot          List of gpio pins affected by the properties specified in this
60c66ec88fSEmmanuel Vadot          subnode.
61c66ec88fSEmmanuel Vadot        items:
62c66ec88fSEmmanuel Vadot          oneOf:
63c66ec88fSEmmanuel Vadot            - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-7][0-9])$"
64c66ec88fSEmmanuel Vadot            - enum: [ sdc2_clk, sdc2_cmd, sdc2_data, ufs_reset ]
65c66ec88fSEmmanuel Vadot        minItems: 1
66c66ec88fSEmmanuel Vadot        maxItems: 36
67c66ec88fSEmmanuel Vadot
68c66ec88fSEmmanuel Vadot      function:
69c66ec88fSEmmanuel Vadot        description:
70c66ec88fSEmmanuel Vadot          Specify the alternative function to be configured for the specified
71c66ec88fSEmmanuel Vadot          pins.
72c66ec88fSEmmanuel Vadot
73c66ec88fSEmmanuel Vadot        enum: [ aoss_cti, atest, audio_ref, cam_mclk, cci_async, cci_i2c,
74c66ec88fSEmmanuel Vadot                cci_timer0, cci_timer1, cci_timer2, cci_timer3, cci_timer4, cri_trng,
75c66ec88fSEmmanuel Vadot                cri_trng0, cri_trng1, dbg_out, ddr_bist, ddr_pxi0, ddr_pxi1,
76c66ec88fSEmmanuel Vadot                ddr_pxi2, ddr_pxi3, dp_hot, dp_lcd, gcc_gp1, gcc_gp2, gcc_gp3, gpio,
77c66ec88fSEmmanuel Vadot                ibi_i3c, jitter_bist, lpass_slimbus, mdp_vsync, mdp_vsync0,
78c66ec88fSEmmanuel Vadot                mdp_vsync1, mdp_vsync2, mdp_vsync3, mi2s0_data0, mi2s0_data1,
79c66ec88fSEmmanuel Vadot                mi2s0_sck, mi2s0_ws, mi2s1_data0, mi2s1_data1, mi2s1_sck, mi2s1_ws,
80c66ec88fSEmmanuel Vadot                mi2s2_data0, mi2s2_data1, mi2s2_sck, mi2s2_ws, pci_e0, pci_e1,
81c66ec88fSEmmanuel Vadot                pci_e2, phase_flag, pll_bist, pll_bypassnl, pll_clk, pll_reset,
82c66ec88fSEmmanuel Vadot                pri_mi2s, prng_rosc, qdss_cti, qdss_gpio, qspi0, qspi1, qspi2, qspi3,
83c66ec88fSEmmanuel Vadot                qspi_clk, qspi_cs, qup0, qup1, qup10, qup11, qup12, qup13, qup14,
84c66ec88fSEmmanuel Vadot                qup15, qup16, qup17, qup18, qup19, qup2, qup3, qup4, qup5, qup6,
85c66ec88fSEmmanuel Vadot                qup7, qup8, qup9, qup_l4, qup_l5, qup_l6, sd_write, sdc40, sdc41,
86c66ec88fSEmmanuel Vadot                sdc42, sdc43, sdc4_clk, sdc4_cmd, sec_mi2s, sp_cmu, tgu_ch0, tgu_ch1,
87c66ec88fSEmmanuel Vadot                tgu_ch2, tgu_ch3, tsense_pwm1, tsense_pwm2, tsif0_clk, tsif0_data,
88c66ec88fSEmmanuel Vadot                tsif0_en, tsif0_error, tsif0_sync, tsif1_clk, tsif1_data, tsif1_en,
89c66ec88fSEmmanuel Vadot                tsif1_error, tsif1_sync, usb2phy_ac, usb_phy, vsense_trigger ]
90c66ec88fSEmmanuel Vadot
91c66ec88fSEmmanuel Vadot    required:
92c66ec88fSEmmanuel Vadot      - pins
937ef62cebSEmmanuel Vadot
94e67e8565SEmmanuel VadotallOf:
958bab661aSEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
96e67e8565SEmmanuel Vadot
97c66ec88fSEmmanuel Vadotrequired:
98c66ec88fSEmmanuel Vadot  - compatible
99c66ec88fSEmmanuel Vadot  - reg
100c66ec88fSEmmanuel Vadot  - reg-names
101c66ec88fSEmmanuel Vadot
102*8d13bc63SEmmanuel VadotunevaluatedProperties: false
103c66ec88fSEmmanuel Vadot
104c66ec88fSEmmanuel Vadotexamples:
105c66ec88fSEmmanuel Vadot  - |
106c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
107c66ec88fSEmmanuel Vadot    pinctrl@1f00000 {
108c66ec88fSEmmanuel Vadot        compatible = "qcom,sm8250-pinctrl";
109c66ec88fSEmmanuel Vadot        reg = <0x0f100000 0x300000>,
110c66ec88fSEmmanuel Vadot              <0x0f500000 0x300000>,
111c66ec88fSEmmanuel Vadot              <0x0f900000 0x300000>;
112c66ec88fSEmmanuel Vadot        reg-names = "west", "south", "north";
113c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
114c66ec88fSEmmanuel Vadot        gpio-controller;
115c66ec88fSEmmanuel Vadot        #gpio-cells = <2>;
116c66ec88fSEmmanuel Vadot        interrupt-controller;
117c66ec88fSEmmanuel Vadot        #interrupt-cells = <2>;
118cb7aa33aSEmmanuel Vadot        gpio-ranges = <&tlmm 0 0 181>; /* GPIOs + ufs_reset */
119c66ec88fSEmmanuel Vadot        wakeup-parent = <&pdc>;
120c66ec88fSEmmanuel Vadot    };
121