diff mbox

[4/4] ARM: dts: am335x-boneblack: Convert BGR from LCDC to RGB in tda19988

Message ID 3eb463f87642bfcbfa44cf4e8abc6cc8abadab18.1471334845.git.jsarha@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jyri Sarha Aug. 16, 2016, 9:24 a.m. UTC
Convert BGR from LCDC to RGB in tda19988 with video-ports property.
The red and blue components are reversed between 24 and 16 bit modes
on color output of am335x LCDC. On BBB the 16 bit video output is by
default RGB and 24 is BGR. This patch reverts that using tda19988 so
we have a 24 bit RGB mode and 16 BGR mode.

The commit also adds blue-and-red-wiring = "crossed" -property to LCDC
node. This change is functionally redundant as "crossed" is the
default mode if the property does not exist, but it makes the reason
for tda19988 video-port property mode explicit.

If you want to get 16 RGB mode (and 24 BGR mode), set tda19988
video-ports -property to 0x230145 and tilcdc blue-and-red-wiring
-property to "straight".

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 arch/arm/boot/dts/am335x-boneblack.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox

Patch

diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts
index 528559b..a745962 100644
--- a/arch/arm/boot/dts/am335x-boneblack.dts
+++ b/arch/arm/boot/dts/am335x-boneblack.dts
@@ -90,6 +90,14 @@ 
 
 &lcdc {
 	status = "okay";
+
+	/* If you want to get 16 RGB and 24 BGR mode instead of
+	 * current 24 bit RGB and 16 BGR modes, set this property to
+	 * "straight" and the tda19988 video-ports -property bellow
+	 * to 0x230145 (or remove the property).
+	 */
+	blue-and-red-wiring = "crossed";
+
 	port {
 		lcdc_0: endpoint@0 {
 			remote-endpoint = <&hdmi_0>;
@@ -106,6 +114,9 @@ 
 		pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
 		pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
 
+		/* Convert 24bit BGR to RGB, e.g. cross red and blue wiring */
+		video-ports = <0x234501>;
+
 		#sound-dai-cells = <0>;
 		audio-ports = <	TDA998x_I2S	0x03>;