1 # SPDX-License-Identifier: (GPL-2.0-only OR BS 2 %YAML 1.2 3 --- 4 $id: http://devicetree.org/schemas/pinctrl/med 5 $schema: http://devicetree.org/meta-schemas/co 6 7 title: MediaTek MT6795 Pin Controller 8 9 maintainers: 10 - AngeloGioacchino Del Regno <angelogioacchin 11 - Sean Wang <sean.wang@kernel.org> 12 13 description: 14 The MediaTek's MT6795 Pin controller is used 15 16 properties: 17 compatible: 18 const: mediatek,mt6795-pinctrl 19 20 gpio-controller: true 21 22 '#gpio-cells': 23 description: 24 Number of cells in GPIO specifier. Since 25 the amount of cells must be specified as 26 binding representation for description o 27 const: 2 28 29 gpio-ranges: 30 description: GPIO valid number range. 31 maxItems: 1 32 33 reg: 34 description: 35 Physical address base for GPIO base and 36 minItems: 2 37 38 reg-names: 39 items: 40 - const: base 41 - const: eint 42 43 interrupt-controller: true 44 45 '#interrupt-cells': 46 const: 2 47 48 interrupts: 49 description: Interrupt outputs to the syst 50 minItems: 1 51 items: 52 - description: EINT interrupt 53 - description: EINT event_b interrupt 54 55 # PIN CONFIGURATION NODES 56 patternProperties: 57 '-pins$': 58 type: object 59 additionalProperties: false 60 patternProperties: 61 '^pins': 62 type: object 63 additionalProperties: false 64 description: | 65 A pinctrl node should contain at lea 66 pinctrl groups available on the mach 67 pins it needs, and how they should b 68 configuration, pullups, drive streng 69 schmitt. 70 An example of using macro: 71 pincontroller { 72 /* GPIO0 set as multifunction GPIO 73 gpio-pins { 74 pins { 75 pinmux = <PINMUX_GPIO0__FUNC_G 76 } 77 }; 78 /* GPIO45 set as multifunction SDA 79 i2c0-pins { 80 pins { 81 pinmux = <PINMUX_GPIO45__FUNC_ 82 } 83 }; 84 }; 85 $ref: pinmux-node.yaml 86 87 properties: 88 pinmux: 89 description: 90 Integer array, represents gpio p 91 Supported pin number and mux var 92 defined as macros in dt-bindings 93 94 drive-strength: 95 enum: [2, 4, 6, 8, 10, 12, 14, 16] 96 97 bias-pull-down: 98 oneOf: 99 - type: boolean 100 - enum: [100, 101, 102, 103] 101 description: mt6795 pull down 102 description: 103 For normal pull down type, it is 104 values; When pull down type is P 105 will set different resistance va 106 107 bias-pull-up: 108 oneOf: 109 - type: boolean 110 - enum: [100, 101, 102, 103] 111 description: mt6795 pull up PU 112 description: 113 For normal pull up type, it is n 114 values; When pull up type is PUP 115 set different resistance values. 116 117 bias-disable: true 118 119 output-high: true 120 121 output-low: true 122 123 input-enable: true 124 125 input-disable: true 126 127 input-schmitt-enable: true 128 129 input-schmitt-disable: true 130 131 mediatek,pull-up-adv: 132 description: | 133 Pull up settings for 2 pull resi 134 configure those special pins. Va 135 below: 136 0: (R1, R0) = (0, 0) which means 137 1: (R1, R0) = (0, 1) which means 138 2: (R1, R0) = (1, 0) which means 139 3: (R1, R0) = (1, 1) which means 140 $ref: /schemas/types.yaml#/definit 141 enum: [0, 1, 2, 3] 142 143 mediatek,pull-down-adv: 144 description: | 145 Pull down settings for 2 pull re 146 configure those special pins. Va 147 below: 148 0: (R1, R0) = (0, 0) which means 149 1: (R1, R0) = (0, 1) which means 150 2: (R1, R0) = (1, 0) which means 151 3: (R1, R0) = (1, 1) which means 152 $ref: /schemas/types.yaml#/definit 153 enum: [0, 1, 2, 3] 154 155 required: 156 - pinmux 157 158 allOf: 159 - $ref: pinctrl.yaml# 160 161 required: 162 - compatible 163 - reg 164 - reg-names 165 - interrupts 166 - interrupt-controller 167 - '#interrupt-cells' 168 - gpio-controller 169 - '#gpio-cells' 170 - gpio-ranges 171 172 additionalProperties: false 173 174 examples: 175 - | 176 #include <dt-bindings/interrupt-controller 177 #include <dt-bindings/interrupt-controller 178 #include <dt-bindings/pinctrl/mt6795-pinfu 179 180 soc { 181 #address-cells = <2>; 182 #size-cells = <2>; 183 184 pio: pinctrl@10005000 { 185 compatible = "mediatek,mt6795-pinc 186 reg = <0 0x10005000 0 0x1000>, <0 187 reg-names = "base", "eint"; 188 gpio-controller; 189 #gpio-cells = <2>; 190 gpio-ranges = <&pio 0 0 196>; 191 interrupt-controller; 192 interrupts = <GIC_SPI 153 IRQ_TYPE 193 #interrupt-cells = <2>; 194 195 i2c0-pins { 196 pins-sda-scl { 197 pinmux = <PINMUX_GPIO45__F 198 <PINMUX_GPIO46__F 199 }; 200 }; 201 202 mmc0-pins { 203 pins-cmd-dat { 204 pinmux = <PINMUX_GPIO154__ 205 <PINMUX_GPIO155__ 206 <PINMUX_GPIO156__ 207 <PINMUX_GPIO157__ 208 <PINMUX_GPIO158__ 209 <PINMUX_GPIO159__ 210 <PINMUX_GPIO160__ 211 <PINMUX_GPIO161__ 212 <PINMUX_GPIO162__ 213 input-enable; 214 bias-pull-up = <MTK_PUPD_S 215 }; 216 217 pins-clk { 218 pinmux = <PINMUX_GPIO163__ 219 bias-pull-down = <MTK_PUPD 220 }; 221 222 pins-rst { 223 pinmux = <PINMUX_GPIO165__ 224 bias-pull-up = <MTK_PUPD_S 225 }; 226 }; 227 }; 228 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.