Skip to contentSkip to conversation

pinctrl: gpio: sx150x: add Semtech SX150x I2C GPIO expander and pinctrl driver

PATCH In review [email protected] 2 participants 3 messages May 18, 2025 – Jul 18, 2025 Pin control

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: gpio: sx150x: add Semtech SX150x I2C GPIO expander and pinctrl driver

From: Anis Chali <[email protected]>

implement a driver to use semtech pinctrl and
gpio expander, this driver is adapted from a
existent linux driver that is written by
Gregory Bean <[email protected]>.

---
 drivers/pinctrl/Kconfig          |  18 +
 drivers/pinctrl/Makefile         |   1 +
 drivers/pinctrl/pinctrl-sx150x.c | 902 +++++++++++++++++++++++++++++++
 3 files changed, 921 insertions(+)
 create mode 100644 drivers/pinctrl/pinctrl-sx150x.c
drivers/pinctrl/Kconfig +18 -0
index 687fb339ea0..8d47fa0cfd5 100644
@@ -263,6 +263,24 @@ config PINCTRL_ROCKCHIP_RV1108
 	  both the GPIO definitions and pin control functions for each
 	  available multiplex function.
 
+config PINCTRL_SX150X
+	bool "Semtech SX150x I2C GPIO expander pinctrl driver"
+	depends on DM && PINCTRL_FULL
+	help
+	  Say yes here to provide support for Semtech SX150x-series I2C
+	  GPIO expanders as pinctrl module.
+	  Compatible models include:
+	  - 8 bits:  sx1508q, sx1502q
+	  - 16 bits: sx1509q, sx1506q
+
+config SPL_PINCTRL_SX150X
+	bool "Semtech SX150x I2C GPIO expander pinctrl driver in SPL"
+	depends on DM && SPL_PINCTRL_FULL
+	help
+	  This option is an SPL-variant of the PINCTRL_SX150X option.
+	  See the help of PINCTRL_SX150X for details.
+
+
 config PINCTRL_SANDBOX
 	bool "Sandbox pinctrl driver"
 	depends on SANDBOX
drivers/pinctrl/Makefile +1 -0
index a8eba656843..fc9c604c485 100644
@@ -32,6 +32,7 @@ obj-$(CONFIG_PINCTRL_QE)	+= pinctrl-qe-io.o
 obj-$(CONFIG_PINCTRL_SINGLE)	+= pinctrl-single.o
 obj-$(CONFIG_PINCTRL_STI)	+= pinctrl-sti.o
 obj-$(CONFIG_PINCTRL_STM32)	+= pinctrl_stm32.o
+obj-$(CONFIG_$(PHASE_)PINCTRL_SX150X) += pinctrl-sx150x.o
 obj-$(CONFIG_$(PHASE_)PINCTRL_STMFX)	+= pinctrl-stmfx.o
 obj-y				+= broadcom/
 obj-$(CONFIG_PINCTRL_ZYNQMP)	+= pinctrl-zynqmp.o
drivers/pinctrl/pinctrl-sx150x.c new file +902 -0

902 lines not on this page · raw message

Signature · 1 line
2.49.0
#1 lore raw
Quoted 6 lines · On Sun, 18 May 2025 17:25:24 -0400, [email protected] wrote:

implement a driver to use semtech pinctrl and
gpio expander, this driver is adapted from a
existent linux driver that is written by
Gregory Bean <[email protected]>.

Applied to u-boot/next, thanks!

[1/1] pinctrl: gpio: sx150x: add Semtech SX150x I2C GPIO expander and pinctrl driver

      commit: 5451504256d34dca5b810a512d3c8dec84ebb49c
Signature · 1 line
Tom
#2 lore raw
Quoted 9 lines · Tom Rini
Quoted 6 lines · On Sun, 18 May 2025 17:25:24 -0400, [email protected] wrote:

implement a driver to use semtech pinctrl and
gpio expander, this driver is adapted from a
existent linux driver that is written by
Gregory Bean <[email protected]>.

Quoted 4 lines

Applied to u-boot/next, thanks!

[1/1] pinctrl: gpio: sx150x: add Semtech SX150x I2C GPIO expander and pinctrl driver

      commit: 5451504256d34dca5b810a512d3c8dec84ebb49c

I see this isn't enabled anywhere. Further, I see warnings enabling it on sandbox. Please fix the warnings seen when enabling this on sandbox, thanks. Will a platform be upstreamed soon which makes use of this?

Signature · 1 line
Tom