[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230302081711.27334-1-zhuyinbo@loongson.cn>
Date: Thu, 2 Mar 2023 16:17:10 +0800
From: Yinbo Zhu <zhuyinbo@...ngson.cn>
To: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
linux-gpio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org (open list),
Yinbo Zhu <zhuyinbo@...ngson.cn>
Cc: Jianmin Lv <lvjianmin@...ngson.cn>,
Liu Peibao <liupeibao@...ngson.cn>, wanghongliang@...ngson.cn,
loongson-kernel@...ts.loongnix.cn,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: [PATCH v12 1/2] dt-bindings: gpio: add loongson gpio
Add the Loongson platform gpio binding with DT schema format using
json-schema.
Signed-off-by: Yinbo Zhu <zhuyinbo@...ngson.cn>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
---
Change in v12:
1. NO change, but other patch in this series of patches set has
change.
Change in v11:
1. Place this patch in fron of driver patch.
Change in v10:
1. NO change, but other patch in this series of patches set has
change.
Change in v9:
1. NO change, but other patch in this series of patches set has
change.
Change in v8:
1. NO change, but other patch in this series of patches set has
change.
Change in v7:
1. NO change, but other patch in this series of patches set has
change.
Change in v6:
1. NO change, but other patch in this series of patches set has
change.
Change in v5:
1. NO change, but other patch in this series of patches set has
change.
Change in v4:
1. Remove the string "series".
2. Add the reviewed-by information.
Change in v3:
1. Separate some changes of MAINTAINERS file and enter the first patch.
Change in v2:
1. Drop "loongson,gpio_base" and "gpio-ranges" will cover it.
1. Drop "loongson,conf_offset", "loongson,out_offset", "loongson,in_offset",
"loongson,support_irq" and kernel driver will initial them that depend
compatible in kernel.
3. Fixup maintainer for this driver.
.../bindings/gpio/loongson,ls-gpio.yaml | 126 ++++++++++++++++++
MAINTAINERS | 6 +
2 files changed, 132 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml
diff --git a/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml b/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml
new file mode 100644
index 000000000000..fb86e8ce6349
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml
@@ -0,0 +1,126 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/loongson,ls-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Loongson GPIO controller.
+
+maintainers:
+ - Yinbo Zhu <zhuyinbo@...ngson.cn>
+
+properties:
+ compatible:
+ enum:
+ - loongson,ls2k-gpio
+ - loongson,ls7a-gpio
+
+ reg:
+ maxItems: 1
+
+ ngpios:
+ minimum: 1
+ maximum: 64
+
+ "#gpio-cells":
+ const: 2
+
+ gpio-controller: true
+
+ gpio-ranges: true
+
+ interrupts:
+ minItems: 1
+ maxItems: 64
+
+required:
+ - compatible
+ - reg
+ - ngpios
+ - "#gpio-cells"
+ - gpio-controller
+ - gpio-ranges
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ gpio0: gpio@...00500 {
+ compatible = "loongson,ls2k-gpio";
+ reg = <0x1fe00500 0x38>;
+ ngpios = <64>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ gpio-ranges = <&pctrl 0 0 15>,
+ <&pctrl 16 16 15>,
+ <&pctrl 32 32 10>,
+ <&pctrl 44 44 20>;
+ interrupt-parent = <&liointc1>;
+ interrupts = <28 IRQ_TYPE_LEVEL_LOW>,
+ <29 IRQ_TYPE_LEVEL_LOW>,
+ <30 IRQ_TYPE_LEVEL_LOW>,
+ <30 IRQ_TYPE_LEVEL_LOW>,
+ <26 IRQ_TYPE_LEVEL_LOW>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
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>,
+ <27 IRQ_TYPE_LEVEL_LOW>;
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 57d1d6ecb33d..b54b36187e75 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12086,6 +12086,12 @@ S: Maintained
F: Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml
F: drivers/pinctrl/pinctrl-loongson2.c
+LOONGSON GPIO DRIVER
+M: Yinbo Zhu <zhuyinbo@...ngson.cn>
+L: linux-gpio@...r.kernel.org
+S: Maintained
+F: Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml
+
LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
M: Sathya Prakash <sathya.prakash@...adcom.com>
M: Sreekanth Reddy <sreekanth.reddy@...adcom.com>
--
2.31.1
Powered by blists - more mailing lists