159184e12SChunyan Zhang# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 259184e12SChunyan Zhang# Copyright 2022 Unisoc Inc. 359184e12SChunyan Zhang%YAML 1.2 459184e12SChunyan Zhang--- 559184e12SChunyan Zhang$id: http://devicetree.org/schemas/gpio/sprd,gpio.yaml# 659184e12SChunyan Zhang$schema: http://devicetree.org/meta-schemas/core.yaml# 759184e12SChunyan Zhang 859184e12SChunyan Zhangtitle: Unisoc GPIO controller 959184e12SChunyan Zhang 1059184e12SChunyan Zhangmaintainers: 1159184e12SChunyan Zhang - Orson Zhai <orsonzhai@gmail.com> 1259184e12SChunyan Zhang - Baolin Wang <baolin.wang7@gmail.com> 1359184e12SChunyan Zhang - Chunyan Zhang <zhang.lyra@gmail.com> 1459184e12SChunyan Zhang 1559184e12SChunyan Zhangdescription: | 1659184e12SChunyan Zhang The controller's registers are organized as sets of sixteen 16-bit 1759184e12SChunyan Zhang registers with each set controlling a bank of up to 16 pins. A single 1859184e12SChunyan Zhang interrupt is shared for all of the banks handled by the controller. 1959184e12SChunyan Zhang 2059184e12SChunyan Zhangproperties: 2159184e12SChunyan Zhang compatible: 22*3c0c7b1dSChunyan Zhang oneOf: 23*3c0c7b1dSChunyan Zhang - const: sprd,sc9860-gpio 24*3c0c7b1dSChunyan Zhang - items: 25*3c0c7b1dSChunyan Zhang - enum: 26*3c0c7b1dSChunyan Zhang - sprd,ums512-gpio 27*3c0c7b1dSChunyan Zhang - const: sprd,sc9860-gpio 2859184e12SChunyan Zhang 2959184e12SChunyan Zhang reg: 3059184e12SChunyan Zhang maxItems: 1 3159184e12SChunyan Zhang 3259184e12SChunyan Zhang gpio-controller: true 3359184e12SChunyan Zhang 3459184e12SChunyan Zhang "#gpio-cells": 3559184e12SChunyan Zhang const: 2 3659184e12SChunyan Zhang 3759184e12SChunyan Zhang interrupt-controller: true 3859184e12SChunyan Zhang 3959184e12SChunyan Zhang "#interrupt-cells": 4059184e12SChunyan Zhang const: 2 4159184e12SChunyan Zhang 4259184e12SChunyan Zhang interrupts: 4359184e12SChunyan Zhang maxItems: 1 4459184e12SChunyan Zhang description: The interrupt shared by all GPIO lines for this controller. 4559184e12SChunyan Zhang 4659184e12SChunyan Zhangrequired: 4759184e12SChunyan Zhang - compatible 4859184e12SChunyan Zhang - reg 4959184e12SChunyan Zhang - gpio-controller 5059184e12SChunyan Zhang - "#gpio-cells" 5159184e12SChunyan Zhang - interrupt-controller 5259184e12SChunyan Zhang - "#interrupt-cells" 5359184e12SChunyan Zhang - interrupts 5459184e12SChunyan Zhang 5559184e12SChunyan ZhangadditionalProperties: false 5659184e12SChunyan Zhang 5759184e12SChunyan Zhangexamples: 5859184e12SChunyan Zhang - | 5959184e12SChunyan Zhang #include <dt-bindings/interrupt-controller/arm-gic.h> 6059184e12SChunyan Zhang 6159184e12SChunyan Zhang soc { 6259184e12SChunyan Zhang #address-cells = <2>; 6359184e12SChunyan Zhang #size-cells = <2>; 6459184e12SChunyan Zhang 6559184e12SChunyan Zhang ap_gpio: gpio@40280000 { 6659184e12SChunyan Zhang compatible = "sprd,sc9860-gpio"; 6759184e12SChunyan Zhang reg = <0 0x40280000 0 0x1000>; 6859184e12SChunyan Zhang gpio-controller; 6959184e12SChunyan Zhang #gpio-cells = <2>; 7059184e12SChunyan Zhang interrupt-controller; 7159184e12SChunyan Zhang #interrupt-cells = <2>; 7259184e12SChunyan Zhang interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; 7359184e12SChunyan Zhang }; 7459184e12SChunyan Zhang }; 7559184e12SChunyan Zhang... 76