Skip to contentSkip to conversation

mux: Drop usage of "u-boot,mux-autoprobe"

PATCH In review Roger Quadros 2 participants 6 messages Jan 31, 2024 – Feb 29, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover mux: Drop usage of "u-boot,mux-autoprobe"

Hi,

MUX driver should autoprobe if the device tree has "idle-states" property. Drop using the custom "u-boot,mux-autoprobe" property in TI device trees.

cheers,
-roger

Roger Quadros (3):
mux: autoprobe if "idle-states" present in device tree
arm: dts: k3-u-boot: Drop usage of "u-boot,mux-autoprobe"
arm: dts: k3-u-boot: Add missing "bootph-all" property to MUX nodes.

 arch/arm/dts/k3-am642-sk-u-boot.dtsi                | 2 +-
 arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi    | 2 --
 arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi | 4 ++--
 arch/arm/dts/k3-j721e-sk-u-boot.dtsi                | 4 ++--
 drivers/mux/mux-uclass.c                            | 3 ++-
 5 files changed, 7 insertions(+), 8 deletions(-)

base-commit: 28760ce8640ff6266bd1c1c568a4a231576f3919

Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/3 mux: autoprobe if "idle-states" present in device tree

Some platforms need the MUX state to be auto initialized at boot time even if there are no explicit users for the MUX. In these cases, the MUX device tree has "idle-states" property which specifies what state the MUX should be initialized to.

So far we were relying on custom u-boot property "u-boot,mux-autoprobe" to autoprobe such MUXes. This patch causes the MUX to autoprobe if it has "idle-states" property in device tree.

This should allow us to stop using the custom "u-boot,mux-autoprobe" property.

---
 drivers/mux/mux-uclass.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mux/mux-uclass.c +2 -1
index c98576ceb8..8833888ded 100644
@@ -318,7 +318,8 @@ int dm_mux_init(void)
 		return ret;
 	}
 	uclass_foreach_dev(dev, uc) {
-		if (dev_read_bool(dev, "u-boot,mux-autoprobe")) {
+		if (dev_read_bool(dev, "u-boot,mux-autoprobe") ||
+		    dev_read_bool(dev, "idle-states")) {
 			ret = device_probe(dev);
 			if (ret)
 				log_debug("unable to probe device %s\n",
Signature · 1 line
2.34.1
#3 lore raw

PATCH 3/3 arm: dts: k3-u-boot: Add missing "bootph-all" property to MUX nodes.

In reply to Roger Quadros

As it is present for USB and USB won't work without the MUX initialized correctly, add "bootph-all" property to MUX nodes.

---
 arch/arm/dts/k3-am642-sk-u-boot.dtsi                | 4 ++++
 arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi | 8 ++++++++
 arch/arm/dts/k3-j721e-sk-u-boot.dtsi                | 8 ++++++++
 3 files changed, 20 insertions(+)
arch/arm/dts/k3-am642-sk-u-boot.dtsi +4 -0
index f3ed376ab7..ea200a1ee1 100644
@@ -184,6 +184,10 @@
 	bootph-all;
 };
 
+&serdes_ln_ctrl {
+	bootph-all;
+};
+
 &usbss0 {
 	bootph-all;
 };
arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +8 -0
index b77f8d92de..9433f3bafa 100644
@@ -93,6 +93,14 @@
 	bootph-all;
 };
 
+&serdes_ln_ctrl {
+	bootph-all;
+};
+
+&usb_serdes_mux {
+	bootph-all;
+};
+
 &main_usbss0_pins_default {
 	bootph-all;
 };
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +8 -0
index 370fe5190b..fff447094a 100644
@@ -89,6 +89,14 @@
 	bootph-all;
 };
 
+&serdes_ln_ctrl {
+	bootph-all;
+};
+
+&usb_serdes_mux {
+	bootph-all;
+};
+
 &main_usbss0_pins_default {
 	bootph-all;
 };
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/3 arm: dts: k3-u-boot: Drop usage of "u-boot, mux-autoprobe"

In reply to Roger Quadros

MUX driver should autoprobe if the device tree has "idle-states" property. Drop using the custom "u-boot,mux-autoprobe" property.

---
 arch/arm/dts/k3-am642-sk-u-boot.dtsi                | 4 ----
 arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi    | 2 --
 arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi | 8 --------
 arch/arm/dts/k3-j721e-sk-u-boot.dtsi                | 8 --------
 4 files changed, 22 deletions(-)
arch/arm/dts/k3-am642-sk-u-boot.dtsi +0 -4
index 2eb227c1d0..f3ed376ab7 100644
@@ -184,10 +184,6 @@
 	bootph-all;
 };
 
-&serdes_ln_ctrl {
-	u-boot,mux-autoprobe;
-};
-
 &usbss0 {
 	bootph-all;
 };
arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi +0 -2
index 017a5a722e..f83caf7998 100644
@@ -165,7 +165,6 @@
 
 &serdes_ln_ctrl {
 	bootph-all;
-	u-boot,mux-autoprobe;
 };
 
 &serdes2_usb_link {
@@ -174,7 +173,6 @@
 
 &usb_serdes_mux {
 	bootph-all;
-	u-boot,mux-autoprobe;
 };
 
 &serdes_wiz2 {
arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +0 -8
index 7ae7cf3d4c..b77f8d92de 100644
@@ -93,14 +93,6 @@
 	bootph-all;
 };
 
-&serdes_ln_ctrl {
-	u-boot,mux-autoprobe;
-};
-
-&usb_serdes_mux {
-	u-boot,mux-autoprobe;
-};
-
 &main_usbss0_pins_default {
 	bootph-all;
 };
arch/arm/dts/k3-j721e-sk-u-boot.dtsi +0 -8
index 479b7bcd6f..370fe5190b 100644
@@ -89,14 +89,6 @@
 	bootph-all;
 };
 
-&serdes_ln_ctrl {
-	u-boot,mux-autoprobe;
-};
-
-&usb_serdes_mux {
-	u-boot,mux-autoprobe;
-};
-
 &main_usbss0_pins_default {
 	bootph-all;
 };
Signature · 1 line
2.34.1
#4 lore raw
In reply to Roger Quadros
Quoted 5 lines · Roger Quadros

Hi,

MUX driver should autoprobe if the device tree has "idle-states" property. Drop using the custom "u-boot,mux-autoprobe" property in TI device trees.

Thanks for doing this.

Signature · 1 line
Tom
#5 lore raw
In reply to Roger Quadros
Quoted 8 lines · Roger Quadros

MUX driver should autoprobe if the device tree has "idle-states" property. Drop using the custom "u-boot,mux-autoprobe" property in TI device trees.

cheers,
-roger

[...]

Applied to u-boot/next, thanks!

Signature · 1 line
Tom