diff mbox

[v3,2/3] arm64: dts: r8a7795: salvator-x: Add support for R-Car H3 ES2.0

Message ID 1494503934-23367-3-git-send-email-geert+renesas@glider.be (mailing list archive)
State Superseded
Delegated to: Simon Horman
Headers show

Commit Message

Geert Uytterhoeven May 11, 2017, 11:58 a.m. UTC
Split off support for Salvator-X boards with the ES1.x revision of the
R-Car H3 SoC into a separate file.  The main r8a7795-salvator-x.dts file
now corresponds to Salvator-X with R-Car H3 ES2.0 or later.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - Rebase on top of common Salvator-X board support extraction,

v2:
  - Use a separate file for ES1.x instead of for ES2.0, so
    r8a7795-salvator-x.dts always corresponds to the board with the
    latest SoC revision,
  - Add a dash between SoC part number and revision, for compatibility
    with the BSP,
  - Enhance the hardware description from basic support to everything
    already supported on ES1.x.
---
 arch/arm64/boot/dts/renesas/Makefile                                  | 1 +
 .../renesas/{r8a7795-salvator-x.dts => r8a7795-es1-salvator-x.dts}    | 0
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts                    | 4 ++--
 3 files changed, 3 insertions(+), 2 deletions(-)
 copy arch/arm64/boot/dts/renesas/{r8a7795-salvator-x.dts => r8a7795-es1-salvator-x.dts} (100%)

Comments

Simon Horman May 11, 2017, 2:53 p.m. UTC | #1
On Thu, May 11, 2017 at 01:58:53PM +0200, Geert Uytterhoeven wrote:
> Split off support for Salvator-X boards with the ES1.x revision of the
> R-Car H3 SoC into a separate file.  The main r8a7795-salvator-x.dts file
> now corresponds to Salvator-X with R-Car H3 ES2.0 or later.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v3:
>   - Rebase on top of common Salvator-X board support extraction,
> 
> v2:
>   - Use a separate file for ES1.x instead of for ES2.0, so
>     r8a7795-salvator-x.dts always corresponds to the board with the
>     latest SoC revision,
>   - Add a dash between SoC part number and revision, for compatibility
>     with the BSP,
>   - Enhance the hardware description from basic support to everything
>     already supported on ES1.x.
> ---
>  arch/arm64/boot/dts/renesas/Makefile                                  | 1 +
>  .../renesas/{r8a7795-salvator-x.dts => r8a7795-es1-salvator-x.dts}    | 0
>  arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts                    | 4 ++--
>  3 files changed, 3 insertions(+), 2 deletions(-)
>  copy arch/arm64/boot/dts/renesas/{r8a7795-salvator-x.dts => r8a7795-es1-salvator-x.dts} (100%)
> 
> diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
> index 1618e0a3c81d48bd..b6c723d8f6875f2d 100644
> --- a/arch/arm64/boot/dts/renesas/Makefile
> +++ b/arch/arm64/boot/dts/renesas/Makefile
> @@ -1,4 +1,5 @@
>  dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-x.dtb r8a7795-h3ulcb.dtb
> +dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-es1-salvator-x.dtb

Probably this was already discussed but I wonder if there is any value
in a CONFIG_ARCH_R8A7795_ES1 Kconfig symbol to allow more fine grained
control over what is compiled into the kernel.

>  dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-x.dtb r8a7796-m3ulcb.dtb
>  
>  always		:= $(dtb-y)
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
> similarity index 100%
> copy from arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> copy to arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> index be5b2e966ea1700e..fc26909dfa47b61f 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> @@ -11,11 +11,11 @@
>  #define CPG_AUDIO_CLK_I		R8A7795_CLK_S0D4
>  
>  /dts-v1/;
> -#include "r8a7795-es1.dtsi"
> +#include "r8a7795.dtsi"
>  #include "salvator-x.dtsi"
>  
>  / {
> -	model = "Renesas Salvator-X board based on r8a7795 ES1.x";
> +	model = "Renesas Salvator-X board based on r8a7795 ES2.0+";
>  	compatible = "renesas,salvator-x", "renesas,r8a7795";
>  
>  	memory@48000000 {
> -- 
> 2.7.4
>
Geert Uytterhoeven May 11, 2017, 3:18 p.m. UTC | #2
Hi Simon,

On Thu, May 11, 2017 at 4:53 PM, Simon Horman <horms@verge.net.au> wrote:
> On Thu, May 11, 2017 at 01:58:53PM +0200, Geert Uytterhoeven wrote:
>> Split off support for Salvator-X boards with the ES1.x revision of the
>> R-Car H3 SoC into a separate file.  The main r8a7795-salvator-x.dts file
>> now corresponds to Salvator-X with R-Car H3 ES2.0 or later.
>>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

>> --- a/arch/arm64/boot/dts/renesas/Makefile
>> +++ b/arch/arm64/boot/dts/renesas/Makefile
>> @@ -1,4 +1,5 @@
>>  dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-x.dtb r8a7795-h3ulcb.dtb
>> +dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-es1-salvator-x.dtb
>
> Probably this was already discussed but I wonder if there is any value
> in a CONFIG_ARCH_R8A7795_ES1 Kconfig symbol to allow more fine grained
> control over what is compiled into the kernel.

The plan was always to have a single binary supporting both.
So I think it makes sense to have a single DT build (as in both DTBs are
built), too.

Note that if we add and use CONFIG_ARCH_R8A7795_ES1 here, the ES1 DTB will
no longer be always created, making it even harder for people who want to
support multiple kernel versions.

E.g. to pick the correct DTB for Salvator-X with H3 ES1.0, I have the
following in my install script:

    DTB=arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dtb
    if [ ! -e $DTB ]; then
        DTB=arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dtb
    fi

If we change our mind, it means we can/should sprinkle some
"#ifdef CONFIG_ARCH_R8A7795_ES1" checks in the clk/pfc/sysc driver code?

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
Simon Horman May 12, 2017, 7:29 a.m. UTC | #3
On Thu, May 11, 2017 at 05:18:00PM +0200, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Thu, May 11, 2017 at 4:53 PM, Simon Horman <horms@verge.net.au> wrote:
> > On Thu, May 11, 2017 at 01:58:53PM +0200, Geert Uytterhoeven wrote:
> >> Split off support for Salvator-X boards with the ES1.x revision of the
> >> R-Car H3 SoC into a separate file.  The main r8a7795-salvator-x.dts file
> >> now corresponds to Salvator-X with R-Car H3 ES2.0 or later.
> >>
> >> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> >> --- a/arch/arm64/boot/dts/renesas/Makefile
> >> +++ b/arch/arm64/boot/dts/renesas/Makefile
> >> @@ -1,4 +1,5 @@
> >>  dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-x.dtb r8a7795-h3ulcb.dtb
> >> +dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-es1-salvator-x.dtb
> >
> > Probably this was already discussed but I wonder if there is any value
> > in a CONFIG_ARCH_R8A7795_ES1 Kconfig symbol to allow more fine grained
> > control over what is compiled into the kernel.
> 
> The plan was always to have a single binary supporting both.
> So I think it makes sense to have a single DT build (as in both DTBs are
> built), too.
> 
> Note that if we add and use CONFIG_ARCH_R8A7795_ES1 here, the ES1 DTB will
> no longer be always created, making it even harder for people who want to
> support multiple kernel versions.
> 
> E.g. to pick the correct DTB for Salvator-X with H3 ES1.0, I have the
> following in my install script:
> 
>     DTB=arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dtb
>     if [ ! -e $DTB ]; then
>         DTB=arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dtb
>     fi
> 
> If we change our mind, it means we can/should sprinkle some
> "#ifdef CONFIG_ARCH_R8A7795_ES1" checks in the clk/pfc/sysc driver code?

Maybe it would.

Thanks for your explanation above. I think it reasonable to leave things
as-is and not introduce CONFIG_ARCH_R8A7795_ES1 for now.
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
index 1618e0a3c81d48bd..b6c723d8f6875f2d 100644
--- a/arch/arm64/boot/dts/renesas/Makefile
+++ b/arch/arm64/boot/dts/renesas/Makefile
@@ -1,4 +1,5 @@ 
 dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-x.dtb r8a7795-h3ulcb.dtb
+dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-es1-salvator-x.dtb
 dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-x.dtb r8a7796-m3ulcb.dtb
 
 always		:= $(dtb-y)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
similarity index 100%
copy from arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
copy to arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index be5b2e966ea1700e..fc26909dfa47b61f 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -11,11 +11,11 @@ 
 #define CPG_AUDIO_CLK_I		R8A7795_CLK_S0D4
 
 /dts-v1/;
-#include "r8a7795-es1.dtsi"
+#include "r8a7795.dtsi"
 #include "salvator-x.dtsi"
 
 / {
-	model = "Renesas Salvator-X board based on r8a7795 ES1.x";
+	model = "Renesas Salvator-X board based on r8a7795 ES2.0+";
 	compatible = "renesas,salvator-x", "renesas,r8a7795";
 
 	memory@48000000 {