ARM: shmobile: r8a73a4 SoC support V3
Subsystems (5)
Magnus Damm
maintainercover ARM: shmobile: r8a73a4 SoC support V3
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC support
This series is V3 of initial support for the r8a73a4 SoC. The SoC is known as r8a73a4 which is built around Cortex-A15 and makes use of SCIF for serial, IRQC interrupt controller for external IRQs and PFC for combined support for pinmux and GPIO.
Changes in V3:
- Added clock mapping for all supported root clocks
- Fixed a bug in the SCIF patch where PORT_SCIFA was always being selected
Updated PFC and APE6EVM series will be on top of this one.
---
Written against "next" renesas.git 442d651d3764ba4203c6b766a1ddd3ac24a40410 [PATCH 01/04] requires [PATCH] ARM: shmobile: Disallow PINCTRL without GPIOLIB [PATCH 03/04] requires the IRQC driver to build
arch/arm/boot/dts/r8a73a4.dtsi | 87 +++++++++++ arch/arm/mach-shmobile/Kconfig | 9 + arch/arm/mach-shmobile/Makefile | 1 arch/arm/mach-shmobile/clock-r8a73a4.c | 106 ++++++++++++++ arch/arm/mach-shmobile/include/mach/r8a73a4.h | 8 + arch/arm/mach-shmobile/setup-r8a73a4.c | 187 +++++++++++++++++++++++++ 6 files changed, 397 insertions(+), 1 deletion(-)
Magnus Damm
maintainerPATCH 1/4 ARM: shmobile: Initial r8a73a4 SoC support V3
From: Magnus Damm <[email protected]>
V3 of initial support for the r8a73a4 SoC including:
- Single Cortex-A15 CPU Core
- GIC
- Architecture timer
No static virtual mappings are used, all the components make use of ioremap(). DT_MACHINE_START is still wrapped in CONFIG_USE_OF to match other mach-shmobile code.
---
Changes since V2:
- Tied in cpg_mapping on all currently supported root clocks
arch/arm/boot/dts/r8a73a4.dtsi | 55 +++++++++++++++ arch/arm/mach-shmobile/Kconfig | 7 + arch/arm/mach-shmobile/Makefile | 1 arch/arm/mach-shmobile/clock-r8a73a4.c | 91 +++++++++++++++++++++++++ arch/arm/mach-shmobile/include/mach/r8a73a4.h | 7 + arch/arm/mach-shmobile/setup-r8a73a4.c | 50 +++++++++++++ 6 files changed, 211 insertions(+)
arch/arm/boot/dts/r8a73a4.dtsi new file +55 -0
@@ -0,0 +1,55 @@ +/* + * Device Tree Source for the r8a73a4 SoC + * + * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013 Magnus Damm + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + +/include/ "skeleton.dtsi" + +/ { + compatible = "renesas,r8a73a4"; + interrupt-parent = <&gic>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu at 0 { + device_type = "cpu"; + compatible = "arm,cortex-a15"; + reg = <0>; + clock-frequency = <1500000000>; + }; + }; + + gic: interrupt-controller at f1001000 { + compatible = "arm,cortex-a15-gic"; + #interrupt-cells = <3>; + #address-cells = <0>; + interrupt-controller; + reg = <0xf1001000 0x1000>, + <0xf1002000 0x1000>, + <0xf1004000 0x2000>, + <0xf1006000 0x2000>; + interrupts = <1 9 0xf04>; + + gic-cpuif at 4 { + compatible = "arm,gic-cpuif"; + cpuif-id = <4>; + cpu = <&cpu0>; + }; + }; + + timer { + compatible = "arm,armv7-timer"; + interrupts = <1 13 0xf08>, + <1 14 0xf08>, + <1 11 0xf08>, + <1 10 0xf08>; + }; +};
arch/arm/mach-shmobile/Kconfig +7 -0
@@ -18,6 +18,13 @@ config ARCH_SH73A0 select SH_CLK_CPG select RENESAS_INTC_IRQPIN +config ARCH_R8A73A4 + bool "R-Mobile APE6 (R8A73A40)" + select ARM_GIC + select CPU_V7 + select ARM_ARCH_TIMER + select SH_CLK_CPG + config ARCH_R8A7740 bool "R-Mobile A1 (R8A77400)" select ARCH_WANT_OPTIONAL_GPIOLIB
arch/arm/mach-shmobile/Makefile +1 -0
@@ -8,6 +8,7 @@ obj-y := timer.o console.o clock.o # CPU objects obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o +obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o clock-r8a73a4.o obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o clock-r8a7740.o intc-r8a7740.o obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o clock-r8a7779.o intc-r8a7779.o obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o clock-emev2.o
arch/arm/mach-shmobile/clock-r8a73a4.c new file +91 -0
91 lines not on this page · raw message
arch/arm/mach-shmobile/include/mach/r8a73a4.h new file +7 -0
@@ -0,0 +1,7 @@ +#ifndef __ASM_R8A73A4_H__ +#define __ASM_R8A73A4_H__ + +void r8a73a4_add_standard_devices (void ); +void r8a73a4_clock_init (void ); + +#endif /* __ASM_R8A73A4_H__ */
arch/arm/mach-shmobile/setup-r8a73a4.c new file +50 -0
50 lines not on this page · raw message
Magnus Damm
maintainerPATCH 2/4 ARM: shmobile: r8a73a4 SCIF support V3
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
V3 of SCIF serial port support for the r8a73a4 SoC. This is done by adding platform devices for SCIFA0 -> SCIFA1 as well as SCIFB0 -> SCIFB3 together with clock bindings. DT device description is excluded at this point since such bindings are still under development.
---
Changes since V2:
- Fixed a bug where PORT_SCIFA was always selected regardless of port type
Changes since V1:
- Replaced static platform devices with array of platform data together with a call to platform_device_register_data()
arch/arm/mach-shmobile/clock-r8a73a4.c | 15 ++++++++++- arch/arm/mach-shmobile/setup-r8a73a4.c | 43 ++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/clock-r8a73a4.c +14 -1
@@ -28,6 +28,7 @@#define CPG_LEN 0x270#define MPCKCR 0xe6150080 +#define SMSTPCR2 0xe6150138static struct clk_mapping cpg_mapping = { .phys =CPG_BASE ,
@@ -55,11 +56,23 @@ static struct clk *main_clks[] = { &extal2_clk, }; -enum {MSTP_NR }; +enum {MSTP217 ,MSTP216 ,MSTP207 ,MSTP206 ,MSTP204 ,MSTP203 ,MSTP_NR };static struct clk mstp_clks[MSTP_NR ] = { + [MSTP204 ] =SH_CLK_MSTP32 (&extal2_clk,SMSTPCR2 ,4 ,0 ),/* SCIFA0 */ + [MSTP203 ] =SH_CLK_MSTP32 (&extal2_clk,SMSTPCR2 ,3 ,0 ),/* SCIFA1 */ + [MSTP206 ] =SH_CLK_MSTP32 (&extal2_clk,SMSTPCR2 ,6 ,0 ),/* SCIFB0 */ + [MSTP207 ] =SH_CLK_MSTP32 (&extal2_clk,SMSTPCR2 ,7 ,0 ),/* SCIFB1 */ + [MSTP216 ] =SH_CLK_MSTP32 (&extal2_clk,SMSTPCR2 ,16 ,0 ),/* SCIFB2 */ + [MSTP217 ] =SH_CLK_MSTP32 (&extal2_clk,SMSTPCR2 ,17 ,0 ),/* SCIFB3 */ };static struct clk_lookup lookups[] = { +CLKDEV_DEV_ID ("sh-sci.0" , &mstp_clks[MSTP204 ]), +CLKDEV_DEV_ID ("sh-sci.1" , &mstp_clks[MSTP203 ]), +CLKDEV_DEV_ID ("sh-sci.2" , &mstp_clks[MSTP206 ]), +CLKDEV_DEV_ID ("sh-sci.3" , &mstp_clks[MSTP207 ]), +CLKDEV_DEV_ID ("sh-sci.4" , &mstp_clks[MSTP216 ]), +CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP217 ]), };void __init r8a73a4_clock_init (void )
arch/arm/mach-shmobile/setup-r8a73a4.c +43 -0
56 lines not on this page · raw message
Magnus Damm
maintainerPATCH 3/4 ARM: shmobile: r8a73a4 IRQC support V2
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Add IRQC interrupt controller support to r8a73a4 by hooking up two IRQC instances to handle 58 external IRQ signals. There IRQC controllers are tied to SPIs of the GIC. On r8a73a4 exact IRQ pin routing is handled by the PFC which is excluded from this patch.
Both platform devices and DT devices are added in this patch. The platform device versions are used to provide a static interrupt map configuration for board code written in C.
---
Change since V1:
- Use platform_device_register_resndata() instead of static platform device
Depends on:
[PATCH] irqchip: Renesas IRQC driver
[PATCH] irqchip: irqc: Add DT support
arch/arm/boot/dts/r8a73a4.dtsi | 32 ++++++++++++ arch/arm/mach-shmobile/Kconfig | 1 arch/arm/mach-shmobile/setup-r8a73a4.c | 84 ++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+)
arch/arm/boot/dts/r8a73a4.dtsi +32 -0
@@ -52,4 +52,36 @@ <1 11 0xf08>, <1 10 0xf08>; }; + + irqc0: interrupt-controller at e61c0000 { + compatible = "renesas,irqc"; + #interrupt-cells = <2>; + interrupt-controller; + reg = <0xe61c0000 0x200>; + interrupt-parent = <&gic>; + interrupts = <0 0 4>, <0 1 4>, <0 2 4>, <0 3 4>, + <0 4 4>, <0 5 4>, <0 6 4>, <0 7 4>, + <0 8 4>, <0 9 4>, <0 10 4>, <0 11 4>, + <0 12 4>, <0 13 4>, <0 14 4>, <0 15 4>, + <0 16 4>, <0 17 4>, <0 18 4>, <0 19 4>, + <0 20 4>, <0 21 4>, <0 22 4>, <0 23 4>, + <0 24 4>, <0 25 4>, <0 26 4>, <0 27 4>, + <0 28 4>, <0 29 4>, <0 30 4>, <0 31 4>; + }; + + irqc1: interrupt-controller at e61c0200 { + compatible = "renesas,irqc"; + #interrupt-cells = <2>; + interrupt-controller; + reg = <0xe61c0200 0x200>; + interrupt-parent = <&gic>; + interrupts = <0 32 4>, <0 33 4>, <0 34 4>, <0 35 4>, + <0 36 4>, <0 37 4>, <0 38 4>, <0 39 4>, + <0 40 4>, <0 41 4>, <0 42 4>, <0 43 4>, + <0 44 4>, <0 45 4>, <0 46 4>, <0 47 4>, + <0 48 4>, <0 49 4>, <0 50 4>, <0 51 4>, + <0 52 4>, <0 53 4>, <0 54 4>, <0 55 4>, + <0 56 4>, <0 57 4>; + }; + };
arch/arm/mach-shmobile/Kconfig +1 -0
@@ -24,6 +24,7 @@ config ARCH_R8A73A4 select CPU_V7 select ARM_ARCH_TIMER select SH_CLK_CPG + select RENESAS_IRQC config ARCH_R8A7740 bool "R-Mobile A1 (R8A77400)"
arch/arm/mach-shmobile/setup-r8a73a4.c +84 -0
102 lines not on this page · raw message
Magnus Damm
maintainerPATCH 4/4 ARM: shmobile: r8a73a4 PFC support
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Add a platform device for the r8a73a4 PFC.
---
No build time dependency, but requires PFC tables in separate patch series to actually do something.
arch/arm/mach-shmobile/Kconfig | 1 + arch/arm/mach-shmobile/include/mach/r8a73a4.h | 1 + arch/arm/mach-shmobile/setup-r8a73a4.c | 10 ++++++++++ 3 files changed, 12 insertions(+)
arch/arm/mach-shmobile/Kconfig +1 -0
@@ -20,6 +20,7 @@ config ARCH_SH73A0 config ARCH_R8A73A4 bool "R-Mobile APE6 (R8A73A40)" + select ARCH_WANT_OPTIONAL_GPIOLIB select ARM_GIC select CPU_V7 select ARM_ARCH_TIMER
arch/arm/mach-shmobile/include/mach/r8a73a4.h +1 -0
@@ -3,5 +3,6 @@void r8a73a4_add_standard_devices (void );void r8a73a4_clock_init (void ); +void r8a73a4_pinmux_init (void );#endif /* __ASM_R8A73A4_H__ */
arch/arm/mach-shmobile/setup-r8a73a4.c +10 -0
@@ -28,6 +28,16 @@#include <mach/r8a73a4.h> #include <asm/mach/arch.h> +static const struct resource pfc_resources[] = { +DEFINE_RES_MEM (0xe6050000 ,0x9000 ), +}; + +void __init r8a73a4_pinmux_init (void ) +{ +platform_device_register_simple ("pfc-r8a73a4" ,-1 , pfc_resources, +ARRAY_SIZE (pfc_resources)); +} +#define SCIF_COMMON (scif_type, baseaddr, irq) \ .type = PORT_SCIFA, \ .mapbase = baseaddr, \
cover ARM: shmobile: r8a73a4 thermal support
In reply to Magnus DammHi Simon, Magnus
This patch add thermal driver support on r8a73a4.
Quoted 5 lines
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC support
This patch is based on...
simon/next branch
And, Magnus's
ARM: shmobile: r8a73a4 SoC support V3
sh-pfc: Initial r8a73a4 PFC support
ARM: shmobile: r8a73a4 APE6EVM board support V2
And, Zhang's (= PM ML)
f0e68fc3caf677e834f7bd0f601800e686b56c98
(thermal: rcar: fix missing unlock on error in rcar_thermal_update_temp())
fb84d9907f0ff0e3f7d70d55039ddf0f78d2a472
(thermal: rcar_thermal: propagate return value of thermal_zone_device_register)
And, my previous
thermal: rcar: tidyup registration failure case
thermal: rcar: add pm_runtime_xxx() support
Simon, please let me know if you need my help
PATCH 1/1 ARM: shmobile: r8a73a4: add thermal driver support
You can get current thermal by
Quoted 1 line
cat /sys/class/thermal/thermal_zone?/temp
--- arch/arm/boot/dts/r8a73a4.dtsi | 7 +++++++ arch/arm/mach-shmobile/clock-r8a73a4.c | 13 ++++++++++++- arch/arm/mach-shmobile/setup-r8a73a4.c | 15 +++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-)
arch/arm/boot/dts/r8a73a4.dtsi +7 -0
@@ -84,4 +84,11 @@ <0 56 4>, <0 57 4>; }; + thermal at e61f0000 { + compatible = "renesas,rcar-thermal"; + reg = <0xe61f0000 0x14>, <0xe61f0100 0x38>, + <0xe61f0200 0x38>, <0xe61f0300 0x38>; + interrupt-parent = <&gic>; + interrupts = <0 69 4>; + }; };
arch/arm/mach-shmobile/clock-r8a73a4.c +12 -1
@@ -29,6 +29,7 @@#define MPCKCR 0xe6150080#define SMSTPCR2 0xe6150138 +#define SMSTPCR5 0xe6150144static struct clk_mapping cpg_mapping = { .phys =CPG_BASE ,
@@ -56,7 +57,12 @@ static struct clk *main_clks[] = { &extal2_clk, }; -enum {MSTP217 ,MSTP216 ,MSTP207 ,MSTP206 ,MSTP204 ,MSTP203 ,MSTP_NR }; +enum { +MSTP217 ,MSTP216 ,MSTP207 ,MSTP206 ,MSTP204 ,MSTP203 , +MSTP522 , +MSTP_NR +}; +static struct clk mstp_clks[MSTP_NR ] = { [MSTP204 ] =SH_CLK_MSTP32 (&extal2_clk,SMSTPCR2 ,4 ,0 ),/* SCIFA0 */ [MSTP203 ] =SH_CLK_MSTP32 (&extal2_clk,SMSTPCR2 ,3 ,0 ),/* SCIFA1 */
@@ -64,6 +70,7 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP207] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ [MSTP216] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ [MSTP217] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR2, 17, 0), /* SCIFB3 */ + [MSTP522] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR5, 22, 0), /* Thermal */ };static struct clk_lookup lookups[] = {
@@ -73,6 +80,10 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("sh-sci.3" , &mstp_clks[MSTP207 ]),CLKDEV_DEV_ID ("sh-sci.4" , &mstp_clks[MSTP216 ]),CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP217 ]), +CLKDEV_DEV_ID ("rcar_thermal" , &mstp_clks[MSTP522 ]), + +/* for DT */ + CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), };void __init r8a73a4_clock_init (void )
arch/arm/mach-shmobile/setup-r8a73a4.c +15 -0
@@ -155,6 +155,20 @@ static const struct resource irqc1_resources[] = { &irqc##idx##_data, \ sizeof(struct renesas_irqc_config)) +/* Thermal0 -> Thermal2 */ +static const struct resource thermal0_resources[] = { +DEFINE_RES_MEM (0xe61f0000 ,0x14 ), +DEFINE_RES_MEM (0xe61f0100 ,0x38 ), +DEFINE_RES_MEM (0xe61f0200 ,0x38 ), +DEFINE_RES_MEM (0xe61f0300 ,0x38 ), +DEFINE_RES_IRQ (gic_spi (69 )), +}; + +#define r8a73a4_register_thermal () \ + platform_device_register_simple("rcar_thermal", -1, \ + thermal0_resources, \ + ARRAY_SIZE(thermal0_resources)) +void __init r8a73a4_add_standard_devices (void ) {r8a73a4_register_scif (SCIFA0 );
@@ -165,6 +179,7 @@ void __init r8a73a4_add_standard_devices(void)r8a73a4_register_scif (SCIFB3 );r8a73a4_register_irqc (0 );r8a73a4_register_irqc (1 ); +r8a73a4_register_thermal (); }#ifdef CONFIG_USE_OF
Signature · 1 line
1.7.9.5
cover ARM: shmobile: r8a73a4 SoC support V3
In reply to Magnus DammQuoted 11 lines · Magnus Damm
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC supportThis series is V3 of initial support for the r8a73a4 SoC. The SoC is known as r8a73a4 which is built around Cortex-A15 and makes use of SCIF for serial, IRQC interrupt controller for external IRQs and PFC for combined support for pinmux and GPIO.
Magnus Damm
maintainercover ARM: shmobile: r8a73a4 SoC support V3
Quoted 7 lines · Arnd Bergmann
Quoted 6 lines · Magnus Damm
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC support
Quoted 7 lines
Quoted 5 lines
This series is V3 of initial support for the r8a73a4 SoC. The SoC is known as r8a73a4 which is built around Cortex-A15 and makes use of SCIF for serial, IRQC interrupt controller for external IRQs and PFC for combined support for pinmux and GPIO.
Acked-by Arnd Bergmann <[email protected]>
Thanks for your help!
/ magnus
cover ARM: shmobile: r8a73a4 SoC support V3
Quoted 14 lines · Magnus Damm
Quoted 13 lines · Arnd Bergmann
Quoted 11 lines · Magnus Damm
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC supportThis series is V3 of initial support for the r8a73a4 SoC. The SoC is known as r8a73a4 which is built around Cortex-A15 and makes use of SCIF for serial, IRQC interrupt controller for external IRQs and PFC for combined support for pinmux and GPIO.
Quoted 3 lines
Quoted 1 line
Acked-by Arnd Bergmann <[email protected]>Thanks for your help!
Indeed.
Magnus, please let me know if/when you would like me to queue-up these patches.
PATCH 1/1 ARM: shmobile: r8a73a4: add thermal driver support
In reply to Kuninori MorimotoQuoted 4 lines · Kuninori Morimoto
You can get current thermal by
Quoted 1 line
cat /sys/class/thermal/thermal_zone?/temp
Signed-off-by Kuninori Morimoto <[email protected]>
Thanks Morimoto-san.
Magnus, if you are ok with this change could you either:
* Let me know that your r8a73a4 is ready to be queued-up or;
* Include this patch in the next post of your r8a73a4 series with the following at the top of the body of the email.
From: Kuninori Morimoto <[email protected]>
Quoted 108 lines
--- arch/arm/boot/dts/r8a73a4.dtsi | 7 +++++++ arch/arm/mach-shmobile/clock-r8a73a4.c | 13 ++++++++++++- arch/arm/mach-shmobile/setup-r8a73a4.c | 15 +++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-)arch/arm/boot/dts/r8a73a4.dtsi +7
-0@@ -84,4 +84,11 @@ <0 56 4>, <0 57 4>; }; + thermal at e61f0000 { + compatible = "renesas,rcar-thermal"; + reg = <0xe61f0000 0x14>, <0xe61f0100 0x38>, + <0xe61f0200 0x38>, <0xe61f0300 0x38>; + interrupt-parent = <&gic>; + interrupts = <0 69 4>; + }; };arch/arm/mach-shmobile/clock-r8a73a4.c +12
-1@@ -29,6 +29,7 @@#define MPCKCR 0xe6150080#define SMSTPCR2 0xe6150138 +#define SMSTPCR5 0xe6150144static struct clk_mapping cpg_mapping = { .phys =CPG_BASE ,@@ -56,7 +57,12 @@ static struct clk *main_clks[] = { &extal2_clk, }; -enum {MSTP217 ,MSTP216 ,MSTP207 ,MSTP206 ,MSTP204 ,MSTP203 ,MSTP_NR }; +enum { +MSTP217 ,MSTP216 ,MSTP207 ,MSTP206 ,MSTP204 ,MSTP203 , +MSTP522 , +MSTP_NR +}; +static struct clk mstp_clks[MSTP_NR ] = { [MSTP204 ] =SH_CLK_MSTP32 (&extal2_clk,SMSTPCR2 ,4 ,0 ),/* SCIFA0 */ [MSTP203 ] =SH_CLK_MSTP32 (&extal2_clk,SMSTPCR2 ,3 ,0 ),/* SCIFA1 */ @@ -64,6 +70,7 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP207] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ [MSTP216] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ [MSTP217] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR2, 17, 0), /* SCIFB3 */ + [MSTP522] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR5, 22, 0), /* Thermal */ };static struct clk_lookup lookups[] = {@@ -73,6 +80,10 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("sh-sci.3" , &mstp_clks[MSTP207 ]),CLKDEV_DEV_ID ("sh-sci.4" , &mstp_clks[MSTP216 ]),CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP217 ]), +CLKDEV_DEV_ID ("rcar_thermal" , &mstp_clks[MSTP522 ]), + +/* for DT */ + CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), };void __init r8a73a4_clock_init (void )arch/arm/mach-shmobile/setup-r8a73a4.c +15
-0@@ -155,6 +155,20 @@ static const struct resource irqc1_resources[] = { &irqc##idx##_data, \ sizeof(struct renesas_irqc_config)) +/* Thermal0 -> Thermal2 */ +static const struct resource thermal0_resources[] = { +DEFINE_RES_MEM (0xe61f0000 ,0x14 ), +DEFINE_RES_MEM (0xe61f0100 ,0x38 ), +DEFINE_RES_MEM (0xe61f0200 ,0x38 ), +DEFINE_RES_MEM (0xe61f0300 ,0x38 ), +DEFINE_RES_IRQ (gic_spi (69 )), +}; + +#define r8a73a4_register_thermal () \ + platform_device_register_simple("rcar_thermal", -1, \ + thermal0_resources, \ + ARRAY_SIZE(thermal0_resources)) +void __init r8a73a4_add_standard_devices (void ) {r8a73a4_register_scif (SCIFA0 );@@ -165,6 +179,7 @@ void __init r8a73a4_add_standard_devices(void)r8a73a4_register_scif (SCIFB3 );r8a73a4_register_irqc (0 );r8a73a4_register_irqc (1 ); +r8a73a4_register_thermal (); }#ifdef CONFIG_USE_OF Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
cover ARM: shmobile: r8a73a4 thermal support
In reply to Kuninori MorimotoQuoted 25 lines · Kuninori Morimoto
Hi Simon, Magnus
This patch add thermal driver support on r8a73a4.
Quoted 5 lines
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC supportThis patch is based on...
simon/next branch
And, Magnus's
ARM: shmobile: r8a73a4 SoC support V3
sh-pfc: Initial r8a73a4 PFC support
ARM: shmobile: r8a73a4 APE6EVM board support V2And, Zhang's (= PM ML)
f0e68fc3caf677e834f7bd0f601800e686b56c98
(thermal: rcar: fix missing unlock on error inrcar_thermal_update_temp())
Quoted 8 lines
fb84d9907f0ff0e3f7d70d55039ddf0f78d2a472
(thermal:rcar_thermal: propagate return value ofthermal_zone_device_register)And, my previous
thermal: rcar: tidyup registration failure case
thermal: rcar: addpm_runtime_xxx()supportSimon, please let me know if you need my help
I think that I need to get a branch to base my changes on. Do you know if such a branch exists and who we should contact to make sure it is ok to use it as a base?
cover ARM: shmobile: r8a73a4 thermal support
Hi Simon
Thank you for your help
Quoted 5 lines
Quoted 1 line
Simon, please let me know if you need my help
I think that I need to get a branch to base my changes on. Do you know if such a branch exists and who we should contact to make sure it is ok to use it as a base?
Could you please contact to Zhang who is maintainer of thermal driver. Zhang Rui <[email protected]>
His git branch is
http://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
Best regards
---
Kuninori Morimoto
Magnus Damm
maintainercover ARM: shmobile: r8a73a4 SoC support V3
In reply to Simon HormanQuoted 15 lines · Simon Horman
Quoted 14 lines · Magnus Damm
Quoted 13 lines · Arnd Bergmann
Quoted 11 lines · Magnus Damm
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC supportThis series is V3 of initial support for the r8a73a4 SoC. The SoC is known as r8a73a4 which is built around Cortex-A15 and makes use of SCIF for serial, IRQC interrupt controller for external IRQs and PFC for combined support for pinmux and GPIO.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Acked-by Arnd Bergmann <[email protected]>Thanks for your help!
Indeed.
Magnus, please let me know if/when you would like me to queue-up these patches.
Thanks. Since you bring up the topic, I'd like you to queue up this patch series more or less right away if possible. =)
About how to handle the dependencies, I am not sure if you intend to keep the SoC bits separate from the PFC and the board code. It is possible to split it out by series but if that is needed or not depends on how the ARM SoC guys want to be fed.
Regardless, this r8a73a4 SoC V3 series depends on the following patch to compile:
[PATCH/RFC] ARM: shmobile: Disallow PINCTRL without GPIOLIB
Laurent seems OK with the patch above, how about you? I am quite OK with the above patch as a short term fix. But I believe Linus W and Laurent at some point need to decide if it is valid to have PINCTL selected without GPIO.
Thanks,
/ magnus
Magnus Damm
maintainercover ARM: shmobile: r8a73a4 thermal support
In reply to Simon HormanQuoted 33 lines · Simon Horman
Quoted 32 lines · Kuninori Morimoto
Hi Simon, Magnus
This patch add thermal driver support on r8a73a4.
Quoted 5 lines
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC supportThis patch is based on...
simon/next branch
And, Magnus's
ARM: shmobile: r8a73a4 SoC support V3
sh-pfc: Initial r8a73a4 PFC support
ARM: shmobile: r8a73a4 APE6EVM board support V2And, Zhang's (= PM ML)
f0e68fc3caf677e834f7bd0f601800e686b56c98
(thermal: rcar: fix missing unlock on error inrcar_thermal_update_temp())
fb84d9907f0ff0e3f7d70d55039ddf0f78d2a472
(thermal:rcar_thermal: propagate return value ofthermal_zone_device_register)And, my previous
thermal: rcar: tidyup registration failure case
thermal: rcar: addpm_runtime_xxx()support
Quoted 5 lines
Quoted 1 line
Simon, please let me know if you need my help
I think that I need to get a branch to base my changes on. Do you know if such a branch exists and who we should contact to make sure it is ok to use it as a base?
Hi Simon,
I have now tested patch "[PATCH] ARM: shmobile: r8a73a4: add thermal driver support" on real hardware.
I have exercised this patch by applying the following patches on top of renesas-next-20130321:
[PATCH] ARM: shmobile: Disallow PINCTRL without GPIOLIB [PATCH 00/04] ARM: shmobile: r8a73a4 SoC support V3 [PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC support
[PATCH] ARM: shmobile: r8a73a4: add thermal driver support
Judging by the patch list above I believe you can just throw this patch in on top of the "r8a73a4 SoC V3" patches.
As Morimoto-san explained, there are some runtime dependencies related to various bug fixes in the thermal driver. But for merging and compiling I believe the above should be enough.
Thanks,
/ magnus
Magnus Damm
maintainerPATCH 1/1 ARM: shmobile: r8a73a4: add thermal driver support
In reply to Simon HormanQuoted 11 lines · Simon Horman
Quoted 4 lines · Kuninori Morimoto
You can get current thermal by
Quoted 1 line
cat /sys/class/thermal/thermal_zone?/temp
Signed-off-by Kuninori Morimoto <[email protected]>Thanks Morimoto-san.
Magnus, if you are ok with this change could you either:
* Let me know that your r8a73a4 is ready to be queued-up or;
The r8a73a4 SoC code is ready to be queued up! Please apply this patch on top of that series. This code is also part of support for the actual SoC, so keeping it together with the other SoC bits makes sense at least to me!
Thanks for your help Morimoto-san and Simon.
cover ARM: shmobile: r8a73a4 SoC support V3
In reply to Magnus DammQuoted 20 lines · Magnus Damm
Quoted 19 lines · Simon Horman
Quoted 17 lines · Magnus Damm
Quoted 7 lines · Arnd Bergmann
Quoted 6 lines · Magnus Damm
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC supportQuoted 7 lines
Quoted 5 lines
This series is V3 of initial support for the r8a73a4 SoC. The SoC is known as r8a73a4 which is built around Cortex-A15 and makes use of SCIF for serial, IRQC interrupt controller for external IRQs and PFC for combined support for pinmux and GPIO.
Acked-by Arnd Bergmann <[email protected]>Thanks for your help!
Quoted 7 lines
Quoted 4 lines
Indeed.
Magnus, please let me know if/when you would like me to queue-up these patches.
Thanks. Since you bring up the topic, I'd like you to queue up this patch series more or less right away if possible. =)
Sure, I think it is possible.
Quoted 4 lines
About how to handle the dependencies, I am not sure if you intend to keep the SoC bits separate from the PFC and the board code. It is possible to split it out by series but if that is needed or not depends on how the ARM SoC guys want to be fed.
I would prefer if they were separated out so that I can apply them to separate branches, in keeping with arm-soc requirements.
The branches can depend on each other which is how any dependencies can be handled.
At this point I am thinking of merging the soc branch, with this series added, into the pinmux branch and then applying the r8a73a4 pfc patches to the result.
Quoted 8 lines
Regardless, this r8a73a4 SoC V3 series depends on the following patch to compile:
[PATCH/RFC] ARM: shmobile: Disallow PINCTRL without GPIOLIBLaurent seems OK with the patch above, how about you? I am quite OK with the above patch as a short term fix. But I believe Linus W and Laurent at some point need to decide if it is valid to have PINCTL selected without GPIO.
I think I will take it into my tree as this series relies on it.
cover ARM: shmobile: r8a73a4 SoC support V3
Quoted 23 lines · Simon Horman
Quoted 22 lines · Magnus Damm
Quoted 21 lines · Simon Horman
Quoted 14 lines · Magnus Damm
Quoted 13 lines · Arnd Bergmann
Quoted 11 lines · Magnus Damm
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC supportThis series is V3 of initial support for the r8a73a4 SoC. The SoC is known as r8a73a4 which is built around Cortex-A15 and makes use of SCIF for serial, IRQC interrupt controller for external IRQs and PFC for combined support for pinmux and GPIO.
Quoted 3 lines
Quoted 1 line
Acked-by Arnd Bergmann <[email protected]>Thanks for your help!
Indeed.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Magnus, please let me know if/when you would like me to queue-up these patches.
Thanks. Since you bring up the topic, I'd like you to queue up this patch series more or less right away if possible. =)
Sure, I think it is possible.
I have applied the series to the soc branch with Arnd's Ack.
cover ARM: shmobile: r8a73a4 thermal support
In reply to Magnus DammQuoted 22 lines · Magnus Damm
Quoted 21 lines · Simon Horman
Quoted 20 lines · Kuninori Morimoto
Hi Simon, Magnus
This patch add thermal driver support on r8a73a4.
Quoted 5 lines
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC supportThis patch is based on...
simon/next branch
And, Magnus's
ARM: shmobile: r8a73a4 SoC support V3
sh-pfc: Initial r8a73a4 PFC support
ARM: shmobile: r8a73a4 APE6EVM board support V2
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
And, Zhang's (= PM ML)
f0e68fc3caf677e834f7bd0f601800e686b56c98
(thermal: rcar: fix missing unlock on error inrcar_thermal_update_temp())
fb84d9907f0ff0e3f7d70d55039ddf0f78d2a472
(thermal:rcar_thermal: propagate return value ofthermal_zone_device_register)
These are both in v3.9-rc4, which I can use as a base.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
And, my previous
thermal: rcar: tidyup registration failure case
thermal: rcar: addpm_runtime_xxx()support
I'm not sure that this patch (ARM: shmobile: r8a73a4 thermal support) actually depends on the above two patches. I would be quite convenient for me if they didn't.
Quoted 32 lines
Quoted 5 lines
Quoted 1 line
Simon, please let me know if you need my help
I think that I need to get a branch to base my changes on. Do you know if such a branch exists and who we should contact to make sure it is ok to use it as a base?
Hi Simon,
I have now tested patch "[PATCH] ARM: shmobile: r8a73a4: add thermal driver support" on real hardware.
I have exercised this patch by applying the following patches on top of renesas-next-20130321:
[PATCH] ARM: shmobile: Disallow PINCTRL without GPIOLIB [PATCH 00/04] ARM: shmobile: r8a73a4 SoC support V3 [PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC support
[PATCH] ARM: shmobile: r8a73a4: add thermal driver supportJudging by the patch list above I believe you can just throw this patch in on top of the "r8a73a4 SoC V3" patches.
As Morimoto-san explained, there are some runtime dependencies related to various bug fixes in the thermal driver. But for merging and compiling I believe the above should be enough.
Thanks,
/ magnus
cover ARM: shmobile: r8a73a4 thermal support
In reply to Magnus DammQuoted 55 lines · Magnus Damm
Quoted 33 lines · Simon Horman
Quoted 32 lines · Kuninori Morimoto
Hi Simon, Magnus
This patch add thermal driver support on r8a73a4.
Quoted 5 lines
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC supportThis patch is based on...
simon/next branch
And, Magnus's
ARM: shmobile: r8a73a4 SoC support V3
sh-pfc: Initial r8a73a4 PFC support
ARM: shmobile: r8a73a4 APE6EVM board support V2And, Zhang's (= PM ML)
f0e68fc3caf677e834f7bd0f601800e686b56c98
(thermal: rcar: fix missing unlock on error inrcar_thermal_update_temp())
fb84d9907f0ff0e3f7d70d55039ddf0f78d2a472
(thermal:rcar_thermal: propagate return value ofthermal_zone_device_register)And, my previous
thermal: rcar: tidyup registration failure case
thermal: rcar: addpm_runtime_xxx()supportQuoted 5 lines
Quoted 1 line
Simon, please let me know if you need my help
I think that I need to get a branch to base my changes on. Do you know if such a branch exists and who we should contact to make sure it is ok to use it as a base?
Hi Simon,
I have now tested patch "[PATCH] ARM: shmobile: r8a73a4: add thermal driver support" on real hardware.
I have exercised this patch by applying the following patches on top of renesas-next-20130321:
[PATCH] ARM: shmobile: Disallow PINCTRL without GPIOLIB [PATCH 00/04] ARM: shmobile: r8a73a4 SoC support V3 [PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC support
[PATCH] ARM: shmobile: r8a73a4: add thermal driver support
Quoted 6 lines
Judging by the patch list above I believe you can just throw this patch in on top of the "r8a73a4 SoC V3" patches.
As Morimoto-san explained, there are some runtime dependencies related to various bug fixes in the thermal driver. But for merging and compiling I believe the above should be enough.
Ok, I think that should be fine. I will do as you suggest.
Simon Horman
AppliedPATCH 1/1 ARM: shmobile: r8a73a4: add thermal driver support
In reply to Kuninori MorimotoQuoted 9 lines · Kuninori Morimoto
You can get current thermal by
Quoted 1 line
cat /sys/class/thermal/thermal_zone?/temp
Signed-off-by Kuninori Morimoto <[email protected]>--- arch/arm/boot/dts/r8a73a4.dtsi | 7 +++++++ arch/arm/mach-shmobile/clock-r8a73a4.c | 13 ++++++++++++- arch/arm/mach-shmobile/setup-r8a73a4.c | 15 +++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-)
Queued up for v3.10 in the soc branch.
Magnus Damm
maintainercover ARM: shmobile: r8a73a4 SoC support V3
In reply to Simon HormanQuoted 27 lines · Simon Horman
Quoted 26 lines · Simon Horman
Quoted 25 lines · Magnus Damm
Quoted 23 lines · Simon Horman
Quoted 14 lines · Magnus Damm
Quoted 13 lines · Arnd Bergmann
Quoted 11 lines · Magnus Damm
ARM: shmobile: r8a73a4 SoC support V3
[PATCH 01/04] ARM: shmobile: Initial r8a73a4 SoC support V3 [PATCH 02/04] ARM: shmobile: r8a73a4 SCIF support V3 [PATCH 03/04] ARM: shmobile: r8a73a4 IRQC support V2 [PATCH 04/04] ARM: shmobile: r8a73a4 PFC supportThis series is V3 of initial support for the r8a73a4 SoC. The SoC is known as r8a73a4 which is built around Cortex-A15 and makes use of SCIF for serial, IRQC interrupt controller for external IRQs and PFC for combined support for pinmux and GPIO.
Quoted 3 lines
Quoted 1 line
Acked-by Arnd Bergmann <[email protected]>Thanks for your help!
Indeed.
Magnus, please let me know if/when you would like me to queue-up these patches.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Thanks. Since you bring up the topic, I'd like you to queue up this patch series more or less right away if possible. =)
Sure, I think it is possible.
I have applied the series to the soc branch with Arnd's Ack.
Thank you!
/ magnus