1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/snps,dw-apb-gpio.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: Synopsys DesignWare APB GPIO controller 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotdescription: | 10c66ec88fSEmmanuel Vadot Synopsys DesignWare GPIO controllers have a configurable number of ports, 11c66ec88fSEmmanuel Vadot each of which are intended to be represented as child nodes with the generic 12*aa1a8ff2SEmmanuel Vadot GPIO-controller properties as described in this bindings file. 13c66ec88fSEmmanuel Vadot 14c66ec88fSEmmanuel Vadotmaintainers: 15c66ec88fSEmmanuel Vadot - Hoan Tran <hoan@os.amperecomputing.com> 16c66ec88fSEmmanuel Vadot - Serge Semin <fancer.lancer@gmail.com> 17c66ec88fSEmmanuel Vadot 18c66ec88fSEmmanuel Vadotproperties: 19c66ec88fSEmmanuel Vadot $nodename: 20c66ec88fSEmmanuel Vadot pattern: "^gpio@[0-9a-f]+$" 21c66ec88fSEmmanuel Vadot 22c66ec88fSEmmanuel Vadot compatible: 23c66ec88fSEmmanuel Vadot const: snps,dw-apb-gpio 24c66ec88fSEmmanuel Vadot 25c66ec88fSEmmanuel Vadot "#address-cells": 26c66ec88fSEmmanuel Vadot const: 1 27c66ec88fSEmmanuel Vadot 28c66ec88fSEmmanuel Vadot "#size-cells": 29c66ec88fSEmmanuel Vadot const: 0 30c66ec88fSEmmanuel Vadot 31c66ec88fSEmmanuel Vadot reg: 32c66ec88fSEmmanuel Vadot maxItems: 1 33c66ec88fSEmmanuel Vadot 34c66ec88fSEmmanuel Vadot clocks: 35c66ec88fSEmmanuel Vadot minItems: 1 36c66ec88fSEmmanuel Vadot items: 37c66ec88fSEmmanuel Vadot - description: APB interface clock source 38c66ec88fSEmmanuel Vadot - description: DW GPIO debounce reference clock source 39c66ec88fSEmmanuel Vadot 40c66ec88fSEmmanuel Vadot clock-names: 41c66ec88fSEmmanuel Vadot minItems: 1 42c66ec88fSEmmanuel Vadot items: 43c66ec88fSEmmanuel Vadot - const: bus 44c66ec88fSEmmanuel Vadot - const: db 45c66ec88fSEmmanuel Vadot 46c66ec88fSEmmanuel Vadot resets: 47c66ec88fSEmmanuel Vadot maxItems: 1 48c66ec88fSEmmanuel Vadot 49c66ec88fSEmmanuel VadotpatternProperties: 50c66ec88fSEmmanuel Vadot "^gpio-(port|controller)@[0-9a-f]+$": 51c66ec88fSEmmanuel Vadot type: object 52c66ec88fSEmmanuel Vadot properties: 53c66ec88fSEmmanuel Vadot compatible: 54c66ec88fSEmmanuel Vadot const: snps,dw-apb-gpio-port 55c66ec88fSEmmanuel Vadot 56c66ec88fSEmmanuel Vadot reg: 57c66ec88fSEmmanuel Vadot maxItems: 1 58c66ec88fSEmmanuel Vadot 59c66ec88fSEmmanuel Vadot gpio-controller: true 60c66ec88fSEmmanuel Vadot 61c66ec88fSEmmanuel Vadot '#gpio-cells': 62c66ec88fSEmmanuel Vadot const: 2 63c66ec88fSEmmanuel Vadot 64*aa1a8ff2SEmmanuel Vadot gpio-line-names: 65*aa1a8ff2SEmmanuel Vadot minItems: 1 66*aa1a8ff2SEmmanuel Vadot maxItems: 32 67*aa1a8ff2SEmmanuel Vadot 686be33864SEmmanuel Vadot ngpios: 696be33864SEmmanuel Vadot default: 32 706be33864SEmmanuel Vadot minimum: 1 716be33864SEmmanuel Vadot maximum: 32 726be33864SEmmanuel Vadot 73c66ec88fSEmmanuel Vadot snps,nr-gpios: 74c66ec88fSEmmanuel Vadot description: The number of GPIO pins exported by the port. 756be33864SEmmanuel Vadot deprecated: true 76c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 77c66ec88fSEmmanuel Vadot default: 32 78c66ec88fSEmmanuel Vadot minimum: 1 79c66ec88fSEmmanuel Vadot maximum: 32 80c66ec88fSEmmanuel Vadot 81c66ec88fSEmmanuel Vadot interrupts: 82c66ec88fSEmmanuel Vadot description: | 83c66ec88fSEmmanuel Vadot The interrupts to the parent controller raised when GPIOs generate 84c66ec88fSEmmanuel Vadot the interrupts. If the controller provides one combined interrupt 85c66ec88fSEmmanuel Vadot for all GPIOs, specify a single interrupt. If the controller provides 86c66ec88fSEmmanuel Vadot one interrupt for each GPIO, provide a list of interrupts that 87c66ec88fSEmmanuel Vadot correspond to each of the GPIO pins. 88c66ec88fSEmmanuel Vadot minItems: 1 89c66ec88fSEmmanuel Vadot maxItems: 32 90c66ec88fSEmmanuel Vadot 91c66ec88fSEmmanuel Vadot interrupt-controller: true 92c66ec88fSEmmanuel Vadot 93c66ec88fSEmmanuel Vadot '#interrupt-cells': 94c66ec88fSEmmanuel Vadot const: 2 95c66ec88fSEmmanuel Vadot 96c66ec88fSEmmanuel Vadot required: 97c66ec88fSEmmanuel Vadot - compatible 98c66ec88fSEmmanuel Vadot - reg 99c66ec88fSEmmanuel Vadot - gpio-controller 100c66ec88fSEmmanuel Vadot - '#gpio-cells' 101c66ec88fSEmmanuel Vadot 102c66ec88fSEmmanuel Vadot dependencies: 103c66ec88fSEmmanuel Vadot interrupt-controller: [ interrupts ] 104c66ec88fSEmmanuel Vadot 105c66ec88fSEmmanuel Vadot additionalProperties: false 106c66ec88fSEmmanuel Vadot 107c66ec88fSEmmanuel VadotadditionalProperties: false 108c66ec88fSEmmanuel Vadot 109c66ec88fSEmmanuel Vadotrequired: 110c66ec88fSEmmanuel Vadot - compatible 111c66ec88fSEmmanuel Vadot - reg 112c66ec88fSEmmanuel Vadot - "#address-cells" 113c66ec88fSEmmanuel Vadot - "#size-cells" 114c66ec88fSEmmanuel Vadot 115c66ec88fSEmmanuel Vadotexamples: 116c66ec88fSEmmanuel Vadot - | 117c66ec88fSEmmanuel Vadot gpio: gpio@20000 { 118c66ec88fSEmmanuel Vadot compatible = "snps,dw-apb-gpio"; 119c66ec88fSEmmanuel Vadot reg = <0x20000 0x1000>; 120c66ec88fSEmmanuel Vadot #address-cells = <1>; 121c66ec88fSEmmanuel Vadot #size-cells = <0>; 122c66ec88fSEmmanuel Vadot 123c66ec88fSEmmanuel Vadot porta: gpio-port@0 { 124c66ec88fSEmmanuel Vadot compatible = "snps,dw-apb-gpio-port"; 125c66ec88fSEmmanuel Vadot reg = <0>; 126c66ec88fSEmmanuel Vadot gpio-controller; 127c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 128c66ec88fSEmmanuel Vadot snps,nr-gpios = <8>; 129c66ec88fSEmmanuel Vadot interrupt-controller; 130c66ec88fSEmmanuel Vadot #interrupt-cells = <2>; 131c66ec88fSEmmanuel Vadot interrupt-parent = <&vic1>; 132c66ec88fSEmmanuel Vadot interrupts = <0>; 133c66ec88fSEmmanuel Vadot }; 134c66ec88fSEmmanuel Vadot 135c66ec88fSEmmanuel Vadot portb: gpio-port@1 { 136c66ec88fSEmmanuel Vadot compatible = "snps,dw-apb-gpio-port"; 137c66ec88fSEmmanuel Vadot reg = <1>; 138c66ec88fSEmmanuel Vadot gpio-controller; 139c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 140c66ec88fSEmmanuel Vadot snps,nr-gpios = <8>; 141c66ec88fSEmmanuel Vadot }; 142c66ec88fSEmmanuel Vadot }; 143c66ec88fSEmmanuel Vadot... 144