linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add support for Blaize BLZP1600 GPIO driver
@ 2025-03-27 11:27 Nikolaos Pasaloukos
  2025-03-27 11:27 ` [PATCH v2 1/3] dt-bindings: Document " Nikolaos Pasaloukos
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Nikolaos Pasaloukos @ 2025-03-27 11:27 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, James Cowgill,
	Matt Redfearn, Neil Jones, Linus Walleij, Bartosz Golaszewski,
	Matt Redfearn, Catalin Marinas, Will Deacon
  Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Nikolaos Pasaloukos

This patchset adds a GPIO driver for the VeriSilicon APB v0.2
hardware. This controller is used in the Blaize BLZP1600
SoC for its GPIO interface. It is essential for upstream
support since it is used to provide signals for the
Ethernet, USB, SD and many other interfaces.

Adds the GPIO interface to the Blaize BLZP1600 SoC devicetree.

The hardware itself consists of 32 I/O pins. It has
programmable interrupt generation capability on the pins.
The interrupts can be edge or level triggered and it
includes a de-bounce circuit.

Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
---
Changes in v2:
- No longer adds VeriSilicon as a vendor.
- Renamed the driver from vsi,apb-gpio to blaize,blzp1600-gpio
  Changed the driver function prefix to address the new name
  Removed IRQ_DOMAIN_HIERARCHY from Kconfig
- Builds the driver as a module by default
- Link to v1: https://lore.kernel.org/r/20250212-kernel-upstreaming-add_gpio_support-v1-0-080e724a21f3@blaize.com

---
Nikolaos Pasaloukos (3):
      dt-bindings: Document Blaize BLZP1600 GPIO driver
      gpio: Enable Blaize BLZP1600 GPIO support
      arm64: dts: blaize-blzp1600: Enable GPIO support

 .../bindings/gpio/blaize,blzp1600-gpio.yaml        |  77 ++++++
 MAINTAINERS                                        |  10 +
 arch/arm64/boot/dts/blaize/blaize-blzp1600-cb2.dts |  36 +++
 arch/arm64/boot/dts/blaize/blaize-blzp1600.dtsi    |  12 +
 drivers/gpio/Kconfig                               |  11 +
 drivers/gpio/Makefile                              |   1 +
 drivers/gpio/gpio-blzp1600.c                       | 283 +++++++++++++++++++++
 7 files changed, 430 insertions(+)
---
base-commit: fe2280d094f95105a361dc88e07b1009d4cfeca6
change-id: 20250117-kernel-upstreaming-add_gpio_support-b4ce05eff7a5

Best regards,
-- 
Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/3] dt-bindings: Document Blaize BLZP1600 GPIO driver
  2025-03-27 11:27 [PATCH v2 0/3] Add support for Blaize BLZP1600 GPIO driver Nikolaos Pasaloukos
@ 2025-03-27 11:27 ` Nikolaos Pasaloukos
  2025-03-27 16:52   ` Conor Dooley
  2025-03-28 10:01   ` Neil Jones
  2025-03-27 11:27 ` [PATCH v2 2/3] gpio: Enable Blaize BLZP1600 GPIO support Nikolaos Pasaloukos
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 9+ messages in thread
From: Nikolaos Pasaloukos @ 2025-03-27 11:27 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, James Cowgill,
	Matt Redfearn, Neil Jones, Linus Walleij, Bartosz Golaszewski,
	Matt Redfearn, Catalin Marinas, Will Deacon
  Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Nikolaos Pasaloukos

This is a custom silicon GPIO driver provided by VeriSilicon
Microelectronics. It has 32 input/output ports which can be
configured as edge or level triggered interrupts. It also provides
a de-bounce feature.
This controller is used on the Blaize BLZP1600 SoC.

Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
---
 .../bindings/gpio/blaize,blzp1600-gpio.yaml        | 77 ++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml b/Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..8b7842331a22b7b9fbfa42b9c711da99227de2e4
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/blaize,blzp1600-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Blaize BLZP1600 GPIO controller
+
+description:
+  Blaize BLZP1600 GPIO controller is a design of VeriSilicon APB GPIO v0.2
+  IP block. It has 32 ports each of which are intended to be represented
+  as child noeds with the generic GPIO-controller properties as described
+  in this binding's file.
+
+maintainers:
+  - Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
+  - James Cowgill <james.cowgill@blaize.com>
+  - Matt Redfearn <matt.redfearn@blaize.com>
+  - Neil Jones <neil.jones@blaize.com>
+
+properties:
+  $nodename:
+    pattern: "^gpio@[0-9a-f]+$"
+
+  compatible:
+    enum:
+      - blaize,blzp1600-gpio
+
+  reg:
+    maxItems: 1
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+
+  ngpios:
+    default: 32
+    minimum: 1
+    maximum: 32
+
+  interrupts:
+    maxItems: 1
+
+  gpio-line-names: true
+
+  interrupt-controller: true
+
+  '#interrupt-cells':
+    const: 2
+
+required:
+  - compatible
+  - reg
+  - gpio-controller
+  - '#gpio-cells'
+
+dependencies:
+  interrupt-controller: [ interrupts ]
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    gpio: gpio@4c0000 {
+      compatible = "blaize,blzp1600-gpio";
+      reg = <0x004c0000 0x1000>;
+      gpio-controller;
+      #gpio-cells = <2>;
+      ngpios = <32>;
+      interrupt-controller;
+      #interrupt-cells = <2>;
+      interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+    };
+...

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 3/3] arm64: dts: blaize-blzp1600: Enable GPIO support
  2025-03-27 11:27 [PATCH v2 0/3] Add support for Blaize BLZP1600 GPIO driver Nikolaos Pasaloukos
  2025-03-27 11:27 ` [PATCH v2 1/3] dt-bindings: Document " Nikolaos Pasaloukos
  2025-03-27 11:27 ` [PATCH v2 2/3] gpio: Enable Blaize BLZP1600 GPIO support Nikolaos Pasaloukos
@ 2025-03-27 11:27 ` Nikolaos Pasaloukos
  2025-04-24 13:55   ` Nikolaos Pasaloukos
  2025-04-07 12:02 ` (subset) [PATCH v2 0/3] Add support for Blaize BLZP1600 GPIO driver Bartosz Golaszewski
  3 siblings, 1 reply; 9+ messages in thread
From: Nikolaos Pasaloukos @ 2025-03-27 11:27 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, James Cowgill,
	Matt Redfearn, Neil Jones, Linus Walleij, Bartosz Golaszewski,
	Matt Redfearn, Catalin Marinas, Will Deacon
  Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Nikolaos Pasaloukos

Blaize BLZP1600 uses the custom silicon provided from
VeriSilicon to add GPIO support.
This interface is used to control signals on many other
peripherals, such as Ethernet, USB, SD and eMMC.

Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
---
 arch/arm64/boot/dts/blaize/blaize-blzp1600-cb2.dts | 36 ++++++++++++++++++++++
 arch/arm64/boot/dts/blaize/blaize-blzp1600.dtsi    | 12 ++++++++
 2 files changed, 48 insertions(+)

diff --git a/arch/arm64/boot/dts/blaize/blaize-blzp1600-cb2.dts b/arch/arm64/boot/dts/blaize/blaize-blzp1600-cb2.dts
index 7e3cef2ed3522e202487e799b2021cd45398e006..fb5415eb347a028fc65090027a4c4fc89c8280f5 100644
--- a/arch/arm64/boot/dts/blaize/blaize-blzp1600-cb2.dts
+++ b/arch/arm64/boot/dts/blaize/blaize-blzp1600-cb2.dts
@@ -81,3 +81,39 @@ gpio_expander_m2: gpio@75 {
 				  "UART1_TO_RSP";	/* GPIO_15 */
 	};
 };
+
+&gpio0 {
+	status = "okay";
+	gpio-line-names = "PERST_N",		/* GPIO_0 */
+			  "LM96063_ALERT_N",	/* GPIO_1 */
+			  "INA3221_PV",		/* GPIO_2 */
+			  "INA3221_CRIT",	/* GPIO_3 */
+			  "INA3221_WARN",	/* GPIO_4 */
+			  "INA3221_TC",		/* GPIO_5 */
+			  "QSPI0_RST_N",	/* GPIO_6 */
+			  "LM96063_TCRIT_N",	/* GPIO_7 */
+			  "DSI_TCH_INT",	/* GPIO_8 */
+			  "DSI_RST",		/* GPIO_9 */
+			  "DSI_BL",		/* GPIO_10 */
+			  "DSI_INT",		/* GPIO_11 */
+			  "ETH_RST",		/* GPIO_12 */
+			  "CSI0_RST",		/* GPIO_13 */
+			  "CSI0_PWDN",		/* GPIO_14 */
+			  "CSI1_RST",		/* GPIO_15 */
+			  "CSI1_PWDN",		/* GPIO_16 */
+			  "CSI2_RST",		/* GPIO_17 */
+			  "CSI2_PWDN",		/* GPIO_18 */
+			  "CSI3_RST",		/* GPIO_19 */
+			  "CSI3_PWDN",		/* GPIO_20 */
+			  "ADAC_RST",		/* GPIO_21 */
+			  "SD_SW_VDD",		/* GPIO_22 */
+			  "SD_PON_VDD",		/* GPIO_23 */
+			  "GPIO_EXP_INT",	/* GPIO_24 */
+			  "BOARD_ID_0",		/* GPIO_25 */
+			  "SDIO1_SW_VDD",	/* GPIO_26 */
+			  "SDIO1_PON_VDD",	/* GPIO_27 */
+			  "SDIO2_SW_VDD",	/* GPIO_28 */
+			  "SDIO2_PON_VDD",	/* GPIO_29 */
+			  "BOARD_ID_1",		/* GPIO_30 */
+			  "BOARD_ID_2";		/* GPIO_31 */
+};
diff --git a/arch/arm64/boot/dts/blaize/blaize-blzp1600.dtsi b/arch/arm64/boot/dts/blaize/blaize-blzp1600.dtsi
index 7d399e6a532f5b24385dd837be965be771c7d24c..5a6c882b2f57d57d304869dee877c996cbabb712 100644
--- a/arch/arm64/boot/dts/blaize/blaize-blzp1600.dtsi
+++ b/arch/arm64/boot/dts/blaize/blaize-blzp1600.dtsi
@@ -120,6 +120,18 @@ gic: interrupt-controller@410000 {
 						 IRQ_TYPE_LEVEL_LOW)>;
 		};
 
+		gpio0: gpio@4c0000 {
+			compatible = "blaize,blzp1600-gpio";
+			reg = <0x4c0000 0x1000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			ngpios = <32>;
+			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+			status = "disabled";
+		};
+
 		uart0: serial@4d0000 {
 			compatible = "ns16550a";
 			reg = <0x4d0000 0x1000>;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/3] gpio: Enable Blaize BLZP1600 GPIO support
  2025-03-27 11:27 [PATCH v2 0/3] Add support for Blaize BLZP1600 GPIO driver Nikolaos Pasaloukos
  2025-03-27 11:27 ` [PATCH v2 1/3] dt-bindings: Document " Nikolaos Pasaloukos
@ 2025-03-27 11:27 ` Nikolaos Pasaloukos
  2025-03-27 11:27 ` [PATCH v2 3/3] arm64: dts: blaize-blzp1600: Enable " Nikolaos Pasaloukos
  2025-04-07 12:02 ` (subset) [PATCH v2 0/3] Add support for Blaize BLZP1600 GPIO driver Bartosz Golaszewski
  3 siblings, 0 replies; 9+ messages in thread
From: Nikolaos Pasaloukos @ 2025-03-27 11:27 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, James Cowgill,
	Matt Redfearn, Neil Jones, Linus Walleij, Bartosz Golaszewski,
	Matt Redfearn, Catalin Marinas, Will Deacon
  Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Nikolaos Pasaloukos

Blaize BLZP1600 GPIO controller is provided by VeriSilicon
Microelectronics based on the GPIO APB v0.2 design. It has 32
input/output ports which can be configured as edge or level
triggered interrupts. It also provides a de-bounce feature.
This controller is used on the Blaize BLZP1600 SoC.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
---
 MAINTAINERS                  |  10 ++
 drivers/gpio/Kconfig         |  11 ++
 drivers/gpio/Makefile        |   1 +
 drivers/gpio/gpio-blzp1600.c | 283 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 305 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index eb75c95f6c455516f7b1c8b3a39ddded5b38e0a9..7890586c9f1a6ff4afe368b91924038e2433939f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4104,6 +4104,16 @@ T:	git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.gi
 F:	include/net/bluetooth/
 F:	net/bluetooth/
 
+BLZP1600 GPIO DRIVER
+M:	James Cowgill <james.cowgill@blaize.com>
+M:	Matt Redfearn <matt.redfearn@blaize.com>
+M:	Neil Jones <neil.jones@blaize.com>
+M:	Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
+L:	linux-gpio@vger.kernel.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml
+F:	drivers/gpio/gpio-blzp1600.c
+
 BONDING DRIVER
 M:	Jay Vosburgh <jv@jvosburgh.net>
 L:	netdev@vger.kernel.org
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index add5ad29a673c09082a913cb2404073b2034af48..b893b071a8d2dc5df5e0cb15b1a41ad8e6cb2b23 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -213,6 +213,17 @@ config GPIO_BCM_XGS_IPROC
 	help
 	  Say yes here to enable GPIO support for Broadcom XGS iProc SoCs.
 
+config GPIO_BLZP1600
+	tristate "Blaize BLZP1600 GPIO support"
+	default y if ARCH_BLAIZE
+	depends on OF_GPIO
+	select GPIO_GENERIC
+	select GPIOLIB_IRQCHIP
+	help
+	  Say Y or M here to add support for the Blaize BLZP1600 GPIO device.
+	  The controller is based on the Verisilicon Microelectronics GPIO APB v0.2
+	  IP block.
+
 config GPIO_BRCMSTB
 	tristate "BRCMSTB GPIO support"
 	default y if (ARCH_BRCMSTB || BMIPS_GENERIC)
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index af3ba4d81b583842893ea69e677fbe2abf31bc7b..a04de399af619921fff74b93820899960d1fe97f 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -42,6 +42,7 @@ obj-$(CONFIG_GPIO_BCM_XGS_IPROC)	+= gpio-xgs-iproc.o
 obj-$(CONFIG_GPIO_BD71815)		+= gpio-bd71815.o
 obj-$(CONFIG_GPIO_BD71828)		+= gpio-bd71828.o
 obj-$(CONFIG_GPIO_BD9571MWV)		+= gpio-bd9571mwv.o
+obj-$(CONFIG_GPIO_BLZP1600)		+= gpio-blzp1600.o
 obj-$(CONFIG_GPIO_BRCMSTB)		+= gpio-brcmstb.o
 obj-$(CONFIG_GPIO_BT8XX)		+= gpio-bt8xx.o
 obj-$(CONFIG_GPIO_CADENCE)		+= gpio-cadence.o
diff --git a/drivers/gpio/gpio-blzp1600.c b/drivers/gpio/gpio-blzp1600.c
new file mode 100644
index 0000000000000000000000000000000000000000..77ad0e596f3ea838cfdd46918847d35b5d66fdf5
--- /dev/null
+++ b/drivers/gpio/gpio-blzp1600.c
@@ -0,0 +1,283 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2019 VeriSilicon Limited.
+ * Copyright (C) 2025 Blaize, Inc.
+ */
+
+#include <linux/errno.h>
+#include <linux/gpio/driver.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_irq.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+
+#define GPIO_DIR_REG	0x00
+#define GPIO_CTRL_REG	0x04
+#define GPIO_SET_REG	0x08
+#define GPIO_CLR_REG	0x0C
+#define GPIO_ODATA_REG	0x10
+#define GPIO_IDATA_REG	0x14
+#define GPIO_IEN_REG	0x18
+#define GPIO_IS_REG	0x1C
+#define GPIO_IBE_REG	0x20
+#define GPIO_IEV_REG	0x24
+#define GPIO_RIS_REG	0x28
+#define GPIO_IM_REG	0x2C
+#define GPIO_MIS_REG	0x30
+#define GPIO_IC_REG	0x34
+#define GPIO_DB_REG	0x38
+#define GPIO_DFG_REG	0x3C
+
+#define DRIVER_NAME "blzp1600-gpio"
+
+struct blzp1600_gpio {
+	void __iomem *base;
+	struct gpio_chip gc;
+	int irq;
+};
+
+static inline struct blzp1600_gpio *get_blzp1600_gpio_from_irq_data(struct irq_data *d)
+{
+	return gpiochip_get_data(irq_data_get_irq_chip_data(d));
+}
+
+static inline struct blzp1600_gpio *get_blzp1600_gpio_from_irq_desc(struct irq_desc *d)
+{
+	return gpiochip_get_data(irq_desc_get_handler_data(d));
+}
+
+static inline u32 blzp1600_gpio_read(struct blzp1600_gpio *chip, unsigned int offset)
+{
+	return readl_relaxed(chip->base + offset);
+}
+
+static inline void blzp1600_gpio_write(struct blzp1600_gpio *chip, unsigned int offset, u32 val)
+{
+	writel_relaxed(val, chip->base + offset);
+}
+
+static inline void blzp1600_gpio_rmw(void __iomem *reg, u32 mask, bool set)
+{
+	u32 val = readl_relaxed(reg);
+
+	if (set)
+		val |= mask;
+	else
+		val &= ~mask;
+
+	writel_relaxed(val, reg);
+}
+
+static void blzp1600_gpio_irq_mask(struct irq_data *d)
+{
+	struct blzp1600_gpio *chip = get_blzp1600_gpio_from_irq_data(d);
+
+	guard(raw_spinlock_irqsave)(&chip->gc.bgpio_lock);
+	blzp1600_gpio_rmw(chip->base + GPIO_IM_REG, BIT(d->hwirq), 1);
+}
+
+static void blzp1600_gpio_irq_unmask(struct irq_data *d)
+{
+	struct blzp1600_gpio *chip = get_blzp1600_gpio_from_irq_data(d);
+
+	guard(raw_spinlock_irqsave)(&chip->gc.bgpio_lock);
+	blzp1600_gpio_rmw(chip->base + GPIO_IM_REG, BIT(d->hwirq), 0);
+}
+
+static void blzp1600_gpio_irq_ack(struct irq_data *d)
+{
+	struct blzp1600_gpio *chip = get_blzp1600_gpio_from_irq_data(d);
+
+	blzp1600_gpio_write(chip, GPIO_IC_REG, BIT(d->hwirq));
+}
+
+static void blzp1600_gpio_irq_enable(struct irq_data *d)
+{
+	struct blzp1600_gpio *chip = get_blzp1600_gpio_from_irq_data(d);
+
+	gpiochip_enable_irq(&chip->gc, irqd_to_hwirq(d));
+
+	guard(raw_spinlock_irqsave)(&chip->gc.bgpio_lock);
+	blzp1600_gpio_rmw(chip->base + GPIO_DIR_REG, BIT(d->hwirq), 0);
+	blzp1600_gpio_rmw(chip->base + GPIO_IEN_REG, BIT(d->hwirq), 1);
+}
+
+static void blzp1600_gpio_irq_disable(struct irq_data *d)
+{
+	struct blzp1600_gpio *chip = get_blzp1600_gpio_from_irq_data(d);
+
+	guard(raw_spinlock_irqsave)(&chip->gc.bgpio_lock);
+	blzp1600_gpio_rmw(chip->base + GPIO_IEN_REG, BIT(d->hwirq), 0);
+	gpiochip_disable_irq(&chip->gc, irqd_to_hwirq(d));
+}
+
+static int blzp1600_gpio_irq_set_type(struct irq_data *d, u32 type)
+{
+	struct blzp1600_gpio *chip = get_blzp1600_gpio_from_irq_data(d);
+	u32 edge_level, single_both, fall_rise;
+	int mask = BIT(d->hwirq);
+
+	guard(raw_spinlock_irqsave)(&chip->gc.bgpio_lock);
+	edge_level = blzp1600_gpio_read(chip, GPIO_IS_REG);
+	single_both = blzp1600_gpio_read(chip, GPIO_IBE_REG);
+	fall_rise = blzp1600_gpio_read(chip, GPIO_IEV_REG);
+
+	switch (type) {
+	case IRQ_TYPE_EDGE_BOTH:
+		edge_level &= ~mask;
+		single_both |= mask;
+		break;
+	case IRQ_TYPE_EDGE_RISING:
+		edge_level &= ~mask;
+		single_both &= ~mask;
+		fall_rise |= mask;
+		break;
+	case IRQ_TYPE_EDGE_FALLING:
+		edge_level &= ~mask;
+		single_both &= ~mask;
+		fall_rise &= ~mask;
+		break;
+	case IRQ_TYPE_LEVEL_HIGH:
+		edge_level |= mask;
+		fall_rise |= mask;
+		break;
+	case IRQ_TYPE_LEVEL_LOW:
+		edge_level |= mask;
+		fall_rise &= ~mask;
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	blzp1600_gpio_write(chip, GPIO_IS_REG, edge_level);
+	blzp1600_gpio_write(chip, GPIO_IBE_REG, single_both);
+	blzp1600_gpio_write(chip, GPIO_IEV_REG, fall_rise);
+
+	if (type & IRQ_TYPE_LEVEL_MASK)
+		irq_set_handler_locked(d, handle_level_irq);
+	else
+		irq_set_handler_locked(d, handle_edge_irq);
+
+	return 0;
+}
+
+static const struct irq_chip blzp1600_gpio_irqchip = {
+	.name = DRIVER_NAME,
+	.irq_ack = blzp1600_gpio_irq_ack,
+	.irq_mask = blzp1600_gpio_irq_mask,
+	.irq_unmask = blzp1600_gpio_irq_unmask,
+	.irq_set_type = blzp1600_gpio_irq_set_type,
+	.irq_enable = blzp1600_gpio_irq_enable,
+	.irq_disable = blzp1600_gpio_irq_disable,
+	.flags = IRQCHIP_IMMUTABLE | IRQCHIP_MASK_ON_SUSPEND,
+	GPIOCHIP_IRQ_RESOURCE_HELPERS,
+};
+
+static void blzp1600_gpio_irqhandler(struct irq_desc *desc)
+{
+	struct blzp1600_gpio *gpio = get_blzp1600_gpio_from_irq_desc(desc);
+	struct irq_chip *irqchip = irq_desc_get_chip(desc);
+	unsigned long irq_status;
+	int hwirq = 0;
+
+	chained_irq_enter(irqchip, desc);
+	irq_status = blzp1600_gpio_read(gpio, GPIO_RIS_REG);
+	for_each_set_bit(hwirq, &irq_status, gpio->gc.ngpio)
+		generic_handle_domain_irq(gpio->gc.irq.domain, hwirq);
+
+	chained_irq_exit(irqchip, desc);
+}
+
+static int blzp1600_gpio_set_debounce(struct gpio_chip *gc, unsigned int offset,
+				      unsigned int debounce)
+{
+	struct blzp1600_gpio *chip = gpiochip_get_data(gc);
+
+	guard(raw_spinlock_irqsave)(&chip->gc.bgpio_lock);
+	blzp1600_gpio_rmw(chip->base + GPIO_DB_REG, BIT(offset), debounce);
+
+	return 0;
+}
+
+static int blzp1600_gpio_set_config(struct gpio_chip *gc, unsigned int offset, unsigned long config)
+{
+	u32 debounce;
+
+	if (pinconf_to_config_param(config) != PIN_CONFIG_INPUT_DEBOUNCE)
+		return -ENOTSUPP;
+
+	debounce = pinconf_to_config_argument(config);
+	return blzp1600_gpio_set_debounce(gc, offset, debounce);
+}
+
+static int blzp1600_gpio_probe(struct platform_device *pdev)
+{
+	struct device_node *node = pdev->dev.of_node;
+	struct blzp1600_gpio *chip;
+	struct gpio_chip *gc;
+	int ret;
+
+	chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL);
+	if (!chip)
+		return -ENOMEM;
+
+	chip->base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(chip->base))
+		return PTR_ERR(chip->base);
+
+	ret = bgpio_init(&chip->gc, &pdev->dev, 4, chip->base + GPIO_IDATA_REG,
+			 chip->base + GPIO_SET_REG, chip->base + GPIO_CLR_REG,
+			 chip->base + GPIO_DIR_REG, NULL, 0);
+	if (ret)
+		return dev_err_probe(&pdev->dev, ret, "Failed to register generic gpio\n");
+
+	/* configure the gpio chip */
+	gc = &chip->gc;
+	gc->set_config = blzp1600_gpio_set_config;
+
+	if (of_property_read_bool(node, "interrupt-controller")) {
+		struct gpio_irq_chip *girq;
+
+		chip->irq = platform_get_irq(pdev, 0);
+		if (chip->irq < 0)
+			return chip->irq;
+
+		girq = &gc->irq;
+		gpio_irq_chip_set_chip(girq, &blzp1600_gpio_irqchip);
+		girq->parent_handler = blzp1600_gpio_irqhandler;
+		girq->num_parents = 1;
+		girq->parents = devm_kcalloc(&pdev->dev, 1, sizeof(*girq->parents), GFP_KERNEL);
+		if (!girq->parents)
+			return -ENOMEM;
+
+		girq->parents[0] = chip->irq;
+		girq->default_type = IRQ_TYPE_NONE;
+	}
+
+	return devm_gpiochip_add_data(&pdev->dev, gc, chip);
+}
+
+static const struct of_device_id blzp1600_gpio_of_match[] = {
+	{ .compatible = "blaize,blzp1600-gpio", },
+	{ /* Sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, blzp1600_gpio_of_match);
+
+static struct platform_driver blzp1600_gpio_driver = {
+	.driver		= {
+		.name	= DRIVER_NAME,
+		.of_match_table = of_match_ptr(blzp1600_gpio_of_match),
+	},
+	.probe		= blzp1600_gpio_probe,
+};
+
+module_platform_driver(blzp1600_gpio_driver);
+
+MODULE_AUTHOR("Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>");
+MODULE_DESCRIPTION("Blaize BLZP1600 GPIO driver");
+MODULE_LICENSE("GPL");

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: Document Blaize BLZP1600 GPIO driver
  2025-03-27 11:27 ` [PATCH v2 1/3] dt-bindings: Document " Nikolaos Pasaloukos
@ 2025-03-27 16:52   ` Conor Dooley
  2025-03-28 10:01   ` Neil Jones
  1 sibling, 0 replies; 9+ messages in thread
From: Conor Dooley @ 2025-03-27 16:52 UTC (permalink / raw)
  To: Nikolaos Pasaloukos
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, James Cowgill,
	Matt Redfearn, Neil Jones, Linus Walleij, Bartosz Golaszewski,
	Catalin Marinas, Will Deacon, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org

[-- Attachment #1: Type: text/plain, Size: 2952 bytes --]

On Thu, Mar 27, 2025 at 11:27:04AM +0000, Nikolaos Pasaloukos wrote:
> This is a custom silicon GPIO driver provided by VeriSilicon
> Microelectronics. It has 32 input/output ports which can be
> configured as edge or level triggered interrupts. It also provides
> a de-bounce feature.
> This controller is used on the Blaize BLZP1600 SoC.
> 
> Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
> ---
>  .../bindings/gpio/blaize,blzp1600-gpio.yaml        | 77 ++++++++++++++++++++++
>  1 file changed, 77 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml b/Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..8b7842331a22b7b9fbfa42b9c711da99227de2e4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml
> @@ -0,0 +1,77 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/blaize,blzp1600-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Blaize BLZP1600 GPIO controller
> +
> +description:
> +  Blaize BLZP1600 GPIO controller is a design of VeriSilicon APB GPIO v0.2
> +  IP block. It has 32 ports each of which are intended to be represented
> +  as child noeds with the generic GPIO-controller properties as described
> +  in this binding's file.
> +
> +maintainers:
> +  - Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
> +  - James Cowgill <james.cowgill@blaize.com>
> +  - Matt Redfearn <matt.redfearn@blaize.com>
> +  - Neil Jones <neil.jones@blaize.com>
> +
> +properties:
> +  $nodename:
> +    pattern: "^gpio@[0-9a-f]+$"
> +
> +  compatible:
> +    enum:
> +      - blaize,blzp1600-gpio
> +
> +  reg:
> +    maxItems: 1
> +
> +  gpio-controller: true
> +
> +  '#gpio-cells':
> +    const: 2
> +
> +  ngpios:
> +    default: 32
> +    minimum: 1
> +    maximum: 32
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  gpio-line-names: true
> +
> +  interrupt-controller: true
> +
> +  '#interrupt-cells':
> +    const: 2
> +
> +required:
> +  - compatible
> +  - reg
> +  - gpio-controller
> +  - '#gpio-cells'
> +
> +dependencies:
> +  interrupt-controller: [ interrupts ]
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    gpio: gpio@4c0000 {

Label is unused, please drop it if you respin.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

> +      compatible = "blaize,blzp1600-gpio";
> +      reg = <0x004c0000 0x1000>;
> +      gpio-controller;
> +      #gpio-cells = <2>;
> +      ngpios = <32>;
> +      interrupt-controller;
> +      #interrupt-cells = <2>;
> +      interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
> +    };
> +...
> 
> -- 
> 2.43.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: Document Blaize BLZP1600 GPIO driver
  2025-03-27 11:27 ` [PATCH v2 1/3] dt-bindings: Document " Nikolaos Pasaloukos
  2025-03-27 16:52   ` Conor Dooley
@ 2025-03-28 10:01   ` Neil Jones
  2025-04-07 12:05     ` Bartosz Golaszewski
  1 sibling, 1 reply; 9+ messages in thread
From: Neil Jones @ 2025-03-28 10:01 UTC (permalink / raw)
  To: Nikolaos Pasaloukos, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, James Cowgill, Matt Redfearn, Linus Walleij,
	Bartosz Golaszewski, Catalin Marinas, Will Deacon
  Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org

On 27/03/2025 11:27, Nikolaos Pasaloukos wrote:

> This is a custom silicon GPIO driver provided by VeriSilicon
> Microelectronics. It has 32 input/output ports which can be
> configured as edge or level triggered interrupts. It also provides
> a de-bounce feature.
> This controller is used on the Blaize BLZP1600 SoC.
>
> Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
> ---
>   .../bindings/gpio/blaize,blzp1600-gpio.yaml        | 77 ++++++++++++++++++++++
>   1 file changed, 77 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml b/Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..8b7842331a22b7b9fbfa42b9c711da99227de2e4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml
> @@ -0,0 +1,77 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/blaize,blzp1600-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Blaize BLZP1600 GPIO controller
> +
> +description:
> +  Blaize BLZP1600 GPIO controller is a design of VeriSilicon APB GPIO v0.2
> +  IP block. It has 32 ports each of which are intended to be represented
> +  as child noeds with the generic GPIO-controller properties as described

Typo here I assume, should be nodes ?

Also maybe better worded as:

Blaize BLZP1600 GPIO controller is an _implementation_ of the VeriSilicon APB GPIO v0.2 IP block

> +  in this binding's file.
> +
> +maintainers:
> +  - Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
> +  - James Cowgill <james.cowgill@blaize.com>
> +  - Matt Redfearn <matt.redfearn@blaize.com>
> +  - Neil Jones <neil.jones@blaize.com>
> +
> +properties:
> +  $nodename:
> +    pattern: "^gpio@[0-9a-f]+$"
> +
> +  compatible:
> +    enum:
> +      - blaize,blzp1600-gpio
> +
> +  reg:
> +    maxItems: 1
> +
> +  gpio-controller: true
> +
> +  '#gpio-cells':
> +    const: 2
> +
> +  ngpios:
> +    default: 32
> +    minimum: 1
> +    maximum: 32
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  gpio-line-names: true
> +
> +  interrupt-controller: true
> +
> +  '#interrupt-cells':
> +    const: 2
> +
> +required:
> +  - compatible
> +  - reg
> +  - gpio-controller
> +  - '#gpio-cells'
> +
> +dependencies:
> +  interrupt-controller: [ interrupts ]
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    gpio: gpio@4c0000 {
> +      compatible = "blaize,blzp1600-gpio";
> +      reg = <0x004c0000 0x1000>;
> +      gpio-controller;
> +      #gpio-cells = <2>;
> +      ngpios = <32>;
> +      interrupt-controller;
> +      #interrupt-cells = <2>;
> +      interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
> +    };
> +...
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: (subset) [PATCH v2 0/3] Add support for Blaize BLZP1600 GPIO driver
  2025-03-27 11:27 [PATCH v2 0/3] Add support for Blaize BLZP1600 GPIO driver Nikolaos Pasaloukos
                   ` (2 preceding siblings ...)
  2025-03-27 11:27 ` [PATCH v2 3/3] arm64: dts: blaize-blzp1600: Enable " Nikolaos Pasaloukos
@ 2025-04-07 12:02 ` Bartosz Golaszewski
  3 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2025-04-07 12:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, James Cowgill,
	Matt Redfearn, Neil Jones, Linus Walleij, Bartosz Golaszewski,
	Catalin Marinas, Will Deacon, Nikolaos Pasaloukos
  Cc: Bartosz Golaszewski, devicetree, linux-kernel, linux-gpio,
	linux-arm-kernel

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Thu, 27 Mar 2025 11:27:03 +0000, Nikolaos Pasaloukos wrote:
> This patchset adds a GPIO driver for the VeriSilicon APB v0.2
> hardware. This controller is used in the Blaize BLZP1600
> SoC for its GPIO interface. It is essential for upstream
> support since it is used to provide signals for the
> Ethernet, USB, SD and many other interfaces.
> 
> Adds the GPIO interface to the Blaize BLZP1600 SoC devicetree.
> 
> [...]

Applied, thanks!

[1/3] dt-bindings: Document Blaize BLZP1600 GPIO driver
      https://git.kernel.org/brgl/linux/c/5de6156a402b2d2432767478fe75c40f9755232f
[2/3] gpio: Enable Blaize BLZP1600 GPIO support
      https://git.kernel.org/brgl/linux/c/52eafd817651d44ab006c83ebd98f5dd687df2d3

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: Document Blaize BLZP1600 GPIO driver
  2025-03-28 10:01   ` Neil Jones
@ 2025-04-07 12:05     ` Bartosz Golaszewski
  0 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2025-04-07 12:05 UTC (permalink / raw)
  To: Neil Jones
  Cc: Nikolaos Pasaloukos, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, James Cowgill, Matt Redfearn, Linus Walleij,
	Catalin Marinas, Will Deacon, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org

On Fri, Mar 28, 2025 at 11:02 AM Neil Jones <neil.jones@blaize.com> wrote:
>
> On 27/03/2025 11:27, Nikolaos Pasaloukos wrote:
>
> > This is a custom silicon GPIO driver provided by VeriSilicon
> > Microelectronics. It has 32 input/output ports which can be
> > configured as edge or level triggered interrupts. It also provides
> > a de-bounce feature.
> > This controller is used on the Blaize BLZP1600 SoC.
> >
> > Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
> > ---
> >   .../bindings/gpio/blaize,blzp1600-gpio.yaml        | 77 ++++++++++++++++++++++
> >   1 file changed, 77 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml b/Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..8b7842331a22b7b9fbfa42b9c711da99227de2e4
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/gpio/blaize,blzp1600-gpio.yaml
> > @@ -0,0 +1,77 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/gpio/blaize,blzp1600-gpio.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Blaize BLZP1600 GPIO controller
> > +
> > +description:
> > +  Blaize BLZP1600 GPIO controller is a design of VeriSilicon APB GPIO v0.2
> > +  IP block. It has 32 ports each of which are intended to be represented
> > +  as child noeds with the generic GPIO-controller properties as described
>
> Typo here I assume, should be nodes ?
>
> Also maybe better worded as:
>
> Blaize BLZP1600 GPIO controller is an _implementation_ of the VeriSilicon APB GPIO v0.2 IP block
>

I fixed these in tree, thanks.

Bart

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 3/3] arm64: dts: blaize-blzp1600: Enable GPIO support
  2025-03-27 11:27 ` [PATCH v2 3/3] arm64: dts: blaize-blzp1600: Enable " Nikolaos Pasaloukos
@ 2025-04-24 13:55   ` Nikolaos Pasaloukos
  0 siblings, 0 replies; 9+ messages in thread
From: Nikolaos Pasaloukos @ 2025-04-24 13:55 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, James Cowgill,
	Matt Redfearn, Neil Jones, Linus Walleij, Bartosz Golaszewski,
	Matthew Redfearn, Catalin Marinas, Will Deacon
  Cc: devicetree, linux-kernel, linux-gpio, linux-arm-kernel

On 27/03/2025 11:26, Nikolaos Pasaloukos wrote:

> Blaize BLZP1600 uses the custom silicon provided from
> VeriSilicon to add GPIO support.
> This interface is used to control signals on many other
> peripherals, such as Ethernet, USB, SD and eMMC.
>
> Signed-off-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com>
> ---
>   arch/arm64/boot/dts/blaize/blaize-blzp1600-cb2.dts | 36 ++++++++++++++++++++++
>   arch/arm64/boot/dts/blaize/blaize-blzp1600.dtsi    | 12 ++++++++
>   2 files changed, 48 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/blaize/blaize-blzp1600-cb2.dts b/arch/arm64/boot/dts/blaize/blaize-blzp1600-cb2.dts
> index 7e3cef2ed3522e202487e799b2021cd45398e006..fb5415eb347a028fc65090027a4c4fc89c8280f5 100644
> --- a/arch/arm64/boot/dts/blaize/blaize-blzp1600-cb2.dts
> +++ b/arch/arm64/boot/dts/blaize/blaize-blzp1600-cb2.dts
> @@ -81,3 +81,39 @@ gpio_expander_m2: gpio@75 {
>   				  "UART1_TO_RSP";	/* GPIO_15 */
>   	};
>   };
> +
> +&gpio0 {
> +	status = "okay";
> +	gpio-line-names = "PERST_N",		/* GPIO_0 */
> +			  "LM96063_ALERT_N",	/* GPIO_1 */
> +			  "INA3221_PV",		/* GPIO_2 */
> +			  "INA3221_CRIT",	/* GPIO_3 */
> +			  "INA3221_WARN",	/* GPIO_4 */
> +			  "INA3221_TC",		/* GPIO_5 */
> +			  "QSPI0_RST_N",	/* GPIO_6 */
> +			  "LM96063_TCRIT_N",	/* GPIO_7 */
> +			  "DSI_TCH_INT",	/* GPIO_8 */
> +			  "DSI_RST",		/* GPIO_9 */
> +			  "DSI_BL",		/* GPIO_10 */
> +			  "DSI_INT",		/* GPIO_11 */
> +			  "ETH_RST",		/* GPIO_12 */
> +			  "CSI0_RST",		/* GPIO_13 */
> +			  "CSI0_PWDN",		/* GPIO_14 */
> +			  "CSI1_RST",		/* GPIO_15 */
> +			  "CSI1_PWDN",		/* GPIO_16 */
> +			  "CSI2_RST",		/* GPIO_17 */
> +			  "CSI2_PWDN",		/* GPIO_18 */
> +			  "CSI3_RST",		/* GPIO_19 */
> +			  "CSI3_PWDN",		/* GPIO_20 */
> +			  "ADAC_RST",		/* GPIO_21 */
> +			  "SD_SW_VDD",		/* GPIO_22 */
> +			  "SD_PON_VDD",		/* GPIO_23 */
> +			  "GPIO_EXP_INT",	/* GPIO_24 */
> +			  "BOARD_ID_0",		/* GPIO_25 */
> +			  "SDIO1_SW_VDD",	/* GPIO_26 */
> +			  "SDIO1_PON_VDD",	/* GPIO_27 */
> +			  "SDIO2_SW_VDD",	/* GPIO_28 */
> +			  "SDIO2_PON_VDD",	/* GPIO_29 */
> +			  "BOARD_ID_1",		/* GPIO_30 */
> +			  "BOARD_ID_2";		/* GPIO_31 */
> +};
> diff --git a/arch/arm64/boot/dts/blaize/blaize-blzp1600.dtsi b/arch/arm64/boot/dts/blaize/blaize-blzp1600.dtsi
> index 7d399e6a532f5b24385dd837be965be771c7d24c..5a6c882b2f57d57d304869dee877c996cbabb712 100644
> --- a/arch/arm64/boot/dts/blaize/blaize-blzp1600.dtsi
> +++ b/arch/arm64/boot/dts/blaize/blaize-blzp1600.dtsi
> @@ -120,6 +120,18 @@ gic: interrupt-controller@410000 {
>   						 IRQ_TYPE_LEVEL_LOW)>;
>   		};
>   
> +		gpio0: gpio@4c0000 {
> +			compatible = "blaize,blzp1600-gpio";
> +			reg = <0x4c0000 0x1000>;
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +			ngpios = <32>;
> +			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-controller;
> +			#interrupt-cells = <2>;
> +			status = "disabled";
> +		};
> +
>   		uart0: serial@4d0000 {
>   			compatible = "ns16550a";
>   			reg = <0x4d0000 0x1000>;
>
Hi,

Since the rest of the patches have already been accepted, should I wait for a review
here before I send this patch to the SoC list?

Kind regards,
Nikolaos Pasaloukos


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-04-24 14:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-27 11:27 [PATCH v2 0/3] Add support for Blaize BLZP1600 GPIO driver Nikolaos Pasaloukos
2025-03-27 11:27 ` [PATCH v2 1/3] dt-bindings: Document " Nikolaos Pasaloukos
2025-03-27 16:52   ` Conor Dooley
2025-03-28 10:01   ` Neil Jones
2025-04-07 12:05     ` Bartosz Golaszewski
2025-03-27 11:27 ` [PATCH v2 2/3] gpio: Enable Blaize BLZP1600 GPIO support Nikolaos Pasaloukos
2025-03-27 11:27 ` [PATCH v2 3/3] arm64: dts: blaize-blzp1600: Enable " Nikolaos Pasaloukos
2025-04-24 13:55   ` Nikolaos Pasaloukos
2025-04-07 12:02 ` (subset) [PATCH v2 0/3] Add support for Blaize BLZP1600 GPIO driver Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).