aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Majewski <lukma@denx.de>2018-05-20 08:33:14 +0200
committerStefano Babic <sbabic@denx.de>2018-06-18 16:42:04 +0200
commit642c1f519a693989f07d1c43f50bd47bafb53422 (patch)
tree0d8569f5dfdd493203ffeccbf7b21e53eb11de86
parentfaab193ea2a8992b18026318f36cc7139b4ca1b5 (diff)
downloadu-boot-642c1f519a693989f07d1c43f50bd47bafb53422.zip
u-boot-642c1f519a693989f07d1c43f50bd47bafb53422.tar.gz
u-boot-642c1f519a693989f07d1c43f50bd47bafb53422.tar.bz2
board: imx53: Always disable display before starting kernel
This patch prevents from the situation where we may end up with garbage displayed on the LCD panel. Such situation occurs when one performs "reboot -f" in Linux and then stop in U-boot (or observe the garbage on the screen during boot up). To prevent from such situation - the PWM pin is configured as GPIO and set to LOW. Signed-off-by: Lukasz Majewski <lukma@denx.de>
-rw-r--r--arch/arm/dts/imx53-kp.dts2
-rw-r--r--board/k+p/kp_imx53/kp_imx53.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/dts/imx53-kp.dts b/arch/arm/dts/imx53-kp.dts
index fd64a9f..6322ef1 100644
--- a/arch/arm/dts/imx53-kp.dts
+++ b/arch/arm/dts/imx53-kp.dts
@@ -86,6 +86,8 @@
MX53_PAD_PATA_DA_2__GPIO7_8 0x1e4
/* BOOSTER_OFF */
MX53_PAD_EIM_CS0__GPIO2_23 0x1e4
+ /* LCD BACKLIGHT */
+ MX53_PAD_GPIO_1__GPIO1_1 0x1e4
>;
};
diff --git a/board/k+p/kp_imx53/kp_imx53.c b/board/k+p/kp_imx53/kp_imx53.c
index c80eed3..6b0db6b 100644
--- a/board/k+p/kp_imx53/kp_imx53.c
+++ b/board/k+p/kp_imx53/kp_imx53.c
@@ -22,6 +22,7 @@
#define VBUS_PWR_EN IMX_GPIO_NR(7, 8)
#define PHY_nRST IMX_GPIO_NR(7, 6)
#define BOOSTER_OFF IMX_GPIO_NR(2, 23)
+#define LCD_BACKLIGHT IMX_GPIO_NR(1, 1)
DECLARE_GLOBAL_DATA_PTR;
@@ -189,10 +190,17 @@ void eth_phy_reset(void)
udelay(50);
}
+void board_disable_display(void)
+{
+ gpio_request(LCD_BACKLIGHT, "LCD_BACKLIGHT");
+ gpio_direction_output(LCD_BACKLIGHT, 0);
+}
+
int board_late_init(void)
{
int ret = 0;
+ board_disable_display();
setup_ups();
if (!power_init())