xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,sm6350-pinctrl.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28cc087a1SEmmanuel Vadot%YAML 1.2
38cc087a1SEmmanuel Vadot---
48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,sm6350-pinctrl.yaml#
58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68cc087a1SEmmanuel Vadot
78cc087a1SEmmanuel Vadottitle: Qualcomm Technologies, Inc. SM6350 TLMM block
88cc087a1SEmmanuel Vadot
98cc087a1SEmmanuel Vadotmaintainers:
108cc087a1SEmmanuel Vadot  - Konrad Dybcio <konrad.dybcio@somainline.org>
118cc087a1SEmmanuel Vadot
128cc087a1SEmmanuel Vadotdescription: |
138cc087a1SEmmanuel Vadot  This binding describes the Top Level Mode Multiplexer (TLMM) block found
148cc087a1SEmmanuel Vadot  in the SM6350 platform.
158cc087a1SEmmanuel Vadot
168cc087a1SEmmanuel VadotallOf:
17e67e8565SEmmanuel Vadot  - $ref: "pinctrl.yaml#"
188cc087a1SEmmanuel Vadot  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
198cc087a1SEmmanuel Vadot
208cc087a1SEmmanuel Vadotproperties:
218cc087a1SEmmanuel Vadot  compatible:
228cc087a1SEmmanuel Vadot    const: qcom,sm6350-tlmm
238cc087a1SEmmanuel Vadot
248cc087a1SEmmanuel Vadot  reg:
258cc087a1SEmmanuel Vadot    maxItems: 1
268cc087a1SEmmanuel Vadot
278cc087a1SEmmanuel Vadot  interrupts: true
288cc087a1SEmmanuel Vadot  interrupt-controller: true
298cc087a1SEmmanuel Vadot  '#interrupt-cells': true
308cc087a1SEmmanuel Vadot  gpio-controller: true
318cc087a1SEmmanuel Vadot  gpio-reserved-ranges: true
328cc087a1SEmmanuel Vadot  '#gpio-cells': true
338cc087a1SEmmanuel Vadot  gpio-ranges: true
348cc087a1SEmmanuel Vadot  wakeup-parent: true
358cc087a1SEmmanuel Vadot
368cc087a1SEmmanuel Vadotrequired:
378cc087a1SEmmanuel Vadot  - compatible
388cc087a1SEmmanuel Vadot  - reg
398cc087a1SEmmanuel Vadot
408cc087a1SEmmanuel VadotadditionalProperties: false
418cc087a1SEmmanuel Vadot
428cc087a1SEmmanuel VadotpatternProperties:
438cc087a1SEmmanuel Vadot  '-state$':
448cc087a1SEmmanuel Vadot    oneOf:
458cc087a1SEmmanuel Vadot      - $ref: "#/$defs/qcom-sm6350-tlmm-state"
468cc087a1SEmmanuel Vadot      - patternProperties:
47*7ef62cebSEmmanuel Vadot          "-pins$":
488cc087a1SEmmanuel Vadot            $ref: "#/$defs/qcom-sm6350-tlmm-state"
49*7ef62cebSEmmanuel Vadot        additionalProperties: false
508cc087a1SEmmanuel Vadot
518cc087a1SEmmanuel Vadot$defs:
528cc087a1SEmmanuel Vadot  qcom-sm6350-tlmm-state:
538cc087a1SEmmanuel Vadot    type: object
548cc087a1SEmmanuel Vadot    description:
558cc087a1SEmmanuel Vadot      Pinctrl node's client devices use subnodes for desired pin configuration.
568cc087a1SEmmanuel Vadot      Client device subnodes use below standard properties.
578cc087a1SEmmanuel Vadot
588cc087a1SEmmanuel Vadot    properties:
598cc087a1SEmmanuel Vadot      pins:
608cc087a1SEmmanuel Vadot        description:
618cc087a1SEmmanuel Vadot          List of gpio pins affected by the properties specified in this
628cc087a1SEmmanuel Vadot          subnode.
638cc087a1SEmmanuel Vadot        items:
648cc087a1SEmmanuel Vadot          oneOf:
658cc087a1SEmmanuel Vadot            - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-4][0-9]|15[0-7])$"
668cc087a1SEmmanuel Vadot            - enum: [ sdc1_clk, sdc1_cmd, sdc1_data, sdc2_clk, sdc2_cmd, sdc2_data ]
678cc087a1SEmmanuel Vadot        minItems: 1
688cc087a1SEmmanuel Vadot        maxItems: 36
698cc087a1SEmmanuel Vadot
708cc087a1SEmmanuel Vadot      function:
718cc087a1SEmmanuel Vadot        description:
728cc087a1SEmmanuel Vadot          Specify the alternative function to be configured for the specified
738cc087a1SEmmanuel Vadot          pins.
748cc087a1SEmmanuel Vadot
758cc087a1SEmmanuel Vadot        enum: [ adsp_ext, agera_pll, atest_char, atest_char0, atest_char1, atest_char2,
768cc087a1SEmmanuel Vadot                atest_char3, atest_tsens, atest_tsens2, atest_usb1, atest_usb10, atest_usb11,
778cc087a1SEmmanuel Vadot                atest_usb12, atest_usb13, atest_usb2, atest_usb20, atest_usb21, atest_usb22,
788cc087a1SEmmanuel Vadot                atest_usb23, audio_ref, btfm_slimbus, cam_mclk0, cam_mclk1, cam_mclk2, cam_mclk3,
798cc087a1SEmmanuel Vadot                cam_mclk4, cci_async, cci_i2c, cci_timer0, cci_timer1, cci_timer2, cci_timer3,
808cc087a1SEmmanuel Vadot                cci_timer4, cri_trng, dbg_out, ddr_bist, ddr_pxi0, ddr_pxi1, ddr_pxi2, ddr_pxi3,
818cc087a1SEmmanuel Vadot                dp_hot, edp_lcd, gcc_gp1, gcc_gp2, gcc_gp3, gp_pdm0, gp_pdm1, gp_pdm2, gpio,
828cc087a1SEmmanuel Vadot                gps_tx, ibi_i3c, jitter_bist, ldo_en, ldo_update, lpass_ext, m_voc, mclk,
838cc087a1SEmmanuel Vadot                mdp_vsync, mdp_vsync0, mdp_vsync1, mdp_vsync2, mdp_vsync3, mi2s_0, mi2s_1, mi2s_2,
848cc087a1SEmmanuel Vadot                mss_lte, nav_gpio, nav_pps, pa_indicator, pcie0_clk, phase_flag0, phase_flag1,
858cc087a1SEmmanuel Vadot                phase_flag10, phase_flag11, phase_flag12, phase_flag13, phase_flag14, phase_flag15,
868cc087a1SEmmanuel Vadot                phase_flag16, phase_flag17, phase_flag18, phase_flag19, phase_flag2, phase_flag20,
878cc087a1SEmmanuel Vadot                phase_flag21, phase_flag22, phase_flag23, phase_flag24, phase_flag25, phase_flag26,
888cc087a1SEmmanuel Vadot                phase_flag27, phase_flag28, phase_flag29, phase_flag3, phase_flag30, phase_flag31,
898cc087a1SEmmanuel Vadot                phase_flag4, phase_flag5, phase_flag6, phase_flag7, phase_flag8, phase_flag9,
908cc087a1SEmmanuel Vadot                pll_bist, pll_bypassnl, pll_reset, prng_rosc, qdss_cti, qdss_gpio, qdss_gpio0,
918cc087a1SEmmanuel Vadot                qdss_gpio1, qdss_gpio10, qdss_gpio11, qdss_gpio12, qdss_gpio13, qdss_gpio14,
928cc087a1SEmmanuel Vadot                qdss_gpio15, qdss_gpio2, qdss_gpio3, qdss_gpio4, qdss_gpio5, qdss_gpio6,
938cc087a1SEmmanuel Vadot                qdss_gpio7, qdss_gpio8, qdss_gpio9, qlink0_enable, qlink0_request, qlink0_wmss,
948cc087a1SEmmanuel Vadot                qlink1_enable, qlink1_request, qlink1_wmss, qup00, qup01, qup02, qup10, qup11,
958cc087a1SEmmanuel Vadot                qup12, qup13_f1, qup13_f2, qup14, rffe0_clk, rffe0_data, rffe1_clk, rffe1_data,
968cc087a1SEmmanuel Vadot                rffe2_clk, rffe2_data, rffe3_clk, rffe3_data, rffe4_clk, rffe4_data, sd_write,
978cc087a1SEmmanuel Vadot                sdc1_tb, sdc2_tb, sp_cmu, tgu_ch0, tgu_ch1, tgu_ch2, tgu_ch3, tsense_pwm1,
988cc087a1SEmmanuel Vadot                tsense_pwm2, uim1_clk, uim1_data, uim1_present, uim1_reset, uim2_clk, uim2_data,
998cc087a1SEmmanuel Vadot                uim2_present, uim2_reset, usb_phy, vfr_1, vsense_trigger, wlan1_adc0, wlan1_adc1,
1008cc087a1SEmmanuel Vadot                wlan2_adc0, wlan2_adc1, ]
1018cc087a1SEmmanuel Vadot
1028cc087a1SEmmanuel Vadot
1038cc087a1SEmmanuel Vadot      bias-disable: true
1048cc087a1SEmmanuel Vadot      bias-pull-down: true
1058cc087a1SEmmanuel Vadot      bias-pull-up: true
1068cc087a1SEmmanuel Vadot      drive-strength: true
1078cc087a1SEmmanuel Vadot      input-enable: true
1088cc087a1SEmmanuel Vadot      output-high: true
1098cc087a1SEmmanuel Vadot      output-low: true
1108cc087a1SEmmanuel Vadot
1118cc087a1SEmmanuel Vadot    required:
1128cc087a1SEmmanuel Vadot      - pins
113*7ef62cebSEmmanuel Vadot
114*7ef62cebSEmmanuel Vadot    allOf:
115*7ef62cebSEmmanuel Vadot      - $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
116*7ef62cebSEmmanuel Vadot      - if:
117*7ef62cebSEmmanuel Vadot          properties:
118*7ef62cebSEmmanuel Vadot            pins:
119*7ef62cebSEmmanuel Vadot              pattern: "^gpio([0-9]|[1-9][0-9]|1[0-4][0-9]|15[0-7])$"
120*7ef62cebSEmmanuel Vadot        then:
121*7ef62cebSEmmanuel Vadot          required:
1228cc087a1SEmmanuel Vadot            - function
1238cc087a1SEmmanuel Vadot
1248cc087a1SEmmanuel Vadot    additionalProperties: false
1258cc087a1SEmmanuel Vadot
1268cc087a1SEmmanuel Vadotexamples:
1278cc087a1SEmmanuel Vadot  - |
1288cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1298cc087a1SEmmanuel Vadot    pinctrl@f100000 {
1308cc087a1SEmmanuel Vadot        compatible = "qcom,sm6350-tlmm";
1318cc087a1SEmmanuel Vadot        reg = <0x0f100000 0x300000>;
1328cc087a1SEmmanuel Vadot        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
1338cc087a1SEmmanuel Vadot        gpio-controller;
1348cc087a1SEmmanuel Vadot        #gpio-cells = <2>;
1358cc087a1SEmmanuel Vadot        interrupt-controller;
1368cc087a1SEmmanuel Vadot        #interrupt-cells = <2>;
1378cc087a1SEmmanuel Vadot        gpio-ranges = <&tlmm 0 0 157>;
1388cc087a1SEmmanuel Vadot
1398cc087a1SEmmanuel Vadot        gpio-wo-subnode-state {
1408cc087a1SEmmanuel Vadot            pins = "gpio1";
1418cc087a1SEmmanuel Vadot            function = "gpio";
1428cc087a1SEmmanuel Vadot        };
1438cc087a1SEmmanuel Vadot
1448cc087a1SEmmanuel Vadot        uart-w-subnodes-state {
145*7ef62cebSEmmanuel Vadot            rx-pins {
1468cc087a1SEmmanuel Vadot                pins = "gpio25";
1478cc087a1SEmmanuel Vadot                function = "qup13_f2";
1488cc087a1SEmmanuel Vadot                bias-disable;
1498cc087a1SEmmanuel Vadot            };
1508cc087a1SEmmanuel Vadot
151*7ef62cebSEmmanuel Vadot            tx-pins {
1528cc087a1SEmmanuel Vadot                pins = "gpio26";
1538cc087a1SEmmanuel Vadot                function = "qup13_f2";
1548cc087a1SEmmanuel Vadot                bias-disable;
1558cc087a1SEmmanuel Vadot            };
1568cc087a1SEmmanuel Vadot        };
1578cc087a1SEmmanuel Vadot    };
1588cc087a1SEmmanuel Vadot...
159