Re: [PATCH v3 2/3] board: Add support for Conclusive WHLE-LS1046A

2024-02-06 Thread Sean Anderson
On 11/28/23 05:34, Artur Rojek wrote:
> Introduce support for Conclusive WHLE-LS1046A Single Board Computer.
> 
> Co-developed-by: Jakub Klama 
> Signed-off-by: Jakub Klama 
> Signed-off-by: Artur Rojek 
> ---
> 
> v3: no change
> 
> v2: - drop non-DM_ETH case
> - clean-up defines in configs/whle_ls1046a.h: remove unneeded ones,
>   move others to appropriate files in board directory
> - move environment variables to whle-ls1046a.env
> - move away from distro_bootcmd and use BOOTSTD 
> - fix i2c-mux node parent and ext_i2c address in Device Tree
> - style changes to eth.c
> - fix CONFIG_MTDPARTS_DEFAULT value in defconfigs
> 
>  arch/arm/Kconfig  |  19 ++
>  arch/arm/dts/Makefile |   1 +
>  arch/arm/dts/fsl-ls1046a-whle.dts | 208 +
>  board/conclusive/whle-ls1046a/Kconfig |  15 ++
>  board/conclusive/whle-ls1046a/MAINTAINERS |   9 +
>  board/conclusive/whle-ls1046a/Makefile|   7 +
>  board/conclusive/whle-ls1046a/ddr.c   |  21 ++
>  board/conclusive/whle-ls1046a/eth.c   |  65 ++
>  board/conclusive/whle-ls1046a/whle-ls1046a.c  | 215 ++
>  .../conclusive/whle-ls1046a/whle-ls1046a.env  |  13 ++
>  configs/whle_ls1046a_emmc_defconfig   |  83 +++
>  configs/whle_ls1046a_qspi_defconfig   |  84 +++
>  include/configs/whle_ls1046a.h|  47 
>  13 files changed, 787 insertions(+)
>  create mode 100644 arch/arm/dts/fsl-ls1046a-whle.dts
>  create mode 100644 board/conclusive/whle-ls1046a/Kconfig
>  create mode 100644 board/conclusive/whle-ls1046a/MAINTAINERS
>  create mode 100644 board/conclusive/whle-ls1046a/Makefile
>  create mode 100644 board/conclusive/whle-ls1046a/ddr.c
>  create mode 100644 board/conclusive/whle-ls1046a/eth.c
>  create mode 100644 board/conclusive/whle-ls1046a/whle-ls1046a.c
>  create mode 100644 board/conclusive/whle-ls1046a/whle-ls1046a.env
>  create mode 100644 configs/whle_ls1046a_emmc_defconfig
>  create mode 100644 configs/whle_ls1046a_qspi_defconfig
>  create mode 100644 include/configs/whle_ls1046a.h
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index d812685c9842..609571e6e421 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1851,6 +1851,24 @@ config TARGET_SL28
>   help
> Support for Kontron SMARC-sAL28 board.
>  
> +config TARGET_WHLE_LS1046A
> + bool "Support Conclusive WHLE-LS1046A"
> + select ARCH_LS1046A
> + select ARM64
> + select ARMV8_MULTIENTRY
> + select ARCH_SUPPORT_TFABOOT
> + select BOARD_EARLY_INIT_F
> + select BOARD_LATE_INIT
> + select GPIO_EXTRA_HEADER
> + select DM_SPI_FLASH if DM_SPI
> + imply SCSI
> + help
> +   Support for Conclusive WHLE-LS1046A platform.
> +   The WHLE-LS1046A is a high-performance Single Board Computer with
> +   extensive connectivity features that supports the QorIQ LS1046A
> +   Layerscape Architecture processor:
> +   
> https://cas5-0-urlprotect.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fconclusive.tech%2fproducts%2fwhle%2dls1%2dsbc%2f=bfe70e04-e3cb-4832-a510-cd7686941d3c=d807158c60b7d2502abde8a2fc01f40662980862-65691d364ff53ae48e02cdbc52323838b4503b62
> +
>  config TARGET_TEN64
>   bool "Support ten64"
>   select ARCH_LS1088A
> @@ -2299,6 +2317,7 @@ source "board/cortina/presidio-asic/Kconfig"
>  source "board/broadcom/bcmns/Kconfig"
>  source "board/broadcom/bcmns3/Kconfig"
>  source "board/cavium/thunderx/Kconfig"
> +source "board/conclusive/whle-ls1046a/Kconfig"
>  source "board/eets/pdu001/Kconfig"
>  source "board/emulation/qemu-arm/Kconfig"
>  source "board/freescale/ls2080aqds/Kconfig"
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 1be08c5fdc2e..8dcbf29df363 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -615,6 +615,7 @@ dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds-duart.dtb \
>   fsl-ls1046a-qds-lpuart.dtb \
>   fsl-ls1046a-rdb.dtb \
>   fsl-ls1046a-frwy.dtb \
> + fsl-ls1046a-whle.dtb \
>   fsl-ls1012a-qds.dtb \
>   fsl-ls1012a-rdb.dtb \
>   fsl-ls1012a-2g5rdb.dtb \
> diff --git a/arch/arm/dts/fsl-ls1046a-whle.dts 
> b/arch/arm/dts/fsl-ls1046a-whle.dts
> new file mode 100644
> index ..1aed3e8c4701
> --- /dev/null
> +++ b/arch/arm/dts/fsl-ls1046a-whle.dts
> @@ -0,0 +1,208 @@
> +// SPDX-License-Identifier: GPL-2.0+ OR X11
> +/*
> + * Copyright 2020-2023 Conclusive Engineering Sp. z o. o.
> + */
> +
> +#include 
> +
> +/dts-v1/;
> +#include "fsl-ls1046a.dtsi"
> +
> +/ {
> + model = "Conclusive WHLE-LS1046A";
> + compatible = "conclusive,whle-ls1046a", "fsl,ls1046a";
> +
> + chosen {
> + stdout-path = 
> + };
> +
> + aliases {
> + spi0 = 
> + };
> +};
> +
> + {
> + pcie@340 {
> + status = "okay";
> + };
> +};
> +
> + {
> + status = "okay";
> +
> +

[PATCH v3 2/3] board: Add support for Conclusive WHLE-LS1046A

2023-11-28 Thread Artur Rojek
Introduce support for Conclusive WHLE-LS1046A Single Board Computer.

Co-developed-by: Jakub Klama 
Signed-off-by: Jakub Klama 
Signed-off-by: Artur Rojek 
---

v3: no change

v2: - drop non-DM_ETH case
- clean-up defines in configs/whle_ls1046a.h: remove unneeded ones,
  move others to appropriate files in board directory
- move environment variables to whle-ls1046a.env
- move away from distro_bootcmd and use BOOTSTD 
- fix i2c-mux node parent and ext_i2c address in Device Tree
- style changes to eth.c
- fix CONFIG_MTDPARTS_DEFAULT value in defconfigs

 arch/arm/Kconfig  |  19 ++
 arch/arm/dts/Makefile |   1 +
 arch/arm/dts/fsl-ls1046a-whle.dts | 208 +
 board/conclusive/whle-ls1046a/Kconfig |  15 ++
 board/conclusive/whle-ls1046a/MAINTAINERS |   9 +
 board/conclusive/whle-ls1046a/Makefile|   7 +
 board/conclusive/whle-ls1046a/ddr.c   |  21 ++
 board/conclusive/whle-ls1046a/eth.c   |  65 ++
 board/conclusive/whle-ls1046a/whle-ls1046a.c  | 215 ++
 .../conclusive/whle-ls1046a/whle-ls1046a.env  |  13 ++
 configs/whle_ls1046a_emmc_defconfig   |  83 +++
 configs/whle_ls1046a_qspi_defconfig   |  84 +++
 include/configs/whle_ls1046a.h|  47 
 13 files changed, 787 insertions(+)
 create mode 100644 arch/arm/dts/fsl-ls1046a-whle.dts
 create mode 100644 board/conclusive/whle-ls1046a/Kconfig
 create mode 100644 board/conclusive/whle-ls1046a/MAINTAINERS
 create mode 100644 board/conclusive/whle-ls1046a/Makefile
 create mode 100644 board/conclusive/whle-ls1046a/ddr.c
 create mode 100644 board/conclusive/whle-ls1046a/eth.c
 create mode 100644 board/conclusive/whle-ls1046a/whle-ls1046a.c
 create mode 100644 board/conclusive/whle-ls1046a/whle-ls1046a.env
 create mode 100644 configs/whle_ls1046a_emmc_defconfig
 create mode 100644 configs/whle_ls1046a_qspi_defconfig
 create mode 100644 include/configs/whle_ls1046a.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d812685c9842..609571e6e421 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1851,6 +1851,24 @@ config TARGET_SL28
help
  Support for Kontron SMARC-sAL28 board.
 
+config TARGET_WHLE_LS1046A
+   bool "Support Conclusive WHLE-LS1046A"
+   select ARCH_LS1046A
+   select ARM64
+   select ARMV8_MULTIENTRY
+   select ARCH_SUPPORT_TFABOOT
+   select BOARD_EARLY_INIT_F
+   select BOARD_LATE_INIT
+   select GPIO_EXTRA_HEADER
+   select DM_SPI_FLASH if DM_SPI
+   imply SCSI
+   help
+ Support for Conclusive WHLE-LS1046A platform.
+ The WHLE-LS1046A is a high-performance Single Board Computer with
+ extensive connectivity features that supports the QorIQ LS1046A
+ Layerscape Architecture processor:
+ https://conclusive.tech/products/whle-ls1-sbc/
+
 config TARGET_TEN64
bool "Support ten64"
select ARCH_LS1088A
@@ -2299,6 +2317,7 @@ source "board/cortina/presidio-asic/Kconfig"
 source "board/broadcom/bcmns/Kconfig"
 source "board/broadcom/bcmns3/Kconfig"
 source "board/cavium/thunderx/Kconfig"
+source "board/conclusive/whle-ls1046a/Kconfig"
 source "board/eets/pdu001/Kconfig"
 source "board/emulation/qemu-arm/Kconfig"
 source "board/freescale/ls2080aqds/Kconfig"
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 1be08c5fdc2e..8dcbf29df363 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -615,6 +615,7 @@ dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds-duart.dtb \
fsl-ls1046a-qds-lpuart.dtb \
fsl-ls1046a-rdb.dtb \
fsl-ls1046a-frwy.dtb \
+   fsl-ls1046a-whle.dtb \
fsl-ls1012a-qds.dtb \
fsl-ls1012a-rdb.dtb \
fsl-ls1012a-2g5rdb.dtb \
diff --git a/arch/arm/dts/fsl-ls1046a-whle.dts 
b/arch/arm/dts/fsl-ls1046a-whle.dts
new file mode 100644
index ..1aed3e8c4701
--- /dev/null
+++ b/arch/arm/dts/fsl-ls1046a-whle.dts
@@ -0,0 +1,208 @@
+// SPDX-License-Identifier: GPL-2.0+ OR X11
+/*
+ * Copyright 2020-2023 Conclusive Engineering Sp. z o. o.
+ */
+
+#include 
+
+/dts-v1/;
+#include "fsl-ls1046a.dtsi"
+
+/ {
+   model = "Conclusive WHLE-LS1046A";
+   compatible = "conclusive,whle-ls1046a", "fsl,ls1046a";
+
+   chosen {
+   stdout-path = 
+   };
+
+   aliases {
+   spi0 = 
+   };
+};
+
+ {
+   pcie@340 {
+   status = "okay";
+   };
+};
+
+ {
+   status = "okay";
+
+   gd25lq128: flash@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "jedec,spi-nor";
+   spi-max-frequency = <5000>;
+   reg = <0>;
+
+   partitions {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "fixed-partitions";
+
+   partition@0 {