public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 10/11] arm64: dts: renesas: initial Eagle board device tree
@ 2017-09-12 20:37 Sergei Shtylyov
  2017-09-12 21:19 ` Sergei Shtylyov
  0 siblings, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2017-09-12 20:37 UTC (permalink / raw)
  To: linux-arm-kernel

Add the initial device  tree for  the R8A77970 SoC based Eagle board.
The board has 1 debug serial port (SCIF0); include support for it,
so that the serial console can work.

Based on the original (and large) patch by Vladimir Barinov
<vladimir.barinov@cogentembedded.com>.

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 arch/arm64/boot/dts/renesas/Makefile           |    1 
 arch/arm64/boot/dts/renesas/r8a77970-eagle.dts |   45 +++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

Index: renesas/arch/arm64/boot/dts/renesas/Makefile
===================================================================
--- renesas.orig/arch/arm64/boot/dts/renesas/Makefile
+++ renesas/arch/arm64/boot/dts/renesas/Makefile
@@ -2,6 +2,7 @@ dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-sa
 dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-xs.dtb
 dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-es1-salvator-x.dtb r8a7795-es1-h3ulcb.dtb
 dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-x.dtb r8a7796-m3ulcb.dtb
+dtb-$(CONFIG_ARCH_R8A77970) += r8a77970-eagle.dtb
 dtb-$(CONFIG_ARCH_R8A77995) += r8a77995-draak.dtb
 
 always		:= $(dtb-y)
Index: renesas/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
===================================================================
--- /dev/null
+++ renesas/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
@@ -0,0 +1,45 @@
+/*
+ * Device Tree Source for the Eagle board
+ *
+ * Copyright (C) 2016-2017 Renesas Electronics Corp.
+ * Copyright (C) 2017 Cogent Embedded, Inc.
+ *
+ * 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 "r8a77970.dtsi"
+
+/ {
+	model = "Renesas Eagle board based on r8a77970";
+	compatible = "renesas,eagle", "renesas,r8a77970";
+
+	aliases {
+		serial0 = &scif0;
+	};
+
+	chosen {
+		bootargs = "ignore_loglevel";
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory at 48000000 {
+		device_type = "memory";
+		/* first 128MB is reserved for secure area. */
+		reg = <0x0 0x48000000 0x0 0x38000000>;
+	};
+};
+
+&extal_clk {
+	clock-frequency = <16666666>;
+};
+
+&extalr_clk {
+	clock-frequency = <32768>;
+};
+
+&scif0 {
+	status = "okay";
+};

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 10/11] arm64: dts: renesas: initial Eagle board device tree
  2017-09-12 20:37 [PATCH 10/11] arm64: dts: renesas: initial Eagle board device tree Sergei Shtylyov
@ 2017-09-12 21:19 ` Sergei Shtylyov
  2017-09-15 17:28   ` Sergei Shtylyov
  0 siblings, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2017-09-12 21:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/12/2017 11:37 PM, Sergei Shtylyov wrote:

> Add the initial device  tree for  the R8A77970 SoC based Eagle board.
> The board has 1 debug serial port (SCIF0); include support for it,
> so that the serial console can work.
> 
> Based on the original (and large) patch by Vladimir Barinov
> <vladimir.barinov@cogentembedded.com>.
> 
> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
[...]
> Index: renesas/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
> ===================================================================
> --- /dev/null
> +++ renesas/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
> @@ -0,0 +1,45 @@
[...]
> +&extal_clk {
> +	clock-frequency = <16666666>;
> +};
> +
> +&extalr_clk {
> +	clock-frequency = <32768>;
> +};
> +

    Forgot to specify SCIF_CLK -- it's populated.

> +&scif0 {
> +	status = "okay";
> +};

MBR, Sergei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 10/11] arm64: dts: renesas: initial Eagle board device tree
  2017-09-12 21:19 ` Sergei Shtylyov
@ 2017-09-15 17:28   ` Sergei Shtylyov
  2017-09-15 18:44     ` Geert Uytterhoeven
  0 siblings, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2017-09-15 17:28 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/13/2017 12:19 AM, Sergei Shtylyov wrote:

>> Add the initial device  tree for  the R8A77970 SoC based Eagle board.
>> The board has 1 debug serial port (SCIF0); include support for it,
>> so that the serial console can work.
>>
>> Based on the original (and large) patch by Vladimir Barinov
>> <vladimir.barinov@cogentembedded.com>.
>>
>> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>
> [...]
>> Index: renesas/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
>> ===================================================================
>> --- /dev/null
>> +++ renesas/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
>> @@ -0,0 +1,45 @@
> [...]
>> +&extal_clk {
>> +    clock-frequency = <16666666>;
>> +};
>> +
>> +&extalr_clk {
>> +    clock-frequency = <32768>;
>> +};
>> +
> 
>     Forgot to specify SCIF_CLK -- it's populated.

    Unfortunately, the kernel hangs after ttySC0 is registered if I specify 
this frequency...

MBR, Sergei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 10/11] arm64: dts: renesas: initial Eagle board device tree
  2017-09-15 17:28   ` Sergei Shtylyov
@ 2017-09-15 18:44     ` Geert Uytterhoeven
  2017-09-15 18:53       ` Sergei Shtylyov
  0 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2017-09-15 18:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sergei,

On Fri, Sep 15, 2017 at 7:28 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> On 09/13/2017 12:19 AM, Sergei Shtylyov wrote:
>>> Add the initial device  tree for  the R8A77970 SoC based Eagle board.
>>> The board has 1 debug serial port (SCIF0); include support for it,
>>> so that the serial console can work.
>>>
>>> Based on the original (and large) patch by Vladimir Barinov
>>> <vladimir.barinov@cogentembedded.com>.
>>>
>>> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>>
>> [...]
>>>
>>> Index: renesas/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
>>> ===================================================================
>>> --- /dev/null
>>> +++ renesas/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
>>> @@ -0,0 +1,45 @@
>>
>> [...]
>>>
>>> +&extal_clk {
>>> +    clock-frequency = <16666666>;
>>> +};
>>> +
>>> +&extalr_clk {
>>> +    clock-frequency = <32768>;
>>> +};
>>> +
>>
>>     Forgot to specify SCIF_CLK -- it's populated.
>
>    Unfortunately, the kernel hangs after ttySC0 is registered if I specify
> this frequency...

Is the crystal populated?

When doing initial bringup of the remote Eagle I have access to, the SCIF
registers didn't indicate SCIF_CLK was being used from U-Boot, while it
is used on R-Car Gen2 boards that have it populated.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 10/11] arm64: dts: renesas: initial Eagle board device tree
  2017-09-15 18:44     ` Geert Uytterhoeven
@ 2017-09-15 18:53       ` Sergei Shtylyov
  2017-09-15 19:00         ` Geert Uytterhoeven
  0 siblings, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2017-09-15 18:53 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/15/2017 09:44 PM, Geert Uytterhoeven wrote:

>>>> Add the initial device  tree for  the R8A77970 SoC based Eagle board.
>>>> The board has 1 debug serial port (SCIF0); include support for it,
>>>> so that the serial console can work.
>>>>
>>>> Based on the original (and large) patch by Vladimir Barinov
>>>> <vladimir.barinov@cogentembedded.com>.
>>>>
>>>> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>>>
>>> [...]
>>>>
>>>> Index: renesas/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
>>>> ===================================================================
>>>> --- /dev/null
>>>> +++ renesas/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
>>>> @@ -0,0 +1,45 @@
>>>
>>> [...]
>>>>
>>>> +&extal_clk {
>>>> +    clock-frequency = <16666666>;
>>>> +};
>>>> +
>>>> +&extalr_clk {
>>>> +    clock-frequency = <32768>;
>>>> +};
>>>> +
>>>
>>>      Forgot to specify SCIF_CLK -- it's populated.
>>
>>     Unfortunately, the kernel hangs after ttySC0 is registered if I specify
>> this frequency...
> 
> Is the crystal populated?

    It should be, with 14.7456MHz chrystal. But it's connected to SCIF_CLK_B 
pin -- perhaps that's the problem...

> When doing initial bringup of the remote Eagle I have access to, the SCIF
> registers didn't indicate SCIF_CLK was being used from U-Boot, while it
> is used on R-Car Gen2 boards that have it populated.

    Perhaps PFC is just not configured properly?

> 
> Gr{oetje,eeting}s,
> 
>                          Geert

MBR, Sergei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 10/11] arm64: dts: renesas: initial Eagle board device tree
  2017-09-15 18:53       ` Sergei Shtylyov
@ 2017-09-15 19:00         ` Geert Uytterhoeven
  0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2017-09-15 19:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sergei,

On Fri, Sep 15, 2017 at 8:53 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> On 09/15/2017 09:44 PM, Geert Uytterhoeven wrote:
>>>>      Forgot to specify SCIF_CLK -- it's populated.
>>>
>>>     Unfortunately, the kernel hangs after ttySC0 is registered if I
>>> specify
>>> this frequency...
>>
>> Is the crystal populated?
>
>    It should be, with 14.7456MHz chrystal. But it's connected to SCIF_CLK_B
> pin -- perhaps that's the problem...
>
>> When doing initial bringup of the remote Eagle I have access to, the SCIF
>> registers didn't indicate SCIF_CLK was being used from U-Boot, while it
>> is used on R-Car Gen2 boards that have it populated.
>
>    Perhaps PFC is just not configured properly?

Plausible.
As there's no PFC driver yet (at least I haven't seen one ;-), you can try
configuring the PFC to use SCIF_CLK_B by writing to the registers
from the U-Boot prompt...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-15 19:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-12 20:37 [PATCH 10/11] arm64: dts: renesas: initial Eagle board device tree Sergei Shtylyov
2017-09-12 21:19 ` Sergei Shtylyov
2017-09-15 17:28   ` Sergei Shtylyov
2017-09-15 18:44     ` Geert Uytterhoeven
2017-09-15 18:53       ` Sergei Shtylyov
2017-09-15 19:00         ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox