diff mbox series

[PATCHv8,7/7] arm64: dts: rockchip: Add rock-5b board

Message ID 20230109155801.51642-8-sebastian.reichel@collabora.com (mailing list archive)
State New, archived
Headers show
Series Initial rk3588 DT | expand

Commit Message

Sebastian Reichel Jan. 9, 2023, 3:58 p.m. UTC
From: Christopher Obbard <chris.obbard@collabora.com>

Add board file for the RK3588 Rock 5B board. This is a basic
implementation which just brings up the eMMC and UART which is
enough to successfully boot Linux.

The ethernet controller is connected via PCIe so support will
come in a follow-up patch.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 arch/arm64/boot/dts/rockchip/Makefile         |  1 +
 .../boot/dts/rockchip/rk3588-rock-5b.dts      | 44 +++++++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts

Comments

Jagan Teki Jan. 10, 2023, 2 p.m. UTC | #1
On Mon, 9 Jan 2023 at 21:28, Sebastian Reichel
<sebastian.reichel@collabora.com> wrote:
>
> From: Christopher Obbard <chris.obbard@collabora.com>
>
> Add board file for the RK3588 Rock 5B board. This is a basic
> implementation which just brings up the eMMC and UART which is
> enough to successfully boot Linux.
>
> The ethernet controller is connected via PCIe so support will
> come in a follow-up patch.
>
> Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
> Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
>  arch/arm64/boot/dts/rockchip/Makefile         |  1 +
>  .../boot/dts/rockchip/rk3588-rock-5b.dts      | 44 +++++++++++++++++++
>  2 files changed, 45 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
>
> diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
> index 87a853435142..c5bdd0176ce0 100644
> --- a/arch/arm64/boot/dts/rockchip/Makefile
> +++ b/arch/arm64/boot/dts/rockchip/Makefile
> @@ -83,4 +83,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
>  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb
>  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
>  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb1-v10.dtb
> +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b.dtb
>  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> new file mode 100644
> index 000000000000..d2f1e963ce06
> --- /dev/null
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> @@ -0,0 +1,44 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +
> +/dts-v1/;
> +
> +#include "rk3588.dtsi"
> +
> +/ {
> +       model = "Radxa ROCK 5 Model B";
> +       compatible = "radxa,rock-5b", "rockchip,rk3588";
> +
> +       aliases {
> +               mmc1 = &sdhci;

I think sdhci - emmc has to be mmc0 due to boot priority.

Jagan.
Christopher Obbard Jan. 10, 2023, 2:50 p.m. UTC | #2
On Tue, 2023-01-10 at 19:30 +0530, Jagan Teki wrote:
> On Mon, 9 Jan 2023 at 21:28, Sebastian Reichel
> <sebastian.reichel@collabora.com> wrote:
> > 
> > From: Christopher Obbard <chris.obbard@collabora.com>
> > 
> > Add board file for the RK3588 Rock 5B board. This is a basic
> > implementation which just brings up the eMMC and UART which is
> > enough to successfully boot Linux.
> > 
> > The ethernet controller is connected via PCIe so support will
> > come in a follow-up patch.
> > 
> > Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
> > Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
> > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> > ---
> >  arch/arm64/boot/dts/rockchip/Makefile         |  1 +
> >  .../boot/dts/rockchip/rk3588-rock-5b.dts      | 44
> > +++++++++++++++++++
> >  2 files changed, 45 insertions(+)
> >  create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > 
> > diff --git a/arch/arm64/boot/dts/rockchip/Makefile
> > b/arch/arm64/boot/dts/rockchip/Makefile
> > index 87a853435142..c5bdd0176ce0 100644
> > --- a/arch/arm64/boot/dts/rockchip/Makefile
> > +++ b/arch/arm64/boot/dts/rockchip/Makefile
> > @@ -83,4 +83,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-
> > v10.dtb
> >  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb
> >  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
> >  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb1-v10.dtb
> > +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b.dtb
> >  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > new file mode 100644
> > index 000000000000..d2f1e963ce06
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > @@ -0,0 +1,44 @@
> > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > +
> > +/dts-v1/;
> > +
> > +#include "rk3588.dtsi"
> > +
> > +/ {
> > +       model = "Radxa ROCK 5 Model B";
> > +       compatible = "radxa,rock-5b", "rockchip,rk3588";
> > +
> > +       aliases {
> > +               mmc1 = &sdhci;
> 
> I think sdhci - emmc has to be mmc0 due to boot priority.

Hi Jagan,

We kept eMMC as mmc1 for both ROCK 5 Model A and B to keep
compatibility with vendor kernel:
https://github.com/radxa/kernel/blob/stable-5.10-rock5/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts#L31

But I am happy to change the alias to mmc0, @Sebastian what do you
think?

Thanks
Chris
Heiko Stuebner Jan. 10, 2023, 3:07 p.m. UTC | #3
Am Dienstag, 10. Januar 2023, 15:50:17 CET schrieb Christopher Obbard:
> On Tue, 2023-01-10 at 19:30 +0530, Jagan Teki wrote:
> > On Mon, 9 Jan 2023 at 21:28, Sebastian Reichel
> > <sebastian.reichel@collabora.com> wrote:
> > > 
> > > From: Christopher Obbard <chris.obbard@collabora.com>
> > > 
> > > Add board file for the RK3588 Rock 5B board. This is a basic
> > > implementation which just brings up the eMMC and UART which is
> > > enough to successfully boot Linux.
> > > 
> > > The ethernet controller is connected via PCIe so support will
> > > come in a follow-up patch.
> > > 
> > > Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
> > > Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
> > > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> > > ---
> > >  arch/arm64/boot/dts/rockchip/Makefile         |  1 +
> > >  .../boot/dts/rockchip/rk3588-rock-5b.dts      | 44
> > > +++++++++++++++++++
> > >  2 files changed, 45 insertions(+)
> > >  create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > > 
> > > diff --git a/arch/arm64/boot/dts/rockchip/Makefile
> > > b/arch/arm64/boot/dts/rockchip/Makefile
> > > index 87a853435142..c5bdd0176ce0 100644
> > > --- a/arch/arm64/boot/dts/rockchip/Makefile
> > > +++ b/arch/arm64/boot/dts/rockchip/Makefile
> > > @@ -83,4 +83,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-
> > > v10.dtb
> > >  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb
> > >  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
> > >  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb1-v10.dtb
> > > +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b.dtb
> > >  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb
> > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > > b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > > new file mode 100644
> > > index 000000000000..d2f1e963ce06
> > > --- /dev/null
> > > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > > @@ -0,0 +1,44 @@
> > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > > +
> > > +/dts-v1/;
> > > +
> > > +#include "rk3588.dtsi"
> > > +
> > > +/ {
> > > +       model = "Radxa ROCK 5 Model B";
> > > +       compatible = "radxa,rock-5b", "rockchip,rk3588";
> > > +
> > > +       aliases {
> > > +               mmc1 = &sdhci;
> > 
> > I think sdhci - emmc has to be mmc0 due to boot priority.
> 
> Hi Jagan,
> 
> We kept eMMC as mmc1 for both ROCK 5 Model A and B to keep
> compatibility with vendor kernel:
> https://github.com/radxa/kernel/blob/stable-5.10-rock5/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts#L31
> 
> But I am happy to change the alias to mmc0, @Sebastian what do you
> think?

In any case, if you decide to swap things around, please just send a follow
up patch, as I just applied this series :-)


Heiko
Sebastian Reichel Jan. 10, 2023, 3:26 p.m. UTC | #4
Hi,

On Tue, Jan 10, 2023 at 04:07:46PM +0100, Heiko Stübner wrote:
> Am Dienstag, 10. Januar 2023, 15:50:17 CET schrieb Christopher Obbard:
> > On Tue, 2023-01-10 at 19:30 +0530, Jagan Teki wrote:
> > > On Mon, 9 Jan 2023 at 21:28, Sebastian Reichel
> > > <sebastian.reichel@collabora.com> wrote:
> > > > 
> > > > From: Christopher Obbard <chris.obbard@collabora.com>
> > > > 
> > > > Add board file for the RK3588 Rock 5B board. This is a basic
> > > > implementation which just brings up the eMMC and UART which is
> > > > enough to successfully boot Linux.
> > > > 
> > > > The ethernet controller is connected via PCIe so support will
> > > > come in a follow-up patch.
> > > > 
> > > > Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
> > > > Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
> > > > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> > > > ---
> > > >  arch/arm64/boot/dts/rockchip/Makefile         |  1 +
> > > >  .../boot/dts/rockchip/rk3588-rock-5b.dts      | 44
> > > > +++++++++++++++++++
> > > >  2 files changed, 45 insertions(+)
> > > >  create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > > > 
> > > > diff --git a/arch/arm64/boot/dts/rockchip/Makefile
> > > > b/arch/arm64/boot/dts/rockchip/Makefile
> > > > index 87a853435142..c5bdd0176ce0 100644
> > > > --- a/arch/arm64/boot/dts/rockchip/Makefile
> > > > +++ b/arch/arm64/boot/dts/rockchip/Makefile
> > > > @@ -83,4 +83,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-
> > > > v10.dtb
> > > >  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb
> > > >  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
> > > >  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb1-v10.dtb
> > > > +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b.dtb
> > > >  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb
> > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > > > b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > > > new file mode 100644
> > > > index 000000000000..d2f1e963ce06
> > > > --- /dev/null
> > > > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > > > @@ -0,0 +1,44 @@
> > > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > > > +
> > > > +/dts-v1/;
> > > > +
> > > > +#include "rk3588.dtsi"
> > > > +
> > > > +/ {
> > > > +       model = "Radxa ROCK 5 Model B";
> > > > +       compatible = "radxa,rock-5b", "rockchip,rk3588";
> > > > +
> > > > +       aliases {
> > > > +               mmc1 = &sdhci;
> > > 
> > > I think sdhci - emmc has to be mmc0 due to boot priority.
> > 
> > Hi Jagan,
> > 
> > We kept eMMC as mmc1 for both ROCK 5 Model A and B to keep
> > compatibility with vendor kernel:
> > https://github.com/radxa/kernel/blob/stable-5.10-rock5/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts#L31
> > 
> > But I am happy to change the alias to mmc0, @Sebastian what do you
> > think?
> 
> In any case, if you decide to swap things around, please just send a follow
> up patch, as I just applied this series :-)

No strong opinion regarding the device enumeration from my side.
I'm fine either way.

@Heiko: Thanks for merging the series.

-- Sebastian
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 87a853435142..c5bdd0176ce0 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -83,4 +83,5 @@  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb1-v10.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
new file mode 100644
index 000000000000..d2f1e963ce06
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
@@ -0,0 +1,44 @@ 
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include "rk3588.dtsi"
+
+/ {
+	model = "Radxa ROCK 5 Model B";
+	compatible = "radxa,rock-5b", "rockchip,rk3588";
+
+	aliases {
+		mmc1 = &sdhci;
+		serial2 = &uart2;
+	};
+
+	chosen {
+		stdout-path = "serial2:1500000n8";
+	};
+
+	vcc5v0_sys: vcc5v0-sys-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_sys";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+	};
+};
+
+&sdhci {
+	bus-width = <8>;
+	no-sdio;
+	no-sd;
+	non-removable;
+	max-frequency = <200000000>;
+	mmc-hs400-1_8v;
+	mmc-hs400-enhanced-strobe;
+	status = "okay";
+};
+
+&uart2 {
+	pinctrl-0 = <&uart2m0_xfer>;
+	status = "okay";
+};