mbox series

[V2,0/2,RESEND] Add DTS for NanoPi R2S Plus

Message ID 20240801175736.16591-1-jin@mediatomb.cc (mailing list archive)
Headers show
Series Add DTS for NanoPi R2S Plus | expand

Message

Sergey 'Jin' Bostandzhyan Aug. 1, 2024, 5:57 p.m. UTC
Hi,

as requested, I am resending the patch series, now with hopefully all
relevant addresses on To/Cc.

I noticed, that a DTS for the R2S Plus is not yet available, while the
R2S is already there. The only difference is, that the Plus version has an
eMMC, so we can reuse the R2S definitions and only add an eMMC block, which
I copied from the DTS in the friendlyarm/uboot-rockchip repo.

I applied the same DTS changes to u-boot and tested u-boot 2024.04 with
kernel 6.6.35 on an R2S Plus which I have here and the eMMC became visible
and usable.

Kind regards,
Sergey


Sergey Bostandzhyan (2):
  arm64: dts: rockchip: Add DTS for FriendlyARM NanoPi R2S Plus
  dt-bindings: arm: rockchip: Add NanoPi R2S Plus

 .../devicetree/bindings/arm/rockchip.yaml     |  1 +
 arch/arm64/boot/dts/rockchip/Makefile         |  1 +
 .../dts/rockchip/rk3328-nanopi-r2s-plus.dts   | 31 +++++++++++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts

Comments

Heiko Stübner Aug. 1, 2024, 9:22 p.m. UTC | #1
Hi Sergey,

Am Donnerstag, 1. August 2024, 19:57:34 CEST schrieb Sergey Bostandzhyan:
> Hi,
> 
> as requested, I am resending the patch series, now with hopefully all
> relevant addresses on To/Cc.
> 
> I noticed, that a DTS for the R2S Plus is not yet available, while the
> R2S is already there. The only difference is, that the Plus version has an
> eMMC, so we can reuse the R2S definitions and only add an eMMC block, which
> I copied from the DTS in the friendlyarm/uboot-rockchip repo.
> 
> I applied the same DTS changes to u-boot and tested u-boot 2024.04 with
> kernel 6.6.35 on an R2S Plus which I have here and the eMMC became visible
> and usable.

general remark, please don't send new versions as threaded replies to old
versions. The normal case for git-send-email is to create a new thread
and this continuing inside the old thread confues tooling.

And it's hard to follow too.

Though hopefully the binding might still get an Ack from the dt-maintainers
so I guess don't resend just now :-)


Thanks
Heiko
Bjoern A. Zeeb Aug. 2, 2024, 9:46 a.m. UTC | #2
On Thu, 1 Aug 2024, Sergey Bostandzhyan wrote:

> Hi,
>
> as requested, I am resending the patch series, now with hopefully all
> relevant addresses on To/Cc.
>
> I noticed, that a DTS for the R2S Plus is not yet available, while the
> R2S is already there. The only difference is, that the Plus version has an
> eMMC, so we can reuse the R2S definitions and only add an eMMC block, which
> I copied from the DTS in the friendlyarm/uboot-rockchip repo.

The original has a
 	// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

please don't lose the OR MIT as other projects outside Linux do use the
same dts files;  and the original r2s file also preserved it.
Sergey 'Jin' Bostandzhyan Aug. 2, 2024, 10:04 a.m. UTC | #3
Hi,

On Fri, Aug 02, 2024 at 09:46:40AM +0000, Bjoern A. Zeeb wrote:
> >I noticed, that a DTS for the R2S Plus is not yet available, while the
> >R2S is already there. The only difference is, that the Plus version has an
> >eMMC, so we can reuse the R2S definitions and only add an eMMC block, which
> >I copied from the DTS in the friendlyarm/uboot-rockchip repo.
> 
> The original has a
> 	// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> 
> please don't lose the OR MIT as other projects outside Linux do use the
> same dts files;  and the original r2s file also preserved it.

Uhm... I am confused now, I copy-pasted the emmc block from this file:
https://github.com/friendlyarm/uboot-rockchip/blob/nanopi4-v2017.09/arch/arm/dts/rk3328-nanopi-r2.dts#L7

The header does not have the "OR MIT" in there, it's just
"SPDX-License-Identifier:     GPL-2.0+" which is what I also copied
over, together with the (c) part.

The source which I was using is described in the commit message:

The eMMC configuration for the DTS has been extracted and copied from
rk3328-nanopi-r2.dts, v2017.09 branch from the friendlyarm/uboot-rockchip 
repository.

Maybe you looked at a different branch? Shall I still add the "OR
MIT" or leave it as in the original file which I copied it from?

Kind regards,
Sergey
Bjoern A. Zeeb Aug. 2, 2024, 1:57 p.m. UTC | #4
On Fri, 2 Aug 2024, Sergey 'Jin' Bostandzhyan wrote:

> Hi,
>
> On Fri, Aug 02, 2024 at 09:46:40AM +0000, Bjoern A. Zeeb wrote:
>>> I noticed, that a DTS for the R2S Plus is not yet available, while the
>>> R2S is already there. The only difference is, that the Plus version has an
>>> eMMC, so we can reuse the R2S definitions and only add an eMMC block, which
>>> I copied from the DTS in the friendlyarm/uboot-rockchip repo.
>>
>> The original has a
>> 	// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>
>> please don't lose the OR MIT as other projects outside Linux do use the
>> same dts files;  and the original r2s file also preserved it.
>
> Uhm... I am confused now, I copy-pasted the emmc block from this file:
> https://github.com/friendlyarm/uboot-rockchip/blob/nanopi4-v2017.09/arch/arm/dts/rk3328-nanopi-r2.dts#L7
>
> The header does not have the "OR MIT" in there, it's just
> "SPDX-License-Identifier:     GPL-2.0+" which is what I also copied
> over, together with the (c) part.
>
> The source which I was using is described in the commit message:
>
> The eMMC configuration for the DTS has been extracted and copied from
> rk3328-nanopi-r2.dts, v2017.09 branch from the friendlyarm/uboot-rockchip
> repository.
>
> Maybe you looked at a different branch? Shall I still add the "OR
> MIT" or leave it as in the original file which I copied it from?

That explains also why there's no sdmmc_ext/sdio bits...

See here for more:
https://github.com/friendlyarm/kernel-rockchip/blob/nanopi-r2-v6.1.y/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2-rev24.dts

My current believe is that rockchip/rk3328.dtsi needs the additional
 	sdmmc_ext: mmc@ff5f0000

block and the vendor setting for rk3328-nanopi-r2s-plus.dts
needs like:
        aliases {
                mmc0 = &sdmmc;
                mmc1 = &sdmmcext;
                mmc2 = &emmc;
        };

and also need

+&emmc {
+&sdmmc {
+&sdmmc_ext {
+&sdmmc0ext_clk {
+&sdmmc0ext_cmd {
+&sdmmc0ext_bus4 {
+&sdio_pwrseq {

but I don't do Linux a lot so I don't know the current state of art for
6.11 for each of the values there (I assume some need tweaking and
cleanup).

/bz
Diederik de Haas Aug. 2, 2024, 2:19 p.m. UTC | #5
On Friday, 2 August 2024 15:57:26 CEST Bjoern A. Zeeb wrote:
> Uhm... I am confused now, I copy-pasted the emmc block from this file:
> > https://github.com/friendlyarm/uboot-rockchip/blob/nanopi4-v2017.09/arch/a
> > rm/dts/rk3328-nanopi-r2.dts#L7
> > 
> > The header does not have the "OR MIT" in there, it's just
> > "SPDX-License-Identifier:     GPL-2.0+" which is what I also copied
> > over, together with the (c) part.
> > 
> > The source which I was using is described in the commit message:
> > 
> > The eMMC configuration for the DTS has been extracted and copied from
> > rk3328-nanopi-r2.dts, v2017.09 branch from the friendlyarm/uboot-rockchip
> > repository.
> > 
> > Maybe you looked at a different branch? Shall I still add the "OR
> > MIT" or leave it as in the original file which I copied it from?
> 
> That explains also why there's no sdmmc_ext/sdio bits...
> 
> See here for more:
> https://github.com/friendlyarm/kernel-rockchip/blob/nanopi-r2-v6.1.y/arch/ar
> m64/boot/dts/rockchip/rk3328-nanopi-r2-rev24.dts
> 
> My current believe is that rockchip/rk3328.dtsi needs the additional
>         sdmmc_ext: mmc@ff5f0000

A commit with that was recently accepted:
https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/commit/?h=v6.12-armsoc/dts64&id=82e3aaae388199a0aff33e5371db307b3274f77a
Rob Herring (Arm) Aug. 5, 2024, 3 p.m. UTC | #6
On Thu, 01 Aug 2024 17:57:34 +0000, Sergey Bostandzhyan wrote:
> Hi,
> 
> as requested, I am resending the patch series, now with hopefully all
> relevant addresses on To/Cc.
> 
> I noticed, that a DTS for the R2S Plus is not yet available, while the
> R2S is already there. The only difference is, that the Plus version has an
> eMMC, so we can reuse the R2S definitions and only add an eMMC block, which
> I copied from the DTS in the friendlyarm/uboot-rockchip repo.
> 
> I applied the same DTS changes to u-boot and tested u-boot 2024.04 with
> kernel 6.6.35 on an R2S Plus which I have here and the eMMC became visible
> and usable.
> 
> Kind regards,
> Sergey
> 
> 
> Sergey Bostandzhyan (2):
>   arm64: dts: rockchip: Add DTS for FriendlyARM NanoPi R2S Plus
>   dt-bindings: arm: rockchip: Add NanoPi R2S Plus
> 
>  .../devicetree/bindings/arm/rockchip.yaml     |  1 +
>  arch/arm64/boot/dts/rockchip/Makefile         |  1 +
>  .../dts/rockchip/rk3328-nanopi-r2s-plus.dts   | 31 +++++++++++++++++++
>  3 files changed, 33 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
> 
> --
> 2.20.1
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y rockchip/rk3328-nanopi-r2s-plus.dtb' for 20240801175736.16591-1-jin@mediatomb.cc:

arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dtb: hdmi@ff3c0000: interrupts: [[0, 35, 4], [0, 71, 4]] is too long
	from schema $id: http://devicetree.org/schemas/display/rockchip/rockchip,dw-hdmi.yaml#
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dtb: /phy@ff430000: failed to match any schema with compatible: ['rockchip,rk3328-hdmi-phy']
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dtb: /clock-controller@ff440000: failed to match any schema with compatible: ['rockchip,rk3328-cru', 'rockchip,cru', 'syscon']
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dtb: /clock-controller@ff440000: failed to match any schema with compatible: ['rockchip,rk3328-cru', 'rockchip,cru', 'syscon']
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dtb: mmc@ff520000: Unevaluated properties are not allowed ('num-slots', 'supports-emmc' were unexpected)
	from schema $id: http://devicetree.org/schemas/mmc/rockchip-dw-mshc.yaml#