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 565def4c47SEmmanuel Vadot - allwinner,sun50i-h616-pinctrl 575def4c47SEmmanuel 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 665def4c47SEmmanuel 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 965def4c47SEmmanuel 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 150*e67e8565SEmmanuel Vadot - $ref: "pinctrl.yaml#" 151c66ec88fSEmmanuel Vadot - if: 152c66ec88fSEmmanuel Vadot properties: 153c66ec88fSEmmanuel Vadot compatible: 154c66ec88fSEmmanuel Vadot enum: 1555def4c47SEmmanuel Vadot - allwinner,sun50i-h616-pinctrl 1565def4c47SEmmanuel Vadot 1575def4c47SEmmanuel Vadot then: 1585def4c47SEmmanuel Vadot properties: 1595def4c47SEmmanuel Vadot interrupts: 1605def4c47SEmmanuel Vadot minItems: 8 1615def4c47SEmmanuel Vadot 1625def4c47SEmmanuel Vadot - if: 1635def4c47SEmmanuel Vadot properties: 1645def4c47SEmmanuel Vadot compatible: 1655def4c47SEmmanuel Vadot enum: 1666be33864SEmmanuel Vadot - allwinner,sun50i-a100-pinctrl 1676be33864SEmmanuel Vadot 1686be33864SEmmanuel Vadot then: 1696be33864SEmmanuel Vadot properties: 1706be33864SEmmanuel Vadot interrupts: 1716be33864SEmmanuel Vadot minItems: 7 1726be33864SEmmanuel Vadot maxItems: 7 1736be33864SEmmanuel Vadot 1746be33864SEmmanuel Vadot - if: 1756be33864SEmmanuel Vadot properties: 1766be33864SEmmanuel Vadot compatible: 1776be33864SEmmanuel Vadot enum: 178c66ec88fSEmmanuel Vadot - allwinner,sun9i-a80-pinctrl 179c66ec88fSEmmanuel Vadot 180c66ec88fSEmmanuel Vadot then: 181c66ec88fSEmmanuel Vadot properties: 182c66ec88fSEmmanuel Vadot interrupts: 183c66ec88fSEmmanuel Vadot minItems: 5 184c66ec88fSEmmanuel Vadot maxItems: 5 185c66ec88fSEmmanuel Vadot 1866be33864SEmmanuel Vadot - if: 187c66ec88fSEmmanuel Vadot properties: 188c66ec88fSEmmanuel Vadot compatible: 189c66ec88fSEmmanuel Vadot enum: 190c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31-pinctrl 191c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31s-pinctrl 192c66ec88fSEmmanuel Vadot - allwinner,sun50i-h6-pinctrl 193c66ec88fSEmmanuel Vadot 194c66ec88fSEmmanuel Vadot then: 195c66ec88fSEmmanuel Vadot properties: 196c66ec88fSEmmanuel Vadot interrupts: 197c66ec88fSEmmanuel Vadot minItems: 4 198c66ec88fSEmmanuel Vadot maxItems: 4 199c66ec88fSEmmanuel Vadot 2006be33864SEmmanuel Vadot - if: 201c66ec88fSEmmanuel Vadot properties: 202c66ec88fSEmmanuel Vadot compatible: 203c66ec88fSEmmanuel Vadot enum: 204c66ec88fSEmmanuel Vadot - allwinner,sun8i-a23-pinctrl 205c66ec88fSEmmanuel Vadot - allwinner,sun8i-a83t-pinctrl 206c66ec88fSEmmanuel Vadot - allwinner,sun50i-a64-pinctrl 207c66ec88fSEmmanuel Vadot - allwinner,sun50i-h5-pinctrl 208c66ec88fSEmmanuel Vadot - allwinner,suniv-f1c100s-pinctrl 209c66ec88fSEmmanuel Vadot 210c66ec88fSEmmanuel Vadot then: 211c66ec88fSEmmanuel Vadot properties: 212c66ec88fSEmmanuel Vadot interrupts: 213c66ec88fSEmmanuel Vadot minItems: 3 214c66ec88fSEmmanuel Vadot maxItems: 3 215c66ec88fSEmmanuel Vadot 2166be33864SEmmanuel Vadot - if: 217c66ec88fSEmmanuel Vadot properties: 218c66ec88fSEmmanuel Vadot compatible: 219c66ec88fSEmmanuel Vadot enum: 220c66ec88fSEmmanuel Vadot - allwinner,sun6i-a31-r-pinctrl 221c66ec88fSEmmanuel Vadot - allwinner,sun8i-a33-pinctrl 222c66ec88fSEmmanuel Vadot - allwinner,sun8i-h3-pinctrl 223c66ec88fSEmmanuel Vadot - allwinner,sun8i-v3-pinctrl 224c66ec88fSEmmanuel Vadot - allwinner,sun8i-v3s-pinctrl 225c66ec88fSEmmanuel Vadot - allwinner,sun9i-a80-r-pinctrl 226c66ec88fSEmmanuel Vadot - allwinner,sun50i-h6-r-pinctrl 227c66ec88fSEmmanuel Vadot 228c66ec88fSEmmanuel Vadot then: 229c66ec88fSEmmanuel Vadot properties: 230c66ec88fSEmmanuel Vadot interrupts: 231c66ec88fSEmmanuel Vadot minItems: 2 232c66ec88fSEmmanuel Vadot maxItems: 2 233c66ec88fSEmmanuel Vadot 2346be33864SEmmanuel Vadot - if: 2356be33864SEmmanuel Vadot properties: 2366be33864SEmmanuel Vadot compatible: 2376be33864SEmmanuel Vadot enum: 2386be33864SEmmanuel Vadot - allwinner,sun4i-a10-pinctrl 2396be33864SEmmanuel Vadot - allwinner,sun5i-a10s-pinctrl 2406be33864SEmmanuel Vadot - allwinner,sun5i-a13-pinctrl 2416be33864SEmmanuel Vadot - allwinner,sun7i-a20-pinctrl 2426be33864SEmmanuel Vadot - allwinner,sun8i-a23-r-pinctrl 2436be33864SEmmanuel Vadot - allwinner,sun8i-a83t-r-pinctrl 2446be33864SEmmanuel Vadot - allwinner,sun8i-h3-r-pinctrl 2456be33864SEmmanuel Vadot - allwinner,sun8i-r40-pinctrl 2466be33864SEmmanuel Vadot - allwinner,sun50i-a64-r-pinctrl 2476be33864SEmmanuel Vadot - allwinner,sun50i-a100-r-pinctrl 2486be33864SEmmanuel Vadot - nextthing,gr8-pinctrl 2496be33864SEmmanuel Vadot 2506be33864SEmmanuel Vadot then: 251c66ec88fSEmmanuel Vadot properties: 252c66ec88fSEmmanuel Vadot interrupts: 253c66ec88fSEmmanuel Vadot minItems: 1 254c66ec88fSEmmanuel Vadot maxItems: 1 255c66ec88fSEmmanuel Vadot 256c66ec88fSEmmanuel VadotadditionalProperties: false 257c66ec88fSEmmanuel Vadot 258c66ec88fSEmmanuel Vadotexamples: 259c66ec88fSEmmanuel Vadot - | 260c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/sun5i-ccu.h> 261c66ec88fSEmmanuel Vadot 262c66ec88fSEmmanuel Vadot pio: pinctrl@1c20800 { 263c66ec88fSEmmanuel Vadot compatible = "allwinner,sun5i-a13-pinctrl"; 264c66ec88fSEmmanuel Vadot reg = <0x01c20800 0x400>; 265c66ec88fSEmmanuel Vadot interrupts = <28>; 266c66ec88fSEmmanuel Vadot clocks = <&ccu CLK_APB0_PIO>, <&osc24M>, <&osc32k>; 267c66ec88fSEmmanuel Vadot clock-names = "apb", "hosc", "losc"; 268c66ec88fSEmmanuel Vadot gpio-controller; 269c66ec88fSEmmanuel Vadot interrupt-controller; 270c66ec88fSEmmanuel Vadot #interrupt-cells = <3>; 271c66ec88fSEmmanuel Vadot #gpio-cells = <3>; 272c66ec88fSEmmanuel Vadot 273c66ec88fSEmmanuel Vadot uart1_pe_pins: uart1-pe-pins { 274c66ec88fSEmmanuel Vadot pins = "PE10", "PE11"; 275c66ec88fSEmmanuel Vadot function = "uart1"; 276c66ec88fSEmmanuel Vadot }; 277c66ec88fSEmmanuel Vadot 278c66ec88fSEmmanuel Vadot uart1_pg_pins: uart1-pg-pins { 279c66ec88fSEmmanuel Vadot pins = "PG3", "PG4"; 280c66ec88fSEmmanuel Vadot function = "uart1"; 281c66ec88fSEmmanuel Vadot }; 282c66ec88fSEmmanuel Vadot }; 283