diff mbox

arm: dts: r7s72100: Add support for GR-Peach

Message ID 1495532834-25670-1-git-send-email-jacopo+renesas@jmondi.org (mailing list archive)
State Superseded
Delegated to: Simon Horman
Headers show

Commit Message

Jacopo Mondi May 23, 2017, 9:47 a.m. UTC
Add device tree source for Renesas GR-Peach board.
GR-Peach is an RZ/A1H based board with 10MB of on-chip SRAM and 8MB
QSPI flash storage.
Add support for the board, and create a 2MB partition to use as rootfs.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
 Documentation/devicetree/bindings/arm/shmobile.txt |  2 +
 arch/arm/boot/dts/Makefile                         |  1 +
 arch/arm/boot/dts/r7s72100-grpeach.dts             | 65 ++++++++++++++++++++++
 3 files changed, 68 insertions(+)
 create mode 100644 arch/arm/boot/dts/r7s72100-grpeach.dts

Comments

Geert Uytterhoeven May 23, 2017, 10:08 a.m. UTC | #1
Hi Jacopo,

On Tue, May 23, 2017 at 11:47 AM, Jacopo Mondi
<jacopo+renesas@jmondi.org> wrote:
> Add device tree source for Renesas GR-Peach board.
> GR-Peach is an RZ/A1H based board with 10MB of on-chip SRAM and 8MB
> QSPI flash storage.
> Add support for the board, and create a 2MB partition to use as rootfs.
>
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>

Thanks for your patch!

> --- a/Documentation/devicetree/bindings/arm/shmobile.txt
> +++ b/Documentation/devicetree/bindings/arm/shmobile.txt
> @@ -51,6 +51,8 @@ Boards:
>      compatible = "renesas,bockw", "renesas,r8a7778"
>    - Genmai (RTK772100BC00000BR)
>      compatible = "renesas,genmai", "renesas,r7s72100"
> +  - GR-Peach (RTK772100BC00000BR)

That part number is Genmai?

> +    compatible = "renesas,grpeach", "renesas,r7s72100"

"renesas,gr-peach"?

> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -716,6 +716,7 @@ dtb-$(CONFIG_ARCH_S5PV210) += \
>  dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \
>         emev2-kzm9d.dtb \
>         r7s72100-genmai.dtb \
> +       r7s72100-grpeach.dtb \

r7s72100-gr-peach.dtb?

> --- /dev/null
> +++ b/arch/arm/boot/dts/r7s72100-grpeach.dts

r7s72100-gr-peach.dts

> @@ -0,0 +1,65 @@
> +/*
> + * Device Tree Source for the GRPEACH board

GR-PEACH

> +/ {
> +       model = "GRPEACH";

GR-PEACH

> +       compatible = "renesas,grpeach", "renesas,r7s72100";

renesas,gr-peach

> +
> +       aliases {
> +               serial2 = &scif2;

The first serial port is supposed to be called serial0, unless labeled
otherwise.

> +       };
> +
> +       chosen {
> +               bootargs = "console=ttySC2,115200 ignore_loglevel rw root=/dev/mtdblock0";

bootargs = "ignore_loglevel rw root=/dev/mtdblock0";
stdout-path = "serial0:115200n8";

> +       memory {

memory@20000000

(please run "make dtbs W=1")

> +               device_type = "memory";
> +               reg = <0x20000000 0x00A00000>;  /* 10Mb @ 0x20000000 */

reg = <0x20000000 0x00a00000>;

No need for the comment, esp. since it says 10 megabits instead of
10 mebibyte ;-)

> +       qspi@18000000 {

flash@18000000?

> +               compatible = "mtd-rom";
> +               probe-type = "map_rom";
> +               reg = <0x18000000 0x00800000>;   /* 8 MB*/

No need for the comment (megabyte vs. mebibyte)

> +               bank-width = <4>;
> +               device-width = <1>;
> +
> +               #address-cells = <1>;
> +               #size-cells = <1>;
> +
> +               rootfs@18600000 {

rootfs@600000?

> +                       label = "rootfs";
> +                       reg = <0x00600000 0x00200000>; /* 2MB @ 0x18600000 */

Do we need the comment?

> +&extal_clk {
> +       clock-frequency = <13330000>;

My schematics have one more digit of precision: <13333000>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Jacopo Mondi May 23, 2017, 6:49 p.m. UTC | #2
Hi Geert,

On Tue, May 23, 2017 at 12:08:30PM +0200, Geert Uytterhoeven wrote:
> Hi Jacopo,
>
> On Tue, May 23, 2017 at 11:47 AM, Jacopo Mondi
> <jacopo+renesas@jmondi.org> wrote:
> > Add device tree source for Renesas GR-Peach board.
> > GR-Peach is an RZ/A1H based board with 10MB of on-chip SRAM and 8MB
> > QSPI flash storage.
> > Add support for the board, and create a 2MB partition to use as rootfs.
> >
> > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
>
> Thanks for your patch!
>
> > --- a/Documentation/devicetree/bindings/arm/shmobile.txt
> > +++ b/Documentation/devicetree/bindings/arm/shmobile.txt
> > @@ -51,6 +51,8 @@ Boards:
> >      compatible = "renesas,bockw", "renesas,r8a7778"
> >    - Genmai (RTK772100BC00000BR)
> >      compatible = "renesas,genmai", "renesas,r7s72100"
> > +  - GR-Peach (RTK772100BC00000BR)
>
> That part number is Genmai?

Oh, I thought that was the SoC part number, and being both based on
RZ/A1H, I used the same.

Where can I find the correct part number?

>
> > +    compatible = "renesas,grpeach", "renesas,r7s72100"
>
> "renesas,gr-peach"?

Let's use gr-peach in place of grpeach everywhere then.

>
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -716,6 +716,7 @@ dtb-$(CONFIG_ARCH_S5PV210) += \
> >  dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \
> >         emev2-kzm9d.dtb \
> >         r7s72100-genmai.dtb \
> > +       r7s72100-grpeach.dtb \
>
> r7s72100-gr-peach.dtb?
>
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/r7s72100-grpeach.dts
>
> r7s72100-gr-peach.dts
>
> > @@ -0,0 +1,65 @@
> > +/*
> > + * Device Tree Source for the GRPEACH board
>
> GR-PEACH
>
> > +/ {
> > +       model = "GRPEACH";
>
> GR-PEACH
>
> > +       compatible = "renesas,grpeach", "renesas,r7s72100";
>
> renesas,gr-peach
>
> > +
> > +       aliases {
> > +               serial2 = &scif2;
>
> The first serial port is supposed to be called serial0, unless labeled
> otherwise.

I assumed it had to match the SCIF number. Will change.

>
> > +       };
> > +
> > +       chosen {
> > +               bootargs = "console=ttySC2,115200 ignore_loglevel rw root=/dev/mtdblock0";
>
> bootargs = "ignore_loglevel rw root=/dev/mtdblock0";
> stdout-path = "serial0:115200n8";
>
> > +       memory {
>
> memory@20000000
>
> (please run "make dtbs W=1")
>
> > +               device_type = "memory";
> > +               reg = <0x20000000 0x00A00000>;  /* 10Mb @ 0x20000000 */
>
> reg = <0x20000000 0x00a00000>;
>
> No need for the comment, esp. since it says 10 megabits instead of
> 10 mebibyte ;-)

Was I the only one that had to go on Wikipedia to find out what a
mebibyte is :p ?

I'll drop comments here and in the rest of the patch.

>
> > +       qspi@18000000 {
>
> flash@18000000?
>
> > +               compatible = "mtd-rom";
> > +               probe-type = "map_rom";
> > +               reg = <0x18000000 0x00800000>;   /* 8 MB*/
>
> No need for the comment (megabyte vs. mebibyte)
>
> > +               bank-width = <4>;
> > +               device-width = <1>;
> > +
> > +               #address-cells = <1>;
> > +               #size-cells = <1>;
> > +
> > +               rootfs@18600000 {
>
> rootfs@600000?
>
> > +                       label = "rootfs";
> > +                       reg = <0x00600000 0x00200000>; /* 2MB @ 0x18600000 */
>
> Do we need the comment?
>
> > +&extal_clk {
> > +       clock-frequency = <13330000>;
>
> My schematics have one more digit of precision: <13333000>

Thanks, I'll change this.

Do we need to change that on Genmai as well while at there?
Some parts of its documentation report a frequency of 13.33Mhz, but X1
is listed in the BOM as

X1 XIN oscillator (socket mounted) SG-8002DC-13.3333MHz (Epson)

Thanks
   j
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/arm/shmobile.txt b/Documentation/devicetree/bindings/arm/shmobile.txt
index c950263..1199e48 100644
--- a/Documentation/devicetree/bindings/arm/shmobile.txt
+++ b/Documentation/devicetree/bindings/arm/shmobile.txt
@@ -51,6 +51,8 @@  Boards:
     compatible = "renesas,bockw", "renesas,r8a7778"
   - Genmai (RTK772100BC00000BR)
     compatible = "renesas,genmai", "renesas,r7s72100"
+  - GR-Peach (RTK772100BC00000BR)
+    compatible = "renesas,grpeach", "renesas,r7s72100"
   - Gose (RTP0RC7793SEB00010S)
     compatible = "renesas,gose", "renesas,r8a7793"
   - H3ULCB (R-Car Starter Kit Premier, RTP0RC7795SKB00010S)
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 0118084..b238a3a 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -716,6 +716,7 @@  dtb-$(CONFIG_ARCH_S5PV210) += \
 dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \
 	emev2-kzm9d.dtb \
 	r7s72100-genmai.dtb \
+	r7s72100-grpeach.dtb \
 	r7s72100-rskrza1.dtb \
 	r8a73a4-ape6evm.dtb \
 	r8a7740-armadillo800eva.dtb \
diff --git a/arch/arm/boot/dts/r7s72100-grpeach.dts b/arch/arm/boot/dts/r7s72100-grpeach.dts
new file mode 100644
index 0000000..5edd0a5
--- /dev/null
+++ b/arch/arm/boot/dts/r7s72100-grpeach.dts
@@ -0,0 +1,65 @@ 
+/*
+ * Device Tree Source for the GRPEACH board
+ *
+ * Copyright (C) 2017 Jacopo Mondi <jacopo+renesas@jmondi.org>
+ * Copyright (C) 2016 Renesas Electronics
+ *
+ * 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 "r7s72100.dtsi"
+
+/ {
+	model = "GRPEACH";
+	compatible = "renesas,grpeach", "renesas,r7s72100";
+
+	aliases {
+		serial2 = &scif2;
+	};
+
+	chosen {
+		bootargs = "console=ttySC2,115200 ignore_loglevel rw root=/dev/mtdblock0";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x20000000 0x00A00000>;	/* 10Mb @ 0x20000000 */
+
+	};
+
+	lbsc {
+		#address-cells = <1>;
+		#size-cells = <1>;
+	};
+
+	qspi@18000000 {
+		compatible = "mtd-rom";
+		probe-type = "map_rom";
+		reg = <0x18000000 0x00800000>;   /* 8 MB*/
+		bank-width = <4>;
+		device-width = <1>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		rootfs@18600000 {
+			label = "rootfs";
+			reg = <0x00600000 0x00200000>; /* 2MB @ 0x18600000 */
+		};
+	};
+};
+
+&extal_clk {
+	clock-frequency = <13330000>;
+};
+
+&usb_x1_clk {
+	clock-frequency = <48000000>;
+};
+
+&scif2 {
+	status = "okay";
+};