ARM: shmobile: Enable SCI and TMU using DT
Subsystems (5)
v2 cover ARM: shmobile: Enable SCI and TMU using DT
The purpose of this series is to enable SCI, CMT and TMU using DT on boards that use DT-reference. Or in other-words boards other than the mackerel that are not covered by Laurent Pinchart's work in the same area.
This series is based on a merge of:
* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
* renesas-devel-v3.16-rc4-20140707
It also depends on
[PATCH v2] serial: sh-sci: Add device tree support for r8a7{778,740,3a4} and sh73a
This series does not enable TMU for the sh73a0/kzm9g-reference as:
* It appears to use sh-intc as an interrupt source and I am unsure how to use this from DT at this time and;
* It is not currently enabled in dt-reference.
I will address this as a follow-up if appropriate.
Simon Horman (30):
ARM: shmobile: r8a7778: add SCI clock support for DT
ARM: shmobile: r8a7778: Add SCIF nodes
ARM: shmobile: bockw-reference: Initialise SCIF device using DT
ARM: shmobile: r8a7778: add TMU clock support for DT
ARM: shmobile: r8a7778: Add TMU nodes
ARM: shmobile: bockw-reference: Initialise TMU device using DT
ARM: shmobile: r8a73a4: add SCI clock support for DT
ARM: shmobile: r8a73a4: Add SCIF nodes
ARM: shmobile: ape6evm-reference: Initialise SCIF device using DT
ARM: shmobile: r8a73a4: add CMT1 clock support for DT
ARM: shmobile: r8a73a4: Add CMT1 node
ARM: shmobile: r8a73a4: Rename cmt registration helper
ARM: shmobile: ape6evm-reference: Initialise CMT1 device using DT
ARM: shmobile: r8a73a4: Remove empty r8a73a4_add_dt_devices
ARM: shmobile: r8a7740: correct SCI clock support for DT
ARM: shmobile: r8a7740: Add SCIF nodes
ARM: shmobile: armadillo800eva-reference: Initialise SCIF device using
DT
ARM: shmobile: r8a7740: add TMU clock support for DT
ARM: shmobile: r8a7740: Add TMU nodes
ARM: shmobile: armadillo800eva-reference: Initialise TMU device using
DT
ARM: shmobile: r8a7740: add CMT1 clock support for DT
ARM: shmobile: r8a7740: Add CMT1 node
ARM: shmobile: armadillo800eva-reference: Initialise CMT1 device using
DT
ARM: shmobile: r8a7740: Remove unnecessary
r8a7740_add_standard_devices_dt()
ARM: shmobile: sh73a0: add SCI clock support for DT
ARM: shmobile: sh73a0: Add SCIF nodes
ARM: shmobile: kzm9g-reference: Initialise SCIF device using DT
ARM: shmobile: sh73a0: add CMT1 clock support for DT
ARM: shmobile: sh73a0: Add CMT1 node
ARM: shmobile: kzm9g-reference: Initialise CMT1 device using DT
arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts | 18 +++- arch/arm/boot/dts/r8a73a4.dtsi | 52 ++++++++++++ .../boot/dts/r8a7740-armadillo800eva-reference.dts | 22 ++++- arch/arm/boot/dts/r8a7740.dtsi | 97 ++++++++++++++++++++++ arch/arm/boot/dts/r8a7778-bockw-reference.dts | 18 +++- arch/arm/boot/dts/r8a7778.dtsi | 78 +++++++++++++++++ arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 18 +++- arch/arm/boot/dts/sh73a0.dtsi | 83 ++++++++++++++++++ arch/arm/mach-shmobile/board-ape6evm-reference.c | 1 - .../board-armadillo800eva-reference.c | 3 +- arch/arm/mach-shmobile/clock-r8a73a4.c | 7 ++ arch/arm/mach-shmobile/clock-r8a7740.c | 21 +++-- arch/arm/mach-shmobile/clock-r8a7778.c | 8 ++ arch/arm/mach-shmobile/clock-sh73a0.c | 10 +++ arch/arm/mach-shmobile/r8a73a4.h | 1 - arch/arm/mach-shmobile/r8a7740.h | 1 - arch/arm/mach-shmobile/setup-r8a73a4.c | 21 ++--- arch/arm/mach-shmobile/setup-r8a7740.c | 18 +--- arch/arm/mach-shmobile/setup-r8a7778.c | 15 ++-- arch/arm/mach-shmobile/setup-sh73a0.c | 11 +-- 20 files changed, 431 insertions(+), 72 deletions(-)
Signature · 1 line
2.0.0.rc2
PATCH v2 1/30 ARM: shmobile: r8a7778: add SCI clock support for DT
This will be used when initialising SCI devices using DT until common clock framework support is added.
---
v2
* Added ack from Laurent Pinchart
--- arch/arm/mach-shmobile/clock-r8a7778.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-shmobile/clock-r8a7778.c +6 -0
@@ -202,11 +202,17 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("i2c-rcar.3" , &mstp_clks[MSTP027 ]),/* I2C3 */ CLKDEV_DEV_ID ("ffc73000.i2c" , &mstp_clks[MSTP027 ]),/* I2C3 */ CLKDEV_DEV_ID ("sh-sci.0" , &mstp_clks[MSTP026 ]),/* SCIF0 */ +CLKDEV_DEV_ID ("ffe40000.serial" , &mstp_clks[MSTP026 ]),/* SCIF0 */ CLKDEV_DEV_ID ("sh-sci.1" , &mstp_clks[MSTP025 ]),/* SCIF1 */ +CLKDEV_DEV_ID ("ffe41000.serial" , &mstp_clks[MSTP025 ]),/* SCIF1 */ CLKDEV_DEV_ID ("sh-sci.2" , &mstp_clks[MSTP024 ]),/* SCIF2 */ +CLKDEV_DEV_ID ("ffe42000.serial" , &mstp_clks[MSTP024 ]),/* SCIF2 */ CLKDEV_DEV_ID ("sh-sci.3" , &mstp_clks[MSTP023 ]),/* SCIF3 */ +CLKDEV_DEV_ID ("ffe43000.serial" , &mstp_clks[MSTP023 ]),/* SCIF3 */ CLKDEV_DEV_ID ("sh-sci.4" , &mstp_clks[MSTP022 ]),/* SCIF4 */ +CLKDEV_DEV_ID ("ffe44000.serial" , &mstp_clks[MSTP022 ]),/* SCIF4 */ CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP021 ]),/* SCIF6 */ +CLKDEV_DEV_ID ("ffe45000.serial" , &mstp_clks[MSTP021 ]),/* SCIF5 */ CLKDEV_DEV_ID ("sh-hspi.0" , &mstp_clks[MSTP007 ]),/* HSPI0 */ CLKDEV_DEV_ID ("fffc7000.spi" , &mstp_clks[MSTP007 ]),/* HSPI0 */ CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */
Signature · 1 line
2.0.0.rc2
PATCH v2 2/30 ARM: shmobile: r8a7778: Add SCIF nodes
In reply to Simon HormanThis describes all of the SCIF hardware of the r8a7778. Each node is disabled and may be enabled as necessary by board DTS files.
---
v2
* Added ack from Laurent Pinchart
* Removed interrupt-parent property from each new node as it is inherited from the top-level.
* Expanded changelog
--- arch/arm/boot/dts/r8a7778.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
arch/arm/boot/dts/r8a7778.dtsi +42 -0
@@ -156,6 +156,48 @@ status = "disabled"; }; + scif0: serial at ffe40000 { + compatible = "renesas,scif-r8a7778", "renesas,scif"; + reg = <0xffe40000 0x100>; + interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scif1: serial at ffe41000 { + compatible = "renesas,scif-r8a7778", "renesas,scif"; + reg = <0xffe41000 0x100>; + interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scif2: serial at ffe42000 { + compatible = "renesas,scif-r8a7778", "renesas,scif"; + reg = <0xffe42000 0x100>; + interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scif3: serial at ffe43000 { + compatible = "renesas,scif-r8a7778", "renesas,scif"; + reg = <0xffe43000 0x100>; + interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scif4: serial at ffe44000 { + compatible = "renesas,scif-r8a7778", "renesas,scif"; + reg = <0xffe44000 0x100>; + interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scif5: serial at ffe45000 { + compatible = "renesas,scif-r8a7778", "renesas,scif"; + reg = <0xffe45000 0x100>; + interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + mmcif: mmc at ffe4e000 { compatible = "renesas,sh-mmcif"; reg = <0xffe4e000 0x100>;
Signature · 1 line
2.0.0.rc2
PATCH v2 3/30 ARM: shmobile: bockw-reference: Initialise SCIF device using DT
In reply to Simon HormanInitialise SCIF device using DT when booting bockw using DT reference.
---
v2
* Correct whitespace
* Added Ack from Laurent Pinchart
N.B: This only enables the production serial port (scif0) and not the debug serial port. It is unclear to me if the debug port is scif1 or scif5. And if the required PFC support is in place. At the very least the latter appears to be missing from r8a7778-bockw-reference.dts.
--- arch/arm/boot/dts/r8a7778-bockw-reference.dts | 14 +++++++++++--- arch/arm/mach-shmobile/setup-r8a7778.c | 12 ++++++------ 2 files changed, 17 insertions(+), 9 deletions(-)
arch/arm/boot/dts/r8a7778-bockw-reference.dts +11 -3
@@ -23,6 +23,10 @@ model = "bockw"; compatible = "renesas,bockw-reference", "renesas,r8a7778"; + aliases { + serial0 = &scif0; + }; + chosen { bootargs = "console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw"; };
@@ -70,9 +74,6 @@ }; &pfc { - pinctrl-0 = <&scif0_pins>; - pinctrl-names = "default"; - scif0_pins: serial0 { renesas,groups = "scif0_data_a", "scif0_ctrl"; renesas,function = "scif0";
@@ -124,3 +125,10 @@ }; }; }; + +&scif0 { + pinctrl-0 = <&scif0_pins>; + pinctrl-names = "default"; + + status = "okay"; +};
arch/arm/mach-shmobile/setup-r8a7778.c +6 -6
@@ -294,12 +294,6 @@ void __init r8a7778_add_dt_devices(void) }#endif -r8a7778_register_scif (0 ); -r8a7778_register_scif (1 ); -r8a7778_register_scif (2 ); -r8a7778_register_scif (3 ); -r8a7778_register_scif (4 ); -r8a7778_register_scif (5 );r8a7778_register_tmu (0 ); }
@@ -508,6 +502,12 @@ static void __init r8a7778_register_hpb_dmae(void)void __init r8a7778_add_standard_devices (void ) {r8a7778_add_dt_devices (); +r8a7778_register_scif (0 ); +r8a7778_register_scif (1 ); +r8a7778_register_scif (2 ); +r8a7778_register_scif (3 ); +r8a7778_register_scif (4 ); +r8a7778_register_scif (5 );r8a7778_register_i2c (0 );r8a7778_register_i2c (1 );r8a7778_register_i2c (2 );
Signature · 1 line
2.0.0.rc2
PATCH v2 4/30 ARM: shmobile: r8a7778: add TMU clock support for DT
In reply to Simon HormanThis will be used when initialising TMU devices using DT until common clock framework support is added.
---
v2
* Added ack from Laurent Pinchart
--- arch/arm/mach-shmobile/clock-r8a7778.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-shmobile/clock-r8a7778.c +2 -0
@@ -244,7 +244,9 @@ static struct clk_lookup lookups[] = {CLKDEV_ICK_ID ("src.7" ,"rcar_sound" , &mstp_clks[MSTP524 ]),CLKDEV_ICK_ID ("src.8" ,"rcar_sound" , &mstp_clks[MSTP523 ]),CLKDEV_ICK_ID ("fck" ,"sh-tmu.0" , &mstp_clks[MSTP016 ]), +CLKDEV_ICK_ID ("fck" ,"ffd80000.timer" , &mstp_clks[MSTP016 ]),CLKDEV_ICK_ID ("fck" ,"sh-tmu.1" , &mstp_clks[MSTP015 ]), + CLKDEV_ICK_ID("fck", "ffd81000.timer", &mstp_clks[MSTP015]), };void __init r8a7778_clock_init (void )
Signature · 1 line
2.0.0.rc2
PATCH v2 5/30 ARM: shmobile: r8a7778: Add TMU nodes
In reply to Simon HormanThis describes all of the TMU hardware of the r8a7778. Each node is disabled and may be enabled as necessary by board DTS files.
---
v2
* Added ack from Laurent Pinchart
* Expanded changelog
--- arch/arm/boot/dts/r8a7778.dtsi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
arch/arm/boot/dts/r8a7778.dtsi +36 -0
@@ -156,6 +156,42 @@ status = "disabled"; }; + tmu0: timer at ffd80000 { + compatible = "renesas,tmu"; + reg = <0xffd80000 0x30>; + interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>, + <0 33 IRQ_TYPE_LEVEL_HIGH>, + <0 34 IRQ_TYPE_LEVEL_HIGH>; + + #renesas,channels = <3>; + + status = "disabled"; + }; + + tmu1: timer at ffd81000 { + compatible = "renesas,tmu"; + reg = <0xffd81000 0x30>; + interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>, + <0 37 IRQ_TYPE_LEVEL_HIGH>, + <0 38 IRQ_TYPE_LEVEL_HIGH>; + + #renesas,channels = <3>; + + status = "disabled"; + }; + + tmu2: timer at ffd82000 { + compatible = "renesas,tmu"; + reg = <0xffd82000 0x30>; + interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>, + <0 41 IRQ_TYPE_LEVEL_HIGH>, + <0 42 IRQ_TYPE_LEVEL_HIGH>; + + #renesas,channels = <3>; + + status = "disabled"; + }; + scif0: serial at ffe40000 { compatible = "renesas,scif-r8a7778", "renesas,scif"; reg = <0xffe40000 0x100>;
Signature · 1 line
2.0.0.rc2
PATCH v2 6/30 ARM: shmobile: bockw-reference: Initialise TMU device using DT
In reply to Simon HormanInitialise TMU device using DT when booting bockw
using DT-reference.
---
v2
* Added Ack from Laurent Pinchart
--- arch/arm/boot/dts/r8a7778-bockw-reference.dts | 4 ++++ arch/arm/mach-shmobile/setup-r8a7778.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a7778-bockw-reference.dts +4 -0
@@ -73,6 +73,10 @@ status = "okay"; }; +&tmu0 { + status = "okay"; +}; + &pfc { scif0_pins: serial0 { renesas,groups = "scif0_data_a", "scif0_ctrl";
arch/arm/mach-shmobile/setup-r8a7778.c +1 -2
@@ -293,8 +293,6 @@ void __init r8a7778_add_dt_devices(void) l2x0_init(base, 0x00400000, 0xc20f0fff); }#endif - -r8a7778_register_tmu (0 ); }/* HPB-DMA */
@@ -502,6 +500,7 @@ static void __init r8a7778_register_hpb_dmae(void)void __init r8a7778_add_standard_devices (void ) {r8a7778_add_dt_devices (); +r8a7778_register_tmu (0 );r8a7778_register_scif (0 );r8a7778_register_scif (1 );r8a7778_register_scif (2 );
Signature · 1 line
2.0.0.rc2
PATCH v2 7/30 ARM: shmobile: r8a73a4: add SCI clock support for DT
In reply to Simon HormanThis will be used when initialising SCI devices using DT until common clock framework support is added.
---
v2
* First post
--- arch/arm/mach-shmobile/clock-r8a73a4.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-shmobile/clock-r8a73a4.c +6 -0
@@ -574,11 +574,17 @@ static struct clk_lookup lookups[] = {/* MSTP */ CLKDEV_DEV_ID ("sh-sci.0" , &mstp_clks[MSTP204 ]), +CLKDEV_DEV_ID ("e6c40000.serial" , &mstp_clks[MSTP204 ]),CLKDEV_DEV_ID ("sh-sci.1" , &mstp_clks[MSTP203 ]), +CLKDEV_DEV_ID ("e6c50000.serial" , &mstp_clks[MSTP203 ]),CLKDEV_DEV_ID ("sh-sci.2" , &mstp_clks[MSTP206 ]), +CLKDEV_DEV_ID ("e6c20000.serial" , &mstp_clks[MSTP206 ]),CLKDEV_DEV_ID ("sh-sci.3" , &mstp_clks[MSTP207 ]), +CLKDEV_DEV_ID ("e6c30000.serial" , &mstp_clks[MSTP207 ]),CLKDEV_DEV_ID ("sh-sci.4" , &mstp_clks[MSTP216 ]), +CLKDEV_DEV_ID ("e6ce0000.serial" , &mstp_clks[MSTP216 ]),CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP217 ]), +CLKDEV_DEV_ID ("e6cf0000.serial" , &mstp_clks[MSTP217 ]),CLKDEV_DEV_ID ("sh-dma-engine.0" , &mstp_clks[MSTP218 ]),CLKDEV_DEV_ID ("e6700020.dma-controller" , &mstp_clks[MSTP218 ]), CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
Signature · 1 line
2.0.0.rc2
PATCH v2 8/30 ARM: shmobile: r8a73a4: Add SCIF nodes
In reply to Simon HormanThis describes all of the SCIF hardware of the r8a73a4. Each node is disabled and may be enabled as necessary by board DTS files.
---
v2
* First post
--- arch/arm/boot/dts/r8a73a4.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
arch/arm/boot/dts/r8a73a4.dtsi +42 -0
@@ -252,6 +252,48 @@ status = "disabled"; }; + scifa0: serial at e6c40000 { + compatible = "renesas,scifa-r8a73a4", "renesas,scifa"; + reg = <0 0xe6c40000 0 0x100>; + interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa1: serial at e6c50000 { + compatible = "renesas,scifa-r8a73a4", "renesas,scifa"; + reg = <0 0xe6c50000 0 0x100>; + interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifb2: serial at e6c20000 { + compatible = "renesas,scifb-r8a73a4", "renesas,scifb"; + reg = <0 0xe6c20000 0 0x100>; + interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifb3: serial at e6c30000 { + compatible = "renesas,scifb-r8a73a4", "renesas,scifb"; + reg = <0 0xe6c30000 0 0x100>; + interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifb4: serial at e6ce0000 { + compatible = "renesas,scifb-r8a73a4", "renesas,scifb"; + reg = <0 0xe6ce0000 0 0x100>; + interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifb5: serial at e6cf0000 { + compatible = "renesas,scifb-r8a73a4", "renesas,scifb"; + reg = <0 0xe6cf0000 0 0x100>; + interrupts = <0 151 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + mmcif0: mmc at ee200000 { compatible = "renesas,sh-mmcif"; reg = <0 0xee200000 0 0x80>;
Signature · 1 line
2.0.0.rc2
PATCH v2 9/30 ARM: shmobile: ape6evm-reference: Initialise SCIF device using DT
In reply to Simon HormanInitialise SCIF device using DT when booting ape6evm using DT reference.
---
v2
* First post
--- arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts | 14 +++++++++++--- arch/arm/mach-shmobile/setup-r8a73a4.c | 12 ++++++------ 2 files changed, 17 insertions(+), 9 deletions(-)
arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts +11 -3
@@ -16,6 +16,10 @@ model = "APE6EVM"; compatible = "renesas,ape6evm-reference", "renesas,r8a73a4"; + aliases { + serial0 = &scifa0; + }; + chosen { bootargs = "console=ttySC0,115200 ignore_loglevel rw"; };
@@ -90,9 +94,6 @@ }; &pfc { - pinctrl-0 = <&scifa0_pins>; - pinctrl-names = "default"; - scifa0_pins: serial0 { renesas,groups = "scifa0_data"; renesas,function = "scifa0";
@@ -123,6 +124,13 @@ status = "okay"; }; +&scifa0 { + pinctrl-0 = <&scifa0_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; + &sdhi0 { vmmc-supply = <&vcc_sdhi0>; bus-width = <4>;
arch/arm/mach-shmobile/setup-r8a73a4.c +6 -6
@@ -189,12 +189,6 @@ static struct resource cmt1_resources[] = {void __init r8a73a4_add_dt_devices (void ) { -r8a73a4_register_scif (0 ); -r8a73a4_register_scif (1 ); -r8a73a4_register_scif (2 ); -r8a73a4_register_scif (3 ); -r8a73a4_register_scif (4 ); -r8a73a4_register_scif (5 );r8a7790_register_cmt (1 ); }
@@ -289,6 +283,12 @@ static struct resource dma_resources[] = {void __init r8a73a4_add_standard_devices (void ) {r8a73a4_add_dt_devices (); +r8a73a4_register_scif (0 ); +r8a73a4_register_scif (1 ); +r8a73a4_register_scif (2 ); +r8a73a4_register_scif (3 ); +r8a73a4_register_scif (4 ); +r8a73a4_register_scif (5 );r8a73a4_register_irqc (0 );r8a73a4_register_irqc (1 );r8a73a4_register_thermal ();
Signature · 1 line
2.0.0.rc2
PATCH v2 10/30 ARM: shmobile: r8a73a4: add CMT1 clock support for DT
In reply to Simon HormanThis will be used when initialising CMT1 device using DT until common clock framework support is added.
---
v2
* First post
--- arch/arm/mach-shmobile/clock-r8a73a4.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-shmobile/clock-r8a73a4.c +1 -0
@@ -604,6 +604,7 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("e6500000.i2c" , &mstp_clks[MSTP318 ]),CLKDEV_DEV_ID ("e6510000.i2c" , &mstp_clks[MSTP323 ]),CLKDEV_ICK_ID ("fck" ,"sh-cmt-48-gen2.1" , &mstp_clks[MSTP329 ]), +CLKDEV_ICK_ID ("fck" ,"e6130000.timer" , &mstp_clks[MSTP329 ]),CLKDEV_DEV_ID ("e60b0000.i2c" , &mstp_clks[MSTP409 ]),CLKDEV_DEV_ID ("e6540000.i2c" , &mstp_clks[MSTP410 ]), CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP411]),
Signature · 1 line
2.0.0.rc2
PATCH v2 11/30 ARM: shmobile: r8a73a4: Add CMT1 node
In reply to Simon HormanThis describes all of the CMT1 hardware of the r8a73a4.
The node is disabled and may be enabled as necessary by board DTS files.
---
N.B: This only adds cmt1, as per the legacy C code
v2
* First post
--- arch/arm/boot/dts/r8a73a4.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/r8a73a4.dtsi +10 -0
@@ -50,6 +50,16 @@ <1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; }; + cmt1: timer at e6130000 { + compatible = "renesas,cmt-48-gen2"; + reg = <0 0xe6130000 0 0x1004>; + interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>; + + renesas,channels-mask = <0xff>; + + status = "disabled"; + }; + irqc0: interrupt-controller at e61c0000 { compatible = "renesas,irqc"; #interrupt-cells = <2>;
Signature · 1 line
2.0.0.rc2
PATCH v2 12/30 ARM: shmobile: r8a73a4: Rename cmt registration helper
In reply to Simon HormanRename r8a7790_register_cmt() as r8a73a4_register_cmt() to reflect name of the SoC in use. The use of r8a7790 appears to be due to historical sharing of code from that SoC. Shared code is no longer used.
---
v2
* First post
--- arch/arm/mach-shmobile/setup-r8a73a4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-shmobile/setup-r8a73a4.c +2 -2
@@ -180,7 +180,7 @@ static struct resource cmt1_resources[] = { DEFINE_RES_IRQ(gic_spi(120)), }; -#define r8a7790_register_cmt (idx) \ +#define r8a73a4_register_cmt (idx) \ platform_device_register_resndata(&platform_bus, "sh-cmt-48-gen2", \ idx, cmt##idx##_resources, \ ARRAY_SIZE(cmt##idx##_resources), \
@@ -189,7 +189,7 @@ static struct resource cmt1_resources[] = {void __init r8a73a4_add_dt_devices (void ) { -r8a7790_register_cmt (1 ); +r8a73a4_register_cmt (1 ); }/* DMA */
Signature · 1 line
2.0.0.rc2
PATCH v2 13/30 ARM: shmobile: ape6evm-reference: Initialise CMT1 device using DT
In reply to Simon HormanInitialise CMT1 device using DT when booting ape6evm using DT-reference.
---
v2
* First post
--- arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts | 4 ++++ arch/arm/mach-shmobile/setup-r8a73a4.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts +4 -0
@@ -93,6 +93,10 @@ voltage-tolerance = <1>; /* 1% */ }; +&cmt1 { + status = "okay"; +}; + &pfc { scifa0_pins: serial0 { renesas,groups = "scifa0_data";
arch/arm/mach-shmobile/setup-r8a73a4.c +1 -2
@@ -189,7 +189,6 @@ static struct resource cmt1_resources[] = {void __init r8a73a4_add_dt_devices (void ) { -r8a73a4_register_cmt (1 ); }/* DMA */
@@ -282,7 +281,7 @@ static struct resource dma_resources[] = {void __init r8a73a4_add_standard_devices (void ) { -r8a73a4_add_dt_devices (); +r8a73a4_register_cmt (1 );r8a73a4_register_scif (0 );r8a73a4_register_scif (1 );r8a73a4_register_scif (2 );
Signature · 1 line
2.0.0.rc2
PATCH v2 14/30 ARM: shmobile: r8a73a4: Remove empty r8a73a4_add_dt_devices
In reply to Simon Hormanr8a73a4_add_dt_devices() no longer enables any devices so remove it.
---
v2
* First post
--- arch/arm/mach-shmobile/board-ape6evm-reference.c | 1 - arch/arm/mach-shmobile/r8a73a4.h | 1 - arch/arm/mach-shmobile/setup-r8a73a4.c | 4 ---- 3 files changed, 6 deletions(-)
arch/arm/mach-shmobile/board-ape6evm-reference.c +0 -1
@@ -48,7 +48,6 @@ static void __init ape6evm_add_standard_devices(void)clk_put (parent);clk_put (mp); -r8a73a4_add_dt_devices ();of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL );platform_device_register_simple ("cpufreq-cpu0" ,-1 ,NULL ,0 ); }
arch/arm/mach-shmobile/r8a73a4.h +0 -1
@@ -11,7 +11,6 @@ enum { };void r8a73a4_add_standard_devices (void ); -void r8a73a4_add_dt_devices (void );void r8a73a4_clock_init (void );void r8a73a4_pinmux_init (void );void r8a73a4_init_early (void );
arch/arm/mach-shmobile/setup-r8a73a4.c +0 -4
@@ -187,10 +187,6 @@ static struct resource cmt1_resources[] = { &cmt##idx##_platform_data, \ sizeof(struct sh_timer_config)) -void __init r8a73a4_add_dt_devices (void ) -{ -} -/* DMA */ static const struct sh_dmae_slave_config dma_slaves[] = { {
Signature · 1 line
2.0.0.rc2
PATCH v2 15/30 ARM: shmobile: r8a7740: correct SCI clock support for DT
In reply to Simon HormanWhen initialising SCI devices their names will be .serial not .sci.
This will be used when initialising SCI devices using DT until common clock framework support is added.
---
v2
* First post
--- arch/arm/mach-shmobile/clock-r8a7740.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
arch/arm/mach-shmobile/clock-r8a7740.c +9 -9
@@ -556,27 +556,27 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("sh_mobile_ceu.1" , &mstp_clks[MSTP128 ]),CLKDEV_DEV_ID ("sh-sci.4" , &mstp_clks[MSTP200 ]), -CLKDEV_DEV_ID ("e6c80000.sci" , &mstp_clks[MSTP200 ]), +CLKDEV_DEV_ID ("e6c80000.serial" , &mstp_clks[MSTP200 ]),CLKDEV_DEV_ID ("sh-sci.3" , &mstp_clks[MSTP201 ]), -CLKDEV_DEV_ID ("e6c70000.sci" , &mstp_clks[MSTP201 ]), +CLKDEV_DEV_ID ("e6c70000.serial" , &mstp_clks[MSTP201 ]),CLKDEV_DEV_ID ("sh-sci.2" , &mstp_clks[MSTP202 ]), -CLKDEV_DEV_ID ("e6c60000.sci" , &mstp_clks[MSTP202 ]), +CLKDEV_DEV_ID ("e6c60000.serial" , &mstp_clks[MSTP202 ]),CLKDEV_DEV_ID ("sh-sci.1" , &mstp_clks[MSTP203 ]), -CLKDEV_DEV_ID ("e6c50000.sci" , &mstp_clks[MSTP203 ]), +CLKDEV_DEV_ID ("e6c50000.serial" , &mstp_clks[MSTP203 ]),CLKDEV_DEV_ID ("sh-sci.0" , &mstp_clks[MSTP204 ]), -CLKDEV_DEV_ID ("e6c40000.sci" , &mstp_clks[MSTP204 ]), +CLKDEV_DEV_ID ("e6c40000.serial" , &mstp_clks[MSTP204 ]),CLKDEV_DEV_ID ("sh-sci.8" , &mstp_clks[MSTP206 ]), -CLKDEV_DEV_ID ("e6c30000.sci" , &mstp_clks[MSTP206 ]), +CLKDEV_DEV_ID ("e6c30000.serial" , &mstp_clks[MSTP206 ]),CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP207 ]), -CLKDEV_DEV_ID ("e6cb0000.sci" , &mstp_clks[MSTP207 ]), +CLKDEV_DEV_ID ("e6cb0000.serial" , &mstp_clks[MSTP207 ]),CLKDEV_DEV_ID ("sh-dma-engine.3" , &mstp_clks[MSTP214 ]),CLKDEV_DEV_ID ("sh-dma-engine.2" , &mstp_clks[MSTP216 ]),CLKDEV_DEV_ID ("sh-dma-engine.1" , &mstp_clks[MSTP217 ]),CLKDEV_DEV_ID ("sh-dma-engine.0" , &mstp_clks[MSTP218 ]),CLKDEV_DEV_ID ("sh-sci.7" , &mstp_clks[MSTP222 ]), -CLKDEV_DEV_ID ("e6cd0000.sci" , &mstp_clks[MSTP222 ]), +CLKDEV_DEV_ID ("e6cd0000.serial" , &mstp_clks[MSTP222 ]),CLKDEV_DEV_ID ("sh-sci.6" , &mstp_clks[MSTP230 ]), -CLKDEV_DEV_ID ("e6cc0000.sci" , &mstp_clks[MSTP230 ]), +CLKDEV_DEV_ID ("e6cc0000.serial" , &mstp_clks[MSTP230 ]),CLKDEV_DEV_ID ("sh_fsi2" , &mstp_clks[MSTP328 ]), CLKDEV_DEV_ID("fe1f0000.sound", &mstp_clks[MSTP328]),
Signature · 1 line
2.0.0.rc2
PATCH v2 16/30 ARM: shmobile: r8a7740: Add SCIF nodes
In reply to Simon HormanThis describes all of the SCIF hardware of the r8a7740. Each node is disabled and may be enabled as necessary by board DTS files.
---
v2
* First post
--- arch/arm/boot/dts/r8a7740.dtsi | 63 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+)
arch/arm/boot/dts/r8a7740.dtsi +63 -0
@@ -156,6 +156,69 @@ status = "disabled"; }; + scifa0: serial at e6c40000 { + compatible = "renesas,scifa-r8a7740", "renesas,scifa"; + reg = <0xe6c40000 0x100>; + interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa1: serial at e6c50000 { + compatible = "renesas,scifa-r8a7740", "renesas,scifa"; + reg = <0xe6c50000 0x100>; + interrupts = <0 101 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa2: serial at e6c60000 { + compatible = "renesas,scifa-r8a7740", "renesas,scifa"; + reg = <0xe6c60000 0x100>; + interrupts = <0 102 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa3: serial at e6c70000 { + compatible = "renesas,scifa-r8a7740", "renesas,scifa"; + reg = <0xe6c70000 0x100>; + interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa4: serial at e6c80000 { + compatible = "renesas,scifa-r8a7740", "renesas,scifa"; + reg = <0xe6c80000 0x100>; + interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa5: serial at e6cb0000 { + compatible = "renesas,scifa-r8a7740", "renesas,scifa"; + reg = <0xe6cb0000 0x100>; + interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa6: serial at e6cc0000 { + compatible = "renesas,scifa-r8a7740", "renesas,scifa"; + reg = <0xe6cc0000 0x100>; + interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa7: serial at e6cd0000 { + compatible = "renesas,scifa-r8a7740", "renesas,scifa"; + reg = <0xe6cd0000 0x100>; + interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifb8: serial at e6c30000 { + compatible = "renesas,scifb-r8a7740", "renesas,scifb"; + reg = <0xe6c30000 0x100>; + interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + pfc: pfc at e6050000 { compatible = "renesas,pfc-r8a7740"; reg = <0xe6050000 0x8000>,
Signature · 1 line
2.0.0.rc2
PATCH v2 17/30 ARM: shmobile: armadillo800eva-reference: Initialise SCIF device using DT
In reply to Simon HormanInitialise SCIF device using DT when booting armadillo800eva using DT reference.
---
v2
* First post
--- arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 14 +++++++++++--- arch/arm/mach-shmobile/setup-r8a7740.c | 8 ++++---- 2 files changed, 15 insertions(+), 7 deletions(-)
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +11 -3
@@ -19,6 +19,10 @@ model = "armadillo 800 eva reference"; compatible = "renesas,armadillo800eva-reference", "renesas,r8a7740"; + aliases { + serial1 = &scifa1; + }; + chosen { bootargs = "console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw"; };
@@ -202,9 +206,6 @@ }; &pfc { - pinctrl-0 = <&scifa1_pins>; - pinctrl-names = "default"; - ether_pins: ether { renesas,groups = "gether_mii", "gether_int"; renesas,function = "gether";
@@ -256,6 +257,13 @@ status = "okay"; }; +&scifa1 { + pinctrl-0 = <&scifa1_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; + &sdhi0 { pinctrl-0 = <&sdhi0_pins>; pinctrl-names = "default";
arch/arm/mach-shmobile/setup-r8a7740.c +4 -4
@@ -312,6 +312,10 @@ static struct platform_device ipmmu_device = { };static struct platform_device *r8a7740_devices_dt[]__initdata = { + &cmt1_device, +}; + +static struct platform_device *r8a7740_early_devices[]__initdata = { &scif0_device, &scif1_device, &scif2_device,
@@ -321,10 +325,6 @@ static struct platform_device *r8a7740_devices_dt[] __initdata = { &scif6_device, &scif7_device, &scif8_device, - &cmt1_device, -}; - -static struct platform_device *r8a7740_early_devices[]__initdata = { &irqpin0_device, &irqpin1_device, &irqpin2_device,
Signature · 1 line
2.0.0.rc2
PATCH v2 18/30 ARM: shmobile: r8a7740: add TMU clock support for DT
In reply to Simon HormanThis will be used when initialising TMU devices using DT until common clock framework support is added.
---
v2
* First post
--- arch/arm/mach-shmobile/clock-r8a7740.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-shmobile/clock-r8a7740.c +2 -0
@@ -599,7 +599,9 @@ static struct clk_lookup lookups[] = {/* ICK */ CLKDEV_ICK_ID ("fck" ,"sh-tmu.1" , &mstp_clks[MSTP111 ]), +CLKDEV_ICK_ID ("fck" ,"fff90000.timer" , &mstp_clks[MSTP111 ]),CLKDEV_ICK_ID ("fck" ,"sh-tmu.0" , &mstp_clks[MSTP125 ]), +CLKDEV_ICK_ID ("fck" ,"fff80000.timer" , &mstp_clks[MSTP125 ]),CLKDEV_ICK_ID ("fck" ,"sh-cmt-48.1" , &mstp_clks[MSTP329 ]),CLKDEV_ICK_ID ("host" ,"renesas_usbhs" , &mstp_clks[MSTP416 ]), CLKDEV_ICK_ID("func", "renesas_usbhs", &mstp_clks[MSTP407]),
Signature · 1 line
2.0.0.rc2
PATCH v2 19/30 ARM: shmobile: r8a7740: Add TMU nodes
In reply to Simon HormanThis describes all of the TMU hardware of the r8a7740. Each node is disabled and may be enabled as necessary by board DTS files.
---
v2
* First post
--- arch/arm/boot/dts/r8a7740.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
arch/arm/boot/dts/r8a7740.dtsi +24 -0
@@ -236,6 +236,30 @@ <&irqpin3 4 0>, <&irqpin3 5 0>, <&irqpin3 6 0>, <&irqpin3 7 0>; }; + tmu0: timer at fff80000 { + compatible = "renesas,tmu"; + reg = <0xfff80000 0x2c>; + interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>, + <0 199 IRQ_TYPE_LEVEL_HIGH>, + <0 200 IRQ_TYPE_LEVEL_HIGH>; + + #renesas,channels = <3>; + + status = "disabled"; + }; + + tmu1: timer at fff90000 { + compatible = "renesas,tmu"; + reg = <0xfff90000 0x2c>; + interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>, + <0 171 IRQ_TYPE_LEVEL_HIGH>, + <0 172 IRQ_TYPE_LEVEL_HIGH>; + + #renesas,channels = <3>; + + status = "disabled"; + }; + tpu: pwm at e6600000 { compatible = "renesas,tpu-r8a7740", "renesas,tpu"; reg = <0xe6600000 0x100>;
Signature · 1 line
2.0.0.rc2
PATCH v2 20/30 ARM: shmobile: armadillo800eva-reference: Initialise TMU device using DT
In reply to Simon HormanInitialise TMU device using DT when booting armadillo800eva using DT-reference. This device was previously enabled when booting with legacy-C but not with DT-reference.
---
v2
* First post
--- arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +4 -0
@@ -205,6 +205,10 @@ }; }; +&tmu0 { + status = "okay"; +}; + &pfc { ether_pins: ether { renesas,groups = "gether_mii", "gether_int";
Signature · 1 line
2.0.0.rc2
PATCH v2 21/30 ARM: shmobile: r8a7740: add CMT1 clock support for DT
In reply to Simon HormanThis will be used when initialising CMT1 device using DT until common clock framework support is added.
---
v2
* First post
--- arch/arm/mach-shmobile/clock-r8a7740.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-shmobile/clock-r8a7740.c +1 -0
@@ -603,6 +603,7 @@ static struct clk_lookup lookups[] = {CLKDEV_ICK_ID ("fck" ,"sh-tmu.0" , &mstp_clks[MSTP125 ]),CLKDEV_ICK_ID ("fck" ,"fff80000.timer" , &mstp_clks[MSTP125 ]),CLKDEV_ICK_ID ("fck" ,"sh-cmt-48.1" , &mstp_clks[MSTP329 ]), +CLKDEV_ICK_ID ("fck" ,"e6138000.timer" , &mstp_clks[MSTP329 ]),CLKDEV_ICK_ID ("host" ,"renesas_usbhs" , &mstp_clks[MSTP416 ]),CLKDEV_ICK_ID ("func" ,"renesas_usbhs" , &mstp_clks[MSTP407 ]), CLKDEV_ICK_ID("phy", "renesas_usbhs", &mstp_clks[MSTP406]),
Signature · 1 line
2.0.0.rc2
PATCH v2 22/30 ARM: shmobile: r8a7740: Add CMT1 node
In reply to Simon HormanThis describes all of the CMT1 hardware of the r8a7740.
The node is disabled and may be enabled as necessary by board DTS files.
---
N.B: This only adds cmt1, as per the legacy C code
v2
* First post
--- arch/arm/boot/dts/r8a7740.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/r8a7740.dtsi +10 -0
@@ -260,6 +260,16 @@ status = "disabled"; }; + cmt1: timer at e6138000 { + compatible = "renesas,cmt-48"; + reg = <0xe6138000 0x170>; + interrupts = <0 58 IRQ_TYPE_LEVEL_HIGH>; + + renesas,channels-mask = <0x3f>; + + status = "disabled"; + }; + tpu: pwm at e6600000 { compatible = "renesas,tpu-r8a7740", "renesas,tpu"; reg = <0xe6600000 0x100>;
Signature · 1 line
2.0.0.rc2
PATCH v2 23/30 ARM: shmobile: armadillo800eva-reference: Initialise CMT1 device using DT
In reply to Simon HormanInitialise CMT1 device using DT when booting armadillo800eva using DT-reference.
---
v2
* First post
--- arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 4 ++++ arch/arm/mach-shmobile/setup-r8a7740.c | 11 +---------- 2 files changed, 5 insertions(+), 10 deletions(-)
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +4 -0
@@ -205,6 +205,10 @@ }; }; +&cmt1 { + status = "okay"; +}; + &tmu0 { status = "okay"; };
arch/arm/mach-shmobile/setup-r8a7740.c +1 -10
@@ -311,10 +311,6 @@ static struct platform_device ipmmu_device = { .num_resources = ARRAY_SIZE(ipmmu_resources), }; -static struct platform_device *r8a7740_devices_dt[]__initdata = { - &cmt1_device, -}; -static struct platform_device *r8a7740_early_devices[]__initdata = { &scif0_device, &scif1_device,
@@ -325,6 +321,7 @@ static struct platform_device *r8a7740_early_devices[] __initdata = { &scif6_device, &scif7_device, &scif8_device, + &cmt1_device, &irqpin0_device, &irqpin1_device, &irqpin2_device,
@@ -756,8 +753,6 @@ void __init r8a7740_add_standard_devices(void)/* add devices */ platform_add_devices (r8a7740_early_devices,ARRAY_SIZE (r8a7740_early_devices)); -platform_add_devices (r8a7740_devices_dt, -ARRAY_SIZE (r8a7740_devices_dt));platform_add_devices (r8a7740_late_devices,ARRAY_SIZE (r8a7740_late_devices));
@@ -779,8 +774,6 @@ void __init r8a7740_add_early_devices(void) {early_platform_add_devices (r8a7740_early_devices,ARRAY_SIZE (r8a7740_early_devices)); -early_platform_add_devices (r8a7740_devices_dt, -ARRAY_SIZE (r8a7740_devices_dt));/* setup early console here as well */ shmobile_setup_console ();
@@ -790,8 +783,6 @@ void __init r8a7740_add_early_devices(void)void __init r8a7740_add_standard_devices_dt (void ) { -platform_add_devices (r8a7740_devices_dt, -ARRAY_SIZE (r8a7740_devices_dt));of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); }
Signature · 1 line
2.0.0.rc2
PATCH v2 24/30 ARM: shmobile: r8a7740: Remove unnecessary r8a7740_add_standard_devices_dt()
In reply to Simon Hormanr8a7740_add_standard_devices_dt() now only calls of_platform_populate() so call it directly and remove r8a7740_add_standard_devices_dt().
---
v2
* First post
--- arch/arm/mach-shmobile/board-armadillo800eva-reference.c | 3 ++- arch/arm/mach-shmobile/r8a7740.h | 1 - arch/arm/mach-shmobile/setup-r8a7740.c | 7 +------ 3 files changed, 3 insertions(+), 8 deletions(-)
arch/arm/mach-shmobile/board-armadillo800eva-reference.c +2 -1
@@ -24,6 +24,7 @@#include <linux/kernel.h> #include <linux/gpio.h> #include <linux/io.h> +#include <linux/of_platform.h> #include <asm/mach/arch.h> #include <asm/hardware/cache-l2x0.h>
@@ -170,7 +171,7 @@ static void __init eva_init(void)l2x0_init (IOMEM (0xf0002000 ),0x00400000 ,0xc20f0fff );#endif -r8a7740_add_standard_devices_dt (); +of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL );r8a7740_pm_init (); }
arch/arm/mach-shmobile/r8a7740.h +0 -1
@@ -49,7 +49,6 @@ extern void r8a7740_init_irq_of(void);extern void r8a7740_map_io (void );extern void r8a7740_add_early_devices (void );extern void r8a7740_add_standard_devices (void ); -extern void r8a7740_add_standard_devices_dt (void );extern void r8a7740_clock_init (u8 md_ck);extern void r8a7740_pinmux_init (void );extern void r8a7740_pm_init (void );
arch/arm/mach-shmobile/setup-r8a7740.c +1 -6
@@ -781,11 +781,6 @@ void __init r8a7740_add_early_devices(void)#ifdef CONFIG_USE_OF -void __init r8a7740_add_standard_devices_dt (void ) -{ -of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); -} -void __init r8a7740_init_irq_of (void ) {void __iomem *intc_prio_base =ioremap_nocache (0xe6900010 ,0x10 );
@@ -819,7 +814,7 @@ void __init r8a7740_init_irq_of(void)static void __init r8a7740_generic_init (void ) {r8a7740_clock_init (0 ); -r8a7740_add_standard_devices_dt (); +of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); }static const char *r8a7740_boards_compat_dt[]__initdata = {
Signature · 1 line
2.0.0.rc2
PATCH v2 25/30 ARM: shmobile: sh73a0: add SCI clock support for DT
In reply to Simon HormanThis will be used when initialising SCI devices using DT until common clock framework support is added.
---
v2
* First post
--- arch/arm/mach-shmobile/clock-sh73a0.c | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/mach-shmobile/clock-sh73a0.c +9 -0
@@ -638,16 +638,25 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("e6820000.i2c" , &mstp_clks[MSTP116 ]),/* I2C0 */ CLKDEV_DEV_ID ("sh_mobile_lcdc_fb.0" , &mstp_clks[MSTP100 ]),/* LCDC0 */ CLKDEV_DEV_ID ("sh-sci.7" , &mstp_clks[MSTP219 ]),/* SCIFA7 */ +CLKDEV_DEV_ID ("e6cd0000.serial" , &mstp_clks[MSTP219 ]),/* SCIFA7 */ CLKDEV_DEV_ID ("sh-dma-engine.0" , &mstp_clks[MSTP218 ]),/* SY-DMAC */ CLKDEV_DEV_ID ("sh-dma-engine.1" , &mstp_clks[MSTP217 ]),/* MP-DMAC */ CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP207 ]),/* SCIFA5 */ +CLKDEV_DEV_ID ("e6cb0000.serial" , &mstp_clks[MSTP207 ]),/* SCIFA5 */ CLKDEV_DEV_ID ("sh-sci.8" , &mstp_clks[MSTP206 ]),/* SCIFB */ +CLKDEV_DEV_ID ("0xe6c3000.serial" , &mstp_clks[MSTP206 ]),/* SCIFB */ CLKDEV_DEV_ID ("sh-sci.0" , &mstp_clks[MSTP204 ]),/* SCIFA0 */ +CLKDEV_DEV_ID ("e6c40000.serial" , &mstp_clks[MSTP204 ]),/* SCIFA0 */ CLKDEV_DEV_ID ("sh-sci.1" , &mstp_clks[MSTP203 ]),/* SCIFA1 */ +CLKDEV_DEV_ID ("e6c50000.serial" , &mstp_clks[MSTP203 ]),/* SCIFA1 */ CLKDEV_DEV_ID ("sh-sci.2" , &mstp_clks[MSTP202 ]),/* SCIFA2 */ +CLKDEV_DEV_ID ("e6c60000.serial" , &mstp_clks[MSTP202 ]),/* SCIFA2 */ CLKDEV_DEV_ID ("sh-sci.3" , &mstp_clks[MSTP201 ]),/* SCIFA3 */ +CLKDEV_DEV_ID ("e6c70000.serial" , &mstp_clks[MSTP201 ]),/* SCIFA3 */ CLKDEV_DEV_ID ("sh-sci.4" , &mstp_clks[MSTP200 ]),/* SCIFA4 */ +CLKDEV_DEV_ID ("e6c80000.serial" , &mstp_clks[MSTP200 ]),/* SCIFA4 */ CLKDEV_DEV_ID ("sh-sci.6" , &mstp_clks[MSTP331 ]),/* SCIFA6 */ +CLKDEV_DEV_ID ("e6cc0000.serial" , &mstp_clks[MSTP331 ]),/* SCIFA6 */ CLKDEV_DEV_ID ("sh_fsi2" , &mstp_clks[MSTP328 ]),/* FSI */ CLKDEV_DEV_ID ("ec230000.sound" , &mstp_clks[MSTP328 ]),/* FSI */ CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */
Signature · 1 line
2.0.0.rc2
PATCH v2 26/30 ARM: shmobile: sh73a0: Add SCIF nodes
In reply to Simon HormanThis describes all of the SCIF hardware of the sh73a0. Each node is disabled and may be enabled as necessary by board DTS files.
---
v2
* First post
--- arch/arm/boot/dts/sh73a0.dtsi | 72 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+)
arch/arm/boot/dts/sh73a0.dtsi +72 -0
@@ -235,6 +235,78 @@ status = "disabled"; }; + scifa0: serial at e6c40000 { + compatible = "renesas,scifa-sh73a0", "renesas,scifa"; + reg = <0xe6c40000 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa1: serial at e6c50000 { + compatible = "renesas,scifa-sh73a0", "renesas,scifa"; + reg = <0xe6c50000 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa2: serial at e6c60000 { + compatible = "renesas,scifa-sh73a0", "renesas,scifa"; + reg = <0xe6c60000 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa3: serial at e6c70000 { + compatible = "renesas,scifa-sh73a0", "renesas,scifa"; + reg = <0xe6c70000 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa4: serial at e6c80000 { + compatible = "renesas,scifa-sh73a0", "renesas,scifa"; + reg = <0xe6c80000 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa5: serial at e6cb0000 { + compatible = "renesas,scifa-sh73a0", "renesas,scifa"; + reg = <0xe6cb0000 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa6: serial at e6cc0000 { + compatible = "renesas,scifa-sh73a0", "renesas,scifa"; + reg = <0xe6cc0000 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifa7: serial at e6cd0000 { + compatible = "renesas,scifa-sh73a0", "renesas,scifa"; + reg = <0xe6cd0000 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + scifb8: serial at e6c30000 { + compatible = "renesas,scifb-sh73a0", "renesas,scifb"; + reg = <0xe6c30000 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + pfc: pfc at e6050000 { compatible = "renesas,pfc-sh73a0"; reg = <0xe6050000 0x8000>,
Signature · 1 line
2.0.0.rc2
PATCH v2 27/30 ARM: shmobile: kzm9g-reference: Initialise SCIF device using DT
In reply to Simon HormanInitialise SCIF device using DT when booting armadillo800eva using DT reference.
---
v2
* First post
--- arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 14 +++++++++++--- arch/arm/mach-shmobile/setup-sh73a0.c | 8 ++++---- 2 files changed, 15 insertions(+), 7 deletions(-)
arch/arm/boot/dts/sh73a0-kzm9g-reference.dts +11 -3
@@ -21,6 +21,10 @@ model = "KZM-A9-GT"; compatible = "renesas,kzm9g-reference", "renesas,sh73a0"; + aliases { + serial4 = &scifa4; + }; + cpus { cpu at 0 { cpu0-supply = <&vdd_dvfs>;
@@ -276,9 +280,6 @@ }; &pfc { - pinctrl-0 = <&scifa4_pins>; - pinctrl-names = "default"; - i2c3_pins: i2c3 { renesas,groups = "i2c3_1"; renesas,function = "i2c3";
@@ -318,6 +319,13 @@ }; }; +&scifa4 { + pinctrl-0 = <&scifa4_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; + &sdhi0 { pinctrl-0 = <&sdhi0_pins>; pinctrl-names = "default";
arch/arm/mach-shmobile/setup-sh73a0.c +4 -4
@@ -697,6 +697,10 @@ static struct platform_device irqpin3_device = { };static struct platform_device *sh73a0_devices_dt[]__initdata = { + &cmt1_device, +}; + +static struct platform_device *sh73a0_early_devices[]__initdata = { &scif0_device, &scif1_device, &scif2_device,
@@ -706,10 +710,6 @@ static struct platform_device *sh73a0_devices_dt[] __initdata = { &scif6_device, &scif7_device, &scif8_device, - &cmt1_device, -}; - -static struct platform_device *sh73a0_early_devices[]__initdata = { &tmu0_device, &ipmmu_device, };
Signature · 1 line
2.0.0.rc2
PATCH v2 28/30 ARM: shmobile: sh73a0: add CMT1 clock support for DT
In reply to Simon HormanThis will be used when initialising CMT1 device using DT until common clock framework support is added.
---
v2
* First post
--- arch/arm/mach-shmobile/clock-sh73a0.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-shmobile/clock-sh73a0.c +1 -0
@@ -690,6 +690,7 @@ static struct clk_lookup lookups[] = {CLKDEV_ICK_ID ("dsiphy_clk" ,"sh-mipi-dsi.0" , &dsi0phy_clk),CLKDEV_ICK_ID ("dsiphy_clk" ,"sh-mipi-dsi.1" , &dsi1phy_clk),CLKDEV_ICK_ID ("fck" ,"sh-cmt-48.1" , &mstp_clks[MSTP329 ]),/* CMT1 */ +CLKDEV_ICK_ID ("fck" ,"e6138000.timer" , &mstp_clks[MSTP329 ]),/* CMT1 */ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]), /* TMU0 */ };
Signature · 1 line
2.0.0.rc2
PATCH v2 29/30 ARM: shmobile: sh73a0: Add CMT1 node
In reply to Simon HormanThis describes all of the CMT1 hardware of the sh73a0.
The node is disabled and may be enabled as necessary by board DTS files.
---
N.B: This only adds cmt1, as per the legacy C code
v2
* First post
--- arch/arm/boot/dts/sh73a0.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/boot/dts/sh73a0.dtsi +11 -0
@@ -324,6 +324,17 @@ <&irqpin3 4 0>, <&irqpin3 5 0>, <&irqpin3 6 0>, <&irqpin3 7 0>; }; + cmt1: timer at e6138000 { + compatible = "renesas,cmt-48"; + reg = <0xe6138000 0x200>; + interrupt-parent = <&gic>; + interrupts = <0 65 IRQ_TYPE_LEVEL_HIGH>; + + renesas,channels-mask = <0x3f>; + + status = "disabled"; + }; + sh_fsi2: sound at ec230000 { #sound-dai-cells = <1>; compatible = "renesas,sh_fsi2";
Signature · 1 line
2.0.0.rc2
PATCH v2 30/30 ARM: shmobile: kzm9g-reference: Initialise CMT1 device using DT
In reply to Simon HormanInitialise CMT1 device using DT when booting kzm9g using DT-reference.
---
v2
* First post
--- arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 4 ++++ arch/arm/mach-shmobile/setup-sh73a0.c | 11 +---------- 2 files changed, 5 insertions(+), 10 deletions(-)
arch/arm/boot/dts/sh73a0-kzm9g-reference.dts +4 -0
@@ -279,6 +279,10 @@ status = "okay"; }; +&cmt1 { + status = "okay"; +}; + &pfc { i2c3_pins: i2c3 { renesas,groups = "i2c3_1";
arch/arm/mach-shmobile/setup-sh73a0.c +1 -10
@@ -696,10 +696,6 @@ static struct platform_device irqpin3_device = { }, }; -static struct platform_device *sh73a0_devices_dt[]__initdata = { - &cmt1_device, -}; -static struct platform_device *sh73a0_early_devices[]__initdata = { &scif0_device, &scif1_device,
@@ -710,6 +706,7 @@ static struct platform_device *sh73a0_early_devices[] __initdata = { &scif6_device, &scif7_device, &scif8_device, + &cmt1_device, &tmu0_device, &ipmmu_device, };
@@ -736,8 +733,6 @@ void __init sh73a0_add_standard_devices(void)/* Clear software reset bit on SY-DMAC module */ __raw_writel (__raw_readl (SRCR2 ) & ~(1 <<18 ),SRCR2 ); -platform_add_devices (sh73a0_devices_dt, -ARRAY_SIZE (sh73a0_devices_dt));platform_add_devices (sh73a0_early_devices,ARRAY_SIZE (sh73a0_early_devices)); platform_add_devices(sh73a0_late_devices,
@@ -762,8 +757,6 @@ void __init sh73a0_earlytimer_init(void)void __init sh73a0_add_early_devices (void ) { -early_platform_add_devices (sh73a0_devices_dt, -ARRAY_SIZE (sh73a0_devices_dt));early_platform_add_devices (sh73a0_early_devices,ARRAY_SIZE (sh73a0_early_devices));
@@ -780,8 +773,6 @@ void __init sh73a0_add_standard_devices_dt(void)/* clocks are setup late during boot in the case of DT */ sh73a0_clock_init (); -platform_add_devices (sh73a0_devices_dt, -ARRAY_SIZE (sh73a0_devices_dt));of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL );/* Instantiate cpufreq-cpu0 */
Signature · 1 line
2.0.0.rc2
v2 cover ARM: shmobile: Enable SCI and TMU using DT
In reply to Simon HormanQuoted 5 lines · Simon Horman
The purpose of this series is to enable SCI, CMT and TMU using DT on boards that use DT-reference. Or in other-words boards other than the mackerel that are not covered by Laurent Pinchart's work in the same area.
Quoted 7 lines
This series is based on a merge of:
* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
* renesas-devel-v3.16-rc4-20140707It also depends on
[PATCH v2] serial: sh-sci: Add device tree support for r8a7{778,740,3a4} and sh73a
As Greg KH has merged the above patch I have queued up the SCI patches listed below.
Quoted 71 lines
This series does not enable TMU for the sh73a0/kzm9g-reference as:
* It appears to use sh-intc as an interrupt source and I am unsure how to use this from DT at this time and;
* It is not currently enabled in dt-reference.I will address this as a follow-up if appropriate.
Simon Horman (30):
ARM: shmobile: r8a7778: add SCI clock support for DT
ARM: shmobile: r8a7778: Add SCIF nodes
ARM: shmobile: bockw-reference: Initialise SCIF device using DT
ARM: shmobile: r8a7778: add TMU clock support for DT
ARM: shmobile: r8a7778: Add TMU nodes
ARM: shmobile: bockw-reference: Initialise TMU device using DT
ARM: shmobile: r8a73a4: add SCI clock support for DT
ARM: shmobile: r8a73a4: Add SCIF nodes
ARM: shmobile: ape6evm-reference: Initialise SCIF device using DT
ARM: shmobile: r8a73a4: add CMT1 clock support for DT
ARM: shmobile: r8a73a4: Add CMT1 node
ARM: shmobile: r8a73a4: Rename cmt registration helper
ARM: shmobile: ape6evm-reference: Initialise CMT1 device using DT
ARM: shmobile: r8a73a4: Remove emptyr8a73a4_add_dt_devices
ARM: shmobile: r8a7740: correct SCI clock support for DT
ARM: shmobile: r8a7740: Add SCIF nodes
ARM: shmobile: armadillo800eva-reference: Initialise SCIF device using
DT
ARM: shmobile: r8a7740: add TMU clock support for DT
ARM: shmobile: r8a7740: Add TMU nodes
ARM: shmobile: armadillo800eva-reference: Initialise TMU device using
DT
ARM: shmobile: r8a7740: add CMT1 clock support for DT
ARM: shmobile: r8a7740: Add CMT1 node
ARM: shmobile: armadillo800eva-reference: Initialise CMT1 device using
DT
ARM: shmobile: r8a7740: Remove unnecessaryr8a7740_add_standard_devices_dt()ARM: shmobile: sh73a0: add SCI clock support for DT
ARM: shmobile: sh73a0: Add SCIF nodes
ARM: shmobile: kzm9g-reference: Initialise SCIF device using DT
ARM: shmobile: sh73a0: add CMT1 clock support for DT
ARM: shmobile: sh73a0: Add CMT1 node
ARM: shmobile: kzm9g-reference: Initialise CMT1 device using DTarch/arm/boot/dts/r8a73a4-ape6evm-reference.dts | 18 +++- arch/arm/boot/dts/r8a73a4.dtsi | 52 ++++++++++++ .../boot/dts/r8a7740-armadillo800eva-reference.dts | 22 ++++- arch/arm/boot/dts/r8a7740.dtsi | 97 ++++++++++++++++++++++ arch/arm/boot/dts/r8a7778-bockw-reference.dts | 18 +++- arch/arm/boot/dts/r8a7778.dtsi | 78 +++++++++++++++++ arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 18 +++- arch/arm/boot/dts/sh73a0.dtsi | 83 ++++++++++++++++++ arch/arm/mach-shmobile/board-ape6evm-reference.c | 1 - .../board-armadillo800eva-reference.c | 3 +- arch/arm/mach-shmobile/clock-r8a73a4.c | 7 ++ arch/arm/mach-shmobile/clock-r8a7740.c | 21 +++-- arch/arm/mach-shmobile/clock-r8a7778.c | 8 ++ arch/arm/mach-shmobile/clock-sh73a0.c | 10 +++ arch/arm/mach-shmobile/r8a73a4.h | 1 - arch/arm/mach-shmobile/r8a7740.h | 1 - arch/arm/mach-shmobile/setup-r8a73a4.c | 21 ++--- arch/arm/mach-shmobile/setup-r8a7740.c | 18 +--- arch/arm/mach-shmobile/setup-r8a7778.c | 15 ++-- arch/arm/mach-shmobile/setup-sh73a0.c | 11 +-- 20 files changed, 431 insertions(+), 72 deletions(-)Signature · 1 line
2.0.0.rc2