1*8ccc0d23SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*8ccc0d23SEmmanuel Vadot%YAML 1.2 3*8ccc0d23SEmmanuel Vadot--- 4*8ccc0d23SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/allwinner,sun55i-a523-pinctrl.yaml# 5*8ccc0d23SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*8ccc0d23SEmmanuel Vadot 7*8ccc0d23SEmmanuel Vadottitle: Allwinner A523 Pin Controller 8*8ccc0d23SEmmanuel Vadot 9*8ccc0d23SEmmanuel Vadotmaintainers: 10*8ccc0d23SEmmanuel Vadot - Andre Przywara <andre.przywara@arm.com> 11*8ccc0d23SEmmanuel Vadot 12*8ccc0d23SEmmanuel Vadotproperties: 13*8ccc0d23SEmmanuel Vadot "#gpio-cells": 14*8ccc0d23SEmmanuel Vadot const: 3 15*8ccc0d23SEmmanuel Vadot description: 16*8ccc0d23SEmmanuel Vadot GPIO consumers must use three arguments, first the number of the 17*8ccc0d23SEmmanuel Vadot bank, then the pin number inside that bank, and finally the GPIO 18*8ccc0d23SEmmanuel Vadot flags. 19*8ccc0d23SEmmanuel Vadot 20*8ccc0d23SEmmanuel Vadot "#interrupt-cells": 21*8ccc0d23SEmmanuel Vadot const: 3 22*8ccc0d23SEmmanuel Vadot description: 23*8ccc0d23SEmmanuel Vadot Interrupts consumers must use three arguments, first the number 24*8ccc0d23SEmmanuel Vadot of the bank, then the pin number inside that bank, and finally 25*8ccc0d23SEmmanuel Vadot the interrupts flags. 26*8ccc0d23SEmmanuel Vadot 27*8ccc0d23SEmmanuel Vadot compatible: 28*8ccc0d23SEmmanuel Vadot enum: 29*8ccc0d23SEmmanuel Vadot - allwinner,sun55i-a523-pinctrl 30*8ccc0d23SEmmanuel Vadot - allwinner,sun55i-a523-r-pinctrl 31*8ccc0d23SEmmanuel Vadot 32*8ccc0d23SEmmanuel Vadot reg: 33*8ccc0d23SEmmanuel Vadot maxItems: 1 34*8ccc0d23SEmmanuel Vadot 35*8ccc0d23SEmmanuel Vadot interrupts: 36*8ccc0d23SEmmanuel Vadot minItems: 2 37*8ccc0d23SEmmanuel Vadot maxItems: 10 38*8ccc0d23SEmmanuel Vadot description: 39*8ccc0d23SEmmanuel Vadot One interrupt per external interrupt bank supported on the 40*8ccc0d23SEmmanuel Vadot controller, sorted by bank number ascending order. 41*8ccc0d23SEmmanuel Vadot 42*8ccc0d23SEmmanuel Vadot clocks: 43*8ccc0d23SEmmanuel Vadot items: 44*8ccc0d23SEmmanuel Vadot - description: Bus Clock 45*8ccc0d23SEmmanuel Vadot - description: High Frequency Oscillator 46*8ccc0d23SEmmanuel Vadot - description: Low Frequency Oscillator 47*8ccc0d23SEmmanuel Vadot 48*8ccc0d23SEmmanuel Vadot clock-names: 49*8ccc0d23SEmmanuel Vadot items: 50*8ccc0d23SEmmanuel Vadot - const: apb 51*8ccc0d23SEmmanuel Vadot - const: hosc 52*8ccc0d23SEmmanuel Vadot - const: losc 53*8ccc0d23SEmmanuel Vadot 54*8ccc0d23SEmmanuel Vadot gpio-controller: true 55*8ccc0d23SEmmanuel Vadot interrupt-controller: true 56*8ccc0d23SEmmanuel Vadot gpio-line-names: true 57*8ccc0d23SEmmanuel Vadot 58*8ccc0d23SEmmanuel Vadot input-debounce: 59*8ccc0d23SEmmanuel Vadot description: 60*8ccc0d23SEmmanuel Vadot Debouncing periods in microseconds, one period per interrupt 61*8ccc0d23SEmmanuel Vadot bank found in the controller 62*8ccc0d23SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 63*8ccc0d23SEmmanuel Vadot minItems: 2 64*8ccc0d23SEmmanuel Vadot maxItems: 10 65*8ccc0d23SEmmanuel Vadot 66*8ccc0d23SEmmanuel VadotpatternProperties: 67*8ccc0d23SEmmanuel Vadot # It's pretty scary, but the basic idea is that: 68*8ccc0d23SEmmanuel Vadot # - One node name can start with either s- or r- for PRCM nodes, 69*8ccc0d23SEmmanuel Vadot # - Then, the name itself can be any repetition of <string>- (to 70*8ccc0d23SEmmanuel Vadot # accommodate with nodes like uart4-rts-cts-pins), where each 71*8ccc0d23SEmmanuel Vadot # string can be either starting with 'p' but in a string longer 72*8ccc0d23SEmmanuel Vadot # than 3, or something that doesn't start with 'p', 73*8ccc0d23SEmmanuel Vadot # - Then, the bank name is optional and will be between pa and pm. 74*8ccc0d23SEmmanuel Vadot # Some pins groups that have several options will have the pin 75*8ccc0d23SEmmanuel Vadot # numbers then, 76*8ccc0d23SEmmanuel Vadot # - Finally, the name will end with either -pin or pins. 77*8ccc0d23SEmmanuel Vadot 78*8ccc0d23SEmmanuel Vadot "^([rs]-)?(([a-z0-9]{3,}|[a-oq-z][a-z0-9]*?)?-)+?(p[a-m][0-9]*?-)??pins?$": 79*8ccc0d23SEmmanuel Vadot type: object 80*8ccc0d23SEmmanuel Vadot 81*8ccc0d23SEmmanuel Vadot properties: 82*8ccc0d23SEmmanuel Vadot pins: true 83*8ccc0d23SEmmanuel Vadot function: true 84*8ccc0d23SEmmanuel Vadot bias-disable: true 85*8ccc0d23SEmmanuel Vadot bias-pull-up: true 86*8ccc0d23SEmmanuel Vadot bias-pull-down: true 87*8ccc0d23SEmmanuel Vadot 88*8ccc0d23SEmmanuel Vadot drive-strength: 89*8ccc0d23SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 90*8ccc0d23SEmmanuel Vadot enum: [10, 20, 30, 40] 91*8ccc0d23SEmmanuel Vadot 92*8ccc0d23SEmmanuel Vadot allwinner,pinmux: 93*8ccc0d23SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 94*8ccc0d23SEmmanuel Vadot description: 95*8ccc0d23SEmmanuel Vadot Pinmux selector value, for each pin. Almost every time this value 96*8ccc0d23SEmmanuel Vadot is the same for all pins, so any array shorter than the number of 97*8ccc0d23SEmmanuel Vadot pins will repeat the last value, to allow just specifying a single 98*8ccc0d23SEmmanuel Vadot cell, for all cells. 99*8ccc0d23SEmmanuel Vadot 100*8ccc0d23SEmmanuel Vadot required: 101*8ccc0d23SEmmanuel Vadot - pins 102*8ccc0d23SEmmanuel Vadot - allwinner,pinmux 103*8ccc0d23SEmmanuel Vadot - function 104*8ccc0d23SEmmanuel Vadot 105*8ccc0d23SEmmanuel Vadot additionalProperties: false 106*8ccc0d23SEmmanuel Vadot 107*8ccc0d23SEmmanuel Vadot "^vcc-p[a-m]-supply$": 108*8ccc0d23SEmmanuel Vadot description: 109*8ccc0d23SEmmanuel Vadot Power supplies for pin banks. 110*8ccc0d23SEmmanuel Vadot 111*8ccc0d23SEmmanuel Vadotrequired: 112*8ccc0d23SEmmanuel Vadot - "#gpio-cells" 113*8ccc0d23SEmmanuel Vadot - compatible 114*8ccc0d23SEmmanuel Vadot - reg 115*8ccc0d23SEmmanuel Vadot - clocks 116*8ccc0d23SEmmanuel Vadot - clock-names 117*8ccc0d23SEmmanuel Vadot - gpio-controller 118*8ccc0d23SEmmanuel Vadot - "#interrupt-cells" 119*8ccc0d23SEmmanuel Vadot - interrupts 120*8ccc0d23SEmmanuel Vadot - interrupt-controller 121*8ccc0d23SEmmanuel Vadot 122*8ccc0d23SEmmanuel VadotallOf: 123*8ccc0d23SEmmanuel Vadot - $ref: pinctrl.yaml# 124*8ccc0d23SEmmanuel Vadot - if: 125*8ccc0d23SEmmanuel Vadot properties: 126*8ccc0d23SEmmanuel Vadot compatible: 127*8ccc0d23SEmmanuel Vadot enum: 128*8ccc0d23SEmmanuel Vadot - allwinner,sun55i-a523-pinctrl 129*8ccc0d23SEmmanuel Vadot 130*8ccc0d23SEmmanuel Vadot then: 131*8ccc0d23SEmmanuel Vadot properties: 132*8ccc0d23SEmmanuel Vadot interrupts: 133*8ccc0d23SEmmanuel Vadot minItems: 10 134*8ccc0d23SEmmanuel Vadot maxItems: 10 135*8ccc0d23SEmmanuel Vadot 136*8ccc0d23SEmmanuel Vadot - if: 137*8ccc0d23SEmmanuel Vadot properties: 138*8ccc0d23SEmmanuel Vadot compatible: 139*8ccc0d23SEmmanuel Vadot enum: 140*8ccc0d23SEmmanuel Vadot - allwinner,sun55i-a523-r-pinctrl 141*8ccc0d23SEmmanuel Vadot 142*8ccc0d23SEmmanuel Vadot then: 143*8ccc0d23SEmmanuel Vadot properties: 144*8ccc0d23SEmmanuel Vadot interrupts: 145*8ccc0d23SEmmanuel Vadot minItems: 2 146*8ccc0d23SEmmanuel Vadot maxItems: 2 147*8ccc0d23SEmmanuel Vadot 148*8ccc0d23SEmmanuel VadotadditionalProperties: false 149*8ccc0d23SEmmanuel Vadot 150*8ccc0d23SEmmanuel Vadotexamples: 151*8ccc0d23SEmmanuel Vadot - | 152*8ccc0d23SEmmanuel Vadot r_pio: pinctrl@7022000 { 153*8ccc0d23SEmmanuel Vadot compatible = "allwinner,sun55i-a523-r-pinctrl"; 154*8ccc0d23SEmmanuel Vadot reg = <0x7022000 0x800>; 155*8ccc0d23SEmmanuel Vadot interrupts = <0 159 4>, <0 161 4>; 156*8ccc0d23SEmmanuel Vadot clocks = <&r_ccu 1>, <&osc24M>, <&osc32k>; 157*8ccc0d23SEmmanuel Vadot clock-names = "apb", "hosc", "losc"; 158*8ccc0d23SEmmanuel Vadot gpio-controller; 159*8ccc0d23SEmmanuel Vadot #gpio-cells = <3>; 160*8ccc0d23SEmmanuel Vadot interrupt-controller; 161*8ccc0d23SEmmanuel Vadot #interrupt-cells = <3>; 162*8ccc0d23SEmmanuel Vadot 163*8ccc0d23SEmmanuel Vadot r_i2c_pins: r-i2c-pins { 164*8ccc0d23SEmmanuel Vadot pins = "PL0", "PL1"; 165*8ccc0d23SEmmanuel Vadot allwinner,pinmux = <2>; 166*8ccc0d23SEmmanuel Vadot function = "r_i2c0"; 167*8ccc0d23SEmmanuel Vadot bias-pull-up; 168*8ccc0d23SEmmanuel Vadot }; 169*8ccc0d23SEmmanuel Vadot 170*8ccc0d23SEmmanuel Vadot r_spi_pins: r-spi-pins { 171*8ccc0d23SEmmanuel Vadot pins = "PL11" ,"PL12", "PL13"; 172*8ccc0d23SEmmanuel Vadot allwinner,pinmux = <6>; 173*8ccc0d23SEmmanuel Vadot function = "r_spi"; 174*8ccc0d23SEmmanuel Vadot }; 175*8ccc0d23SEmmanuel Vadot }; 176