xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8180x-tlmm.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,sc8180x-tlmm.yaml#
58bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68bab661aSEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: Qualcomm Technologies, Inc. SC8180X TLMM block
88bab661aSEmmanuel Vadot
98bab661aSEmmanuel Vadotmaintainers:
108bab661aSEmmanuel Vadot  - Bjorn Andersson <bjorn.andersson@linaro.org>
118bab661aSEmmanuel Vadot
128bab661aSEmmanuel Vadotdescription:
138bab661aSEmmanuel Vadot  Top Level Mode Multiplexer pin controller in Qualcomm SC8180X SoC.
148bab661aSEmmanuel Vadot
158bab661aSEmmanuel VadotallOf:
168bab661aSEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
178bab661aSEmmanuel Vadot
188bab661aSEmmanuel Vadotproperties:
198bab661aSEmmanuel Vadot  compatible:
208bab661aSEmmanuel Vadot    const: qcom,sc8180x-tlmm
218bab661aSEmmanuel Vadot
228bab661aSEmmanuel Vadot  reg:
238bab661aSEmmanuel Vadot    maxItems: 3
248bab661aSEmmanuel Vadot
258bab661aSEmmanuel Vadot  reg-names:
268bab661aSEmmanuel Vadot    items:
278bab661aSEmmanuel Vadot      - const: west
288bab661aSEmmanuel Vadot      - const: east
298bab661aSEmmanuel Vadot      - const: south
308bab661aSEmmanuel Vadot
31cb7aa33aSEmmanuel Vadot  interrupts:
32cb7aa33aSEmmanuel Vadot    maxItems: 1
33cb7aa33aSEmmanuel Vadot
348bab661aSEmmanuel Vadot  gpio-reserved-ranges: true
358bab661aSEmmanuel Vadot
368bab661aSEmmanuel VadotpatternProperties:
378bab661aSEmmanuel Vadot  "-state$":
388bab661aSEmmanuel Vadot    oneOf:
398bab661aSEmmanuel Vadot      - $ref: "#/$defs/qcom-sc8180x-tlmm-state"
408bab661aSEmmanuel Vadot      - patternProperties:
418bab661aSEmmanuel Vadot          "-pins$":
428bab661aSEmmanuel Vadot            $ref: "#/$defs/qcom-sc8180x-tlmm-state"
438bab661aSEmmanuel Vadot        additionalProperties: false
448bab661aSEmmanuel Vadot
458bab661aSEmmanuel Vadot$defs:
468bab661aSEmmanuel Vadot  qcom-sc8180x-tlmm-state:
478bab661aSEmmanuel Vadot    type: object
488bab661aSEmmanuel Vadot    description:
498bab661aSEmmanuel Vadot      Pinctrl node's client devices use subnodes for desired pin configuration.
508bab661aSEmmanuel Vadot      Client device subnodes use below standard properties.
518bab661aSEmmanuel Vadot    $ref: qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state
52fac71e4eSEmmanuel Vadot    unevaluatedProperties: false
538bab661aSEmmanuel Vadot
548bab661aSEmmanuel Vadot    properties:
558bab661aSEmmanuel Vadot      pins:
568bab661aSEmmanuel Vadot        description:
578bab661aSEmmanuel Vadot          List of gpio pins affected by the properties specified in this
588bab661aSEmmanuel Vadot          subnode.
598bab661aSEmmanuel Vadot        items:
608bab661aSEmmanuel Vadot          oneOf:
618bab661aSEmmanuel Vadot            - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-8][0-9])$"
628bab661aSEmmanuel Vadot            - enum: [ sdc2_clk, sdc2_cmd, sdc2_data, ufs_reset ]
638bab661aSEmmanuel Vadot        minItems: 1
648bab661aSEmmanuel Vadot        maxItems: 16
658bab661aSEmmanuel Vadot
668bab661aSEmmanuel Vadot      function:
678bab661aSEmmanuel Vadot        description:
688bab661aSEmmanuel Vadot          Specify the alternative function to be configured for the specified
698bab661aSEmmanuel Vadot          pins.
708bab661aSEmmanuel Vadot
718bab661aSEmmanuel Vadot        enum: [ adsp_ext, agera_pll, aoss_cti, atest_char, atest_tsens,
728bab661aSEmmanuel Vadot                atest_tsens2, atest_usb0, atest_usb1, atest_usb2, atest_usb3,
738bab661aSEmmanuel Vadot                atest_usb4, audio_ref, btfm_slimbus, cam_mclk, cci_async,
748bab661aSEmmanuel Vadot                cci_i2c, cci_timer0, cci_timer1, cci_timer2, cci_timer3,
758bab661aSEmmanuel Vadot                cci_timer4, cci_timer5, cci_timer6, cci_timer7, cci_timer8,
768bab661aSEmmanuel Vadot                cci_timer9, cri_trng, dbg_out, ddr_bist, ddr_pxi, debug_hot,
778bab661aSEmmanuel Vadot                dp_hot, edp_hot, edp_lcd, emac_phy, emac_pps, gcc_gp1, gcc_gp2,
788bab661aSEmmanuel Vadot                gcc_gp3, gcc_gp4, gcc_gp5, gpio, gps, grfc, hs1_mi2s, hs2_mi2s,
798bab661aSEmmanuel Vadot                hs3_mi2s, jitter_bist, lpass_slimbus, m_voc, mdp_vsync,
808bab661aSEmmanuel Vadot                mdp_vsync0, mdp_vsync1, mdp_vsync2, mdp_vsync3, mdp_vsync4,
818bab661aSEmmanuel Vadot                mdp_vsync5, mss_lte, nav_pps, pa_indicator, pci_e0, pci_e1,
828bab661aSEmmanuel Vadot                pci_e2, pci_e3, phase_flag, pll_bist, pll_bypassnl, pll_reset,
838bab661aSEmmanuel Vadot                pri_mi2s, pri_mi2s_ws, prng_rosc, qdss_cti, qdss_gpio, qlink,
848bab661aSEmmanuel Vadot                qspi0, qspi0_clk, qspi0_cs, qspi1, qspi1_clk, qspi1_cs,
858bab661aSEmmanuel Vadot                qua_mi2s, qup0, qup1, qup2, qup3, qup4, qup5, qup6, qup7, qup8,
868bab661aSEmmanuel Vadot                qup9, qup10, qup11, qup12, qup13, qup14, qup15, qup16, qup17,
878bab661aSEmmanuel Vadot                qup18, qup19, qup_l4, qup_l5, qup_l6, rgmii, sd_write, sdc4,
888bab661aSEmmanuel Vadot                sdc4_clk, sdc4_cmd, sec_mi2s, sp_cmu, spkr_i2s, ter_mi2s, tgu,
898bab661aSEmmanuel Vadot                tsense_pwm1, tsense_pwm2, tsif1, tsif2, uim1, uim2, uim_batt,
908bab661aSEmmanuel Vadot                usb0_phy, usb1_phy, usb2phy_ac, vfr_1, vsense_trigger,
918bab661aSEmmanuel Vadot                wlan1_adc, wlan2_adc, wmss_reset ]
928bab661aSEmmanuel Vadot
938bab661aSEmmanuel Vadot    required:
948bab661aSEmmanuel Vadot      - pins
958bab661aSEmmanuel Vadot
96*8d13bc63SEmmanuel Vadotrequired:
97*8d13bc63SEmmanuel Vadot  - compatible
98*8d13bc63SEmmanuel Vadot  - reg
99*8d13bc63SEmmanuel Vadot  - reg-names
100*8d13bc63SEmmanuel Vadot
101*8d13bc63SEmmanuel VadotunevaluatedProperties: false
102*8d13bc63SEmmanuel Vadot
1038bab661aSEmmanuel Vadotexamples:
1048bab661aSEmmanuel Vadot  - |
1058bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1068bab661aSEmmanuel Vadot    pinctrl@3100000 {
1078bab661aSEmmanuel Vadot        compatible = "qcom,sc8180x-tlmm";
1088bab661aSEmmanuel Vadot        reg = <0x03100000 0x300000>,
1098bab661aSEmmanuel Vadot              <0x03500000 0x700000>,
1108bab661aSEmmanuel Vadot              <0x03d00000 0x300000>;
1118bab661aSEmmanuel Vadot        reg-names = "west", "east", "south";
1128bab661aSEmmanuel Vadot        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
1138bab661aSEmmanuel Vadot        gpio-controller;
1148bab661aSEmmanuel Vadot        #gpio-cells = <2>;
1158bab661aSEmmanuel Vadot        interrupt-controller;
1168bab661aSEmmanuel Vadot        #interrupt-cells = <2>;
1178bab661aSEmmanuel Vadot        gpio-ranges = <&tlmm 0 0 190>;
1188bab661aSEmmanuel Vadot
1198bab661aSEmmanuel Vadot        gpio-wo-subnode-state {
1208bab661aSEmmanuel Vadot            pins = "gpio1";
1218bab661aSEmmanuel Vadot            function = "gpio";
1228bab661aSEmmanuel Vadot        };
1238bab661aSEmmanuel Vadot
1248bab661aSEmmanuel Vadot        uart-w-subnodes-state {
1258bab661aSEmmanuel Vadot            rx-pins {
1268bab661aSEmmanuel Vadot                pins = "gpio4";
1278bab661aSEmmanuel Vadot                function = "qup6";
1288bab661aSEmmanuel Vadot                bias-pull-up;
1298bab661aSEmmanuel Vadot            };
1308bab661aSEmmanuel Vadot
1318bab661aSEmmanuel Vadot            tx-pins {
1328bab661aSEmmanuel Vadot                pins = "gpio5";
1338bab661aSEmmanuel Vadot                function = "qup6";
1348bab661aSEmmanuel Vadot                bias-disable;
1358bab661aSEmmanuel Vadot            };
1368bab661aSEmmanuel Vadot        };
1378bab661aSEmmanuel Vadot    };
1388bab661aSEmmanuel Vadot...
139