1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/allwinner,sun4i-a10-pinctrl.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: Allwinner A10 Pin Controller Device Tree Bindings 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Chen-Yu Tsai <wens@csie.org> 11c66ec88fSEmmanuel Vadot - Maxime Ripard <mripard@kernel.org> 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel Vadotproperties: 14c66ec88fSEmmanuel Vadot "#gpio-cells": 15c66ec88fSEmmanuel Vadot const: 3 16c66ec88fSEmmanuel Vadot description: 17c66ec88fSEmmanuel Vadot GPIO consumers must use three arguments, first the number of the 18c66ec88fSEmmanuel Vadot bank, then the pin number inside that bank, and finally the GPIO 19c66ec88fSEmmanuel Vadot flags. 20c66ec88fSEmmanuel Vadot 21c66ec88fSEmmanuel Vadot "#interrupt-cells": 22c66ec88fSEmmanuel Vadot const: 3 23c66ec88fSEmmanuel Vadot description: 24c66ec88fSEmmanuel Vadot Interrupts consumers must use three arguments, first the number 25c66ec88fSEmmanuel Vadot of the bank, then the pin number inside that bank, and finally 26c66ec88fSEmmanuel Vadot the interrupts flags. 27c66ec88fSEmmanuel Vadot 28c66ec88fSEmmanuel Vadot compatible: 29c66ec88fSEmmanuel Vadot enum: 30c66ec88fSEmmanuel Vadot - allwinner,sun4i-a10-pinctrl 31c66ec88fSEmmanuel Vadot - allwinner,sun5i-a10s-pinctrl 32c66ec88fSEmmanuel Vadot - allwinner,sun5i-a13-pinctrl 33c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31-pinctrl 34c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31-r-pinctrl 35c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31s-pinctrl 36c66ec88fSEmmanuel Vadot - allwinner,sun7i-a20-pinctrl 37c66ec88fSEmmanuel Vadot - allwinner,sun8i-a23-pinctrl 38c66ec88fSEmmanuel Vadot - allwinner,sun8i-a23-r-pinctrl 39c66ec88fSEmmanuel Vadot - allwinner,sun8i-a33-pinctrl 40c66ec88fSEmmanuel Vadot - allwinner,sun8i-a83t-pinctrl 41c66ec88fSEmmanuel Vadot - allwinner,sun8i-a83t-r-pinctrl 42c66ec88fSEmmanuel Vadot - allwinner,sun8i-h3-pinctrl 43c66ec88fSEmmanuel Vadot - allwinner,sun8i-h3-r-pinctrl 44c66ec88fSEmmanuel Vadot - allwinner,sun8i-r40-pinctrl 45c66ec88fSEmmanuel Vadot - allwinner,sun8i-v3-pinctrl 46c66ec88fSEmmanuel Vadot - allwinner,sun8i-v3s-pinctrl 47c66ec88fSEmmanuel Vadot - allwinner,sun9i-a80-pinctrl 48c66ec88fSEmmanuel Vadot - allwinner,sun9i-a80-r-pinctrl 49c66ec88fSEmmanuel Vadot - allwinner,sun50i-a64-pinctrl 50c66ec88fSEmmanuel Vadot - allwinner,sun50i-a64-r-pinctrl 516be33864SEmmanuel Vadot - allwinner,sun50i-a100-pinctrl 526be33864SEmmanuel Vadot - allwinner,sun50i-a100-r-pinctrl 53c66ec88fSEmmanuel Vadot - allwinner,sun50i-h5-pinctrl 54c66ec88fSEmmanuel Vadot - allwinner,sun50i-h6-pinctrl 55c66ec88fSEmmanuel Vadot - allwinner,sun50i-h6-r-pinctrl 56*5def4c47SEmmanuel Vadot - allwinner,sun50i-h616-pinctrl 57*5def4c47SEmmanuel Vadot - allwinner,sun50i-h616-r-pinctrl 58c66ec88fSEmmanuel Vadot - allwinner,suniv-f1c100s-pinctrl 59c66ec88fSEmmanuel Vadot - nextthing,gr8-pinctrl 60c66ec88fSEmmanuel Vadot 61c66ec88fSEmmanuel Vadot reg: 62c66ec88fSEmmanuel Vadot maxItems: 1 63c66ec88fSEmmanuel Vadot 64c66ec88fSEmmanuel Vadot interrupts: 65c66ec88fSEmmanuel Vadot minItems: 1 66*5def4c47SEmmanuel Vadot maxItems: 8 67c66ec88fSEmmanuel Vadot description: 68c66ec88fSEmmanuel Vadot One interrupt per external interrupt bank supported on the 69c66ec88fSEmmanuel Vadot controller, sorted by bank number ascending order. 70c66ec88fSEmmanuel Vadot 71c66ec88fSEmmanuel Vadot clocks: 72c66ec88fSEmmanuel Vadot items: 73c66ec88fSEmmanuel Vadot - description: Bus Clock 74c66ec88fSEmmanuel Vadot - description: High Frequency Oscillator 75c66ec88fSEmmanuel Vadot - description: Low Frequency Oscillator 76c66ec88fSEmmanuel Vadot 77c66ec88fSEmmanuel Vadot clock-names: 78c66ec88fSEmmanuel Vadot items: 79c66ec88fSEmmanuel Vadot - const: apb 80c66ec88fSEmmanuel Vadot - const: hosc 81c66ec88fSEmmanuel Vadot - const: losc 82c66ec88fSEmmanuel Vadot 83c66ec88fSEmmanuel Vadot resets: 84c66ec88fSEmmanuel Vadot maxItems: 1 85c66ec88fSEmmanuel Vadot 86c66ec88fSEmmanuel Vadot gpio-controller: true 87c66ec88fSEmmanuel Vadot interrupt-controller: true 88c66ec88fSEmmanuel Vadot gpio-line-names: true 89c66ec88fSEmmanuel Vadot 90c66ec88fSEmmanuel Vadot input-debounce: 91c66ec88fSEmmanuel Vadot description: 92c66ec88fSEmmanuel Vadot Debouncing periods in microseconds, one period per interrupt 93c66ec88fSEmmanuel Vadot bank found in the controller 94c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 95c66ec88fSEmmanuel Vadot minItems: 1 96*5def4c47SEmmanuel Vadot maxItems: 8 97c66ec88fSEmmanuel Vadot 98c66ec88fSEmmanuel VadotpatternProperties: 99c66ec88fSEmmanuel Vadot # It's pretty scary, but the basic idea is that: 100c66ec88fSEmmanuel Vadot # - One node name can start with either s- or r- for PRCM nodes, 101c66ec88fSEmmanuel Vadot # - Then, the name itself can be any repetition of <string>- (to 102c66ec88fSEmmanuel Vadot # accomodate with nodes like uart4-rts-cts-pins), where each 103c66ec88fSEmmanuel Vadot # string can be either starting with 'p' but in a string longer 104c66ec88fSEmmanuel Vadot # than 3, or something that doesn't start with 'p', 105c66ec88fSEmmanuel Vadot # - Then, the bank name is optional and will be between pa and pg, 106c66ec88fSEmmanuel Vadot # pl or pm. Some pins groups that have several options will have 107c66ec88fSEmmanuel Vadot # the pin numbers then, 108c66ec88fSEmmanuel Vadot # - Finally, the name will end with either -pin or pins. 109c66ec88fSEmmanuel Vadot 110c66ec88fSEmmanuel Vadot "^([rs]-)?(([a-z0-9]{3,}|[a-oq-z][a-z0-9]*?)?-)+?(p[a-ilm][0-9]*?-)??pins?$": 111c66ec88fSEmmanuel Vadot type: object 112c66ec88fSEmmanuel Vadot 113c66ec88fSEmmanuel Vadot properties: 114c66ec88fSEmmanuel Vadot pins: true 115c66ec88fSEmmanuel Vadot function: true 116c66ec88fSEmmanuel Vadot bias-disable: true 117c66ec88fSEmmanuel Vadot bias-pull-up: true 118c66ec88fSEmmanuel Vadot bias-pull-down: true 119c66ec88fSEmmanuel Vadot 120c66ec88fSEmmanuel Vadot drive-strength: 121c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 122c66ec88fSEmmanuel Vadot enum: [10, 20, 30, 40] 123c66ec88fSEmmanuel Vadot 124c66ec88fSEmmanuel Vadot required: 125c66ec88fSEmmanuel Vadot - pins 126c66ec88fSEmmanuel Vadot - function 127c66ec88fSEmmanuel Vadot 128c66ec88fSEmmanuel Vadot additionalProperties: false 129c66ec88fSEmmanuel Vadot 130c66ec88fSEmmanuel Vadot "^vcc-p[a-hlm]-supply$": 131c66ec88fSEmmanuel Vadot description: 132c66ec88fSEmmanuel Vadot Power supplies for pin banks. 133c66ec88fSEmmanuel Vadot 134c66ec88fSEmmanuel Vadotrequired: 135c66ec88fSEmmanuel Vadot - "#gpio-cells" 136c66ec88fSEmmanuel Vadot - "#interrupt-cells" 137c66ec88fSEmmanuel Vadot - compatible 138c66ec88fSEmmanuel Vadot - reg 139c66ec88fSEmmanuel Vadot - interrupts 140c66ec88fSEmmanuel Vadot - clocks 141c66ec88fSEmmanuel Vadot - clock-names 142c66ec88fSEmmanuel Vadot - gpio-controller 143c66ec88fSEmmanuel Vadot - interrupt-controller 144c66ec88fSEmmanuel Vadot 145c66ec88fSEmmanuel VadotallOf: 146c66ec88fSEmmanuel Vadot # FIXME: We should have the pin bank supplies here, but not a lot of 147c66ec88fSEmmanuel Vadot # boards are defining it at the moment so it would generate a lot of 148c66ec88fSEmmanuel Vadot # warnings. 149c66ec88fSEmmanuel Vadot 150c66ec88fSEmmanuel Vadot - if: 151c66ec88fSEmmanuel Vadot properties: 152c66ec88fSEmmanuel Vadot compatible: 153c66ec88fSEmmanuel Vadot enum: 154*5def4c47SEmmanuel Vadot - allwinner,sun50i-h616-pinctrl 155*5def4c47SEmmanuel Vadot 156*5def4c47SEmmanuel Vadot then: 157*5def4c47SEmmanuel Vadot properties: 158*5def4c47SEmmanuel Vadot interrupts: 159*5def4c47SEmmanuel Vadot minItems: 8 160*5def4c47SEmmanuel Vadot 161*5def4c47SEmmanuel Vadot - if: 162*5def4c47SEmmanuel Vadot properties: 163*5def4c47SEmmanuel Vadot compatible: 164*5def4c47SEmmanuel Vadot enum: 1656be33864SEmmanuel Vadot - allwinner,sun50i-a100-pinctrl 1666be33864SEmmanuel Vadot 1676be33864SEmmanuel Vadot then: 1686be33864SEmmanuel Vadot properties: 1696be33864SEmmanuel Vadot interrupts: 1706be33864SEmmanuel Vadot minItems: 7 1716be33864SEmmanuel Vadot maxItems: 7 1726be33864SEmmanuel Vadot 1736be33864SEmmanuel Vadot - if: 1746be33864SEmmanuel Vadot properties: 1756be33864SEmmanuel Vadot compatible: 1766be33864SEmmanuel Vadot enum: 177c66ec88fSEmmanuel Vadot - allwinner,sun9i-a80-pinctrl 178c66ec88fSEmmanuel Vadot 179c66ec88fSEmmanuel Vadot then: 180c66ec88fSEmmanuel Vadot properties: 181c66ec88fSEmmanuel Vadot interrupts: 182c66ec88fSEmmanuel Vadot minItems: 5 183c66ec88fSEmmanuel Vadot maxItems: 5 184c66ec88fSEmmanuel Vadot 1856be33864SEmmanuel Vadot - if: 186c66ec88fSEmmanuel Vadot properties: 187c66ec88fSEmmanuel Vadot compatible: 188c66ec88fSEmmanuel Vadot enum: 189c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31-pinctrl 190c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31s-pinctrl 191c66ec88fSEmmanuel Vadot - allwinner,sun50i-h6-pinctrl 192c66ec88fSEmmanuel Vadot 193c66ec88fSEmmanuel Vadot then: 194c66ec88fSEmmanuel Vadot properties: 195c66ec88fSEmmanuel Vadot interrupts: 196c66ec88fSEmmanuel Vadot minItems: 4 197c66ec88fSEmmanuel Vadot maxItems: 4 198c66ec88fSEmmanuel Vadot 1996be33864SEmmanuel Vadot - if: 200c66ec88fSEmmanuel Vadot properties: 201c66ec88fSEmmanuel Vadot compatible: 202c66ec88fSEmmanuel Vadot enum: 203c66ec88fSEmmanuel Vadot - allwinner,sun8i-a23-pinctrl 204c66ec88fSEmmanuel Vadot - allwinner,sun8i-a83t-pinctrl 205c66ec88fSEmmanuel Vadot - allwinner,sun50i-a64-pinctrl 206c66ec88fSEmmanuel Vadot - allwinner,sun50i-h5-pinctrl 207c66ec88fSEmmanuel Vadot - allwinner,suniv-f1c100s-pinctrl 208c66ec88fSEmmanuel Vadot 209c66ec88fSEmmanuel Vadot then: 210c66ec88fSEmmanuel Vadot properties: 211c66ec88fSEmmanuel Vadot interrupts: 212c66ec88fSEmmanuel Vadot minItems: 3 213c66ec88fSEmmanuel Vadot maxItems: 3 214c66ec88fSEmmanuel Vadot 2156be33864SEmmanuel Vadot - if: 216c66ec88fSEmmanuel Vadot properties: 217c66ec88fSEmmanuel Vadot compatible: 218c66ec88fSEmmanuel Vadot enum: 219c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31-r-pinctrl 220c66ec88fSEmmanuel Vadot - allwinner,sun8i-a33-pinctrl 221c66ec88fSEmmanuel Vadot - allwinner,sun8i-h3-pinctrl 222c66ec88fSEmmanuel Vadot - allwinner,sun8i-v3-pinctrl 223c66ec88fSEmmanuel Vadot - allwinner,sun8i-v3s-pinctrl 224c66ec88fSEmmanuel Vadot - allwinner,sun9i-a80-r-pinctrl 225c66ec88fSEmmanuel Vadot - allwinner,sun50i-h6-r-pinctrl 226c66ec88fSEmmanuel Vadot 227c66ec88fSEmmanuel Vadot then: 228c66ec88fSEmmanuel Vadot properties: 229c66ec88fSEmmanuel Vadot interrupts: 230c66ec88fSEmmanuel Vadot minItems: 2 231c66ec88fSEmmanuel Vadot maxItems: 2 232c66ec88fSEmmanuel Vadot 2336be33864SEmmanuel Vadot - if: 2346be33864SEmmanuel Vadot properties: 2356be33864SEmmanuel Vadot compatible: 2366be33864SEmmanuel Vadot enum: 2376be33864SEmmanuel Vadot - allwinner,sun4i-a10-pinctrl 2386be33864SEmmanuel Vadot - allwinner,sun5i-a10s-pinctrl 2396be33864SEmmanuel Vadot - allwinner,sun5i-a13-pinctrl 2406be33864SEmmanuel Vadot - allwinner,sun7i-a20-pinctrl 2416be33864SEmmanuel Vadot - allwinner,sun8i-a23-r-pinctrl 2426be33864SEmmanuel Vadot - allwinner,sun8i-a83t-r-pinctrl 2436be33864SEmmanuel Vadot - allwinner,sun8i-h3-r-pinctrl 2446be33864SEmmanuel Vadot - allwinner,sun8i-r40-pinctrl 2456be33864SEmmanuel Vadot - allwinner,sun50i-a64-r-pinctrl 2466be33864SEmmanuel Vadot - allwinner,sun50i-a100-r-pinctrl 2476be33864SEmmanuel Vadot - nextthing,gr8-pinctrl 2486be33864SEmmanuel Vadot 2496be33864SEmmanuel Vadot then: 250c66ec88fSEmmanuel Vadot properties: 251c66ec88fSEmmanuel Vadot interrupts: 252c66ec88fSEmmanuel Vadot minItems: 1 253c66ec88fSEmmanuel Vadot maxItems: 1 254c66ec88fSEmmanuel Vadot 255c66ec88fSEmmanuel VadotadditionalProperties: false 256c66ec88fSEmmanuel Vadot 257c66ec88fSEmmanuel Vadotexamples: 258c66ec88fSEmmanuel Vadot - | 259c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/sun5i-ccu.h> 260c66ec88fSEmmanuel Vadot 261c66ec88fSEmmanuel Vadot pio: pinctrl@1c20800 { 262c66ec88fSEmmanuel Vadot compatible = "allwinner,sun5i-a13-pinctrl"; 263c66ec88fSEmmanuel Vadot reg = <0x01c20800 0x400>; 264c66ec88fSEmmanuel Vadot interrupts = <28>; 265c66ec88fSEmmanuel Vadot clocks = <&ccu CLK_APB0_PIO>, <&osc24M>, <&osc32k>; 266c66ec88fSEmmanuel Vadot clock-names = "apb", "hosc", "losc"; 267c66ec88fSEmmanuel Vadot gpio-controller; 268c66ec88fSEmmanuel Vadot interrupt-controller; 269c66ec88fSEmmanuel Vadot #interrupt-cells = <3>; 270c66ec88fSEmmanuel Vadot #gpio-cells = <3>; 271c66ec88fSEmmanuel Vadot 272c66ec88fSEmmanuel Vadot uart1_pe_pins: uart1-pe-pins { 273c66ec88fSEmmanuel Vadot pins = "PE10", "PE11"; 274c66ec88fSEmmanuel Vadot function = "uart1"; 275c66ec88fSEmmanuel Vadot }; 276c66ec88fSEmmanuel Vadot 277c66ec88fSEmmanuel Vadot uart1_pg_pins: uart1-pg-pins { 278c66ec88fSEmmanuel Vadot pins = "PG3", "PG4"; 279c66ec88fSEmmanuel Vadot function = "uart1"; 280c66ec88fSEmmanuel Vadot }; 281c66ec88fSEmmanuel Vadot }; 282