1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/pinctrl/pinctrl-mt8186.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Mediatek MT8186 Pin Controller
10 - Sean Wang <sean.wang@mediatek.com>
13 The Mediatek's Pin controller is used to control SoC pins.
17 const: mediatek,mt8186-pinctrl
23 Number of cells in GPIO specifier. Since the generic GPIO binding is used,
24 the amount of cells must be specified as 2. See the below
25 mentioned gpio binding representation for description of particular cells.
33 Physical address base for gpio base registers. There are 8 different GPIO
34 physical address base in mt8186.
39 Gpio base register names.
50 interrupt-controller: true
56 description: The interrupt outputs to sysirq
59 mediatek,rsel-resistance-in-si-unit:
62 Identifying i2c pins pull up/down type which is RSEL. It can support
63 RSEL define or si unit value(ohm) to set different resistance.
65 # PIN CONFIGURATION NODES
69 additionalProperties: false
73 additionalProperties: false
75 A pinctrl node should contain at least one subnodes representing the
76 pinctrl groups available on the machine. Each subnode will list the
77 pins it needs, and how they should be configured, with regard to muxer
78 configuration, pullups, drive strength, input enable/disable and
80 An example of using macro:
82 /* GPIO0 set as multifunction GPIO0 */
85 pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
88 /* GPIO128 set as multifunction SDA0 */
91 pinmux = <PINMUX_GPIO128__FUNC_SDA0>;
95 $ref: "pinmux-node.yaml"
100 Integer array, represents gpio pin number and mux setting.
101 Supported pin number and mux varies for different SoCs, and are
102 defined as macros in dt-bindings/pinctrl/<soc>-pinfunc.h
106 enum: [2, 4, 6, 8, 10, 12, 14, 16]
108 mediatek,drive-strength-adv:
110 Describe the specific driving setup property.
111 For I2C pins, the existing generic driving setup can only support
112 2/4/6/8/10/12/14/16mA driving. But in specific driving setup, they
113 can support 0.125/0.25/0.5/1mA adjustment. If we enable specific
114 driving setup, the existing generic setup will be disabled.
115 The specific driving setup is controlled by E1E0EN.
116 When E1=0/E0=0, the strength is 0.125mA.
117 When E1=0/E0=1, the strength is 0.25mA.
118 When E1=1/E0=0, the strength is 0.5mA.
119 When E1=1/E0=1, the strength is 1mA.
120 EN is used to enable or disable the specific driving setup.
121 Valid arguments are described as below:
122 0: (E1, E0, EN) = (0, 0, 0)
123 1: (E1, E0, EN) = (0, 0, 1)
124 2: (E1, E0, EN) = (0, 1, 0)
125 3: (E1, E0, EN) = (0, 1, 1)
126 4: (E1, E0, EN) = (1, 0, 0)
127 5: (E1, E0, EN) = (1, 0, 1)
128 6: (E1, E0, EN) = (1, 1, 0)
129 7: (E1, E0, EN) = (1, 1, 1)
130 So the valid arguments are from 0 to 7.
131 $ref: /schemas/types.yaml#/definitions/uint32
132 enum: [0, 1, 2, 3, 4, 5, 6, 7]
137 - enum: [100, 101, 102, 103]
138 description: mt8186 pull down PUPD/R0/R1 type define value.
139 - enum: [200, 201, 202, 203]
140 description: mt8186 pull down RSEL type define value.
141 - enum: [75000, 5000]
142 description: mt8186 pull down RSEL type si unit value(ohm).
144 For pull down type is normal, it don't need add RSEL & R1R0 define
145 and resistance value.
146 For pull down type is PUPD/R0/R1 type, it can add R1R0 define to
147 set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
148 "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" &
149 "MTK_PUPD_SET_R1R0_11" define in mt8186.
150 For pull down type is RSEL, it can add RSEL define & resistance
151 value(ohm) to set different resistance by identifying property
152 "mediatek,rsel-resistance-in-si-unit".
153 It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001"
154 & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011"
155 define in mt8186. It can also support resistance value(ohm)
156 "75000" & "5000" in mt8186.
157 An example of using RSEL define:
161 pinmux = <PINMUX_GPIO128__FUNC_SDA0>;
162 bias-pull-down = <MTK_PULL_SET_RSEL_001>;
166 An example of using si unit resistance value(ohm):
168 mediatek,rsel-resistance-in-si-unit;
173 pinmux = <PINMUX_GPIO128__FUNC_SDA0>;
174 bias-pull-down = <75000>;
182 - enum: [100, 101, 102, 103]
183 description: mt8186 pull up PUPD/R0/R1 type define value.
184 - enum: [200, 201, 202, 203]
185 description: mt8186 pull up RSEL type define value.
186 - enum: [1000, 5000, 10000, 75000]
187 description: mt8186 pull up RSEL type si unit value(ohm).
189 For pull up type is normal, it don't need add RSEL & R1R0 define
190 and resistance value.
191 For pull up type is PUPD/R0/R1 type, it can add R1R0 define to
192 set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
193 "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" &
194 "MTK_PUPD_SET_R1R0_11" define in mt8186.
195 For pull up type is RSEL, it can add RSEL define & resistance
196 value(ohm) to set different resistance by identifying property
197 "mediatek,rsel-resistance-in-si-unit".
198 It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001"
199 & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011"
200 define in mt8186. It can also support resistance value(ohm)
201 "1000" & "5000" & "10000" & "75000" in mt8186.
202 An example of using si unit resistance value(ohm):
204 mediatek,rsel-resistance-in-si-unit;
209 pinmux = <PINMUX_GPIO128__FUNC_SDA0>;
210 bias-pull-up = <1000>;
225 input-schmitt-enable: true
227 input-schmitt-disable: true
236 - interrupt-controller
242 additionalProperties: false
246 #include <dt-bindings/pinctrl/mt8186-pinfunc.h>
247 #include <dt-bindings/interrupt-controller/arm-gic.h>
249 pio: pinctrl@10005000 {
250 compatible = "mediatek,mt8186-pinctrl";
251 reg = <0x10005000 0x1000>,
259 reg-names = "iocfg0", "iocfg_bm", "iocfg_bl",
260 "iocfg_br", "iocfg_lm", "iocfg_rb",
264 gpio-ranges = <&pio 0 0 185>;
265 interrupt-controller;
266 interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH 0>;
267 #interrupt-cells = <2>;
271 pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
278 pinmux = <PINMUX_GPIO0__FUNC_SPI0_CLK_B>,
279 <PINMUX_GPIO1__FUNC_SPI0_CSB_B>,
280 <PINMUX_GPIO2__FUNC_SPI0_MO_B>;
284 pinmux = <PINMUX_GPIO3__FUNC_SPI0_MI_B>;
291 pinmux = <PINMUX_GPIO127__FUNC_SCL0>,
292 <PINMUX_GPIO128__FUNC_SDA0>;
293 bias-pull-up = <MTK_PULL_SET_RSEL_001>;
294 mediatek,drive-strength-adv = <7>;