Skip to contentSkip to conversation

ARM: exynos: Enable TMU support in exynos platforms

PATCH New Amit Daniel Kachhap 2 participants 6 messages Oct 26, 2012 – Oct 30, 2012

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

v2 cover ARM: exynos: Enable TMU support in exynos platforms

From: Amit Daniel Kachhap <[email protected]>

These TMU enablement patches are needed for exynos4 and exynos5 TMU driver already merged(drivers/thermal/exynos_thermal.c).

This patchset is based on Samsung Maintainer's tree,
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git for-next

Amit Daniel Kachhap (2):
ARM: exynos4: Add devicetree node for TMU driver
ARM: exynos5: Add devicetree node for TMU driver

 arch/arm/boot/dts/exynos4210.dtsi        |    7 +++++++
 arch/arm/boot/dts/exynos5250.dtsi        |    6 ++++++
 arch/arm/mach-exynos/clock-exynos4.c     |    4 ++++
 arch/arm/mach-exynos/clock-exynos5.c     |    5 +++++
 arch/arm/mach-exynos/include/mach/irqs.h |    3 +++
 arch/arm/mach-exynos/include/mach/map.h  |    3 +++
 arch/arm/mach-exynos/mach-exynos4-dt.c   |    2 ++
 arch/arm/mach-exynos/mach-exynos5-dt.c   |    2 ++
 8 files changed, 32 insertions(+), 0 deletions(-)
#1 lore raw

PATCH v2 1/2 ARM: exynos4: Add devicetree node for TMU driver

From: Amit Daniel Kachhap <[email protected]>

This patch adds necessary source definations needed for TMU driver and adds devicetree node for exynos4210.

---
 arch/arm/boot/dts/exynos4210.dtsi        |    7 +++++++
 arch/arm/mach-exynos/clock-exynos4.c     |    4 ++++
 arch/arm/mach-exynos/include/mach/irqs.h |    3 +++
 arch/arm/mach-exynos/include/mach/map.h  |    2 ++
 arch/arm/mach-exynos/mach-exynos4-dt.c   |    2 ++
 5 files changed, 18 insertions(+), 0 deletions(-)
arch/arm/boot/dts/exynos4210.dtsi +7 -0
index 214c557..038de97 100644
@@ -303,4 +303,11 @@
 			#gpio-cells = <4>;
 		};
 	};
+
+	tmu@100C0000 {
+		compatible = "samsung,exynos4210-tmu";
+		interrupt-parent = <&combiner>;
+		reg = <0x100C0000 0x100>;
+		interrupts = <2 4>;
+	};
 };
arch/arm/mach-exynos/clock-exynos4.c +4 -0
index fa8a134..cf121f4 100644
@@ -576,6 +576,10 @@ static struct clk exynos4_init_clocks_off[] = {
 		.enable		= exynos4_clk_ip_peril_ctrl,
 		.ctrlbit	= (1 << 15),
 	}, {
+		.name           = "tmu_apbif",
+		.enable         = exynos4_clk_ip_perir_ctrl,
+		.ctrlbit        = (1 << 17),
+	}, {
 		.name		= "keypad",
 		.enable		= exynos4_clk_ip_perir_ctrl,
 		.ctrlbit	= (1 << 16),
arch/arm/mach-exynos/include/mach/irqs.h +3 -0
index 35bced6..5adacd1 100644
@@ -136,6 +136,9 @@
 #define EXYNOS4_IRQ_TSI			IRQ_SPI(115)
 #define EXYNOS4_IRQ_SATA		IRQ_SPI(116)
 
+#define EXYNOS4_IRQ_TMU_TRIG0		COMBINER_IRQ(2, 4)
+#define EXYNOS4_IRQ_TMU_TRIG1		COMBINER_IRQ(3, 4)
+
 #define EXYNOS4_IRQ_SYSMMU_MDMA0_0	COMBINER_IRQ(4, 0)
 #define EXYNOS4_IRQ_SYSMMU_SSS_0	COMBINER_IRQ(4, 1)
 #define EXYNOS4_IRQ_SYSMMU_FIMC0_0	COMBINER_IRQ(4, 2)
arch/arm/mach-exynos/include/mach/map.h +2 -0
index 8480849..772acd3 100644
@@ -88,6 +88,8 @@
 #define EXYNOS4_PA_TWD			0x10500600
 #define EXYNOS4_PA_L2CC			0x10502000
 
+#define EXYNOS4_PA_TMU			0x100C0000
+
 #define EXYNOS4_PA_MDMA0		0x10810000
 #define EXYNOS4_PA_MDMA1		0x12850000
 #define EXYNOS4_PA_PDMA0		0x12680000
arch/arm/mach-exynos/mach-exynos4-dt.c +2 -0
index eadf4b5..0746e5a 100644
@@ -77,6 +77,8 @@ static const struct of_dev_auxdata exynos4_auxdata_lookup[] __initconst = {
 				"exynos4210-spi.2", NULL),
 	OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA0, "dma-pl330.0", NULL),
 	OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL),
+	OF_DEV_AUXDATA("samsung,exynos4210-tmu", EXYNOS4_PA_TMU,
+				"exynos-tmu", NULL),
 	{},
 };
 
Signature · 1 line
1.7.1
#2 lore raw

PATCH v2 2/2 ARM: exynos5: Add devicetree node for TMU driver

From: Amit Daniel Kachhap <[email protected]>

This patch adds necessary source definations needed for TMU driver and adds devicetree node for exynos5250.

---
 arch/arm/boot/dts/exynos5250.dtsi       |    6 ++++++
 arch/arm/mach-exynos/clock-exynos5.c    |    5 +++++
 arch/arm/mach-exynos/include/mach/map.h |    1 +
 arch/arm/mach-exynos/mach-exynos5-dt.c  |    2 ++
 4 files changed, 14 insertions(+), 0 deletions(-)
arch/arm/boot/dts/exynos5250.dtsi +6 -0
index 49546bc..670dfdb 100644
@@ -74,6 +74,12 @@
 		interrupts = <0 43 0>, <0 44 0>;
 	};
 
+	tmu@10060000 {
+		compatible = "samsung,exynos5250-tmu";
+		reg = <0x10060000 0x100>;
+		interrupts = <0 65 0>;
+	};
+
 	serial@12C00000 {
 		compatible = "samsung,exynos4210-uart";
 		reg = <0x12C00000 0x100>;
arch/arm/mach-exynos/clock-exynos5.c +5 -0
index 2ca9391..d4ae64e 100644
@@ -616,6 +616,11 @@ static struct clk exynos5_init_clocks_off[] = {
 		.enable		= exynos5_clk_ip_peric_ctrl,
 		.ctrlbit	= (1 << 24),
 	}, {
+		.name		= "tmu_apbif",
+		.parent		= &exynos5_clk_aclk_66.clk,
+		.enable		= exynos5_clk_ip_peris_ctrl,
+		.ctrlbit	= (1 << 21),
+	}, {
 		.name		= "rtc",
 		.parent		= &exynos5_clk_aclk_66.clk,
 		.enable		= exynos5_clk_ip_peris_ctrl,
arch/arm/mach-exynos/include/mach/map.h +1 -0
index 772acd3..2a28ef9 100644
@@ -89,6 +89,7 @@
 #define EXYNOS4_PA_L2CC			0x10502000
 
 #define EXYNOS4_PA_TMU			0x100C0000
+#define EXYNOS5_PA_TMU			0x10060000
 
 #define EXYNOS4_PA_MDMA0		0x10810000
 #define EXYNOS4_PA_MDMA1		0x12850000
arch/arm/mach-exynos/mach-exynos5-dt.c +2 -0
index b7f1154..f8d5a9b 100644
@@ -76,6 +76,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = {
 	OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC3,
 				"exynos-gsc.3", NULL),
 	OF_DEV_AUXDATA("samsung,mfc-v6", 0x11000000, "s5p-mfc-v6", NULL),
+	OF_DEV_AUXDATA("samsung,exynos5250-tmu", EXYNOS5_PA_TMU,
+				"exynos-tmu", NULL),
 	{},
 };
 
Signature · 1 line
1.7.1
#3 lore raw

PATCH v2 1/2 ARM: exynos4: Add devicetree node for TMU driver

In reply to Amit Daniel Kachhap
Quoted 7 lines · Amit Daniel Kachhap

From: Amit Daniel Kachhap<[email protected]>

This patch adds necessary source definations needed for TMU driver and adds devicetree node for exynos4210.

---

[...]

arch/arm/mach-exynos/clock-exynos4.c static struct clk exynos4_init_clocks_off[] = {

Quoted 3 lines
arch/arm/mach-exynos/clock-exynos4.c +3 -0
+		.name           = "tmu_apbif",
+		.enable         = exynos4_clk_ip_perir_ctrl,
+		.ctrlbit        = (1<<  17),

tab instead of white spaces?

I fixed them when I applied.

[...]

arch/arm/mach-exynos/include/mach/irqs.h line 140

Quoted 2 lines
arch/arm/mach-exynos/include/mach/irqs.h +2 -0
+#define EXYNOS4_IRQ_TMU_TRIG0		COMBINER_IRQ(2, 4)
+#define EXYNOS4_IRQ_TMU_TRIG1		COMBINER_IRQ(3, 4)

BTW, where are above definitions used?

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#4 lore raw

PATCH v2 1/2 ARM: exynos4: Add devicetree node for TMU driver

Quoted 14 lines · Kukjin Kim
Quoted 8 lines · Amit Daniel Kachhap

From: Amit Daniel Kachhap<[email protected]>

This patch adds necessary source definations needed for TMU driver and adds devicetree node for exynos4210.

---

[...]

Quoted 8 lines

arch/arm/mach-exynos/clock-exynos4.c static struct clk exynos4_init_clocks_off[] = {

Quoted 3 lines
arch/arm/mach-exynos/clock-exynos4.c +3 -0
+               .name           = "tmu_apbif",
+               .enable         = exynos4_clk_ip_perir_ctrl,
+               .ctrlbit        = (1<<  17),

tab instead of white spaces?

I fixed them when I applied.

Thanks Mr Kim.

Quoted 9 lines

[...]

arch/arm/mach-exynos/include/mach/irqs.h line 140

Quoted 2 lines
arch/arm/mach-exynos/include/mach/irqs.h +2 -0
+#define EXYNOS4_IRQ_TMU_TRIG0          COMBINER_IRQ(2, 4)
+#define EXYNOS4_IRQ_TMU_TRIG1          COMBINER_IRQ(3, 4)

BTW, where are above definitions used?

They are not used currently but might be useful for non DT support.

Thanks,
Amit Daniel

Quoted 8 lines

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#5 lore raw

v2 cover ARM: exynos: Enable TMU support in exynos platforms

In reply to Amit Daniel Kachhap
Quoted 12 lines · Amit Daniel Kachhap

From: Amit Daniel Kachhap<[email protected]>

These TMU enablement patches are needed for exynos4 and exynos5 TMU driver already merged(drivers/thermal/exynos_thermal.c).

This patchset is based on Samsung Maintainer's tree,
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git for-next

Amit Daniel Kachhap (2):
ARM: exynos4: Add devicetree node for TMU driver
ARM: exynos5: Add devicetree node for TMU driver

Quoted 9 lines
  arch/arm/boot/dts/exynos4210.dtsi        |    7 +++++++
  arch/arm/boot/dts/exynos5250.dtsi        |    6 ++++++
  arch/arm/mach-exynos/clock-exynos4.c     |    4 ++++
  arch/arm/mach-exynos/clock-exynos5.c     |    5 +++++
  arch/arm/mach-exynos/include/mach/irqs.h |    3 +++
  arch/arm/mach-exynos/include/mach/map.h  |    3 +++
  arch/arm/mach-exynos/mach-exynos4-dt.c   |    2 ++
  arch/arm/mach-exynos/mach-exynos5-dt.c   |    2 ++
  8 files changed, 32 insertions(+), 0 deletions(-)

Look good to me, will apply.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.