Hi Simon,

On 2025-02-05 02:55, Simon Glass wrote:
> This build-target is used to build an image which can run on multiple
> rk3399 boards, using VBE to boot.

Since this target is intended to be used with VBE on LPDDR4 boards, can
you use a different target name, maybe rk3399-vbe-lpddr4 or similar?

> 
> To use it, the TPL binary for a particular board must be placed into the
> first part of the image. The rest of the image (i.e. VPL, SPL and
> U-Boot) are largely generic and can work on any supported board.

I like the concept of this and I also think this can be supported using
current "traditional" TPL+SPL and FIT separation with fit,compatible and
FIT_BEST_MATCH, I will run some tests using that :-)

Also think with some cleanup work we should even be able to build a
generic Rockchip AArch64 U-Boot proper FIT, for now there is parts that
is too SoC dependent.

> 
> With VBE, memory-init happens in SPL so that this code is updatable in
> the field. Due to size constraints, the type of memory on the board is
> defined at build-time. So it is not possible to use the same VBE image
> on boards with different SDRAM (DDR3 vs LPDDR4 for example). This may
> become possible with newer boards with more SRAM.
> 
> Signed-off-by: Simon Glass <s...@chromium.org>
> ---
> 
>  arch/arm/dts/rk3399-generic-u-boot.dtsi |  32 ++++++
>  arch/arm/dts/rk3399-generic.dts         |  30 ++++++
>  board/rockchip/evb_rk3399/MAINTAINERS   |   5 +
>  configs/rk3399-generic_defconfig        | 133 ++++++++++++++++++++++++
>  4 files changed, 200 insertions(+)
>  create mode 100644 arch/arm/dts/rk3399-generic-u-boot.dtsi
>  create mode 100644 arch/arm/dts/rk3399-generic.dts
>  create mode 100644 configs/rk3399-generic_defconfig
> 
> diff --git a/arch/arm/dts/rk3399-generic-u-boot.dtsi 
> b/arch/arm/dts/rk3399-generic-u-boot.dtsi
> new file mode 100644
> index 00000000000..732727d9b03
> --- /dev/null
> +++ b/arch/arm/dts/rk3399-generic-u-boot.dtsi
> @@ -0,0 +1,32 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (C) 2019 Jagan Teki <ja...@amarulasolutions.com>
> + */
> +
> +#include "rk3399-u-boot.dtsi"
> +#include "rk3399-sdram-lpddr4-100.dtsi"

This is not generic and limits this to lpddr4 boards.

> +/ {
> +     chosen {
> +             u-boot,spl-boot-order = "same-as-spl", &spi_flash, &sdmmc, 
> &sdhci;
> +     };
> +};
> +
> +&sdhci {
> +     cap-mmc-highspeed;
> +     mmc-ddr-1_8v;
> +};
> +
> +&spi1 {
> +     spi_flash: flash@0 {
> +             bootph-all;
> +     };
> +};
> +
> +&vdd_center {
> +     regulator-min-microvolt = <950000>;
> +     regulator-max-microvolt = <950000>;
> +};
> +
> +&vdd_log {
> +     regulator-init-microvolt = <950000>;
> +};
> diff --git a/arch/arm/dts/rk3399-generic.dts b/arch/arm/dts/rk3399-generic.dts
> new file mode 100644
> index 00000000000..f13bb7f6b4b
> --- /dev/null
> +++ b/arch/arm/dts/rk3399-generic.dts
> @@ -0,0 +1,30 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
> + * Copyright (c) 2018 Akash Gajjar <akash_gaj...@mentor.com>
> + * Copyright (c) 2019 Katsuhiro Suzuki <katsuh...@katsuster.net>
> + */
> +
> +/dts-v1/;
> +#include "rk3399-rockpro64.dtsi"

This is far from generic, please see my minimal generic dts at [1]. You
can possible build something using that and a vbe-lpddr4-rk3399
defconfig or similar?

[1] 
https://patchwork.ozlabs.org/project/uboot/patch/20250204072710.468610-3-jo...@kwiboo.se/

Regards,
Jonas

> +
> +/ {
> +     model = "RK3399 Generic";
> +     compatible = "pine64,rockpro64-v2.1", "pine64,rockpro64", 
> "rockchip,rk3399";
> +};
> +
> +&i2c1 {
> +     es8316: codec@11 {
> +             compatible = "everest,es8316";
> +             reg = <0x11>;
> +             clocks = <&cru SCLK_I2S_8CH_OUT>;
> +             clock-names = "mclk";
> +             #sound-dai-cells = <0>;
> +
> +             port {
> +                     es8316_p0_0: endpoint {
> +                             remote-endpoint = <&i2s1_p0_0>;
> +                     };
> +             };
> +     };
> +};

[snip]

Reply via email to