Skip to contentSkip to conversation

Support for efm32

GIT PULL New Uwe Kleine-König 3 participants 7 messages Dec 16, 2013 – Dec 19, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The following changes since commit 319e2e3f63c348a9b66db4667efa73178e18b17d:

Linux 3.13-rc4 (2013-12-15 12:31:33 -0800)

are available in the git repository at:

git://git.pengutronix.de/git/ukl/linux.git tags/efm32

for you to fetch changes up to ef43eff3447f30b4a3cfc61813902c2e57c20245:

ARM: device trees for Energy Micro's EFM32 Cortex-M3 SoCs (2013-12-16 17:51:34 +0100)

----------------------------------------------------------------
These two commits add preliminary support for Energy Micro (now Silicon Labs) Giant Gecko SoCs. They have a Cortex-M3 core, and so are Thumb2 only and don't feature an MMU. With these changes merged there is no additional code needed under arch/arm to run Linux on such a SoC.
----------------------------------------------------------------

Compared to the patch sent a few days ago (v5, Message-Id:
1386694516-5876-1-git-send-email-u.kleine-koenig at pengutronix.de), I let ARCH_EFM32 temporarily select CLKSRC_MMIO until 4ff3774 (clocksource:
time-efm32: Select CLKSRC_MMIO) hits mainline. Also I just noticed that the clk support got in v3.13-rc1, so the device tree is buildable now. This patch adding the device tree sources wasn't sent yet in it's current form, so I will send it as reply to this mail. I hope it's not controversal, so the two patches can go in together.

I choosed to base these changes on top of a more recent tree than armsoc/next/soc currently is based on (v3.13-rc1 vs v3.13-rc4) because to successfully build for ARM v7-M commit 5091333 (ARM: 7895/1: signal:
fix armv7-m build issue in sigreturn_codes.S) which is included in v3.13-rc3 (but not earlier).

Uwe Kleine-K?nig (2):
ARM: new platform for Energy Micro's EFM32 Cortex-M3 SoCs
ARM: device trees for Energy Micro's EFM32 Cortex-M3 SoCs

 arch/arm/Kconfig                               |  22 +++-
 arch/arm/Makefile                              |   1 +
 arch/arm/boot/dts/Makefile                     |   1 +
 arch/arm/boot/dts/armv7-m.dtsi                 |  18 +++
 arch/arm/boot/dts/efm32gg-dk3750.dts           |  86 +++++++++++++
 arch/arm/boot/dts/efm32gg.dtsi                 | 172 +++++++++++++++++++++++++
 arch/arm/configs/efm32_defconfig               | 102 +++++++++++++++
 arch/arm/mach-efm32/Makefile                   |   1 +
 arch/arm/mach-efm32/Makefile.boot              |   3 +
 arch/arm/mach-efm32/dtmachine.c                |  15 +++
 arch/arm/mach-efm32/include/mach/entry-macro.S |   4 +
 arch/arm/mach-efm32/include/mach/timex.h       |   3 +
 12 files changed, 427 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/armv7-m.dtsi
 create mode 100644 arch/arm/boot/dts/efm32gg-dk3750.dts
 create mode 100644 arch/arm/boot/dts/efm32gg.dtsi
 create mode 100644 arch/arm/configs/efm32_defconfig
 create mode 100644 arch/arm/mach-efm32/Makefile
 create mode 100644 arch/arm/mach-efm32/Makefile.boot
 create mode 100644 arch/arm/mach-efm32/dtmachine.c
 create mode 100644 arch/arm/mach-efm32/include/mach/entry-macro.S
 create mode 100644 arch/arm/mach-efm32/include/mach/timex.h
Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#1 lore raw

PATCH 2/2 ARM: device trees for Energy Micro's EFM32 Cortex-M3 SoCs

---
 arch/arm/boot/dts/Makefile           |   1 +
 arch/arm/boot/dts/armv7-m.dtsi       |  18 ++++
 arch/arm/boot/dts/efm32gg-dk3750.dts |  86 ++++++++++++++++++
 arch/arm/boot/dts/efm32gg.dtsi       | 172 +++++++++++++++++++++++++++++++++++
 4 files changed, 277 insertions(+)
 create mode 100644 arch/arm/boot/dts/armv7-m.dtsi
 create mode 100644 arch/arm/boot/dts/efm32gg-dk3750.dts
 create mode 100644 arch/arm/boot/dts/efm32gg.dtsi
arch/arm/boot/dts/Makefile +1 -0
index d57c1a6..e4a0bea 100644
@@ -52,6 +52,7 @@ dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \
 	dove-d2plug.dtb \
 	dove-d3plug.dtb \
 	dove-dove-db.dtb
+dtb-$(CONFIG_ARCH_EFM32) += efm32gg-dk3750.dtb
 dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
 	exynos4210-smdkv310.dtb \
 	exynos4210-trats.dtb \
arch/arm/boot/dts/armv7-m.dtsi new file +18 -0
new file mode 100644
index 0000000..5a660d0
@@ -0,0 +1,18 @@
+#include "skeleton.dtsi"
+
+/ {
+	nvic: nv-interrupt-controller  {
+		compatible = "arm,armv7m-nvic";
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		reg = <0xe000e100 0xc00>;
+	};
+
+	soc {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "simple-bus";
+		interrupt-parent = <&nvic>;
+		ranges;
+	};
+};
arch/arm/boot/dts/efm32gg-dk3750.dts new file +86 -0

86 lines not on this page · raw message

arch/arm/boot/dts/efm32gg.dtsi new file +172 -0

172 lines not on this page · raw message

Signature · 1 line
1.8.4.4
#2 lore raw

PATCH 2/2 ARM: device trees for Energy Micro's EFM32 Cortex-M3 SoCs

arch/arm/boot/dts/efm32gg.dtsi line 166

Quoted 2 lines · Uwe Kleine-K?nig
arch/arm/boot/dts/efm32gg.dtsi new file +2 -0
+		cmu: cmu at 400c8000 {
+			compatible = "efm32gg,cmu";

I was able to run this on the EFM32LG without problems. Are you sure this CMU node is specific to the GG, or can it be shared?

Thanks,
Richard

Quoted 4 lines
arch/arm/boot/dts/efm32gg.dtsi new file +4 -0
+			reg = <0x400c8000 0x400>;
+			interrupts = <32>;
+			#clock-cells = <1>;
+		};
#3 lore raw

PATCH 2/2 ARM: device trees for Energy Micro's EFM32 Cortex-M3 SoCs

Quoted 7 lines · Richard Cochran

arch/arm/boot/dts/efm32gg.dtsi line 166

Quoted 2 lines · Uwe Kleine-K?nig
arch/arm/boot/dts/efm32gg.dtsi new file +2 -0
+		cmu: cmu at 400c8000 {
+			compatible = "efm32gg,cmu";

I was able to run this on the EFM32LG without problems. Are you sure this CMU node is specific to the GG, or can it be shared?

I remember me being grumpy because I found some differences between the GG and some other efm32 device. After looking again I cannot find the problem. Maybe the LG is compatible but some other is not.

Can I assume your feedback as Tested-by:?

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#4 lore raw

PATCH 2/2 ARM: device trees for Energy Micro's EFM32 Cortex-M3 SoCs

Quoted 11 lines · Uwe Kleine-K?nig
Quoted 7 lines · Richard Cochran

arch/arm/boot/dts/efm32gg.dtsi line 166

Quoted 2 lines · Uwe Kleine-K?nig
arch/arm/boot/dts/efm32gg.dtsi new file +2 -0
+		cmu: cmu at 400c8000 {
+			compatible = "efm32gg,cmu";

I was able to run this on the EFM32LG without problems. Are you sure this CMU node is specific to the GG, or can it be shared?

I remember me being grumpy because I found some differences between the GG and some other efm32 device. After looking again I cannot find the problem. Maybe the LG is compatible but some other is not.

It looked like to me that the only differences are flash and ram sizes, and presence or absence of peripherals, but I don't know all of the many EM parts that well, just these two.

Quoted 1 line

Can I assume your feedback as Tested-by:?

Yes, by all means, please do.

Thanks,
Richard

#5 lore raw

PATCH 2/2 ARM: device trees for Energy Micro's EFM32 Cortex-M3 SoCs

Hello Richard,

Quoted 9 lines · Richard Cochran
Quoted 8 lines · Uwe Kleine-K?nig
Quoted 7 lines · Richard Cochran

arch/arm/boot/dts/efm32gg.dtsi line 166

Quoted 2 lines · Uwe Kleine-K?nig
arch/arm/boot/dts/efm32gg.dtsi new file +2 -0
+		cmu: cmu at 400c8000 {
+			compatible = "efm32gg,cmu";

I was able to run this on the EFM32LG without problems. Are you sure this CMU node is specific to the GG, or can it be shared?

Quoted 7 lines
Quoted 3 lines

I remember me being grumpy because I found some differences between the GG and some other efm32 device. After looking again I cannot find the problem. Maybe the LG is compatible but some other is not.

It looked like to me that the only differences are flash and ram sizes, and presence or absence of peripherals, but I don't know all of the many EM parts that well, just these two.

I asked my contact at Silabs, and he told that LG, GG and WG are similar. Looking at the reference manual of the Gecko Series you can see that for example the bits in CMU_HFPERCLKEN0 are different. A tool to judge about differences of the different SoCs would be nice.

Quoted 3 lines
Quoted 1 line

Can I assume your feedback as Tested-by:?

Yes, by all means, please do.

Thanks
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#6 lore raw
In reply to Uwe Kleine-König
Quoted 19 lines · Uwe Kleine-K?nig

The following changes since commit 319e2e3f63c348a9b66db4667efa73178e18b17d:

Linux 3.13-rc4 (2013-12-15 12:31:33 -0800)

are available in the git repository at:

git://git.pengutronix.de/git/ukl/linux.git tags/efm32

for you to fetch changes up to ef43eff3447f30b4a3cfc61813902c2e57c20245:

ARM: device trees for Energy Micro's EFM32 Cortex-M3 SoCs (2013-12-16 17:51:34 +0100)

----------------------------------------------------------------
These two commits add preliminary support for Energy Micro (now Silicon Labs) Giant Gecko SoCs. They have a Cortex-M3 core, and so are Thumb2 only and don't feature an MMU. With these changes merged there is no additional code needed under arch/arm to run Linux on such a SoC.
----------------------------------------------------------------

Quoted 4 lines

Compared to the patch sent a few days ago (v5, Message-Id:
1386694516-5876-1-git-send-email-u.kleine-koenig at pengutronix.de), I let ARCH_EFM32 temporarily select CLKSRC_MMIO until 4ff3774 (clocksource:
time-efm32: Select CLKSRC_MMIO) hits mainline.

OK.

Quoted 5 lines

Also I just noticed that
the clk support got in v3.13-rc1, so the device tree is buildable now. This patch adding the device tree sources wasn't sent yet in it's current form, so I will send it as reply to this mail. I hope it's not controversal, so the two patches can go in together.

Looks straight foward to me.

Quoted 5 lines

I choosed to base these changes on top of a more recent tree than armsoc/next/soc currently is based on (v3.13-rc1 vs v3.13-rc4) because to successfully build for ARM v7-M commit 5091333 (ARM: 7895/1: signal:
fix armv7-m build issue in sigreturn_codes.S) which is included in v3.13-rc3 (but not earlier).

Yeah, we prefer using older -rcs where possible, but when you have a good reason and describe it thoroughly (like you did), that's perfectly fine.

Thanks for the detailed description.

Pulled into next/soc,

Kevin