Skip to contentSkip to conversation

arm: npcm: add basic support for Nuvoton BMCs

PATCH Superseded Tomer Maimon 2 participants 6 messages Dec 14, 2017 – Dec 17, 2017

Subsystems (4)

v2 of 12 Superseded Latest is v12 →

lore
Share & tools
lore

Tomer Maimon

author maintainer
#0 lore raw

v2 cover arm: npcm: add basic support for Nuvoton BMCs

Changes since version 1:
- Add dt-binding documentation to NPCM
- Add dt-binding documentation to npcm7xx-smp

This patch set adds support for the Nuvoton NPCM Baseboard Management Controller (BMC) SoC architecture as well as the NPCM750 variant. NPCM is an ARM based SoC with external DDR RAM and supports a large set of peripherals.

The NPCM750 is based on Cortex A9 and comes in single core and dual core flavors.

The device tree added in this patchset has a number of bindings for which the corresponding drivers will be sent out later and thus do not yet have binding documentation. Apologies in advance if you would like the bindings to be added along with the corresponding drivers.

this patch set based on Brendan Higgins patcehs.
https://patchwork.kernel.org/project/linux-arm-kernel/list/?submitter=170155

Thanks!

Tomer Maimon (3):
arm: npcm: add basic support for Nuvoton BMCs
arm: dts: add Nuvoton NPCM750 device tree
MAINTAINERS: Add entry for Nuvoton NPCM architecture

 .../arm/cpu-enable-method/nuvoton,npcm7xx-smp      |   42 +
 .../devicetree/bindings/arm/npcm/npcm.txt          |    6 +
 MAINTAINERS                                        |   13 +
 arch/arm/Kconfig                                   |    2 +
 arch/arm/Makefile                                  |    1 +
 arch/arm/boot/dts/nuvoton-npcm750-evb.dts          |  468 ++++++++
 arch/arm/boot/dts/nuvoton-npcm750-gpio.dtsi        |  877 +++++++++++++++
 arch/arm/boot/dts/nuvoton-npcm750.dtsi             | 1189 ++++++++++++++++++++
 arch/arm/configs/PolegSVB_defconfig                |  428 +++++++
 arch/arm/mach-npcm/Kconfig                         |   61 +
 arch/arm/mach-npcm/Makefile                        |    6 +
 arch/arm/mach-npcm/headsmp.S                       |   22 +
 arch/arm/mach-npcm/npcm7xx.c                       |   27 +
 arch/arm/mach-npcm/platsmp.c                       |   86 ++
 14 files changed, 3228 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/cpu-enable-method/nuvoton,npcm7xx-smp
 create mode 100644 Documentation/devicetree/bindings/arm/npcm/npcm.txt
 create mode 100644 arch/arm/boot/dts/nuvoton-npcm750-evb.dts
 create mode 100644 arch/arm/boot/dts/nuvoton-npcm750-gpio.dtsi
 create mode 100644 arch/arm/boot/dts/nuvoton-npcm750.dtsi
 create mode 100644 arch/arm/configs/PolegSVB_defconfig
 create mode 100644 arch/arm/mach-npcm/Kconfig
 create mode 100644 arch/arm/mach-npcm/Makefile
 create mode 100644 arch/arm/mach-npcm/headsmp.S
 create mode 100644 arch/arm/mach-npcm/npcm7xx.c
 create mode 100644 arch/arm/mach-npcm/platsmp.c
Signature · 1 line
2.14.1
author maintainer
#1 lore raw

PATCH v2 1/3 arm: npcm: add basic support for Nuvoton BMCs

Adds basic support for the Nuvoton NPCM750 BMC.

Based on [v8,1/3] arm: npcm: add basic support for Nuvoton BMCs patch:
Brendan Higgins : - https://patchwork.kernel.org/patch/10063409/

---
 arch/arm/Kconfig                    |   2 +
 arch/arm/Makefile                   |   1 +
 arch/arm/configs/PolegSVB_defconfig | 428 ++++++++++++++++++++++++++++++++++++
 arch/arm/mach-npcm/Kconfig          |  61 +++++
 arch/arm/mach-npcm/Makefile         |   6 +
 arch/arm/mach-npcm/headsmp.S        |  22 ++
 arch/arm/mach-npcm/npcm7xx.c        |  27 +++
 arch/arm/mach-npcm/platsmp.c        |  86 ++++++++
 8 files changed, 633 insertions(+)
 create mode 100644 arch/arm/configs/PolegSVB_defconfig
 create mode 100644 arch/arm/mach-npcm/Kconfig
 create mode 100644 arch/arm/mach-npcm/Makefile
 create mode 100644 arch/arm/mach-npcm/headsmp.S
 create mode 100644 arch/arm/mach-npcm/npcm7xx.c
 create mode 100644 arch/arm/mach-npcm/platsmp.c
arch/arm/Kconfig +2 -0
index 61a0cb15067e..05543f1cfbde 100644
@@ -782,6 +782,8 @@ source "arch/arm/mach-netx/Kconfig"
 
 source "arch/arm/mach-nomadik/Kconfig"
 
+source "arch/arm/mach-npcm/Kconfig"
+
 source "arch/arm/mach-nspire/Kconfig"
 
 source "arch/arm/plat-omap/Kconfig"
arch/arm/Makefile +1 -0
index 47d3a1ab08d2..60ca50c7d762 100644
@@ -191,6 +191,7 @@ machine-$(CONFIG_ARCH_MEDIATEK)		+= mediatek
 machine-$(CONFIG_ARCH_MXS)		+= mxs
 machine-$(CONFIG_ARCH_NETX)		+= netx
 machine-$(CONFIG_ARCH_NOMADIK)		+= nomadik
+machine-$(CONFIG_ARCH_NPCM)		+= npcm
 machine-$(CONFIG_ARCH_NSPIRE)		+= nspire
 machine-$(CONFIG_ARCH_OXNAS)		+= oxnas
 machine-$(CONFIG_ARCH_OMAP1)		+= omap1
arch/arm/configs/PolegSVB_defconfig new file +428 -0

428 lines not on this page · raw message

arch/arm/mach-npcm/Kconfig new file +61 -0

61 lines not on this page · raw message

arch/arm/mach-npcm/Makefile new file +6 -0
new file mode 100644
index 000000000000..37f05e4bd0b3
@@ -0,0 +1,6 @@
+AFLAGS_headsmp.o		+= -march=armv7-a
+
+obj-$(CONFIG_ARCH_NPCM7XX)	+= npcm7xx.o
+obj-$(CONFIG_ARCH_NPCM750)	+= platsmp.o headsmp.o
+
+
arch/arm/mach-npcm/headsmp.S new file +22 -0
new file mode 100644
index 000000000000..5456268453f0
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2017 Nuvoton Technology corporation.
+ * Copyright 2017 Google, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/linkage.h>
+#include <linux/init.h>
+#include <asm/assembler.h>
+
+/*
+ * The boot ROM does not start secondary CPUs in SVC mode, so we need to do that
+ * here.
+ */
+ENTRY(npcm7xx_secondary_startup)
+	safe_svcmode_maskall r0
+
+	b	secondary_startup
+ENDPROC(npcm7xx_secondary_startup)
arch/arm/mach-npcm/npcm7xx.c new file +27 -0
new file mode 100644
index 000000000000..fa1759b85300
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017 Nuvoton Technology corporation.
+ * Copyright 2017 Google, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+#include <asm/mach/map.h>
+#include <asm/hardware/cache-l2x0.h>
+
+static const char *const npcm7xx_dt_match[] = {
+	"nuvoton,npcm750",
+	NULL
+};
+
+DT_MACHINE_START(NPCM7XX_DT, "NPCM7XX Chip family")
+	.atag_offset	= 0x100,
+	.dt_compat	= npcm7xx_dt_match,
+	.l2c_aux_val	= 0x0,
+	.l2c_aux_mask	= ~0x0,
+MACHINE_END
arch/arm/mach-npcm/platsmp.c new file +86 -0

86 lines not on this page · raw message

Signature · 1 line
2.14.1
author maintainer
#2 lore raw

PATCH v2 2/3 arm: dts: add Nuvoton NPCM750 device tree

In reply to Tomer Maimon

Add full device tree for all Nuvoton NPCM750 BMCs and a board specific device tree for the NPCM750 (Poleg) evaluation board.

Based on [v8,2/3] arm: dts: add Nuvoton NPCM750 device tree patch:
Brendan Higgins : - https://patchwork.kernel.org/patch/10063497/

---
 .../arm/cpu-enable-method/nuvoton,npcm7xx-smp      |   42 +
 .../devicetree/bindings/arm/npcm/npcm.txt          |    6 +
 arch/arm/boot/dts/nuvoton-npcm750-evb.dts          |  468 ++++++++
 arch/arm/boot/dts/nuvoton-npcm750-gpio.dtsi        |  877 +++++++++++++++
 arch/arm/boot/dts/nuvoton-npcm750.dtsi             | 1189 ++++++++++++++++++++
 5 files changed, 2582 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/cpu-enable-method/nuvoton,npcm7xx-smp
 create mode 100644 Documentation/devicetree/bindings/arm/npcm/npcm.txt
 create mode 100644 arch/arm/boot/dts/nuvoton-npcm750-evb.dts
 create mode 100644 arch/arm/boot/dts/nuvoton-npcm750-gpio.dtsi
 create mode 100644 arch/arm/boot/dts/nuvoton-npcm750.dtsi
Documentation/devicetree/bindings/arm/cpu-enable-method/nuvoton,npcm7xx-smp new file +42 -0
new file mode 100644
index 000000000000..e81f85b400cf
@@ -0,0 +1,42 @@
+=========================================================
+Secondary CPU enable-method "nuvoton,npcm7xx-smp" binding
+=========================================================
+
+To apply to all CPUs, a single "nuvoton,npcm7xx-smp" enable method should be
+defined in the "cpus" node.
+
+Enable method name:	"nuvoton,npcm7xx-smp"
+Compatible machines:	"nuvoton,npcm750"
+Compatible CPUs:	"arm,cortex-a9"
+Related properties:	(none)
+
+Note:
+This enable method needs valid nodes compatible with "arm,cortex-a9-scu" and
+"nuvoton,npcm750-gcr".
+
+Example:
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		enable-method = "nuvoton,npcm7xx-smp";
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a9";
+			clocks = <&clk NPCM7XX_CLK_CPU>;
+			clock-names = "clk_cpu";
+			reg = <0>;
+			next-level-cache = <&L2>;
+		};
+
+		cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a9";
+			clocks = <&clk NPCM7XX_CLK_CPU>;
+			clock-names = "clk_cpu";
+			reg = <1>;
+			next-level-cache = <&L2>;
+		};
+	};
+
Documentation/devicetree/bindings/arm/npcm/npcm.txt new file +6 -0
new file mode 100644
index 000000000000..2d87d9ecea85
@@ -0,0 +1,6 @@
+NPCM Platforms Device Tree Bindings
+-----------------------------------
+NPCM750 SoC
+Required root node properties:
+	- compatible = "nuvoton,npcm750";
+
arch/arm/boot/dts/nuvoton-npcm750-evb.dts new file +468 -0

468 lines not on this page · raw message

arch/arm/boot/dts/nuvoton-npcm750-gpio.dtsi new file +877 -0

877 lines not on this page · raw message

arch/arm/boot/dts/nuvoton-npcm750.dtsi new file +1189 -0

1,189 lines not on this page · raw message

Signature · 1 line
2.14.1
author maintainer
#3 lore raw

PATCH v2 3/3 MAINTAINERS: Add entry for Nuvoton NPCM architecture

In reply to Tomer Maimon

Add maintainers and reviewers for Nuvoton NPCM architecture

Based on [v8,3/3] MAINTAINERS: Add entry for Nuvoton NPCM architecture patch:
Brendan Higgins : - https://patchwork.kernel.org/patch/10063413/

---
 MAINTAINERS | 13 +++++++++++++
 1 file changed, 13 insertions(+)
MAINTAINERS +13 -0
index 1c3feffb1c1c..9b90748b729d 100644
@@ -1598,6 +1598,19 @@ F:	drivers/pinctrl/nomadik/
 F:	drivers/i2c/busses/i2c-nomadik.c
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git
 
+ARM/NUVOTON NPCM ARCHITECTURE
+M:	Avi Fishman <[email protected]>
+M:	Tomer Maimon <[email protected]>
+R:	Brendan Higgins <[email protected]>
+R:	Rick Altherr <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+S:	Supported
+F:	arch/arm/mach-npcm/
+F:	arch/arm/boot/dts/nuvoton-npcm*
+F:	include/dt-bindings/clock/nuvoton,npcm7xx-clks.h
+F:	drivers/*/*npcm*
+F:	Documentation/*/*npcm*
+
 ARM/NUVOTON W90X900 ARM ARCHITECTURE
 M:	Wan ZongShun <[email protected]>
 L:	[email protected] (moderated for non-subscribers)
Signature · 1 line
2.14.1
#4 lore raw
In reply to Tomer Maimon
Quoted 11 lines · Tomer Maimon

Changes since version 1:
- Add dt-binding documentation to NPCM
- Add dt-binding documentation to npcm7xx-smp

This patch set adds support for the Nuvoton NPCM Baseboard Management Controller (BMC) SoC architecture as well as the NPCM750 variant. NPCM is an ARM based SoC with external DDR RAM and supports a large set of peripherals.

The NPCM750 is based on Cortex A9 and comes in single core and dual core flavors.

Quoted 7 lines

The device tree added in this patchset has a number of bindings for which the corresponding drivers will be sent out later and thus do not yet have binding documentation. Apologies in advance if you would like the bindings to be added along with the corresponding drivers.

this patch set based on Brendan Higgins patcehs.
https://patchwork.kernel.org/project/linux-arm-kernel/list/?submitter=170155

Thanks for the submission. I am happy to merge these in to the OpenBMC tree while the review is ongoing upstream. Please cc me on the upstream patches so I can assist with review.

Convention is moving to use SPDX-License-Identifier tags for new files instead of spelling out the GPL licence message. Please consider updating your patches to use these tags before you send out v3.

Finally, please follow the tips in our documentation on adding a branch to the subject line:

https://github.com/openbmc/linux/wiki/SubmittingPatches#use-the-git-tools

git format-patch -v3 --subject-prefix="PATCH linux dev-4.13" ...

This is only for submissions to the OpenBMC tree.

I noticed you're sending through your work mail server, but from your gmail address. This might cause delivery problems, I recommend using the gmail SMTP servers instead.

Cheers,

Joel

author maintainer
#5 lore raw

Hi Joel,

Thanks for you comments

Quoted 20 lines · Joel Stanley
Quoted 11 lines · Tomer Maimon

Changes since version 1:
- Add dt-binding documentation to NPCM
- Add dt-binding documentation to npcm7xx-smp

This patch set adds support for the Nuvoton NPCM Baseboard Management Controller (BMC) SoC architecture as well as the NPCM750 variant. NPCM is an ARM based SoC with external DDR RAM and supports a large set of peripherals.

The NPCM750 is based on Cortex A9 and comes in single core and dual core flavors.

Quoted 7 lines

The device tree added in this patchset has a number of bindings for which the corresponding drivers will be sent out later and thus do not yet have binding documentation. Apologies in advance if you would like the bindings to be added along with the corresponding drivers.

this patch set based on Brendan Higgins patcehs.
https://patchwork.kernel.org/project/linux-arm-kernel/list/?submitter=170155

Quoted 7 lines

Thanks for the submission. I am happy to merge these in to the OpenBMC tree while the review is ongoing upstream. Please cc me on the upstream patches so I can assist with review.

Convention is moving to use SPDX-License-Identifier tags for new files instead of spelling out the GPL licence message. Please consider updating your patches to use these tags before you send out v3.

modify on v3

Quoted 6 lines

Finally, please follow the tips in our documentation on adding a branch to the subject line:

https://github.com/openbmc/linux/wiki/SubmittingPatches#use-the-git-tools

Quoted 7 lines

git format-patch -v3 --subject-prefix="PATCH linux dev-4.13" ...

This is only for submissions to the OpenBMC tree.

I noticed you're sending through your work mail server, but from your gmail address. This might cause delivery problems, I recommend using the gmail SMTP servers instead.

Sorry it will take some time because our IT is on HANUKA holiday (meanwhile i will continue to send it the through my work mail server)

Quoted 4 lines

Cheers,

Joel