2023-08-29 14:17:17

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH v5 0/2] gpio: loongson: add more gpio chip support

This patch was to add loongson 2k0500, 2k2000 and 3a5000 gpio chip
driver support.

Change in v5:
1. Use boolean initializer for lgpio->chip.can_sleep.
2. Remove the code that about io width gain from ngpios.
3. Fixup the ls7a-gpio and ls2k-gpio items in yaml file.
4. Add the reviewed-by information for dt-bindings patch.
5. Add some comments in loongson_gpio_to_irq.
Change in v4:
1. Reword the title and commit log information.
2. Remove the offset parse in DT and add it in of_device_id and
acpi_device_id's data field.
3. Add more gpio chip dt-bindings support in yaml file.
Change in v3:
1. Reword the dt-bindings patch commit log information.
2. Add "loongson,ls2k1000-gpio" compatible.
Change in v2:
1. Reword the patch commit log information.
2. Add some GPIO register offset description in yaml.

Yinbo Zhu (2):
gpio: dt-bindings: add more loongson gpio chip support
gpio: loongson: add more gpio chip support

.../bindings/gpio/loongson,ls-gpio.yaml | 21 ++-
drivers/gpio/gpio-loongson-64bit.c | 125 ++++++++++++++++--
2 files changed, 130 insertions(+), 16 deletions(-)

--
2.20.1



2023-08-29 18:19:37

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH v5 1/2] gpio: dt-bindings: add more loongson gpio chip support

This patch was to add loongson 2k0500, 2k2000 and 3a5000 gpio chip
dt-bindings support in yaml file.

Signed-off-by: Yinbo Zhu <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Reviewed-by: Conor Dooley <[email protected]>
---
.../bindings/gpio/loongson,ls-gpio.yaml | 21 +++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml b/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml
index fb86e8ce6349..cf3b1b270aa8 100644
--- a/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml
@@ -11,9 +11,22 @@ maintainers:

properties:
compatible:
- enum:
- - loongson,ls2k-gpio
- - loongson,ls7a-gpio
+ oneOf:
+ - enum:
+ - loongson,ls2k-gpio
+ - loongson,ls2k0500-gpio0
+ - loongson,ls2k0500-gpio1
+ - loongson,ls2k2000-gpio0
+ - loongson,ls2k2000-gpio1
+ - loongson,ls2k2000-gpio2
+ - loongson,ls3a5000-gpio
+ - loongson,ls7a-gpio
+ - items:
+ - const: loongson,ls2k1000-gpio
+ - const: loongson,ls2k-gpio
+ - items:
+ - const: loongson,ls7a1000-gpio
+ - const: loongson,ls7a-gpio

reg:
maxItems: 1
@@ -49,7 +62,7 @@ examples:
#include <dt-bindings/interrupt-controller/irq.h>

gpio0: gpio@1fe00500 {
- compatible = "loongson,ls2k-gpio";
+ compatible = "loongson,ls2k1000-gpio", "loongson,ls2k-gpio";
reg = <0x1fe00500 0x38>;
ngpios = <64>;
#gpio-cells = <2>;
--
2.20.1