Skip to contentSkip to conversation

ARM: dts: imxrt1050: allow this dtsi file to be compiled in Linux

PATCH Superseded Giulio Benetti 3 participants 13 messages Apr 8, 2020 – Apr 19, 2020

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

PATCH v3 16/19 ARM: dts: imxrt1050: allow this dtsi file to be compiled in Linux

Linux doesn't provide skeleton.dtsi file so let's remove its include and provide #address-cells/size-cells = <1> that were defined in skeleton.dtsi before.

---
 arch/arm/dts/imxrt1050.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/dts/imxrt1050.dtsi +3 -1
index 0123f4788c..7cfe5f5c95 100644
@@ -4,7 +4,6 @@
  * Author(s): Giulio Benetti <[email protected]>
  */
 
-#include "skeleton.dtsi"
 #include "armv7-m.dtsi"
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/imxrt1050-clock.h>
@@ -12,6 +11,9 @@
 #include <dt-bindings/memory/imxrt-sdram.h>
 
 / {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
 	aliases {
 		display0 = &lcdif;
 		gpio0 = &gpio1;
Signature · 1 line
2.20.1
#1 lore raw

PATCH v3 17/19 arch: arm: dts: imxrt1050-evk: add lcdif node

Add lcdif node and its pinctrl.

---
 arch/arm/dts/imxrt1050-evk.dts | 60 ++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
arch/arm/dts/imxrt1050-evk.dts +60 -0
index 56b75986e2..b5e781275e 100644
@@ -185,6 +185,33 @@
 					0x17061
 			>;
 		};
+
+		pinctrl_lcdif: lcdifgrp {
+			u-boot,dm-spl;
+			fsl,pins = <
+				MXRT1050_IOMUXC_GPIO_B0_00_LCD_CLK		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_01_LCD_ENABLE		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_02_LCD_HSYNC		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_03_LCD_VSYNC		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_04_LCD_DATA00		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_05_LCD_DATA01		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_06_LCD_DATA02		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_07_LCD_DATA03		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_08_LCD_DATA04		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_09_LCD_DATA05		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_10_LCD_DATA06		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_11_LCD_DATA07		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_12_LCD_DATA08		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_13_LCD_DATA09		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_14_LCD_DATA10		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B0_15_LCD_DATA11		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B1_01_LCD_DATA13		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B1_02_LCD_DATA14		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B1_03_LCD_DATA15		0x1b0b1
+				MXRT1050_IOMUXC_GPIO_B1_15_GPIO2_IO31		0x0b069
+				MXRT1050_IOMUXC_GPIO_AD_B0_02_GPIO1_IO02	0x0b069
+			>;
+		};
 	};
 };
 
@@ -198,3 +225,36 @@
 
 	cd-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
 };
+
+&lcdif {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_lcdif>;
+	display = <&display0>;
+	status = "okay";
+
+	assigned-clocks = <&clks IMXRT1050_CLK_LCDIF_SEL>;
+	assigned-clock-parents = <&clks IMXRT1050_CLK_PLL5_VIDEO>;
+
+	display0: display0 {
+		bits-per-pixel = <16>;
+		bus-width = <16>;
+
+		display-timings {
+			timing0: timing0 {
+				clock-frequency = <9300000>;
+				hactive = <480>;
+				vactive = <272>;
+				hback-porch = <4>;
+				hfront-porch = <8>;
+				vback-porch = <4>;
+				vfront-porch = <8>;
+				hsync-len = <41>;
+				vsync-len = <10>;
+				de-active = <1>;
+				pixelclk-active = <0>;
+				hsync-active = <0>;
+				vsync-active = <0>;
+			};
+		};
+	};
+};
Signature · 1 line
2.20.1
#3 lore raw

PATCH v3 17/19 arch: arm: dts: imxrt1050-evk: add lcdif node

In reply to Giulio Benetti
Quoted 3 lines

Add lcdif node and its pinctrl.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#4 lore raw

PATCH v3 18/19 configs: imxrt1050-evk: enable video support/console

In reply to Giulio Benetti

Enable DM_VIDEO subsystem and its BACKLIGHT_GPIO. Then enable SYS_WHITE_ON_BLACK to have classic black background on display. Need also to enable CONFIG_SYS_CONSOLE_ENV_OVERWRITE to retrieve stdin/stdout/stderr from CONFIG_EXTRA_ENV_SETTINGS.

---
 configs/imxrt1050-evk_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
configs/imxrt1050-evk_defconfig +4 -0
index 71970552c0..810f391fdc 100644
@@ -17,6 +17,7 @@ CONFIG_SPL_TEXT_BASE=0x20209000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SD_BOOT=y
 # CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_BOARD_INIT=y
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
@@ -62,6 +63,9 @@ CONFIG_IMXRT_SDRAM=y
 CONFIG_FSL_LPUART=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
+CONFIG_DM_VIDEO=y
+CONFIG_BACKLIGHT_GPIO=y
+CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_SHA1=y
 CONFIG_SHA256=y
 CONFIG_HEXDUMP=y
Signature · 1 line
2.20.1
#5 lore raw

PATCH v3 18/19 configs: imxrt1050-evk: enable video support/console

Quoted 6 lines · On Wed, 8 Apr 2020 17:11:07 +0200 Giulio Benetti giulio.benetti at…

Enable DM_VIDEO subsystem and its BACKLIGHT_GPIO. Then enable SYS_WHITE_ON_BLACK to have classic black background on display. Need also to enable CONFIG_SYS_CONSOLE_ENV_OVERWRITE to retrieve stdin/stdout/stderr from CONFIG_EXTRA_ENV_SETTINGS.

--
Anatolij

#6 lore raw

PATCH v3 18/19 configs: imxrt1050-evk: enable video support/console

In reply to Giulio Benetti
Quoted 6 lines

Enable DM_VIDEO subsystem and its BACKLIGHT_GPIO. Then enable SYS_WHITE_ON_BLACK to have classic black background on display. Need also to enable CONFIG_SYS_CONSOLE_ENV_OVERWRITE to retrieve stdin/stdout/stderr from CONFIG_EXTRA_ENV_SETTINGS.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#7 lore raw

PATCH v3 19/19 configs: imxrt1050-evk: temporary disable DCACHE

In reply to Giulio Benetti

mxsfb needs a dcache function not implemented in cortex-M7, so for the moment let's keep dcache not enabled.

---
 configs/imxrt1050-evk_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/imxrt1050-evk_defconfig +2 -0
index 810f391fdc..25d0ba191c 100644
@@ -1,4 +1,6 @@
 CONFIG_ARM=y
+CONFIG_SYS_DCACHE_OFF=y
+# CONFIG_SPL_SYS_DCACHE_OFF is not set
 CONFIG_ARCH_IMXRT=y
 CONFIG_SYS_TEXT_BASE=0x80002000
 CONFIG_SPL_GPIO_SUPPORT=y
Signature · 1 line
2.20.1
#9 lore raw

PATCH v3 19/19 configs: imxrt1050-evk: temporary disable DCACHE

Thank you Anatolij

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 13 lines · Anatolij Gustschin
Quoted 4 lines · On Wed, 8 Apr 2020 17:11:08 +0200 Giulio Benetti giulio.benetti at…

mxsfb needs a dcache function not implemented in cortex-M7, so for the moment let's keep dcache not enabled.

--
Anatolij

#10 lore raw

PATCH v3 19/19 configs: imxrt1050-evk: temporary disable DCACHE

In reply to Giulio Benetti
Quoted 4 lines

mxsfb needs a dcache function not implemented in cortex-M7, so for the moment let's keep dcache not enabled.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#11 lore raw

PATCH v3 16/19 ARM: dts: imxrt1050: allow this dtsi file to be compiled in Linux

In reply to Giulio Benetti
Quoted 5 lines · On Wed, 8 Apr 2020 17:11:05 +0200 Giulio Benetti giulio.benetti at…

Linux doesn't provide skeleton.dtsi file so let's remove its include and provide #address-cells/size-cells = <1> that were defined in skeleton.dtsi before.

--
Anatolij

#12 lore raw

PATCH v3 16/19 ARM: dts: imxrt1050: allow this dtsi file to be compiled in Linux

In reply to Giulio Benetti
Quoted 5 lines

Linux doesn't provide skeleton.dtsi file so let's remove its include and provide #address-cells/size-cells = <1> that were defined in skeleton.dtsi before.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================