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
24 is the pin number, the second cell is used to specify optional
25 parameters which 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 pull down.
64 The first is by RSEL definition value, another one is by resistance value(ohm).
65 This flag is used to identify if the method is resistance(si unit) value.
67 # PIN CONFIGURATION NODES
71 additionalProperties: false
76 $ref: "/schemas/pinctrl/pincfg-node.yaml"
77 additionalProperties: false
79 A pinctrl node should contain at least one subnode representing the
80 pinctrl groups available on the machine. Each subnode will list the
81 pins it needs, and how they should be configured, with regard to muxer
82 configuration, pullups, drive strength, input enable/disable and
88 Integer array, represents gpio pin number and mux setting.
89 Supported pin number and mux varies for different SoCs, and are
90 defined as macros in dt-bindings/pinctrl/mediatek,<soc>-pinfunc.h
94 enum: [2, 4, 6, 8, 10, 12, 14, 16]
96 drive-strength-microamp:
97 enum: [125, 250, 500, 1000]
102 - enum: [100, 101, 102, 103]
103 description: mt8188 pull down PUPD/R0/R1 type define value.
104 - enum: [200, 201, 202, 203, 204, 205, 206, 207]
105 description: mt8188 pull down RSEL type define value.
106 - enum: [75000, 5000]
107 description: mt8188 pull down RSEL type si unit value(ohm).
109 For pull down type is normal, it doesn't need add RSEL & R1R0 define
110 and resistance value.
111 For pull down type is PUPD/R0/R1 type, it can add R1R0 define to
112 set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
113 "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & "MTK_PUPD_SET_R1R0_11"
115 For pull down type is RSEL, it can add RSEL define & resistance value(ohm)
116 to set different resistance by identifying property "mediatek,rsel-resistance-in-si-unit".
117 It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001"
118 & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" & "MTK_PULL_SET_RSEL_100"
119 & "MTK_PULL_SET_RSEL_101" & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111"
120 define in mt8188. It can also support resistance value(ohm) "75000" & "5000" in mt8188.
125 - enum: [100, 101, 102, 103]
126 description: mt8188 pull up PUPD/R0/R1 type define value.
127 - enum: [200, 201, 202, 203, 204, 205, 206, 207]
128 description: mt8188 pull up RSEL type define value.
129 - enum: [1000, 1500, 2000, 3000, 4000, 5000, 10000, 75000]
130 description: mt8188 pull up RSEL type si unit value(ohm).
132 For pull up type is normal, it don't need add RSEL & R1R0 define
133 and resistance value.
134 For pull up type is PUPD/R0/R1 type, it can add R1R0 define to
135 set different resistance. It can support "MTK_PUPD_SET_R1R0_00" &
136 "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & "MTK_PUPD_SET_R1R0_11"
138 For pull up type is RSEL, it can add RSEL define & resistance value(ohm)
139 to set different resistance by identifying property "mediatek,rsel-resistance-in-si-unit".
140 It can support "MTK_PULL_SET_RSEL_000" & "MTK_PULL_SET_RSEL_001"
141 & "MTK_PULL_SET_RSEL_010" & "MTK_PULL_SET_RSEL_011" & "MTK_PULL_SET_RSEL_100"
142 & "MTK_PULL_SET_RSEL_101" & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111"
143 define in mt8188. It can also support resistance value(ohm)
144 "1000" & "1500" & "2000" & "3000" & "4000" & "5000" & "10000" & "75000" in mt8188.
156 input-schmitt-enable: true
158 input-schmitt-disable: true
167 - interrupt-controller
173 additionalProperties: false
177 #include <dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h>
178 #include <dt-bindings/interrupt-controller/arm-gic.h>
180 pio: pinctrl@10005000 {
181 compatible = "mediatek,mt8188-pinctrl";
182 reg = <0x10005000 0x1000>,
188 reg-names = "iocfg0", "iocfg_rm",
189 "iocfg_lt", "iocfg_lm", "iocfg_rt",
193 gpio-ranges = <&pio 0 0 176>;
194 interrupt-controller;
195 interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH 0>;
196 #interrupt-cells = <2>;
200 pinmux = <PINMUX_GPIO0__FUNC_B_GPIO0>;
207 pinmux = <PINMUX_GPIO75__FUNC_O_SPIM1_CSB>,
208 <PINMUX_GPIO76__FUNC_O_SPIM1_CLK>,
209 <PINMUX_GPIO77__FUNC_B0_SPIM1_MOSI>;
210 drive-strength = <6>;
213 pinmux = <PINMUX_GPIO78__FUNC_B0_SPIM1_MISO>;
214 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
220 pinmux = <PINMUX_GPIO55__FUNC_B1_SCL0>,
221 <PINMUX_GPIO56__FUNC_B1_SDA0>;
223 drive-strength-microamp = <1000>;