U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mux: Drop usage of "u-boot,mux-autoprobe"
@ 2024-01-31 13:33 Roger Quadros
  2024-01-31 13:33 ` [PATCH 1/3] mux: autoprobe if "idle-states" present in device tree Roger Quadros
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Roger Quadros @ 2024-01-31 13:33 UTC (permalink / raw)
  To: trini, nm
  Cc: vigneshr, s-vadapalli, srk, r-gunasekaran, u-boot, 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.

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] mux: autoprobe if "idle-states" present in device tree
  2024-01-31 13:33 [PATCH 0/3] mux: Drop usage of "u-boot,mux-autoprobe" Roger Quadros
@ 2024-01-31 13:33 ` Roger Quadros
  2024-01-31 13:33 ` [PATCH 2/3] arm: dts: k3-u-boot: Drop usage of "u-boot, mux-autoprobe" Roger Quadros
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Roger Quadros @ 2024-01-31 13:33 UTC (permalink / raw)
  To: trini, nm
  Cc: vigneshr, s-vadapalli, srk, r-gunasekaran, u-boot, Roger Quadros

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.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 drivers/mux/mux-uclass.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mux/mux-uclass.c b/drivers/mux/mux-uclass.c
index c98576ceb8..8833888ded 100644
--- a/drivers/mux/mux-uclass.c
+++ b/drivers/mux/mux-uclass.c
@@ -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",
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] arm: dts: k3-u-boot: Drop usage of "u-boot, mux-autoprobe"
  2024-01-31 13:33 [PATCH 0/3] mux: Drop usage of "u-boot,mux-autoprobe" Roger Quadros
  2024-01-31 13:33 ` [PATCH 1/3] mux: autoprobe if "idle-states" present in device tree Roger Quadros
@ 2024-01-31 13:33 ` Roger Quadros
  2024-01-31 13:33 ` [PATCH 3/3] arm: dts: k3-u-boot: Add missing "bootph-all" property to MUX nodes Roger Quadros
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Roger Quadros @ 2024-01-31 13:33 UTC (permalink / raw)
  To: trini, nm
  Cc: vigneshr, s-vadapalli, srk, r-gunasekaran, u-boot, Roger Quadros

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

Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 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(-)

diff --git a/arch/arm/dts/k3-am642-sk-u-boot.dtsi b/arch/arm/dts/k3-am642-sk-u-boot.dtsi
index 2eb227c1d0..f3ed376ab7 100644
--- a/arch/arm/dts/k3-am642-sk-u-boot.dtsi
+++ b/arch/arm/dts/k3-am642-sk-u-boot.dtsi
@@ -184,10 +184,6 @@
 	bootph-all;
 };
 
-&serdes_ln_ctrl {
-	u-boot,mux-autoprobe;
-};
-
 &usbss0 {
 	bootph-all;
 };
diff --git a/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi b/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi
index 017a5a722e..f83caf7998 100644
--- a/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi
+++ b/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi
@@ -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 {
diff --git a/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi b/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
index 7ae7cf3d4c..b77f8d92de 100644
--- a/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
@@ -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;
 };
diff --git a/arch/arm/dts/k3-j721e-sk-u-boot.dtsi b/arch/arm/dts/k3-j721e-sk-u-boot.dtsi
index 479b7bcd6f..370fe5190b 100644
--- a/arch/arm/dts/k3-j721e-sk-u-boot.dtsi
+++ b/arch/arm/dts/k3-j721e-sk-u-boot.dtsi
@@ -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;
 };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] arm: dts: k3-u-boot: Add missing "bootph-all" property to MUX nodes.
  2024-01-31 13:33 [PATCH 0/3] mux: Drop usage of "u-boot,mux-autoprobe" Roger Quadros
  2024-01-31 13:33 ` [PATCH 1/3] mux: autoprobe if "idle-states" present in device tree Roger Quadros
  2024-01-31 13:33 ` [PATCH 2/3] arm: dts: k3-u-boot: Drop usage of "u-boot, mux-autoprobe" Roger Quadros
@ 2024-01-31 13:33 ` Roger Quadros
  2024-01-31 14:14 ` [PATCH 0/3] mux: Drop usage of "u-boot,mux-autoprobe" Tom Rini
  2024-02-29  3:05 ` Tom Rini
  4 siblings, 0 replies; 6+ messages in thread
From: Roger Quadros @ 2024-01-31 13:33 UTC (permalink / raw)
  To: trini, nm
  Cc: vigneshr, s-vadapalli, srk, r-gunasekaran, u-boot, 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.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 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(+)

diff --git a/arch/arm/dts/k3-am642-sk-u-boot.dtsi b/arch/arm/dts/k3-am642-sk-u-boot.dtsi
index f3ed376ab7..ea200a1ee1 100644
--- a/arch/arm/dts/k3-am642-sk-u-boot.dtsi
+++ b/arch/arm/dts/k3-am642-sk-u-boot.dtsi
@@ -184,6 +184,10 @@
 	bootph-all;
 };
 
+&serdes_ln_ctrl {
+	bootph-all;
+};
+
 &usbss0 {
 	bootph-all;
 };
diff --git a/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi b/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
index b77f8d92de..9433f3bafa 100644
--- a/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
@@ -93,6 +93,14 @@
 	bootph-all;
 };
 
+&serdes_ln_ctrl {
+	bootph-all;
+};
+
+&usb_serdes_mux {
+	bootph-all;
+};
+
 &main_usbss0_pins_default {
 	bootph-all;
 };
diff --git a/arch/arm/dts/k3-j721e-sk-u-boot.dtsi b/arch/arm/dts/k3-j721e-sk-u-boot.dtsi
index 370fe5190b..fff447094a 100644
--- a/arch/arm/dts/k3-j721e-sk-u-boot.dtsi
+++ b/arch/arm/dts/k3-j721e-sk-u-boot.dtsi
@@ -89,6 +89,14 @@
 	bootph-all;
 };
 
+&serdes_ln_ctrl {
+	bootph-all;
+};
+
+&usb_serdes_mux {
+	bootph-all;
+};
+
 &main_usbss0_pins_default {
 	bootph-all;
 };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] mux: Drop usage of "u-boot,mux-autoprobe"
  2024-01-31 13:33 [PATCH 0/3] mux: Drop usage of "u-boot,mux-autoprobe" Roger Quadros
                   ` (2 preceding siblings ...)
  2024-01-31 13:33 ` [PATCH 3/3] arm: dts: k3-u-boot: Add missing "bootph-all" property to MUX nodes Roger Quadros
@ 2024-01-31 14:14 ` Tom Rini
  2024-02-29  3:05 ` Tom Rini
  4 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2024-01-31 14:14 UTC (permalink / raw)
  To: Roger Quadros; +Cc: nm, vigneshr, s-vadapalli, srk, r-gunasekaran, u-boot

[-- Attachment #1: Type: text/plain, Size: 273 bytes --]

On Wed, Jan 31, 2024 at 03:33:45PM +0200, Roger Quadros wrote:

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

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] mux: Drop usage of "u-boot,mux-autoprobe"
  2024-01-31 13:33 [PATCH 0/3] mux: Drop usage of "u-boot,mux-autoprobe" Roger Quadros
                   ` (3 preceding siblings ...)
  2024-01-31 14:14 ` [PATCH 0/3] mux: Drop usage of "u-boot,mux-autoprobe" Tom Rini
@ 2024-02-29  3:05 ` Tom Rini
  4 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2024-02-29  3:05 UTC (permalink / raw)
  To: nm, Roger Quadros; +Cc: vigneshr, s-vadapalli, srk, r-gunasekaran, u-boot

On Wed, 31 Jan 2024 15:33:45 +0200, Roger Quadros wrote:

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

-- 
Tom



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-29  3:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-31 13:33 [PATCH 0/3] mux: Drop usage of "u-boot,mux-autoprobe" Roger Quadros
2024-01-31 13:33 ` [PATCH 1/3] mux: autoprobe if "idle-states" present in device tree Roger Quadros
2024-01-31 13:33 ` [PATCH 2/3] arm: dts: k3-u-boot: Drop usage of "u-boot, mux-autoprobe" Roger Quadros
2024-01-31 13:33 ` [PATCH 3/3] arm: dts: k3-u-boot: Add missing "bootph-all" property to MUX nodes Roger Quadros
2024-01-31 14:14 ` [PATCH 0/3] mux: Drop usage of "u-boot,mux-autoprobe" Tom Rini
2024-02-29  3:05 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox