1*fac71e4eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*fac71e4eSEmmanuel Vadot%YAML 1.2 3*fac71e4eSEmmanuel Vadot--- 4*fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/mediatek,mt8192-pinctrl.yaml# 5*fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*fac71e4eSEmmanuel Vadot 7*fac71e4eSEmmanuel Vadottitle: MediaTek MT8192 Pin Controller 8*fac71e4eSEmmanuel Vadot 9*fac71e4eSEmmanuel Vadotmaintainers: 10*fac71e4eSEmmanuel Vadot - Sean Wang <sean.wang@mediatek.com> 11*fac71e4eSEmmanuel Vadot 12*fac71e4eSEmmanuel Vadotdescription: 13*fac71e4eSEmmanuel Vadot The MediaTek's MT8192 Pin controller is used to control SoC pins. 14*fac71e4eSEmmanuel Vadot 15*fac71e4eSEmmanuel Vadotproperties: 16*fac71e4eSEmmanuel Vadot compatible: 17*fac71e4eSEmmanuel Vadot const: mediatek,mt8192-pinctrl 18*fac71e4eSEmmanuel Vadot 19*fac71e4eSEmmanuel Vadot gpio-controller: true 20*fac71e4eSEmmanuel Vadot 21*fac71e4eSEmmanuel Vadot '#gpio-cells': 22*fac71e4eSEmmanuel Vadot description: 23*fac71e4eSEmmanuel Vadot Number of cells in GPIO specifier. Since the generic GPIO binding is used, 24*fac71e4eSEmmanuel Vadot the amount of cells must be specified as 2. See the below mentioned gpio 25*fac71e4eSEmmanuel Vadot binding representation for description of particular cells. 26*fac71e4eSEmmanuel Vadot const: 2 27*fac71e4eSEmmanuel Vadot 28*fac71e4eSEmmanuel Vadot gpio-ranges: 29*fac71e4eSEmmanuel Vadot description: GPIO valid number range. 30*fac71e4eSEmmanuel Vadot maxItems: 1 31*fac71e4eSEmmanuel Vadot 32*fac71e4eSEmmanuel Vadot gpio-line-names: true 33*fac71e4eSEmmanuel Vadot 34*fac71e4eSEmmanuel Vadot reg: 35*fac71e4eSEmmanuel Vadot description: 36*fac71e4eSEmmanuel Vadot Physical address base for GPIO base registers. There are 11 GPIO physical 37*fac71e4eSEmmanuel Vadot address base in mt8192. 38*fac71e4eSEmmanuel Vadot maxItems: 11 39*fac71e4eSEmmanuel Vadot 40*fac71e4eSEmmanuel Vadot reg-names: 41*fac71e4eSEmmanuel Vadot description: 42*fac71e4eSEmmanuel Vadot GPIO base register names. 43*fac71e4eSEmmanuel Vadot maxItems: 11 44*fac71e4eSEmmanuel Vadot 45*fac71e4eSEmmanuel Vadot interrupt-controller: true 46*fac71e4eSEmmanuel Vadot 47*fac71e4eSEmmanuel Vadot '#interrupt-cells': 48*fac71e4eSEmmanuel Vadot const: 2 49*fac71e4eSEmmanuel Vadot 50*fac71e4eSEmmanuel Vadot interrupts: 51*fac71e4eSEmmanuel Vadot description: The interrupt outputs to sysirq. 52*fac71e4eSEmmanuel Vadot maxItems: 1 53*fac71e4eSEmmanuel Vadot 54*fac71e4eSEmmanuel Vadot# PIN CONFIGURATION NODES 55*fac71e4eSEmmanuel VadotpatternProperties: 56*fac71e4eSEmmanuel Vadot '-pins$': 57*fac71e4eSEmmanuel Vadot type: object 58*fac71e4eSEmmanuel Vadot additionalProperties: false 59*fac71e4eSEmmanuel Vadot patternProperties: 60*fac71e4eSEmmanuel Vadot '^pins': 61*fac71e4eSEmmanuel Vadot type: object 62*fac71e4eSEmmanuel Vadot description: 63*fac71e4eSEmmanuel Vadot A pinctrl node should contain at least one subnodes representing the 64*fac71e4eSEmmanuel Vadot pinctrl groups available on the machine. Each subnode will list the 65*fac71e4eSEmmanuel Vadot pins it needs, and how they should be configured, with regard to muxer 66*fac71e4eSEmmanuel Vadot configuration, pullups, drive strength, input enable/disable and input 67*fac71e4eSEmmanuel Vadot schmitt. 68*fac71e4eSEmmanuel Vadot $ref: pinmux-node.yaml 69*fac71e4eSEmmanuel Vadot 70*fac71e4eSEmmanuel Vadot properties: 71*fac71e4eSEmmanuel Vadot pinmux: 72*fac71e4eSEmmanuel Vadot description: 73*fac71e4eSEmmanuel Vadot Integer array, represents gpio pin number and mux setting. 74*fac71e4eSEmmanuel Vadot Supported pin number and mux varies for different SoCs, and are 75*fac71e4eSEmmanuel Vadot defined as macros in dt-bindings/pinctrl/<soc>-pinfunc.h directly. 76*fac71e4eSEmmanuel Vadot 77*fac71e4eSEmmanuel Vadot drive-strength: 78*fac71e4eSEmmanuel Vadot description: 79*fac71e4eSEmmanuel Vadot It can support some arguments, such as MTK_DRIVE_4mA, 80*fac71e4eSEmmanuel Vadot MTK_DRIVE_6mA, etc. See dt-bindings/pinctrl/mt65xx.h. It can only 81*fac71e4eSEmmanuel Vadot support 2/4/6/8/10/12/14/16mA in mt8192. 82*fac71e4eSEmmanuel Vadot enum: [2, 4, 6, 8, 10, 12, 14, 16] 83*fac71e4eSEmmanuel Vadot 84*fac71e4eSEmmanuel Vadot drive-strength-microamp: 85*fac71e4eSEmmanuel Vadot enum: [125, 250, 500, 1000] 86*fac71e4eSEmmanuel Vadot 87*fac71e4eSEmmanuel Vadot bias-pull-down: 88*fac71e4eSEmmanuel Vadot oneOf: 89*fac71e4eSEmmanuel Vadot - type: boolean 90*fac71e4eSEmmanuel Vadot description: normal pull down. 91*fac71e4eSEmmanuel Vadot - enum: [100, 101, 102, 103] 92*fac71e4eSEmmanuel Vadot description: PUPD/R1/R0 pull down type. See MTK_PUPD_SET_R1R0_ 93*fac71e4eSEmmanuel Vadot defines in dt-bindings/pinctrl/mt65xx.h. 94*fac71e4eSEmmanuel Vadot - enum: [200, 201, 202, 203] 95*fac71e4eSEmmanuel Vadot description: RSEL pull down type. See MTK_PULL_SET_RSEL_ defines 96*fac71e4eSEmmanuel Vadot in dt-bindings/pinctrl/mt65xx.h. 97*fac71e4eSEmmanuel Vadot 98*fac71e4eSEmmanuel Vadot bias-pull-up: 99*fac71e4eSEmmanuel Vadot oneOf: 100*fac71e4eSEmmanuel Vadot - type: boolean 101*fac71e4eSEmmanuel Vadot description: normal pull up. 102*fac71e4eSEmmanuel Vadot - enum: [100, 101, 102, 103] 103*fac71e4eSEmmanuel Vadot description: PUPD/R1/R0 pull up type. See MTK_PUPD_SET_R1R0_ 104*fac71e4eSEmmanuel Vadot defines in dt-bindings/pinctrl/mt65xx.h. 105*fac71e4eSEmmanuel Vadot - enum: [200, 201, 202, 203] 106*fac71e4eSEmmanuel Vadot description: RSEL pull up type. See MTK_PULL_SET_RSEL_ defines 107*fac71e4eSEmmanuel Vadot in dt-bindings/pinctrl/mt65xx.h. 108*fac71e4eSEmmanuel Vadot 109*fac71e4eSEmmanuel Vadot bias-disable: true 110*fac71e4eSEmmanuel Vadot 111*fac71e4eSEmmanuel Vadot output-high: true 112*fac71e4eSEmmanuel Vadot 113*fac71e4eSEmmanuel Vadot output-low: true 114*fac71e4eSEmmanuel Vadot 115*fac71e4eSEmmanuel Vadot input-enable: true 116*fac71e4eSEmmanuel Vadot 117*fac71e4eSEmmanuel Vadot input-disable: true 118*fac71e4eSEmmanuel Vadot 119*fac71e4eSEmmanuel Vadot input-schmitt-enable: true 120*fac71e4eSEmmanuel Vadot 121*fac71e4eSEmmanuel Vadot input-schmitt-disable: true 122*fac71e4eSEmmanuel Vadot 123*fac71e4eSEmmanuel Vadot required: 124*fac71e4eSEmmanuel Vadot - pinmux 125*fac71e4eSEmmanuel Vadot 126*fac71e4eSEmmanuel Vadot additionalProperties: false 127*fac71e4eSEmmanuel Vadot 128*fac71e4eSEmmanuel VadotallOf: 129*fac71e4eSEmmanuel Vadot - $ref: pinctrl.yaml# 130*fac71e4eSEmmanuel Vadot 131*fac71e4eSEmmanuel Vadotrequired: 132*fac71e4eSEmmanuel Vadot - compatible 133*fac71e4eSEmmanuel Vadot - reg 134*fac71e4eSEmmanuel Vadot - interrupts 135*fac71e4eSEmmanuel Vadot - interrupt-controller 136*fac71e4eSEmmanuel Vadot - '#interrupt-cells' 137*fac71e4eSEmmanuel Vadot - gpio-controller 138*fac71e4eSEmmanuel Vadot - '#gpio-cells' 139*fac71e4eSEmmanuel Vadot - gpio-ranges 140*fac71e4eSEmmanuel Vadot 141*fac71e4eSEmmanuel VadotadditionalProperties: false 142*fac71e4eSEmmanuel Vadot 143*fac71e4eSEmmanuel Vadotexamples: 144*fac71e4eSEmmanuel Vadot - | 145*fac71e4eSEmmanuel Vadot #include <dt-bindings/pinctrl/mt8192-pinfunc.h> 146*fac71e4eSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 147*fac71e4eSEmmanuel Vadot pio: pinctrl@10005000 { 148*fac71e4eSEmmanuel Vadot compatible = "mediatek,mt8192-pinctrl"; 149*fac71e4eSEmmanuel Vadot reg = <0x10005000 0x1000>, 150*fac71e4eSEmmanuel Vadot <0x11c20000 0x1000>, 151*fac71e4eSEmmanuel Vadot <0x11d10000 0x1000>, 152*fac71e4eSEmmanuel Vadot <0x11d30000 0x1000>, 153*fac71e4eSEmmanuel Vadot <0x11d40000 0x1000>, 154*fac71e4eSEmmanuel Vadot <0x11e20000 0x1000>, 155*fac71e4eSEmmanuel Vadot <0x11e70000 0x1000>, 156*fac71e4eSEmmanuel Vadot <0x11ea0000 0x1000>, 157*fac71e4eSEmmanuel Vadot <0x11f20000 0x1000>, 158*fac71e4eSEmmanuel Vadot <0x11f30000 0x1000>, 159*fac71e4eSEmmanuel Vadot <0x1000b000 0x1000>; 160*fac71e4eSEmmanuel Vadot reg-names = "iocfg0", "iocfg_rm", "iocfg_bm", 161*fac71e4eSEmmanuel Vadot "iocfg_bl", "iocfg_br", "iocfg_lm", 162*fac71e4eSEmmanuel Vadot "iocfg_lb", "iocfg_rt", "iocfg_lt", 163*fac71e4eSEmmanuel Vadot "iocfg_tl", "eint"; 164*fac71e4eSEmmanuel Vadot gpio-controller; 165*fac71e4eSEmmanuel Vadot #gpio-cells = <2>; 166*fac71e4eSEmmanuel Vadot gpio-ranges = <&pio 0 0 220>; 167*fac71e4eSEmmanuel Vadot interrupt-controller; 168*fac71e4eSEmmanuel Vadot interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH 0>; 169*fac71e4eSEmmanuel Vadot #interrupt-cells = <2>; 170*fac71e4eSEmmanuel Vadot 171*fac71e4eSEmmanuel Vadot spi1-default-pins { 172*fac71e4eSEmmanuel Vadot pins-cs-mosi-clk { 173*fac71e4eSEmmanuel Vadot pinmux = <PINMUX_GPIO157__FUNC_SPI1_A_CSB>, 174*fac71e4eSEmmanuel Vadot <PINMUX_GPIO159__FUNC_SPI1_A_MO>, 175*fac71e4eSEmmanuel Vadot <PINMUX_GPIO156__FUNC_SPI1_A_CLK>; 176*fac71e4eSEmmanuel Vadot bias-disable; 177*fac71e4eSEmmanuel Vadot }; 178*fac71e4eSEmmanuel Vadot 179*fac71e4eSEmmanuel Vadot pins-miso { 180*fac71e4eSEmmanuel Vadot pinmux = <PINMUX_GPIO158__FUNC_SPI1_A_MI>; 181*fac71e4eSEmmanuel Vadot bias-pull-down; 182*fac71e4eSEmmanuel Vadot }; 183*fac71e4eSEmmanuel Vadot }; 184*fac71e4eSEmmanuel Vadot }; 185