Skip to contentSkip to conversation

arm: mvebu: helios-4: add config fragment for spi booting et al

PATCH In review Josua Mayer 4 participants 10 messages Feb 2, 2024 – Mar 5, 2024 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

v2 cover 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.

---
Changes in v2:
- replaced new defconfig with config fragment in board directory
(suggested by Tom Rini <[email protected]>)
- Link to v1: https://lore.kernel.org/r/[email protected]

---
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,

Signature · 1 line
Josua Mayer <[email protected]>
#1 lore raw

PATCH v2 1/3 arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus

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.

---
 arch/arm/dts/armada-38x-solidrun-microsom.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/dts/armada-38x-solidrun-microsom.dtsi +5 -0
index f6ae784bed..1540162e03 100644
@@ -99,6 +99,11 @@
 };
 
 &i2c0 {
+	clock-frequency = <400000>;
+	pinctrl-0 = <&i2c0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+
 	eeprom@53 {
 		compatible = "atmel,24c02";
 		reg = <0x53>;
Signature · 1 line
2.35.3
#2 lore raw

Re: [PATCH v2 1/3] arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus

Quoted 5 lines · Josua Mayer

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.

Quoted 7 lines

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.

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 11 lines
---
  arch/arm/dts/armada-38x-solidrun-microsom.dtsi | 5 +++++
  1 file changed, 5 insertions(+)
arch/arm/dts/armada-38x-solidrun-microsom.dtsi +0 -0
index f6ae784bed..1540162e03 100644
@@ -99,6 +99,11 @@
  };

arch/arm/dts/armada-38x-solidrun-microsom.dtsi line 109

Quoted 10 lines
arch/arm/dts/armada-38x-solidrun-microsom.dtsi +5 -0
 
  &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

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#3 lore raw

PATCH v2 2/3 arm: mvebu: helios4_defconfig: enable setexpr command

In reply to Josua Mayer

Update the helios4 defconfig to enable the 'setexpr' command, which is a default and useful for various complex boot-scripts.

---
 configs/helios4_defconfig | 1 -
 1 file changed, 1 deletion(-)
configs/helios4_defconfig +0 -1
index 04194004f0..73f0638344 100644
@@ -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
Signature · 1 line
2.35.3
#4 lore raw

Re: [PATCH v2 2/3] arm: mvebu: helios4_defconfig: enable setexpr command

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

Quoted 25 lines · Josua Mayer

Update the helios4 defconfig to enable the 'setexpr' command, which is a default and useful for various complex boot-scripts.

---
 configs/helios4_defconfig | 1 -
 1 file changed, 1 deletion(-)
configs/helios4_defconfig +0 -2
index 04194004f0..73f0638344 100644
@@ -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

Signature · 2 lines
Dennis Gilmore
Senior Manager Systems Enablement OpenShift Development
#5 lore raw

Re: [PATCH v2 2/3] arm: mvebu: helios4_defconfig: enable setexpr command

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:

Quoted 35 lines

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 <[email protected]> wrote:

Update the helios4 defconfig to enable the 'setexpr' command, which is a default and useful for various complex boot-scripts.

---
 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

Signature · 2 lines
Dennis Gilmore
Senior Manager Systems Enablement OpenShift Development
#6 lore raw

Re: [PATCH v2 2/3] arm: mvebu: helios4_defconfig: enable setexpr command

In reply to Josua Mayer
Quoted 4 lines · Josua Mayer

Update the helios4 defconfig to enable the 'setexpr' command, which is a default and useful for various complex boot-scripts.

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 10 lines
---
  configs/helios4_defconfig | 1 -
  1 file changed, 1 deletion(-)
configs/helios4_defconfig +0 -0
index 04194004f0..73f0638344 100644

configs/helios4_defconfig CONFIG_CMD_MMC=y · line 49

Quoted 7 lines
configs/helios4_defconfig +0 -1
@@ -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

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#7 lore raw

PATCH v2 3/3 board: helios-4: add config fragment for spi booting

In reply to Josua Mayer

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#L59

The fragment can be applied on top of helios4_defconfig by make:
make helios4_defconfig spiboot.config

---
 board/kobol/helios4/spiboot.config | 4 ++++
 1 file changed, 4 insertions(+)
board/kobol/helios4/spiboot.config new file +4 -0
new file mode 100644
index 0000000000..5ffb7d2e3b
@@ -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
Signature · 1 line
2.35.3
#8 lore raw

Re: [PATCH v2 3/3] board: helios-4: add config fragment for spi booting

Quoted 6 lines · Josua Mayer

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#L59

Quoted 6 lines

The fragment can be applied on top of helios4_defconfig by make:
make helios4_defconfig spiboot.config

---
 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!

Signature · 1 line
Tom
#9 lore raw

Re: [PATCH v2 3/3] board: helios-4: add config fragment for spi booting

In reply to Josua Mayer
Quoted 10 lines · Josua Mayer

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#L59

The fragment can be applied on top of helios4_defconfig by make:
make helios4_defconfig spiboot.config

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 11 lines
---
  board/kobol/helios4/spiboot.config | 4 ++++
  1 file changed, 4 insertions(+)
board/kobol/helios4/spiboot.config new file +0 -0
new file mode 100644
index 0000000000..5ffb7d2e3b

board/kobol/helios4/spiboot.config line 4

Quoted 4 lines
board/kobol/helios4/spiboot.config new file +4 -0
@@ -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

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]