arm-soc: Add support for Sigma Designs Tango4 platforms
Subsystems (4)
PATCH v4 1/1 arm-soc: Add support for Sigma Designs Tango4 platforms
Support Tango4 platforms (single and dual core SoCs) built around the ARM Cortex-A9 MPCore.
Tango4 is not to be confused with Tango3, which was built around the MIPS 74kf.
---
Changes in v4
add memory node, cpus node, l2cc node rewrite clkgen node, as requested by clk maintainers not sure about pmu node
--- arch/arm/Kconfig | 2 + arch/arm/Makefile | 1 + arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/tango4-vantage-1172.dts | 18 ++++ arch/arm/boot/dts/tango4.dtsi | 134 ++++++++++++++++++++++++++++++ arch/arm/mach-tangox/Kconfig | 12 +++ arch/arm/mach-tangox/Makefile | 1 + arch/arm/mach-tangox/setup.c | 7 ++ 8 files changed, 177 insertions(+) create mode 100644 arch/arm/boot/dts/tango4-vantage-1172.dts create mode 100644 arch/arm/boot/dts/tango4.dtsi create mode 100644 arch/arm/mach-tangox/Kconfig create mode 100644 arch/arm/mach-tangox/Makefile create mode 100644 arch/arm/mach-tangox/setup.c
arch/arm/Kconfig +2 -0
@@ -934,6 +934,8 @@ source "arch/arm/mach-sunxi/Kconfig" source "arch/arm/mach-prima2/Kconfig" +source "arch/arm/mach-tangox/Kconfig" + source "arch/arm/mach-tegra/Kconfig" source "arch/arm/mach-u300/Kconfig"
arch/arm/Makefile +1 -0
@@ -203,6 +203,7 @@ machine-$(CONFIG_ARCH_SOCFPGA) += socfpga machine-$(CONFIG_ARCH_STI) += sti machine-$(CONFIG_ARCH_STM32) += stm32 machine-$(CONFIG_ARCH_SUNXI) += sunxi +machine-$(CONFIG_ARCH_TANGOX) += tangox machine-$(CONFIG_ARCH_TEGRA) += tegra machine-$(CONFIG_ARCH_U300) += u300 machine-$(CONFIG_ARCH_U8500) += ux500
arch/arm/boot/dts/Makefile +2 -0
@@ -605,6 +605,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \ dtb-$(CONFIG_MACH_SUN9I) += \ sun9i-a80-optimus.dtb \ sun9i-a80-cubieboard4.dtb +dtb-$(CONFIG_ARCH_TANGOX) += \ + tango4-vantage-1172.dtb dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ tegra20-harmony.dtb \ tegra20-iris-512.dtb \
arch/arm/boot/dts/tango4-vantage-1172.dts new file +18 -0
@@ -0,0 +1,18 @@ +/dts-v1/; + +#include "tango4.dtsi" + +/ { + model = "Sigma Designs SMP8758 Vantage-1172 dev board"; + compatible = "sigma,vantage-1172", "sigma,smp8758", "sigma,tango4"; + + memory at 80000000 { + device_type = "memory"; + reg = <0x80000000 0x80000000>; /* 2 GB */ + }; +}; + +ð0 { + phy-connection-type = "rgmii"; + max-speed = <1000>; +};
arch/arm/boot/dts/tango4.dtsi new file +134 -0
134 lines not on this page · raw message
arch/arm/mach-tangox/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +# Tango3 was based on MIPS 74kf. Tango4 is based on ARM Cortex-A9 MPCore. + +config ARCH_TANGOX + bool "Sigma Designs Tango4 (SMP87xx)" if ARCH_MULTI_V7 + select ARCH_HAS_HOLES_MEMORYMODEL + select ARM_ERRATA_754322 + select ARM_ERRATA_764369 if SMP + select ARM_GIC + select CLKSRC_TANGO_XTAL + select GENERIC_IRQ_CHIP + select HAVE_ARM_SCU + select HAVE_ARM_TWD
arch/arm/mach-tangox/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-y += setup.o
arch/arm/mach-tangox/setup.c new file +7 -0
@@ -0,0 +1,7 @@ +#include <asm/mach/arch.h> + +static const char *tango_dt_compat[] = {"sigma,tango4" ,NULL }; + +DT_MACHINE_START (TANGO_DT ,"Sigma Tango DT" ) + .dt_compat = tango_dt_compat, +MACHINE_END
Signature · 1 line
2.4.5
PATCH v5 1/1 arm-soc: Add support for Sigma Designs Tango4 platforms
Support Tango4 platforms (single and dual core SoCs) built around the ARM Cortex-A9 MPCore.
Tango4 is not to be confused with Tango3, which was built around the MIPS 74kf.
---
Changes in v5
drop mac-address property from eth0 node
tentatively add pmu node (not looking good)
hw perfevents: failed to probe PMU!
hw perfevents: failed to register PMU devices!
Changes in v4
add memory node, cpus node, l2cc node rewrite clkgen node, as requested by clk maintainers not sure about pmu node
--- arch/arm/Kconfig | 2 + arch/arm/Makefile | 1 + arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/tango4-vantage-1172.dts | 18 ++++ arch/arm/boot/dts/tango4.dtsi | 140 ++++++++++++++++++++++++++++++ arch/arm/mach-tangox/Kconfig | 12 +++ arch/arm/mach-tangox/Makefile | 1 + arch/arm/mach-tangox/setup.c | 7 ++ 8 files changed, 183 insertions(+) create mode 100644 arch/arm/boot/dts/tango4-vantage-1172.dts create mode 100644 arch/arm/boot/dts/tango4.dtsi create mode 100644 arch/arm/mach-tangox/Kconfig create mode 100644 arch/arm/mach-tangox/Makefile create mode 100644 arch/arm/mach-tangox/setup.c
arch/arm/Kconfig +2 -0
@@ -934,6 +934,8 @@ source "arch/arm/mach-sunxi/Kconfig" source "arch/arm/mach-prima2/Kconfig" +source "arch/arm/mach-tangox/Kconfig" + source "arch/arm/mach-tegra/Kconfig" source "arch/arm/mach-u300/Kconfig"
arch/arm/Makefile +1 -0
@@ -203,6 +203,7 @@ machine-$(CONFIG_ARCH_SOCFPGA) += socfpga machine-$(CONFIG_ARCH_STI) += sti machine-$(CONFIG_ARCH_STM32) += stm32 machine-$(CONFIG_ARCH_SUNXI) += sunxi +machine-$(CONFIG_ARCH_TANGOX) += tangox machine-$(CONFIG_ARCH_TEGRA) += tegra machine-$(CONFIG_ARCH_U300) += u300 machine-$(CONFIG_ARCH_U8500) += ux500
arch/arm/boot/dts/Makefile +2 -0
@@ -605,6 +605,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \ dtb-$(CONFIG_MACH_SUN9I) += \ sun9i-a80-optimus.dtb \ sun9i-a80-cubieboard4.dtb +dtb-$(CONFIG_ARCH_TANGOX) += \ + tango4-vantage-1172.dtb dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ tegra20-harmony.dtb \ tegra20-iris-512.dtb \
arch/arm/boot/dts/tango4-vantage-1172.dts new file +18 -0
@@ -0,0 +1,18 @@ +/dts-v1/; + +#include "tango4.dtsi" + +/ { + model = "Sigma Designs SMP8758 Vantage-1172 dev board"; + compatible = "sigma,vantage-1172", "sigma,smp8758", "sigma,tango4"; + + memory at 80000000 { + device_type = "memory"; + reg = <0x80000000 0x80000000>; /* 2 GB */ + }; +}; + +ð0 { + phy-connection-type = "rgmii"; + max-speed = <1000>; +};
arch/arm/boot/dts/tango4.dtsi new file +140 -0
140 lines not on this page · raw message
arch/arm/mach-tangox/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +# Tango3 was based on MIPS 74kf. Tango4 is based on ARM Cortex-A9 MPCore. + +config ARCH_TANGOX + bool "Sigma Designs Tango4 (SMP87xx)" if ARCH_MULTI_V7 + select ARCH_HAS_HOLES_MEMORYMODEL + select ARM_ERRATA_754322 + select ARM_ERRATA_764369 if SMP + select ARM_GIC + select CLKSRC_TANGO_XTAL + select GENERIC_IRQ_CHIP + select HAVE_ARM_SCU + select HAVE_ARM_TWD
arch/arm/mach-tangox/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-y += setup.o
arch/arm/mach-tangox/setup.c new file +7 -0
@@ -0,0 +1,7 @@ +#include <asm/mach/arch.h> + +static const char *tango_dt_compat[] = {"sigma,tango4" ,NULL }; + +DT_MACHINE_START (TANGO_DT ,"Sigma Tango DT" ) + .dt_compat = tango_dt_compat, +MACHINE_END
Signature · 1 line
2.4.5
PATCH v5 1/1 arm-soc: Add support for Sigma Designs Tango4 platforms
Quoted 5 lines · Marc Gonzalez
Changes in v5
drop mac-address property from eth0 node tentatively add pmu node (not looking good) hw perfevents: failed to probe PMU!
hw perfevents: failed to register PMU devices!
<Taking a closer look>
armv7_a9_pmu_init() eventually calls generic_exec_single() which fails this test:
if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu))
because cpu = 4 and nr_cpu_ids = 2
/* Any online will do: smp_call_function_single handles nr_cpu_ids. */ cpu = cpumask_any_and(mask, cpu_online_mask);
nr_cpu_ids starts out as 4 (CONFIG_NR_CPUS=4) but setup_nr_cpu_ids() drops it to 2 (the actual number of cores).
<confused> I thought NR_CPUS was just the maximum number of CPUs. Is it expected that armv7_a9_pmu_init() would fail as it does for me?
Regards.
PATCH v6 1/1 arm-soc: Add support for Sigma Designs Tango4 platforms
In reply to Marc GonzalezSupport Tango4 platforms (single and dual core SoCs) built around the ARM Cortex-A9 MPCore. (Tango4 is not to be confused with Tango3, which was built around the MIPS 74kf.)
---
Changes in v6
Move cpus and pmu nodes to SoC-specific dtsi
Add more compatible strings for eth and intc
Credit Mans for the initial DT
Changes in v5
drop mac-address property from eth0 node
tentatively add pmu node (not looking good)
Changes in v4
add memory node, cpus node, l2cc node rewrite clkgen node, as requested by clk maintainers
--- arch/arm/Kconfig | 2 + arch/arm/Makefile | 1 + arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/tango4-common.dtsi | 121 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/tango4-smp8758.dtsi | 31 ++++++++ arch/arm/boot/dts/tango4-vantage-1172.dts | 19 +++++ arch/arm/mach-tangox/Kconfig | 12 +++ arch/arm/mach-tangox/Makefile | 1 + arch/arm/mach-tangox/setup.c | 7 ++ 9 files changed, 196 insertions(+) create mode 100644 arch/arm/boot/dts/tango4-common.dtsi create mode 100644 arch/arm/boot/dts/tango4-smp8758.dtsi create mode 100644 arch/arm/boot/dts/tango4-vantage-1172.dts create mode 100644 arch/arm/mach-tangox/Kconfig create mode 100644 arch/arm/mach-tangox/Makefile create mode 100644 arch/arm/mach-tangox/setup.c
arch/arm/Kconfig +2 -0
@@ -934,6 +934,8 @@ source "arch/arm/mach-sunxi/Kconfig" source "arch/arm/mach-prima2/Kconfig" +source "arch/arm/mach-tangox/Kconfig" + source "arch/arm/mach-tegra/Kconfig" source "arch/arm/mach-u300/Kconfig"
arch/arm/Makefile +1 -0
@@ -203,6 +203,7 @@ machine-$(CONFIG_ARCH_SOCFPGA) += socfpga machine-$(CONFIG_ARCH_STI) += sti machine-$(CONFIG_ARCH_STM32) += stm32 machine-$(CONFIG_ARCH_SUNXI) += sunxi +machine-$(CONFIG_ARCH_TANGOX) += tangox machine-$(CONFIG_ARCH_TEGRA) += tegra machine-$(CONFIG_ARCH_U300) += u300 machine-$(CONFIG_ARCH_U8500) += ux500
arch/arm/boot/dts/Makefile +2 -0
@@ -605,6 +605,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \ dtb-$(CONFIG_MACH_SUN9I) += \ sun9i-a80-optimus.dtb \ sun9i-a80-cubieboard4.dtb +dtb-$(CONFIG_ARCH_TANGOX) += \ + tango4-vantage-1172.dtb dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ tegra20-harmony.dtb \ tegra20-iris-512.dtb \
arch/arm/boot/dts/tango4-common.dtsi new file +121 -0
121 lines not on this page · raw message
arch/arm/boot/dts/tango4-smp8758.dtsi new file +31 -0
@@ -0,0 +1,31 @@ +#include <dt-bindings/interrupt-controller/arm-gic.h> + +/ { + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu at 0 { + compatible = "arm,cortex-a9"; + next-level-cache = <&l2cc>; + device_type = "cpu"; + reg = <0>; + }; + + cpu1: cpu at 1 { + compatible = "arm,cortex-a9"; + next-level-cache = <&l2cc>; + device_type = "cpu"; + reg = <1>; + }; + }; + + pmu { + compatible = "arm,cortex-a9-pmu"; + interrupt-affinity = <&cpu0>, <&cpu1>; + interrupt-parent = <&gic>; + interrupts = + <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; + }; +};
arch/arm/boot/dts/tango4-vantage-1172.dts new file +19 -0
@@ -0,0 +1,19 @@ +/dts-v1/; + +#include "tango4-smp8758.dtsi" +#include "tango4-common.dtsi" + +/ { + model = "Sigma Designs SMP8758 Vantage-1172 dev board"; + compatible = "sigma,vantage-1172", "sigma,smp8758", "sigma,tango4"; + + memory at 80000000 { + device_type = "memory"; + reg = <0x80000000 0x80000000>; /* 2 GB */ + }; +}; + +ð0 { + phy-connection-type = "rgmii"; + max-speed = <1000>; +};
arch/arm/mach-tangox/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +# Tango3 was based on MIPS 74kf. Tango4 is based on ARM Cortex-A9 MPCore. + +config ARCH_TANGOX + bool "Sigma Designs Tango4 (SMP87xx)" if ARCH_MULTI_V7 + select ARCH_HAS_HOLES_MEMORYMODEL + select ARM_ERRATA_754322 + select ARM_ERRATA_764369 if SMP + select ARM_GIC + select CLKSRC_TANGO_XTAL + select GENERIC_IRQ_CHIP + select HAVE_ARM_SCU + select HAVE_ARM_TWD
arch/arm/mach-tangox/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-y += setup.o
arch/arm/mach-tangox/setup.c new file +7 -0
@@ -0,0 +1,7 @@ +#include <asm/mach/arch.h> + +static const char *tango_dt_compat[] = {"sigma,tango4" ,NULL }; + +DT_MACHINE_START (TANGO_DT ,"Sigma Tango DT" ) + .dt_compat = tango_dt_compat, +MACHINE_END
Signature · 1 line
2.4.5
PATCH v6 1/1 arm-soc: Add support for Sigma Designs Tango4 platforms
I've made some additional changes, which I'm not 100% sure about. I suppose this should be considered a RFC.
Changes in v7
Toggle L2 cache via smc
Move peripheral devices compatible strings to board DTS
(because it contains the chip number, while common is generic)
Add UART IRQ
Patch follows.
Regards.
arch/arm/Kconfig +2 -0
@@ -934,6 +934,8 @@ source "arch/arm/mach-sunxi/Kconfig" source "arch/arm/mach-prima2/Kconfig" +source "arch/arm/mach-tangox/Kconfig" + source "arch/arm/mach-tegra/Kconfig" source "arch/arm/mach-u300/Kconfig"
arch/arm/Makefile +1 -0
@@ -203,6 +203,7 @@ machine-$(CONFIG_ARCH_SOCFPGA) += socfpga machine-$(CONFIG_ARCH_STI) += sti machine-$(CONFIG_ARCH_STM32) += stm32 machine-$(CONFIG_ARCH_SUNXI) += sunxi +machine-$(CONFIG_ARCH_TANGOX) += tangox machine-$(CONFIG_ARCH_TEGRA) += tegra machine-$(CONFIG_ARCH_U300) += u300 machine-$(CONFIG_ARCH_U8500) += ux500
arch/arm/boot/dts/Makefile +2 -0
@@ -605,6 +605,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \ dtb-$(CONFIG_MACH_SUN9I) += \ sun9i-a80-optimus.dtb \ sun9i-a80-cubieboard4.dtb +dtb-$(CONFIG_ARCH_TANGOX) += \ + tango4-vantage-1172.dtb dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ tegra20-harmony.dtb \ tegra20-iris-512.dtb \
arch/arm/boot/dts/tango4-common.dtsi new file +121 -0
121 lines not on this page · raw message
arch/arm/boot/dts/tango4-smp8758.dtsi new file +31 -0
@@ -0,0 +1,31 @@ +#include <dt-bindings/interrupt-controller/arm-gic.h> + +/ { + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu at 0 { + compatible = "arm,cortex-a9"; + next-level-cache = <&l2cc>; + device_type = "cpu"; + reg = <0>; + }; + + cpu1: cpu at 1 { + compatible = "arm,cortex-a9"; + next-level-cache = <&l2cc>; + device_type = "cpu"; + reg = <1>; + }; + }; + + pmu { + compatible = "arm,cortex-a9-pmu"; + interrupt-affinity = <&cpu0>, <&cpu1>; + interrupt-parent = <&gic>; + interrupts = + <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; + }; +};
arch/arm/boot/dts/tango4-vantage-1172.dts new file +24 -0
@@ -0,0 +1,24 @@ +/dts-v1/; + +#include "tango4-smp8758.dtsi" +#include "tango4-common.dtsi" + +/ { + model = "Sigma Designs SMP8758 Vantage-1172 dev board"; + compatible = "sigma,vantage-1172", "sigma,smp8758", "sigma,tango4"; + + memory at 80000000 { + device_type = "memory"; + reg = <0x80000000 0x80000000>; /* 2 GB */ + }; +}; + +ð0 { + compatible = "sigma,smp8758-ethernet", "sigma,smp8910-ethernet", "sigma,smp8642-ethernet", "aurora,nb8800"; + phy-connection-type = "rgmii"; + max-speed = <1000>; +}; + +&intc { + compatible = "sigma,smp8758-intc", "sigma,smp8642-intc"; +};
arch/arm/mach-tangox/Kconfig new file +10 -0
@@ -0,0 +1,10 @@ +config ARCH_TANGOX + bool "Sigma Designs Tango4 (SMP87xx)" if ARCH_MULTI_V7 + select ARCH_HAS_HOLES_MEMORYMODEL + select ARM_ERRATA_754322 + select ARM_ERRATA_764369 if SMP + select ARM_GIC + select CLKSRC_TANGO_XTAL + select GENERIC_IRQ_CHIP + select HAVE_ARM_SCU + select HAVE_ARM_TWD
arch/arm/mach-tangox/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +asflags-y += -mcpu=cortex-a9 +obj-y += setup.o smc.o
arch/arm/mach-tangox/setup.c new file +18 -0
@@ -0,0 +1,18 @@ +#include <asm/mach/arch.h> +#include <asm/hardware/cache-l2x0.h> + +static void tango_l2c_write (unsigned long val,unsigned int reg) +{ +void tango_set_l2_control (unsigned int val); +pr_info ("%s: reg=0x%x val=0x%lx\n" , __func__, reg, val); +if (reg ==L2X0_CTRL ) +tango_set_l2_control (val); +} + +static const char *tango_dt_compat[] = {"sigma,tango4" ,NULL }; + +DT_MACHINE_START (TANGO_DT ,"Sigma Tango DT" ) + .dt_compat = tango_dt_compat, + .l2c_aux_mask = ~0, + .l2c_write_sec = tango_l2c_write, +MACHINE_END
arch/arm/mach-tangox/smc.S new file +14 -0
@@ -0,0 +1,14 @@ +#include <linux/linkage.h> + +#define SMC_SET_L2_CONTROL 0x102 + +/* + * Have Armor write r0 to l2_control. + */ +ENTRY(tango_set_l2_control) + push {lr} + movw ip, #SMC_SET_L2_CONTROL + dsb + smc #0 + pop {pc} +ENDPROC(tango_set_l2_control)