1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/pinctrl/mediatek,mt8186-pinctrl.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 MT8186 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 mentioned gpio
25 binding representation for description of particular cells.
35 Physical address base for GPIO base registers. There are 8 different GPIO
36 physical address base in mt8186.
41 GPIO base register names.
52 interrupt-controller: true
58 description: The interrupt outputs to sysirq
61 mediatek,rsel-resistance-in-si-unit:
64 Identifying i2c pins pull up/down type which is RSEL. It can support RSEL
65 define or si unit value(ohm) to set different resistance.
67 # PIN CONFIGURATION NODES
71 additionalProperties: false
75 additionalProperties: false
77 A pinctrl node should contain at least one subnodes representing the
78 pinctrl groups available on the machine. Each subnode will list the
79 pins it needs, and how they should be configured, with regard to muxer
80 configuration, pullups, drive strength, input enable/disable and input
82 An example of using macro:
84 /* GPIO0 set as multifunction GPIO0 */
87 pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
90 /* GPIO128 set as multifunction SDA0 */
93 pinmux = <PINMUX_GPIO128__FUNC_SDA0>;
97 $ref: pinmux-node.yaml
102 Integer array, represents gpio pin number and mux setting.
103 Supported pin number and mux varies for different SoCs, and are
104 defined as macros in dt-bindings/pinctrl/<soc>-pinfunc.h directly.
107 enum: [2, 4, 6, 8, 10, 12, 14, 16]
109 drive-strength-microamp:
110 enum: [125, 250, 500, 1000]
115 - enum: [100, 101, 102, 103]
116 description: mt8186 pull down PUPD/R0/R1 type define value.
117 - enum: [200, 201, 202, 203]
118 description: mt8186 pull down RSEL type define value.
119 - enum: [75000, 5000]
120 description: mt8186 pull down RSEL type si unit value(ohm).
122 For pull down type is normal, it don't need add RSEL & R1R0 define
123 and resistance value.
124 For pull down type is PUPD/R0/R1 type, it can add R1R0 define to
125 set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
126 "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" &
127 "MTK_PUPD_SET_R1R0_11" define in mt8186.
128 For pull down type is RSEL, it can add RSEL define & resistance
129 value(ohm) to set different resistance by identifying property
130 "mediatek,rsel-resistance-in-si-unit".
131 It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001" &
132 "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" define in
133 mt8186. It can also support resistance value(ohm) "75000" & "5000"
135 An example of using RSEL define:
139 pinmux = <PINMUX_GPIO128__FUNC_SDA0>;
140 bias-pull-down = <MTK_PULL_SET_RSEL_001>;
144 An example of using si unit resistance value(ohm):
146 mediatek,rsel-resistance-in-si-unit;
151 pinmux = <PINMUX_GPIO128__FUNC_SDA0>;
152 bias-pull-down = <75000>;
160 - enum: [100, 101, 102, 103]
161 description: mt8186 pull up PUPD/R0/R1 type define value.
162 - enum: [200, 201, 202, 203]
163 description: mt8186 pull up RSEL type define value.
164 - enum: [1000, 5000, 10000, 75000]
165 description: mt8186 pull up RSEL type si unit value(ohm).
167 For pull up type is normal, it don't need add RSEL & R1R0 define
168 and resistance value.
169 For pull up type is PUPD/R0/R1 type, it can add R1R0 define to
170 set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
171 "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" &
172 "MTK_PUPD_SET_R1R0_11" define in mt8186.
173 For pull up type is RSEL, it can add RSEL define & resistance
174 value(ohm) to set different resistance by identifying property
175 "mediatek,rsel-resistance-in-si-unit".
176 It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001" &
177 "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" define in
178 mt8186. It can also support resistance value(ohm) "1000" & "5000"
179 & "10000" & "75000" in mt8186.
180 An example of using si unit resistance value(ohm):
182 mediatek,rsel-resistance-in-si-unit;
187 pinmux = <PINMUX_GPIO128__FUNC_SDA0>;
188 bias-pull-up = <1000>;
203 input-schmitt-enable: true
205 input-schmitt-disable: true
214 - interrupt-controller
220 additionalProperties: false
224 #include <dt-bindings/pinctrl/mt8186-pinfunc.h>
225 #include <dt-bindings/interrupt-controller/arm-gic.h>
227 pio: pinctrl@10005000 {
228 compatible = "mediatek,mt8186-pinctrl";
229 reg = <0x10005000 0x1000>,
237 reg-names = "iocfg0", "iocfg_lt", "iocfg_lm",
238 "iocfg_lb", "iocfg_bl", "iocfg_rb",
242 gpio-ranges = <&pio 0 0 185>;
243 interrupt-controller;
244 interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH 0>;
245 #interrupt-cells = <2>;
249 pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
256 pinmux = <PINMUX_GPIO0__FUNC_SPI0_CLK_B>,
257 <PINMUX_GPIO1__FUNC_SPI0_CSB_B>,
258 <PINMUX_GPIO2__FUNC_SPI0_MO_B>;
262 pinmux = <PINMUX_GPIO3__FUNC_SPI0_MI_B>;
269 pinmux = <PINMUX_GPIO127__FUNC_SCL0>,
270 <PINMUX_GPIO128__FUNC_SDA0>;
271 bias-pull-up = <MTK_PULL_SET_RSEL_001>;
272 drive-strength-microamp = <1000>;