xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm8150-pinctrl.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
18bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28bab661aSEmmanuel Vadot%YAML 1.2
38bab661aSEmmanuel Vadot---
48bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,sm8150-pinctrl.yaml#
58bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68bab661aSEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: Qualcomm SM8150 TLMM pin controller
88bab661aSEmmanuel Vadot
98bab661aSEmmanuel Vadotmaintainers:
108bab661aSEmmanuel Vadot  - Bjorn Andersson <andersson@kernel.org>
118bab661aSEmmanuel Vadot  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
128bab661aSEmmanuel Vadot
138bab661aSEmmanuel Vadotdescription:
148bab661aSEmmanuel Vadot  Top Level Mode Multiplexer pin controller in Qualcomm SM8150 SoC.
158bab661aSEmmanuel Vadot
168bab661aSEmmanuel Vadotproperties:
178bab661aSEmmanuel Vadot  compatible:
188bab661aSEmmanuel Vadot    const: qcom,sm8150-pinctrl
198bab661aSEmmanuel Vadot
208bab661aSEmmanuel Vadot  reg:
218bab661aSEmmanuel Vadot    maxItems: 4
228bab661aSEmmanuel Vadot
238bab661aSEmmanuel Vadot  reg-names:
248bab661aSEmmanuel Vadot    items:
258bab661aSEmmanuel Vadot      - const: west
268bab661aSEmmanuel Vadot      - const: east
278bab661aSEmmanuel Vadot      - const: north
288bab661aSEmmanuel Vadot      - const: south
298bab661aSEmmanuel Vadot
30cb7aa33aSEmmanuel Vadot  interrupts:
31cb7aa33aSEmmanuel Vadot    maxItems: 1
32cb7aa33aSEmmanuel Vadot
338bab661aSEmmanuel Vadot  gpio-reserved-ranges:
348bab661aSEmmanuel Vadot    minItems: 1
358bab661aSEmmanuel Vadot    maxItems: 88
368bab661aSEmmanuel Vadot
378bab661aSEmmanuel Vadot  gpio-line-names:
388bab661aSEmmanuel Vadot    maxItems: 175
398bab661aSEmmanuel Vadot
408bab661aSEmmanuel VadotpatternProperties:
418bab661aSEmmanuel Vadot  "-state$":
428bab661aSEmmanuel Vadot    oneOf:
438bab661aSEmmanuel Vadot      - $ref: "#/$defs/qcom-sm8150-tlmm-state"
448bab661aSEmmanuel Vadot      - patternProperties:
458bab661aSEmmanuel Vadot          "-pins$":
468bab661aSEmmanuel Vadot            $ref: "#/$defs/qcom-sm8150-tlmm-state"
478bab661aSEmmanuel Vadot        additionalProperties: false
488bab661aSEmmanuel Vadot
498bab661aSEmmanuel Vadot$defs:
508bab661aSEmmanuel Vadot  qcom-sm8150-tlmm-state:
518bab661aSEmmanuel Vadot    type: object
528bab661aSEmmanuel Vadot    description:
538bab661aSEmmanuel Vadot      Pinctrl node's client devices use subnodes for desired pin configuration.
548bab661aSEmmanuel Vadot      Client device subnodes use below standard properties.
558bab661aSEmmanuel Vadot    $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
56fac71e4eSEmmanuel Vadot    unevaluatedProperties: false
578bab661aSEmmanuel Vadot
588bab661aSEmmanuel Vadot    properties:
598bab661aSEmmanuel Vadot      pins:
608bab661aSEmmanuel Vadot        description:
618bab661aSEmmanuel Vadot          List of gpio pins affected by the properties specified in this
628bab661aSEmmanuel Vadot          subnode.
638bab661aSEmmanuel Vadot        items:
648bab661aSEmmanuel Vadot          oneOf:
658bab661aSEmmanuel Vadot            - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-6][0-9]|17[0-4])$"
668bab661aSEmmanuel Vadot            - enum: [ sdc2_clk, sdc2_cmd, sdc2_data, ufs_reset ]
678bab661aSEmmanuel Vadot        minItems: 1
688bab661aSEmmanuel Vadot        maxItems: 36
698bab661aSEmmanuel Vadot
708bab661aSEmmanuel Vadot      function:
718bab661aSEmmanuel Vadot        description:
728bab661aSEmmanuel Vadot          Specify the alternative function to be configured for the specified
738bab661aSEmmanuel Vadot          pins.
748bab661aSEmmanuel Vadot
758bab661aSEmmanuel Vadot        enum: [ adsp_ext, agera_pll, aoss_cti, ddr_pxi2, atest_char,
768bab661aSEmmanuel Vadot                atest_char0, atest_char1, atest_char2, atest_char3, audio_ref,
778bab661aSEmmanuel Vadot                atest_usb1, atest_usb2, atest_usb10, atest_usb11, atest_usb12,
78fac71e4eSEmmanuel Vadot                atest_usb13, atest_usb20, atest_usb21, atest_usb22,
798bab661aSEmmanuel Vadot                atest_usb23, btfm_slimbus, cam_mclk, cci_async, cci_i2c,
808bab661aSEmmanuel Vadot                cci_timer0, cci_timer1, cci_timer2, cci_timer3, cci_timer4,
818bab661aSEmmanuel Vadot                cri_trng, cri_trng0, cri_trng1, dbg_out, ddr_bist, ddr_pxi0,
828bab661aSEmmanuel Vadot                ddr_pxi1, ddr_pxi3, edp_hot, edp_lcd, emac_phy, emac_pps,
838bab661aSEmmanuel Vadot                gcc_gp1, gcc_gp2, gcc_gp3, gpio, hs1_mi2s, hs2_mi2s, hs3_mi2s,
848bab661aSEmmanuel Vadot                jitter_bist, lpass_slimbus, mdp_vsync, mdp_vsync0, mdp_vsync1,
858bab661aSEmmanuel Vadot                mdp_vsync2, mdp_vsync3, mss_lte, m_voc, nav_pps, pa_indicator,
868bab661aSEmmanuel Vadot                pci_e0, phase_flag, pll_bypassnl, pll_bist, pci_e1, pll_reset,
878bab661aSEmmanuel Vadot                pri_mi2s, pri_mi2s_ws, prng_rosc, qdss, qdss_cti,
888bab661aSEmmanuel Vadot                qlink_request, qlink_enable, qspi0, qspi1, qspi2, qspi3,
898bab661aSEmmanuel Vadot                qspi_clk, qspi_cs, qua_mi2s, qup0, qup1, qup2, qup3, qup4,
908bab661aSEmmanuel Vadot                qup5, qup6, qup7, qup8, qup9, qup10, qup11, qup12, qup13,
918bab661aSEmmanuel Vadot                qup14, qup15, qup16, qup17, qup18, qup19, qup_l4, qup_l5,
928bab661aSEmmanuel Vadot                qup_l6, rgmii, sdc4, sd_write, sec_mi2s, spkr_i2s, sp_cmu,
938bab661aSEmmanuel Vadot                ter_mi2s, tgu_ch0, tgu_ch1, tgu_ch2, tgu_ch3, tsense_pwm1,
948bab661aSEmmanuel Vadot                tsense_pwm2, tsif1, tsif2, uim1, uim2, uim_batt, usb2phy_ac,
958bab661aSEmmanuel Vadot                usb_phy, vfr_1, vsense_trigger, wlan1_adc0, wlan1_adc1,
968bab661aSEmmanuel Vadot                wlan2_adc0, wlan2_adc1, wmss_reset ]
978bab661aSEmmanuel Vadot
988bab661aSEmmanuel Vadot    required:
998bab661aSEmmanuel Vadot      - pins
1008bab661aSEmmanuel Vadot
1018bab661aSEmmanuel VadotallOf:
1028bab661aSEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
1038bab661aSEmmanuel Vadot
1048bab661aSEmmanuel Vadotrequired:
1058bab661aSEmmanuel Vadot  - compatible
1068bab661aSEmmanuel Vadot  - reg
1078bab661aSEmmanuel Vadot  - reg-names
1088bab661aSEmmanuel Vadot
109*8d13bc63SEmmanuel VadotunevaluatedProperties: false
1108bab661aSEmmanuel Vadot
1118bab661aSEmmanuel Vadotexamples:
1128bab661aSEmmanuel Vadot  - |
1138bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1148bab661aSEmmanuel Vadot
1158bab661aSEmmanuel Vadot    tlmm: pinctrl@3100000 {
1168bab661aSEmmanuel Vadot        compatible = "qcom,sm8150-pinctrl";
1178bab661aSEmmanuel Vadot        reg = <0x03100000 0x300000>,
1188bab661aSEmmanuel Vadot              <0x03500000 0x300000>,
1198bab661aSEmmanuel Vadot              <0x03900000 0x300000>,
1208bab661aSEmmanuel Vadot              <0x03d00000 0x300000>;
1218bab661aSEmmanuel Vadot        reg-names = "west", "east", "north", "south";
1228bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
1238bab661aSEmmanuel Vadot        gpio-ranges = <&tlmm 0 0 176>;
1248bab661aSEmmanuel Vadot        gpio-controller;
1258bab661aSEmmanuel Vadot        #gpio-cells = <2>;
1268bab661aSEmmanuel Vadot        interrupt-controller;
1278bab661aSEmmanuel Vadot        #interrupt-cells = <2>;
1288bab661aSEmmanuel Vadot        wakeup-parent = <&pdc>;
1298bab661aSEmmanuel Vadot
1308bab661aSEmmanuel Vadot        qup-spi0-default-state {
1318bab661aSEmmanuel Vadot            pins = "gpio0", "gpio1", "gpio2", "gpio3";
1328bab661aSEmmanuel Vadot            function = "qup0";
1338bab661aSEmmanuel Vadot            drive-strength = <6>;
1348bab661aSEmmanuel Vadot            bias-disable;
1358bab661aSEmmanuel Vadot        };
1368bab661aSEmmanuel Vadot
1378bab661aSEmmanuel Vadot        pcie1-default-state {
1388bab661aSEmmanuel Vadot            perst-pins {
1398bab661aSEmmanuel Vadot                pins = "gpio102";
1408bab661aSEmmanuel Vadot                function = "gpio";
1418bab661aSEmmanuel Vadot                drive-strength = <2>;
1428bab661aSEmmanuel Vadot                bias-pull-down;
1438bab661aSEmmanuel Vadot            };
1448bab661aSEmmanuel Vadot
1458bab661aSEmmanuel Vadot            clkreq-pins {
1468bab661aSEmmanuel Vadot                pins = "gpio103";
1478bab661aSEmmanuel Vadot                function = "pci_e1";
1488bab661aSEmmanuel Vadot                drive-strength = <2>;
1498bab661aSEmmanuel Vadot                bias-pull-up;
1508bab661aSEmmanuel Vadot            };
1518bab661aSEmmanuel Vadot
1528bab661aSEmmanuel Vadot            wake-pins {
1538bab661aSEmmanuel Vadot                pins = "gpio104";
1548bab661aSEmmanuel Vadot                function = "gpio";
1558bab661aSEmmanuel Vadot                drive-strength = <2>;
1568bab661aSEmmanuel Vadot                bias-pull-up;
1578bab661aSEmmanuel Vadot            };
1588bab661aSEmmanuel Vadot        };
1598bab661aSEmmanuel Vadot    };
160