Skip to contentSkip to conversation

soc: nuvoton: Add SoC info driver for WPCM450

PATCH In review Jonathan Neuschäfer 2 participants 5 messages Nov 3, 2022 – Feb 11, 2023 Arm/nuvoton WPCM450 architecture

lore
Share & tools
lore

Jonathan Neuschäfer

author maintainer
#0 lore raw

PATCH v6 1/1 soc: nuvoton: Add SoC info driver for WPCM450

Add a SoC information driver for Nuvoton WPCM450 SoCs. It provides information such as the SoC revision.

Usage example:

  # grep . /sys/devices/soc0/*
  /sys/devices/soc0/family:Nuvoton NPCM
  /sys/devices/soc0/revision:A3
  /sys/devices/soc0/soc_id:WPCM450

---
v6:
- Select REGMAP
- Rearrange Kconfig structure a bit

v5:
- Change Kconfig option from bool to tristate

v4:
- rebase on 5.19-rc1

v3:
- Declare revisions array as static
- Change get_revision parameter to unsigned int
- Add Paul's R-b tag
- Add usage example
- Sort includes

v2:
- https://lore.kernel.org/lkml/[email protected]/
- Add R-b tag
- rebase on 5.18-rc1

v1:
- https://lore.kernel.org/lkml/[email protected]/

---
 drivers/soc/Kconfig               |   1 +
 drivers/soc/Makefile              |   1 +
 drivers/soc/nuvoton/Kconfig       |  17 +++++
 drivers/soc/nuvoton/Makefile      |   2 +
 drivers/soc/nuvoton/wpcm450-soc.c | 109 ++++++++++++++++++++++++++++++
 5 files changed, 130 insertions(+)
 create mode 100644 drivers/soc/nuvoton/Kconfig
 create mode 100644 drivers/soc/nuvoton/Makefile
 create mode 100644 drivers/soc/nuvoton/wpcm450-soc.c
drivers/soc/Kconfig +1 -0
index e461c071189b4..f17764a7e5884 100644
@@ -15,6 +15,7 @@ source "drivers/soc/ixp4xx/Kconfig"
 source "drivers/soc/litex/Kconfig"
 source "drivers/soc/mediatek/Kconfig"
 source "drivers/soc/microchip/Kconfig"
+source "drivers/soc/nuvoton/Kconfig"
 source "drivers/soc/pxa/Kconfig"
 source "drivers/soc/qcom/Kconfig"
 source "drivers/soc/renesas/Kconfig"
drivers/soc/Makefile +1 -0
index 69ba6508cf2c1..9f92506854852 100644
@@ -20,6 +20,7 @@ obj-$(CONFIG_SOC_XWAY)		+= lantiq/
 obj-$(CONFIG_LITEX_SOC_CONTROLLER) += litex/
 obj-y				+= mediatek/
 obj-y				+= microchip/
+obj-y				+= nuvoton/
 obj-y				+= pxa/
 obj-y				+= amlogic/
 obj-y				+= qcom/
drivers/soc/nuvoton/Kconfig new file +17 -0
new file mode 100644
index 0000000000000..2167d3d739d84
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0
+menu "Nuvoton SoC drivers"
+	depends on ARCH_NPCM || COMPILE_TEST
+
+config WPCM450_SOC
+	tristate "Nuvoton WPCM450 SoC driver"
+	default y if ARCH_WPCM450
+	select SOC_BUS
+	select REGMAP
+	help
+	  Say Y here to compile the SoC information driver for Nuvoton
+	  WPCM450 SoCs.
+
+	  This driver provides information such as the SoC model and
+	  revision.
+
+endmenu
drivers/soc/nuvoton/Makefile new file +2 -0
new file mode 100644
index 0000000000000..e30317b4e8290
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_WPCM450_SOC)	+= wpcm450-soc.o
drivers/soc/nuvoton/wpcm450-soc.c new file +109 -0

109 lines not on this page · raw message

--
2.35.1

#1 lore raw

Hi Jonathan,

Quoted 10 lines · Jonathan Neuschäfer

Add a SoC information driver for Nuvoton WPCM450 SoCs. It provides information such as the SoC revision.

Usage example:

  # grep . /sys/devices/soc0/*
  /sys/devices/soc0/family:Nuvoton NPCM
  /sys/devices/soc0/revision:A3
  /sys/devices/soc0/soc_id:WPCM450
Quoted 7 lines

---
v6:
- Select REGMAP
- Rearrange Kconfig structure a bit

Thanks for your patch!

Unfortunately Joel seems to have sent v5 to Arnd instead of v6?
https://lore.kernel.org/all/[email protected]

Which is now commit 7dbb4a38bff34493 ("soc:
nuvoton: Add SoC info driver for WPCM450") in soc/for-next...

drivers/soc/nuvoton/Kconfig line 3

Quoted 6 lines
drivers/soc/nuvoton/Kconfig new file +3 -0
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0
+menu "Nuvoton SoC drivers"
+       depends on ARCH_NPCM || COMPILE_TEST

... and lacks the above dependency, hence appearing on my radar.

Quoted 4 lines
drivers/soc/nuvoton/Kconfig new file +4 -0
+
+config WPCM450_SOC
+       tristate "Nuvoton WPCM450 SoC driver"
+       default y if ARCH_WPCM450

drivers/soc/nuvoton/Kconfig line 17

Quoted 10 lines
drivers/soc/nuvoton/Kconfig new file +10 -0
+       select SOC_BUS
+       select REGMAP
+       help
+         Say Y here to compile the SoC information driver for Nuvoton
+         WPCM450 SoCs.
+
+         This driver provides information such as the SoC model and
+         revision.
+
+endmenu

Do you plan to send a follow-up patch?
Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author maintainer
#2 lore raw
Quoted 39 lines · Geert Uytterhoeven

Hi Jonathan,

Quoted 10 lines · Jonathan Neuschäfer

Add a SoC information driver for Nuvoton WPCM450 SoCs. It provides information such as the SoC revision.

Usage example:

  # grep . /sys/devices/soc0/*
  /sys/devices/soc0/family:Nuvoton NPCM
  /sys/devices/soc0/revision:A3
  /sys/devices/soc0/soc_id:WPCM450
Quoted 7 lines

---
v6:
- Select REGMAP
- Rearrange Kconfig structure a bit

Thanks for your patch!

Unfortunately Joel seems to have sent v5 to Arnd instead of v6?
https://lore.kernel.org/all/[email protected]

Which is now commit 7dbb4a38bff34493 ("soc:
nuvoton: Add SoC info driver for WPCM450") in soc/for-next...

drivers/soc/nuvoton/Kconfig line 3

Quoted 6 lines
drivers/soc/nuvoton/Kconfig new file +3 -0
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0
+menu "Nuvoton SoC drivers"
+       depends on ARCH_NPCM || COMPILE_TEST

... and lacks the above dependency, hence appearing on my radar.

Quoted 16 lines
Quoted 4 lines
drivers/soc/nuvoton/Kconfig new file +4 -0
+
+config WPCM450_SOC
+       tristate "Nuvoton WPCM450 SoC driver"
+       default y if ARCH_WPCM450

drivers/soc/nuvoton/Kconfig line 17

Quoted 10 lines
drivers/soc/nuvoton/Kconfig new file +10 -0
+       select SOC_BUS
+       select REGMAP
+       help
+         Say Y here to compile the SoC information driver for Nuvoton
+         WPCM450 SoCs.
+
+         This driver provides information such as the SoC model and
+         revision.
+
+endmenu

Do you plan to send a follow-up patch?

Yes, hopefully I'll get around to it a few days after rc1, when the dust of the (upcoming) merge window has settled a bit.

Or should I rather send it earlier?

Jonathan

Quoted 12 lines

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#3 lore raw

Hi Jonathan,

Quoted 55 lines · Jonathan Neuschäfer
Quoted 37 lines · Geert Uytterhoeven
Quoted 10 lines · Jonathan Neuschäfer

Add a SoC information driver for Nuvoton WPCM450 SoCs. It provides information such as the SoC revision.

Usage example:

  # grep . /sys/devices/soc0/*
  /sys/devices/soc0/family:Nuvoton NPCM
  /sys/devices/soc0/revision:A3
  /sys/devices/soc0/soc_id:WPCM450
Quoted 7 lines

---
v6:
- Select REGMAP
- Rearrange Kconfig structure a bit

Thanks for your patch!

Unfortunately Joel seems to have sent v5 to Arnd instead of v6?
https://lore.kernel.org/all/[email protected]

Which is now commit 7dbb4a38bff34493 ("soc:
nuvoton: Add SoC info driver for WPCM450") in soc/for-next...

drivers/soc/nuvoton/Kconfig line 3

Quoted 6 lines
drivers/soc/nuvoton/Kconfig new file +3 -0
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0
+menu "Nuvoton SoC drivers"
+       depends on ARCH_NPCM || COMPILE_TEST

... and lacks the above dependency, hence appearing on my radar.

Quoted 16 lines
Quoted 4 lines
drivers/soc/nuvoton/Kconfig new file +4 -0
+
+config WPCM450_SOC
+       tristate "Nuvoton WPCM450 SoC driver"
+       default y if ARCH_WPCM450

drivers/soc/nuvoton/Kconfig line 17

Quoted 10 lines
drivers/soc/nuvoton/Kconfig new file +10 -0
+       select SOC_BUS
+       select REGMAP
+       help
+         Say Y here to compile the SoC information driver for Nuvoton
+         WPCM450 SoCs.
+
+         This driver provides information such as the SoC model and
+         revision.
+
+endmenu

Do you plan to send a follow-up patch?

Quoted 4 lines

Yes, hopefully I'll get around to it a few days after rc1, when the dust of the (upcoming) merge window has settled a bit.

Or should I rather send it earlier?

I'd say sooner rather than later.
If I hadn't found your v6, I would have sent a patch myself to add the dependency.

Does the "select REGMAP" fix a build issue? If yes, that's a very good reason to send it now...

Thanks!

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
author maintainer
#4 lore raw
Quoted 9 lines · Geert Uytterhoeven

Hi Jonathan,

Quoted 5 lines · Jonathan Neuschäfer
Quoted 4 lines · Geert Uytterhoeven
Quoted 2 lines · Jonathan Neuschäfer

Add a SoC information driver for Nuvoton WPCM450 SoCs. It provides information such as the SoC revision.

[...]

Quoted 16 lines
Quoted 16 lines
Quoted 15 lines

drivers/soc/nuvoton/Kconfig line 17

Quoted 13 lines
drivers/soc/nuvoton/Kconfig new file +13 -0
+config WPCM450_SOC
+       tristate "Nuvoton WPCM450 SoC driver"
+       default y if ARCH_WPCM450
+       select SOC_BUS
+       select REGMAP
+       help
+         Say Y here to compile the SoC information driver for Nuvoton
+         WPCM450 SoCs.
+
+         This driver provides information such as the SoC model and
+         revision.
+
+endmenu

Do you plan to send a follow-up patch?

Quoted 8 lines
Quoted 4 lines

Yes, hopefully I'll get around to it a few days after rc1, when the dust of the (upcoming) merge window has settled a bit.

Or should I rather send it earlier?

I'd say sooner rather than later.
If I hadn't found your v6, I would have sent a patch myself to add the dependency.

Ok, I'll send it today.

Quoted 3 lines

Does the "select REGMAP" fix a build issue? If yes, that's a very good reason to send it now...

Unfortunately I wasn't able to find the build issue report.

Jonathan