Skip to contentSkip to conversation

ARM: EXYNOS: DT-enabled support for Universal C210

PATCH New Tomasz Figa 3 participants 11 messages Apr 15, 2013 – Apr 23, 2013

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

v2 cover ARM: EXYNOS: DT-enabled support for Universal C210

This series intends to add support for Universal C210 board using Device Tree. Main difference from other boards based on Exynos 4210 is that hardware revision of the SoC used on Universal C210 does not support MCT timers and legacy PWM timers must be used instead.

First patch adds device tree node for PWM block available on Exynos4 SoCs, second patch adds support for Exynos4210 rev0 SoC in exynos_init_time() and third patch introduces initial device tree for Universal C210 board.

Depends on my series for PWM timers rework:
[PATCH v5 00/14] ARM: samsung-time: Prepare for multiplatform support
(http://thread.gmane.org/gmane.linux.kernel.samsung-soc/17864)

On Universal C210 board:

Tomasz Figa (3):
ARM: dts: exynos4: Add node for PWM device
ARM: EXYNOS: Fix support of Exynos4210 rev0 SoC
ARM: dts: exynos4210: Add basic dts file for universal_c210 board

 arch/arm/boot/dts/Makefile                      |   1 +
 arch/arm/boot/dts/exynos4.dtsi                  |   8 +
 arch/arm/boot/dts/exynos4210-universal_c210.dts | 352 ++++++++++++++++++++++++
 arch/arm/mach-exynos/common.c                   |   6 +-
 arch/arm/mach-exynos/mach-universal_c210.c      |   2 +-
 5 files changed, 367 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/boot/dts/exynos4210-universal_c210.dts
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH v2 1/3 ARM: dts: exynos4: Add node for PWM device

This patch adds device tree node for PWM block present on Exynos 4 SoCs.

---
 arch/arm/boot/dts/exynos4.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/exynos4.dtsi +8 -0
index d73eaa1..d7058c1 100644
@@ -333,6 +333,14 @@
 		status = "disabled";
 	};
 
+	pwm at 139D0000 {
+		compatible = "samsung,exynos4210-pwm";
+		reg = <0x139D0000 0x1000>;
+		interrupts = <0 37 0>, <0 38 0>, <0 39 0>, <0 40 0>, <0 41 0>;
+		#pwm-cells = <2>;
+		status = "disabled";
+	};
+
 	amba {
 		#address-cells = <1>;
 		#size-cells = <1>;
Signature · 1 line
1.8.1.5
maintainer
#2 lore raw

PATCH v2 1/3 ARM: dts: exynos4: Add node for PWM device

Quoted 12 lines · Tomasz Figa

This patch adds device tree node for PWM block present on Exynos 4 SoCs.

---
 arch/arm/boot/dts/exynos4.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/exynos4.dtsi +0 -0
index d73eaa1..d7058c1 100644

arch/arm/boot/dts/exynos4.dtsi line 342

Quoted 10 lines
arch/arm/boot/dts/exynos4.dtsi +7 -0
@@ -333,6 +333,14 @@
                status = "disabled";
        };
 
+       pwm at 139D0000 {
+               compatible = "samsung,exynos4210-pwm";
+               reg = <0x139D0000 0x1000>;
+               interrupts = <0 37 0>, <0 38 0>, <0 39 0>, <0 40 0>, <0 41 0>;
+               #pwm-cells = <2>;
+               status = "disabled";
+       };
#3 lore raw

PATCH v2 2/3 ARM: EXYNOS: Fix support of Exynos4210 rev0 SoC

In reply to Tomasz Figa

This patch extends exynos_init_time() function to handle Exynos4210 rev0 SoC, which differs in availability of system timers and needs different clocksource initialization.

This makes it possible to use exynos_init_time() function as init_time callback for all Exynos-based boards, including Universal_C210, which originally had to use samsung_timer_init().

---
 arch/arm/mach-exynos/common.c              | 6 +++++-
 arch/arm/mach-exynos/mach-universal_c210.c | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
arch/arm/mach-exynos/common.c +5 -1
index b65229d..ec596fc 100644
@@ -51,6 +51,7 @@
 #include <plat/fimc-core.h>
 #include <plat/iic-core.h>
 #include <plat/tv-core.h>
+#include <plat/samsung-time.h>
 #include <plat/spi-core.h>
 #include <plat/regs-serial.h>
 
@@ -457,7 +458,10 @@ void __init exynos_init_time(void)
 		exynos4_clk_init(NULL);
 		exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f);
 #endif
-		mct_init();
+		if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0)
+			samsung_timer_init();
+		else
+			mct_init();
 	}
 }
 
arch/arm/mach-exynos/mach-universal_c210.c +1 -1
index 020e1f4..a728812 100644
@@ -1177,7 +1177,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
 	.map_io		= universal_map_io,
 	.init_machine	= universal_machine_init,
 	.init_late	= exynos_init_late,
-	.init_time	= samsung_timer_init,
+	.init_time	= exynos_init_time,
 	.reserve        = &universal_reserve,
 	.restart	= exynos4_restart,
 MACHINE_END
Signature · 1 line
1.8.1.5
maintainer
#4 lore raw

PATCH v2 2/3 ARM: EXYNOS: Fix support of Exynos4210 rev0 SoC

Quoted 9 lines · Tomasz Figa

This patch extends exynos_init_time() function to handle Exynos4210 rev0 SoC, which differs in availability of system timers and needs different clocksource initialization.

This makes it possible to use exynos_init_time() function as init_time callback for all Exynos-based boards, including Universal_C210, which originally had to use samsung_timer_init().

Note that it would be helpful to mention here that this is required for the calling samsung_timer_init from the exynos4-dt.c file.

Arnd

#5 lore raw

PATCH v2 2/3 ARM: EXYNOS: Fix support of Exynos4210 rev0 SoC

Quoted 9 lines · Arnd Bergmann
Quoted 8 lines · Tomasz Figa

This patch extends exynos_init_time() function to handle Exynos4210 rev0 SoC, which differs in availability of system timers and needs different clocksource initialization.

This makes it possible to use exynos_init_time() function as init_time callback for all Exynos-based boards, including Universal_C210, which originally had to use samsung_timer_init().

Quoted 7 lines
Quoted 1 line

Note that it would be helpful to mention here that this is required for the calling samsung_timer_init from the exynos4-dt.c file.

I did 'amend' as per your suggestion and added your ack on this series.

Thanks.

- Kukjin

#6 lore raw

PATCH v2 2/3 ARM: EXYNOS: Fix support of Exynos4210 rev0 SoC

Hi Kukjin,

Quoted 14 lines · On Tuesday 23 of April 2013 22:56:13 Kukjin Kim wrote:
Quoted 13 lines · Arnd Bergmann
Quoted 9 lines · Tomasz Figa

This patch extends exynos_init_time() function to handle Exynos4210 rev0 SoC, which differs in availability of system timers and needs different clocksource initialization.

This makes it possible to use exynos_init_time() function as init_time callback for all Exynos-based boards, including Universal_C210, which originally had to use samsung_timer_init().

Quoted 8 lines
Quoted 2 lines

Note that it would be helpful to mention here that this is required for the calling samsung_timer_init from the exynos4-dt.c file.

I did 'amend' as per your suggestion and added your ack on this series.

Thanks.

- Kukjin

Since the samsung-time rework patches were replaced with a non-invasive subset with different semantics (going to send them in a while), this patch should be replaced with new version I'm going to send (in a while as well).

Best regards,

Signature · 3 lines
Tomasz Figa
Samsung Poland R&D Center
SW Solution Development, Kernel and System Framework
#7 lore raw

PATCH v2 2/3 ARM: EXYNOS: Fix support of Exynos4210 rev0 SoC

Quoted 1 line · Tomasz Figa

Hi Kukjin,

[...]

Quoted 7 lines
Quoted 7 lines
Quoted 4 lines

Note that it would be helpful to mention here that this is required for the calling samsung_timer_init from the exynos4-dt.c file.

I did 'amend' as per your suggestion and added your ack on this series.

Quoted 8 lines
Quoted 3 lines

Thanks.

- Kukjin

Since the samsung-time rework patches were replaced with a non-invasive subset with different semantics (going to send them in a while), this patch should be replaced with new version I'm going to send (in a while as well).

Oh, OK. You want to replace with new patches you will send. I dropped this series in my late dt branch.

BTW, the series should depend on your samsung-time patches, right?

One more note, this makes following build error.

arch/arm/mach-exynos/built-in.o: In function `exynos_init_time':
arch/arm/mach-exynos/common.c:424: undefined reference to `samsung_timer_init'
make: *** [vmlinux] Error 1

Thanks.

- Kukjin

#8 lore raw

PATCH v2 3/3 ARM: dts: exynos4210: Add basic dts file for universal_c210 board

In reply to Tomasz Figa

This patch adds basic device tree sources for Universal C210 board.

Currently support includes:
- eMMC
- serial
- max8952 and max8998 voltage regulators.
- gpio-keys

More support will be added in further patches.

---
 arch/arm/boot/dts/Makefile                      |   1 +
 arch/arm/boot/dts/exynos4210-universal_c210.dts | 352 ++++++++++++++++++++++++
 2 files changed, 353 insertions(+)
 create mode 100644 arch/arm/boot/dts/exynos4210-universal_c210.dts
arch/arm/boot/dts/Makefile +1 -0
index 11fef62..95b7311 100644
@@ -42,6 +42,7 @@ dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \
 dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
 	exynos4210-smdkv310.dtb \
 	exynos4210-trats.dtb \
+	exynos4210-universal_c210.dtb \
 	exynos4412-odroidx.dtb \
 	exynos4412-smdk4412.dtb \
 	exynos4412-origen.dtb \
arch/arm/boot/dts/exynos4210-universal_c210.dts new file +352 -0

352 lines not on this page · raw message

Signature · 1 line
1.8.1.5
maintainer
#9 lore raw

PATCH v2 3/3 ARM: dts: exynos4210: Add basic dts file for universal_c210 board

Quoted 9 lines · Tomasz Figa

This patch adds basic device tree sources for Universal C210 board.

Currently support includes:
- eMMC
- serial
- max8952 and max8998 voltage regulators.
- gpio-keys

Quoted 3 lines

More support will be added in further patches.

Applied
#10 lore raw

v2 cover ARM: EXYNOS: DT-enabled support for Universal C210

In reply to Tomasz Figa
Quoted 22 lines · Tomasz Figa

This series intends to add support for Universal C210 board using Device Tree. Main difference from other boards based on Exynos 4210 is that hardware revision of the SoC used on Universal C210 does not support MCT timers and legacy PWM timers must be used instead.

First patch adds device tree node for PWM block available on Exynos4 SoCs, second patch adds support for Exynos4210 rev0 SoC in exynos_init_time() and third patch introduces initial device tree for Universal C210 board.

Depends on my series for PWM timers rework:
[PATCH v5 00/14] ARM: samsung-time: Prepare for multiplatform support
(http://thread.gmane.org/gmane.linux.kernel.samsung-soc/17864)

On Universal C210 board:

Tomasz Figa (3):
ARM: dts: exynos4: Add node for PWM device
ARM: EXYNOS: Fix support of Exynos4210 rev0 SoC
ARM: dts: exynos4210: Add basic dts file for universal_c210 board

Quoted 8 lines
  arch/arm/boot/dts/Makefile                      |   1 +
  arch/arm/boot/dts/exynos4.dtsi                  |   8 +
  arch/arm/boot/dts/exynos4210-universal_c210.dts | 352 ++++++++++++++++++++++++
  arch/arm/mach-exynos/common.c                   |   6 +-
  arch/arm/mach-exynos/mach-universal_c210.c      |   2 +-
  5 files changed, 367 insertions(+), 2 deletions(-)

create mode 100644 arch/arm/boot/dts/exynos4210-universal_c210.dts

Applied, thanks.

- Kukjin