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 12c66ec88fSEmmanuel Vadot GPIO-controller properties as desribed 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*6be33864SEmmanuel Vadot ngpios: 65*6be33864SEmmanuel Vadot default: 32 66*6be33864SEmmanuel Vadot minimum: 1 67*6be33864SEmmanuel Vadot maximum: 32 68*6be33864SEmmanuel Vadot 69c66ec88fSEmmanuel Vadot snps,nr-gpios: 70c66ec88fSEmmanuel Vadot description: The number of GPIO pins exported by the port. 71*6be33864SEmmanuel Vadot deprecated: true 72c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 73c66ec88fSEmmanuel Vadot default: 32 74c66ec88fSEmmanuel Vadot minimum: 1 75c66ec88fSEmmanuel Vadot maximum: 32 76c66ec88fSEmmanuel Vadot 77c66ec88fSEmmanuel Vadot interrupts: 78c66ec88fSEmmanuel Vadot description: | 79c66ec88fSEmmanuel Vadot The interrupts to the parent controller raised when GPIOs generate 80c66ec88fSEmmanuel Vadot the interrupts. If the controller provides one combined interrupt 81c66ec88fSEmmanuel Vadot for all GPIOs, specify a single interrupt. If the controller provides 82c66ec88fSEmmanuel Vadot one interrupt for each GPIO, provide a list of interrupts that 83c66ec88fSEmmanuel Vadot correspond to each of the GPIO pins. 84c66ec88fSEmmanuel Vadot minItems: 1 85c66ec88fSEmmanuel Vadot maxItems: 32 86c66ec88fSEmmanuel Vadot 87c66ec88fSEmmanuel Vadot interrupt-controller: true 88c66ec88fSEmmanuel Vadot 89c66ec88fSEmmanuel Vadot '#interrupt-cells': 90c66ec88fSEmmanuel Vadot const: 2 91c66ec88fSEmmanuel Vadot 92c66ec88fSEmmanuel Vadot required: 93c66ec88fSEmmanuel Vadot - compatible 94c66ec88fSEmmanuel Vadot - reg 95c66ec88fSEmmanuel Vadot - gpio-controller 96c66ec88fSEmmanuel Vadot - '#gpio-cells' 97c66ec88fSEmmanuel Vadot 98c66ec88fSEmmanuel Vadot dependencies: 99c66ec88fSEmmanuel Vadot interrupt-controller: [ interrupts ] 100c66ec88fSEmmanuel Vadot 101c66ec88fSEmmanuel Vadot additionalProperties: false 102c66ec88fSEmmanuel Vadot 103c66ec88fSEmmanuel VadotadditionalProperties: false 104c66ec88fSEmmanuel Vadot 105c66ec88fSEmmanuel Vadotrequired: 106c66ec88fSEmmanuel Vadot - compatible 107c66ec88fSEmmanuel Vadot - reg 108c66ec88fSEmmanuel Vadot - "#address-cells" 109c66ec88fSEmmanuel Vadot - "#size-cells" 110c66ec88fSEmmanuel Vadot 111c66ec88fSEmmanuel Vadotexamples: 112c66ec88fSEmmanuel Vadot - | 113c66ec88fSEmmanuel Vadot gpio: gpio@20000 { 114c66ec88fSEmmanuel Vadot compatible = "snps,dw-apb-gpio"; 115c66ec88fSEmmanuel Vadot reg = <0x20000 0x1000>; 116c66ec88fSEmmanuel Vadot #address-cells = <1>; 117c66ec88fSEmmanuel Vadot #size-cells = <0>; 118c66ec88fSEmmanuel Vadot 119c66ec88fSEmmanuel Vadot porta: gpio-port@0 { 120c66ec88fSEmmanuel Vadot compatible = "snps,dw-apb-gpio-port"; 121c66ec88fSEmmanuel Vadot reg = <0>; 122c66ec88fSEmmanuel Vadot gpio-controller; 123c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 124c66ec88fSEmmanuel Vadot snps,nr-gpios = <8>; 125c66ec88fSEmmanuel Vadot interrupt-controller; 126c66ec88fSEmmanuel Vadot #interrupt-cells = <2>; 127c66ec88fSEmmanuel Vadot interrupt-parent = <&vic1>; 128c66ec88fSEmmanuel Vadot interrupts = <0>; 129c66ec88fSEmmanuel Vadot }; 130c66ec88fSEmmanuel Vadot 131c66ec88fSEmmanuel Vadot portb: gpio-port@1 { 132c66ec88fSEmmanuel Vadot compatible = "snps,dw-apb-gpio-port"; 133c66ec88fSEmmanuel Vadot reg = <1>; 134c66ec88fSEmmanuel Vadot gpio-controller; 135c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 136c66ec88fSEmmanuel Vadot snps,nr-gpios = <8>; 137c66ec88fSEmmanuel Vadot }; 138c66ec88fSEmmanuel Vadot }; 139c66ec88fSEmmanuel Vadot... 140