xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,sc8180x-pinctrl.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25def4c47SEmmanuel Vadot%YAML 1.2
35def4c47SEmmanuel Vadot---
45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,sc8180x-pinctrl.yaml#
55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65def4c47SEmmanuel Vadot
75def4c47SEmmanuel Vadottitle: Qualcomm Technologies, Inc. SC8180X TLMM block
85def4c47SEmmanuel Vadot
95def4c47SEmmanuel Vadotmaintainers:
105def4c47SEmmanuel Vadot  - Bjorn Andersson <bjorn.andersson@linaro.org>
115def4c47SEmmanuel Vadot
125def4c47SEmmanuel Vadotdescription: |
135def4c47SEmmanuel Vadot  This binding describes the Top Level Mode Multiplexer block found in the
145def4c47SEmmanuel Vadot  SC8180X platform.
155def4c47SEmmanuel Vadot
165def4c47SEmmanuel VadotallOf:
17e67e8565SEmmanuel Vadot  - $ref: "pinctrl.yaml#"
185def4c47SEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
195def4c47SEmmanuel Vadot
205def4c47SEmmanuel Vadotproperties:
215def4c47SEmmanuel Vadot  compatible:
225def4c47SEmmanuel Vadot    const: qcom,sc8180x-tlmm
235def4c47SEmmanuel Vadot
245def4c47SEmmanuel Vadot  reg:
255def4c47SEmmanuel Vadot    maxItems: 3
265def4c47SEmmanuel Vadot
275def4c47SEmmanuel Vadot  reg-names:
285def4c47SEmmanuel Vadot    items:
295def4c47SEmmanuel Vadot      - const: "west"
305def4c47SEmmanuel Vadot      - const: "east"
315def4c47SEmmanuel Vadot      - const: "south"
325def4c47SEmmanuel Vadot
335def4c47SEmmanuel Vadot  interrupts: true
345def4c47SEmmanuel Vadot  interrupt-controller: true
355def4c47SEmmanuel Vadot  '#interrupt-cells': true
365def4c47SEmmanuel Vadot  gpio-controller: true
375def4c47SEmmanuel Vadot  gpio-reserved-ranges: true
385def4c47SEmmanuel Vadot  '#gpio-cells': true
395def4c47SEmmanuel Vadot  gpio-ranges: true
405def4c47SEmmanuel Vadot  wakeup-parent: true
415def4c47SEmmanuel Vadot
425def4c47SEmmanuel Vadotrequired:
435def4c47SEmmanuel Vadot  - compatible
445def4c47SEmmanuel Vadot  - reg
455def4c47SEmmanuel Vadot  - reg-names
465def4c47SEmmanuel Vadot
475def4c47SEmmanuel VadotadditionalProperties: false
485def4c47SEmmanuel Vadot
495def4c47SEmmanuel VadotpatternProperties:
505def4c47SEmmanuel Vadot  '-state$':
515def4c47SEmmanuel Vadot    oneOf:
525def4c47SEmmanuel Vadot      - $ref: "#/$defs/qcom-sc8180x-tlmm-state"
535def4c47SEmmanuel Vadot      - patternProperties:
54*7ef62cebSEmmanuel Vadot          "-pins$":
555def4c47SEmmanuel Vadot            $ref: "#/$defs/qcom-sc8180x-tlmm-state"
56*7ef62cebSEmmanuel Vadot        additionalProperties: false
575def4c47SEmmanuel Vadot
585def4c47SEmmanuel Vadot'$defs':
595def4c47SEmmanuel Vadot  qcom-sc8180x-tlmm-state:
605def4c47SEmmanuel Vadot    type: object
615def4c47SEmmanuel Vadot    description:
625def4c47SEmmanuel Vadot      Pinctrl node's client devices use subnodes for desired pin configuration.
635def4c47SEmmanuel Vadot      Client device subnodes use below standard properties.
645def4c47SEmmanuel Vadot
655def4c47SEmmanuel Vadot    properties:
665def4c47SEmmanuel Vadot      pins:
675def4c47SEmmanuel Vadot        description:
685def4c47SEmmanuel Vadot          List of gpio pins affected by the properties specified in this
695def4c47SEmmanuel Vadot          subnode.
705def4c47SEmmanuel Vadot        items:
715def4c47SEmmanuel Vadot          oneOf:
725def4c47SEmmanuel Vadot            - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-8][0-9])$"
735def4c47SEmmanuel Vadot            - enum: [ sdc2_clk, sdc2_cmd, sdc2_data, ufs_reset ]
745def4c47SEmmanuel Vadot        minItems: 1
755def4c47SEmmanuel Vadot        maxItems: 16
765def4c47SEmmanuel Vadot
775def4c47SEmmanuel Vadot      function:
785def4c47SEmmanuel Vadot        description:
795def4c47SEmmanuel Vadot          Specify the alternative function to be configured for the specified
805def4c47SEmmanuel Vadot          pins.
815def4c47SEmmanuel Vadot
825def4c47SEmmanuel Vadot        enum: [ adsp_ext, agera_pll, aoss_cti, atest_char, atest_tsens,
835def4c47SEmmanuel Vadot                atest_tsens2, atest_usb0, atest_usb1, atest_usb2, atest_usb3,
845def4c47SEmmanuel Vadot                atest_usb4, audio_ref, btfm_slimbus, cam_mclk, cci_async,
855def4c47SEmmanuel Vadot                cci_i2c, cci_timer0, cci_timer1, cci_timer2, cci_timer3,
865def4c47SEmmanuel Vadot                cci_timer4, cci_timer5, cci_timer6, cci_timer7, cci_timer8,
875def4c47SEmmanuel Vadot                cci_timer9, cri_trng, dbg_out, ddr_bist, ddr_pxi, debug_hot,
885def4c47SEmmanuel Vadot                dp_hot, edp_hot, edp_lcd, emac_phy, emac_pps, gcc_gp1, gcc_gp2,
895def4c47SEmmanuel Vadot                gcc_gp3, gcc_gp4, gcc_gp5, gpio, gps, grfc, hs1_mi2s, hs2_mi2s,
905def4c47SEmmanuel Vadot                hs3_mi2s, jitter_bist, lpass_slimbus, m_voc, mdp_vsync,
915def4c47SEmmanuel Vadot                mdp_vsync0, mdp_vsync1, mdp_vsync2, mdp_vsync3, mdp_vsync4,
925def4c47SEmmanuel Vadot                mdp_vsync5, mss_lte, nav_pps, pa_indicator, pci_e0, pci_e1,
935def4c47SEmmanuel Vadot                pci_e2, pci_e3, phase_flag, pll_bist, pll_bypassnl, pll_reset,
945def4c47SEmmanuel Vadot                pri_mi2s, pri_mi2s_ws, prng_rosc, qdss_cti, qdss_gpio, qlink,
955def4c47SEmmanuel Vadot                qspi0, qspi0_clk, qspi0_cs, qspi1, qspi1_clk, qspi1_cs,
965def4c47SEmmanuel Vadot                qua_mi2s, qup0, qup1, qup2, qup3, qup4, qup5, qup6, qup7, qup8,
975def4c47SEmmanuel Vadot                qup9, qup10, qup11, qup12, qup13, qup14, qup15, qup16, qup17,
985def4c47SEmmanuel Vadot                qup18, qup19, qup_l4, qup_l5, qup_l6, rgmii, sd_write, sdc4,
995def4c47SEmmanuel Vadot                sdc4_clk, sdc4_cmd, sec_mi2s, sp_cmu, spkr_i2s, ter_mi2s, tgu,
1005def4c47SEmmanuel Vadot                tsense_pwm1, tsense_pwm2, tsif1, tsif2, uim1, uim2, uim_batt,
1015def4c47SEmmanuel Vadot                usb0_phy, usb1_phy, usb2phy_ac, vfr_1, vsense_trigger,
1025def4c47SEmmanuel Vadot                wlan1_adc, wlan2_adc, wmss_reset ]
1035def4c47SEmmanuel Vadot
1045def4c47SEmmanuel Vadot      bias-disable: true
1055def4c47SEmmanuel Vadot      bias-pull-down: true
1065def4c47SEmmanuel Vadot      bias-pull-up: true
1075def4c47SEmmanuel Vadot      drive-strength: true
1085def4c47SEmmanuel Vadot      input-enable: true
1095def4c47SEmmanuel Vadot      output-high: true
1105def4c47SEmmanuel Vadot      output-low: true
1115def4c47SEmmanuel Vadot
1125def4c47SEmmanuel Vadot    required:
1135def4c47SEmmanuel Vadot      - pins
114*7ef62cebSEmmanuel Vadot
115*7ef62cebSEmmanuel Vadot    allOf:
116*7ef62cebSEmmanuel Vadot      - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
117*7ef62cebSEmmanuel Vadot      - if:
118*7ef62cebSEmmanuel Vadot          properties:
119*7ef62cebSEmmanuel Vadot            pins:
120*7ef62cebSEmmanuel Vadot              pattern: "^gpio([0-9]|[1-9][0-9]|1[0-8][0-9])$"
121*7ef62cebSEmmanuel Vadot        then:
122*7ef62cebSEmmanuel Vadot          required:
1235def4c47SEmmanuel Vadot            - function
1245def4c47SEmmanuel Vadot
1255def4c47SEmmanuel Vadot    additionalProperties: false
1265def4c47SEmmanuel Vadot
1275def4c47SEmmanuel Vadotexamples:
1285def4c47SEmmanuel Vadot  - |
1295def4c47SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1305def4c47SEmmanuel Vadot    pinctrl@3100000 {
1315def4c47SEmmanuel Vadot        compatible = "qcom,sc8180x-tlmm";
1325def4c47SEmmanuel Vadot        reg = <0x03100000 0x300000>,
1335def4c47SEmmanuel Vadot              <0x03500000 0x700000>,
1345def4c47SEmmanuel Vadot              <0x03d00000 0x300000>;
1355def4c47SEmmanuel Vadot        reg-names = "west", "east", "south";
1365def4c47SEmmanuel Vadot        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
1375def4c47SEmmanuel Vadot        gpio-controller;
1385def4c47SEmmanuel Vadot        #gpio-cells = <2>;
1395def4c47SEmmanuel Vadot        interrupt-controller;
1405def4c47SEmmanuel Vadot        #interrupt-cells = <2>;
1415def4c47SEmmanuel Vadot        gpio-ranges = <&tlmm 0 0 190>;
1425def4c47SEmmanuel Vadot
1435def4c47SEmmanuel Vadot        gpio-wo-subnode-state {
1445def4c47SEmmanuel Vadot            pins = "gpio1";
1455def4c47SEmmanuel Vadot            function = "gpio";
1465def4c47SEmmanuel Vadot        };
1475def4c47SEmmanuel Vadot
1485def4c47SEmmanuel Vadot        uart-w-subnodes-state {
149*7ef62cebSEmmanuel Vadot            rx-pins {
1505def4c47SEmmanuel Vadot                pins = "gpio4";
1515def4c47SEmmanuel Vadot                function = "qup6";
1525def4c47SEmmanuel Vadot                bias-pull-up;
1535def4c47SEmmanuel Vadot            };
1545def4c47SEmmanuel Vadot
155*7ef62cebSEmmanuel Vadot            tx-pins {
1565def4c47SEmmanuel Vadot                pins = "gpio5";
1575def4c47SEmmanuel Vadot                function = "qup6";
1585def4c47SEmmanuel Vadot                bias-disable;
1595def4c47SEmmanuel Vadot            };
1605def4c47SEmmanuel Vadot        };
1615def4c47SEmmanuel Vadot    };
1625def4c47SEmmanuel Vadot...
163