diff mbox series

[v2,4/5] ARM: mstar: Add dts for msc313(e) based BreadBee boards

Message ID 20200610090421.3428945-5-daniel@0x0f.com (mailing list archive)
State New, archived
Headers show
Series Initial MStar/Sigmastar ARMv7 SoC support | expand

Commit Message

Daniel Palmer June 10, 2020, 9:04 a.m. UTC
BreadBee is an opensource development board based on the
MStar msc313(e) SoC.

Hardware details, schematics and so on can be found at:
https://github.com/breadbee/breadbee

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 arch/arm/boot/dts/Makefile                    |  3 +++
 .../dts/infinity-msc313-breadbee_crust.dts    | 25 +++++++++++++++++++
 .../boot/dts/infinity3-msc313e-breadbee.dts   | 25 +++++++++++++++++++
 3 files changed, 53 insertions(+)
 create mode 100644 arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts
 create mode 100644 arch/arm/boot/dts/infinity3-msc313e-breadbee.dts

Comments

Andreas Färber June 11, 2020, 1:45 p.m. UTC | #1
Am 10.06.20 um 11:04 schrieb Daniel Palmer:
> BreadBee is an opensource development board based on the
> MStar msc313(e) SoC.
> 
> Hardware details, schematics and so on can be found at:
> https://github.com/breadbee/breadbee
> 
> Signed-off-by: Daniel Palmer <daniel@0x0f.com>
> ---
>   arch/arm/boot/dts/Makefile                    |  3 +++
>   .../dts/infinity-msc313-breadbee_crust.dts    | 25 +++++++++++++++++++
>   .../boot/dts/infinity3-msc313e-breadbee.dts   | 25 +++++++++++++++++++
>   3 files changed, 53 insertions(+)
>   create mode 100644 arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts
>   create mode 100644 arch/arm/boot/dts/infinity3-msc313e-breadbee.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index e6a1cac0bfc7..4a5f8075a4f6 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1342,6 +1342,9 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
>   	mt8127-moose.dtb \
>   	mt8135-evbp1.dtb
>   dtb-$(CONFIG_ARCH_MILBEAUT) += milbeaut-m10v-evb.dtb
> +dtb-$(CONFIG_ARCH_MSTARV7) += \
> +	infinity-msc313-breadbee_crust.dtb \
> +	infinity3-msc313e-breadbee.dtb
>   dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
>   dtb-$(CONFIG_ARCH_ASPEED) += \
>   	aspeed-ast2500-evb.dtb \
> diff --git a/arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts b/arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts
> new file mode 100644
> index 000000000000..8a827c8fd8b2
> --- /dev/null
> +++ b/arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts
> @@ -0,0 +1,25 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2019 thingy.jp.
> + * Author: Daniel Palmer <daniel@thingy.jp>
> + */
> +
> +/dts-v1/;
> +#include "infinity-msc313.dtsi"
> +
> +/ {
> +	model = "breadbee-crust";

This is user-visible text, so "BreadBee Crust" or so?

> +	compatible = "thingyjp,breadbee-crust", "mstar,infinity";
> +
> +	aliases {
> +		serial0 = &pm_uart;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +};
> +
> +&pm_uart {
> +	status = "okay";

Might this be a more suited place for temporary clock-frequency? For 
lack of clk driver it would seem to depend on the board's bootloader 
pre-configuring it rather than being a default of the SoC.

> +};
> diff --git a/arch/arm/boot/dts/infinity3-msc313e-breadbee.dts b/arch/arm/boot/dts/infinity3-msc313e-breadbee.dts
> new file mode 100644
> index 000000000000..423bb32e6b74
> --- /dev/null
> +++ b/arch/arm/boot/dts/infinity3-msc313e-breadbee.dts
> @@ -0,0 +1,25 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2019 thingy.jp.
> + * Author: Daniel Palmer <daniel@thingy.jp>
> + */
> +
> +/dts-v1/;
> +#include "infinity3-msc313e.dtsi"
> +
> +/ {
> +	model = "breadbee";

Ditto, "BreadBee"?

> +	compatible = "thingyjp,breadbee", "mstar,infinity3";
> +
> +	aliases {
> +		serial0 = &pm_uart;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +};
> +
> +&pm_uart {
> +	status = "okay";

Ditto, clock-frequency?

> +};

Regards,
Andreas
Daniel Palmer June 11, 2020, 2:26 p.m. UTC | #2
Hi Andreas,

On Thu, 11 Jun 2020 at 22:45, Andreas Färber <afaerber@suse.de> wrote:

> > +     compatible = "thingyjp,breadbee-crust", "mstar,infinity";
> > +
> > +     aliases {
> > +             serial0 = &pm_uart;
> > +     };
> > +
> > +     chosen {
> > +             stdout-path = "serial0:115200n8";
> > +     };
> > +};
> > +
> > +&pm_uart {
> > +     status = "okay";
>
> Might this be a more suited place for temporary clock-frequency? For
> lack of clk driver it would seem to depend on the board's bootloader
> pre-configuring it rather than being a default of the SoC.

For all of the chips so far their second stage bootloader always turns
on a PLL and
reconfigures the pm_uart clock to use a 172MHz tap from that PLL right
at the start
of the boot process before u-boot is started. The new u-boot SPL I'm
working on to replace
that loader follows that convention.
Once the clk parts are in it should be possible to pull out the fixed
frequency and
replace it with a proper handle to that PLL tap.
Basically it's not documented anywhere except the assembly but the
convention for
these chips is to use the 172MHz clock for the uart pretty soon after
power on so it
made sense to have it in one place.

Thanks,

Daniel
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e6a1cac0bfc7..4a5f8075a4f6 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1342,6 +1342,9 @@  dtb-$(CONFIG_ARCH_MEDIATEK) += \
 	mt8127-moose.dtb \
 	mt8135-evbp1.dtb
 dtb-$(CONFIG_ARCH_MILBEAUT) += milbeaut-m10v-evb.dtb
+dtb-$(CONFIG_ARCH_MSTARV7) += \
+	infinity-msc313-breadbee_crust.dtb \
+	infinity3-msc313e-breadbee.dtb
 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
 dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-ast2500-evb.dtb \
diff --git a/arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts b/arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts
new file mode 100644
index 000000000000..8a827c8fd8b2
--- /dev/null
+++ b/arch/arm/boot/dts/infinity-msc313-breadbee_crust.dts
@@ -0,0 +1,25 @@ 
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <daniel@thingy.jp>
+ */
+
+/dts-v1/;
+#include "infinity-msc313.dtsi"
+
+/ {
+	model = "breadbee-crust";
+	compatible = "thingyjp,breadbee-crust", "mstar,infinity";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/infinity3-msc313e-breadbee.dts b/arch/arm/boot/dts/infinity3-msc313e-breadbee.dts
new file mode 100644
index 000000000000..423bb32e6b74
--- /dev/null
+++ b/arch/arm/boot/dts/infinity3-msc313e-breadbee.dts
@@ -0,0 +1,25 @@ 
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 thingy.jp.
+ * Author: Daniel Palmer <daniel@thingy.jp>
+ */
+
+/dts-v1/;
+#include "infinity3-msc313e.dtsi"
+
+/ {
+	model = "breadbee";
+	compatible = "thingyjp,breadbee", "mstar,infinity3";
+
+	aliases {
+		serial0 = &pm_uart;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&pm_uart {
+	status = "okay";
+};