Skip to contentSkip to conversation

Initial support for Nuvoton WPCM450 BMC SoC

PATCH Applied Jonathan Neuschäfer 7 participants 23 messages Apr 6, 2021 – Apr 9, 2021

Subsystems (8)
lore
Share & tools
lore

Jonathan Neuschäfer

author maintainer
#0 lore raw

v2 cover Initial support for Nuvoton WPCM450 BMC SoC

This series adds basic support for the Nuvoton WPCM450 BMC SoC. It's an older SoC but still commonly found on eBay, mostly in Supermicro X9 server boards.

Third-party documentation is available at: https://github.com/neuschaefer/wpcm450/wiki

Patches 1-4 add devicetree bindings for the WPCM450 SoC and its various parts. Patches 5-7 add arch and driver support. Patches 8 and 9 add a devicetree for the SoC and a board based on it. Patch 10 finally updates the MAINTAINERS file.

Patch 2 requires "dt-bindings: arm: Convert nuvoton,npcm750 binding to YAML"
(https://lore.kernel.org/lkml/[email protected]/)

v2:
- Various improvements to the AIC irqchip driver, thanks to Marc Zyngier's review
- I dropped the timer patches, which have been applied by Daniel Lezcano
- I dropped the serial patches, which have been applied to tty-next by Greg KH

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

Jonathan Neuschäfer (10):
dt-bindings: vendor-prefixes: Add Supermicro
dt-bindings: arm: npcm: Add nuvoton,wpcm450 compatible string
dt-bindings: interrupt-controller: Add nuvoton,wpcm450-aic
dt-bindings: watchdog: npcm: Add nuvoton,wpcm450-wdt
ARM: npcm: Introduce Nuvoton WPCM450 SoC
irqchip: Add driver for WPCM450 interrupt controller
watchdog: npcm: Add support for WPCM450
ARM: dts: Add devicetree for Nuvoton WPCM450 BMC chip
ARM: dts: Add devicetree for Supermicro X9SCi-LN4F based on WPCM450
MAINTAINERS: Add entry for Nuvoton WPCM450

 .../devicetree/bindings/arm/npcm/npcm.yaml    |   6 +
 .../nuvoton,wpcm450-aic.yaml                  |  39 +++++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 .../bindings/watchdog/nuvoton,npcm-wdt.txt    |   3 +-
 MAINTAINERS                                   |   9 +
 arch/arm/boot/dts/Makefile                    |   2 +
 .../nuvoton-wpcm450-supermicro-x9sci-ln4f.dts |  40 +++++
 arch/arm/boot/dts/nuvoton-wpcm450.dtsi        |  76 +++++++++
 arch/arm/mach-npcm/Kconfig                    |  13 +-
 arch/arm/mach-npcm/Makefile                   |   1 +
 arch/arm/mach-npcm/wpcm450.c                  |  13 ++
 drivers/irqchip/Kconfig                       |   6 +
 drivers/irqchip/Makefile                      |   1 +
 drivers/irqchip/irq-wpcm450-aic.c             | 161 ++++++++++++++++++
 drivers/watchdog/npcm_wdt.c                   |   1 +
 15 files changed, 371 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/nuvoton,wpcm450-aic.yaml
 create mode 100644 arch/arm/boot/dts/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts
 create mode 100644 arch/arm/boot/dts/nuvoton-wpcm450.dtsi
 create mode 100644 arch/arm/mach-npcm/wpcm450.c
 create mode 100644 drivers/irqchip/irq-wpcm450-aic.c

--
2.30.2

author maintainer
#1 lore raw

PATCH v2 1/10 dt-bindings: vendor-prefixes: Add Supermicro

Super Micro Computer, Inc. (https://www.supermicro.com/en/), commonly known as Supermicro, is a manufacturer of server hardware.

---

v2:
- Added Rob's ACK

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index f6064d84a424d..ec6d6ccfbbb3b 100644
@@ -1085,6 +1085,8 @@ patternProperties:
     description: Shenzhen Sunchip Technology Co., Ltd
   "^SUNW,.*":
     description: Sun Microsystems, Inc
+  "^supermicro,.*":
+    description: Super Micro Computer, Inc.
   "^silvaco,.*":
     description: Silvaco, Inc.
   "^swir,.*":

--
2.30.2

author maintainer
#2 lore raw

PATCH v2 2/10 dt-bindings: arm: npcm: Add nuvoton,wpcm450 compatible string

In reply to Jonathan Neuschäfer

The WPCM450 is an older BMC SoC in the Nuvoton NPCM family, originally marketed as Winbond WPCM450.

---

This patch requires "dt-bindings: arm: Convert nuvoton,npcm750 binding to YAML"
(https://lore.kernel.org/lkml/[email protected]/)

v2:
- Added Rob's ACK

---
 Documentation/devicetree/bindings/arm/npcm/npcm.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/npcm/npcm.yaml +6 -0
index 894aefb70652a..95e51378089c9 100644
@@ -14,6 +14,12 @@ properties:
     const: '/'
   compatible:
     oneOf:
+      - description: WPCM450 based boards
+        items:
+          - enum:
+              - supermicro,x9sci-ln4f-bmc   # Supermicro X9SCI-LN4F server's BMC
+          - const: nuvoton,wpcm450
+
       - description: NPCM750 based boards
         items:
           - enum:

--
2.30.2

author maintainer
#3 lore raw

PATCH v2 3/10 dt-bindings: interrupt-controller: Add nuvoton,wpcm450-aic

In reply to Jonathan Neuschäfer

The WPCM450 AIC ("Advanced Interrupt Controller") is the interrupt controller found in the Nuvoton WPCM450 SoC and other Winbond/Nuvoton SoCs.

---

v2:
- Added Rob's ACK

---
 .../nuvoton,wpcm450-aic.yaml                  | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/nuvoton,wpcm450-aic.yaml
Documentation/devicetree/bindings/interrupt-controller/nuvoton,wpcm450-aic.yaml new file +39 -0
new file mode 100644
index 0000000000000..9ce6804bdb999
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/nuvoton,wpcm450-aic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton WPCM450 Advanced Interrupt Controller bindings
+
+maintainers:
+  - Jonathan Neuschäfer <[email protected]>
+
+properties:
+  '#interrupt-cells':
+    const: 2
+
+  compatible:
+    const: nuvoton,wpcm450-aic
+
+  interrupt-controller: true
+
+  reg:
+    maxItems: 1
+
+additionalProperties: false
+
+required:
+  - '#interrupt-cells'
+  - compatible
+  - reg
+  - interrupt-controller
+
+examples:
+  - |
+    aic: interrupt-controller@b8002000 {
+        compatible = "nuvoton,wpcm450-aic";
+        reg = <0xb8002000 0x1000>;
+        interrupt-controller;
+        #interrupt-cells = <2>;
+    };

--
2.30.2

#4 lore raw

[irqchip: irq/irqchip-next] dt-bindings: interrupt-controller: Add nuvoton, wpcm450-aic

The following commit has been merged into the irq/irqchip-next branch of irqchip:

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     7c18715546203a09f859dac2fe3ea8aceec5f235
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/7c18715546203a09f859dac2fe3ea8aceec5f235
Author:        Jonathan Neuschäfer <[email protected]>
AuthorDate:    Tue, 06 Apr 2021 14:09:14 +02:00
Committer:     Marc Zyngier <[email protected]>
CommitterDate: Wed, 07 Apr 2021 13:26:00 +01:00

dt-bindings: interrupt-controller: Add nuvoton, wpcm450-aic

The WPCM450 AIC ("Advanced Interrupt Controller") is the interrupt controller found in the Nuvoton WPCM450 SoC and other Winbond/Nuvoton SoCs.

---
 Documentation/devicetree/bindings/interrupt-controller/nuvoton,wpcm450-aic.yaml | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/nuvoton,wpcm450-aic.yaml
Documentation/devicetree/bindings/interrupt-controller/nuvoton,wpcm450-aic.yaml new file +39 -0
new file mode 100644
index 0000000..9ce6804
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/nuvoton,wpcm450-aic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton WPCM450 Advanced Interrupt Controller bindings
+
+maintainers:
+  - Jonathan Neuschäfer <[email protected]>
+
+properties:
+  '#interrupt-cells':
+    const: 2
+
+  compatible:
+    const: nuvoton,wpcm450-aic
+
+  interrupt-controller: true
+
+  reg:
+    maxItems: 1
+
+additionalProperties: false
+
+required:
+  - '#interrupt-cells'
+  - compatible
+  - reg
+  - interrupt-controller
+
+examples:
+  - |
+    aic: interrupt-controller@b8002000 {
+        compatible = "nuvoton,wpcm450-aic";
+        reg = <0xb8002000 0x1000>;
+        interrupt-controller;
+        #interrupt-cells = <2>;
+    };
author maintainer
#5 lore raw

PATCH v2 4/10 dt-bindings: watchdog: npcm: Add nuvoton,wpcm450-wdt

In reply to Jonathan Neuschäfer

Add a compatible string for the WPCM450 SoC, which has the same watchdog timer.

---

v2:
- Added Rob's ACK

---
 .../devicetree/bindings/watchdog/nuvoton,npcm-wdt.txt          | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/watchdog/nuvoton,npcm-wdt.txt +2 -1
index 6d593003c933b..9059f54dc023d 100644
@@ -5,7 +5,8 @@ The watchdog supports a pre-timeout interrupt that fires 10ms before the
 expiry.
 
 Required properties:
-- compatible      : "nuvoton,npcm750-wdt" for NPCM750 (Poleg).
+- compatible      : "nuvoton,npcm750-wdt" for NPCM750 (Poleg), or
+                    "nuvoton,wpcm450-wdt" for WPCM450 (Hermon).
 - reg             : Offset and length of the register set for the device.
 - interrupts      : Contain the timer interrupt with flags for
                     falling edge.

--
2.30.2

author maintainer
#6 lore raw

PATCH v2 5/10 ARM: npcm: Introduce Nuvoton WPCM450 SoC

In reply to Jonathan Neuschäfer

The WPCM450 is an older BMC SoC in the Nuvoton NPCM family, originally marketed as Winbond WPCM450.

---

v2:
- Reorder lines in Makefile by model number (WPCM450 < NPCM7xx)

---
 arch/arm/mach-npcm/Kconfig   | 12 +++++++++++-
 arch/arm/mach-npcm/Makefile  |  1 +
 arch/arm/mach-npcm/wpcm450.c | 13 +++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-npcm/wpcm450.c
arch/arm/mach-npcm/Kconfig +11 -1
index 7f7002dc2b21f..658c8efb4ca14 100644
@@ -1,11 +1,21 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig ARCH_NPCM
 	bool "Nuvoton NPCM Architecture"
-	depends on ARCH_MULTI_V7
+	depends on ARCH_MULTI_V5 || ARCH_MULTI_V7
 	select PINCTRL
 
 if ARCH_NPCM
 
+config ARCH_WPCM450
+	bool "Support for WPCM450 BMC (Hermon)"
+	depends on ARCH_MULTI_V5
+	select CPU_ARM926T
+	select NPCM7XX_TIMER
+	help
+	  General support for WPCM450 BMC (Hermon).
+
+	  Winbond/Nuvoton WPCM450 BMC based on the ARM926EJ-S.
+
 config ARCH_NPCM7XX
 	bool "Support for NPCM7xx BMC (Poleg)"
 	depends on ARCH_MULTI_V7
arch/arm/mach-npcm/Makefile +1 -0
index 1bc3a70bfab8b..8d61fcd42fb19 100644
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 AFLAGS_headsmp.o		+= -march=armv7-a
 
+obj-$(CONFIG_ARCH_WPCM450)	+= wpcm450.o
 obj-$(CONFIG_ARCH_NPCM7XX)	+= npcm7xx.o
 obj-$(CONFIG_SMP)		+= platsmp.o headsmp.o
arch/arm/mach-npcm/wpcm450.c new file +13 -0
new file mode 100644
index 0000000000000..f17b3dab45af3
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
+// Copyright 2021 Jonathan Neuschäfer
+
+#include <asm/mach/arch.h>
+
+static const char *const wpcm450_dt_match[] = {
+	"nuvoton,wpcm450",
+	NULL
+};
+
+DT_MACHINE_START(WPCM450_DT, "WPCM450 chip")
+	.dt_compat	= wpcm450_dt_match,
+MACHINE_END

--
2.30.2

author maintainer
#7 lore raw

PATCH v2 6/10 irqchip: Add driver for WPCM450 interrupt controller

In reply to Jonathan Neuschäfer

The WPCM450 AIC ("Advanced Interrupt Controller") is the interrupt controller found in the Nuvoton WPCM450 SoC and other Winbond/Nuvoton SoCs.

The list of registers if based on the AMI vendor kernel and the Nuvoton W90N745 datasheet.

Although the hardware supports other interrupt modes, the driver only supports high-level interrupts at the moment, because other modes could not be tested so far.

---

v2:
- Rename IRQS macro to AIC_NUM_IRQS
- Fix IRQ range check
- Use linux/printk.h header instead of linux/console.h
- Add AIC_SCR_PRIORITY_MASK constant
- Add missing register descriptions
- Remove superfluous printk about IRQ flow type mismatch
- Use BIT() macro
- Rename _ack function to _eoi for accuracy, and use handle_fasteoi_irq

---
 arch/arm/mach-npcm/Kconfig        |   1 +
 drivers/irqchip/Kconfig           |   6 ++
 drivers/irqchip/Makefile          |   1 +
 drivers/irqchip/irq-wpcm450-aic.c | 161 ++++++++++++++++++++++++++++++
 4 files changed, 169 insertions(+)
 create mode 100644 drivers/irqchip/irq-wpcm450-aic.c
arch/arm/mach-npcm/Kconfig +1 -0
index 658c8efb4ca14..a71cf1d189ae5 100644
@@ -10,6 +10,7 @@ config ARCH_WPCM450
 	bool "Support for WPCM450 BMC (Hermon)"
 	depends on ARCH_MULTI_V5
 	select CPU_ARM926T
+	select WPCM450_AIC
 	select NPCM7XX_TIMER
 	help
 	  General support for WPCM450 BMC (Hermon).
drivers/irqchip/Kconfig +6 -0
index e74fa206240a1..baf4efec31c67 100644
@@ -586,4 +586,10 @@ config MST_IRQ
 	help
 	  Support MStar Interrupt Controller.
 
+config WPCM450_AIC
+	bool "Nuvoton WPCM450 Advanced Interrupt Controller"
+	depends on ARCH_WPCM450 || COMPILE_TEST
+	help
+	  Support for the interrupt controller in the Nuvoton WPCM450 BMC SoC.
+
 endmenu
drivers/irqchip/Makefile +1 -0
index c59b95a0532c9..bef57937e7296 100644
@@ -113,3 +113,4 @@ obj-$(CONFIG_LOONGSON_PCH_MSI)		+= irq-loongson-pch-msi.o
 obj-$(CONFIG_MST_IRQ)			+= irq-mst-intc.o
 obj-$(CONFIG_SL28CPLD_INTC)		+= irq-sl28cpld.o
 obj-$(CONFIG_MACH_REALTEK_RTL)		+= irq-realtek-rtl.o
+obj-$(CONFIG_WPCM450_AIC)		+= irq-wpcm450-aic.o
drivers/irqchip/irq-wpcm450-aic.c new file +161 -0

161 lines not on this page · raw message

--
2.30.2

#8 lore raw

Re: [PATCH v2 06/10] irqchip: Add driver for WPCM450 interrupt controller

Quoted 37 lines · Jonathan Neuschäfer

The WPCM450 AIC ("Advanced Interrupt Controller") is the interrupt controller found in the Nuvoton WPCM450 SoC and other Winbond/Nuvoton SoCs.

The list of registers if based on the AMI vendor kernel and the Nuvoton W90N745 datasheet.

Although the hardware supports other interrupt modes, the driver only supports high-level interrupts at the moment, because other modes could not be tested so far.

---

v2:
- Rename IRQS macro to AIC_NUM_IRQS
- Fix IRQ range check
- Use linux/printk.h header instead of linux/console.h
- Add AIC_SCR_PRIORITY_MASK constant
- Add missing register descriptions
- Remove superfluous printk about IRQ flow type mismatch
- Use BIT() macro
- Rename _ack function to _eoi for accuracy, and use handle_fasteoi_irq

---
 arch/arm/mach-npcm/Kconfig        |   1 +
 drivers/irqchip/Kconfig           |   6 ++
 drivers/irqchip/Makefile          |   1 +
 drivers/irqchip/irq-wpcm450-aic.c | 161 ++++++++++++++++++++++++++++++
 4 files changed, 169 insertions(+)
 create mode 100644 drivers/irqchip/irq-wpcm450-aic.c
arch/arm/mach-npcm/Kconfig +0 -0
index 658c8efb4ca14..a71cf1d189ae5 100644

arch/arm/mach-npcm/Kconfig config ARCH_WPCM450 · line 16

Quoted 7 lines
arch/arm/mach-npcm/Kconfig +1 -0
@@ -10,6 +10,7 @@ config ARCH_WPCM450
 	bool "Support for WPCM450 BMC (Hermon)"
 	depends on ARCH_MULTI_V5
 	select CPU_ARM926T
+	select WPCM450_AIC
 	select NPCM7XX_TIMER
 	help
 	  General support for WPCM450 BMC (Hermon).

I can't take this patch with this particular hunk, as I don't have this file in my tree. I can either drop this line, or delay the merging of this patch to a later point in time.

The driver otherwise looks ready.

Thanks,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
author maintainer
#9 lore raw

Re: [PATCH v2 06/10] irqchip: Add driver for WPCM450 interrupt controller

Quoted 2 lines · Marc Zyngier

On Tue, 06 Apr 2021 13:09:17 +0100, Jonathan Neuschäfer <[email protected]> wrote:

...

Quoted 8 lines
Quoted 8 lines
arch/arm/mach-npcm/Kconfig +0 -0
index 658c8efb4ca14..a71cf1d189ae5 100644
@@ -10,6 +10,7 @@ config ARCH_WPCM450
 	bool "Support for WPCM450 BMC (Hermon)"
 	depends on ARCH_MULTI_V5
 	select CPU_ARM926T
Quoted 8 lines

arch/arm/mach-npcm/Kconfig config ARCH_WPCM450 · line 16

Quoted 4 lines
arch/arm/mach-npcm/Kconfig +1 -0
+	select WPCM450_AIC
 	select NPCM7XX_TIMER
 	help
 	  General support for WPCM450 BMC (Hermon).

I can't take this patch with this particular hunk, as I don't have this file in my tree. I can either drop this line, or delay the merging of this patch to a later point in time.

Hmm, indeed. Please apply the patch without this hunk. I'll reintroduce it in another patch.

Quoted 2 lines

The driver otherwise looks ready.

Good.

Thanks,
Jonathan

#10 lore raw

[irqchip: irq/irqchip-next] irqchip: Add driver for WPCM450 interrupt controller

In reply to Jonathan Neuschäfer
The following commit has been merged into the irq/irqchip-next branch of irqchip:

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     fead4dd496631707549f414b4059afb86ea8fb80
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/fead4dd496631707549f414b4059afb86ea8fb80
Author:        Jonathan Neuschäfer <[email protected]>
AuthorDate:    Tue, 06 Apr 2021 14:09:17 +02:00
Committer:     Marc Zyngier <[email protected]>
CommitterDate: Wed, 07 Apr 2021 13:26:00 +01:00

irqchip: Add driver for WPCM450 interrupt controller

The WPCM450 AIC ("Advanced Interrupt Controller") is the interrupt controller found in the Nuvoton WPCM450 SoC and other Winbond/Nuvoton SoCs.

The list of registers if based on the AMI vendor kernel and the Nuvoton W90N745 datasheet.

Although the hardware supports other interrupt modes, the driver only supports high-level interrupts at the moment, because other modes could not be tested so far.

---
 drivers/irqchip/Kconfig           |   6 +-
 drivers/irqchip/Makefile          |   1 +-
 drivers/irqchip/irq-wpcm450-aic.c | 161 +++++++++++++++++++++++++++++-
 3 files changed, 168 insertions(+)
 create mode 100644 drivers/irqchip/irq-wpcm450-aic.c
drivers/irqchip/Kconfig +6 -0
index 15536e3..38ad9dc 100644
@@ -577,4 +577,10 @@ config MST_IRQ
 	help
 	  Support MStar Interrupt Controller.
 
+config WPCM450_AIC
+	bool "Nuvoton WPCM450 Advanced Interrupt Controller"
+	depends on ARCH_WPCM450 || COMPILE_TEST
+	help
+	  Support for the interrupt controller in the Nuvoton WPCM450 BMC SoC.
+
 endmenu
drivers/irqchip/Makefile +1 -0
index c59b95a..bef5793 100644
@@ -113,3 +113,4 @@ obj-$(CONFIG_LOONGSON_PCH_MSI)		+= irq-loongson-pch-msi.o
 obj-$(CONFIG_MST_IRQ)			+= irq-mst-intc.o
 obj-$(CONFIG_SL28CPLD_INTC)		+= irq-sl28cpld.o
 obj-$(CONFIG_MACH_REALTEK_RTL)		+= irq-realtek-rtl.o
+obj-$(CONFIG_WPCM450_AIC)		+= irq-wpcm450-aic.o
drivers/irqchip/irq-wpcm450-aic.c new file +161 -0

161 lines not on this page · raw message

#11 lore raw

Re: [irqchip: irq/irqchip-next] irqchip: Add driver for WPCM450 interrupt controller

Thank you for the patch! Yet something to improve:

Hi "irqchip-bot,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/irq/core]
[also build test ERROR on linux/master linus/master v5.12-rc6 next-20210407] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/irqchip-bot-for-Jonathan-Neusch-fer/irqchip-Add-driver-for-WPCM450-interrupt-controller/20210407-203932
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 883ccef355b910398b99dfaf96d40557479a7e9b
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/8d413120619cd8ca14f38e623fad9e0acc44397c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review irqchip-bot-for-Jonathan-Neusch-fer/irqchip-Add-driver-for-WPCM450-interrupt-controller/20210407-203932 git checkout 8d413120619cd8ca14f38e623fad9e0acc44397c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

>> drivers/irqchip/irq-wpcm450-aic.c:9:10: fatal error: asm/exception.h: No such file or directory

9 | #include <asm/exception.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.

vim +9 drivers/irqchip/irq-wpcm450-aic.c

     8	
   > 9	#include <asm/exception.h>
    10	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

author maintainer
#12 lore raw

PATCH v2 7/10 watchdog: npcm: Add support for WPCM450

In reply to Jonathan Neuschäfer

Add a compatible string for WPCM450, which has essentially the same watchdog mechanism as NPCM750.

---

v2:
- Added patch description

---
 drivers/watchdog/npcm_wdt.c | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/npcm_wdt.c +1 -0
index 765577f11c8db..28a24caa2627c 100644
@@ -229,6 +229,7 @@ static int npcm_wdt_probe(struct platform_device *pdev)
 
 #ifdef CONFIG_OF
 static const struct of_device_id npcm_wdt_match[] = {
+	{.compatible = "nuvoton,wpcm450-wdt"},
 	{.compatible = "nuvoton,npcm750-wdt"},
 	{},
 };

--
2.30.2

maintainer Acked-by on v2 7/10
#13 lore raw

Re: [PATCH v2 07/10] watchdog: npcm: Add support for WPCM450

Quoted 4 lines · Jonathan Neuschäfer

Add a compatible string for WPCM450, which has essentially the same watchdog mechanism as NPCM750.

Quoted 23 lines

---

v2:
- Added patch description

---
 drivers/watchdog/npcm_wdt.c | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/npcm_wdt.c +1 -1
index 765577f11c8db..28a24caa2627c 100644
@@ -229,6 +229,7 @@ static int npcm_wdt_probe(struct platform_device *pdev)
 
 #ifdef CONFIG_OF
 static const struct of_device_id npcm_wdt_match[] = {
+	{.compatible = "nuvoton,wpcm450-wdt"},
 	{.compatible = "nuvoton,npcm750-wdt"},
 	{},
 };
--

2.30.2

author maintainer
#14 lore raw

PATCH v2 8/10 ARM: dts: Add devicetree for Nuvoton WPCM450 BMC chip

In reply to Jonathan Neuschäfer

The WPCM450 is an older BMC SoC in the Nuvoton NPCM family, originally marketed as Winbond WPCM450.

This patch adds a devicetree with basic functionality.

---

v2:
- no changes

---
 arch/arm/boot/dts/nuvoton-wpcm450.dtsi | 76 ++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)
 create mode 100644 arch/arm/boot/dts/nuvoton-wpcm450.dtsi
arch/arm/boot/dts/nuvoton-wpcm450.dtsi new file +76 -0
new file mode 100644
index 0000000000000..d7cbeb1874840
@@ -0,0 +1,76 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+// Copyright 2021 Jonathan Neuschäfer
+
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+	compatible = "nuvoton,wpcm450";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			compatible = "arm,arm926ej-s";
+			device_type = "cpu";
+			reg = <0>;
+		};
+	};
+
+	clk24m: clock-24mhz {
+		/* 24 MHz dummy clock */
+		compatible = "fixed-clock";
+		clock-frequency = <24000000>;
+		#clock-cells = <0>;
+	};
+
+	soc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		interrupt-parent = <&aic>;
+		ranges;
+
+		serial0: serial@b8000000 {
+			compatible = "nuvoton,wpcm450-uart";
+			reg = <0xb8000000 0x20>;
+			reg-shift = <2>;
+			interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk24m>;
+			status = "disabled";
+		};
+
+		serial1: serial@b8000100 {
+			compatible = "nuvoton,wpcm450-uart";
+			reg = <0xb8000100 0x20>;
+			reg-shift = <2>;
+			interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk24m>;
+			status = "disabled";
+		};
+
+		timer0: timer@b8001000 {
+			compatible = "nuvoton,wpcm450-timer";
+			interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
+			reg = <0xb8001000 0x1c>;
+			clocks = <&clk24m>;
+		};
+
+		watchdog0: watchdog@b800101c {
+			compatible = "nuvoton,wpcm450-wdt";
+			interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
+			reg = <0xb800101c 0x4>;
+			clocks = <&clk24m>;
+			status = "disabled";
+		};
+
+		aic: interrupt-controller@b8002000 {
+			compatible = "nuvoton,wpcm450-aic";
+			reg = <0xb8002000 0x1000>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+};

--
2.30.2

author maintainer
#15 lore raw

PATCH v2 9/10 ARM: dts: Add devicetree for Supermicro X9SCi-LN4F based on WPCM450

In reply to Jonathan Neuschäfer

The Supermicro X9SCi-LN4F is a server mainboard featuring the WPCM450 BMC. This patch adds a minimal devicetree for Linux running on the BMC.

---

v2:
- Group wpcm450 devicetree with npcm7xx devicetrees in the Makefile

---
 arch/arm/boot/dts/Makefile                    |  2 +
 .../nuvoton-wpcm450-supermicro-x9sci-ln4f.dts | 40 +++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 arch/arm/boot/dts/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts
arch/arm/boot/dts/Makefile +2 -0
index 8e5d4ab4e75e6..5a9d99d5443e4 100644
@@ -333,6 +333,8 @@ dtb-$(CONFIG_ARCH_LPC18XX) += \
 dtb-$(CONFIG_ARCH_LPC32XX) += \
 	lpc3250-ea3250.dtb \
 	lpc3250-phy3250.dtb
+dtb-$(CONFIG_ARCH_WPCM450) += \
+	nuvoton-wpcm450-supermicro-x9sci-ln4f.dtb
 dtb-$(CONFIG_ARCH_NPCM7XX) += \
 	nuvoton-npcm730-gsj.dtb \
 	nuvoton-npcm730-kudo.dtb \
arch/arm/boot/dts/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts new file +40 -0
new file mode 100644
index 0000000000000..83f27fbf4e939
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+// Copyright 2021 Jonathan Neuschäfer
+
+/dts-v1/;
+
+/* The last 16 MiB are dedicated to the GPU */
+/memreserve/ 0x07000000 0x01000000;
+
+#include "nuvoton-wpcm450.dtsi"
+
+/ {
+	model = "Supermicro X9SCi-LN4F BMC";
+	compatible = "supermicro,x9sci-ln4f-bmc", "nuvoton,wpcm450";
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0 0x08000000>; /* 128 MiB */
+	};
+};
+
+&serial0 {
+	/*
+	 * Debug serial port. TX is exposed on the right pad of unpopulated
+	 * resistor R1247, RX on the right pad of R1162.
+	 */
+	status = "okay";
+};
+
+&serial1 {
+	/* "Serial over LAN" port. Connected to ttyS2 of the host system. */
+	status = "okay";
+};
+
+&watchdog0 {
+	status = "okay";
+};

--
2.30.2

author maintainer
#16 lore raw

PATCH v2 10/10 MAINTAINERS: Add entry for Nuvoton WPCM450

In reply to Jonathan Neuschäfer

I am adding myself as the maintainer of WPCM450-related code.

---

v2:
- Instead of expanding the NPCM entry, I'm adding a new one only for WPCM450.

---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +9 -0
index d92f85ca831d3..661770e8e6fc1 100644
@@ -2194,6 +2194,15 @@ F:	drivers/*/*npcm*
 F:	drivers/*/*/*npcm*
 F:	include/dt-bindings/clock/nuvoton,npcm7xx-clock.h
 
+ARM/NUVOTON WPCM450 ARCHITECTURE
+M:	Jonathan Neuschäfer <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+S:	Maintained
+F:	Documentation/devicetree/bindings/*/*wpcm*
+F:	arch/arm/boot/dts/nuvoton-wpcm450*
+F:	arch/arm/mach-npcm/wpcm450.c
+F:	drivers/*/*wpcm*
+
 ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT
 L:	[email protected] (subscribers-only)
 S:	Orphan

--
2.30.2

maintainer
#17 lore raw
In reply to Jonathan Neuschäfer
Quoted 4 lines · Jonathan Neuschäfer

This series adds basic support for the Nuvoton WPCM450 BMC SoC. It's an older SoC but still commonly found on eBay, mostly in Supermicro X9 server boards.

Quoted 8 lines

Third-party documentation is available at: https://github.com/neuschaefer/wpcm450/wiki

Patches 1-4 add devicetree bindings for the WPCM450 SoC and its various parts. Patches 5-7 add arch and driver support. Patches 8 and 9 add a devicetree for the SoC and a board based on it. Patch 10 finally updates the MAINTAINERS file.

Patch 2 requires "dt-bindings: arm: Convert nuvoton,npcm750 binding to YAML"
(https://lore.kernel.org/lkml/[email protected]/)

Hi Jonathan,

It appears these patches are doing roughly the right thing, and we may still be able to get them into v5.13, but I'm not sure what your plan for maintaining them is. The two options are that you either send your patches to be picked up by Joel, or you send everything directly to [email protected] once it's fully reviewed.

I only noticed your series when patch 9/10 made it into the [email protected] patchwork because of the Cc, but none of the other ones did.

If you end up with the second option, we can go through what this involves off-list.

Regarding the Cc:[email protected], please add that only for patches that are already reviewed and ready to be picked up, ideally with a cover letter that describes what the plan is for merging. If you need me to review the platform code, use my [email protected] or [email protected] addresses.

Arnd

author maintainer
#18 lore raw
Quoted 15 lines · Arnd Bergmann
Quoted 4 lines · Jonathan Neuschäfer

This series adds basic support for the Nuvoton WPCM450 BMC SoC. It's an older SoC but still commonly found on eBay, mostly in Supermicro X9 server boards.

Quoted 8 lines

Third-party documentation is available at: https://github.com/neuschaefer/wpcm450/wiki

Patches 1-4 add devicetree bindings for the WPCM450 SoC and its various parts. Patches 5-7 add arch and driver support. Patches 8 and 9 add a devicetree for the SoC and a board based on it. Patch 10 finally updates the MAINTAINERS file.

Patch 2 requires "dt-bindings: arm: Convert nuvoton,npcm750 binding to YAML"
(https://lore.kernel.org/lkml/[email protected]/)

Quoted 7 lines

Hi Jonathan,

It appears these patches are doing roughly the right thing, and we may still be able to get them into v5.13, but I'm not sure what your plan for maintaining them is. The two options are that you either send your patches to be picked up by Joel, or you send everything directly to [email protected] once it's fully reviewed.

The route via Joel sounds alright with me. I've Cc'd him on this version of the series.

Quoted 10 lines

I only noticed your series when patch 9/10 made it into the [email protected] patchwork because of the Cc, but none of the other ones did.

If you end up with the second option, we can go through what this involves off-list.

Regarding the Cc:[email protected], please add that only for patches that are already reviewed and ready to be picked up, ideally with a cover letter that describes what the plan is for merging. If you need me to review the platform code, use my [email protected] or [email protected] addresses.

Ah sorry, [email protected] slipped in automatically because of get_maintainers.pl.

The platform code[1] is rather simple, essentially just hooking up the nuvoton,wpcm450 compatible string.

Thanks,
Jonathan

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

Reviewed-by
#19 lore raw
Quoted 19 lines · Jonathan Neuschäfer
Quoted 17 lines · Arnd Bergmann
Quoted 4 lines · Jonathan Neuschäfer

This series adds basic support for the Nuvoton WPCM450 BMC SoC. It's an older SoC but still commonly found on eBay, mostly in Supermicro X9 server boards.

Quoted 8 lines

Third-party documentation is available at: https://github.com/neuschaefer/wpcm450/wiki

Patches 1-4 add devicetree bindings for the WPCM450 SoC and its various parts. Patches 5-7 add arch and driver support. Patches 8 and 9 add a devicetree for the SoC and a board based on it. Patch 10 finally updates the MAINTAINERS file.

Patch 2 requires "dt-bindings: arm: Convert nuvoton,npcm750 binding to YAML"
(https://lore.kernel.org/lkml/[email protected]/)

Hi Jonathan,

Quoted 8 lines
Quoted 5 lines

It appears these patches are doing roughly the right thing, and we may still be able to get them into v5.13, but I'm not sure what your plan for maintaining them is. The two options are that you either send your patches to be picked up by Joel, or you send everything directly to [email protected] once it's fully reviewed.

The route via Joel sounds alright with me. I've Cc'd him on this version of the series.

I've had a look at the series and it looks good to me:

Nice work Jonathan.

I'll put this in it's own branch along with the bindings change it depends on and send a pull request to Arnd for v5.13.

Cheers,

Joel

author maintainer
#20 lore raw
Quoted 29 lines · Joel Stanley
Quoted 19 lines · Jonathan Neuschäfer
Quoted 17 lines · Arnd Bergmann
Quoted 4 lines · Jonathan Neuschäfer

This series adds basic support for the Nuvoton WPCM450 BMC SoC. It's an older SoC but still commonly found on eBay, mostly in Supermicro X9 server boards.

Quoted 8 lines

Third-party documentation is available at: https://github.com/neuschaefer/wpcm450/wiki

Patches 1-4 add devicetree bindings for the WPCM450 SoC and its various parts. Patches 5-7 add arch and driver support. Patches 8 and 9 add a devicetree for the SoC and a board based on it. Patch 10 finally updates the MAINTAINERS file.

Patch 2 requires "dt-bindings: arm: Convert nuvoton,npcm750 binding to YAML"
(https://lore.kernel.org/lkml/[email protected]/)

Hi Jonathan,

Quoted 8 lines
Quoted 5 lines

It appears these patches are doing roughly the right thing, and we may still be able to get them into v5.13, but I'm not sure what your plan for maintaining them is. The two options are that you either send your patches to be picked up by Joel, or you send everything directly to [email protected] once it's fully reviewed.

The route via Joel sounds alright with me. I've Cc'd him on this version of the series.

Quoted 8 lines

I've had a look at the series and it looks good to me:

Nice work Jonathan.

I'll put this in it's own branch along with the bindings change it depends on and send a pull request to Arnd for v5.13.

Thanks a bunch!

A few patches are going through other branches (IRQ bindings+driver; watchdog bindings+driver probably, I guess). That leaves the following patches to go into your branch, AFAIUI:

[PATCH v2 01/10] dt-bindings: vendor-prefixes: Add Supermicro
[PATCH v2 02/10] dt-bindings: arm: npcm: Add nuvoton,wpcm450 compatible string [PATCH v2 05/10] ARM: npcm: Introduce Nuvoton WPCM450 SoC
[PATCH v2 08/10] ARM: dts: Add devicetree for Nuvoton WPCM450 BMC chip [PATCH v2 09/10] ARM: dts: Add devicetree for Supermicro X9SCi-LN4F based on WPCM450 [PATCH v2 10/10] MAINTAINERS: Add entry for Nuvoton WPCM450

Jonathan

maintainer
#21 lore raw
Quoted 17 lines · Jonathan Neuschäfer
Quoted 9 lines · Joel Stanley

On Tue, 6 Apr 2021 at 21:59, Jonathan Neuschäfer <[email protected]> wrote:
I've had a look at the series and it looks good to me:

Nice work Jonathan.

I'll put this in it's own branch along with the bindings change it depends on and send a pull request to Arnd for v5.13.

Thanks a bunch!

A few patches are going through other branches (IRQ bindings+driver; watchdog bindings+driver probably, I guess). That leaves the following patches to go into your branch, AFAIUI:

Quoted 6 lines

[PATCH v2 01/10] dt-bindings: vendor-prefixes: Add Supermicro
[PATCH v2 02/10] dt-bindings: arm: npcm: Add nuvoton,wpcm450 compatible string [PATCH v2 05/10] ARM: npcm: Introduce Nuvoton WPCM450 SoC
[PATCH v2 08/10] ARM: dts: Add devicetree for Nuvoton WPCM450 BMC chip [PATCH v2 09/10] ARM: dts: Add devicetree for Supermicro X9SCi-LN4F based on WPCM450 [PATCH v2 10/10] MAINTAINERS: Add entry for Nuvoton WPCM450

Actually for an initial merge, we sometimes just put all the patches into one branch in the soc tree to avoid conflicts. Unfortunately we already have a (trivial) conflict now anyway since I merged the irqchip driver for the Apple M1 SoC through the soc tree but the wpcm irqchip through the irqchip tree.

You did nothing wrong here, this would have just been a way to make the initial merge a bit easier, and have a tree that is more easily bisectible when one branch in the merge window contains all the code that is needed for booting.

Arnd

Applied
#22 lore raw
In reply to Jonathan Neuschäfer
Quoted 10 lines · Jonathan Neuschäfer

This series adds basic support for the Nuvoton WPCM450 BMC SoC. It's an older SoC but still commonly found on eBay, mostly in Supermicro X9 server boards.

Third-party documentation is available at: https://github.com/neuschaefer/wpcm450/wiki

Patches 1-4 add devicetree bindings for the WPCM450 SoC and its various parts. Patches 5-7 add arch and driver support. Patches 8 and 9 add a devicetree for the SoC and a board based on it. Patch 10 finally updates the MAINTAINERS file.

[...]

Applied to irq/irqchip-next, thanks!

[03/10] dt-bindings: interrupt-controller: Add nuvoton, wpcm450-aic

        commit: 7c18715546203a09f859dac2fe3ea8aceec5f235
[06/10] irqchip: Add driver for WPCM450 interrupt controller
        commit: fead4dd496631707549f414b4059afb86ea8fb80

Cheers,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.