Skip to contentSkip to conversation

Conclusive WHLE-LS1046A support

PATCH Superseded Artur Rojek 1 participant 3 messages Nov 22, 2023 Arm (32-bit)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Conclusive WHLE-LS1046A support

Hi all,

this is v2 of the Conclusive WHLE-LS1046A support series.

Patch [1/2] remains unchanged.

Patch [2/2] features a major clean-up to configs/whle_ls1046a.h, dropping unneeded/redundant defines, and moving some others to more appropriate locations in board code. The environment settings have been moved to plain text whle-ls1046a.env file, and distro_bootcmd macros dropped in favor of BOOTSTD. A non-DM_ETH case has also been removed.

In Device Tree bindings, i2c-mux node has been relocated to the correct parent and ext_i2c received an address correction.

Minor style clean-ups have been performed to eth.c and an incorrect value of CONFIG_MTDPARTS_DEFAULT removed from defconfigs.

Artur Rojek (1):
board: Add support for Conclusive WHLE-LS1046A

Jakub Klama (1):
armv8: layerscape: Enable ext4 environment storage

 arch/arm/Kconfig                              |  19 ++
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c       |   5 +
 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 ++++
 14 files changed, 792 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
Signature · 1 line
2.42.1
#1 lore raw

PATCH v2 1/2 armv8: layerscape: Enable ext4 environment storage

From: Jakub Klama <[email protected]>

Some boards keep their environment on MMC storage within an ext4 partition.

---

v2: no change

 arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/cpu.c +5 -0
index 12d31184ad91..3775cb493732 100644
@@ -857,6 +857,11 @@ enum env_location arch_env_get_location(enum env_operation op, int prio)
 		break;
 	}
 
+#ifdef CONFIG_ENV_IS_IN_EXT4
+	if (env_loc == ENVL_MMC)
+		return ENVL_EXT4;
+#endif
+
 	return env_loc;
 }
 #endif	/* CONFIG_TFABOOT */
Signature · 1 line
2.42.1
#2 lore raw

PATCH v2 2/2 board: Add support for Conclusive WHLE-LS1046A

In reply to Artur Rojek

Introduce support for Conclusive WHLE-LS1046A Single Board Computer.

---

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
arch/arm/Kconfig +19 -0
index d812685c9842..609571e6e421 100644
@@ -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"
arch/arm/dts/Makefile +1 -0
index 1be08c5fdc2e..8dcbf29df363 100644
@@ -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 \
arch/arm/dts/fsl-ls1046a-whle.dts new file +208 -0

208 lines not on this page · raw message

board/conclusive/whle-ls1046a/Kconfig new file +15 -0
new file mode 100644
index 000000000000..5778fbd5cd22
@@ -0,0 +1,15 @@
+if TARGET_WHLE_LS1046A
+
+config SYS_BOARD
+	default "whle-ls1046a"
+
+config SYS_VENDOR
+	default "conclusive"
+
+config SYS_SOC
+	default "fsl-layerscape"
+
+config SYS_CONFIG_NAME
+	default "whle_ls1046a"
+
+endif
board/conclusive/whle-ls1046a/MAINTAINERS new file +9 -0
new file mode 100644
index 000000000000..1dcf067a06d8
@@ -0,0 +1,9 @@
+WHLE-LS1046A Board
+M:	Jakub Klama <[email protected]>
+M:	Artur Rojek <[email protected]>
+S:	Maintained
+F:	board/conclusive/whle-ls1046a
+F:	include/configs/whle_ls1046a.h
+F:	configs/whle_ls1046a_emmc_defconfig
+F:	configs/whle_ls1046a_qspi_defconfig
+F:	arch/arm/dts/fsl-ls1046a-whle.dts
board/conclusive/whle-ls1046a/Makefile new file +7 -0
new file mode 100644
index 000000000000..9197ec93a6de
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2020-2023 Conclusive Engineering Sp. z o. o.
+
+obj-y += ddr.o
+obj-y += whle-ls1046a.o
+obj-$(CONFIG_NET) += eth.o
board/conclusive/whle-ls1046a/ddr.c new file +21 -0
new file mode 100644
index 000000000000..cbefc779d55d
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2019 NXP
+ * Copyright 2020-2023 Conclusive Engineering Sp. z o. o.
+ */
+
+#include <config.h>
+#include <fsl_ddr_sdram.h>
+#include <asm/global_data.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int fsl_initdram(void)
+{
+	gd->ram_size = tfa_get_dram_size();
+
+	if (!gd->ram_size)
+		gd->ram_size = fsl_ddr_sdram_size();
+
+	return 0;
+}
board/conclusive/whle-ls1046a/eth.c new file +65 -0

65 lines not on this page · raw message

board/conclusive/whle-ls1046a/whle-ls1046a.c new file +215 -0

215 lines not on this page · raw message

board/conclusive/whle-ls1046a/whle-ls1046a.env new file +13 -0
new file mode 100644
index 000000000000..fd82a9a6b1d8
@@ -0,0 +1,13 @@
+hwconfig=fsl_ddr:bank_intlv=auto
+kernel_addr_r=0x81000000
+kernel_size=0x07000000
+kernel_comp_addr_r=0x88000000
+kernel_comp_size=0x04000000
+ramdisk_addr_r=0x90000000
+ramdisk_size=0x08000000
+fdt_addr_r=0x98000000
+pxefile_addr_r=0x99000000
+scriptaddr=0x9a000000
+fdtfile=fsl-ls1046a-whle.dtb
+console=ttyS0,115200
+fsl_bootcmd_mcinitcmd_set=y
configs/whle_ls1046a_emmc_defconfig new file +83 -0

83 lines not on this page · raw message

configs/whle_ls1046a_qspi_defconfig new file +84 -0

84 lines not on this page · raw message

include/configs/whle_ls1046a.h new file +47 -0

47 lines not on this page · raw message

Signature · 1 line
2.42.1