Skip to contentSkip to conversation

arm64: dts: imx91-var-som-symphony: fix RGB_SEL handling

PATCH Applied Stefano Radaelli 3 participants 4 messages May 29 – Jun 3

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

PATCH 1/1 arm64: dts: imx91-var-som-symphony: fix RGB_SEL handling

From: Stefano Radaelli <[email protected]>

RGB_SEL is a board-level signal driven by the PCAL6408 GPIO expander on the Symphony carrier board.

The signal needs to be driven high on the i.MX91 variant to keep the board in the expected display configuration. Move the handling of this line from a fixed regulator tied to the PCAL6408 supply to a GPIO hog on the correct GPIO expander.

Fixes b3292129dcef ("arm64: dts: imx91-var-som: Add support for Variscite Symphony board")
---
 .../dts/freescale/imx91-var-som-symphony.dts     | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/freescale/imx91-var-som-symphony.dts +8 -8
index ac9fed58357e..c1e6c9978275 100644
@@ -97,13 +97,6 @@ reg_fec_phy: regulator-fec-phy {
 		regulator-always-on;
 	};
 
-	reg_rgb_sel: regulator-rgb-enable {
-		compatible = "regulator-fixed";
-		regulator-name = "RGBSEL";
-		gpio = <&pca9534 7 GPIO_ACTIVE_HIGH>;
-		enable-active-high;
-	};
-
 	reg_usdhc2_vmmc: regulator-usdhc2 {
 		compatible = "regulator-fixed";
 		regulator-name = "VSD_3V3";
@@ -258,7 +251,6 @@ pca6408: gpio@21 {
 		#interrupt-cells = <2>;
 		interrupt-parent = <&gpio2>;
 		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
-		vcc-supply = <&reg_rgb_sel>;
 		wakeup-source;
 
 		tpm-enable-hog {
@@ -267,6 +259,14 @@ tpm-enable-hog {
 			output-high;
 			line-name = "tpm_en";
 		};
+
+		/* RGB_SEL */
+		lvds-brg-enable-hog {
+			gpio-hog;
+			gpios = <7 GPIO_ACTIVE_HIGH>;
+			output-high;
+			line-name = "lvds_brg_en";
+		};
 	};
 
 	/* USB Type-C Controller */
Signature · 1 line
2.47.3
maintainer
#1 lore raw
Quoted 9 lines · Stefano Radaelli

From: Stefano Radaelli <[email protected]>

RGB_SEL is a board-level signal driven by the PCAL6408 GPIO expander on the Symphony carrier board.

The signal needs to be driven high on the i.MX91 variant to keep the board in the expected display configuration. Move the handling of this line from a fixed regulator tied to the PCAL6408 supply to a GPIO hog on the correct GPIO expander.

Look like this can't resolve your problem. gpio driver may probe later than display, so gpio-hog may not set correct when display setup.

Frank

Quoted 51 lines
Fixes b3292129dcef ("arm64: dts: imx91-var-som: Add support for Variscite Symphony board")
---
 .../dts/freescale/imx91-var-som-symphony.dts     | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/freescale/imx91-var-som-symphony.dts +8 -9
index ac9fed58357e..c1e6c9978275 100644
@@ -97,13 +97,6 @@ reg_fec_phy: regulator-fec-phy {
 		regulator-always-on;
 	};
 
-	reg_rgb_sel: regulator-rgb-enable {
-		compatible = "regulator-fixed";
-		regulator-name = "RGBSEL";
-		gpio = <&pca9534 7 GPIO_ACTIVE_HIGH>;
-		enable-active-high;
-	};
-
 	reg_usdhc2_vmmc: regulator-usdhc2 {
 		compatible = "regulator-fixed";
 		regulator-name = "VSD_3V3";
@@ -258,7 +251,6 @@ pca6408: gpio@21 {
 		#interrupt-cells = <2>;
 		interrupt-parent = <&gpio2>;
 		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
-		vcc-supply = <&reg_rgb_sel>;
 		wakeup-source;
 
 		tpm-enable-hog {
@@ -267,6 +259,14 @@ tpm-enable-hog {
 			output-high;
 			line-name = "tpm_en";
 		};
+
+		/* RGB_SEL */
+		lvds-brg-enable-hog {
+			gpio-hog;
+			gpios = <7 GPIO_ACTIVE_HIGH>;
+			output-high;
+			line-name = "lvds_brg_en";
+		};
 	};
 
 	/* USB Type-C Controller */
--

2.47.3

#2 lore raw

Hi Frank,

Quoted 11 lines · Frank Li
Quoted 9 lines · Stefano Radaelli

From: Stefano Radaelli <[email protected]>

RGB_SEL is a board-level signal driven by the PCAL6408 GPIO expander on the Symphony carrier board.

The signal needs to be driven high on the i.MX91 variant to keep the board in the expected display configuration. Move the handling of this line from a fixed regulator tied to the PCAL6408 supply to a GPIO hog on the correct GPIO expander.

Quoted 5 lines

Look like this can't resolve your problem. gpio driver may probe later than display, so gpio-hog may not set correct when display setup.

Frank

Quoted 1 line

thanks for looking at this.

The main issue I am trying to fix here is that the current upstream DT describes RGB_SEL on the wrong GPIO expander.

The existing DT drives RGB_SEL from pca9534 GPIO 7 and also uses it as a fake supply for the pca6408. That is not correct for this board. RGB_SEL is actually connected to pca6408 GPIO 7, so the current description does not drive the intended line at all.

With this change, RGB_SEL is driven by the correct GPIO controller and this fixes the hardware configuration issue I am seeing on the i.MX91 Symphpony board, making it working now as expected.

Best Regards,
Stefano

#3 lore raw
In reply to Stefano Radaelli

From: Frank Li <[email protected]>

Quoted 9 lines · Stefano Radaelli

RGB_SEL is a board-level signal driven by the PCAL6408 GPIO expander on the Symphony carrier board.

The signal needs to be driven high on the i.MX91 variant to keep the board in the expected display configuration. Move the handling of this line from a fixed regulator tied to the PCAL6408 supply to a GPIO hog on the correct GPIO expander.

[...]

Applied, thanks!

[1/1] arm64: dts: imx91-var-som-symphony: fix RGB_SEL handling

      commit: b3801c6dd15f9dfebeba25b2308dd5143016d52d

Best regards,

Signature · 1 line
Frank Li <[email protected]>