ARM: shmobile: marzen: enable HSPI0 to DTS
Subsystems (5)
cover ARM: shmobile: marzen: enable HSPI0 to DTS
Hi,
this short series enables HSPI0 in DTS for the r8a7779 based marzen board. It is based on work by Kuninori Morimoto for the r8a7778 based bockw board.
This series is based on the renesas-devel-v3.13-rc1-20131124 tag of my renesas tree.
Simon Horman (3):
ARM: shmobile: r8a7779: add HSPI clock support for DT
ARM: shmobile: r8a7779: add HSPI support to DTSI
ARM: shmobile: marzen: enable HSPI0 in DTS
arch/arm/boot/dts/r8a7779-marzen-reference.dts | 11 ++++++++++ arch/arm/boot/dts/r8a7779.dtsi | 30 ++++++++++++++++++++++++++ arch/arm/mach-shmobile/clock-r8a7779.c | 3 +++ 3 files changed, 44 insertions(+)
Signature · 1 line
1.8.4
PATCH 1/3 ARM: shmobile: r8a7779: add HSPI clock support for DT
Based on work for the r8a7778 SoC by Kuninori Morimoto.
--- arch/arm/mach-shmobile/clock-r8a7779.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-shmobile/clock-r8a7779.c +3 -0
@@ -198,8 +198,11 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("sh-sci.4" , &mstp_clks[MSTP022 ]),/* SCIF4 */ CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP021 ]),/* SCIF6 */ CLKDEV_DEV_ID ("sh-hspi.0" , &mstp_clks[MSTP007 ]),/* HSPI0 */ +CLKDEV_DEV_ID ("fffc7000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI0 */ CLKDEV_DEV_ID ("sh-hspi.1" , &mstp_clks[MSTP007 ]),/* HSPI1 */ +CLKDEV_DEV_ID ("fffc8000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI1 */ CLKDEV_DEV_ID ("sh-hspi.2" , &mstp_clks[MSTP007 ]),/* HSPI2 */ +CLKDEV_DEV_ID ("fffc6000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI2 */ CLKDEV_DEV_ID ("sh_mobile_sdhi.0" , &mstp_clks[MSTP323 ]),/* SDHI0 */ CLKDEV_DEV_ID ("ffe4c000.sd" , &mstp_clks[MSTP323 ]),/* SDHI0 */ CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */
Signature · 1 line
1.8.4
PATCH 1/3 ARM: shmobile: r8a7779: add HSPI clock support for DT
Hi Simon
Thank you for this patch
Quoted 14 lines
Based on work for the r8a7778 SoC by Kuninori Morimoto.
Cc Kuninori Morimoto <[email protected]>Signed-off-by Simon Horman <[email protected]>--- arch/arm/mach-shmobile/clock-r8a7779.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm/mach-shmobile/clock-r8a7779.c +0
-0@@ -198,8 +198,11 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */
arch/arm/mach-shmobile/clock-r8a7779.c static struct clk_lookup lookups[] = { · line 208
Quoted 10 lines
arch/arm/mach-shmobile/clock-r8a7779.c +3
-0CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP021 ]),/* SCIF6 */ CLKDEV_DEV_ID ("sh-hspi.0" , &mstp_clks[MSTP007 ]),/* HSPI0 */ +CLKDEV_DEV_ID ("fffc7000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI0 */ CLKDEV_DEV_ID ("sh-hspi.1" , &mstp_clks[MSTP007 ]),/* HSPI1 */ +CLKDEV_DEV_ID ("fffc8000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI1 */ CLKDEV_DEV_ID ("sh-hspi.2" , &mstp_clks[MSTP007 ]),/* HSPI2 */ +CLKDEV_DEV_ID ("fffc6000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI2 */ CLKDEV_DEV_ID ("sh_mobile_sdhi.0" , &mstp_clks[MSTP323 ]),/* SDHI0 */ CLKDEV_DEV_ID ("ffe4c000.sd" , &mstp_clks[MSTP323 ]),/* SDHI0 */ CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */
I guess, [2/3] patch is using
hspi0: spi at fffc7000 {So, the correct name is...
- fffc7000.sh-hspi
+ fffc7000.spi
Best regards
---
Kuninori Morimoto
PATCH 1/3 ARM: shmobile: r8a7779: add HSPI clock support for DT
Quoted 32 lines · Kuninori Morimoto
Hi Simon
Thank you for this patch
Quoted 14 lines
Based on work for the r8a7778 SoC by Kuninori Morimoto.
Cc Kuninori Morimoto <[email protected]>Signed-off-by Simon Horman <[email protected]>--- arch/arm/mach-shmobile/clock-r8a7779.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm/mach-shmobile/clock-r8a7779.c +0
-0@@ -198,8 +198,11 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */arch/arm/mach-shmobile/clock-r8a7779.c static struct clk_lookup lookups[] = { · line 208
Quoted 10 lines
arch/arm/mach-shmobile/clock-r8a7779.c +3
-0CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP021 ]),/* SCIF6 */ CLKDEV_DEV_ID ("sh-hspi.0" , &mstp_clks[MSTP007 ]),/* HSPI0 */ +CLKDEV_DEV_ID ("fffc7000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI0 */ CLKDEV_DEV_ID ("sh-hspi.1" , &mstp_clks[MSTP007 ]),/* HSPI1 */ +CLKDEV_DEV_ID ("fffc8000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI1 */ CLKDEV_DEV_ID ("sh-hspi.2" , &mstp_clks[MSTP007 ]),/* HSPI2 */ +CLKDEV_DEV_ID ("fffc6000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI2 */ CLKDEV_DEV_ID ("sh_mobile_sdhi.0" , &mstp_clks[MSTP323 ]),/* SDHI0 */ CLKDEV_DEV_ID ("ffe4c000.sd" , &mstp_clks[MSTP323 ]),/* SDHI0 */ CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */I guess, [2/3] patch is using
Quoted 6 lines
hspi0: spi at fffc7000 {So, the correct name is...
- fffc7000.sh-hspi
+ fffc7000.spi
Thanks, I will fix that.
PATCH 1/3 ARM: shmobile: r8a7779: add HSPI clock support for DT
In reply to Simon HormanHello.
Quoted 13 lines · Simon Horman
Based on work for the r8a7778 SoC by Kuninori Morimoto.
Cc Kuninori Morimoto <[email protected]>Signed-off-by Simon Horman <[email protected]>--- arch/arm/mach-shmobile/clock-r8a7779.c | 3 +++ 1 file changed, 3 insertions(+)arch/arm/mach-shmobile/clock-r8a7779.c +0
-0
arch/arm/mach-shmobile/clock-r8a7779.c static struct clk_lookup lookups[] = { · line 205
Quoted 8 lines
arch/arm/mach-shmobile/clock-r8a7779.c +3
-0@@ -198,8 +198,11 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("sh-sci.4" , &mstp_clks[MSTP022 ]),/* SCIF4 */ CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP021 ]),/* SCIF6 */ CLKDEV_DEV_ID ("sh-hspi.0" , &mstp_clks[MSTP007 ]),/* HSPI0 */ +CLKDEV_DEV_ID ("fffc7000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI0 */ CLKDEV_DEV_ID ("sh-hspi.1" , &mstp_clks[MSTP007 ]),/* HSPI1 */ +CLKDEV_DEV_ID ("fffc8000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI1 */ CLKDEV_DEV_ID ("sh-hspi.2" , &mstp_clks[MSTP007 ]),/* HSPI2 */ + CLKDEV_DEV_ID("fffc6000.sh-hspi", &mstp_clks[MSTP007]), /* HSPI2 */
The device names here don't seem to match to the device names in the .dtsi
file.
WBR, Sergei
PATCH 1/3 ARM: shmobile: r8a7779: add HSPI clock support for DT
Quoted 12 lines · Sergei Shtylyov
Hello.
Quoted 7 lines · Simon Horman
Based on work for the r8a7778 SoC by Kuninori Morimoto.
Cc Kuninori Morimoto <[email protected]>Signed-off-by Simon Horman <[email protected]>--- arch/arm/mach-shmobile/clock-r8a7779.c | 3 +++ 1 file changed, 3 insertions(+)
Quoted 16 lines
arch/arm/mach-shmobile/clock-r8a7779.c static struct clk_lookup lookups[] = { · line 205
Quoted 13 lines
arch/arm/mach-shmobile/clock-r8a7779.c +3
-0@@ -198,8 +198,11 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("sh-sci.4" , &mstp_clks[MSTP022 ]),/* SCIF4 */ CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP021 ]),/* SCIF6 */ CLKDEV_DEV_ID ("sh-hspi.0" , &mstp_clks[MSTP007 ]),/* HSPI0 */ +CLKDEV_DEV_ID ("fffc7000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI0 */ CLKDEV_DEV_ID ("sh-hspi.1" , &mstp_clks[MSTP007 ]),/* HSPI1 */ +CLKDEV_DEV_ID ("fffc8000.sh-hspi" , &mstp_clks[MSTP007 ]),/* HSPI1 */ CLKDEV_DEV_ID ("sh-hspi.2" , &mstp_clks[MSTP007 ]),/* HSPI2 */ + CLKDEV_DEV_ID("fffc6000.sh-hspi", &mstp_clks[MSTP007]), /* HSPI2 */The device names here don't seem to match to the device names in
the .dtsi file.
Thanks, I will fix that.
PATCH 2/3 ARM: shmobile: r8a7779: add HSPI support to DTSI
In reply to Simon HormanBased on work for the r8a7778 SoC by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7779.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm/boot/dts/r8a7779.dtsi +30 -0
@@ -42,6 +42,12 @@ }; }; + aliases { + spi0 = &hspi0; + spi1 = &hspi1; + spi2 = &hspi2; + }; + gic: interrupt-controller at f0001000 { compatible = "arm,cortex-a9-gic"; #interrupt-cells = <3>;
@@ -248,4 +254,28 @@ cap-sdio-irq; status = "disabled"; }; + + hspi0: spi at fffc7000 { + compatible = "renesas,hspi"; + reg = <0xfffc7000 0x18>; + interrupt-controller = <&gic>; + interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + hspi1: spi at fffc8000 { + compatible = "renesas,hspi"; + reg = <0xfffc8000 0x18>; + interrupt-controller = <&gic>; + interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + + hspi2: spi at fffc6000 { + compatible = "renesas,hspi"; + reg = <0xfffc6000 0x18>; + interrupt-controller = <&gic>; + interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; };
Signature · 1 line
1.8.4
PATCH 3/3 ARM: shmobile: marzen: enable HSPI0 in DTS
In reply to Simon HormanBased on work for the bockw board by Kuninori Morimoto.
--- arch/arm/boot/dts/r8a7779-marzen-reference.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/boot/dts/r8a7779-marzen-reference.dts +11 -0
@@ -97,6 +97,11 @@ renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd"; renesas,function = "sdhi0"; }; + + hspi0_pins: hspi0 { + renesas,groups = "hspi0"; + renesas,function = "hspi0"; + }; }; &sdhi0 {
@@ -107,3 +112,9 @@ bus-width = <4>; status = "okay"; }; + +&hspi0 { + pinctrl-0 = <&hspi0_pins>; + pinctrl-names = "default"; + status = "okay"; +};
Signature · 1 line
1.8.4
PATCH 3/3 ARM: shmobile: marzen: enable HSPI0 in DTS
Hi Simon,
Thank you for the patch.
Quoted 14 lines · On Monday 25 November 2013 10:00:16 Simon Horman wrote:
Based on work for the bockw board by Kuninori Morimoto.
Cc Kuninori Morimoto <[email protected]>Signed-off-by Simon Horman <[email protected]>--- arch/arm/boot/dts/r8a7779-marzen-reference.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)(quoted diff) +0
-0
b/arch/arm/boot/dts/r8a7779-marzen-reference.dtsindex 918085c..76f5eef 100644
arch/arm/boot/dts/r8a7779-marzen-reference.dts line 104
Quoted 8 lines
arch/arm/boot/dts/r8a7779-marzen-reference.dts +5
-0@@ -97,6 +97,11 @@ renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd"; renesas,function = "sdhi0"; }; + + hspi0_pins: hspi0 { + renesas,groups = "hspi0"; + renesas,function = "hspi0"; + };
What about keeping the nodes in alphabetical order ?
arch/arm/boot/dts/r8a7779-marzen-reference.dts line 120
Quoted 13 lines
arch/arm/boot/dts/r8a7779-marzen-reference.dts +6
-0}; &sdhi0 {@@ -107,3 +112,9 @@ bus-width = <4>; status = "okay"; }; + +&hspi0 { + pinctrl-0 = <&hspi0_pins>; + pinctrl-names = "default"; + status = "okay"; +};
And here too ?
Signature · 3 lines
Regards, Laurent Pinchart