Skip to contentSkip to conversation

Enable MUX_MMIO at SPL stage

PATCH In review Anurag Dutta 3 participants 8 messages Mar 20, 2025 – Apr 6, 2025 Multiplexer

lore
Share & tools
lore
#0 lore raw

cover Enable MUX_MMIO at SPL stage

This series enables MUX_MMIO at SPL stage for j7200 and j721e as it is required for successful hyperflash boot.

Test logs :
https://gist.github.com/anuragdutta731/b4c79ef8da56d8c50b38d953c9da4d45

Anurag Dutta (3):
mux: Kconfig: Add Kconfig options for MUX_MMIO
configs: j7200_evm_a72_defconfig: Enable MUX_MMIO at SPL
configs: j721e_evm_a72_defconfig: Enable MUX_MMIO at SPL

 configs/j7200_evm_a72_defconfig |  1 +
 configs/j721e_evm_a72_defconfig |  1 +
 drivers/mux/Kconfig             | 10 ++++++++++
 3 files changed, 12 insertions(+)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/3 mux: Kconfig: Add Kconfig options for MUX_MMIO

Add Kconfig options for MUX_MMIO so that it can be enabled in SPL stage.

---
 drivers/mux/Kconfig | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/mux/Kconfig +10 -0
index f15ee4f833f..2b95eb02177 100644
@@ -10,6 +10,16 @@ config MULTIPLEXER
 
 if MULTIPLEXER
 
+config SPL_MUX_MMIO
+	bool "MMIO register bitfield-controlled Multiplexer"
+        depends on MULTIPLEXER && SYSCON
+        help
+          MMIO register bitfield-controlled Multiplexer controller.
+
+          The driver builds multiplexer controllers for bitfields in a syscon
+          register. For N bit wide bitfields, there will be 2^N possible
+          multiplexer states.
+
 config MUX_MMIO
 	bool "MMIO register bitfield-controlled Multiplexer"
 	depends on MULTIPLEXER && SYSCON
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH 1/3] mux: Kconfig: Add Kconfig options for MUX_MMIO

Hi Anurag,

Quoted 13 lines · Anurag Dutta

Add Kconfig options for MUX_MMIO so that it can be enabled in SPL stage.

---
 drivers/mux/Kconfig | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/mux/Kconfig +0 -0
index f15ee4f833f..2b95eb02177 100644

drivers/mux/Kconfig config MULTIPLEXER · line 15

Quoted 6 lines
drivers/mux/Kconfig +3 -0
@@ -10,6 +10,16 @@ config MULTIPLEXER
 
 if MULTIPLEXER
 
+config SPL_MUX_MMIO
+	bool "MMIO register bitfield-controlled Multiplexer"
+        depends on MULTIPLEXER && SYSCON

Indentation seems to be off

Quoted 10 lines
drivers/mux/Kconfig +7 -0
+        help
+          MMIO register bitfield-controlled Multiplexer controller.
+
+          The driver builds multiplexer controllers for bitfields in a syscon
+          register. For N bit wide bitfields, there will be 2^N possible
+          multiplexer states.
+
 config MUX_MMIO
 	bool "MMIO register bitfield-controlled Multiplexer"
 	depends on MULTIPLEXER && SYSCON
Signature · 2 lines
Thanking You
Neha Malcom Francis
#3 lore raw

Re: [PATCH 1/3] mux: Kconfig: Add Kconfig options for MUX_MMIO

In reply to Anurag Dutta
Quoted 19 lines · Anurag Dutta

Add Kconfig options for MUX_MMIO so that it can be enabled in SPL stage.

---
 drivers/mux/Kconfig | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/mux/Kconfig +3 -0
index f15ee4f833f..2b95eb02177 100644
@@ -10,6 +10,16 @@ config MULTIPLEXER
 
 if MULTIPLEXER
 
+config SPL_MUX_MMIO
+	bool "MMIO register bitfield-controlled Multiplexer"
+        depends on MULTIPLEXER && SYSCON

drivers/mux/Kconfig config MULTIPLEXER · line 25

Quoted 10 lines
drivers/mux/Kconfig +7 -0
+        help
+          MMIO register bitfield-controlled Multiplexer controller.
+
+          The driver builds multiplexer controllers for bitfields in a syscon
+          register. For N bit wide bitfields, there will be 2^N possible
+          multiplexer states.
+
 config MUX_MMIO
 	bool "MMIO register bitfield-controlled Multiplexer"
 	depends on MULTIPLEXER && SYSCON

Maybe I'm missing something but what is this config supposed to do exactly? It only depends on a couple of configs (is not selecting them) and I don't see it doing anything in the code.

Signature · 2 lines
Thanking You
Neha Malcom Francis
#4 lore raw

Re: [PATCH 1/3] mux: Kconfig: Add Kconfig options for MUX_MMIO

In reply to Anurag Dutta
Quoted 19 lines · Anurag Dutta

Add Kconfig options for MUX_MMIO so that it can be enabled in SPL stage.

---
 drivers/mux/Kconfig | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/mux/Kconfig +3 -0
index f15ee4f833f..2b95eb02177 100644
@@ -10,6 +10,16 @@ config MULTIPLEXER
 
 if MULTIPLEXER
 
+config SPL_MUX_MMIO
+	bool "MMIO register bitfield-controlled Multiplexer"
+        depends on MULTIPLEXER && SYSCON

drivers/mux/Kconfig config MULTIPLEXER · line 25

Quoted 10 lines
drivers/mux/Kconfig +7 -0
+        help
+          MMIO register bitfield-controlled Multiplexer controller.
+
+          The driver builds multiplexer controllers for bitfields in a syscon
+          register. For N bit wide bitfields, there will be 2^N possible
+          multiplexer states.
+
 config MUX_MMIO
 	bool "MMIO register bitfield-controlled Multiplexer"
 	depends on MULTIPLEXER && SYSCON

First, "config SPL_FOO" should follow "config FOO". Second, "config MUX_MMIO" is written wrong because doing:

if MULTIPLEXER

config MUX_MMIO

	bool "..."
	depends on MULTIPLEXER

endif

Is redundant. Lets fix that and then not repeat it when adding SPL_MUX_MMIO.

Next, it should be "default y if MUX_MMIO" _unless_ it's really not going to be needed in most cases, and then yes, what you did is right.

Finally, SPL_MUX_MMIO should depend on SPL_SYSCON as that symbol does exist.

Thanks.

Signature · 1 line
Tom
#5 lore raw

PATCH 2/3 configs: j7200_evm_a72_defconfig: Enable MUX_MMIO at SPL

In reply to Anurag Dutta

MUX_MMIO is required in SPL stage in order to boot hyperflash successfully. Add configs to enable MUX_MMIO in SPL stage.

---
 configs/j7200_evm_a72_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/j7200_evm_a72_defconfig +1 -0
index 4760f7509f5..b167e2dcdc9 100644
@@ -144,6 +144,7 @@ CONFIG_SPI_FLASH_S28HX_T=y
 CONFIG_SPI_FLASH_MTD=y
 CONFIG_MULTIPLEXER=y
 CONFIG_MUX_MMIO=y
+CONFIG_SPL_MUX_MMIO=y
 CONFIG_PHY_TI_DP83869=y
 CONFIG_PHY_FIXED=y
 CONFIG_TI_AM65_CPSW_NUSS=y
Signature · 1 line
2.34.1
#6 lore raw

PATCH 3/3 configs: j721e_evm_a72_defconfig: Enable MUX_MMIO at SPL

In reply to Anurag Dutta

MUX_MMIO is required in SPL stage in order to boot hyperflash successfully. Add configs to enable MUX_MMIO in SPL stage.

---
 configs/j721e_evm_a72_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/j721e_evm_a72_defconfig +1 -0
index 71e6c2061b3..6bc716650cf 100644
@@ -151,6 +151,7 @@ CONFIG_SPI_FLASH_MT35XU=y
 CONFIG_SPI_FLASH_MTD=y
 CONFIG_MULTIPLEXER=y
 CONFIG_MUX_MMIO=y
+CONFIG_SPL_MUX_MMIO=y
 CONFIG_PHY_TI_DP83867=y
 CONFIG_PHY_FIXED=y
 CONFIG_TI_AM65_CPSW_NUSS=y
Signature · 1 line
2.34.1
#7 lore raw
In reply to Anurag Dutta
Quoted 6 lines · Anurag Dutta

This series enables MUX_MMIO at SPL stage for j7200 and j721e as it is required for successful hyperflash boot.

Test logs :
https://gist.github.com/anuragdutta731/b4c79ef8da56d8c50b38d953c9da4d45

Quoted 6 lines

Anurag Dutta (3):
mux: Kconfig: Add Kconfig options for MUX_MMIO
configs: j7200_evm_a72_defconfig: Enable MUX_MMIO at SPL
configs: j721e_evm_a72_defconfig: Enable MUX_MMIO at SPL

[...]

Applied to u-boot/next, thanks!

[1/3] mux: Kconfig: Add Kconfig options for MUX_MMIO

      commit: 9b838d0d7b619e1c8f67a0df930d2a53c33e8431
[2/3] configs: j7200_evm_a72_defconfig: Enable MUX_MMIO at SPL
      commit: a434bcfbe68d44c6b4c4b7cd27b2bdc3081684e2
[3/3] configs: j721e_evm_a72_defconfig: Enable MUX_MMIO at SPL
      commit: d042761ec0043bd4fe9466bed5e2852ff5a8166a
Signature · 1 line
Tom