Basic Kontron SMARC-sAL28 board support
v8 cover Basic Kontron SMARC-sAL28 board support
Add basic board support for the Kontron SMARC-sAL28 board. Please note, that this board doesn't support TF-a (yet). Therefore, the u-boot SPL is the first code which is run and it has to set up the RAM.
changes since v7:
- removed CONFIG_WDT for now until the watchdog issue is clarified
- enabled EFIDEBUG and NVEDIT_EFI
- disabled EFI_LOADER_BOUNCE_BUFFER, doesn't help in my case, because efi_load_image() will still do DMA transfers with 64bit addresses. ADMA2 (with 64bit address support) support for the eSDHC is on the way.
changes since v6:
- moved README to doc/board/kontron/sl28.rst
- added device tree files to MAINTAINERS
- converted preprocessor macros to actual code using IS_ENABLED()
- fixed sec_init(), use CONFIG_IS_ENABLED() instead of IS_ENABLED()
- removed unnecessary #ifdef CONFIG_OF_BOARD_SETUP
- removed CONFIG_SPL_TARGET, because we use binman, this is not needed anymore
- removed unnecessary CONFIG_SYS_MONITOR_BASE macro
- redefinded memory addresses according to the comment in ti_armv7_common.h
- removed empty BOOTENV for SPL build
- removed fdt_high and initrd_high
Thanks Tom!
changes since v5:
- moved CONFIG_ENV_OVERWRITE to defconfig. Thanks Kuldeep!
changes since v4:
- dropped "armv8: ls1028a: move FSL_LAYERSCAPE to kconfig" as it is already upstream
- new patch "board: sl28: add board specific nvm command"
- use binman
- sync device trees with linux
- use "<devicetree>-u-boot.dtsi" style
- rebase to lastest master
changes since v3:
- rebase to latest master
- use CONFIG_PCI_INIT_R
- set fdtfile in default environment
changes since v2:
- add variant 4 support. Since the atheros PHY dt bindings were merged into master, we can now use them
- add environment section in include/configs/kontron_sl28.h
- add cover letter
changes since v1:
- fix watchdog device tree reference
Michael Walle (2):
board: kontron: add sl28 support
board: sl28: add board specific nvm command
arch/arm/Kconfig | 11 + arch/arm/dts/Makefile | 3 + .../dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi | 135 +++++++++++++ .../fsl-ls1028a-kontron-sl28-var3-u-boot.dtsi | 2 + .../arm/dts/fsl-ls1028a-kontron-sl28-var3.dts | 15 ++ .../fsl-ls1028a-kontron-sl28-var4-u-boot.dtsi | 2 + .../arm/dts/fsl-ls1028a-kontron-sl28-var4.dts | 48 +++++ arch/arm/dts/fsl-ls1028a-kontron-sl28.dts | 189 ++++++++++++++++++ board/kontron/sl28/Kconfig | 18 ++ board/kontron/sl28/MAINTAINERS | 7 + board/kontron/sl28/Makefile | 8 + board/kontron/sl28/cmds.c | 178 +++++++++++++++++ board/kontron/sl28/common.c | 10 + board/kontron/sl28/ddr.c | 98 +++++++++ board/kontron/sl28/sl28.c | 68 +++++++ board/kontron/sl28/spl.c | 32 +++ configs/kontron_sl28_defconfig | 105 ++++++++++ doc/board/index.rst | 1 + doc/board/kontron/index.rst | 9 + doc/board/kontron/sl28.rst | 160 +++++++++++++++ include/configs/kontron_sl28.h | 108 ++++++++++ 21 files changed, 1207 insertions(+) create mode 100644 arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi create mode 100644 arch/arm/dts/fsl-ls1028a-kontron-sl28-var3-u-boot.dtsi create mode 100644 arch/arm/dts/fsl-ls1028a-kontron-sl28-var3.dts create mode 100644 arch/arm/dts/fsl-ls1028a-kontron-sl28-var4-u-boot.dtsi create mode 100644 arch/arm/dts/fsl-ls1028a-kontron-sl28-var4.dts create mode 100644 arch/arm/dts/fsl-ls1028a-kontron-sl28.dts create mode 100644 board/kontron/sl28/Kconfig create mode 100644 board/kontron/sl28/MAINTAINERS create mode 100644 board/kontron/sl28/Makefile create mode 100644 board/kontron/sl28/cmds.c create mode 100644 board/kontron/sl28/common.c create mode 100644 board/kontron/sl28/ddr.c create mode 100644 board/kontron/sl28/sl28.c create mode 100644 board/kontron/sl28/spl.c create mode 100644 configs/kontron_sl28_defconfig create mode 100644 doc/board/kontron/index.rst create mode 100644 doc/board/kontron/sl28.rst create mode 100644 include/configs/kontron_sl28.h
Signature · 1 line
2.20.1
PATCH v8 1/2 board: kontron: add sl28 support
Add basic support for the Kontron SMARC-sAL28 board. This includes just the bare minimum to be able to bring up the board and boot linux.
For now, the Single and Dual PHY variant is supported. Other variants will fall back to the basic variant.
In particular, there is no watchdog support for now. This means that you have to disable the default watchdog, otherwise you'll end up in the recovery bootloader. See the board README for details.
--- arch/arm/Kconfig | 11 + arch/arm/dts/Makefile | 3 + .../dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi | 135 +++++++++++++ .../fsl-ls1028a-kontron-sl28-var3-u-boot.dtsi | 2 + .../arm/dts/fsl-ls1028a-kontron-sl28-var3.dts | 15 ++ .../fsl-ls1028a-kontron-sl28-var4-u-boot.dtsi | 2 + .../arm/dts/fsl-ls1028a-kontron-sl28-var4.dts | 48 +++++ arch/arm/dts/fsl-ls1028a-kontron-sl28.dts | 189 ++++++++++++++++++ board/kontron/sl28/Kconfig | 18 ++ board/kontron/sl28/MAINTAINERS | 7 + board/kontron/sl28/Makefile | 8 + board/kontron/sl28/common.c | 10 + board/kontron/sl28/ddr.c | 98 +++++++++ board/kontron/sl28/sl28.c | 68 +++++++ board/kontron/sl28/spl.c | 32 +++ configs/kontron_sl28_defconfig | 105 ++++++++++ doc/board/index.rst | 1 + doc/board/kontron/index.rst | 9 + doc/board/kontron/sl28.rst | 160 +++++++++++++++ include/configs/kontron_sl28.h | 108 ++++++++++ 20 files changed, 1029 insertions(+) create mode 100644 arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi create mode 100644 arch/arm/dts/fsl-ls1028a-kontron-sl28-var3-u-boot.dtsi create mode 100644 arch/arm/dts/fsl-ls1028a-kontron-sl28-var3.dts create mode 100644 arch/arm/dts/fsl-ls1028a-kontron-sl28-var4-u-boot.dtsi create mode 100644 arch/arm/dts/fsl-ls1028a-kontron-sl28-var4.dts create mode 100644 arch/arm/dts/fsl-ls1028a-kontron-sl28.dts create mode 100644 board/kontron/sl28/Kconfig create mode 100644 board/kontron/sl28/MAINTAINERS create mode 100644 board/kontron/sl28/Makefile create mode 100644 board/kontron/sl28/common.c create mode 100644 board/kontron/sl28/ddr.c create mode 100644 board/kontron/sl28/sl28.c create mode 100644 board/kontron/sl28/spl.c create mode 100644 configs/kontron_sl28_defconfig create mode 100644 doc/board/kontron/index.rst create mode 100644 doc/board/kontron/sl28.rst create mode 100644 include/configs/kontron_sl28.h
arch/arm/Kconfig +11 -0
@@ -1615,6 +1615,16 @@ config TARGET_LS1046AFRWY development platform that supports the QorIQ LS1046A Layerscape Architecture processor. +config TARGET_SL28 + bool "Support sl28" + select ARCH_LS1028A + select ARM64 + select ARMV8_MULTIENTRY + select SUPPORT_SPL + select BINMAN + help + Support for Kontron SMARC-sAL28 board. + config TARGET_COLIBRI_PXA270 bool "Support colibri_pxa270" select CPU_PXA
@@ -1986,6 +1996,7 @@ source "board/hisilicon/hikey/Kconfig" source "board/hisilicon/hikey960/Kconfig" source "board/hisilicon/poplar/Kconfig" source "board/isee/igep003x/Kconfig" +source "board/kontron/sl28/Kconfig" source "board/myir/mys_6ulx/Kconfig" source "board/spear/spear300/Kconfig" source "board/spear/spear310/Kconfig"
arch/arm/dts/Makefile +3 -0
@@ -422,6 +422,9 @@ dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds-duart.dtb \ fsl-ls1012a-2g5rdb.dtb \ fsl-ls1012a-frdm.dtb \ fsl-ls1012a-frwy.dtb +dtb-$(CONFIG_TARGET_SL28) += fsl-ls1028a-kontron-sl28.dtb \ + fsl-ls1028a-kontron-sl28-var3.dtb \ + fsl-ls1028a-kontron-sl28-var4.dtb \ dtb-$(CONFIG_TARGET_DRAGONBOARD410C) += dragonboard410c.dtb dtb-$(CONFIG_TARGET_DRAGONBOARD820C) += dragonboard820c.dtb
arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi new file +135 -0
135 lines not on this page · raw message
arch/arm/dts/fsl-ls1028a-kontron-sl28-var3-u-boot.dtsi new file +2 -0
@@ -0,0 +1,2 @@ +// SPDX-License-Identifier: GPL-2.0+ +#include "fsl-ls1028a-kontron-sl28-u-boot.dtsi"
arch/arm/dts/fsl-ls1028a-kontron-sl28-var3.dts new file +15 -0
@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Device Tree file for the Kontron SMARC-sAL28 board. + * + * Copyright (C) 2019 Michael Walle <[email protected]> + * + */ + +/dts-v1/; +#include "fsl-ls1028a-kontron-sl28.dts" + +/ { + model = "Kontron SMARC-sAL28 (Single PHY)"; + compatible = "kontron,sl28-var3", "kontron,sl28", "fsl,ls1028a"; +};
arch/arm/dts/fsl-ls1028a-kontron-sl28-var4-u-boot.dtsi new file +2 -0
@@ -0,0 +1,2 @@ +// SPDX-License-Identifier: GPL-2.0+ +#include "fsl-ls1028a-kontron-sl28-u-boot.dtsi"
arch/arm/dts/fsl-ls1028a-kontron-sl28-var4.dts new file +48 -0
48 lines not on this page · raw message
arch/arm/dts/fsl-ls1028a-kontron-sl28.dts new file +189 -0
189 lines not on this page · raw message
board/kontron/sl28/Kconfig new file +18 -0
@@ -0,0 +1,18 @@ +if TARGET_SL28 + +config SYS_BOARD + default "sl28" + +config SYS_VENDOR + default "kontron" + +config SYS_SOC + default "fsl-layerscape" + +config SYS_CONFIG_NAME + default "kontron_sl28" + +config SYS_TEXT_BASE + default 0x96000000 + +endif
board/kontron/sl28/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +Kontron SMARC-sAL28 board +M: Michael Walle <[email protected]> +S: Maintained +F: arch/arm/dts/fsl-ls1028a-kontron-sl28-* +F: board/kontron/sl28/ +F: configs/kontron_sl28_defconfig +F: include/configs/kontron_sl28.h
board/kontron/sl28/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0+ + +ifndef CONFIG_SPL_BUILD +obj-y += sl28.o +endif + +obj-y += common.o ddr.o +obj-$(CONFIG_SPL_BUILD) += spl.o
board/kontron/sl28/common.c new file +10 -0
@@ -0,0 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include <common.h> +#include <asm/arch-fsl-layerscape/soc.h> + +int board_early_init_f (void ) +{ +fsl_lsch3_early_init_f (); +return 0 ; +}
board/kontron/sl28/ddr.c new file +98 -0
98 lines not on this page · raw message
board/kontron/sl28/sl28.c new file +68 -0
68 lines not on this page · raw message
board/kontron/sl28/spl.c new file +32 -0
@@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include <common.h> +#include <asm/io.h> +#include <asm/spl.h> + +#define DCFG_RCWSR25 0x160 +#define GPINFO_HW_VARIANT_MASK 0xff + +int sl28_variant (void ) +{ +return in_le32 (DCFG_BASE +DCFG_RCWSR25 ) &GPINFO_HW_VARIANT_MASK ; +} + +int board_fit_config_name_match (const char *name) +{ +int variant =sl28_variant (); + +switch (variant) { +case 3 : +return strcmp (name,"fsl-ls1028a-kontron-sl28-var3" ); +case 4 : +return strcmp (name,"fsl-ls1028a-kontron-sl28-var4" ); +default : +return strcmp (name,"fsl-ls1028a-kontron-sl28" ); + } +} + +void board_boot_order (u32 *spl_boot_list) +{ + spl_boot_list[0 ] =BOOT_DEVICE_SPI ; +}
configs/kontron_sl28_defconfig new file +105 -0
105 lines not on this page · raw message
doc/board/index.rst +1 -0
@@ -15,6 +15,7 @@ Board-specific doc freescale/index google/index intel/index + kontron/index renesas/index rockchip/index sifive/index
doc/board/kontron/index.rst new file +9 -0
@@ -0,0 +1,9 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Kontron +======= + +.. toctree:: + :maxdepth: 2 + + sl28
doc/board/kontron/sl28.rst new file +160 -0
160 lines not on this page · raw message
include/configs/kontron_sl28.h new file +108 -0
108 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH v8 2/2 board: sl28: add board specific nvm command
In reply to Michael WalleThe board supports 16 configuration bits which can be manipulated with this command. See the board's README for a detailed explanation on each bit.
--- board/kontron/sl28/Makefile | 2 +- board/kontron/sl28/cmds.c | 178 ++++++++++++++++++++++++++++++++++++ 2 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 board/kontron/sl28/cmds.c
board/kontron/sl28/Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0+ ifndef CONFIG_SPL_BUILD -obj-y += sl28.o +obj-y += sl28.o cmds.o endif obj-y += common.o ddr.o
board/kontron/sl28/cmds.c new file +178 -0
178 lines not on this page · raw message
Signature · 1 line
2.20.1