add support for Enclustra Mercury AA1 SoMs
v4 cover add support for Enclustra Mercury AA1 SoMs
Introduce the support for three variants of Enclustra's Intel Mercury AA1 (with Intel Arria10) SoMs and additional configs.
The DT approach is partly based on dts/upstream, which are (going to be) upstreamed to the linux kernel.
---
v3 -> v4:
- fix wrong mail address in v2 and author
- update scripts for stdboot and generic load
- clean up patch organization (patch 7/10 was malformed and almost empty, added and removed stances,..)
- fix binding used for "enclustra,altera_set_storage"
- separate u-boot specific part of .dts to a socfpga_arria10_mercury_aa1-u-boot.dtsi file
- integrate fpga.itb build with binman in the -u-boot.dtsi file note:
1. due to binman, now the build will need binman build (i.e. requirements) and is build then with "make NO_PYTHON=1"
2. the fpga bitstream files bitstream.core.rbf and bitstream.periph.rbf are generated by a particular Quartus design, so they can't be committed here. This makes the build fail, if build with binman.
For testing, thus build with
"make CONFIG_BINMAN=n"
- fix some typos in binman and gdb documentation (additional patch)
v2 -> v3:
- update of DT concept to work with dts/upstream
- update of DT parts in arch/arm/dts, because of:
-- the handoff initialization of the Arria10 SoC
-- the fpga loader for the bitstream in the DTS
-- the adjustments to access the boot media, from where to load the fpga.itb -- and to mux media for booting, e.g. QSPI off, when booting from MMC
- implementation of kconfig options to combine SoM .dtsi file, carrier board .dtsi files, boot-mode parts, and so on resulting in a single .dts file located in arch/arm/dts because of the above mentioned reasons
- adjustents to (better) satisfy dtb checks
- updated MAINTAINERS
- updated documentation
- update to use standard boot and environment as only environment, removal of explicit variables and environment files
- removal of duplicate codes
- cleanup and implement altera_set_storage (boot media switch command in u-boot shell) based on DM
- fix spansion flash access to allow flashing from off the u-boot shell, this patch was already presented separately, the fix is actively needed for the AA1 SoM
- sort lists in several files alfabetically
- update boot commands using && instead of ;
v1 -> v2:
- removal si5338 driver
- removal si5338 driver usage
- rename .c file for the boot cmd, build conditionally
- add separate .c file for late boot init to read MAC address from eeprom
- keep DT approach for u-boot under discussion
- fix issues in doc
- update MAINTAINERS to cover doc
---
Lothar Rubusch (11):
doc: board: enclustra: add Enclustra Mercury+ AA1
ARM: socfpga: add Mercury+ AA1 SoM support
ARM: dts: socfpga: add Mercury+ AA1 for u-boot dts
ARM: socfpga: add Enclustra storage switch
ARM: socfpga: add Mercury+ AA1 boot scripts
ARM: socfpga: AA1: support MAC from secure eeprom
misc: atsha204a: update kconfig description
ARM: dts: arria10: update according to DTSpec
ARM: socfpga: update function call to modern API
ARM: socfpga: apply binman approach to fpga parts
doc: develop: orthographic delights
arch/arm/dts/socfpga_arria10.dtsi | 42 ++- ..._arria10_enclustra_mercury_aa1-u-boot.dtsi | 89 +++++ .../socfpga_arria10_enclustra_mercury_aa1.dts | 62 ++++ .../socfpga_arria10_mercury_aa1-u-boot.dtsi | 19 ++ .../dts/socfpga_arria10_mercury_aa1_handoff.h | 305 ++++++++++++++++++ arch/arm/mach-socfpga/Kconfig | 10 + arch/arm/mach-socfpga/misc_arria10.c | 2 - board/enclustra/bootscripts/qspi-aa1.cmd | 12 + board/enclustra/bootscripts/sd-aa1.cmd | 9 + board/enclustra/common/Kconfig | 25 ++ board/enclustra/common/Makefile | 7 + board/enclustra/common/enclustra_mac.h | 48 +++ board/enclustra/common/mac_atsha204.c | 102 ++++++ board/enclustra/common/mac_common.c | 52 +++ board/enclustra/common/mac_ds28.c | 93 ++++++ board/enclustra/mercury_aa1/Kconfig | 52 +++ board/enclustra/mercury_aa1/MAINTAINERS | 12 + board/enclustra/mercury_aa1/Makefile | 10 + .../mercury_aa1/aa1_board_late_init.c | 17 + .../mercury_aa1/aa1_set_storage_cmd.c | 190 +++++++++++ .../socfpga_enclustra_mercury_aa1_defconfig | 86 +++++ doc/board/enclustra/index.rst | 9 + doc/board/enclustra/mercury-aa1.rst | 230 +++++++++++++ doc/board/index.rst | 1 + doc/develop/gdb.rst | 2 +- drivers/misc/Kconfig | 2 +- include/configs/socfpga_mercury_aa1.h | 23 ++ tools/binman/binman.rst | 4 +- tools/binman/entries.rst | 22 +- 29 files changed, 1511 insertions(+), 26 deletions(-) create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1.dts create mode 100644 arch/arm/dts/socfpga_arria10_mercury_aa1_handoff.h create mode 100644 board/enclustra/bootscripts/qspi-aa1.cmd create mode 100644 board/enclustra/bootscripts/sd-aa1.cmd create mode 100644 board/enclustra/common/Kconfig create mode 100644 board/enclustra/common/Makefile create mode 100644 board/enclustra/common/enclustra_mac.h create mode 100644 board/enclustra/common/mac_atsha204.c create mode 100644 board/enclustra/common/mac_common.c create mode 100644 board/enclustra/common/mac_ds28.c create mode 100644 board/enclustra/mercury_aa1/Kconfig create mode 100644 board/enclustra/mercury_aa1/MAINTAINERS create mode 100644 board/enclustra/mercury_aa1/Makefile create mode 100644 board/enclustra/mercury_aa1/aa1_board_late_init.c create mode 100644 board/enclustra/mercury_aa1/aa1_set_storage_cmd.c create mode 100644 configs/socfpga_enclustra_mercury_aa1_defconfig create mode 100644 doc/board/enclustra/index.rst create mode 100644 doc/board/enclustra/mercury-aa1.rst create mode 100644 include/configs/socfpga_mercury_aa1.h
Signature · 1 line
2.25.1
PATCH v4 1/11 doc: board: enclustra: add Enclustra Mercury+ AA1
Start documentation section for Enclustra. Cover Enclustra Intel SoMs and related carrier board setups. The section covers the Mercury+ AA1 SoM (Intel/arria10).
--- doc/board/enclustra/index.rst | 9 ++ doc/board/enclustra/mercury-aa1.rst | 202 ++++++++++++++++++++++++++++ doc/board/index.rst | 1 + 3 files changed, 212 insertions(+) create mode 100644 doc/board/enclustra/index.rst create mode 100644 doc/board/enclustra/mercury-aa1.rst
doc/board/enclustra/index.rst new file +9 -0
@@ -0,0 +1,9 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Enclustra +========= + +.. toctree:: + :maxdepth: 2 + + mercury-aa1
doc/board/enclustra/mercury-aa1.rst new file +202 -0
202 lines not on this page · raw message
doc/board/index.rst +1 -0
@@ -25,6 +25,7 @@ Board-specific doc congatec/index coreboot/index emulation/index + enclustra/index gateworks/index google/index highbank/index
Signature · 1 line
2.25.1
PATCH v4 2/11 ARM: socfpga: add Mercury+ AA1 SoM support
In reply to Lothar RubuschIntroduce support for the Enclustra SoMs: Mercury+ AA1 (Intel/Arria10)
Cover general board files for SD/MMC and QSPI boot modes. Integrate the boards to kconfig. All build variants will depend on Quartus handoff files, thus they depend on the particular Quartus design. The approach is covered in the according documentation part.
Additionally add configuration for SD/MMC boot and QSPI bootmodes. Register additional targets in kconfig.
--- arch/arm/mach-socfpga/Kconfig | 9 ++ board/enclustra/common/Makefile | 4 + board/enclustra/mercury_aa1/Kconfig | 15 ++++ board/enclustra/mercury_aa1/MAINTAINERS | 10 +++ board/enclustra/mercury_aa1/fpga.its | 32 +++++++ .../socfpga_enclustra_mercury_aa1_defconfig | 85 +++++++++++++++++++ include/configs/socfpga_mercury_aa1.h | 23 +++++ 7 files changed, 178 insertions(+) create mode 100644 board/enclustra/common/Makefile create mode 100644 board/enclustra/mercury_aa1/Kconfig create mode 100644 board/enclustra/mercury_aa1/MAINTAINERS create mode 100644 board/enclustra/mercury_aa1/fpga.its create mode 100644 configs/socfpga_enclustra_mercury_aa1_defconfig create mode 100644 include/configs/socfpga_mercury_aa1.h
arch/arm/mach-socfpga/Kconfig +9 -0
@@ -184,6 +184,10 @@ config TARGET_SOCFPGA_EBV_SOCRATES bool "EBV SoCrates (Cyclone V)" select TARGET_SOCFPGA_CYCLONE5 +config TARGET_SOCFPGA_ENCLUSTRA_MERCURY_AA1 + bool "Enclustra Mercury+ AA1" + select TARGET_SOCFPGA_ARRIA10 + config TARGET_SOCFPGA_IS1 bool "IS1 (Cyclone V)" select TARGET_SOCFPGA_CYCLONE5
@@ -237,6 +241,7 @@ config SYS_BOARD default "de10-standard" if TARGET_SOCFPGA_TERASIC_DE10_STANDARD default "is1" if TARGET_SOCFPGA_IS1 default "mcvevk" if TARGET_SOCFPGA_ARIES_MCVEVK + default "mercury_aa1" if TARGET_SOCFPGA_ENCLUSTRA_MERCURY_AA1 default "n5x-socdk" if TARGET_SOCFPGA_N5X_SOCDK default "secu1" if TARGET_SOCFPGA_ARRIA5_SECU1 default "sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT
@@ -256,6 +261,7 @@ config SYS_VENDOR default "aries" if TARGET_SOCFPGA_ARIES_MCVEVK default "devboards" if TARGET_SOCFPGA_DEVBOARDS_DBM_SOC1 default "ebv" if TARGET_SOCFPGA_EBV_SOCRATES + default "enclustra" if TARGET_SOCFPGA_ENCLUSTRA_MERCURY_AA1 default "google" if TARGET_SOCFPGA_CHAMELEONV3 default "keymile" if TARGET_SOCFPGA_ARRIA5_SECU1 default "softing" if TARGET_SOCFPGA_SOFTING_VINING_FPGA
@@ -283,6 +289,7 @@ config SYS_CONFIG_NAME default "socfpga_de10_standard" if TARGET_SOCFPGA_TERASIC_DE10_STANDARD default "socfpga_is1" if TARGET_SOCFPGA_IS1 default "socfpga_mcvevk" if TARGET_SOCFPGA_ARIES_MCVEVK + default "socfpga_mercury_aa1" if TARGET_SOCFPGA_ENCLUSTRA_MERCURY_AA1 default "socfpga_n5x_socdk" if TARGET_SOCFPGA_N5X_SOCDK default "socfpga_sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT default "socfpga_socrates" if TARGET_SOCFPGA_EBV_SOCRATES
@@ -290,4 +297,6 @@ config SYS_CONFIG_NAME default "socfpga_stratix10_socdk" if TARGET_SOCFPGA_STRATIX10_SOCDK default "socfpga_vining_fpga" if TARGET_SOCFPGA_SOFTING_VINING_FPGA +source "board/enclustra/mercury_aa1/Kconfig" + endif
board/enclustra/common/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (c) 2024 Enclustra GmbH + +# Common for several Enclustra modules
board/enclustra/mercury_aa1/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +if TARGET_SOCFPGA_ENCLUSTRA_MERCURY_AA1 + +config SYS_CPU + default "armv7" + +config SYS_BOARD + default "mercury_aa1" + +config SYS_VENDOR + default "enclustra" + +config SYS_CONFIG_NAME + default "socfpga_mercury_aa1" + +endif
board/enclustra/mercury_aa1/MAINTAINERS new file +10 -0
@@ -0,0 +1,10 @@ +Enclustra Mercury+ AA1 +M: Lothar Rubusch <[email protected]> +S: Maintained +N: board/enclustra/mercury_aa1/ +N: board/enclustra/common/ +N: configs/socfpga_enclustra_mercury_aa1_defconfig +N: doc/board/enclustra/mercury-aa1.rst +N: include/configs/socfpga_mercury_aa1.h +N: enclustra +N: mercury_aa1
board/enclustra/mercury_aa1/fpga.its new file +32 -0
@@ -0,0 +1,32 @@ +/dts-v1/; + +/ { + description = "FIT image with FPGA bistream"; + #address-cells = <1>; + + images { + fpga-periph-1 { + description = "FPGA peripheral bitstream"; + data = /incbin/("../../../bitstream.periph.rbf"); + type = "fpga"; + arch = "arm"; + compression = "none"; + }; + + fpga-core-1 { + description = "FPGA core bitstream"; + data = /incbin/("../../../bitstream.core.rbf"); + type = "fpga"; + arch = "arm"; + compression = "none"; + }; + }; + + configurations { + default = "config-1"; + config-1 { + description = "Boot with FPGA early IO release config"; + fpga = "fpga-periph-1", "fpga-core-1"; + }; + }; +};
configs/socfpga_enclustra_mercury_aa1_defconfig new file +85 -0
85 lines not on this page · raw message
include/configs/socfpga_mercury_aa1.h new file +23 -0
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2024 Enclustra GmbH +* <[email protected]> +*/ + +#ifndef __CONFIG_SOCFGPA_MERCURY_AA1_H__ +#define __CONFIG_SOCFGPA_MERCURY_AA1_H__ + +#include <asm/arch/base_addr_a10.h> + +/* +* U-Boot general configurations +*/ + +/* Memory configurations */ +#define PHYS_SDRAM_1_SIZE 0x80000000 + +/* The rest of the configuration is shared */ +#include <configs/socfpga_common.h> +#include <config_distro_bootcmd.h> + +#endif /* __CONFIG_SOCFGPA_MERCURY_AA1_H__ */
Signature · 1 line
2.25.1
PATCH v4 3/11 ARM: dts: socfpga: add Mercury+ AA1 for u-boot dts
In reply to Lothar RubuschIntroduce u-boot specific device-tree files for Enclustra Mercury+ AA1 SoMs (Intel/arria10).
Generic device-tree fragments for linux and U-boot shall be provided in dts/upstream. The selection of the generic device-tree fragments depends on a selected boot-mode and a selected carrier board.
On Intel/Arria10 a handoff setup is needed for initialization of various clock / pinmux / DRAM settings only used by U-Boot provided by the current patch.
--- ..._arria10_enclustra_mercury_aa1-u-boot.dtsi | 45 +++ .../socfpga_arria10_enclustra_mercury_aa1.dts | 45 +++ .../socfpga_arria10_mercury_aa1-u-boot.dtsi | 19 ++ .../dts/socfpga_arria10_mercury_aa1_handoff.h | 305 ++++++++++++++++++ board/enclustra/mercury_aa1/Kconfig | 37 +++ board/enclustra/mercury_aa1/MAINTAINERS | 2 + 6 files changed, 453 insertions(+) create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1.dts create mode 100644 arch/arm/dts/socfpga_arria10_mercury_aa1_handoff.h
arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi new file +45 -0
@@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Copyright (C) 2024 Lothar Rubusch <[email protected]> + */ + +/* Arria10 handoff (u-boot) */ +#include "socfpga_arria10_mercury_aa1_handoff.h" +#include "socfpga_arria10-handoff.dtsi" +#include "socfpga_arria10_handoff_u-boot.dtsi" +#include "socfpga_arria10_mercury_aa1-u-boot.dtsi" + +/* Specific boot-mode (u-boot) */ +#if IS_ENABLED(CONFIG_ENCLUSTRA_SDMMC) || IS_ENABLED(CONFIG_ENCLUSTRA_EMMC) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + phandlepart = <&mmc 1>; + }; +}; + +&fpga_mgr { + bootph-all; + firmware-loader = <&fs_loader0>; + altr,bitstream = "fpga.itb"; +}; + +#elif IS_ENABLED(CONFIG_ENCLUSTRA_QSPI) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + sfconfig = <0 0 50000000 3>; + }; +}; + +&fpga_mgr { + bootph-all; + firmware-loader = <&fs_loader0>; + altr,bitstream = "300000"; +}; + +#endif
arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1.dts new file +45 -0
45 lines not on this page · raw message
arch/arm/dts/socfpga_arria10_mercury_aa1-u-boot.dtsi +19 -0
@@ -33,6 +33,21 @@ bootph-all; }; +&l4_main_clk { + bootph-all; +}; + +&qspi_clk { + bootph-all; +}; + +&qspi { + bootph-all; + flash0: s25fl512s@0 { + bootph-all; + }; +}; + &mmc { bootph-all; };
@@ -52,3 +67,7 @@ &uart1 { bootph-all; }; + +&watchdog1 { + bootph-all; +};
arch/arm/dts/socfpga_arria10_mercury_aa1_handoff.h new file +305 -0
305 lines not on this page · raw message
board/enclustra/mercury_aa1/Kconfig +37 -0
@@ -12,4 +12,41 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "socfpga_mercury_aa1" +choice + prompt "Mercury+ AA1 base-board" + default ENCLUSTRA_PE1 + help + Select the base-board for Mercury+ AA1. + +config ENCLUSTRA_PE1 + bool "Mercury+ PE1" + +config ENCLUSTRA_PE3 + bool "Mercury+ PE3" + +config ENCLUSTRA_ST1 + bool "Mercury+ ST1" + +config ENCLUSTRA_CUSTOM_BASE + bool "Customized base-board" + +endchoice + +choice + prompt "Mercury+ AA1 boot-mode" + default ENCLUSTRA_SDMMC + help + Select the boot-mode for the Mercury+ AA1 setup. + +config ENCLUSTRA_SDMMC + bool "SD card" + +config ENCLUSTRA_EMMC + bool "eMMC" + +config ENCLUSTRA_QSPI + bool "QSPI flash" + +endchoice + endif
board/enclustra/mercury_aa1/MAINTAINERS +2 -0
@@ -1,6 +1,8 @@ Enclustra Mercury+ AA1 M: Lothar Rubusch <[email protected]> S: Maintained +N: arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1.dts +N: arch/arm/dts/socfpga_arria10_mercury_aa1_handoff.h N: board/enclustra/mercury_aa1/ N: board/enclustra/common/ N: configs/socfpga_enclustra_mercury_aa1_defconfig
Signature · 1 line
2.25.1
RE: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dts
Hi,
-----Original Message-----
From: Lothar Rubusch <[email protected]>
Sent: Saturday, October 26, 2024 11:52 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; Chee, Tien Fong <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Lim, Jit Loon <[email protected]>; [email protected]; [email protected]
Subject: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dts
Introduce u-boot specific device-tree files for Enclustra Mercury+ AA1 SoMs (Intel/arria10).
Generic device-tree fragments for linux and U-boot shall be provided in dts/upstream. The selection of the generic device-tree fragments depends on a selected boot-mode and a selected carrier board.
On Intel/Arria10 a handoff setup is needed for initialization of various clock / pinmux / DRAM settings only used by U-Boot provided by the current patch.
--- ..._arria10_enclustra_mercury_aa1-u-boot.dtsi | 45 +++ .../socfpga_arria10_enclustra_mercury_aa1.dts | 45 +++ .../socfpga_arria10_mercury_aa1-u-boot.dtsi | 19 ++ .../dts/socfpga_arria10_mercury_aa1_handoff.h | 305 ++++++++++++++++++ board/enclustra/mercury_aa1/Kconfig | 37 +++ board/enclustra/mercury_aa1/MAINTAINERS | 2 + 6 files changed, 453 insertions(+) create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1.dts create mode 100644 arch/arm/dts/socfpga_arria10_mercury_aa1_handoff.h
arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi new file +35 -0
@@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Copyright (C) 2024 Lothar Rubusch <[email protected]> */ + +/* Arria10 handoff (u-boot) */ +#include "socfpga_arria10_mercury_aa1_handoff.h" +#include "socfpga_arria10-handoff.dtsi" +#include "socfpga_arria10_handoff_u-boot.dtsi" +#include "socfpga_arria10_mercury_aa1-u-boot.dtsi" + +/* Specific boot-mode (u-boot) */ +#if IS_ENABLED(CONFIG_ENCLUSTRA_SDMMC) || +IS_ENABLED(CONFIG_ENCLUSTRA_EMMC) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + phandlepart = <&mmc 1>; + }; +}; + +&fpga_mgr { + bootph-all; + firmware-loader = <&fs_loader0>; + altr,bitstream = "fpga.itb"; +}; + +#elif IS_ENABLED(CONFIG_ENCLUSTRA_QSPI) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + sfconfig = <0 0 50000000 3>;
The RAW read implementation in fs_loader is not upstream yet, I afraid this might not working, you want help to upstream?
[...]
Best regards,
TF
Re: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dts
Quoted 3 lines · Tien Fong
Hi,
Dear Tien Fong Chee,
Quoted 68 lines
-----Original Message-----
From: Lothar Rubusch <[email protected]>
Sent: Saturday, October 26, 2024 11:52 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; Chee, Tien Fong <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Lim, Jit Loon <[email protected]>; [email protected]; [email protected]
Subject: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dtsIntroduce u-boot specific device-tree files for Enclustra Mercury+ AA1 SoMs (Intel/arria10).
Generic device-tree fragments for linux and U-boot shall be provided in dts/upstream. The selection of the generic device-tree fragments depends on a selected boot-mode and a selected carrier board.
On Intel/Arria10 a handoff setup is needed for initialization of various clock / pinmux / DRAM settings only used by U-Boot provided by the current patch.
Signed-off-by Andreas Buerkler <[email protected]>Signed-off-by Lothar Rubusch <[email protected]>--- ..._arria10_enclustra_mercury_aa1-u-boot.dtsi | 45 +++ .../socfpga_arria10_enclustra_mercury_aa1.dts | 45 +++ .../socfpga_arria10_mercury_aa1-u-boot.dtsi | 19 ++ .../dts/socfpga_arria10_mercury_aa1_handoff.h | 305 ++++++++++++++++++ board/enclustra/mercury_aa1/Kconfig | 37 +++ board/enclustra/mercury_aa1/MAINTAINERS | 2 + 6 files changed, 453 insertions(+) create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1.dts create mode 100644 arch/arm/dts/socfpga_arria10_mercury_aa1_handoff.harch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi new file +35
-0@@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Copyright (C) 2024 Lothar Rubusch <[email protected]> */ + +/* Arria10 handoff (u-boot) */ +#include "socfpga_arria10_mercury_aa1_handoff.h" +#include "socfpga_arria10-handoff.dtsi" +#include "socfpga_arria10_handoff_u-boot.dtsi" +#include "socfpga_arria10_mercury_aa1-u-boot.dtsi" + +/* Specific boot-mode (u-boot) */ +#if IS_ENABLED(CONFIG_ENCLUSTRA_SDMMC) || +IS_ENABLED(CONFIG_ENCLUSTRA_EMMC) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + phandlepart = <&mmc 1>; + }; +}; + +&fpga_mgr { + bootph-all; + firmware-loader = <&fs_loader0>; + altr,bitstream = "fpga.itb"; +}; + +#elif IS_ENABLED(CONFIG_ENCLUSTRA_QSPI) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + sfconfig = <0 0 50000000 3>;
Quoted 2 lines
The RAW read implementation in
fs_loaderis not upstream yet, I afraid this might not working, you want help to upstream?
Thank you so much for coming back to me! The TL;DR answer is, yes. Pls, start by fixing Intel platform maintenance in the Linux kernel for old Intel/socfpga.
For the long story, there are several points here which are probably not quite transparent just on u-boot ML. Let me clarify. Personally, I have access to some Enclustra hardware and was curious what it would take to upstream it. This was/is driven mainly by my private interest, since the company gives a ...does not care about open source. As you will easily spot those Intel platforms are not the most recent Intel products either. I picked them a bit on purpose, since I did not want to "mess it up" for that company with my personal upstream in the first approach. If it went upstream, it could be the basis for further Enclustra Hardware i.e. Xilinx/AMD, Microchip and more recent Intel. That's a bit the background and intention.
So, when I started last summer, u-boot community stared with dts upstream. Means, my DTS material needed to be prepared and split up into a linux kernel part and a u-boot part. Due to the bitstream handling and early initialization of registers, also, the u-boot DTS went partly into dts-upstream, and partly into the classic DTS places for he intel/socfpga platform. I managed to implement a dynamically adjusted Enclustra DTS, based kconfig option. At the end of the day, this all resulted in the dependency to have DTS material upstream in the linux kernel repo.
Both patchsets were actually prepared and presented on the MLs. For u-boot, you will find all communication concerning the u-boot patches here on this ML. Where for the kernel patches, I got the more general patches ACK'd. But the Intel maintainer Dinh Nguyen did not manage to give feedback. I was even able to contact Dinh directly, and he gave me back that he plans on doing. This was in fall 2024. No update since then. - Here is, IMHO, where you Intel guys could really help work on solving this situation: Either help out Dinh for the kernel stuff, or organize replacement. Don't get me wrong, this is not meant to be personal. I'm sure he will have good reasons if he cannot carry out this job currently. Means put up someone who will (co-)maintain the old Intel platforms in the Linux kernel. Also, the Intel/socfpga dt-bindings need to be written in YAML, AFAIR. That's why e.g. Rob's DT-check bot will almost blast you with errors with the comment "can be accepted if the specific platform maintainer is willing to". Platform maintainer does not answer, and I'm not willing writing the YAML dt-bindings for ye olde Intel, when there is no maintainer eventually accepting it.. Hence, accepting the Enclustra Intel DTS, would mean to accept them w/o the updated and checked dt-bindings.
For the (technical) rest: I have full access to the hardware, i.e. 3 different Arria10 SOMs of Enclustra, as 2 further Cyclone5 SOMs. All can be combined with 3 different carrier boards of Enclustra. The setups are booting in different boot modes (SD, eMMC and some from QSPI flash). After the DTS separation, (re)implementing the mini-drivers based on u-boot DM, I needed to migrate the setup using binman. Building, flashing and booting into a functional u-boot, is verified for all setups. As you mentioned, parts in the u-boot API are/were still under development, though, but Marek kept me in the loop here (also on ML).
I appreciate your patience, for reading this all. In a conclusion, the products are still sold. Yes, they are a bit ancient.. what eventually blocked it, is IMHO rather kenel maintenance for old Intel platforms which seems orphaned. For me personally, it already paid off a lot from what I could learn! - Yes, I'd love to see the stuff upstream. There seems to be less love by Intel, though, for its socfpga platforms on Linux. ;)
Best,
L
Quoted 4 lines
[...]
Best regards,
TF
RE: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dts
-----Original Message-----
From: Lothar Rubusch <[email protected]>
Sent: Monday, January 27, 2025 6:24 PM
To: Chee, Tien Fong <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Lim, Jit Loon <[email protected]>; [email protected]
Subject: Re: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dts
Quoted 3 lines · Tien Fong
Hi,
Dear Tien Fong Chee,
Quoted 77 lines
-----Original Message-----
From: Lothar Rubusch <[email protected]>
Sent: Saturday, October 26, 2024 11:52 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; Chee, Tien Fong <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Lim, Jit Loon <[email protected]>; [email protected]; [email protected]
Subject: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dtsIntroduce u-boot specific device-tree files for Enclustra Mercury+ AA1 SoMs (Intel/arria10).
Generic device-tree fragments for linux and U-boot shall be provided in dts/upstream. The selection of the generic device-tree fragments depends on a selected boot-mode and a selected carrier board.
On Intel/Arria10 a handoff setup is needed for initialization of various clock / pinmux / DRAM settings only used by U-Boot provided by the current patch.
Signed-off-by Andreas Buerkler <[email protected]>Signed-off-by Lothar Rubusch <[email protected]>--- ..._arria10_enclustra_mercury_aa1-u-boot.dtsi | 45 +++ .../socfpga_arria10_enclustra_mercury_aa1.dts | 45 +++ .../socfpga_arria10_mercury_aa1-u-boot.dtsi | 19 ++ .../dts/socfpga_arria10_mercury_aa1_handoff.h | 305 ++++++++++++++++++ board/enclustra/mercury_aa1/Kconfig | 37 +++ board/enclustra/mercury_aa1/MAINTAINERS | 2 + 6 files changed, 453 insertions(+) create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1.dts create mode 100644 arch/arm/dts/socfpga_arria10_mercury_aa1_handoff.h(quoted diff) +0
-0
a/arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsib/arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsinew file mode 100644
index 0000000000..6e38286572arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi new file +35
-0@@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Copyright (C) 2024 Lothar Rubusch <[email protected]> */ + +/* Arria10 handoff (u-boot) */ +#include "socfpga_arria10_mercury_aa1_handoff.h" +#include "socfpga_arria10-handoff.dtsi" +#include "socfpga_arria10_handoff_u-boot.dtsi" +#include "socfpga_arria10_mercury_aa1-u-boot.dtsi" + +/* Specific boot-mode (u-boot) */ +#if IS_ENABLED(CONFIG_ENCLUSTRA_SDMMC) || +IS_ENABLED(CONFIG_ENCLUSTRA_EMMC) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + phandlepart = <&mmc 1>; + }; +}; + +&fpga_mgr { + bootph-all; + firmware-loader = <&fs_loader0>; + altr,bitstream = "fpga.itb"; +}; + +#elif IS_ENABLED(CONFIG_ENCLUSTRA_QSPI) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + sfconfig = <0 0 50000000 3>;
Quoted 2 lines
The RAW read implementation in
fs_loaderis not upstream yet, I afraid this might not working, you want help to upstream?
Thank you so much for coming back to me! The TL;DR answer is, yes.
Pls, start by fixing Intel platform maintenance in the Linux kernel for old Intel/socfpga.
For the long story, there are several points here which are probably not quite transparent just on u-boot ML. Let me clarify. Personally, I have access to some Enclustra hardware and was curious what it would take to upstream it. This was/is driven mainly by my private interest, since the company gives a ...does not care about open source. As you will easily spot those Intel platforms are not the most recent Intel products either. I picked them a bit on purpose, since I did not want to "mess it up" for that company with my personal upstream in the first approach. If it went upstream, it could be the basis for further Enclustra Hardware i.e. Xilinx/AMD, Microchip and more recent Intel. That's a bit the background and intention.
So, when I started last summer, u-boot community stared with dts upstream. Means, my DTS material needed to be prepared and split up into a linux kernel part and a u-boot part. Due to the bitstream handling and early initialization of registers, also, the u-boot DTS went partly into dts-upstream, and partly into the classic DTS places for he intel/socfpga platform. I managed to implement a dynamically adjusted Enclustra DTS, based kconfig option. At the end of the day, this all resulted in the dependency to have DTS material upstream in the linux kernel repo.
Both patchsets were actually prepared and presented on the MLs. For u-boot, you will find all communication concerning the u-boot patches here on this ML. Where for the kernel patches, I got the more general patches ACK'd. But the Intel maintainer Dinh Nguyen did not manage to give feedback. I was even able to contact Dinh directly, and he gave me back that he plans on doing. This was in fall 2024. No update since then. - Here is, IMHO, where you Intel guys could really help work on solving this situation: Either help out Dinh for the kernel stuff, or organize replacement. Don't get me wrong, this is not meant to be personal. I'm sure he will have good reasons if he cannot carry out this job currently. Means put up someone who will (co-)maintain the old Intel platforms in the Linux kernel. Also, the Intel/socfpga dt-bindings need to be written in YAML, AFAIR. That's why e.g. Rob's DT-check bot will almost blast you with errors with the comment "can be accepted if the specific platform maintainer is willing to". Platform maintainer does not answer, and I'm not willing writing the YAML dt-bindings for ye olde Intel, when there is no maintainer eventually accepting it.. Hence, accepting the Enclustra Intel DTS, would mean to accept them w/o the updated and checked dt-bindings.
For the (technical) rest: I have full access to the hardware, i.e. 3 different Arria10 SOMs of Enclustra, as 2 further Cyclone5 SOMs. All can be combined with 3 different carrier boards of Enclustra. The setups are booting in different boot modes (SD, eMMC and some from QSPI flash). After the DTS separation, (re)implementing the mini-drivers based on u-boot DM, I needed to migrate the setup using binman. Building, flashing and booting into a functional u-boot, is verified for all setups. As you mentioned, parts in the u-boot API are/were still under development, though, but Marek kept me in the loop here (also on ML).
I appreciate your patience, for reading this all. In a conclusion, the products are still sold. Yes, they are a bit ancient.. what eventually blocked it, is IMHO rather kenel maintenance for old Intel platforms which seems orphaned. For me personally, it already paid off a lot from what I could learn! - Yes, I'd love to see the stuff upstream. There seems to be less love by Intel, though, for its socfpga platforms on Linux. ;)
Best,
L
Quoted 4 lines
[...]
Best regards,
TF
RE: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dts
Dear Lothar,
Quoted 175 lines
-----Original Message-----
From: Chee, Tien Fong <[email protected]>
Sent: Monday, March 3, 2025 11:05 AM
To: Lothar Rubusch <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Lim, Jit Loon <[email protected]>; [email protected]; Chee, Tien Fong <[email protected]>
Subject: RE: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u- boot dts-----Original Message-----
From: Lothar Rubusch <[email protected]>
Sent: Monday, January 27, 2025 6:24 PM
To: Chee, Tien Fong <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Lim, Jit Loon <[email protected]>; [email protected]
Subject: Re: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u- boot dtsQuoted 3 lines · Tien Fong
Hi,
Dear Tien Fong Chee,
Quoted 12 lines
-----Original Message-----
From: Lothar Rubusch <[email protected]>
Sent: Saturday, October 26, 2024 11:52 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; Chee, Tien Fong <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Lim, Jit Loon <[email protected]>; [email protected]; [email protected]
Subject: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dtsQuoted 1 line
Introduce u-boot specific device-tree files for Enclustra Mercury+ AA1
SoMs (Intel/arria10).
Quoted 2 lines
Generic device-tree fragments for linux and U-boot shall be provided in
dts/upstream. The selection of the generic device-tree fragments depends on a selected boot-mode and a selected carrier board.
Quoted 2 lines
On Intel/Arria10 a handoff setup is needed for initialization of various clock
/ pinmux / DRAM settings only used by U-Boot provided by the current patch.
Quoted 5 lines
Signed-off-by Andreas Buerkler <[email protected]>Signed-off-by Lothar Rubusch <[email protected]>--- ..._arria10_enclustra_mercury_aa1-u-boot.dtsi | 45+++
.../socfpga_arria10_enclustra_mercury_aa1.dts| 45 +++Quoted 2 lines
.../socfpga_arria10_mercury_aa1-u-boot.dtsi | 19 ++ .../dts/socfpga_arria10_mercury_aa1_handoff.h | 305++++++++++++++++++
Quoted 8 lines
board/enclustra/mercury_aa1/Kconfig | 37 +++ board/enclustra/mercury_aa1/MAINTAINERS | 2 + 6 files changed, 453 insertions(+) create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1.dts create mode 100644
arch/arm/dts/socfpga_arria10_mercury_aa1_handoff.hQuoted 45 lines
diff --git
a/arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsib/arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsinew file mode 100644
index 0000000000..6e38286572arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi new file +35
-0@@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Copyright (C) 2024 Lothar Rubusch <[email protected]> */ + +/* Arria10 handoff (u-boot) */ +#include "socfpga_arria10_mercury_aa1_handoff.h" +#include "socfpga_arria10-handoff.dtsi" +#include "socfpga_arria10_handoff_u-boot.dtsi" +#include "socfpga_arria10_mercury_aa1-u-boot.dtsi" + +/* Specific boot-mode (u-boot) */ +#if IS_ENABLED(CONFIG_ENCLUSTRA_SDMMC) || +IS_ENABLED(CONFIG_ENCLUSTRA_EMMC) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + phandlepart = <&mmc 1>; + }; +}; + +&fpga_mgr { + bootph-all; + firmware-loader = <&fs_loader0>; + altr,bitstream = "fpga.itb"; +}; + +#elif IS_ENABLED(CONFIG_ENCLUSTRA_QSPI) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + sfconfig = <0 0 50000000 3>;Quoted 1 line
The RAW read implementation in
fs_loaderis not upstream yet, I afraid thismight not working, you want help to upstream?
Quoted 1 line
Thank you so much for coming back to me! The TL;DR answer is, yes. Pls, start by fixing Intel platform maintenance in the Linux kernel for old Intel/socfpga.
For the long story, there are several points here which are probably not quite transparent just on u-boot ML. Let me clarify. Personally, I have access to some Enclustra hardware and was curious what it would take to upstream it. This was/is driven mainly by my private interest, since the company gives a ...does not care about open source. As you will easily spot those Intel platforms are not the most recent Intel products either. I picked them a bit on purpose, since I did not want to "mess it up" for that company with my personal upstream in the first approach. If it went upstream, it could be the basis for further Enclustra Hardware i.e. Xilinx/AMD, Microchip and more recent Intel.
That's a bit the background and intention.So, when I started last summer, u-boot community stared with dts upstream. Means, my DTS material needed to be prepared and split up into a linux kernel part and a u-boot part. Due to the bitstream handling and early initialization of registers, also, the u-boot DTS went partly into dts-upstream, and partly into the classic DTS places for he intel/socfpga platform. I managed to implement a dynamically adjusted Enclustra DTS, based kconfig option. At the end of the day, this all resulted in the dependency to have DTS material upstream in the linux kernel repo.
Both patchsets were actually prepared and presented on the MLs. For u- boot, you will find all communication concerning the u-boot patches here on this ML. Where for the kernel patches, I got the more general patches ACK'd. But the Intel maintainer Dinh Nguyen did not manage to give feedback. I was even able to contact Dinh directly, and he gave me back that he plans on doing. This was in fall 2024. No update since then. - Here is, IMHO, where you Intel guys could really help work on solving this situation: Either help out Dinh for the kernel stuff, or organize replacement. Don't get me wrong, this is not meant to be personal. I'm sure he will have good reasons if he cannot carry out this job currently. Means put up someone who will (co-)maintain the old Intel platforms in the Linux kernel. Also, the Intel/socfpga dt-bindings need to be written in YAML, AFAIR. That's why e.g. Rob's DT-check bot will almost blast you with errors with the comment "can be accepted if the specific platform maintainer is willing to".
Platform maintainer does not answer, and I'm not willing writing the YAML dt-bindings for ye olde Intel, when there is no maintainer eventually accepting it.. Hence, accepting the Enclustra Intel DTS, would mean to accept them w/o the updated and checked dt-bindings.For the (technical) rest: I have full access to the hardware, i.e. 3 different Arria10 SOMs of Enclustra, as 2 further Cyclone5 SOMs. All can be combined with 3 different carrier boards of Enclustra. The setups are booting in different boot modes (SD, eMMC and some from QSPI flash). After the DTS separation, (re)implementing the mini-drivers based on u-boot DM, I needed to migrate the setup using binman. Building, flashing and booting into a functional u-boot, is verified for all setups. As you mentioned, parts in the u-boot API are/were still under development, though, but Marek kept me in the loop here (also on ML).
Quoted 7 lines
I appreciate your patience, for reading this all. In a conclusion, the products are still sold. Yes, they are a bit ancient.. what eventually blocked it, is IMHO rather kenel maintenance for old Intel platforms which seems orphaned. For me personally, it already paid off a lot from what I could learn! - Yes, I'd love to see the stuff upstream.
There seems to be less love by Intel, though, for its socfpga platforms on Linux. ;)
Sorry for the late response, I have been following up on this with Kernel team, the transferring ownership is already kicking off, probably Q3 at the earliest. The team is also working on upstreaming the fixes to schema check failures, primarily converting old text version of device tree bindings to yaml.
I will update more once I have more information from them.
Thanks.
Best regards,
Tien Fong
Quoted 9 lines
Best,
LQuoted 4 lines
[...]
Best regards,
TF
Re: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dts
Dear Tien Fong, thank you so much. Please find my answer inlined below.
Quoted 186 lines · Tien Fong
Dear Lothar,
Quoted 175 lines
-----Original Message-----
From: Chee, Tien Fong <[email protected]>
Sent: Monday, March 3, 2025 11:05 AM
To: Lothar Rubusch <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Lim, Jit Loon <[email protected]>; [email protected]; Chee, Tien Fong <[email protected]>
Subject: RE: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u- boot dts-----Original Message-----
From: Lothar Rubusch <[email protected]>
Sent: Monday, January 27, 2025 6:24 PM
To: Chee, Tien Fong <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Lim, Jit Loon <[email protected]>; [email protected]
Subject: Re: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u- boot dtsQuoted 3 lines · Tien Fong
Hi,
Dear Tien Fong Chee,
Quoted 12 lines
-----Original Message-----
From: Lothar Rubusch <[email protected]>
Sent: Saturday, October 26, 2024 11:52 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; Chee, Tien Fong <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Lim, Jit Loon <[email protected]>; [email protected]; [email protected]
Subject: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dtsQuoted 1 line
Introduce u-boot specific device-tree files for Enclustra Mercury+ AA1
SoMs (Intel/arria10).
Quoted 2 lines
Generic device-tree fragments for linux and U-boot shall be provided in
dts/upstream. The selection of the generic device-tree fragments depends on a selected boot-mode and a selected carrier board.
Quoted 2 lines
On Intel/Arria10 a handoff setup is needed for initialization of various clock
/ pinmux / DRAM settings only used by U-Boot provided by the current patch.
Quoted 5 lines
Signed-off-by Andreas Buerkler <[email protected]>Signed-off-by Lothar Rubusch <[email protected]>--- ..._arria10_enclustra_mercury_aa1-u-boot.dtsi | 45+++
.../socfpga_arria10_enclustra_mercury_aa1.dts| 45 +++Quoted 2 lines
.../socfpga_arria10_mercury_aa1-u-boot.dtsi | 19 ++ .../dts/socfpga_arria10_mercury_aa1_handoff.h | 305++++++++++++++++++
Quoted 8 lines
board/enclustra/mercury_aa1/Kconfig | 37 +++ board/enclustra/mercury_aa1/MAINTAINERS | 2 + 6 files changed, 453 insertions(+) create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1.dts create mode 100644
arch/arm/dts/socfpga_arria10_mercury_aa1_handoff.hQuoted 45 lines
diff --git
a/arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsib/arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsinew file mode 100644
index 0000000000..6e38286572arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi new file +35
-0@@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Copyright (C) 2024 Lothar Rubusch <[email protected]> */ + +/* Arria10 handoff (u-boot) */ +#include "socfpga_arria10_mercury_aa1_handoff.h" +#include "socfpga_arria10-handoff.dtsi" +#include "socfpga_arria10_handoff_u-boot.dtsi" +#include "socfpga_arria10_mercury_aa1-u-boot.dtsi" + +/* Specific boot-mode (u-boot) */ +#if IS_ENABLED(CONFIG_ENCLUSTRA_SDMMC) || +IS_ENABLED(CONFIG_ENCLUSTRA_EMMC) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + phandlepart = <&mmc 1>; + }; +}; + +&fpga_mgr { + bootph-all; + firmware-loader = <&fs_loader0>; + altr,bitstream = "fpga.itb"; +}; + +#elif IS_ENABLED(CONFIG_ENCLUSTRA_QSPI) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + sfconfig = <0 0 50000000 3>;Quoted 1 line
The RAW read implementation in
fs_loaderis not upstream yet, I afraid thismight not working, you want help to upstream?
Quoted 1 line
Thank you so much for coming back to me! The TL;DR answer is, yes. Pls, start by fixing Intel platform maintenance in the Linux kernel for old Intel/socfpga.
For the long story, there are several points here which are probably not quite transparent just on u-boot ML. Let me clarify. Personally, I have access to some Enclustra hardware and was curious what it would take to upstream it. This was/is driven mainly by my private interest, since the company gives a ...does not care about open source. As you will easily spot those Intel platforms are not the most recent Intel products either. I picked them a bit on purpose, since I did not want to "mess it up" for that company with my personal upstream in the first approach. If it went upstream, it could be the basis for further Enclustra Hardware i.e. Xilinx/AMD, Microchip and more recent Intel.
That's a bit the background and intention.So, when I started last summer, u-boot community stared with dts upstream. Means, my DTS material needed to be prepared and split up into a linux kernel part and a u-boot part. Due to the bitstream handling and early initialization of registers, also, the u-boot DTS went partly into dts-upstream, and partly into the classic DTS places for he intel/socfpga platform. I managed to implement a dynamically adjusted Enclustra DTS, based kconfig option. At the end of the day, this all resulted in the dependency to have DTS material upstream in the linux kernel repo.
Both patchsets were actually prepared and presented on the MLs. For u- boot, you will find all communication concerning the u-boot patches here on this ML. Where for the kernel patches, I got the more general patches ACK'd. But the Intel maintainer Dinh Nguyen did not manage to give feedback. I was even able to contact Dinh directly, and he gave me back that he plans on doing. This was in fall 2024. No update since then. - Here is, IMHO, where you Intel guys could really help work on solving this situation: Either help out Dinh for the kernel stuff, or organize replacement. Don't get me wrong, this is not meant to be personal. I'm sure he will have good reasons if he cannot carry out this job currently. Means put up someone who will (co-)maintain the old Intel platforms in the Linux kernel. Also, the Intel/socfpga dt-bindings need to be written in YAML, AFAIR. That's why e.g. Rob's DT-check bot will almost blast you with errors with the comment "can be accepted if the specific platform maintainer is willing to".
Platform maintainer does not answer, and I'm not willing writing the YAML dt-bindings for ye olde Intel, when there is no maintainer eventually accepting it.. Hence, accepting the Enclustra Intel DTS, would mean to accept them w/o the updated and checked dt-bindings.For the (technical) rest: I have full access to the hardware, i.e. 3 different Arria10 SOMs of Enclustra, as 2 further Cyclone5 SOMs. All can be combined with 3 different carrier boards of Enclustra. The setups are booting in different boot modes (SD, eMMC and some from QSPI flash). After the DTS separation, (re)implementing the mini-drivers based on u-boot DM, I needed to migrate the setup using binman. Building, flashing and booting into a functional u-boot, is verified for all setups. As you mentioned, parts in the u-boot API are/were still under development, though, but Marek kept me in the loop here (also on ML).
Quoted 7 lines
I appreciate your patience, for reading this all. In a conclusion, the products are still sold. Yes, they are a bit ancient.. what eventually blocked it, is IMHO rather kenel maintenance for old Intel platforms which seems orphaned. For me personally, it already paid off a lot from what I could learn! - Yes, I'd love to see the stuff upstream.
There seems to be less love by Intel, though, for its socfpga platforms on Linux. ;)
Quoted 3 lines
Sorry for the late response, I have been following up on this with Kernel team, the transferring ownership is already kicking off, probably Q3 at the earliest. The team is also working on upstreaming the fixes to schema check failures, primarily converting old text version of device tree bindings to yaml.
I will update more once I have more information from them.
Tien Fong, I highly appreciate coming back to me and letting me know.
Is there a possibility to contribute and help out converting old text files to YAML and/or fixing the schema check failures? This is a huge possibility for me to learn. If so, just let me know, who would be maintainer to be put in CC for the patches (probably mostly on kernel side).
Anyway, let's see during the year.
Best regards,
L
Quoted 15 lines
Thanks.
Best regards,
Tien FongQuoted 9 lines
Best,
LQuoted 4 lines
[...]
Best regards,
TF
RE: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dts
Quoted 225 lines
-----Original Message-----
From: Lothar Rubusch <[email protected]>
Sent: Sunday, March 9, 2025 10:36 PM
To: Chee, Tien Fong <[email protected]>
Cc: Chee, Tien Fong <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Lim, Jit Loon <[email protected]>; [email protected]; Ang, Tien Sung <[email protected]>
Subject: Re: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u- boot dtsDear Tien Fong, thank you so much. Please find my answer inlined below.
Quoted 10 lines · Tien Fong
Dear Lothar,
Quoted 7 lines
-----Original Message-----
From: Chee, Tien Fong <[email protected]>
Sent: Monday, March 3, 2025 11:05 AM
To: Lothar Rubusch <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Lim,Jit
Quoted 7 lines
Quoted 7 lines
Loon <[email protected]>; [email protected]; Chee, Tien Fong <[email protected]>
Subject: RE: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u- boot dtsQuoted 7 lines
Quoted 7 lines
-----Original Message-----
From: Lothar Rubusch <[email protected]>
Sent: Monday, January 27, 2025 6:24 PM
To: Chee, Tien Fong <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Lim,Jit
Quoted 29 lines
Quoted 29 lines
Loon <[email protected]>; [email protected]
Subject: Re: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u- boot dtsQuoted 3 lines · Tien Fong
Hi,
Dear Tien Fong Chee,
Quoted 12 lines
-----Original Message-----
From: Lothar Rubusch <[email protected]>
Sent: Saturday, October 26, 2024 11:52 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; Chee, Tien Fong <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Lim, Jit Loon <[email protected]>; [email protected]; [email protected]
Subject: [PATCH v4 03/11] ARM: dts: socfpga: add Mercury+ AA1 for u-boot dtsQuoted 2 lines
Introduce u-boot specific device-tree files for Enclustra Mercury+ AA1
SoMs (Intel/arria10).
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
Generic device-tree fragments for linux and U-boot shall be provided in
dts/upstream. The selection of the generic device-tree fragments depends on a selected boot-mode and a selected carrier board.
Quoted 3 lines
On Intel/Arria10 a handoff setup is needed for initialization of various clock
/ pinmux / DRAM settings only used by U-Boot provided by the current
patch.
Quoted 18 lines
Quoted 18 lines
Quoted 5 lines
Signed-off-by Andreas Buerkler <[email protected]>Signed-off-by Lothar Rubusch <[email protected]>--- ..._arria10_enclustra_mercury_aa1-u-boot.dtsi | 45+++
.../socfpga_arria10_enclustra_mercury_aa1.dts| 45 +++Quoted 2 lines
.../socfpga_arria10_mercury_aa1-u-boot.dtsi | 19 ++ .../dts/socfpga_arria10_mercury_aa1_handoff.h | 305++++++++++++++++++
Quoted 7 lines
board/enclustra/mercury_aa1/Kconfig | 37 +++ board/enclustra/mercury_aa1/MAINTAINERS | 2 + 6 files changed, 453 insertions(+) create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi create mode 100644 arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1.dts create mode 100644
arch/arm/dts/socfpga_arria10_mercury_aa1_handoff.hQuoted 1 line
Quoted 7 lines
Quoted 7 lines
arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-
Quoted 7 lines
diff --git
a/arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsib/arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsinew file mode 100644
index 0000000000..6e38286572arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u- new file +0
-0boot.dt
Quoted 42 lines
Quoted 42 lines
Quoted 37 lines
+++ si
arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u- new file +34
-0@@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Copyright (C) 2024 Lothar Rubusch <[email protected]> */ + +/* Arria10 handoff (u-boot) */ +#include "socfpga_arria10_mercury_aa1_handoff.h" +#include "socfpga_arria10-handoff.dtsi" +#include "socfpga_arria10_handoff_u-boot.dtsi" +#include "socfpga_arria10_mercury_aa1-u-boot.dtsi" + +/* Specific boot-mode (u-boot) */ #if +IS_ENABLED(CONFIG_ENCLUSTRA_SDMMC) || +IS_ENABLED(CONFIG_ENCLUSTRA_EMMC) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + phandlepart = <&mmc 1>; + }; +}; + +&fpga_mgr { + bootph-all; + firmware-loader = <&fs_loader0>; + altr,bitstream = "fpga.itb"; }; + +#elif IS_ENABLED(CONFIG_ENCLUSTRA_QSPI) + +/ { + fs_loader0: fs-loader { + bootph-all; + compatible = "u-boot,fs-loader"; + sfconfig = <0 0 50000000 3>;Quoted 2 lines
The RAW read implementation in
fs_loaderis not upstream yet, I afraid thismight not working, you want help to upstream?
Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Thank you so much for coming back to me! The TL;DR answer is, yes. Pls, start by fixing Intel platform maintenance in the Linux kernel for old Intel/socfpga.
For the long story, there are several points here which are probably not quite transparent just on u-boot ML. Let me clarify. Personally, I have access to some Enclustra hardware and was curious what it would
take to upstream it.
Quoted 10 lines
Quoted 10 lines
This was/is driven mainly by my private interest, since the company gives a ...does not care about open source. As you will easily spot those Intel platforms are not the most recent Intel products either. I picked them a bit on purpose, since I did not want to "mess it up" for that company with my personal upstream in the first approach. If it went upstream, it could be the basis for further Enclustra Hardware i.e. Xilinx/AMD, Microchip and more recent Intel. That's a bit the background and intention.
So, when I started last summer, u-boot community stared with dts
upstream.
Quoted 7 lines
Quoted 7 lines
Means, my DTS material needed to be prepared and split up into a linux kernel part and a u-boot part. Due to the bitstream handling and early initialization of registers, also, the u-boot DTS went partly into dts-upstream, and partly into the classic DTS places for he intel/socfpga platform. I managed to implement a dynamically adjusted Enclustra DTS, based kconfig option. At the end of the day, this all resulted in the dependency to have DTS material upstream in the
linux kernel repo.
Quoted 4 lines
Quoted 4 lines
Both patchsets were actually prepared and presented on the MLs. For u- boot, you will find all communication concerning the u-boot patches here on this ML. Where for the kernel patches, I got the more
general patches ACK'd.
Quoted 11 lines
Quoted 11 lines
But the Intel maintainer Dinh Nguyen did not manage to give feedback. I was even able to contact Dinh directly, and he gave me back that he plans on doing. This was in fall 2024. No update since then. - Here is, IMHO, where you Intel guys could really help work on solving this situation: Either help out Dinh for the kernel stuff, or organize replacement. Don't get me wrong, this is not meant to be personal. I'm sure he will have good reasons if he cannot carry out this job currently. Means put up someone who will (co-)maintain the old Intel platforms in the Linux kernel. Also, the Intel/socfpga dt-bindings need to be written in YAML, AFAIR. That's why e.g. Rob's DT-check bot will almost blast you with errors with the
comment "can be accepted if the specific platform maintainer is willing to".
Quoted 5 lines
Quoted 5 lines
Platform maintainer does not answer, and I'm not willing writing the YAML dt-bindings for ye olde Intel, when there is no maintainer eventually accepting it.. Hence, accepting the Enclustra Intel DTS, would mean to accept them w/o the updated and checked dt-bindings.
Quoted 10 lines
Quoted 10 lines
For the (technical) rest: I have full access to the hardware, i.e. 3 different
Arria10 SOMs of Enclustra, as 2 further Cyclone5 SOMs. All can be combined with 3 different carrier boards of Enclustra. The setups are booting in different boot modes (SD, eMMC and some from QSPI flash). After the DTS separation, (re)implementing the mini-drivers based on u-boot DM, I needed to migrate the setup using binman. Building, flashing and booting into a functional u-boot, is verified for all setups. As you mentioned, parts in the u-boot API are/were still under development, though, but Marek kept me in the loop here(also on ML).
Quoted 6 lines
Quoted 6 lines
I appreciate your patience, for reading this all. In a conclusion, the products are still sold. Yes, they are a bit ancient.. what eventually blocked it, is IMHO rather kenel maintenance for old Intel platforms which seems orphaned. For me personally, it already paid off a lot from what I could learn! - Yes, I'd love to see the stuff
upstream.
Quoted 4 lines
Quoted 2 lines
There seems to be less love by Intel, though, for its socfpga platforms on Linux. ;)
Sorry for the late response, I have been following up on this with Kernel
team, the transferring ownership is already kicking off, probably Q3 at the earliest. The team is also working on upstreaming the fixes to schema check failures, primarily converting old text version of device tree bindings to yaml.
Quoted 1 line
Quoted 8 lines
Quoted 1 line
I will update more once I have more information from them.
Tien Fong, I highly appreciate coming back to me and letting me know.
Is there a possibility to contribute and help out converting old text files to YAML and/or fixing the schema check failures? This is a huge possibility for me to learn. If so, just let me know, who would be maintainer to be put in CC for the patches (probably mostly on kernel side).
Sure. Adding Matthew [email protected], he will be our SoCFPGA maintainer for Kernel.
Quoted 20 lines
Anyway, let's see during the year.
Best regards,
LQuoted 15 lines
Thanks.
Best regards,
Tien FongQuoted 9 lines
Best,
LQuoted 4 lines
[...]
Best regards,
TF
PATCH v4 4/11 ARM: socfpga: add Enclustra storage switch
In reply to Lothar RubuschSome of Enclustra's Intel SoMs need gpio muxing for setting up the boot media. This can be done by switching dip switches and also in software. The image in this case can be loaded from SD card, and flashed to the eMMC or QSPI. After, the dip switches can set the boot select accordingly. With altera_set_storage MMC|EMMC|QSPI from off the u-boot shell, the media is usually switched.
--- .../socfpga_arria10_enclustra_mercury_aa1.dts | 17 ++ board/enclustra/mercury_aa1/Makefile | 8 + .../mercury_aa1/aa1_set_storage_cmd.c | 190 ++++++++++++++++++ doc/board/enclustra/mercury-aa1.rst | 25 +++ 4 files changed, 240 insertions(+) create mode 100644 board/enclustra/mercury_aa1/Makefile create mode 100644 board/enclustra/mercury_aa1/aa1_set_storage_cmd.c
arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1.dts +17 -0
@@ -5,6 +5,8 @@ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> + /* The arria10 family */ #include "socfpga/socfpga_arria10_mercury_aa1.dtsi"
@@ -17,6 +19,13 @@ i2c1 = &i2c0; spi0 = &qspi; }; + + altera_set_storage { + compatible = "enclustra,altera_set_storage"; + status = "okay"; + oe-gpios = <&portb 5 GPIO_ACTIVE_HIGH>; + sel-gpios = <&portc 6 GPIO_ACTIVE_HIGH>; + }; }; &qspi {
@@ -35,6 +44,14 @@ }; }; +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + /* Carrier board support */ #if IS_ENABLED(CONFIG_ENCLUSTRA_PE1) # include "socfpga/socfpga_enclustra_mercury_pe1.dtsi"
board/enclustra/mercury_aa1/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (c) 2024 Enclustra GmbH + +ifeq ($(CONFIG_SPL_BUILD),) + +obj-y += aa1_set_storage_cmd.o + +endif
board/enclustra/mercury_aa1/aa1_set_storage_cmd.c new file +190 -0
190 lines not on this page · raw message
doc/board/enclustra/mercury-aa1.rst +25 -0
@@ -151,6 +151,31 @@ Alternative boot media are possible as officially documented by Enclustra. Note: eMMC and QSPI can be flashed from off the u-boot shell. Usually after flashing, the correct boot mode needs to be set by a BSEL switch. +In the u-boot shell use the following command to switch between the boot media. +This can be used to flash e.g. eMMC or QSPI with an image file stored on the SD +card. Approaches are described in detail in the official Enclustra +documentation according to their releases mentioned as links. + + .. code-block:: bash + + Hit any key to stop autoboot: 0 + => altera_set_storage + altera_set_storage - Set non volatile memory access + Usage: + altera_set_storage <MMC|QSPI|EMMC> - Set access for the selected memory device + => altera_set_storage QSPI + => sf probe + SF: Detected s25fl512s with page size 256 Bytes, erase size 256 KiB, total 64 MiB + => altera_set_storage MMC + => mmc rescan + => mmc list + mmc@ff808000: 0 (SD) + => altera_set_storage EMMC + => mmc rescan + => mmc list + mmc@ff808000: 0 (eMMC) + => + Before turning on the setup, make sure to have the correct voltage configured at the carrier board, using the jumpers on the voltage pin header. Also make sure to have switched to the correct boot media using typically some dip
Signature · 1 line
2.25.1
PATCH v4 5/11 ARM: socfpga: add Mercury+ AA1 boot scripts
In reply to Lothar RubuschAdd bootscripts to boot Enclustra SoMs from MicroSD card or QSPI flash. MicroSD card as bood device here covers the cases of sdmmc or emmc as such boot media.
--- board/enclustra/bootscripts/qspi-aa1.cmd | 12 ++++++++++++ board/enclustra/bootscripts/sd-aa1.cmd | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 board/enclustra/bootscripts/qspi-aa1.cmd create mode 100644 board/enclustra/bootscripts/sd-aa1.cmd
board/enclustra/bootscripts/qspi-aa1.cmd new file +12 -0
@@ -0,0 +1,12 @@ +# This is an example input file for boot.scr generation. +# Generate boot.scr +# ./tools/mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d board/enclustra/bootscripts/qspi-aa1.cmd boot.scr +# +# Note: The needed variables need to be set in the environment. +bridge enable +sf probe +sf read $kernel_addr_r $qspi_offset_addr_kernel $kernel_size +sf read $fdt_addr_r $qspi_offset_addr_devicetree $fdt_size +sf read $rootfs_addr_r $qspi_offset_addr_rootfs $rootfs_size +run fdtload_qspi +bootm $kernel_addr_r $rootfs_addr_r $fdt_addr_r
board/enclustra/bootscripts/sd-aa1.cmd new file +9 -0
@@ -0,0 +1,9 @@ +# This is an example input file for boot.scr generation. +# Generate boot.scr +# ./tools/mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "U-boot mmc start script" -d board/enclustra/bootscripts/sd-aa1.cmd boot.scr +# +# Note: The needed variables need to be set in the environment. +bridge enable +load mmc $devnum:$distro_bootpart $kernel_addr_r Image +load mmc $devnum:$distro_bootpart $fdt_addr_r $fdtfile +booti $kernel_addr_r - $fdt_addr_r
Signature · 1 line
2.25.1
PATCH v4 6/11 ARM: socfpga: AA1: support MAC from secure eeprom
In reply to Lothar RubuschSeveral Enclustra devices store MAC address in a secure eeprom device. In most cases this is the atsha204a (alternatively DS28). The atsha204a device is preconfigured accordingly. Reading then is based on u-boot's atsha204a driver. Add such support for Enclustra's AA1 SoMs.
--- arch/arm/mach-socfpga/Kconfig | 2 +- board/enclustra/common/Kconfig | 25 +++++ board/enclustra/common/Makefile | 3 + board/enclustra/common/enclustra_mac.h | 48 +++++++++ board/enclustra/common/mac_atsha204.c | 102 ++++++++++++++++++ board/enclustra/common/mac_common.c | 52 +++++++++ board/enclustra/common/mac_ds28.c | 93 ++++++++++++++++ board/enclustra/mercury_aa1/Makefile | 2 + .../mercury_aa1/aa1_board_late_init.c | 17 +++ .../socfpga_enclustra_mercury_aa1_defconfig | 1 + 10 files changed, 344 insertions(+), 1 deletion(-) create mode 100644 board/enclustra/common/Kconfig create mode 100644 board/enclustra/common/enclustra_mac.h create mode 100644 board/enclustra/common/mac_atsha204.c create mode 100644 board/enclustra/common/mac_common.c create mode 100644 board/enclustra/common/mac_ds28.c create mode 100644 board/enclustra/mercury_aa1/aa1_board_late_init.c
arch/arm/mach-socfpga/Kconfig +1 -1
@@ -297,6 +297,6 @@ config SYS_CONFIG_NAME default "socfpga_stratix10_socdk" if TARGET_SOCFPGA_STRATIX10_SOCDK default "socfpga_vining_fpga" if TARGET_SOCFPGA_SOFTING_VINING_FPGA -source "board/enclustra/mercury_aa1/Kconfig" +source "board/enclustra/common/Kconfig" endif
board/enclustra/common/Kconfig new file +25 -0
@@ -0,0 +1,25 @@ +config ENCLUSTRA_EEPROM_MAC + bool "Enclustra MAC address" + select ATSHA204A + depends on TARGET_SOCFPGA_ENCLUSTRA_MERCURY_AA1 + default y + help + Reads the MAC address out of the EEPROM and configures the MAC + addresses in the environment. + +choice + prompt "Enclustra EEPROM device" + depends on ENCLUSTRA_EEPROM_MAC + default ENCLUSTRA_EEPROM_MAC_ATSHA204 if TARGET_SOCFPGA_ENCLUSTRA_MERCURY_AA1 + help + Specify the device where the MAC is stored. + +config ENCLUSTRA_EEPROM_MAC_ATSHA204 + bool "MAC stored in 'ATSHA204'" + +config ENCLUSTRA_EEPROM_MAC_DS28 + bool "MAC stored in 'DS28'" + +endchoice + +source "board/enclustra/mercury_aa1/Kconfig"
board/enclustra/common/Makefile +3 -0
@@ -2,3 +2,6 @@ # Copyright (c) 2024 Enclustra GmbH # Common for several Enclustra modules +obj-$(CONFIG_ENCLUSTRA_EEPROM_MAC) += mac_common.o +obj-$(CONFIG_ENCLUSTRA_EEPROM_MAC_ATSHA204) += mac_atsha204.o +obj-$(CONFIG_ENCLUSTRA_EEPROM_MAC_DS28) += mac_ds28.o
board/enclustra/common/enclustra_mac.h new file +48 -0
48 lines not on this page · raw message
board/enclustra/common/mac_atsha204.c new file +102 -0
102 lines not on this page · raw message
board/enclustra/common/mac_common.c new file +52 -0
52 lines not on this page · raw message
board/enclustra/common/mac_ds28.c new file +93 -0
93 lines not on this page · raw message
board/enclustra/mercury_aa1/Makefile +2 -0
@@ -6,3 +6,5 @@ ifeq ($(CONFIG_SPL_BUILD),) obj-y += aa1_set_storage_cmd.o endif + +obj-y += aa1_board_late_init.o
board/enclustra/mercury_aa1/aa1_board_late_init.c new file +17 -0
@@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright (C) 2024 Enclustra GmbH +* <[email protected]> +*/ + +#include <env.h> +#include <init.h> +#include <dm/uclass.h> +#include <dm.h> + +#include "../common/enclustra_mac.h" + +int board_late_init (void ) +{ +return enclustra_setup_mac_address (); +}
configs/socfpga_enclustra_mercury_aa1_defconfig +1 -0
@@ -28,6 +28,7 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_BOARD_LATE_INIT=y CONFIG_CLOCKS=y CONFIG_SPL_PAD_TO=0x40000 CONFIG_SPL_NO_BSS_LIMIT=y
Signature · 1 line
2.25.1
PATCH v4 7/11 misc: atsha204a: update kconfig description
In reply to Lothar RubuschThe atsha204a crypto chip is not only on the Turris Omnia board. Extend the description of the atsha204a kconfig to cover also other boards. As an example the Enclustra Mercury+ AA1 SoM.
--- drivers/misc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/Kconfig +1 -1
@@ -73,7 +73,7 @@ config ATSHA204A help Enable support for I2C connected Atmel's ATSHA204A CryptoAuthentication module found for example on the Turris Omnia - board. + board and Enclustra SoC FPGA boards. config GATEWORKS_SC bool "Gateworks System Controller Support"
Signature · 1 line
2.25.1
PATCH v4 8/11 ARM: dts: arria10: update according to DTSpec
In reply to Lothar RubuschUpdate node-names according to DTspec. Add labels for compatibility and/or add missing nodes in order to make the file compatible with the corresponding counterpart in dts/upstream. Eventually the u-boot local file then can be replaced by the dts/upstream, and eventually removed.
--- arch/arm/dts/socfpga_arria10.dtsi | 42 ++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 9 deletions(-)
arch/arm/dts/socfpga_arria10.dtsi +33 -9
@@ -15,13 +15,13 @@ #size-cells = <0>; enable-method = "altr,socfpga-a10-smp"; - cpu@0 { + cpu0: cpu@0 { compatible = "arm,cortex-a9"; device_type = "cpu"; reg = <0>; next-level-cache = <&L2>; }; - cpu@1 { + cpu1: cpu@1 { compatible = "arm,cortex-a9"; device_type = "cpu"; reg = <1>;
@@ -29,7 +29,16 @@ }; }; - intc: intc@ffffd000 { + pmu: pmu@ff111000 { + compatible = "arm,cortex-a9-pmu"; + interrupt-parent = <&intc>; + interrupts = <0 124 4>, <0 125 4>; + interrupt-affinity = <&cpu0>, <&cpu1>; + reg = <0xff111000 0x1000>, + <0xff113000 0x1000>; + }; + + intc: interrupt-controller@ffffd000 { compatible = "arm,cortex-a9-gic"; #interrupt-cells = <3>; interrupt-controller;
@@ -73,7 +82,7 @@ }; }; - base_fpga_region { + fpga-region { #address-cells = <0x1>; #size-cells = <0x1>;
@@ -638,7 +647,7 @@ reg = <0xffcfb100 0x80>; }; - L2: l2-cache@fffff000 { + L2: cache-controller@fffff000 { compatible = "arm,pl310-cache"; reg = <0xfffff000 0x1000>; interrupts = <0 18 IRQ_TYPE_LEVEL_HIGH>;
@@ -649,7 +658,7 @@ arm,shared-override; }; - mmc: dwmmc0@ff808000 { + mmc: mmc@ff808000 { #address-cells = <1>; #size-cells = <0>; compatible = "altr,socfpga-dw-mshc";
@@ -662,7 +671,7 @@ status = "disabled"; }; - nand: nand@ffb90000 { + nand: nand-controller@ffb90000 { #address-cells = <1>; #size-cells = <0>; compatible = "altr,socfpga-denali-nand";
@@ -729,6 +738,16 @@ <37 IRQ_TYPE_LEVEL_HIGH>; }; + sdmmca-ecc@ff8c2c00 { + compatible = "altr,socfpga-sdmmc-ecc"; + reg = <0xff8c2c00 0x400>; + altr,ecc-parent = <&mmc>; + interrupts = <15 IRQ_TYPE_LEVEL_HIGH>, + <47 IRQ_TYPE_LEVEL_HIGH>, + <16 IRQ_TYPE_LEVEL_HIGH>, + <48 IRQ_TYPE_LEVEL_HIGH>; + }; + dma-ecc@ff8c8000 { compatible = "altr,socfpga-dma-ecc"; reg = <0xff8c8000 0x400>;
@@ -760,6 +779,11 @@ resets = <&rst QSPI_RESET>, <&rst QSPI_OCP_RESET>; reset-names = "qspi", "qspi-ocp"; status = "disabled"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0x0>; + }; }; rst: rstmgr@ffd05000 {
@@ -828,7 +852,7 @@ reset-names = "timer"; }; - uart0: serial0@ffc02000 { + uart0: serial@ffc02000 { compatible = "snps,dw-apb-uart"; reg = <0xffc02000 0x100>; interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH>;
@@ -839,7 +863,7 @@ status = "disabled"; }; - uart1: serial1@ffc02100 { + uart1: serial@ffc02100 { compatible = "snps,dw-apb-uart"; reg = <0xffc02100 0x100>; interrupts = <0 111 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.25.1
PATCH v4 9/11 ARM: socfpga: update function call to modern API
In reply to Lothar RubuschRemove arguments in the function call. The call's argument list differs from its definition, which breaks compilation. The removed arguments are obtained from device-tree declaration.
--- arch/arm/mach-socfpga/misc_arria10.c | 2 -- 1 file changed, 2 deletions(-)
arch/arm/mach-socfpga/misc_arria10.c +0 -2
@@ -214,8 +214,6 @@ int qspi_flash_software_reset(void)/* Get the flash info */ ret =spi_flash_probe_bus_cs (CONFIG_SF_DEFAULT_BUS ,CONFIG_SF_DEFAULT_CS , -CONFIG_SF_DEFAULT_SPEED , -CONFIG_SF_DEFAULT_MODE , &flash);if (ret) {
Signature · 1 line
2.25.1
PATCH v4 10/11 ARM: socfpga: apply binman approach to fpga parts
In reply to Lothar RubuschConvert the .its based approach to binman instruction covered in the device tree generation. This reduces additional instructions and integrates the former separate build step into building the u-boot.
--- ..._arria10_enclustra_mercury_aa1-u-boot.dtsi | 44 +++++++++++++++++++ arch/arm/mach-socfpga/Kconfig | 1 + board/enclustra/mercury_aa1/fpga.its | 32 -------------- doc/board/enclustra/mercury-aa1.rst | 3 ++ 4 files changed, 48 insertions(+), 32 deletions(-) delete mode 100644 board/enclustra/mercury_aa1/fpga.its
arch/arm/dts/socfpga_arria10_enclustra_mercury_aa1-u-boot.dtsi +44 -0
@@ -18,6 +18,10 @@ compatible = "u-boot,fs-loader"; phandlepart = <&mmc 1>; }; + + binman: binman { + multiple-images; + }; }; &fpga_mgr {
@@ -43,3 +47,43 @@ }; #endif + +&binman { + u-boot { + filename = "fpga.itb"; + + fit { + description = "FIT image with FPGA bistream"; + fit,external-offset = <0>; + #address-cells = <1>; + + images { + fpga-periph-1 { + description = "FPGA peripheral bitstream"; + type = "fpga"; + compression = "none"; + blob-ext { + filename = "bitstream.periph.rbf"; + }; + }; + + fpga-core-1 { + description = "FPGA core bitstream"; + type = "fpga"; + compression = "none"; + blob-ext { + filename = "bitstream.core.rbf"; + }; + }; + }; + + configurations { + default = "config-1"; + config-1 { + description = "Boot with FPGA early IO release config"; + fpga = "fpga-periph-1", "fpga-core-1"; + }; + }; + }; + }; +};
arch/arm/mach-socfpga/Kconfig +1 -0
@@ -186,6 +186,7 @@ config TARGET_SOCFPGA_EBV_SOCRATES config TARGET_SOCFPGA_ENCLUSTRA_MERCURY_AA1 bool "Enclustra Mercury+ AA1" + select BINMAN select TARGET_SOCFPGA_ARRIA10 config TARGET_SOCFPGA_IS1
board/enclustra/mercury_aa1/fpga.its deleted +0 -32
@@ -1,32 +0,0 @@ -/dts-v1/; - -/ { - description = "FIT image with FPGA bistream"; - #address-cells = <1>; - - images { - fpga-periph-1 { - description = "FPGA peripheral bitstream"; - data = /incbin/("../../../bitstream.periph.rbf"); - type = "fpga"; - arch = "arm"; - compression = "none"; - }; - - fpga-core-1 { - description = "FPGA core bitstream"; - data = /incbin/("../../../bitstream.core.rbf"); - type = "fpga"; - arch = "arm"; - compression = "none"; - }; - }; - - configurations { - default = "config-1"; - config-1 { - description = "Boot with FPGA early IO release config"; - fpga = "fpga-periph-1", "fpga-core-1"; - }; - }; -};
doc/board/enclustra/mercury-aa1.rst +3 -0
@@ -66,6 +66,9 @@ Build u-boot. Source your favorite toolchain for ARM first. $ make socfpga_enclustra_mercury_aa1_defconfig $ make -j8 +Note: Call ``make`` with ``NO_PYTHON=1`` where python tools unnecessarily falls +back into additional python setup. + Setup and compile a boot script as needed. Depending on the boot-mode select ``sd-aa1.cmd`` for SD/eMMC, or ``qspi-aa1.cmd`` for QSPI flash.
Signature · 1 line
2.25.1
PATCH v4 11/11 doc: develop: orthographic delights
In reply to Lothar RubuschFix some typos and duplicate words in documentation files.
--- doc/develop/gdb.rst | 2 +- tools/binman/binman.rst | 4 ++-- tools/binman/entries.rst | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 14 deletions(-)
doc/develop/gdb.rst +1 -1
@@ -13,7 +13,7 @@ Similarly QEMU can provide a GDB server. Preparing build --------------- -Building U-Boot with with reduced optimization (-Og) and without link time +Building U-Boot with reduced optimization (-Og) and without link time optimization is recommended for easier debugging:: CONFIG_CC_OPTIMIZE_FOR_DEBUG=y
tools/binman/binman.rst +2 -2
@@ -1047,8 +1047,8 @@ Here, a new 'value' property will be written to the 'hash' node containing the hash of the 'u-boot' entry. Only SHA256 is supported at present. Whole sections can be hased if desired, by adding the 'hash' node to the section. -The has value can be chcked at runtime by hashing the data actually read and -comparing this has to the value in the device tree. +The hash value can be checked at runtime by hashing the data actually read and +comparing this hash to the value in the device tree. Expanded entries
tools/binman/entries.rst +11 -11
@@ -240,7 +240,7 @@ Properties / Entry arguments: lz4: Use lz4 compression (via 'lz4' command-line utility) This entry reads data from a file and places it in the entry. The -default filename is often specified specified by the subclass. See for +default filename is often specified by the subclass. See for example the 'u-boot' entry which provides the filename 'u-boot.bin'. If compression is enabled, an extra 'uncomp-size' property is written to
@@ -286,7 +286,7 @@ Entry: blob-ext-list: List of externally built binary blobs This is like blob-ext except that a number of blobs can be provided, typically with some sort of relationship, e.g. all are DDC parameters. -If any of the external files needed by this llist is missing, binman can +If any of the external files needed by this list is missing, binman can optionally ignore it and produce a broken image with a warning. Args:
@@ -1164,7 +1164,7 @@ Properties / Entry arguments: FMAP is a simple format used by flashrom, an open-source utility for reading and writing the SPI flash, typically on x86 CPUs. The format -provides flashrom with a list of areas, so it knows what it in the flash. +provides flashrom with a list of areas, that it knows what is in the flash. It can then read or write just a single area, instead of the whole flash. The format is defined by the flashrom project, in the file lib/fmap.h -
@@ -1338,7 +1338,7 @@ Properties / Entry arguments: This file contains a binary blob which is used on some devices to set up the silicon. U-Boot executes this code in U-Boot proper after SDRAM is running, so that it can make full use of memory. Documentation is typically -not available in sufficient detail to allow U-Boot do this this itself. +not available in sufficient detail to allow U-Boot do this itself. An example filename is 'fsp_s.bin'
@@ -1411,7 +1411,7 @@ Properties / Entry arguments: This file contains code used by the SoC that is required to make it work. The Management Engine is like a background task that runs things that are not clearly documented, but may include keyboard, display and network -access. For platform that use ME it is not possible to disable it. U-Boot +access. For platforms using ME, it is not possible to disable it. U-Boot does not directly execute code in the ME binary. A typical filename is 'me.bin'.
@@ -2303,8 +2303,8 @@ to avoid the data overlapping with U-Boot variables. This entry is useful in that case. It automatically pads out the entry size to cover both the code, data and BSS. -The contents of this entry will a certain number of zero bytes, determined -by __bss_size +The contents of this entry will be filled up with a number of zero bytes, +determined by __bss_size The ELF file 'spl/u-boot-spl' must also be available for this to work, since binman uses that to look up the BSS address.
@@ -2479,8 +2479,8 @@ to avoid the data overlapping with U-Boot variables. This entry is useful in that case. It automatically pads out the entry size to cover both the code, data and BSS. -The contents of this entry will a certain number of zero bytes, determined -by __bss_size +The contents of this entry will be filled up with a number of zero bytes, +determined by __bss_size The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since binman uses that to look up the BSS address.
@@ -2678,8 +2678,8 @@ to avoid the data overlapping with U-Boot variables. This entry is useful in that case. It automatically pads out the entry size to cover both the code, data and BSS. -The contents of this entry will a certain number of zero bytes, determined -by __bss_size +The contents of this entry will be filled up with a number of zero bytes, +determined by __bss_size The ELF file 'vpl/u-boot-vpl' must also be available for this to work, since binman uses that to look up the BSS address.
Signature · 1 line
2.25.1
Re: [PATCH v4 11/11] doc: develop: orthographic delights
Hi Lothar
Quoted 9 lines · Lothar Rubusch
Fix some typos and duplicate words in documentation files.
Signed-off-by Lothar Rubusch <[email protected]>--- doc/develop/gdb.rst | 2 +- tools/binman/binman.rst | 4 ++-- tools/binman/entries.rst | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 14 deletions(-)
Thank you for doing this.
For binman, could you send as a separate patch? Also, the 'entries.rst' file is actually generated automatically from the different entry files. So you should fix those files and then regenerate the entries.rst file per [1]
Regards,
Simon
[1] https://docs.u-boot.org/en/latest/develop/package/binman.html#entry-documentation