mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 22:05:24 -04:00
dt-bindings: gpio: Convert Unisoc GPIO controller binding to yaml
Convert the Unisoc gpio controller binding to DT schema format. Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
committed by
Bartosz Golaszewski
parent
83b9e0fc9e
commit
59184e1273
@@ -1,28 +0,0 @@
|
||||
Spreadtrum GPIO controller bindings
|
||||
|
||||
The controller's registers are organized as sets of sixteen 16-bit
|
||||
registers with each set controlling a bank of up to 16 pins. A single
|
||||
interrupt is shared for all of the banks handled by the controller.
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "sprd,sc9860-gpio".
|
||||
- reg: Define the base and range of the I/O address space containing
|
||||
the GPIO controller registers.
|
||||
- gpio-controller: Marks the device node as a GPIO controller.
|
||||
- #gpio-cells: Should be <2>. The first cell is the gpio number and
|
||||
the second cell is used to specify optional parameters.
|
||||
- interrupt-controller: Marks the device node as an interrupt controller.
|
||||
- #interrupt-cells: Should be <2>. Specifies the number of cells needed
|
||||
to encode interrupt source.
|
||||
- interrupts: Should be the port interrupt shared by all the gpios.
|
||||
|
||||
Example:
|
||||
ap_gpio: gpio@40280000 {
|
||||
compatible = "sprd,sc9860-gpio";
|
||||
reg = <0 0x40280000 0 0x1000>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
70
Documentation/devicetree/bindings/gpio/sprd,gpio.yaml
Normal file
70
Documentation/devicetree/bindings/gpio/sprd,gpio.yaml
Normal file
@@ -0,0 +1,70 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
# Copyright 2022 Unisoc Inc.
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/gpio/sprd,gpio.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Unisoc GPIO controller
|
||||
|
||||
maintainers:
|
||||
- Orson Zhai <orsonzhai@gmail.com>
|
||||
- Baolin Wang <baolin.wang7@gmail.com>
|
||||
- Chunyan Zhang <zhang.lyra@gmail.com>
|
||||
|
||||
description: |
|
||||
The controller's registers are organized as sets of sixteen 16-bit
|
||||
registers with each set controlling a bank of up to 16 pins. A single
|
||||
interrupt is shared for all of the banks handled by the controller.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: sprd,sc9860-gpio
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
gpio-controller: true
|
||||
|
||||
"#gpio-cells":
|
||||
const: 2
|
||||
|
||||
interrupt-controller: true
|
||||
|
||||
"#interrupt-cells":
|
||||
const: 2
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
description: The interrupt shared by all GPIO lines for this controller.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- gpio-controller
|
||||
- "#gpio-cells"
|
||||
- interrupt-controller
|
||||
- "#interrupt-cells"
|
||||
- interrupts
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
soc {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
ap_gpio: gpio@40280000 {
|
||||
compatible = "sprd,sc9860-gpio";
|
||||
reg = <0 0x40280000 0 0x1000>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
...
|
||||
Reference in New Issue
Block a user