ARM: shmobile: r8a7790 and r8a7791 thermal update
Subsystems (5)
Magnus Damm
maintainercover ARM: shmobile: r8a7790 and r8a7791 thermal update
ARM: shmobile: r8a7790 and r8a7791 thermal update
[PATCH 01/05] ARM: shmobile: Add r8a7790 thermal device node to DTS [PATCH 02/05] ARM: shmobile: Add r8a7790 clocks for thermal devices [PATCH 03/05] ARM: shmobile: Add r8a7791 thermal device node to DTS [PATCH 04/05] ARM: shmobile: Add r8a7791 thermal platform device [PATCH 05/05] ARM: shmobile: Add r8a7791 clocks for thermal devices
Update the thermal support for the r8a7790 and the r8a7791 SoCs. As usual the code is split between the DT reference code and the legacy case. The DT reference code is written to be multiplatform aware and is used to point out the future direction. Hardware support may however be limited there due to lacking DT bindings.
---
Written against renesas.git tag renesas-devel-v3.12-20131119
Tested on Lager and Koelsch.
arch/arm/boot/dts/r8a7790.dtsi | 7 +++++++ arch/arm/boot/dts/r8a7791.dtsi | 7 +++++++ arch/arm/mach-shmobile/clock-r8a7790.c | 1 + arch/arm/mach-shmobile/clock-r8a7791.c | 4 ++++ arch/arm/mach-shmobile/setup-r8a7791.c | 12 ++++++++++++ 5 files changed, 31 insertions(+)
Magnus Damm
maintainerPATCH 1/5 ARM: shmobile: Add r8a7790 thermal device node to DTS
From: Magnus Damm <[email protected]>
Hook up the r8a7790 thermal sensor to the DTS.
---
arch/arm/boot/dts/r8a7790.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/r8a7790.dtsi +7 -0
@@ -162,6 +162,13 @@ interrupt-controller; }; + thermal@e61f0000 { + compatible = "renesas,thermal-r8a7790", "renesas,rcar-thermal"; + reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>; + interrupt-parent = <&gic>; + interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>; + }; + timer { compatible = "arm,armv7-timer"; interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
Re: [PATCH 01/05] ARM: shmobile: Add r8a7790 thermal device node to DTS
Quoted 5 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Hook up the r8a7790 thermal sensor to the DTS.
Signed-off-by Magnus Damm <[email protected]>
Thanks, I will queue this up.
Assuming all goes will I plan to push this and other updates today or tomorrow.
Quoted 22 lines
---
arch/arm/boot/dts/r8a7790.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/r8a7790.dtsi +7
-0@@ -162,6 +162,13 @@ interrupt-controller; }; + thermal@e61f0000 { + compatible = "renesas,thermal-r8a7790", "renesas,rcar-thermal"; + reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>; + interrupt-parent = <&gic>; + interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>; + }; + timer { compatible = "arm,armv7-timer"; interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
Magnus Damm
maintainerPATCH 2/5 ARM: shmobile: Add r8a7790 clocks for thermal devices
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Add the r8a7790 DT thermal device to the legacy clocks.
---
arch/arm/mach-shmobile/clock-r8a7790.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-shmobile/clock-r8a7790.c +1 -0
@@ -286,6 +286,7 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("e6530000.i2c" , &mstp_clks[MSTP929 ]),CLKDEV_DEV_ID ("e6540000.i2c" , &mstp_clks[MSTP928 ]),CLKDEV_DEV_ID ("r8a7790-ether" , &mstp_clks[MSTP813 ]), +CLKDEV_DEV_ID ("e61f0000.thermal" , &mstp_clks[MSTP522 ]),CLKDEV_DEV_ID ("rcar_thermal" , &mstp_clks[MSTP522 ]),CLKDEV_DEV_ID ("ee200000.mmc" , &mstp_clks[MSTP315 ]), CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
Re: [PATCH 02/05] ARM: shmobile: Add r8a7790 clocks for thermal devices
Quoted 14 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Add the r8a7790 DT thermal device to the legacy clocks.
Signed-off-by Magnus Damm <[email protected]>---
arch/arm/mach-shmobile/clock-r8a7790.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-shmobile/clock-r8a7790.c static struct clk_lookup lookups[] = { · line 292
Quoted 7 lines
arch/arm/mach-shmobile/clock-r8a7790.c +1
-0@@ -286,6 +286,7 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("e6530000.i2c" , &mstp_clks[MSTP929 ]),CLKDEV_DEV_ID ("e6540000.i2c" , &mstp_clks[MSTP928 ]),CLKDEV_DEV_ID ("r8a7790-ether" , &mstp_clks[MSTP813 ]), +CLKDEV_DEV_ID ("e61f0000.thermal" , &mstp_clks[MSTP522 ]),CLKDEV_DEV_ID ("rcar_thermal" , &mstp_clks[MSTP522 ]),CLKDEV_DEV_ID ("ee200000.mmc" , &mstp_clks[MSTP315 ]), CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
Thanks. There was a small amount of fuzz when I applied this patch to the soc3 branch. The result is below, please check it.
Assuming all goes will I plan to push this and other updates today or tomorrow.
From: Magnus Damm <[email protected]>
[PATCH] ARM: shmobile: Add r8a7790 clocks for thermal devices
Add the r8a7790 DT thermal device to the legacy clocks.
--- arch/arm/mach-shmobile/clock-r8a7790.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-shmobile/clock-r8a7790.c +1 -0
@@ -286,6 +286,7 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("e6530000.i2c" , &mstp_clks[MSTP929 ]),CLKDEV_DEV_ID ("e6540000.i2c" , &mstp_clks[MSTP928 ]),CLKDEV_DEV_ID ("r8a7790-ether" , &mstp_clks[MSTP813 ]), +CLKDEV_DEV_ID ("e61f0000.thermal" , &mstp_clks[MSTP522 ]),CLKDEV_DEV_ID ("rcar_thermal" , &mstp_clks[MSTP522 ]),CLKDEV_DEV_ID ("ee200000.mmcif" , &mstp_clks[MSTP315 ]), CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
Signature · 1 line
1.8.4
Magnus Damm
maintainerPATCH 3/5 ARM: shmobile: Add r8a7791 thermal device node to DTS
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Hook up the r8a7791 thermal sensor to the DTS.
---
arch/arm/boot/dts/r8a7791.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/r8a7791.dtsi +7 -0
@@ -145,6 +145,13 @@ interrupt-controller; }; + thermal@e61f0000 { + compatible = "renesas,thermal-r8a7791", "renesas,rcar-thermal"; + reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>; + interrupt-parent = <&gic>; + interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>; + }; + timer { compatible = "arm,armv7-timer"; interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
Re: [PATCH 03/05] ARM: shmobile: Add r8a7791 thermal device node to DTS
Quoted 9 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Hook up the r8a7791 thermal sensor to the DTS.
Signed-off-by Magnus Damm <[email protected]>---
arch/arm/boot/dts/r8a7791.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
Thanks, I will queue this up.
Assuming all goes will I plan to push this and other updates today or tomorrow.
Quoted 18 lines
arch/arm/boot/dts/r8a7791.dtsi +7
-0@@ -145,6 +145,13 @@ interrupt-controller; }; + thermal@e61f0000 { + compatible = "renesas,thermal-r8a7791", "renesas,rcar-thermal"; + reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>; + interrupt-parent = <&gic>; + interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>; + }; + timer { compatible = "arm,armv7-timer"; interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
Magnus Damm
maintainerPATCH 4/5 ARM: shmobile: Add r8a7791 thermal platform device
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Add a thermal platform device for the legacy case on the r8a7791 SoC. This keeps the r8a7791 in sync with the r8a7790 sister device.
---
arch/arm/mach-shmobile/setup-r8a7791.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/mach-shmobile/setup-r8a7791.c +12 -0
@@ -189,6 +189,17 @@ static struct resource irqc0_resources[] &irqc##idx##_data, \ sizeof(struct renesas_irqc_config)) +static const struct resource thermal_resources[]__initconst = { +DEFINE_RES_MEM (0xe61f0000 ,0x14 ), +DEFINE_RES_MEM (0xe61f0100 ,0x38 ), +DEFINE_RES_IRQ (gic_spi (69 )), +}; + +#define r8a7791_register_thermal () \ + platform_device_register_simple("rcar_thermal", -1, \ + thermal_resources, \ + ARRAY_SIZE(thermal_resources)) +void __init r8a7791_add_dt_devices (void ) {r8a7791_register_scif (SCIFA0 );
@@ -213,6 +224,7 @@ void __init r8a7791_add_standard_devices {r8a7791_add_dt_devices ();r8a7791_register_irqc (0 ); +r8a7791_register_thermal (); }void __init r8a7791_init_early (void )
Re: [PATCH 04/05] ARM: shmobile: Add r8a7791 thermal platform device
Quoted 6 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Add a thermal platform device for the legacy case on the r8a7791 SoC. This keeps the r8a7791 in sync with the r8a7790 sister device.
Quoted 6 lines
Signed-off-by Magnus Damm <[email protected]>---
arch/arm/mach-shmobile/setup-r8a7791.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Thanks, I will queue this up.
Assuming all goes will I plan to push this and other updates today or tomorrow.
Quoted 29 lines
arch/arm/mach-shmobile/setup-r8a7791.c +12
-0@@ -189,6 +189,17 @@ static struct resource irqc0_resources[] &irqc##idx##_data, \ sizeof(struct renesas_irqc_config)) +static const struct resource thermal_resources[]__initconst = { +DEFINE_RES_MEM (0xe61f0000 ,0x14 ), +DEFINE_RES_MEM (0xe61f0100 ,0x38 ), +DEFINE_RES_IRQ (gic_spi (69 )), +}; + +#define r8a7791_register_thermal () \ + platform_device_register_simple("rcar_thermal", -1, \ + thermal_resources, \ + ARRAY_SIZE(thermal_resources)) +void __init r8a7791_add_dt_devices (void ) {r8a7791_register_scif (SCIFA0 );@@ -213,6 +224,7 @@ void __init r8a7791_add_standard_devices {r8a7791_add_dt_devices ();r8a7791_register_irqc (0 ); +r8a7791_register_thermal (); }void __init r8a7791_init_early (void )
Magnus Damm
maintainerPATCH 5/5 ARM: shmobile: Add r8a7791 clocks for thermal devices
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Add the r8a7791 thermal device as legacy clocks.
---
arch/arm/mach-shmobile/clock-r8a7791.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/mach-shmobile/clock-r8a7791.c +4 -0
@@ -124,6 +124,7 @@ static struct clk *main_clks[] = {enum {MSTP726 ,MSTP724 ,MSTP723 ,MSTP721 ,MSTP720 ,MSTP719 ,MSTP718 ,MSTP715 ,MSTP714 , +MSTP522 ,MSTP216 ,MSTP207 ,MSTP206 ,MSTP204 ,MSTP203 ,MSTP202 ,MSTP1105 ,MSTP1106 ,MSTP1107 ,MSTP124 ,
@@ -140,6 +141,7 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP718] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 18, 0), /* SCIF3 */ [MSTP715] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 15, 0), /* SCIF4 */ [MSTP714] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 14, 0), /* SCIF5 */ + [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */
@@ -188,6 +190,8 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("sh-sci.13" , &mstp_clks[MSTP1106 ]),/* SCIFA4 */ CLKDEV_DEV_ID ("sh-sci.14" , &mstp_clks[MSTP1107 ]),/* SCIFA5 */ CLKDEV_DEV_ID ("sh_cmt.0" , &mstp_clks[MSTP124 ]), +CLKDEV_DEV_ID ("e61f0000.thermal" , &mstp_clks[MSTP522 ]), + CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), };#define R8A7791_CLOCK_ROOT (e, m, p0, p1, p30, p31) \
Re: [PATCH 05/05] ARM: shmobile: Add r8a7791 clocks for thermal devices
Quoted 5 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Add the r8a7791 thermal device as legacy clocks.
Signed-off-by Magnus Damm <[email protected]>
Thanks, I will queue this up.
Assuming all goes will I plan to push this and other updates today or tomorrow.
Quoted 33 lines
---
arch/arm/mach-shmobile/clock-r8a7791.c | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/mach-shmobile/clock-r8a7791.c +4
-0@@ -124,6 +124,7 @@ static struct clk *main_clks[] = {enum {MSTP726 ,MSTP724 ,MSTP723 ,MSTP721 ,MSTP720 ,MSTP719 ,MSTP718 ,MSTP715 ,MSTP714 , +MSTP522 ,MSTP216 ,MSTP207 ,MSTP206 ,MSTP204 ,MSTP203 ,MSTP202 ,MSTP1105 ,MSTP1106 ,MSTP1107 ,MSTP124 ,@@ -140,6 +141,7 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP718] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 18, 0), /* SCIF3 */ [MSTP715] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 15, 0), /* SCIF4 */ [MSTP714] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 14, 0), /* SCIF5 */ + [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */@@ -188,6 +190,8 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("sh-sci.13" , &mstp_clks[MSTP1106 ]),/* SCIFA4 */ CLKDEV_DEV_ID ("sh-sci.14" , &mstp_clks[MSTP1107 ]),/* SCIFA5 */ CLKDEV_DEV_ID ("sh_cmt.0" , &mstp_clks[MSTP124 ]), +CLKDEV_DEV_ID ("e61f0000.thermal" , &mstp_clks[MSTP522 ]), + CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), };#define R8A7791_CLOCK_ROOT (e, m, p0, p1, p30, p31) \
Hi
Quoted 8 lines
ARM: shmobile: r8a7790 and r8a7791 thermal update
[PATCH 01/05] ARM: shmobile: Add r8a7790 thermal device node to DTS [PATCH 02/05] ARM: shmobile: Add r8a7790 clocks for thermal devices [PATCH 03/05] ARM: shmobile: Add r8a7791 thermal device node to DTS [PATCH 04/05] ARM: shmobile: Add r8a7791 thermal platform device [PATCH 05/05] ARM: shmobile: Add r8a7791 clocks for thermal devices
Quoted 5 lines
Update the thermal support for the r8a7790 and the r8a7791 SoCs. As usual the code is split between the DT reference code and the legacy case. The DT reference code is written to be multiplatform aware and is used to point out the future direction. Hardware support may however be limited there due to lacking DT bindings.
For all patches
Best regards
---
Kuninori Morimoto