[PATCH v2 0/3] arm: mvebu: helios-4: add config fragment for spi booting et al

This patch-set introduces a new config fragment for spi booting on kobol helios-4.
Additionally add minor update for default defconfig to enable setexpr command, and fix u-boot command access to i2c0 bus.
Signed-off-by: Josua Mayer josua@solid-run.com --- Changes in v2: - replaced new defconfig with config fragment in board directory (suggested by Tom Rini trini@konsulko.com) - Link to v1: https://lore.kernel.org/r/20240113-helios4-spi-v1-0-2a5663a10e6a@solid-run.c...
--- Josua Mayer (3): arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus arm: mvebu: helios4_defconfig: enable setexpr command board: helios-4: add config fragment for spi booting
arch/arm/dts/armada-38x-solidrun-microsom.dtsi | 5 +++++ board/kobol/helios4/spiboot.config | 4 ++++ configs/helios4_defconfig | 1 - 3 files changed, 9 insertions(+), 1 deletion(-) --- base-commit: 050a9b981d6a835133521b599be3ae189ce70f41 change-id: 20240113-helios4-spi-144085c0bbc7
Sincerely,

SolidRun Armada-388 SoM has an i2c bus supporting on-som eeprom, and peripherals on a carrier. armada-38x.dtsi disables this bus by default, it should be enabled by som or carrier dts.
Linux has moved i2c0 from helios-4 board dts to som dtsi, including status, pinctrl and clock speed. Copy these settings from mainline.
This fixes accessing i2c bus from u-boot commandline.
Signed-off-by: Josua Mayer josua@solid-run.com --- arch/arm/dts/armada-38x-solidrun-microsom.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/armada-38x-solidrun-microsom.dtsi b/arch/arm/dts/armada-38x-solidrun-microsom.dtsi index f6ae784bed..1540162e03 100644 --- a/arch/arm/dts/armada-38x-solidrun-microsom.dtsi +++ b/arch/arm/dts/armada-38x-solidrun-microsom.dtsi @@ -99,6 +99,11 @@ };
&i2c0 { + clock-frequency = <400000>; + pinctrl-0 = <&i2c0_pins>; + pinctrl-names = "default"; + status = "okay"; + eeprom@53 { compatible = "atmel,24c02"; reg = <0x53>;

On 2/2/24 16:13, Josua Mayer wrote:
SolidRun Armada-388 SoM has an i2c bus supporting on-som eeprom, and peripherals on a carrier. armada-38x.dtsi disables this bus by default, it should be enabled by som or carrier dts.
Linux has moved i2c0 from helios-4 board dts to som dtsi, including status, pinctrl and clock speed. Copy these settings from mainline.
This fixes accessing i2c bus from u-boot commandline.
Signed-off-by: Josua Mayer josua@solid-run.com
Applied to u-boot-marvell/master
Thanks, Stefan
arch/arm/dts/armada-38x-solidrun-microsom.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/armada-38x-solidrun-microsom.dtsi b/arch/arm/dts/armada-38x-solidrun-microsom.dtsi index f6ae784bed..1540162e03 100644 --- a/arch/arm/dts/armada-38x-solidrun-microsom.dtsi +++ b/arch/arm/dts/armada-38x-solidrun-microsom.dtsi @@ -99,6 +99,11 @@ };
&i2c0 {
- clock-frequency = <400000>;
- pinctrl-0 = <&i2c0_pins>;
- pinctrl-names = "default";
- status = "okay";
- eeprom@53 { compatible = "atmel,24c02"; reg = <0x53>;
Viele Grüße, Stefan Roese

Update the helios4 defconfig to enable the 'setexpr' command, which is a default and useful for various complex boot-scripts.
Signed-off-by: Josua Mayer josua@solid-run.com --- configs/helios4_defconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index 04194004f0..73f0638344 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -44,7 +44,6 @@ CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TFTPPUT=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y

I am curious about your use cases for this. as ideally all systems use the generic distro boot paths and it is not needed for them.
Dennis
On Fri, Feb 2, 2024 at 9:13 AM Josua Mayer josua@solid-run.com wrote:
Update the helios4 defconfig to enable the 'setexpr' command, which is a default and useful for various complex boot-scripts.
Signed-off-by: Josua Mayer josua@solid-run.com
configs/helios4_defconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index 04194004f0..73f0638344 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -44,7 +44,6 @@ CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TFTPPUT=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y
-- 2.35.3

Hi Dennis,
Use-case is with separate boot and rootfs partitions to calculate next partition number as argument for further commands:
setexpr openwrt_rootpart ${distro_bootpart} + 1 part uuid ${devtype} ${devnum}:${openwrt_rootpart} uuid setenv bootargs ${bootargs} root=PARTUUID=${uuid} rootfstype=auto rootwait
- Josua Mayer
Am 12.02.24 um 21:40 schrieb Dennis Gilmore:
I am curious about your use cases for this. as ideally all systems use the generic distro boot paths and it is not needed for them.
Dennis
On Fri, Feb 2, 2024 at 9:13 AM Josua Mayer josua@solid-run.com wrote:
Update the helios4 defconfig to enable the 'setexpr' command, which is a default and useful for various complex boot-scripts. Signed-off-by: Josua Mayer <josua@solid-run.com> --- configs/helios4_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index 04194004f0..73f0638344 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -44,7 +44,6 @@ CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TFTPPUT=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y -- 2.35.3
-- Dennis Gilmore Senior Manager Systems Enablement OpenShift Development

On 2/2/24 16:13, Josua Mayer wrote:
Update the helios4 defconfig to enable the 'setexpr' command, which is a default and useful for various complex boot-scripts.
Signed-off-by: Josua Mayer josua@solid-run.com
Applied to u-boot-marvell/master
Thanks, Stefan
configs/helios4_defconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index 04194004f0..73f0638344 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -44,7 +44,6 @@ CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TFTPPUT=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y
Viele Grüße, Stefan Roese

Add a config fragment with required differences for booting from spi flash instead of sd-card (default).
Settings for environment location are based on vendor u-boot: https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L5...
The fragment can be applied on top of helios4_defconfig by make: make helios4_defconfig spiboot.config
Signed-off-by: Josua Mayer josua@solid-run.com --- board/kobol/helios4/spiboot.config | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/board/kobol/helios4/spiboot.config b/board/kobol/helios4/spiboot.config new file mode 100644 index 0000000000..5ffb7d2e3b --- /dev/null +++ b/board/kobol/helios4/spiboot.config @@ -0,0 +1,4 @@ +CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI=y +# CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC is not set +CONFIG_ENV_OFFSET=0x100000 +CONFIG_ENV_SECT_SIZE=0x10000

On Fri, Feb 02, 2024 at 04:13:34PM +0100, Josua Mayer wrote:
Add a config fragment with required differences for booting from spi flash instead of sd-card (default).
Settings for environment location are based on vendor u-boot: https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L5...
The fragment can be applied on top of helios4_defconfig by make: make helios4_defconfig spiboot.config
Signed-off-by: Josua Mayer josua@solid-run.com
board/kobol/helios4/spiboot.config | 4 ++++
Can you please follow-up by adding doc/board/kobol/ content (and adding to the index and making sure make htmldocs is happy) ? Thanks!

On 2/2/24 16:13, Josua Mayer wrote:
Add a config fragment with required differences for booting from spi flash instead of sd-card (default).
Settings for environment location are based on vendor u-boot: https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L5...
The fragment can be applied on top of helios4_defconfig by make: make helios4_defconfig spiboot.config
Signed-off-by: Josua Mayer josua@solid-run.com
Applied to u-boot-marvell/master
Thanks, Stefan
board/kobol/helios4/spiboot.config | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/board/kobol/helios4/spiboot.config b/board/kobol/helios4/spiboot.config new file mode 100644 index 0000000000..5ffb7d2e3b --- /dev/null +++ b/board/kobol/helios4/spiboot.config @@ -0,0 +1,4 @@ +CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI=y +# CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC is not set +CONFIG_ENV_OFFSET=0x100000 +CONFIG_ENV_SECT_SIZE=0x10000
Viele Grüße, Stefan Roese
participants (4)
-
Dennis Gilmore
-
Josua Mayer
-
Stefan Roese
-
Tom Rini