1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/pinctrl/mediatek,mt6779-pinctrl.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: MediaTek MT6779 Pin Controller
10 - Andy Teng <andy.teng@mediatek.com>
11 - Sean Wang <sean.wang@kernel.org>
14 The MediaTek pin controller on MT6779 is used to control pin
15 functions, pull up/down resistance and drive strength options.
20 - mediatek,mt6779-pinctrl
21 - mediatek,mt6797-pinctrl
24 description: Physical addresses for GPIO base(s) and EINT registers.
33 Number of cells in GPIO specifier. Since the generic GPIO
34 binding is used, the amount of cells must be specified as 2. See the below
35 mentioned gpio binding representation for description of particular cells.
41 GPIO valid number range.
43 interrupt-controller: true
48 Specifies the summary IRQ.
61 - $ref: "pinctrl.yaml#"
66 const: mediatek,mt6779-pinctrl
88 const: mediatek,mt6797-pinctrl
110 - interrupt-controller
116 additionalProperties: false
122 A pinctrl node should contain at least one subnodes representing the
123 pinctrl groups available on the machine. Each subnode will list the
124 pins it needs, and how they should be configured, with regard to muxer
125 configuration, pullups, drive strength, input enable/disable and input schmitt.
126 $ref: "/schemas/pinctrl/pincfg-node.yaml"
131 integer array, represents gpio pin number and mux setting.
132 Supported pin number and mux varies for different SoCs, and are defined
133 as macros in boot/dts/<soc>-pinfunc.h directly.
149 input-schmitt-enable: true
151 input-schmitt-disable: true
154 enum: [2, 4, 8, 12, 16]
159 mediatek,pull-up-adv:
161 Pull up setings for 2 pull resistors, R0 and R1. User can
162 configure those special pins. Valid arguments are described as below:
163 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
164 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
165 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
166 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.
167 $ref: /schemas/types.yaml#/definitions/uint32
170 mediatek,pull-down-adv:
172 Pull down settings for 2 pull resistors, R0 and R1. User can
173 configure those special pins. Valid arguments are described as below:
174 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
175 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
176 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
177 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.
178 $ref: /schemas/types.yaml#/definitions/uint32
184 additionalProperties: false
186 additionalProperties: false
190 #include <dt-bindings/interrupt-controller/irq.h>
191 #include <dt-bindings/interrupt-controller/arm-gic.h>
192 #include <dt-bindings/pinctrl/mt6779-pinfunc.h>
195 #address-cells = <2>;
198 pio: pinctrl@10005000 {
199 compatible = "mediatek,mt6779-pinctrl";
200 reg = <0 0x10005000 0 0x1000>,
201 <0 0x11c20000 0 0x1000>,
202 <0 0x11d10000 0 0x1000>,
203 <0 0x11e20000 0 0x1000>,
204 <0 0x11e70000 0 0x1000>,
205 <0 0x11ea0000 0 0x1000>,
206 <0 0x11f20000 0 0x1000>,
207 <0 0x11f30000 0 0x1000>,
208 <0 0x1000b000 0 0x1000>;
209 reg-names = "gpio", "iocfg_rm",
210 "iocfg_br", "iocfg_lm",
211 "iocfg_lb", "iocfg_rt",
212 "iocfg_lt", "iocfg_tl",
216 gpio-ranges = <&pio 0 0 210>;
217 interrupt-controller;
218 #interrupt-cells = <2>;
219 interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>;
221 mmc0_pins_default: mmc0-0 {
223 pinmux = <PINMUX_GPIO168__FUNC_MSDC0_DAT0>,
224 <PINMUX_GPIO172__FUNC_MSDC0_DAT1>,
225 <PINMUX_GPIO169__FUNC_MSDC0_DAT2>,
226 <PINMUX_GPIO177__FUNC_MSDC0_DAT3>,
227 <PINMUX_GPIO170__FUNC_MSDC0_DAT4>,
228 <PINMUX_GPIO173__FUNC_MSDC0_DAT5>,
229 <PINMUX_GPIO171__FUNC_MSDC0_DAT6>,
230 <PINMUX_GPIO174__FUNC_MSDC0_DAT7>,
231 <PINMUX_GPIO167__FUNC_MSDC0_CMD>;
233 mediatek,pull-up-adv = <1>;
236 pinmux = <PINMUX_GPIO176__FUNC_MSDC0_CLK>;
237 mediatek,pull-down-adv = <2>;
240 pinmux = <PINMUX_GPIO178__FUNC_MSDC0_RSTB>;
241 mediatek,pull-up-adv = <0>;
247 pinctrl-0 = <&mmc0_pins_default>;
248 pinctrl-names = "default";