2020-10-29 13:48:32

by Eugeniu Rosca

[permalink] [raw]
Subject: [PATCH 1/2] arm64: dts: renesas: r8a77961: Add CAN{0,1} placeholder nodes

With the same background and purpose as described in v4.20-rc1
commit 92bc66bfce99cd ("arm64: dts: renesas: r8a77965: Add CAN{0,1}
placeholder nodes"), add can0 and can1 placeholder nodes.

Signed-off-by: Eugeniu Rosca <[email protected]>
---
arch/arm64/boot/dts/renesas/r8a77961.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77961.dtsi b/arch/arm64/boot/dts/renesas/r8a77961.dtsi
index 1ba30313c8b8..d2a5ea20378f 100644
--- a/arch/arm64/boot/dts/renesas/r8a77961.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77961.dtsi
@@ -1017,6 +1017,16 @@ avb: ethernet@e6800000 {
status = "disabled";
};

+ can0: can@e6c30000 {
+ reg = <0 0xe6c30000 0 0x1000>;
+ /* placeholder */
+ };
+
+ can1: can@e6c38000 {
+ reg = <0 0xe6c38000 0 0x1000>;
+ /* placeholder */
+ };
+
pwm0: pwm@e6e30000 {
compatible = "renesas,pwm-r8a77961", "renesas,pwm-rcar";
reg = <0 0xe6e30000 0 8>;
--
2.29.0


2020-10-29 13:49:37

by Eugeniu Rosca

[permalink] [raw]
Subject: [PATCH 2/2] arm64: dts: renesas: r8a77961: ulcb-kf: Initial device tree

Create a dedicated DTB for M3-ES3.0 + ULCB + Kingfisher combo.
Inspire from the pre-existing ULCB-KF device trees:

$ ls -1 arch/arm64/boot/dts/renesas/*ulcb-kf.dts
arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dts
arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dts
arch/arm64/boot/dts/renesas/r8a77960-ulcb-kf.dts
arch/arm64/boot/dts/renesas/r8a77965-ulcb-kf.dts

Signed-off-by: Eugeniu Rosca <[email protected]>
---
arch/arm64/boot/dts/renesas/Makefile | 1 +
arch/arm64/boot/dts/renesas/r8a77961-ulcb-kf.dts | 15 +++++++++++++++
2 files changed, 16 insertions(+)
create mode 100644 arch/arm64/boot/dts/renesas/r8a77961-ulcb-kf.dts

diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
index dffefe030a76..4215b7023d88 100644
--- a/arch/arm64/boot/dts/renesas/Makefile
+++ b/arch/arm64/boot/dts/renesas/Makefile
@@ -39,6 +39,7 @@ dtb-$(CONFIG_ARCH_R8A77960) += r8a77960-ulcb-kf.dtb

dtb-$(CONFIG_ARCH_R8A77961) += r8a77961-salvator-xs.dtb
dtb-$(CONFIG_ARCH_R8A77961) += r8a77961-ulcb.dtb
+dtb-$(CONFIG_ARCH_R8A77961) += r8a77961-ulcb-kf.dtb

dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-salvator-x.dtb
dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-salvator-xs.dtb
diff --git a/arch/arm64/boot/dts/renesas/r8a77961-ulcb-kf.dts b/arch/arm64/boot/dts/renesas/r8a77961-ulcb-kf.dts
new file mode 100644
index 000000000000..6ec958348eb0
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/r8a77961-ulcb-kf.dts
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the M3ULCB Kingfisher board
+ *
+ * Copyright (C) 2020 Eugeniu Rosca <[email protected]>
+ */
+
+#include "r8a77961-ulcb.dts"
+#include "ulcb-kf.dtsi"
+
+/ {
+ model = "Renesas M3ULCB Kingfisher board based on r8a77961";
+ compatible = "shimafuji,kingfisher", "renesas,m3ulcb",
+ "renesas,r8a77961";
+};
--
2.29.0

2020-10-29 14:11:22

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: renesas: r8a77961: ulcb-kf: Initial device tree

Hi Eugeniu,

On Thu, Oct 29, 2020 at 2:38 PM Eugeniu Rosca <[email protected]> wrote:
> Create a dedicated DTB for M3-ES3.0 + ULCB + Kingfisher combo.
> Inspire from the pre-existing ULCB-KF device trees:
>
> $ ls -1 arch/arm64/boot/dts/renesas/*ulcb-kf.dts
> arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dts
> arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dts
> arch/arm64/boot/dts/renesas/r8a77960-ulcb-kf.dts
> arch/arm64/boot/dts/renesas/r8a77965-ulcb-kf.dts
>
> Signed-off-by: Eugeniu Rosca <[email protected]>

Thanks for your path!

Reviewed-by: Geert Uytterhoeven <[email protected]>
i.e. will queue in renesas-devel for v5.11.

> + compatible = "shimafuji,kingfisher", "renesas,m3ulcb",
> + "renesas,r8a77961";

Can you please send a patch to add this combo to
Documentation/devicetree/bindings/arm/renesas.yaml?
Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2020-10-29 14:11:52

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 1/2] arm64: dts: renesas: r8a77961: Add CAN{0,1} placeholder nodes

On Thu, Oct 29, 2020 at 2:38 PM Eugeniu Rosca <[email protected]> wrote:
> With the same background and purpose as described in v4.20-rc1
> commit 92bc66bfce99cd ("arm64: dts: renesas: r8a77965: Add CAN{0,1}
> placeholder nodes"), add can0 and can1 placeholder nodes.
>
> Signed-off-by: Eugeniu Rosca <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>
i.e. will queue in renesas-devel for v5.11.

Gr{oetje,eeting}s,

Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2020-10-29 16:37:40

by Eugeniu Rosca

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: renesas: r8a77961: ulcb-kf: Initial device tree

Hi Geert,

On Thu, Oct 29, 2020 at 03:09:10PM +0100, Geert Uytterhoeven wrote:
> On Thu, Oct 29, 2020 at 2:38 PM Eugeniu Rosca <[email protected]> wrote:
> > Create a dedicated DTB for M3-ES3.0 + ULCB + Kingfisher combo.
> > Inspire from the pre-existing ULCB-KF device trees:
> >
> > $ ls -1 arch/arm64/boot/dts/renesas/*ulcb-kf.dts
> > arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dts
> > arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dts
> > arch/arm64/boot/dts/renesas/r8a77960-ulcb-kf.dts
> > arch/arm64/boot/dts/renesas/r8a77965-ulcb-kf.dts
> >
> > Signed-off-by: Eugeniu Rosca <[email protected]>
>
> Reviewed-by: Geert Uytterhoeven <[email protected]>
> i.e. will queue in renesas-devel for v5.11.

Thank you for the prompt review!

> > + compatible = "shimafuji,kingfisher", "renesas,m3ulcb",
> > + "renesas,r8a77961";
>
> Can you please send a patch to add this combo to
> Documentation/devicetree/bindings/arm/renesas.yaml?

I would happily do so if you resolve below concerns.

Since the inception of the Kingfisher extension board description in
v4.15-rc1 commit 5418a900412699 ("arm: shmobile: Document Kingfisher
board DT bindings"), nobody attempted describing the SoC+ULCB+KF
combinations in spite of four of such DT configurations being actively
used and maintained, i.e. r8a779{50,51,60,65}-ulcb-kf.

So, if we start documenting the r8a77961-ulcb-kf combo as a board, this
raises below questions:

=> should the missing 4 SoC+ULCB+KF instances be documented as well?
=> should a new compatible string be created for each such HW combo,
e.g. "renesas,<soc>-ulcb-kf"?

I feel none of the above is really needed, based on the patterns
established in Documentation/devicetree/bindings/arm/renesas.yaml,
but I might be wrong. Thoughts/suggestions appreciated.

IMHO one thing which is certainly worth clarifying and fixing is the
KF revision currently documented in renesas.yaml, i.e. M03.

Shimafuji released at least M04, M05 and M06 revisions of KF (nicely
compared at https://elinux.org/R-Car/Boards/Kingfisher#Change_point).

The question is, does the community intend to support M03 through M06
(in which case all of them might need an entry in the documentation) or
anything which is earlier than M06 has to be considered deprecated (in
which case renesas.yaml would need a simple s/M03/M06/ update)?

--
Best regards,
Eugeniu Rosca

2020-10-29 18:25:55

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: renesas: r8a77961: ulcb-kf: Initial device tree

Hi Eugeniu,

On Thu, Oct 29, 2020 at 5:34 PM Eugeniu Rosca <[email protected]> wrote:
> On Thu, Oct 29, 2020 at 03:09:10PM +0100, Geert Uytterhoeven wrote:
> > On Thu, Oct 29, 2020 at 2:38 PM Eugeniu Rosca <[email protected]> wrote:
> > > Create a dedicated DTB for M3-ES3.0 + ULCB + Kingfisher combo.
> > > Inspire from the pre-existing ULCB-KF device trees:
> > >
> > > $ ls -1 arch/arm64/boot/dts/renesas/*ulcb-kf.dts
> > > arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dts
> > > arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dts
> > > arch/arm64/boot/dts/renesas/r8a77960-ulcb-kf.dts
> > > arch/arm64/boot/dts/renesas/r8a77965-ulcb-kf.dts
> > >
> > > Signed-off-by: Eugeniu Rosca <[email protected]>
> >
> > Reviewed-by: Geert Uytterhoeven <[email protected]>
> > i.e. will queue in renesas-devel for v5.11.
>
> Thank you for the prompt review!
>
> > > + compatible = "shimafuji,kingfisher", "renesas,m3ulcb",
> > > + "renesas,r8a77961";
> >
> > Can you please send a patch to add this combo to
> > Documentation/devicetree/bindings/arm/renesas.yaml?
>
> I would happily do so if you resolve below concerns.
>
> Since the inception of the Kingfisher extension board description in
> v4.15-rc1 commit 5418a900412699 ("arm: shmobile: Document Kingfisher
> board DT bindings"), nobody attempted describing the SoC+ULCB+KF
> combinations in spite of four of such DT configurations being actively
> used and maintained, i.e. r8a779{50,51,60,65}-ulcb-kf.

I'm a bit confused. We do have:

- description: Kingfisher (SBEV-RCAR-KF-M03)
items:
- const: shimafuji,kingfisher
- enum:
- renesas,h3ulcb
- renesas,m3ulcb
- renesas,m3nulcb
- enum:
- renesas,r8a7795
- renesas,r8a7796
- renesas,r8a77965

> So, if we start documenting the r8a77961-ulcb-kf combo as a board, this
> raises below questions:
>
> => should the missing 4 SoC+ULCB+KF instances be documented as well?
> => should a new compatible string be created for each such HW combo,
> e.g. "renesas,<soc>-ulcb-kf"?
>
> I feel none of the above is really needed, based on the patterns
> established in Documentation/devicetree/bindings/arm/renesas.yaml,
> but I might be wrong. Thoughts/suggestions appreciated.

I don't think we want to add new compatible string to describe each
combo. Just add "renesas,r8a77961" to the last enum?

> IMHO one thing which is certainly worth clarifying and fixing is the
> KF revision currently documented in renesas.yaml, i.e. M03.
>
> Shimafuji released at least M04, M05 and M06 revisions of KF (nicely
> compared at https://elinux.org/R-Car/Boards/Kingfisher#Change_point).
>
> The question is, does the community intend to support M03 through M06
> (in which case all of them might need an entry in the documentation) or
> anything which is earlier than M06 has to be considered deprecated (in
> which case renesas.yaml would need a simple s/M03/M06/ update)?

I'm not that familiar with KingFisher and the various revisions.
Do these differences have an impact on the software side?
The diodes and filters probably don't.
The I2C repeaters are PCA9548ADB on M03, hence they use a Linux
driver. By what have they been replaced?
What's the nature of the MOST ↔ GPS Function select register change?

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2020-10-30 09:10:15

by Eugeniu Rosca

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: renesas: r8a77961: ulcb-kf: Initial device tree

Hi Geert,

On Thu, Oct 29, 2020 at 07:23:53PM +0100, Geert Uytterhoeven wrote:
> On Thu, Oct 29, 2020 at 5:34 PM Eugeniu Rosca <[email protected]> wrote:

[..]

> I don't think we want to add new compatible string to describe each
> combo. Just add "renesas,r8a77961" to the last enum?

I'm afraid I misinterpreted your request. I've pushed your proposal to
https://lore.kernel.org/linux-renesas-soc/[email protected]/

> > IMHO one thing which is certainly worth clarifying and fixing is the
> > KF revision currently documented in renesas.yaml, i.e. M03.
> >
> > Shimafuji released at least M04, M05 and M06 revisions of KF (nicely
> > compared at https://elinux.org/R-Car/Boards/Kingfisher#Change_point).
> >
> > The question is, does the community intend to support M03 through M06
> > (in which case all of them might need an entry in the documentation) or
> > anything which is earlier than M06 has to be considered deprecated (in
> > which case renesas.yaml would need a simple s/M03/M06/ update)?
>
> I'm not that familiar with KingFisher and the various revisions.
> Do these differences have an impact on the software side?
> The diodes and filters probably don't.

I personally no longer use KF M03, since its major limitation is not
being able to update the contents of Hyperflash using Lauterbach if
ULCB is stacked on the expansion board (unplugging ULCB each time
it is flashed is absolutely not practical).

I've heard from audio engineers that recent revisions are more suitable
for audio use-cases, but I don't know the full details.

> The I2C repeaters are PCA9548ADB on M03, hence they use a Linux
> driver. By what have they been replaced?
> What's the nature of the MOST ↔ GPS Function select register change?

I will try to collect more information and, if I succeed, I will come
back with feedback. Thank you for your patience.

--
Best regards,
Eugeniu Rosca

2020-10-30 09:16:06

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: renesas: r8a77961: ulcb-kf: Initial device tree

Hi Eugeniu,

On Fri, Oct 30, 2020 at 10:07 AM Eugeniu Rosca <[email protected]> wrote:
> On Thu, Oct 29, 2020 at 07:23:53PM +0100, Geert Uytterhoeven wrote:
> > On Thu, Oct 29, 2020 at 5:34 PM Eugeniu Rosca <[email protected]> wrote:
>
> [..]
>
> > I don't think we want to add new compatible string to describe each
> > combo. Just add "renesas,r8a77961" to the last enum?
>
> I'm afraid I misinterpreted your request. I've pushed your proposal to
> https://lore.kernel.org/linux-renesas-soc/[email protected]/

Thanks, got it!

> > > IMHO one thing which is certainly worth clarifying and fixing is the
> > > KF revision currently documented in renesas.yaml, i.e. M03.
> > >
> > > Shimafuji released at least M04, M05 and M06 revisions of KF (nicely
> > > compared at https://elinux.org/R-Car/Boards/Kingfisher#Change_point).
> > >
> > > The question is, does the community intend to support M03 through M06
> > > (in which case all of them might need an entry in the documentation) or
> > > anything which is earlier than M06 has to be considered deprecated (in
> > > which case renesas.yaml would need a simple s/M03/M06/ update)?
> >
> > I'm not that familiar with KingFisher and the various revisions.
> > Do these differences have an impact on the software side?
> > The diodes and filters probably don't.
>
> I personally no longer use KF M03, since its major limitation is not
> being able to update the contents of Hyperflash using Lauterbach if
> ULCB is stacked on the expansion board (unplugging ULCB each time
> it is flashed is absolutely not practical).

Note that if you build ATF with RCAR_RPC_HYPERFLASH_LOCKED=0,
you can access HF from U-Boot or Linux.

> I've heard from audio engineers that recent revisions are more suitable
> for audio use-cases, but I don't know the full details.
>
> > The I2C repeaters are PCA9548ADB on M03, hence they use a Linux
> > driver. By what have they been replaced?
> > What's the nature of the MOST ↔ GPS Function select register change?
>
> I will try to collect more information and, if I succeed, I will come
> back with feedback. Thank you for your patience.

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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