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 functions, pull
15 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 binding is used,
34 the amount of cells must be specified as 2. See the below mentioned gpio
35 binding representation for description of particular cells.
41 GPIO valid number range.
43 interrupt-controller: true
48 Specifies the summary IRQ.
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
127 $ref: /schemas/pinctrl/pincfg-node.yaml
132 Integer array, represents gpio pin number and mux setting.
133 Supported pin number and mux varies for different SoCs, and are
134 defined as macros in dt-bindings/pinctrl/<soc>-pinfunc.h directly.
150 input-schmitt-enable: true
152 input-schmitt-disable: true
155 enum: [2, 4, 8, 12, 16]
160 mediatek,pull-up-adv:
162 Pull up settings for 2 pull resistors, R0 and R1. User can
163 configure those special pins. Valid arguments are described as
165 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
166 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
167 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
168 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.
169 $ref: /schemas/types.yaml#/definitions/uint32
172 mediatek,pull-down-adv:
174 Pull down settings for 2 pull resistors, R0 and R1. User can
175 configure those special pins. Valid arguments are described as
177 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled.
178 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled.
179 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled.
180 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled.
181 $ref: /schemas/types.yaml#/definitions/uint32
187 additionalProperties: false
189 additionalProperties: false
193 #include <dt-bindings/interrupt-controller/irq.h>
194 #include <dt-bindings/interrupt-controller/arm-gic.h>
195 #include <dt-bindings/pinctrl/mt6779-pinfunc.h>
198 #address-cells = <2>;
201 pio: pinctrl@10005000 {
202 compatible = "mediatek,mt6779-pinctrl";
203 reg = <0 0x10005000 0 0x1000>,
204 <0 0x11c20000 0 0x1000>,
205 <0 0x11d10000 0 0x1000>,
206 <0 0x11e20000 0 0x1000>,
207 <0 0x11e70000 0 0x1000>,
208 <0 0x11ea0000 0 0x1000>,
209 <0 0x11f20000 0 0x1000>,
210 <0 0x11f30000 0 0x1000>,
211 <0 0x1000b000 0 0x1000>;
212 reg-names = "gpio", "iocfg_rm",
213 "iocfg_br", "iocfg_lm",
214 "iocfg_lb", "iocfg_rt",
215 "iocfg_lt", "iocfg_tl",
219 gpio-ranges = <&pio 0 0 210>;
220 interrupt-controller;
221 #interrupt-cells = <2>;
222 interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>;
224 mmc0_pins_default: mmc0-0 {
226 pinmux = <PINMUX_GPIO168__FUNC_MSDC0_DAT0>,
227 <PINMUX_GPIO172__FUNC_MSDC0_DAT1>,
228 <PINMUX_GPIO169__FUNC_MSDC0_DAT2>,
229 <PINMUX_GPIO177__FUNC_MSDC0_DAT3>,
230 <PINMUX_GPIO170__FUNC_MSDC0_DAT4>,
231 <PINMUX_GPIO173__FUNC_MSDC0_DAT5>,
232 <PINMUX_GPIO171__FUNC_MSDC0_DAT6>,
233 <PINMUX_GPIO174__FUNC_MSDC0_DAT7>,
234 <PINMUX_GPIO167__FUNC_MSDC0_CMD>;
236 mediatek,pull-up-adv = <1>;
239 pinmux = <PINMUX_GPIO176__FUNC_MSDC0_CLK>;
240 mediatek,pull-down-adv = <2>;
243 pinmux = <PINMUX_GPIO178__FUNC_MSDC0_RSTB>;
244 mediatek,pull-up-adv = <0>;
250 pinctrl-0 = <&mmc0_pins_default>;
251 pinctrl-names = "default";