1*ae5de77eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*ae5de77eSEmmanuel Vadot%YAML 1.2 3*ae5de77eSEmmanuel Vadot--- 4*ae5de77eSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/mediatek,mt8196-pinctrl.yaml# 5*ae5de77eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*ae5de77eSEmmanuel Vadot 7*ae5de77eSEmmanuel Vadottitle: MediaTek MT8196 Pin Controller 8*ae5de77eSEmmanuel Vadot 9*ae5de77eSEmmanuel Vadotmaintainers: 10*ae5de77eSEmmanuel Vadot - Lei Xue <lei.xue@mediatek.com> 11*ae5de77eSEmmanuel Vadot - Cathy Xu <ot_cathy.xu@mediatek.com> 12*ae5de77eSEmmanuel Vadot 13*ae5de77eSEmmanuel Vadotdescription: 14*ae5de77eSEmmanuel Vadot The MediaTek's MT8196 Pin controller is used to control SoC pins. 15*ae5de77eSEmmanuel Vadot 16*ae5de77eSEmmanuel Vadotproperties: 17*ae5de77eSEmmanuel Vadot compatible: 18*ae5de77eSEmmanuel Vadot const: mediatek,mt8196-pinctrl 19*ae5de77eSEmmanuel Vadot 20*ae5de77eSEmmanuel Vadot reg: 21*ae5de77eSEmmanuel Vadot items: 22*ae5de77eSEmmanuel Vadot - description: gpio base 23*ae5de77eSEmmanuel Vadot - description: rt group IO 24*ae5de77eSEmmanuel Vadot - description: rm1 group IO 25*ae5de77eSEmmanuel Vadot - description: rm2 group IO 26*ae5de77eSEmmanuel Vadot - description: rb group IO 27*ae5de77eSEmmanuel Vadot - description: bm1 group IO 28*ae5de77eSEmmanuel Vadot - description: bm2 group IO 29*ae5de77eSEmmanuel Vadot - description: bm3 group IO 30*ae5de77eSEmmanuel Vadot - description: lt group IO 31*ae5de77eSEmmanuel Vadot - description: lm1 group IO 32*ae5de77eSEmmanuel Vadot - description: lm2 group IO 33*ae5de77eSEmmanuel Vadot - description: lb1 group IO 34*ae5de77eSEmmanuel Vadot - description: lb2 group IO 35*ae5de77eSEmmanuel Vadot - description: tm1 group IO 36*ae5de77eSEmmanuel Vadot - description: tm2 group IO 37*ae5de77eSEmmanuel Vadot - description: tm3 group IO 38*ae5de77eSEmmanuel Vadot - description: eint0 group IO 39*ae5de77eSEmmanuel Vadot - description: eint1 group IO 40*ae5de77eSEmmanuel Vadot - description: eint2 group IO 41*ae5de77eSEmmanuel Vadot - description: eint3 group IO 42*ae5de77eSEmmanuel Vadot - description: eint4 group IO 43*ae5de77eSEmmanuel Vadot 44*ae5de77eSEmmanuel Vadot reg-names: 45*ae5de77eSEmmanuel Vadot items: 46*ae5de77eSEmmanuel Vadot - const: base 47*ae5de77eSEmmanuel Vadot - const: rt 48*ae5de77eSEmmanuel Vadot - const: rm1 49*ae5de77eSEmmanuel Vadot - const: rm2 50*ae5de77eSEmmanuel Vadot - const: rb 51*ae5de77eSEmmanuel Vadot - const: bm1 52*ae5de77eSEmmanuel Vadot - const: bm2 53*ae5de77eSEmmanuel Vadot - const: bm3 54*ae5de77eSEmmanuel Vadot - const: lt 55*ae5de77eSEmmanuel Vadot - const: lm1 56*ae5de77eSEmmanuel Vadot - const: lm2 57*ae5de77eSEmmanuel Vadot - const: lb1 58*ae5de77eSEmmanuel Vadot - const: lb2 59*ae5de77eSEmmanuel Vadot - const: tm1 60*ae5de77eSEmmanuel Vadot - const: tm2 61*ae5de77eSEmmanuel Vadot - const: tm3 62*ae5de77eSEmmanuel Vadot - const: eint0 63*ae5de77eSEmmanuel Vadot - const: eint1 64*ae5de77eSEmmanuel Vadot - const: eint2 65*ae5de77eSEmmanuel Vadot - const: eint3 66*ae5de77eSEmmanuel Vadot - const: eint4 67*ae5de77eSEmmanuel Vadot 68*ae5de77eSEmmanuel Vadot interrupts: 69*ae5de77eSEmmanuel Vadot description: The interrupt outputs to sysirq. 70*ae5de77eSEmmanuel Vadot maxItems: 1 71*ae5de77eSEmmanuel Vadot 72*ae5de77eSEmmanuel Vadot interrupt-controller: true 73*ae5de77eSEmmanuel Vadot 74*ae5de77eSEmmanuel Vadot '#interrupt-cells': 75*ae5de77eSEmmanuel Vadot const: 2 76*ae5de77eSEmmanuel Vadot 77*ae5de77eSEmmanuel Vadot gpio-controller: true 78*ae5de77eSEmmanuel Vadot 79*ae5de77eSEmmanuel Vadot '#gpio-cells': 80*ae5de77eSEmmanuel Vadot description: 81*ae5de77eSEmmanuel Vadot Number of cells in GPIO specifier, should be two. The first cell is the 82*ae5de77eSEmmanuel Vadot pin number, the second cell is used to specify optional parameters which 83*ae5de77eSEmmanuel Vadot are defined in <dt-bindings/gpio/gpio.h>. 84*ae5de77eSEmmanuel Vadot const: 2 85*ae5de77eSEmmanuel Vadot 86*ae5de77eSEmmanuel Vadot gpio-ranges: 87*ae5de77eSEmmanuel Vadot maxItems: 1 88*ae5de77eSEmmanuel Vadot 89*ae5de77eSEmmanuel Vadot gpio-line-names: true 90*ae5de77eSEmmanuel Vadot 91*ae5de77eSEmmanuel Vadot# PIN CONFIGURATION NODES 92*ae5de77eSEmmanuel VadotpatternProperties: 93*ae5de77eSEmmanuel Vadot '-pins$': 94*ae5de77eSEmmanuel Vadot type: object 95*ae5de77eSEmmanuel Vadot additionalProperties: false 96*ae5de77eSEmmanuel Vadot 97*ae5de77eSEmmanuel Vadot patternProperties: 98*ae5de77eSEmmanuel Vadot '^pins': 99*ae5de77eSEmmanuel Vadot type: object 100*ae5de77eSEmmanuel Vadot $ref: /schemas/pinctrl/pincfg-node.yaml 101*ae5de77eSEmmanuel Vadot additionalProperties: false 102*ae5de77eSEmmanuel Vadot description: 103*ae5de77eSEmmanuel Vadot A pinctrl node should contain at least one subnode representing the 104*ae5de77eSEmmanuel Vadot pinctrl groups available on the machine. Each subnode will list the 105*ae5de77eSEmmanuel Vadot pins it needs, and how they should be configured, with regard to muxer 106*ae5de77eSEmmanuel Vadot configuration, pullups, drive strength, input enable/disable and input 107*ae5de77eSEmmanuel Vadot schmitt. 108*ae5de77eSEmmanuel Vadot 109*ae5de77eSEmmanuel Vadot properties: 110*ae5de77eSEmmanuel Vadot pinmux: 111*ae5de77eSEmmanuel Vadot description: 112*ae5de77eSEmmanuel Vadot Integer array, represents gpio pin number and mux setting. 113*ae5de77eSEmmanuel Vadot Supported pin number and mux varies for different SoCs, and are 114*ae5de77eSEmmanuel Vadot defined as macros in arch/arm64/boot/dts/mediatek/mt8196-pinfunc.h 115*ae5de77eSEmmanuel Vadot directly, for this SoC. 116*ae5de77eSEmmanuel Vadot 117*ae5de77eSEmmanuel Vadot drive-strength: 118*ae5de77eSEmmanuel Vadot enum: [2, 4, 6, 8, 10, 12, 14, 16] 119*ae5de77eSEmmanuel Vadot 120*ae5de77eSEmmanuel Vadot bias-pull-down: 121*ae5de77eSEmmanuel Vadot oneOf: 122*ae5de77eSEmmanuel Vadot - type: boolean 123*ae5de77eSEmmanuel Vadot - enum: [100, 101, 102, 103] 124*ae5de77eSEmmanuel Vadot description: mt8196 pull down PUPD/R0/R1 type define value. 125*ae5de77eSEmmanuel Vadot - enum: [75000, 5000] 126*ae5de77eSEmmanuel Vadot description: mt8196 pull down RSEL type si unit value(ohm). 127*ae5de77eSEmmanuel Vadot description: | 128*ae5de77eSEmmanuel Vadot For pull down type is normal, it doesn't need add R1R0 define 129*ae5de77eSEmmanuel Vadot and resistance value. 130*ae5de77eSEmmanuel Vadot For pull down type is PUPD/R0/R1 type, it can add R1R0 define to 131*ae5de77eSEmmanuel Vadot set different resistance. It can support "MTK_PUPD_SET_R1R0_00" & 132*ae5de77eSEmmanuel Vadot "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & 133*ae5de77eSEmmanuel Vadot "MTK_PUPD_SET_R1R0_11" define in mt8196. 134*ae5de77eSEmmanuel Vadot For pull down type is PD/RSEL, it can add resistance value(ohm) 135*ae5de77eSEmmanuel Vadot to set different resistance by identifying property 136*ae5de77eSEmmanuel Vadot "mediatek,rsel-resistance-in-si-unit". It can support resistance 137*ae5de77eSEmmanuel Vadot value(ohm) "75000" & "5000" in mt8196. 138*ae5de77eSEmmanuel Vadot 139*ae5de77eSEmmanuel Vadot bias-pull-up: 140*ae5de77eSEmmanuel Vadot oneOf: 141*ae5de77eSEmmanuel Vadot - type: boolean 142*ae5de77eSEmmanuel Vadot - enum: [100, 101, 102, 103] 143*ae5de77eSEmmanuel Vadot description: mt8196 pull up PUPD/R0/R1 type define value. 144*ae5de77eSEmmanuel Vadot - enum: [1000, 1500, 2000, 3000, 4000, 5000, 75000] 145*ae5de77eSEmmanuel Vadot description: mt8196 pull up RSEL type si unit value(ohm). 146*ae5de77eSEmmanuel Vadot description: | 147*ae5de77eSEmmanuel Vadot For pull up type is normal, it don't need add R1R0 define 148*ae5de77eSEmmanuel Vadot and resistance value. 149*ae5de77eSEmmanuel Vadot For pull up type is PUPD/R0/R1 type, it can add R1R0 define to 150*ae5de77eSEmmanuel Vadot set different resistance. It can support "MTK_PUPD_SET_R1R0_00" & 151*ae5de77eSEmmanuel Vadot "MTK_PUPD_SET_R1R0_01" & "MTK_PUPD_SET_R1R0_10" & 152*ae5de77eSEmmanuel Vadot "MTK_PUPD_SET_R1R0_11" define in mt8196. 153*ae5de77eSEmmanuel Vadot For pull up type is PU/RSEL, it can add resistance value(ohm) 154*ae5de77eSEmmanuel Vadot to set different resistance by identifying property 155*ae5de77eSEmmanuel Vadot "mediatek,rsel-resistance-in-si-unit". It can support resistance 156*ae5de77eSEmmanuel Vadot value(ohm) "1000" & "1500" & "2000" & "3000" & "4000" & "5000" & 157*ae5de77eSEmmanuel Vadot "75000" in mt8196. 158*ae5de77eSEmmanuel Vadot 159*ae5de77eSEmmanuel Vadot bias-disable: true 160*ae5de77eSEmmanuel Vadot 161*ae5de77eSEmmanuel Vadot output-high: true 162*ae5de77eSEmmanuel Vadot 163*ae5de77eSEmmanuel Vadot output-low: true 164*ae5de77eSEmmanuel Vadot 165*ae5de77eSEmmanuel Vadot input-enable: true 166*ae5de77eSEmmanuel Vadot 167*ae5de77eSEmmanuel Vadot input-disable: true 168*ae5de77eSEmmanuel Vadot 169*ae5de77eSEmmanuel Vadot input-schmitt-enable: true 170*ae5de77eSEmmanuel Vadot 171*ae5de77eSEmmanuel Vadot input-schmitt-disable: true 172*ae5de77eSEmmanuel Vadot 173*ae5de77eSEmmanuel Vadot required: 174*ae5de77eSEmmanuel Vadot - pinmux 175*ae5de77eSEmmanuel Vadot 176*ae5de77eSEmmanuel Vadotrequired: 177*ae5de77eSEmmanuel Vadot - compatible 178*ae5de77eSEmmanuel Vadot - reg 179*ae5de77eSEmmanuel Vadot - interrupts 180*ae5de77eSEmmanuel Vadot - interrupt-controller 181*ae5de77eSEmmanuel Vadot - '#interrupt-cells' 182*ae5de77eSEmmanuel Vadot - gpio-controller 183*ae5de77eSEmmanuel Vadot - '#gpio-cells' 184*ae5de77eSEmmanuel Vadot - gpio-ranges 185*ae5de77eSEmmanuel Vadot 186*ae5de77eSEmmanuel VadotadditionalProperties: false 187*ae5de77eSEmmanuel Vadot 188*ae5de77eSEmmanuel Vadotexamples: 189*ae5de77eSEmmanuel Vadot - | 190*ae5de77eSEmmanuel Vadot #include <dt-bindings/pinctrl/mt65xx.h> 191*ae5de77eSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 192*ae5de77eSEmmanuel Vadot #define PINMUX_GPIO99__FUNC_SCL0 (MTK_PIN_NO(99) | 1) 193*ae5de77eSEmmanuel Vadot #define PINMUX_GPIO100__FUNC_SDA0 (MTK_PIN_NO(100) | 1) 194*ae5de77eSEmmanuel Vadot 195*ae5de77eSEmmanuel Vadot pio: pinctrl@1002d000 { 196*ae5de77eSEmmanuel Vadot compatible = "mediatek,mt8196-pinctrl"; 197*ae5de77eSEmmanuel Vadot reg = <0x1002d000 0x1000>, 198*ae5de77eSEmmanuel Vadot <0x12000000 0x1000>, 199*ae5de77eSEmmanuel Vadot <0x12020000 0x1000>, 200*ae5de77eSEmmanuel Vadot <0x12040000 0x1000>, 201*ae5de77eSEmmanuel Vadot <0x12060000 0x1000>, 202*ae5de77eSEmmanuel Vadot <0x12820000 0x1000>, 203*ae5de77eSEmmanuel Vadot <0x12840000 0x1000>, 204*ae5de77eSEmmanuel Vadot <0x12860000 0x1000>, 205*ae5de77eSEmmanuel Vadot <0x13000000 0x1000>, 206*ae5de77eSEmmanuel Vadot <0x13020000 0x1000>, 207*ae5de77eSEmmanuel Vadot <0x13040000 0x1000>, 208*ae5de77eSEmmanuel Vadot <0x130f0000 0x1000>, 209*ae5de77eSEmmanuel Vadot <0x13110000 0x1000>, 210*ae5de77eSEmmanuel Vadot <0x13800000 0x1000>, 211*ae5de77eSEmmanuel Vadot <0x13820000 0x1000>, 212*ae5de77eSEmmanuel Vadot <0x13860000 0x1000>, 213*ae5de77eSEmmanuel Vadot <0x12080000 0x1000>, 214*ae5de77eSEmmanuel Vadot <0x12880000 0x1000>, 215*ae5de77eSEmmanuel Vadot <0x13080000 0x1000>, 216*ae5de77eSEmmanuel Vadot <0x13880000 0x1000>, 217*ae5de77eSEmmanuel Vadot <0x1c54a000 0x1000>; 218*ae5de77eSEmmanuel Vadot reg-names = "base", "rt", "rm1", "rm2", "rb" , "bm1", 219*ae5de77eSEmmanuel Vadot "bm2", "bm3", "lt", "lm1", "lm2", "lb1", 220*ae5de77eSEmmanuel Vadot "lb2", "tm1", "tm2", "tm3", "eint0", "eint1", 221*ae5de77eSEmmanuel Vadot "eint2", "eint3", "eint4"; 222*ae5de77eSEmmanuel Vadot gpio-controller; 223*ae5de77eSEmmanuel Vadot #gpio-cells = <2>; 224*ae5de77eSEmmanuel Vadot gpio-ranges = <&pio 0 0 271>; 225*ae5de77eSEmmanuel Vadot interrupt-controller; 226*ae5de77eSEmmanuel Vadot interrupts = <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH 0>; 227*ae5de77eSEmmanuel Vadot #interrupt-cells = <2>; 228*ae5de77eSEmmanuel Vadot 229*ae5de77eSEmmanuel Vadot i2c0-pins { 230*ae5de77eSEmmanuel Vadot pins { 231*ae5de77eSEmmanuel Vadot pinmux = <PINMUX_GPIO99__FUNC_SCL0>, 232*ae5de77eSEmmanuel Vadot <PINMUX_GPIO100__FUNC_SDA0>; 233*ae5de77eSEmmanuel Vadot bias-disable; 234*ae5de77eSEmmanuel Vadot }; 235*ae5de77eSEmmanuel Vadot }; 236*ae5de77eSEmmanuel Vadot }; 237