1*b2250101SCathy Xu# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*b2250101SCathy Xu%YAML 1.2 3*b2250101SCathy Xu--- 4*b2250101SCathy Xu$id: http://devicetree.org/schemas/pinctrl/mediatek,mt8189-pinctrl.yaml# 5*b2250101SCathy Xu$schema: http://devicetree.org/meta-schemas/core.yaml# 6*b2250101SCathy Xu 7*b2250101SCathy Xutitle: MediaTek MT8189 Pin Controller 8*b2250101SCathy Xu 9*b2250101SCathy Xumaintainers: 10*b2250101SCathy Xu - Lei Xue <lei.xue@mediatek.com> 11*b2250101SCathy Xu - Cathy Xu <ot_cathy.xu@mediatek.com> 12*b2250101SCathy Xu 13*b2250101SCathy Xudescription: 14*b2250101SCathy Xu The MediaTek's MT8189 Pin controller is used to control SoC pins. 15*b2250101SCathy Xu 16*b2250101SCathy Xuproperties: 17*b2250101SCathy Xu compatible: 18*b2250101SCathy Xu const: mediatek,mt8189-pinctrl 19*b2250101SCathy Xu 20*b2250101SCathy Xu reg: 21*b2250101SCathy Xu items: 22*b2250101SCathy Xu - description: gpio base 23*b2250101SCathy Xu - description: lm group IO 24*b2250101SCathy Xu - description: rb0 group IO 25*b2250101SCathy Xu - description: rb1 group IO 26*b2250101SCathy Xu - description: bm0 group IO 27*b2250101SCathy Xu - description: bm1 group IO 28*b2250101SCathy Xu - description: bm2 group IO 29*b2250101SCathy Xu - description: lt0 group IO 30*b2250101SCathy Xu - description: lt1 group IO 31*b2250101SCathy Xu - description: rt group IO 32*b2250101SCathy Xu - description: eint0 group IO 33*b2250101SCathy Xu - description: eint1 group IO 34*b2250101SCathy Xu - description: eint2 group IO 35*b2250101SCathy Xu - description: eint3 group IO 36*b2250101SCathy Xu - description: eint4 group IO 37*b2250101SCathy Xu 38*b2250101SCathy Xu reg-names: 39*b2250101SCathy Xu items: 40*b2250101SCathy Xu - const: base 41*b2250101SCathy Xu - const: lm 42*b2250101SCathy Xu - const: rb0 43*b2250101SCathy Xu - const: rb1 44*b2250101SCathy Xu - const: bm0 45*b2250101SCathy Xu - const: bm1 46*b2250101SCathy Xu - const: bm2 47*b2250101SCathy Xu - const: lt0 48*b2250101SCathy Xu - const: lt1 49*b2250101SCathy Xu - const: rt 50*b2250101SCathy Xu - const: eint0 51*b2250101SCathy Xu - const: eint1 52*b2250101SCathy Xu - const: eint2 53*b2250101SCathy Xu - const: eint3 54*b2250101SCathy Xu - const: eint4 55*b2250101SCathy Xu 56*b2250101SCathy Xu interrupts: 57*b2250101SCathy Xu maxItems: 1 58*b2250101SCathy Xu 59*b2250101SCathy Xu interrupt-controller: true 60*b2250101SCathy Xu 61*b2250101SCathy Xu '#interrupt-cells': 62*b2250101SCathy Xu const: 2 63*b2250101SCathy Xu 64*b2250101SCathy Xu gpio-controller: true 65*b2250101SCathy Xu 66*b2250101SCathy Xu '#gpio-cells': 67*b2250101SCathy Xu const: 2 68*b2250101SCathy Xu 69*b2250101SCathy Xu gpio-ranges: 70*b2250101SCathy Xu maxItems: 1 71*b2250101SCathy Xu 72*b2250101SCathy Xu gpio-line-names: true 73*b2250101SCathy Xu 74*b2250101SCathy Xu# PIN CONFIGURATION NODES 75*b2250101SCathy XupatternProperties: 76*b2250101SCathy Xu '-pins$': 77*b2250101SCathy Xu type: object 78*b2250101SCathy Xu additionalProperties: false 79*b2250101SCathy Xu 80*b2250101SCathy Xu patternProperties: 81*b2250101SCathy Xu '^pins': 82*b2250101SCathy Xu type: object 83*b2250101SCathy Xu $ref: /schemas/pinctrl/pincfg-node.yaml 84*b2250101SCathy Xu additionalProperties: false 85*b2250101SCathy Xu description: 86*b2250101SCathy Xu A pinctrl node should contain at least one subnode representing the 87*b2250101SCathy Xu pinctrl groups available on the machine. Each subnode will list the 88*b2250101SCathy Xu pins it needs, and how they should be configured, with regard to muxer 89*b2250101SCathy Xu configuration, pullups, drive strength, input enable/disable and input 90*b2250101SCathy Xu schmitt. 91*b2250101SCathy Xu 92*b2250101SCathy Xu properties: 93*b2250101SCathy Xu pinmux: 94*b2250101SCathy Xu description: 95*b2250101SCathy Xu Integer array, represents gpio pin number and mux setting. 96*b2250101SCathy Xu Supported pin number and mux varies for different SoCs, and are 97*b2250101SCathy Xu defined as macros in arch/arm64/boot/dts/mediatek/mt8189-pinfunc.h 98*b2250101SCathy Xu directly, for this SoC. 99*b2250101SCathy Xu 100*b2250101SCathy Xu drive-strength: 101*b2250101SCathy Xu enum: [2, 4, 6, 8, 10, 12, 14, 16] 102*b2250101SCathy Xu 103*b2250101SCathy Xu bias-pull-down: 104*b2250101SCathy Xu oneOf: 105*b2250101SCathy Xu - type: boolean 106*b2250101SCathy Xu - enum: [100, 101, 102, 103] 107*b2250101SCathy Xu description: mt8189 pull down PUPD/R0/R1 type define value. 108*b2250101SCathy Xu - enum: [75000, 5000] 109*b2250101SCathy Xu description: mt8189 pull down RSEL type si unit value(ohm). 110*b2250101SCathy Xu description: | 111*b2250101SCathy Xu For pull down type is normal, it doesn't need add R1R0 define 112*b2250101SCathy Xu and resistance value. 113*b2250101SCathy Xu 114*b2250101SCathy Xu For pull down type is PUPD/R0/R1 type, it can add R1R0 define to 115*b2250101SCathy Xu set different resistance. It can support "MTK_PUPD_SET_R1R0_00" & 116*b2250101SCathy Xu "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & 117*b2250101SCathy Xu "MTK_PUPD_SET_R1R0_11" define in mt8189. 118*b2250101SCathy Xu 119*b2250101SCathy Xu For pull down type is PD/RSEL, it can add resistance value(ohm) 120*b2250101SCathy Xu to set different resistance by identifying property 121*b2250101SCathy Xu "mediatek,rsel-resistance-in-si-unit". 122*b2250101SCathy Xu 123*b2250101SCathy Xu bias-pull-up: 124*b2250101SCathy Xu oneOf: 125*b2250101SCathy Xu - type: boolean 126*b2250101SCathy Xu - enum: [100, 101, 102, 103] 127*b2250101SCathy Xu description: mt8189 pull up PUPD/R0/R1 type define value. 128*b2250101SCathy Xu - enum: [1000, 1500, 2000, 3000, 4000, 5000, 75000] 129*b2250101SCathy Xu description: mt8189 pull up RSEL type si unit value(ohm). 130*b2250101SCathy Xu description: | 131*b2250101SCathy Xu For pull up type is normal, it don't need add R1R0 define 132*b2250101SCathy Xu and resistance value. 133*b2250101SCathy Xu 134*b2250101SCathy Xu For pull up type is PUPD/R0/R1 type, it can add R1R0 define to 135*b2250101SCathy Xu set different resistance. It can support "MTK_PUPD_SET_R1R0_00" & 136*b2250101SCathy Xu "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & 137*b2250101SCathy Xu "MTK_PUPD_SET_R1R0_11" define in mt8189. 138*b2250101SCathy Xu 139*b2250101SCathy Xu For pull up type is PU/RSEL, it can add resistance value(ohm) 140*b2250101SCathy Xu to set different resistance by identifying property 141*b2250101SCathy Xu "mediatek,rsel-resistance-in-si-unit". 142*b2250101SCathy Xu 143*b2250101SCathy Xu bias-disable: true 144*b2250101SCathy Xu 145*b2250101SCathy Xu output-high: true 146*b2250101SCathy Xu 147*b2250101SCathy Xu output-low: true 148*b2250101SCathy Xu 149*b2250101SCathy Xu input-enable: true 150*b2250101SCathy Xu 151*b2250101SCathy Xu input-disable: true 152*b2250101SCathy Xu 153*b2250101SCathy Xu input-schmitt-enable: true 154*b2250101SCathy Xu 155*b2250101SCathy Xu input-schmitt-disable: true 156*b2250101SCathy Xu 157*b2250101SCathy Xu required: 158*b2250101SCathy Xu - pinmux 159*b2250101SCathy Xu 160*b2250101SCathy Xurequired: 161*b2250101SCathy Xu - compatible 162*b2250101SCathy Xu - reg 163*b2250101SCathy Xu - interrupts 164*b2250101SCathy Xu - interrupt-controller 165*b2250101SCathy Xu - '#interrupt-cells' 166*b2250101SCathy Xu - gpio-controller 167*b2250101SCathy Xu - '#gpio-cells' 168*b2250101SCathy Xu - gpio-ranges 169*b2250101SCathy Xu 170*b2250101SCathy XuadditionalProperties: false 171*b2250101SCathy Xu 172*b2250101SCathy Xuexamples: 173*b2250101SCathy Xu - | 174*b2250101SCathy Xu #include <dt-bindings/pinctrl/mt65xx.h> 175*b2250101SCathy Xu #include <dt-bindings/interrupt-controller/arm-gic.h> 176*b2250101SCathy Xu #define PINMUX_GPIO51__FUNC_SCL0 (MTK_PIN_NO(51) | 2) 177*b2250101SCathy Xu #define PINMUX_GPIO52__FUNC_SDA0 (MTK_PIN_NO(52) | 2) 178*b2250101SCathy Xu 179*b2250101SCathy Xu pio: pinctrl@10005000 { 180*b2250101SCathy Xu compatible = "mediatek,mt8189-pinctrl"; 181*b2250101SCathy Xu reg = <0x10005000 0x1000>, 182*b2250101SCathy Xu <0x11b50000 0x1000>, 183*b2250101SCathy Xu <0x11c50000 0x1000>, 184*b2250101SCathy Xu <0x11c60000 0x1000>, 185*b2250101SCathy Xu <0x11d20000 0x1000>, 186*b2250101SCathy Xu <0x11d30000 0x1000>, 187*b2250101SCathy Xu <0x11d40000 0x1000>, 188*b2250101SCathy Xu <0x11e20000 0x1000>, 189*b2250101SCathy Xu <0x11e30000 0x1000>, 190*b2250101SCathy Xu <0x11f20000 0x1000>, 191*b2250101SCathy Xu <0x11ce0000 0x1000>, 192*b2250101SCathy Xu <0x11de0000 0x1000>, 193*b2250101SCathy Xu <0x11e60000 0x1000>, 194*b2250101SCathy Xu <0x1c01e000 0x1000>, 195*b2250101SCathy Xu <0x11f00000 0x1000>; 196*b2250101SCathy Xu reg-names = "base", "lm", "rb0", "rb1", "bm0" , "bm1", 197*b2250101SCathy Xu "bm2", "lt0", "lt1", "rt", "eint0", "eint1", 198*b2250101SCathy Xu "eint2", "eint3", "eint4"; 199*b2250101SCathy Xu gpio-controller; 200*b2250101SCathy Xu #gpio-cells = <2>; 201*b2250101SCathy Xu gpio-ranges = <&pio 0 0 182>; 202*b2250101SCathy Xu interrupt-controller; 203*b2250101SCathy Xu interrupts = <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH 0>; 204*b2250101SCathy Xu #interrupt-cells = <2>; 205*b2250101SCathy Xu 206*b2250101SCathy Xu i2c0-pins { 207*b2250101SCathy Xu pins { 208*b2250101SCathy Xu pinmux = <PINMUX_GPIO51__FUNC_SCL0>, 209*b2250101SCathy Xu <PINMUX_GPIO52__FUNC_SDA0>; 210*b2250101SCathy Xu bias-disable; 211*b2250101SCathy Xu }; 212*b2250101SCathy Xu }; 213*b2250101SCathy Xu }; 214