Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/2] gpio: Add the Siflower SF19A2890 GPIO controller
@ 2026-11-09 20:09 Joseph Telaak via B4 Relay
  2026-11-09 20:09 ` [PATCH v2 1/2] dt-bindings: gpio: Add " Joseph Telaak via B4 Relay
  2026-11-09 20:09 ` [PATCH v2 2/2] gpio: Add Siflower GPIO controller driver Joseph Telaak via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Joseph Telaak via B4 Relay @ 2026-11-09 20:09 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
  Cc: Chuanhong Guo, Qingfang Deng, linux-mips, linux-gpio, devicetree,
	linux-kernel, Joseph Telaak, Qingfang Deng

This series adds a binding and a driver for the GPIO controller of the
Siflower SoCs, starting with the SF19A2890, a MIPS SoC for home routers.
Each line has a register block of its own, and each group of 16 lines an
interrupt.

The binding is Chuanhong Guo's and the driver Qingfang Deng's, both from
Chuanhong's SF19A2890 branch [1], with my changes noted in each. The
same controller is in Siflower's SF21 RISC-V SoCs; the binding has only
the SF19A2890's compatible, the one I can test.

The SoC support itself (MACH_SIFLOWER_MIPS) goes through the MIPS tree;
until then the driver builds with COMPILE_TEST.

Tested on a GL.iNet GL-SFT1200: gpio-keys sees both buttons on both
edges (the reset button on GPIO 27 as KEY_RESTART, the mode slide switch
on GPIO 1 as BTN_0, 1 and 0 per slide); /sys/kernel/debug/gpio lists the
49 lines; the GSW150 switch comes out of reset through GPIO 0 and the
SPI NAND uses GPIO 8 as its chip select.

[1] https://github.com/981213/linux/commits/siflower-7.1

---
Changes in v2:
- Write my notes on Chuanhong's and Qingfang's patches as lists, with
  Co-developed-by on the driver (Bartosz).
- Get priv with gpiochip_get_data(), drop the two else branches, and add
  a blank line after the header comment (Bartosz).
- Get the reset with devm_reset_control_get_exclusive_deasserted(), as a
  local, not in priv (Philipp), and drop the OF_GPIO dependency.
- Name only the SF19A2890 in the Kconfig help and the binding's commit
  message, since the other SoCs need compatibles of their own (Conor).
- Drop the ngpios property, which the compatible implies: the driver
  takes the number of lines from its match data, and the binding takes
  exactly four interrupts (Conor).
- Order the binding's properties and its required list (Conor).
- Add a MAINTAINERS entry for the driver and its binding.
- Use GPL-2.0-or-later, not the deprecated GPL-2.0+ SPDX identifier.
- Use readl() and writel() directly, without wrapper functions (Linus).
- No comma after the match table's sentinel, as Uwe asked of the
  clock driver.
- Drop the unused linux/pinctrl/consumer.h include.
- Link to v1: https://patch.msgid.link/20261104-sf19a2890-gpio-v1-0-45e463c48728@telaak.dev

---
Chuanhong Guo (1):
      dt-bindings: gpio: Add Siflower SF19A2890 GPIO controller

Qingfang Deng (1):
      gpio: Add Siflower GPIO controller driver

 .../bindings/gpio/siflower,sf19a2890-gpio.yaml     |  76 +++++
 MAINTAINERS                                        |   7 +
 drivers/gpio/Kconfig                               |  12 +
 drivers/gpio/Makefile                              |   1 +
 drivers/gpio/gpio-siflower.c                       | 310 +++++++++++++++++++++
 5 files changed, 406 insertions(+)
---
base-commit: d66b6b86d5a6278ca930112c634d03725beb7d9a
change-id: 20261102-sf19a2890-gpio-b21562e52f88

Best regards,
--  
Joseph Telaak <joseph@telaak.dev>



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

end of thread, other threads:[~2026-11-10 13:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09 20:09 [PATCH v2 0/2] gpio: Add the Siflower SF19A2890 GPIO controller Joseph Telaak via B4 Relay
2026-11-09 20:09 ` [PATCH v2 1/2] dt-bindings: gpio: Add " Joseph Telaak via B4 Relay
2026-11-10 13:24   ` Krzysztof Kozlowski
2026-11-09 20:09 ` [PATCH v2 2/2] gpio: Add Siflower GPIO controller driver Joseph Telaak via B4 Relay
2026-11-09 20:21   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox