ARM: shmobile: add R8A7778 Bock-W board support
Subsystems (6)
v2 cover ARM: shmobile: add R8A7778 Bock-W board support
Hi Simon, Magnus, and all
These are v2 patch set of R8A7778 R-Car M1 SoC/board support This SoC/board support have limited DT only.
In the future improved PINCTRL and clock framework support will be added v2 patch set include DT as default
Bock-W board needs ${LINUX}/arch/arm/tools/mach-types
bockw MACH_BOCKW BOCKW 3386
ARM Web site already has Bock-W, mach-types will be updated if upstream kernel has it.
These patches are based on simon/next branch
Kuninori Morimoto (3):
[PATCH 1/3] ARM: shmobile: add R8A7778 setup support [PATCH 2/3] ARM: shmobile: r8a7778 SCIF support [PATCH 3/3] ARM: shmobile: add R-Car M1A Bock-W platform support
arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7778-bockw.dts | 32 +++ arch/arm/boot/dts/r8a7778.dtsi | 35 +++ arch/arm/configs/bockw_defconfig | 95 ++++++++ arch/arm/mach-shmobile/Kconfig | 11 + arch/arm/mach-shmobile/Makefile | 2 + arch/arm/mach-shmobile/board-bockw.c | 37 +++ arch/arm/mach-shmobile/clock-r8a7778.c | 104 +++++++++ arch/arm/mach-shmobile/include/mach/r8a7778.h | 29 +++ arch/arm/mach-shmobile/setup-r8a7778.c | 311 +++++++++++++++++++++++++ 10 files changed, 657 insertions(+)
This is my command for DT uImage
PC> make bockw_defconfig
PC> make menuconfig
[Boot options]
- [Flattened Device Tree support]
- [Use appended device tree blob to zImage (EXPERIMENTAL)]
[System Type]
- [BOCK-W platform - Reference Device Tree Implementation]
PC> make zImage
PC> make dtbs
PC> duImage r8a7778-bockw-reference
PC> cp arch/sh/boot/duImage ${PATH}
---- duImage --------------------------------
#! /bin/sh
# create zImage + dtb = dzImage
cat arch/arm/boot/zImage arch/arm/boot/dts/${1}.dtb > arch/arm/boot/dzImage# create duImage
DUIMAGE=`cut -f 3- -d ' ' < arch/arm/boot/.uImage.cmd | sed -e "s/zImage/dzImage/" | sed -e "s/uImage/duImage/"`
${DUIMAGE}%
----------------------------------------------Best regards
---
Kuninori Morimoto
Hi
Quoted 3 lines
Bock-W board needs ${LINUX}/arch/arm/tools/mach-types
bockw
MACH_BOCKWBOCKW 3386
Sorry, this was wrong.
It is not needed on DT.
Best regards
---
Kuninori Morimoto
v3 cover ARM: shmobile: add R8A7778 Bock-W board support v3
In reply to Kuninori MorimotoHi Simon, Magnus, Arnd
These are v3 patch set of R8A7778 R-Car M1 SoC/board support This SoC/board support have limited DT only. (TMU/SCIF can't use DT at this point)
I will work for external IRQ and SMSC support
if these are accepted.
These patches are based on simon/next branch
Kuninori Morimoto (3):
ARM: shmobile: add R8A7778 basis support
ARM: shmobile: r8a7778 SCIF support
ARM: shmobile: add R-Car M1A Bock-W platform support
arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7778-bockw.dts | 32 ++++ arch/arm/boot/dts/r8a7778.dtsi | 35 +++++ arch/arm/configs/bockw_defconfig | 66 +++++++++ arch/arm/mach-shmobile/Kconfig | 12 ++ arch/arm/mach-shmobile/Makefile | 2 + arch/arm/mach-shmobile/board-bockw.c | 43 ++++++ arch/arm/mach-shmobile/clock-r8a7778.c | 104 +++++++++++++ arch/arm/mach-shmobile/include/mach/r8a7778.h | 28 ++++ arch/arm/mach-shmobile/setup-r8a7778.c | 193 +++++++++++++++++++++++++ 10 files changed, 516 insertions(+)
This is my command for DT uImage
PC> make bockw_defconfig
PC> make menuconfig
PC> make zImage
PC> make dtbs
PC> duImage r8a7778-bockw-reference
PC> cp arch/sh/boot/duImage ${PATH}
---- duImage --------------------------------
#! /bin/sh
# create zImage + dtb = dzImage
cat arch/arm/boot/zImage arch/arm/boot/dts/${1}.dtb > arch/arm/boot/dzImage# create duImage
DUIMAGE=`cut -f 3- -d ' ' < arch/arm/boot/.uImage.cmd | sed -e "s/zImage/dzImage/" | sed -e "s/uImage/duImage/"`
${DUIMAGE}%
----------------------------------------------Best regards
---
Kuninori Morimoto
PATCH v3 1/3 ARM: shmobile: add R8A7778 basis support
Add initial support for the R8A7778 R-Car M1A SoC. 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.
It is based on v1.0 datasheet
---
v2 -> v3
- it used platform_device_register_full()
- removed r8a7778_clock_init() from setup-r8a7778.c
- cleanup code
arch/arm/boot/dts/r8a7778.dtsi | 35 ++++++ arch/arm/mach-shmobile/Kconfig | 6 + arch/arm/mach-shmobile/Makefile | 1 + arch/arm/mach-shmobile/clock-r8a7778.c | 91 ++++++++++++++ arch/arm/mach-shmobile/include/mach/r8a7778.h | 28 +++++ arch/arm/mach-shmobile/setup-r8a7778.c | 167 +++++++++++++++++++++++++ 6 files changed, 328 insertions(+) create mode 100644 arch/arm/boot/dts/r8a7778.dtsi create mode 100644 arch/arm/mach-shmobile/clock-r8a7778.c create mode 100644 arch/arm/mach-shmobile/include/mach/r8a7778.h create mode 100644 arch/arm/mach-shmobile/setup-r8a7778.c
arch/arm/boot/dts/r8a7778.dtsi new file +35 -0
@@ -0,0 +1,35 @@ +/* + * Device Tree Source for Renesas r8a7778 + * + * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013 Kuninori Morimoto <[email protected]> + * + * based on r8a7779 + * + * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013 Simon Horman + * + * 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,r8a7778"; + + cpus { + cpu at 0 { + compatible = "arm,cortex-a9"; + }; + }; + + gic: interrupt-controller at fe438000 { + compatible = "arm,cortex-a9-gic"; + #interrupt-cells = <3>; + interrupt-controller; + reg = <0xfe438000 0x1000>, + <0xfe430000 0x100>; + }; +};
arch/arm/mach-shmobile/Kconfig +6 -0
@@ -24,6 +24,12 @@ config ARCH_R8A7740 select CPU_V7 select SH_CLK_CPG +config ARCH_R8A7778 + bool "R-Car M1 (R8A77780)" + select CPU_V7 + select SH_CLK_CPG + select ARM_GIC + config ARCH_R8A7779 bool "R-Car H1 (R8A77790)" select ARCH_WANT_OPTIONAL_GPIOLIB
arch/arm/mach-shmobile/Makefile +1 -0
@@ -9,6 +9,7 @@ obj-y := timer.o console.o clock.o 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_R8A7740) += setup-r8a7740.o clock-r8a7740.o intc-r8a7740.o +obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o clock-r8a7778.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-r8a7778.c new file +91 -0
91 lines not on this page · raw message
arch/arm/mach-shmobile/include/mach/r8a7778.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* Copyright (C) 2013 Renesas Solutions Corp. +* Copyright (C) 2013 Kuninori Morimoto <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; version 2 of the License. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef __ASM_R8A7778_H__ +#define __ASM_R8A7778_H__ + +extern void r8a7778_add_standard_devices (void ); +extern void r8a7778_add_standard_devices_dt (void ); +extern void r8a7778_init_delay (void ); +extern void r8a7778_init_irq (void ); +extern void r8a7778_init_irq_dt (void ); +extern void r8a7778_clock_init (void ); + +#endif /* __ASM_R8A7778_H__ */
arch/arm/mach-shmobile/setup-r8a7778.c new file +167 -0
167 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v3 1/3 ARM: shmobile: add R8A7778 basis support
Quoted 9 lines · Kuninori Morimoto
Add initial support for the R8A7778 R-Car M1A SoC. No static virtual mappings are used, all the components make use of
ioremap().DT_MACHINE_STARTis still wrapped
inCONFIG_USE_OFto match other mach-shmobile code.It is based on v1.0 datasheet
Signed-off-by Kuninori Morimoto <[email protected]>
Thanks, queued up for v3.10 in the soc branch.
PATCH v3 2/3 ARM: shmobile: r8a7778 SCIF support
In reply to Kuninori MorimotoAdd SCIF serial port support to the r8a7778 SoC by adding platform devices together with clock bindings. DT device description is excluded at this point since such bindings are still under development.
---
v2 -> v3
- it used platform_device_register_data()
arch/arm/mach-shmobile/clock-r8a7778.c | 13 +++++++++++++ arch/arm/mach-shmobile/setup-r8a7778.c | 26 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+)
arch/arm/mach-shmobile/clock-r8a7778.c +13 -0
@@ -58,16 +58,29 @@ static struct clk *main_clks[] = { };enum { +MSTP026 ,MSTP025 ,MSTP024 ,MSTP023 ,MSTP022 ,MSTP021 ,MSTP016 ,MSTP015 ,MSTP_NR };static struct clk mstp_clks[MSTP_NR ] = { + [MSTP026 ] =SH_CLK_MSTP32 (&clkp,MSTPCR0 ,26 ,0 ),/* SCIF0 */ + [MSTP025 ] =SH_CLK_MSTP32 (&clkp,MSTPCR0 ,25 ,0 ),/* SCIF1 */ + [MSTP024 ] =SH_CLK_MSTP32 (&clkp,MSTPCR0 ,24 ,0 ),/* SCIF2 */ + [MSTP023 ] =SH_CLK_MSTP32 (&clkp,MSTPCR0 ,23 ,0 ),/* SCIF3 */ + [MSTP022 ] =SH_CLK_MSTP32 (&clkp,MSTPCR0 ,22 ,0 ),/* SCIF4 */ + [MSTP021 ] =SH_CLK_MSTP32 (&clkp,MSTPCR0 ,21 ,0 ),/* SCIF5 */ [MSTP016 ] =SH_CLK_MSTP32 (&clkp,MSTPCR0 ,16 ,0 ),/* TMU0 */ [MSTP015 ] =SH_CLK_MSTP32 (&clkp,MSTPCR0 ,15 ,0 ),/* TMU1 */ };static struct clk_lookup lookups[] = {/* MSTP32 clocks */ +CLKDEV_DEV_ID ("sh-sci.0" , &mstp_clks[MSTP026 ]),/* SCIF0 */ +CLKDEV_DEV_ID ("sh-sci.1" , &mstp_clks[MSTP025 ]),/* SCIF1 */ +CLKDEV_DEV_ID ("sh-sci.2" , &mstp_clks[MSTP024 ]),/* SCIF2 */ +CLKDEV_DEV_ID ("sh-sci.3" , &mstp_clks[MSTP023 ]),/* SCIF3 */ +CLKDEV_DEV_ID ("sh-sci.4" , &mstp_clks[MSTP022 ]),/* SCIF4 */ +CLKDEV_DEV_ID ("sh-sci.5" , &mstp_clks[MSTP021 ]),/* SCIF6 */ CLKDEV_DEV_ID ("sh_tmu.0" , &mstp_clks[MSTP016 ]),/* TMU00 */ CLKDEV_DEV_ID ("sh_tmu.1" , &mstp_clks[MSTP015 ]),/* TMU01 */ };
arch/arm/mach-shmobile/setup-r8a7778.c +26 -0
@@ -25,6 +25,7 @@#include <linux/of_platform.h> #include <linux/platform_device.h> #include <linux/irqchip.h> +#include <linux/serial_sci.h> #include <linux/sh_timer.h> #include <mach/irqs.h> #include <mach/r8a7778.h>
@@ -32,6 +33,26 @@#include <asm/mach/arch.h> #include <asm/hardware/cache-l2x0.h> +/* SCIF */ +#define SCIF_INFO (baseaddr, irq) \ +{ \ + .mapbase = baseaddr, \ + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ + .scscr = SCSCR_RE | SCSCR_TE | SCSCR_CKE1, \ + .scbrr_algo_id = SCBRR_ALGO_2, \ + .type = PORT_SCIF, \ + .irqs = SCIx_IRQ_MUXED(irq), \ +} + +static struct plat_sci_port scif_platform_data[] = { +SCIF_INFO (0xffe40000 ,gic_iid (0x66 )), +SCIF_INFO (0xffe41000 ,gic_iid (0x67 )), +SCIF_INFO (0xffe42000 ,gic_iid (0x68 )), +SCIF_INFO (0xffe43000 ,gic_iid (0x69 )), +SCIF_INFO (0xffe44000 ,gic_iid (0x6a )), +SCIF_INFO (0xffe45000 ,gic_iid (0x6b )), +}; +/* TMU */ static struct resource sh_tmu0_resources[] = {DEFINE_RES_MEM (0xffd80008 ,12 ),
@@ -88,6 +109,11 @@ void __init r8a7778_add_standard_devices(void) }#endif +for (i =0 ; i <ARRAY_SIZE (scif_platform_data); i++) +platform_device_register_data (&platform_bus,"sh-sci" , i, + &scif_platform_data[i], +sizeof (struct plat_sci_port )); +for (i =0 ; i <ARRAY_SIZE (platform_devinfo); i++)platform_device_register_full (&platform_devinfo[i]); }
Signature · 1 line
1.7.9.5
PATCH v3 2/3 ARM: shmobile: r8a7778 SCIF support
Quoted 6 lines · Kuninori Morimoto
Add SCIF serial port support to the r8a7778 SoC by adding platform devices together with clock bindings. DT device description is excluded at this point since such bindings are still under development.
Signed-off-by Kuninori Morimoto <[email protected]>
Thanks, queued up for v3.10 in the soc branch.
PATCH v3 3/3 ARM: shmobile: add R-Car M1A Bock-W platform support
In reply to Kuninori MorimotoAdd basic Bock-W board support
More devices will be added on top of this patch after PICNTRL and clock framework are in better shape.
---
v2 -> v3
- fixup compatible name
- r8a7778_clock_init() is called from board code
arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7778-bockw.dts | 32 +++++++++++++++++ arch/arm/configs/bockw_defconfig | 66 ++++++++++++++++++++++++++++++++++ arch/arm/mach-shmobile/Kconfig | 6 ++++ arch/arm/mach-shmobile/Makefile | 1 + arch/arm/mach-shmobile/board-bockw.c | 43 ++++++++++++++++++++++ 6 files changed, 149 insertions(+) create mode 100644 arch/arm/boot/dts/r8a7778-bockw.dts create mode 100644 arch/arm/configs/bockw_defconfig create mode 100644 arch/arm/mach-shmobile/board-bockw.c
arch/arm/boot/dts/Makefile +1 -0
@@ -136,6 +136,7 @@ dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \ ccu9540.dtb dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ r8a7740-armadillo800eva.dtb \ + r8a7778-bockw.dtb \ r8a7779-marzen-reference.dtb \ sh73a0-kzm9g.dtb \ sh73a0-kzm9g-reference.dtb \
arch/arm/boot/dts/r8a7778-bockw.dts new file +32 -0
@@ -0,0 +1,32 @@ +/* + * Reference Device Tree Source for the Bock-W board + * + * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013 Kuninori Morimoto <[email protected]> + * + * based on r8a7779 + * + * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013 Simon Horman + * + * 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. + */ + +/dts-v1/; +/include/ "r8a7778.dtsi" + +/ { + model = "bockw"; + compatible = "renesas,bockw", "renesas,r8a7778"; + + chosen { + bootargs = "console=ttySC0,115200 ignore_loglevel"; + }; + + memory { + device_type = "memory"; + reg = <0x60000000 0x10000000>; + }; +};
arch/arm/configs/bockw_defconfig new file +66 -0
66 lines not on this page · raw message
arch/arm/mach-shmobile/Kconfig +6 -0
@@ -104,6 +104,12 @@ config MACH_ARMADILLO800EVA select SND_SOC_WM8978 if SND_SIMPLE_CARD select USE_OF +config MACH_BOCKW + bool "BOCK-W platform" + depends on ARCH_R8A7778 + select ARCH_REQUIRE_GPIOLIB + select USE_OF + config MACH_MARZEN bool "MARZEN board" depends on ARCH_R8A7779
arch/arm/mach-shmobile/Makefile +1 -0
@@ -38,6 +38,7 @@ obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o obj-$(CONFIG_MACH_KOTA2) += board-kota2.o obj-$(CONFIG_MACH_BONITO) += board-bonito.o +obj-$(CONFIG_MACH_BOCKW) += board-bockw.o obj-$(CONFIG_MACH_MARZEN) += board-marzen.o obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o
arch/arm/mach-shmobile/board-bockw.c new file +43 -0
43 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v3 3/3 ARM: shmobile: add R-Car M1A Bock-W platform support
Quoted 6 lines · Kuninori Morimoto
Add basic Bock-W board support
More devices will be added on top of this patch after PICNTRL and clock framework are in better shape.
Signed-off-by Kuninori Morimoto <[email protected]>
Thanks, queued up for v3.10 in the boards branch.
v3 cover ARM: shmobile: add R8A7778 Bock-W board support v3
In reply to Kuninori MorimotoQuoted 11 lines · Kuninori Morimoto
Hi Simon, Magnus, Arnd
These are v3 patch set of R8A7778 R-Car M1 SoC/board support This SoC/board support have limited DT only. (TMU/SCIF can't use DT at this point)
I will work for external IRQ and SMSC support
if these are accepted.These patches are based on simon/next branch
Good choice :^)
I have no objections to these changes at this point but I would appreciate an ack from Magnus before applying them.
Quoted 45 lines
Kuninori Morimoto (3):
ARM: shmobile: add R8A7778 basis support
ARM: shmobile: r8a7778 SCIF support
ARM: shmobile: add R-Car M1A Bock-W platform supportarch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7778-bockw.dts | 32 ++++ arch/arm/boot/dts/r8a7778.dtsi | 35 +++++ arch/arm/configs/bockw_defconfig | 66 +++++++++ arch/arm/mach-shmobile/Kconfig | 12 ++ arch/arm/mach-shmobile/Makefile | 2 + arch/arm/mach-shmobile/board-bockw.c | 43 ++++++ arch/arm/mach-shmobile/clock-r8a7778.c | 104 +++++++++++++ arch/arm/mach-shmobile/include/mach/r8a7778.h | 28 ++++ arch/arm/mach-shmobile/setup-r8a7778.c | 193 +++++++++++++++++++++++++ 10 files changed, 516 insertions(+)This is my command for DT uImage
PC> make
bockw_defconfig
PC> make menuconfig
PC> make zImage
PC> make dtbs
PC> duImage r8a7778-bockw-reference
PC> cparch/sh/boot/duImage${PATH}---- duImage --------------------------------
#!/bin/sh# create zImage + dtb = dzImage cat arch/arm/boot/zImage arch/arm/boot/dts/${1}.dtb > arch/arm/boot/dzImage# create duImage DUIMAGE=`cut -f 3- -d ' ' < arch/arm/boot/.uImage.cmd | sed -e "s/zImage/dzImage/" | sed -e "s/uImage/duImage/"` ${DUIMAGE}% ----------------------------------------------Best regards
---
Kuninori Morimoto
--
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
Magnus Damm
maintainerv3 cover ARM: shmobile: add R8A7778 Bock-W board support v3
Hi Simon, Morimoto-san,
Quoted 11 lines · Simon Horman
Quoted 10 lines · Kuninori Morimoto
Hi Simon, Magnus, Arnd
These are v3 patch set of R8A7778 R-Car M1 SoC/board support This SoC/board support have limited DT only. (TMU/SCIF can't use DT at this point)
I will work for external IRQ and SMSC support
if these are accepted.
Quoted 6 lines
Quoted 1 line
These patches are based on simon/next branch
Good choice :^)
I have no objections to these changes at this point but I would appreciate an ack from Magnus before applying them.
I've looked through this series and they look good to me.
v3 cover ARM: shmobile: add R8A7778 Bock-W board support v3
Quoted 16 lines · Magnus Damm
Hi Simon, Morimoto-san,
Quoted 13 lines · Simon Horman
Quoted 11 lines · Kuninori Morimoto
Hi Simon, Magnus, Arnd
These are v3 patch set of R8A7778 R-Car M1 SoC/board support This SoC/board support have limited DT only. (TMU/SCIF can't use DT at this point)
I will work for external IRQ and SMSC support
if these are accepted.These patches are based on simon/next branch
Quoted 8 lines
Quoted 4 lines
Good choice :^)
I have no objections to these changes at this point but I would appreciate an ack from Magnus before applying them.
I've looked through this series and they look good to me.
Acked-by Magnus Damm <[email protected]>
Thanks, I will queue them up.