xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/qcom,qcm2290-pinctrl.yaml (revision 8cc087a1eee9ec1ca9f7ac1e63ad51bdb5a682eb)
1*8cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8cc087a1SEmmanuel Vadot%YAML 1.2
3*8cc087a1SEmmanuel Vadot---
4*8cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/qcom,qcm2290-pinctrl.yaml#
5*8cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8cc087a1SEmmanuel Vadot
7*8cc087a1SEmmanuel Vadottitle: Qualcomm Technologies, Inc. QCM2290 TLMM block
8*8cc087a1SEmmanuel Vadot
9*8cc087a1SEmmanuel Vadotmaintainers:
10*8cc087a1SEmmanuel Vadot  - Shawn Guo <shawn.guo@linaro.org>
11*8cc087a1SEmmanuel Vadot
12*8cc087a1SEmmanuel Vadotdescription:
13*8cc087a1SEmmanuel Vadot  This binding describes the Top Level Mode Multiplexer block found in the
14*8cc087a1SEmmanuel Vadot  QCM2290 platform.
15*8cc087a1SEmmanuel Vadot
16*8cc087a1SEmmanuel Vadotproperties:
17*8cc087a1SEmmanuel Vadot  compatible:
18*8cc087a1SEmmanuel Vadot    const: qcom,qcm2290-tlmm
19*8cc087a1SEmmanuel Vadot
20*8cc087a1SEmmanuel Vadot  reg:
21*8cc087a1SEmmanuel Vadot    maxItems: 1
22*8cc087a1SEmmanuel Vadot
23*8cc087a1SEmmanuel Vadot  interrupts:
24*8cc087a1SEmmanuel Vadot    description: Specifies the TLMM summary IRQ
25*8cc087a1SEmmanuel Vadot    maxItems: 1
26*8cc087a1SEmmanuel Vadot
27*8cc087a1SEmmanuel Vadot  interrupt-controller: true
28*8cc087a1SEmmanuel Vadot
29*8cc087a1SEmmanuel Vadot  '#interrupt-cells':
30*8cc087a1SEmmanuel Vadot    description:
31*8cc087a1SEmmanuel Vadot      Specifies the PIN numbers and Flags, as defined in defined in
32*8cc087a1SEmmanuel Vadot      include/dt-bindings/interrupt-controller/irq.h
33*8cc087a1SEmmanuel Vadot    const: 2
34*8cc087a1SEmmanuel Vadot
35*8cc087a1SEmmanuel Vadot  gpio-controller: true
36*8cc087a1SEmmanuel Vadot
37*8cc087a1SEmmanuel Vadot  '#gpio-cells':
38*8cc087a1SEmmanuel Vadot    description: Specifying the pin number and flags, as defined in
39*8cc087a1SEmmanuel Vadot      include/dt-bindings/gpio/gpio.h
40*8cc087a1SEmmanuel Vadot    const: 2
41*8cc087a1SEmmanuel Vadot
42*8cc087a1SEmmanuel Vadot  gpio-ranges:
43*8cc087a1SEmmanuel Vadot    maxItems: 1
44*8cc087a1SEmmanuel Vadot
45*8cc087a1SEmmanuel Vadot  wakeup-parent:
46*8cc087a1SEmmanuel Vadot    maxItems: 1
47*8cc087a1SEmmanuel Vadot
48*8cc087a1SEmmanuel Vadot#PIN CONFIGURATION NODES
49*8cc087a1SEmmanuel VadotpatternProperties:
50*8cc087a1SEmmanuel Vadot  '-state$':
51*8cc087a1SEmmanuel Vadot    oneOf:
52*8cc087a1SEmmanuel Vadot      - $ref: "#/$defs/qcom-qcm2290-tlmm-state"
53*8cc087a1SEmmanuel Vadot      - patternProperties:
54*8cc087a1SEmmanuel Vadot          ".*":
55*8cc087a1SEmmanuel Vadot            $ref: "#/$defs/qcom-qcm2290-tlmm-state"
56*8cc087a1SEmmanuel Vadot
57*8cc087a1SEmmanuel Vadot'$defs':
58*8cc087a1SEmmanuel Vadot  qcom-qcm2290-tlmm-state:
59*8cc087a1SEmmanuel Vadot    type: object
60*8cc087a1SEmmanuel Vadot    description:
61*8cc087a1SEmmanuel Vadot      Pinctrl node's client devices use subnodes for desired pin configuration.
62*8cc087a1SEmmanuel Vadot      Client device subnodes use below standard properties.
63*8cc087a1SEmmanuel Vadot    $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"
64*8cc087a1SEmmanuel Vadot
65*8cc087a1SEmmanuel Vadot    properties:
66*8cc087a1SEmmanuel Vadot      pins:
67*8cc087a1SEmmanuel Vadot        description:
68*8cc087a1SEmmanuel Vadot          List of gpio pins affected by the properties specified in this
69*8cc087a1SEmmanuel Vadot          subnode.
70*8cc087a1SEmmanuel Vadot        items:
71*8cc087a1SEmmanuel Vadot          oneOf:
72*8cc087a1SEmmanuel Vadot            - pattern: "^gpio([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-6])$"
73*8cc087a1SEmmanuel Vadot            - enum: [ sdc1_rclk, sdc1_clk, sdc1_cmd, sdc1_data,
74*8cc087a1SEmmanuel Vadot                      sdc2_clk, sdc2_cmd, sdc2_data ]
75*8cc087a1SEmmanuel Vadot        minItems: 1
76*8cc087a1SEmmanuel Vadot        maxItems: 36
77*8cc087a1SEmmanuel Vadot
78*8cc087a1SEmmanuel Vadot      function:
79*8cc087a1SEmmanuel Vadot        description:
80*8cc087a1SEmmanuel Vadot          Specify the alternative function to be configured for the specified
81*8cc087a1SEmmanuel Vadot          pins.
82*8cc087a1SEmmanuel Vadot
83*8cc087a1SEmmanuel Vadot        enum: [ adsp_ext, agera_pll, atest, cam_mclk, cci_async, cci_i2c,
84*8cc087a1SEmmanuel Vadot                cci_timer0, cci_timer1, cci_timer2, cci_timer3, char_exec,
85*8cc087a1SEmmanuel Vadot                cri_trng, cri_trng0, cri_trng1, dac_calib, dbg_out, ddr_bist,
86*8cc087a1SEmmanuel Vadot                ddr_pxi0, ddr_pxi1, ddr_pxi2, ddr_pxi3, gcc_gp1, gcc_gp2,
87*8cc087a1SEmmanuel Vadot                gcc_gp3, gpio, gp_pdm0, gp_pdm1, gp_pdm2, gsm0_tx, gsm1_tx,
88*8cc087a1SEmmanuel Vadot                jitter_bist, mdp_vsync, mdp_vsync_out_0, mdp_vsync_out_1,
89*8cc087a1SEmmanuel Vadot                mpm_pwr, mss_lte, m_voc, nav_gpio, pa_indicator, pbs0, pbs1,
90*8cc087a1SEmmanuel Vadot                pbs2, pbs3, pbs4, pbs5, pbs6, pbs7, pbs8, pbs9, pbs10, pbs11,
91*8cc087a1SEmmanuel Vadot                pbs12, pbs13, pbs14, pbs15, pbs_out, phase_flag, pll_bist,
92*8cc087a1SEmmanuel Vadot                pll_bypassnl, pll_reset, prng_rosc, pwm_0, pwm_1, pwm_2, pwm_3,
93*8cc087a1SEmmanuel Vadot                pwm_4, pwm_5, pwm_6, pwm_7, pwm_8, pwm_9, qdss_cti, qdss_gpio,
94*8cc087a1SEmmanuel Vadot                qup0, qup1, qup2, qup3, qup4, qup5, sdc1_tb, sdc2_tb, sd_write,
95*8cc087a1SEmmanuel Vadot                ssbi_wtr1, tgu_ch0, tgu_ch1, tgu_ch2, tgu_ch3, tsense_pwm,
96*8cc087a1SEmmanuel Vadot                uim1_clk, uim1_data, uim1_present, uim1_reset, uim2_clk,
97*8cc087a1SEmmanuel Vadot                uim2_data, uim2_present, uim2_reset, usb_phy, vfr_1,
98*8cc087a1SEmmanuel Vadot                vsense_trigger, wlan1_adc0, wlan1_adc1 ]
99*8cc087a1SEmmanuel Vadot
100*8cc087a1SEmmanuel Vadot      drive-strength:
101*8cc087a1SEmmanuel Vadot        enum: [2, 4, 6, 8, 10, 12, 14, 16]
102*8cc087a1SEmmanuel Vadot        default: 2
103*8cc087a1SEmmanuel Vadot        description:
104*8cc087a1SEmmanuel Vadot          Selects the drive strength for the specified pins, in mA.
105*8cc087a1SEmmanuel Vadot
106*8cc087a1SEmmanuel Vadot      bias-pull-down: true
107*8cc087a1SEmmanuel Vadot
108*8cc087a1SEmmanuel Vadot      bias-pull-up: true
109*8cc087a1SEmmanuel Vadot
110*8cc087a1SEmmanuel Vadot      bias-disable: true
111*8cc087a1SEmmanuel Vadot
112*8cc087a1SEmmanuel Vadot      output-high: true
113*8cc087a1SEmmanuel Vadot
114*8cc087a1SEmmanuel Vadot      output-low: true
115*8cc087a1SEmmanuel Vadot
116*8cc087a1SEmmanuel Vadot    required:
117*8cc087a1SEmmanuel Vadot      - pins
118*8cc087a1SEmmanuel Vadot
119*8cc087a1SEmmanuel Vadot    additionalProperties: false
120*8cc087a1SEmmanuel Vadot
121*8cc087a1SEmmanuel Vadotrequired:
122*8cc087a1SEmmanuel Vadot  - compatible
123*8cc087a1SEmmanuel Vadot  - reg
124*8cc087a1SEmmanuel Vadot  - interrupts
125*8cc087a1SEmmanuel Vadot  - interrupt-controller
126*8cc087a1SEmmanuel Vadot  - '#interrupt-cells'
127*8cc087a1SEmmanuel Vadot  - gpio-controller
128*8cc087a1SEmmanuel Vadot  - '#gpio-cells'
129*8cc087a1SEmmanuel Vadot  - gpio-ranges
130*8cc087a1SEmmanuel Vadot
131*8cc087a1SEmmanuel VadotadditionalProperties: false
132*8cc087a1SEmmanuel Vadot
133*8cc087a1SEmmanuel Vadotexamples:
134*8cc087a1SEmmanuel Vadot  - |
135*8cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
136*8cc087a1SEmmanuel Vadot    tlmm: pinctrl@500000 {
137*8cc087a1SEmmanuel Vadot        compatible = "qcom,qcm2290-tlmm";
138*8cc087a1SEmmanuel Vadot        reg = <0x500000 0x300000>;
139*8cc087a1SEmmanuel Vadot        interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
140*8cc087a1SEmmanuel Vadot        gpio-controller;
141*8cc087a1SEmmanuel Vadot        #gpio-cells = <2>;
142*8cc087a1SEmmanuel Vadot        interrupt-controller;
143*8cc087a1SEmmanuel Vadot        #interrupt-cells = <2>;
144*8cc087a1SEmmanuel Vadot        gpio-ranges = <&tlmm 0 0 127>;
145*8cc087a1SEmmanuel Vadot
146*8cc087a1SEmmanuel Vadot        sdc2_on_state: sdc2-on-state {
147*8cc087a1SEmmanuel Vadot            clk {
148*8cc087a1SEmmanuel Vadot                pins = "sdc2_clk";
149*8cc087a1SEmmanuel Vadot                bias-disable;
150*8cc087a1SEmmanuel Vadot                drive-strength = <16>;
151*8cc087a1SEmmanuel Vadot            };
152*8cc087a1SEmmanuel Vadot
153*8cc087a1SEmmanuel Vadot            cmd {
154*8cc087a1SEmmanuel Vadot                pins = "sdc2_cmd";
155*8cc087a1SEmmanuel Vadot                bias-pull-up;
156*8cc087a1SEmmanuel Vadot                drive-strength = <10>;
157*8cc087a1SEmmanuel Vadot            };
158*8cc087a1SEmmanuel Vadot
159*8cc087a1SEmmanuel Vadot            data {
160*8cc087a1SEmmanuel Vadot                pins = "sdc2_data";
161*8cc087a1SEmmanuel Vadot                bias-pull-up;
162*8cc087a1SEmmanuel Vadot                drive-strength = <10>;
163*8cc087a1SEmmanuel Vadot            };
164*8cc087a1SEmmanuel Vadot        };
165*8cc087a1SEmmanuel Vadot    };
166