diff mbox

[13/13,v4,RFC] Local: arm64: renesas: add SalvatorX board support on DTS

Message ID 87egjgyh6d.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State RFC
Delegated to: Simon Horman
Headers show

Commit Message

Kuninori Morimoto Aug. 6, 2015, 8:09 a.m. UTC
From: Gaku Inami <gaku.inami.xw@bp.renesas.com>

Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v3 -> v4

 - new patch

 arch/arm64/boot/dts/renesas/Makefile              |  2 +-
 arch/arm64/boot/dts/renesas/r8a7795-salvatorx.dts | 36 +++++++++++++++++++++++
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/renesas/r8a7795-salvatorx.dts

Comments

Geert Uytterhoeven Aug. 6, 2015, 10:15 a.m. UTC | #1
On Thu, Aug 6, 2015 at 10:09 AM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> --- /dev/null
> +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvatorx.dts
> @@ -0,0 +1,36 @@

> +       aliases {
> +               serial0 = &scif2;

Mapping 0 to 2?

> +       chosen {
> +               bootargs = "console=ttySC0,115200";

You shouldn't need the above line if stdout-path is present.

> +               stdout-path = &scif2;

Furthemore, quoting Mark Rutland
(http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/324232.html):

| I'd strongly recommend that you also pass the configuration explicitly
| here, so as to avoid nasty surprises. For that you can either use a path
| or an alias, depending on what the rest of your DT looks like:
|
|        stdout-path = "/path/to/scifa0:115200n8"
|
|        stdout-path = "serial0:115200n8"

I haven't tried that yet, but we may want to start doing The Right Thing (tm)
with Gen3.

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
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Aug. 7, 2015, 12:13 a.m. UTC | #2
Hi Geert


> > +       aliases {
> > +               serial0 = &scif2;
> 
> Mapping 0 to 2?
(snip)
> |        stdout-path = "/path/to/scifa0:115200n8"
> |
> |        stdout-path = "serial0:115200n8"
> 
> I haven't tried that yet, but we may want to start doing The Right Thing (tm)
> with Gen3.

I will try it if I have chance to HW access.
otherwise, my v5 will be just tidyups.

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Magnus Damm Aug. 7, 2015, 1:59 a.m. UTC | #3
Hi Geert,

On Thu, Aug 6, 2015 at 7:15 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Thu, Aug 6, 2015 at 10:09 AM, Kuninori Morimoto
> <kuninori.morimoto.gx@renesas.com> wrote:
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvatorx.dts
>> @@ -0,0 +1,36 @@
>
>> +       aliases {
>> +               serial0 = &scif2;
>
> Mapping 0 to 2?

I recall that "serial0" is supposed to be used for the first serial
port on the board. On older kernels we used a 1:1 mapping between the
scif index and the serial index, but not anymore. I may be wrong
though. And if I'm right then marzen needs to be fixed.

Cheers,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Aug. 7, 2015, 2:46 a.m. UTC | #4
Hi Geert

> |        stdout-path = "/path/to/scifa0:115200n8"
> |
> |        stdout-path = "serial0:115200n8"
> 
> I haven't tried that yet, but we may want to start doing The Right Thing (tm)
> with Gen3.

It doesn't have proper CPG support, v5 will also have fixed baudrate.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Aug. 7, 2015, 7:19 a.m. UTC | #5
Hi Magnus,

On Fri, Aug 7, 2015 at 3:59 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> On Thu, Aug 6, 2015 at 7:15 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> On Thu, Aug 6, 2015 at 10:09 AM, Kuninori Morimoto
>> <kuninori.morimoto.gx@renesas.com> wrote:
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvatorx.dts
>>> @@ -0,0 +1,36 @@
>>
>>> +       aliases {
>>> +               serial0 = &scif2;
>>
>> Mapping 0 to 2?
>
> I recall that "serial0" is supposed to be used for the first serial
> port on the board. On older kernels we used a 1:1 mapping between the
> scif index and the serial index, but not anymore. I may be wrong
> though. And if I'm right then marzen needs to be fixed.

Right, so we're gonna switch to that scheme for new (and old "unstable") boards.

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
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
index 6aeefd9..255c957 100644
--- a/arch/arm64/boot/dts/renesas/Makefile
+++ b/arch/arm64/boot/dts/renesas/Makefile
@@ -1,4 +1,4 @@ 
-dtb-$(CONFIG_ARCH_RCAR_GEN3) +=
+dtb-$(CONFIG_ARCH_RCAR_GEN3) += r8a7795-salvatorx.dtb
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvatorx.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvatorx.dts
new file mode 100644
index 0000000..1b277cb
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvatorx.dts
@@ -0,0 +1,36 @@ 
+/*
+ * Device Tree Source for the SalvatorX board
+ *
+ * Copyright (C) 2015 Renesas Electronics Corp.
+ *
+ * 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 "r8a7795.dtsi"
+
+/ {
+	model = "Renesas SalvatorX board based on r8a7795";
+	compatible = "renesas,salvatorx", "renesas,r8a7795";
+
+	aliases {
+		serial0 = &scif2;
+	};
+
+	chosen {
+		bootargs = "console=ttySC0,115200";
+		stdout-path = &scif2;
+	};
+
+	memory@48000000 {
+		device_type = "memory";
+		/* first 128MB is reserved for secure area. */
+		reg = <0x0 0x48000000 0x0 0x38000000>;
+	};
+};
+
+&scif2 {
+	status = "okay";
+};