1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/pinctrl/mediatek,mt8188-pinctrl.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: MediaTek MT8188 Pin Controller
10 - Hui Liu <hui.liu@mediatek.com>
13 The MediaTek's MT8188 Pin controller is used to control SoC pins.
17 const: mediatek,mt8188-pinctrl
23 Number of cells in GPIO specifier, should be two. The first cell is the
24 pin number, the second cell is used to specify optional parameters which
25 are defined in <dt-bindings/gpio/gpio.h>.
35 - description: gpio registers base address
36 - description: rm group io configuration registers base address
37 - description: lt group io configuration registers base address
38 - description: lm group io configuration registers base address
39 - description: rt group io configuration registers base address
40 - description: eint registers base address
51 interrupt-controller: true
57 description: The interrupt outputs to sysirq.
60 mediatek,rsel-resistance-in-si-unit:
63 We provide two methods to select the resistance for I2C when pull up or
64 pull down. The first is by RSEL definition value, another one is by
65 resistance value(ohm). This flag is used to identify if the method is
66 resistance(si unit) value.
68 # PIN CONFIGURATION NODES
72 additionalProperties: false
77 $ref: /schemas/pinctrl/pincfg-node.yaml
78 additionalProperties: false
80 A pinctrl node should contain at least one subnode representing the
81 pinctrl groups available on the machine. Each subnode will list the
82 pins it needs, and how they should be configured, with regard to muxer
83 configuration, pullups, drive strength, input enable/disable and input
89 Integer array, represents gpio pin number and mux setting.
90 Supported pin number and mux varies for different SoCs, and are
91 defined as macros in dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h
92 directly, for this SoC.
95 enum: [2, 4, 6, 8, 10, 12, 14, 16]
97 drive-strength-microamp:
98 enum: [125, 250, 500, 1000]
103 - enum: [100, 101, 102, 103]
104 description: mt8188 pull down PUPD/R0/R1 type define value.
105 - enum: [200, 201, 202, 203, 204, 205, 206, 207]
106 description: mt8188 pull down RSEL type define value.
107 - enum: [75000, 5000]
108 description: mt8188 pull down RSEL type si unit value(ohm).
110 For pull down type is normal, it doesn't need add RSEL & R1R0
111 define and resistance value.
112 For pull down type is PUPD/R0/R1 type, it can add R1R0 define to
113 set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
114 "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" &
115 "MTK_PUPD_SET_R1R0_11" define in mt8188.
116 For pull down type is RSEL, it can add RSEL define & resistance
117 value(ohm) to set different resistance by identifying property
118 "mediatek,rsel-resistance-in-si-unit". It can support
119 "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001" &
120 "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" &
121 "MTK_PULL_SET_RSEL_100" & "MTK_PULL_SET_RSEL_101" &
122 "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111" define in
123 mt8188. It can also support resistance value(ohm) "75000" & "5000"
129 - enum: [100, 101, 102, 103]
130 description: mt8188 pull up PUPD/R0/R1 type define value.
131 - enum: [200, 201, 202, 203, 204, 205, 206, 207]
132 description: mt8188 pull up RSEL type define value.
133 - enum: [1000, 1500, 2000, 3000, 4000, 5000, 10000, 75000]
134 description: mt8188 pull up RSEL type si unit value(ohm).
136 For pull up type is normal, it don't need add RSEL & R1R0 define
137 and resistance value.
138 For pull up type is PUPD/R0/R1 type, it can add R1R0 define to set
139 different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
140 "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" &
141 "MTK_PUPD_SET_R1R0_11" define in mt8188.
142 For pull up type is RSEL, it can add RSEL define & resistance
143 value(ohm) to set different resistance by identifying property
144 "mediatek,rsel-resistance-in-si-unit". It can support
145 "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001" &
146 "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" &
147 "MTK_PULL_SET_RSEL_100" & "MTK_PULL_SET_RSEL_101" &
148 "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111" define in
149 mt8188. It can also support resistance value(ohm) "1000" & "1500"
150 & "2000" & "3000" & "4000" & "5000" & "10000" & "75000" in mt8188.
162 input-schmitt-enable: true
164 input-schmitt-disable: true
173 - interrupt-controller
179 additionalProperties: false
183 #include <dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h>
184 #include <dt-bindings/interrupt-controller/arm-gic.h>
186 pio: pinctrl@10005000 {
187 compatible = "mediatek,mt8188-pinctrl";
188 reg = <0x10005000 0x1000>,
194 reg-names = "iocfg0", "iocfg_rm",
195 "iocfg_lt", "iocfg_lm", "iocfg_rt",
199 gpio-ranges = <&pio 0 0 176>;
200 interrupt-controller;
201 interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH 0>;
202 #interrupt-cells = <2>;
206 pinmux = <PINMUX_GPIO0__FUNC_B_GPIO0>;
213 pinmux = <PINMUX_GPIO75__FUNC_O_SPIM1_CSB>,
214 <PINMUX_GPIO76__FUNC_O_SPIM1_CLK>,
215 <PINMUX_GPIO77__FUNC_B0_SPIM1_MOSI>;
216 drive-strength = <6>;
219 pinmux = <PINMUX_GPIO78__FUNC_B0_SPIM1_MISO>;
220 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
226 pinmux = <PINMUX_GPIO55__FUNC_B1_SCL0>,
227 <PINMUX_GPIO56__FUNC_B1_SDA0>;
229 drive-strength-microamp = <1000>;