1*01950c46SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2*01950c46SEmmanuel Vadot%YAML 1.2 3*01950c46SEmmanuel Vadot--- 4*01950c46SEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/aspeed,ast2400-gpio.yaml# 5*01950c46SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*01950c46SEmmanuel Vadot 7*01950c46SEmmanuel Vadottitle: Aspeed GPIO controller 8*01950c46SEmmanuel Vadot 9*01950c46SEmmanuel Vadotmaintainers: 10*01950c46SEmmanuel Vadot - Andrew Jeffery <andrew@codeconstruct.com.au> 11*01950c46SEmmanuel Vadot 12*01950c46SEmmanuel Vadotproperties: 13*01950c46SEmmanuel Vadot compatible: 14*01950c46SEmmanuel Vadot enum: 15*01950c46SEmmanuel Vadot - aspeed,ast2400-gpio 16*01950c46SEmmanuel Vadot - aspeed,ast2500-gpio 17*01950c46SEmmanuel Vadot - aspeed,ast2600-gpio 18*01950c46SEmmanuel Vadot 19*01950c46SEmmanuel Vadot reg: 20*01950c46SEmmanuel Vadot maxItems: 1 21*01950c46SEmmanuel Vadot 22*01950c46SEmmanuel Vadot clocks: 23*01950c46SEmmanuel Vadot maxItems: 1 24*01950c46SEmmanuel Vadot description: The clock to use for debounce timings 25*01950c46SEmmanuel Vadot 26*01950c46SEmmanuel Vadot gpio-controller: true 27*01950c46SEmmanuel Vadot gpio-line-names: 28*01950c46SEmmanuel Vadot minItems: 36 29*01950c46SEmmanuel Vadot maxItems: 232 30*01950c46SEmmanuel Vadot 31*01950c46SEmmanuel Vadot gpio-ranges: true 32*01950c46SEmmanuel Vadot 33*01950c46SEmmanuel Vadot "#gpio-cells": 34*01950c46SEmmanuel Vadot const: 2 35*01950c46SEmmanuel Vadot 36*01950c46SEmmanuel Vadot interrupts: 37*01950c46SEmmanuel Vadot maxItems: 1 38*01950c46SEmmanuel Vadot 39*01950c46SEmmanuel Vadot interrupt-controller: true 40*01950c46SEmmanuel Vadot 41*01950c46SEmmanuel Vadot "#interrupt-cells": 42*01950c46SEmmanuel Vadot const: 2 43*01950c46SEmmanuel Vadot 44*01950c46SEmmanuel Vadot ngpios: 45*01950c46SEmmanuel Vadot minimum: 36 46*01950c46SEmmanuel Vadot maximum: 232 47*01950c46SEmmanuel Vadot 48*01950c46SEmmanuel Vadotrequired: 49*01950c46SEmmanuel Vadot - compatible 50*01950c46SEmmanuel Vadot - reg 51*01950c46SEmmanuel Vadot - interrupts 52*01950c46SEmmanuel Vadot - interrupt-controller 53*01950c46SEmmanuel Vadot - "#interrupt-cells" 54*01950c46SEmmanuel Vadot - gpio-controller 55*01950c46SEmmanuel Vadot - "#gpio-cells" 56*01950c46SEmmanuel Vadot 57*01950c46SEmmanuel VadotallOf: 58*01950c46SEmmanuel Vadot - if: 59*01950c46SEmmanuel Vadot properties: 60*01950c46SEmmanuel Vadot compatible: 61*01950c46SEmmanuel Vadot contains: 62*01950c46SEmmanuel Vadot const: aspeed,ast2400-gpio 63*01950c46SEmmanuel Vadot then: 64*01950c46SEmmanuel Vadot properties: 65*01950c46SEmmanuel Vadot gpio-line-names: 66*01950c46SEmmanuel Vadot minItems: 220 67*01950c46SEmmanuel Vadot maxItems: 220 68*01950c46SEmmanuel Vadot ngpios: 69*01950c46SEmmanuel Vadot const: 220 70*01950c46SEmmanuel Vadot - if: 71*01950c46SEmmanuel Vadot properties: 72*01950c46SEmmanuel Vadot compatible: 73*01950c46SEmmanuel Vadot contains: 74*01950c46SEmmanuel Vadot const: aspeed,ast2500-gpio 75*01950c46SEmmanuel Vadot then: 76*01950c46SEmmanuel Vadot properties: 77*01950c46SEmmanuel Vadot gpio-line-names: 78*01950c46SEmmanuel Vadot minItems: 232 79*01950c46SEmmanuel Vadot maxItems: 232 80*01950c46SEmmanuel Vadot ngpios: 81*01950c46SEmmanuel Vadot const: 232 82*01950c46SEmmanuel Vadot - if: 83*01950c46SEmmanuel Vadot properties: 84*01950c46SEmmanuel Vadot compatible: 85*01950c46SEmmanuel Vadot contains: 86*01950c46SEmmanuel Vadot const: aspeed,ast2600-gpio 87*01950c46SEmmanuel Vadot then: 88*01950c46SEmmanuel Vadot properties: 89*01950c46SEmmanuel Vadot gpio-line-names: 90*01950c46SEmmanuel Vadot minItems: 36 91*01950c46SEmmanuel Vadot maxItems: 208 92*01950c46SEmmanuel Vadot ngpios: 93*01950c46SEmmanuel Vadot enum: [ 36, 208 ] 94*01950c46SEmmanuel Vadot required: 95*01950c46SEmmanuel Vadot - ngpios 96*01950c46SEmmanuel Vadot 97*01950c46SEmmanuel VadotadditionalProperties: false 98*01950c46SEmmanuel Vadot 99*01950c46SEmmanuel Vadotexamples: 100*01950c46SEmmanuel Vadot - | 101*01950c46SEmmanuel Vadot gpio@1e780000 { 102*01950c46SEmmanuel Vadot compatible = "aspeed,ast2400-gpio"; 103*01950c46SEmmanuel Vadot reg = <0x1e780000 0x1000>; 104*01950c46SEmmanuel Vadot interrupts = <20>; 105*01950c46SEmmanuel Vadot interrupt-controller; 106*01950c46SEmmanuel Vadot #interrupt-cells = <2>; 107*01950c46SEmmanuel Vadot gpio-controller; 108*01950c46SEmmanuel Vadot #gpio-cells = <2>; 109*01950c46SEmmanuel Vadot }; 110*01950c46SEmmanuel Vadot - | 111*01950c46SEmmanuel Vadot gpio: gpio@1e780000 { 112*01950c46SEmmanuel Vadot compatible = "aspeed,ast2500-gpio"; 113*01950c46SEmmanuel Vadot reg = <0x1e780000 0x200>; 114*01950c46SEmmanuel Vadot interrupts = <20>; 115*01950c46SEmmanuel Vadot interrupt-controller; 116*01950c46SEmmanuel Vadot #interrupt-cells = <2>; 117*01950c46SEmmanuel Vadot gpio-controller; 118*01950c46SEmmanuel Vadot #gpio-cells = <2>; 119*01950c46SEmmanuel Vadot gpio-ranges = <&pinctrl 0 0 232>; 120*01950c46SEmmanuel Vadot }; 121*01950c46SEmmanuel Vadot - | 122*01950c46SEmmanuel Vadot #include <dt-bindings/clock/ast2600-clock.h> 123*01950c46SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 124*01950c46SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 125*01950c46SEmmanuel Vadot gpio0: gpio@1e780000 { 126*01950c46SEmmanuel Vadot compatible = "aspeed,ast2600-gpio"; 127*01950c46SEmmanuel Vadot reg = <0x1e780000 0x400>; 128*01950c46SEmmanuel Vadot clocks = <&syscon ASPEED_CLK_APB2>; 129*01950c46SEmmanuel Vadot interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; 130*01950c46SEmmanuel Vadot interrupt-controller; 131*01950c46SEmmanuel Vadot #interrupt-cells = <2>; 132*01950c46SEmmanuel Vadot #gpio-cells = <2>; 133*01950c46SEmmanuel Vadot gpio-controller; 134*01950c46SEmmanuel Vadot gpio-ranges = <&pinctrl 0 0 208>; 135*01950c46SEmmanuel Vadot ngpios = <208>; 136*01950c46SEmmanuel Vadot }; 137*01950c46SEmmanuel Vadot gpio1: gpio@1e780800 { 138*01950c46SEmmanuel Vadot compatible = "aspeed,ast2600-gpio"; 139*01950c46SEmmanuel Vadot reg = <0x1e780800 0x800>; 140*01950c46SEmmanuel Vadot clocks = <&syscon ASPEED_CLK_APB1>; 141*01950c46SEmmanuel Vadot interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; 142*01950c46SEmmanuel Vadot interrupt-controller; 143*01950c46SEmmanuel Vadot #interrupt-cells = <2>; 144*01950c46SEmmanuel Vadot gpio-controller; 145*01950c46SEmmanuel Vadot #gpio-cells = <2>; 146*01950c46SEmmanuel Vadot gpio-ranges = <&pinctrl 0 208 36>; 147*01950c46SEmmanuel Vadot ngpios = <36>; 148*01950c46SEmmanuel Vadot }; 149