Skip to contentSkip to conversation

Add support am335, Guardian

PATCH New Gireesh.Hiremath at in.bosch.com 2 participants 13 messages Jan 6, 2021 – Jan 17, 2021 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

cover Add support am335, Guardian

From: Gireesh Hiremath <[email protected]>

add support for backlight, splash screen, tftp_load_addr in environment add memtest cmd, swi logic, dhcp fail info
add ubi fastmap support
update pinmux, code clean up

Gireesh Hiremath (8):
am335x, guardian: Enable backlight
am335x, guardian: Enable splash screen
am335x, guardian: configs: add ubi fastmap support am335x, guardian: cmd: add memtest configs am335x,guardian: display DHCP Failed on lcd when dhcp fails during
boot
am335x, guardian: update swi logic
am335x, guardian: set environment variable autoload to no am335x, guardian: code cleanup and boot optimization

Moses Christopher (2):
am335x, guardian: set tftp_load_addr in environment am335x, guardian: Update pinmux configuration

 arch/arm/dts/am335x-guardian.dts  |   6 +-
 board/bosch/guardian/board.c      | 139 ++++++++++++++++++++++++------
 configs/am335x_guardian_defconfig |  11 ++-
 include/configs/am335x_guardian.h |  24 +++++-
 4 files changed, 149 insertions(+), 31 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/10 am335x, guardian: Enable backlight

From: Gireesh Hiremath <[email protected]>

Enable backlight,set brightness value and dimming frequency

---
 board/bosch/guardian/board.c      | 26 ++++++++++++++++++++++++++
 include/configs/am335x_guardian.h |  1 +
 2 files changed, 27 insertions(+)
board/bosch/guardian/board.c +26 -0
index f3e616d21c..a34262bd13 100644
@@ -245,6 +245,31 @@ err:
 	env_set("swi_status", "err");
 }
 
+void lcdbacklight_en(void)
+{
+	unsigned long brightness = env_get_ulong("backlight_brightness", 10, 50);
+
+	if (brightness > 99 || brightness == 0)
+		brightness = 99;
+
+	/*
+	 * Brightness range:
+	 * WLEDCTRL2 DUTY[6:0]
+	 *
+	 * 000 0000b = 1%
+	 * 000 0001b = 2%
+	 * ...
+	 * 110 0010b = 99%
+	 * 110 0011b = 100%
+	 *
+	 */
+
+	tps65217_reg_write(TPS65217_PROT_LEVEL_NONE, TPS65217_WLEDCTRL2,
+			   brightness, 0xFF);
+	tps65217_reg_write(TPS65217_PROT_LEVEL_NONE, TPS65217_WLEDCTRL1,
+			   brightness != 0 ? 0x0A : 0x02, 0xFF);
+}
+
 int board_late_init(void)
 {
 	int ret;
@@ -261,6 +286,7 @@ int board_late_init(void)
 		return ret;
 	}
 
+	lcdbacklight_en();
 	return 0;
 }
 #endif /* CONFIG_BOARD_LATE_INIT */
include/configs/am335x_guardian.h +1 -0
index c34c07a493..236be1a093 100644
@@ -57,6 +57,7 @@
 	MEM_LAYOUT_ENV_SETTINGS \
 	BOOTENV \
 	GUARDIAN_DEFAULT_PROD_ENV \
+	"backlight_brightness=50\0" \
 	"bootubivol=rootfs\0" \
 	"distro_bootcmd=" \
 		"setenv autoload no; " \
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/10 am335x, guardian: Enable splash screen

In reply to Gireesh.Hiremath at in.bosch.com

From: Gireesh Hiremath <[email protected]>

- Display splash screen
- Print "U-Boot" on display when bmp fails to load due to any reason

---
 board/bosch/guardian/board.c      | 77 ++++++++++++++++++++++++++++++-
 configs/am335x_guardian_defconfig |  5 +-
 include/configs/am335x_guardian.h | 11 +++++
 3 files changed, 91 insertions(+), 2 deletions(-)
board/bosch/guardian/board.c +76 -1
index a34262bd13..394c56d72e 100644
@@ -29,12 +29,16 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/mem-guardian.h>
-#include <asm/arch/mmc_host_def.h>
 #include <asm/arch/omap.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <jffs2/load_kernel.h>
+#include <mtd.h>
+#include <nand.h>
+#include <video.h>
+#include <video_console.h>
 #include "board.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -270,6 +274,74 @@ void lcdbacklight_en(void)
 			   brightness != 0 ? 0x0A : 0x02, 0xFF);
 }
 
+#if IS_ENABLED(CONFIG_AM335X_LCD)
+static void splash_screen(void)
+{
+	struct udevice *video_dev;
+	struct udevice *console_dev;
+	struct video_priv *vid_priv;
+	struct mtd_info *mtd;
+	size_t len;
+	int ret;
+
+	struct mtd_device *mtd_dev;
+	struct part_info  *part;
+	u8 pnum;
+
+	ret = uclass_get_device(UCLASS_VIDEO, 0, &video_dev);
+	if (ret != 0) {
+		debug("video device not found\n");
+		goto exit;
+	}
+
+	vid_priv = dev_get_uclass_priv(video_dev);
+	mtdparts_init();
+
+	if (find_dev_and_part(SPLASH_SCREEN_NAND_PART, &mtd_dev, &pnum, &part))	{
+		debug("Could not find nand partition\n");
+		goto splash_screen_text;
+	}
+
+	mtd = get_nand_dev_by_index(mtd_dev->id->num);
+	if (!mtd) {
+		debug("MTD partition is not valid\n");
+		goto splash_screen_text;
+	}
+
+	len = SPLASH_SCREEN_BMP_FILE_SIZE;
+	ret = nand_read_skip_bad(mtd, part->offset, &len, NULL,
+				 SPLASH_SCREEN_BMP_FILE_SIZE,
+				 (u_char *)SPLASH_SCREEN_BMP_LOAD_ADDR);
+	if (ret != 0) {
+		debug("Reading NAND partition failed\n");
+		goto splash_screen_text;
+	}
+
+	ret = video_bmp_display(video_dev, SPLASH_SCREEN_BMP_LOAD_ADDR, 0, 0, false);
+	if (ret != 0) {
+		debug("No valid bmp image found!!\n");
+		goto splash_screen_text;
+	} else {
+		goto exit;
+	}
+
+splash_screen_text:
+	vid_priv->colour_fg = CONSOLE_COLOR_RED;
+	vid_priv->colour_bg = CONSOLE_COLOR_BLACK;
+
+	if (!uclass_first_device_err(UCLASS_VIDEO_CONSOLE, &console_dev)) {
+		debug("Found console\n");
+		vidconsole_position_cursor(console_dev, 17, 7);
+		vidconsole_put_string(console_dev, SPLASH_SCREEN_TEXT);
+	} else {
+		debug("No console device found\n");
+	}
+
+exit:
+	return;
+}
+#endif /* CONFIG_AM335X_LCD */
+
 int board_late_init(void)
 {
 	int ret;
@@ -287,6 +359,9 @@ int board_late_init(void)
 	}
 
 	lcdbacklight_en();
+#if IS_ENABLED(CONFIG_AM335X_LCD)
+	splash_screen();
+#endif
 	return 0;
 }
 #endif /* CONFIG_BOARD_LATE_INIT */
configs/am335x_guardian_defconfig +4 -1
index b7170cd79e..48b9bf45a4 100644
@@ -1,7 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
 CONFIG_ARCH_OMAP2PLUS=y
-CONFIG_SPL_GPIO_SUPPORT=y
+# CONFIG_SPL_GPIO_SUPPORT is not set
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_ENV_SIZE=0x40000
@@ -50,6 +50,7 @@ CONFIG_CMD_MTD=y
 CONFIG_CMD_NAND=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_BMP=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_MTDPARTS=y
 CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:256k(SPL),256k(SPL.backup1),256k(SPL.backup2),256k(SPL.backup3),1m(u-boot),1m(u-boot.backup1),1m(u-boot-2),1m(u-boot-2.backup1),256k(u-boot-env),256k(u-boot-env.backup1),256k(splash-screen),-(UBI)"
@@ -100,6 +101,8 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0451
 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022
 CONFIG_USB_ETHER=y
+CONFIG_VIDEO_BPP16=y
+CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_AM335X_LCD=y
 CONFIG_SPL_WDT=y
 # CONFIG_SPL_USE_TINY_PRINTF is not set
include/configs/am335x_guardian.h +11 -0
index 236be1a093..1a14b4249d 100644
@@ -81,6 +81,17 @@
 
 #endif /* ! CONFIG_SPL_BUILD */
 
+#define CONFIG_BMP_16BPP
+#define SPLASH_SCREEN_NAND_PART "nand0,10"
+#define SPLASH_SCREEN_BMP_FILE_SIZE 0x26000
+#define SPLASH_SCREEN_BMP_LOAD_ADDR 0x82000000
+#define SPLASH_SCREEN_TEXT "U-Boot"
+
+/* BGR 16Bit Color Definitions */
+#define CONSOLE_COLOR_BLACK 0x0000
+#define CONSOLE_COLOR_WHITE 0xFFFF
+#define CONSOLE_COLOR_RED 0x001F
+
 /* NS16550 Configuration */
 #define CONFIG_SYS_NS16550_COM1		0x44e09000	/* UART0 */
 #define CONFIG_SYS_NS16550_COM2		0x48022000	/* UART1 */
Signature · 1 line
2.20.1
#3 lore raw

PATCH 2/10 am335x, guardian: Enable splash screen

Quoted 8 lines · Gireesh.Hiremath at in.bosch.com

From: Gireesh Hiremath <[email protected]>

- Display splash screen
- Print "U-Boot" on display when bmp fails to load due to any reason

 board/bosch/guardian/board.c      | 77 ++++++++++++++++++++++++++++++-
 configs/am335x_guardian_defconfig |  5 +-

Can you split board changes and defconfig changes into separate patches? This applies to other patches in rest of the series.

Thanks and regards,
Lokesh

Quoted 163 lines
 include/configs/am335x_guardian.h | 11 +++++
 3 files changed, 91 insertions(+), 2 deletions(-)
board/bosch/guardian/board.c +76 -1
index a34262bd13..394c56d72e 100644
@@ -29,12 +29,16 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/mem-guardian.h>
-#include <asm/arch/mmc_host_def.h>
 #include <asm/arch/omap.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/emif.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <jffs2/load_kernel.h>
+#include <mtd.h>
+#include <nand.h>
+#include <video.h>
+#include <video_console.h>
 #include "board.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -270,6 +274,74 @@ void lcdbacklight_en(void)
 			   brightness != 0 ? 0x0A : 0x02, 0xFF);
 }
 
+#if IS_ENABLED(CONFIG_AM335X_LCD)
+static void splash_screen(void)
+{
+	struct udevice *video_dev;
+	struct udevice *console_dev;
+	struct video_priv *vid_priv;
+	struct mtd_info *mtd;
+	size_t len;
+	int ret;
+
+	struct mtd_device *mtd_dev;
+	struct part_info  *part;
+	u8 pnum;
+
+	ret = uclass_get_device(UCLASS_VIDEO, 0, &video_dev);
+	if (ret != 0) {
+		debug("video device not found\n");
+		goto exit;
+	}
+
+	vid_priv = dev_get_uclass_priv(video_dev);
+	mtdparts_init();
+
+	if (find_dev_and_part(SPLASH_SCREEN_NAND_PART, &mtd_dev, &pnum, &part))	{
+		debug("Could not find nand partition\n");
+		goto splash_screen_text;
+	}
+
+	mtd = get_nand_dev_by_index(mtd_dev->id->num);
+	if (!mtd) {
+		debug("MTD partition is not valid\n");
+		goto splash_screen_text;
+	}
+
+	len = SPLASH_SCREEN_BMP_FILE_SIZE;
+	ret = nand_read_skip_bad(mtd, part->offset, &len, NULL,
+				 SPLASH_SCREEN_BMP_FILE_SIZE,
+				 (u_char *)SPLASH_SCREEN_BMP_LOAD_ADDR);
+	if (ret != 0) {
+		debug("Reading NAND partition failed\n");
+		goto splash_screen_text;
+	}
+
+	ret = video_bmp_display(video_dev, SPLASH_SCREEN_BMP_LOAD_ADDR, 0, 0, false);
+	if (ret != 0) {
+		debug("No valid bmp image found!!\n");
+		goto splash_screen_text;
+	} else {
+		goto exit;
+	}
+
+splash_screen_text:
+	vid_priv->colour_fg = CONSOLE_COLOR_RED;
+	vid_priv->colour_bg = CONSOLE_COLOR_BLACK;
+
+	if (!uclass_first_device_err(UCLASS_VIDEO_CONSOLE, &console_dev)) {
+		debug("Found console\n");
+		vidconsole_position_cursor(console_dev, 17, 7);
+		vidconsole_put_string(console_dev, SPLASH_SCREEN_TEXT);
+	} else {
+		debug("No console device found\n");
+	}
+
+exit:
+	return;
+}
+#endif /* CONFIG_AM335X_LCD */
+
 int board_late_init(void)
 {
 	int ret;
@@ -287,6 +359,9 @@ int board_late_init(void)
 	}
 
 	lcdbacklight_en();
+#if IS_ENABLED(CONFIG_AM335X_LCD)
+	splash_screen();
+#endif
 	return 0;
 }
 #endif /* CONFIG_BOARD_LATE_INIT */
configs/am335x_guardian_defconfig +4 -1
index b7170cd79e..48b9bf45a4 100644
@@ -1,7 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
 CONFIG_ARCH_OMAP2PLUS=y
-CONFIG_SPL_GPIO_SUPPORT=y
+# CONFIG_SPL_GPIO_SUPPORT is not set
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_ENV_SIZE=0x40000
@@ -50,6 +50,7 @@ CONFIG_CMD_MTD=y
 CONFIG_CMD_NAND=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_BMP=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_MTDPARTS=y
 CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:256k(SPL),256k(SPL.backup1),256k(SPL.backup2),256k(SPL.backup3),1m(u-boot),1m(u-boot.backup1),1m(u-boot-2),1m(u-boot-2.backup1),256k(u-boot-env),256k(u-boot-env.backup1),256k(splash-screen),-(UBI)"
@@ -100,6 +101,8 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0451
 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022
 CONFIG_USB_ETHER=y
+CONFIG_VIDEO_BPP16=y
+CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_AM335X_LCD=y
 CONFIG_SPL_WDT=y
 # CONFIG_SPL_USE_TINY_PRINTF is not set
include/configs/am335x_guardian.h +11 -0
index 236be1a093..1a14b4249d 100644
@@ -81,6 +81,17 @@
 
 #endif /* ! CONFIG_SPL_BUILD */
 
+#define CONFIG_BMP_16BPP
+#define SPLASH_SCREEN_NAND_PART "nand0,10"
+#define SPLASH_SCREEN_BMP_FILE_SIZE 0x26000
+#define SPLASH_SCREEN_BMP_LOAD_ADDR 0x82000000
+#define SPLASH_SCREEN_TEXT "U-Boot"
+
+/* BGR 16Bit Color Definitions */
+#define CONSOLE_COLOR_BLACK 0x0000
+#define CONSOLE_COLOR_WHITE 0xFFFF
+#define CONSOLE_COLOR_RED 0x001F
+
 /* NS16550 Configuration */
 #define CONFIG_SYS_NS16550_COM1		0x44e09000	/* UART0 */
 #define CONFIG_SYS_NS16550_COM2		0x48022000	/* UART1 */
#4 lore raw

PATCH 3/10 am335x, guardian: configs: add ubi fastmap support

In reply to Gireesh.Hiremath at in.bosch.com

From: Gireesh Hiremath <[email protected]>

- Ideally enabling the config should trigger fastmap, if it doesn't work then send ubi.fm_autoconvert=1 as kernel cmdline argument

---
 configs/am335x_guardian_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/am335x_guardian_defconfig +1 -0
index 48b9bf45a4..745a64bba7 100644
@@ -79,6 +79,7 @@ CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
 CONFIG_SYS_NAND_U_BOOT_OFFS=0x100000
 CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND=0x200000
 CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
 CONFIG_PHYLIB=y
 CONFIG_DM_ETH=y
 CONFIG_PHY=y
Signature · 1 line
2.20.1
#5 lore raw

PATCH 4/10 am335x, guardian: set tftp_load_addr in environment

In reply to Gireesh.Hiremath at in.bosch.com

From: Moses Christopher <[email protected]>

Set tftp_load_addr to 0x82000000 in MEM_LAYOUT_ENV_SETTINGS

---
 include/configs/am335x_guardian.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/am335x_guardian.h +1 -0
index 1a14b4249d..5e9361d168 100644
@@ -29,6 +29,7 @@
 #define MEM_LAYOUT_ENV_SETTINGS \
 	"scriptaddr=0x80000000\0" \
 	"pxefile_addr_r=0x80100000\0" \
+	"tftp_load_addr=0x82000000\0" \
 	"kernel_addr_r=0x82000000\0" \
 	"fdt_addr_r=0x88000000\0" \
 	"ramdisk_addr_r=0x88080000\0" \
Signature · 1 line
2.20.1
#6 lore raw

PATCH 5/10 am335x, guardian: cmd: add memtest configs

In reply to Gireesh.Hiremath at in.bosch.com

From: Gireesh Hiremath <[email protected]>

- Add mtest, meminfo commands
- Add default mem start address as 0x80000000
- Add defauly mem end address as 0x81000000
- Implies default test runs for first 16MiB of DRAM

---
 configs/am335x_guardian_defconfig | 2 ++
 include/configs/am335x_guardian.h | 4 ++++
 2 files changed, 6 insertions(+)
configs/am335x_guardian_defconfig +2 -0
index 745a64bba7..dd0c477a86 100644
@@ -43,6 +43,8 @@ CONFIG_CMD_SPL=y
 CONFIG_CMD_SPL_NAND_OFS=0x0
 CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_FLASH is not set
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_I2C=y
include/configs/am335x_guardian.h +4 -0
index 5e9361d168..39e441952c 100644
@@ -22,6 +22,10 @@
 #define V_OSCK				24000000  /* Clock output from T2 */
 #define V_SCLK				(V_OSCK)
 
+/* mem test config for first 16MiB */
+#define CONFIG_SYS_MEMTEST_START 0x80000000
+#define CONFIG_SYS_MEMTEST_END 0x81000000
+
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 
 #ifndef CONFIG_SPL_BUILD
Signature · 1 line
2.20.1
#7 lore raw

PATCH 6/10 am335x, guardian: display DHCP Failed on lcd when dhcp fails during boot

In reply to Gireesh.Hiremath at in.bosch.com

From: Gireesh Hiremath <[email protected]>

* Applicable only when distro_bootcmd is executed
* Text color is defaulted to White on Black Background
* Text color changes when changed in board.c
Ex: Red when no splash screen image is found

---
 include/configs/am335x_guardian.h | 3 +++
 1 file changed, 3 insertions(+)
include/configs/am335x_guardian.h +3 -0
index 39e441952c..16ef639d9b 100644
@@ -75,6 +75,9 @@
 		    "if tftp \"${tftp_load_addr}\" \"bootscript.scr\"; then " \
 		      "source \"${tftp_load_addr}\"; " \
 		    "fi; " \
+		  "else " \
+		    "setcurs 15 1; " \
+		    "lcdputs \"DHCP Failed\"; " \
 		  "fi; " \
 		"fi;" \
 		"run bootcmd_ubifs0;\0" \
Signature · 1 line
2.20.1
#8 lore raw

PATCH 7/10 am335x, guardian: update swi logic

In reply to Gireesh.Hiremath at in.bosch.com

From: Gireesh Hiremath <[email protected]>

read boot_mode_gpio and set the swi status

---
 board/bosch/guardian/board.c      | 15 +++++++++++++--
 include/configs/am335x_guardian.h |  2 +-
 2 files changed, 14 insertions(+), 3 deletions(-)
board/bosch/guardian/board.c +13 -2
index 394c56d72e..9911e99c09 100644
@@ -241,8 +241,19 @@ static void set_bootmode_env(void)
 		goto err;
 	}
 
-	value = dm_gpio_get_value(&boot_mode_desc);
-	value ? env_set("swi_status", "0") : env_set("swi_status", "1");
+	dm_gpio_set_dir_flags(&boot_mode_desc, GPIOD_IS_IN);
+	udelay(10);
+
+	ret = dm_gpio_get_value(&boot_mode_desc);
+	if (ret == 0) {
+		env_set("swi_status", "1");
+	} else if (ret == 1) {
+		env_set("swi_status", "0");
+	} else {
+		printf("swi status gpio error\n");
+		goto err;
+	}
+
 	return;
 
 err:
include/configs/am335x_guardian.h +1 -1
index 16ef639d9b..7db349d35b 100644
@@ -69,7 +69,6 @@
 		"setenv rootflags \"bulk_read,chk_data_crc\"; " \
 		"setenv ethact usb_ether; " \
 		"if test \"${swi_status}\" -eq 1; then " \
-		  "setenv extrabootargs \"swi_attached\"; " \
 		  "if dhcp; then " \
 		    "sleep 1; " \
 		    "if tftp \"${tftp_load_addr}\" \"bootscript.scr\"; then " \
@@ -79,6 +78,7 @@
 		    "setcurs 15 1; " \
 		    "lcdputs \"DHCP Failed\"; " \
 		  "fi; " \
+		  "setenv extrabootargs $extrabootargs \"swi_attached\"; " \
 		"fi;" \
 		"run bootcmd_ubifs0;\0" \
 	"altbootcmd=" \
Signature · 1 line
2.20.1
#9 lore raw

PATCH 8/10 am335x, guardian: Update pinmux configuration

In reply to Gireesh.Hiremath at in.bosch.com

From: Moses Christopher <[email protected]>

pinmux update for guardian board

---
 arch/arm/dts/am335x-guardian.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/dts/am335x-guardian.dts +3 -3
index 93ee2e6c09..69bee45848 100644
@@ -407,12 +407,12 @@
 
 	guardian_interface_pins: pinmux_guardian_interface_pins {
 		pinctrl-single,pins = <
-			AM33XX_IOPAD(0x928, PIN_OUTPUT          | MUX_MODE7)
-			AM33XX_IOPAD(0x990, PIN_OUTPUT          | MUX_MODE7)
+			AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLUP   | MUX_MODE7)
 			AM33XX_IOPAD(0x9ac, PIN_OUTPUT_PULLDOWN | MUX_MODE7)
+			AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE7)
 			AM33XX_IOPAD(0x980, PIN_INPUT           | MUX_MODE7)
 			AM33XX_IOPAD(0x984, PIN_INPUT           | MUX_MODE7)
-			AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLUP   | MUX_MODE7)
+			AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP   | MUX_MODE7)
 			AM33XX_IOPAD(0x90c, PIN_OUTPUT_PULLDOWN | MUX_MODE7)
 			AM33XX_IOPAD(0x944, PIN_OUTPUT_PULLDOWN | MUX_MODE7)
 			AM33XX_IOPAD(0x91c, PIN_INPUT           | MUX_MODE7)
Signature · 1 line
2.20.1
#10 lore raw

PATCH 8/10 am335x, guardian: Update pinmux configuration

Quoted 3 lines · Gireesh.Hiremath at in.bosch.com

From: Moses Christopher <[email protected]>

pinmux update for guardian board

Please specify what this pinmux update is about.

Thanks and regards,
Lokesh

Quoted 27 lines
---
 arch/arm/dts/am335x-guardian.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/dts/am335x-guardian.dts +3 -3
index 93ee2e6c09..69bee45848 100644
@@ -407,12 +407,12 @@
 
 	guardian_interface_pins: pinmux_guardian_interface_pins {
 		pinctrl-single,pins = <
-			AM33XX_IOPAD(0x928, PIN_OUTPUT          | MUX_MODE7)
-			AM33XX_IOPAD(0x990, PIN_OUTPUT          | MUX_MODE7)
+			AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLUP   | MUX_MODE7)
 			AM33XX_IOPAD(0x9ac, PIN_OUTPUT_PULLDOWN | MUX_MODE7)
+			AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE7)
 			AM33XX_IOPAD(0x980, PIN_INPUT           | MUX_MODE7)
 			AM33XX_IOPAD(0x984, PIN_INPUT           | MUX_MODE7)
-			AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLUP   | MUX_MODE7)
+			AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP   | MUX_MODE7)
 			AM33XX_IOPAD(0x90c, PIN_OUTPUT_PULLDOWN | MUX_MODE7)
 			AM33XX_IOPAD(0x944, PIN_OUTPUT_PULLDOWN | MUX_MODE7)
 			AM33XX_IOPAD(0x91c, PIN_INPUT           | MUX_MODE7)
#11 lore raw

PATCH 9/10 am335x, guardian: set environment variable autoload to no

In reply to Gireesh.Hiremath at in.bosch.com

From: Gireesh Hiremath <[email protected]>

autoload: if set to "no" then rarpb, bootp or dhcp commands will just perform a configuration lookup from the BOOTP / DHCP server, but not try to load any image using TFTP

---
 include/configs/am335x_guardian.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/am335x_guardian.h +1 -1
index 7db349d35b..7723cda14f 100644
@@ -62,10 +62,10 @@
 	MEM_LAYOUT_ENV_SETTINGS \
 	BOOTENV \
 	GUARDIAN_DEFAULT_PROD_ENV \
+	"autoload=no\0" \
 	"backlight_brightness=50\0" \
 	"bootubivol=rootfs\0" \
 	"distro_bootcmd=" \
-		"setenv autoload no; " \
 		"setenv rootflags \"bulk_read,chk_data_crc\"; " \
 		"setenv ethact usb_ether; " \
 		"if test \"${swi_status}\" -eq 1; then " \
Signature · 1 line
2.20.1
#12 lore raw

PATCH 10/10 am335x, guardian: code cleanup and boot optimization

In reply to Gireesh.Hiremath at in.bosch.com

From: Gireesh Hiremath <[email protected]>

- remove unneeded headers in board.c
- remove unneeded commands and configs from the build

---
 board/bosch/guardian/board.c      | 21 ---------------------
 configs/am335x_guardian_defconfig |  3 ++-
 2 files changed, 2 insertions(+), 22 deletions(-)
board/bosch/guardian/board.c +0 -21
index 9911e99c09..a062ec9bfe 100644
@@ -9,18 +9,13 @@
  */
 
 #include <common.h>
-#include <cpsw.h>
 #include <dm.h>
-#include <env.h>
 #include <env_internal.h>
 #include <errno.h>
 #include <i2c.h>
-#include <init.h>
 #include <led.h>
-#include <miiphy.h>
 #include <panel.h>
 #include <power/tps65217.h>
-#include <power/tps65910.h>
 #include <spl.h>
 #include <watchdog.h>
 #include <asm/arch/clock.h>
@@ -208,27 +203,11 @@ int board_init(void)
 #ifdef CONFIG_BOARD_LATE_INIT
 static void set_bootmode_env(void)
 {
-	char *boot_device_name = NULL;
 	char *boot_mode_gpio = "gpio at 44e07000_14";
 	int   ret;
-	int   value;
 
 	struct gpio_desc boot_mode_desc;
 
-	switch (gd->arch.omap_boot_device) {
-	case BOOT_DEVICE_NAND:
-		boot_device_name = "nand";
-		break;
-	case BOOT_DEVICE_USBETH:
-		boot_device_name = "usbeth";
-		break;
-	default:
-		break;
-	}
-
-	if (boot_device_name)
-		env_set("boot_device", boot_device_name);
-
 	ret = dm_gpio_lookup_name(boot_mode_gpio, &boot_mode_desc);
 	if (ret) {
 		printf("%s is not found\n", boot_mode_gpio);
configs/am335x_guardian_defconfig +2 -1
index dd0c477a86..b5d8d80d14 100644
@@ -17,6 +17,7 @@ CONFIG_ENV_OFFSET_REDUND=0x540000
 CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="am335x-guardian"
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_BOOTDELAY=0
 CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
 CONFIG_AUTOBOOT_DELAY_STR="d"
@@ -39,7 +40,7 @@ CONFIG_SPL_NET_VCI_STRING="Guardian U-Boot SPL"
 CONFIG_SPL_POWER_SUPPORT=y
 CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_ETHER=y
-CONFIG_CMD_SPL=y
+# CONFIG_CMD_SPL is not set
 CONFIG_CMD_SPL_NAND_OFS=0x0
 CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_FLASH is not set
Signature · 1 line
2.20.1