* [PATCH 01/10] am335x, guardian: Enable backlight
2021-01-06 15:31 [PATCH 00/10] Add support am335, Guardian Gireesh.Hiremath at in.bosch.com
@ 2021-01-06 15:31 ` Gireesh.Hiremath at in.bosch.com
2021-01-06 15:31 ` [PATCH 02/10] am335x, guardian: Enable splash screen Gireesh.Hiremath at in.bosch.com
` (8 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Gireesh.Hiremath at in.bosch.com @ 2021-01-06 15:31 UTC (permalink / raw)
To: u-boot
From: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
Enable backlight,set brightness value and dimming frequency
Signed-off-by: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
---
board/bosch/guardian/board.c | 26 ++++++++++++++++++++++++++
include/configs/am335x_guardian.h | 1 +
2 files changed, 27 insertions(+)
diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index f3e616d21c..a34262bd13 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -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 */
diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h
index c34c07a493..236be1a093 100644
--- a/include/configs/am335x_guardian.h
+++ b/include/configs/am335x_guardian.h
@@ -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; " \
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 02/10] am335x, guardian: Enable splash screen
2021-01-06 15:31 [PATCH 00/10] Add support am335, Guardian Gireesh.Hiremath at in.bosch.com
2021-01-06 15:31 ` [PATCH 01/10] am335x, guardian: Enable backlight Gireesh.Hiremath at in.bosch.com
@ 2021-01-06 15:31 ` Gireesh.Hiremath at in.bosch.com
2021-01-17 10:51 ` Lokesh Vutla
2021-01-06 15:31 ` [PATCH 03/10] am335x, guardian: configs: add ubi fastmap support Gireesh.Hiremath at in.bosch.com
` (7 subsequent siblings)
9 siblings, 1 reply; 13+ messages in thread
From: Gireesh.Hiremath at in.bosch.com @ 2021-01-06 15:31 UTC (permalink / raw)
To: u-boot
From: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
- Display splash screen
- Print "U-Boot" on display when bmp fails to load due to any reason
Signed-off-by: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
---
board/bosch/guardian/board.c | 77 ++++++++++++++++++++++++++++++-
configs/am335x_guardian_defconfig | 5 +-
include/configs/am335x_guardian.h | 11 +++++
3 files changed, 91 insertions(+), 2 deletions(-)
diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index a34262bd13..394c56d72e 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -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 */
diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig
index b7170cd79e..48b9bf45a4 100644
--- a/configs/am335x_guardian_defconfig
+++ b/configs/am335x_guardian_defconfig
@@ -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
diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h
index 236be1a093..1a14b4249d 100644
--- a/include/configs/am335x_guardian.h
+++ b/include/configs/am335x_guardian.h
@@ -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 */
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 02/10] am335x, guardian: Enable splash screen
2021-01-06 15:31 ` [PATCH 02/10] am335x, guardian: Enable splash screen Gireesh.Hiremath at in.bosch.com
@ 2021-01-17 10:51 ` Lokesh Vutla
0 siblings, 0 replies; 13+ messages in thread
From: Lokesh Vutla @ 2021-01-17 10:51 UTC (permalink / raw)
To: u-boot
On 06/01/21 9:01 pm, Gireesh.Hiremath at in.bosch.com wrote:
> From: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
>
> - Display splash screen
> - Print "U-Boot" on display when bmp fails to load due to any reason
>
> Signed-off-by: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>> ---
> 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
> include/configs/am335x_guardian.h | 11 +++++
> 3 files changed, 91 insertions(+), 2 deletions(-)
>
> diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
> index a34262bd13..394c56d72e 100644
> --- a/board/bosch/guardian/board.c
> +++ b/board/bosch/guardian/board.c
> @@ -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 */
> diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig
> index b7170cd79e..48b9bf45a4 100644
> --- a/configs/am335x_guardian_defconfig
> +++ b/configs/am335x_guardian_defconfig
> @@ -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
> diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h
> index 236be1a093..1a14b4249d 100644
> --- a/include/configs/am335x_guardian.h
> +++ b/include/configs/am335x_guardian.h
> @@ -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 */
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 03/10] am335x, guardian: configs: add ubi fastmap support
2021-01-06 15:31 [PATCH 00/10] Add support am335, Guardian Gireesh.Hiremath at in.bosch.com
2021-01-06 15:31 ` [PATCH 01/10] am335x, guardian: Enable backlight Gireesh.Hiremath at in.bosch.com
2021-01-06 15:31 ` [PATCH 02/10] am335x, guardian: Enable splash screen Gireesh.Hiremath at in.bosch.com
@ 2021-01-06 15:31 ` Gireesh.Hiremath at in.bosch.com
2021-01-06 15:31 ` [PATCH 04/10] am335x, guardian: set tftp_load_addr in environment Gireesh.Hiremath at in.bosch.com
` (6 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Gireesh.Hiremath at in.bosch.com @ 2021-01-06 15:31 UTC (permalink / raw)
To: u-boot
From: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
- Ideally enabling the config should trigger fastmap, if it doesn't work
then send ubi.fm_autoconvert=1 as kernel cmdline argument
Signed-off-by: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
---
configs/am335x_guardian_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig
index 48b9bf45a4..745a64bba7 100644
--- a/configs/am335x_guardian_defconfig
+++ b/configs/am335x_guardian_defconfig
@@ -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
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 04/10] am335x, guardian: set tftp_load_addr in environment
2021-01-06 15:31 [PATCH 00/10] Add support am335, Guardian Gireesh.Hiremath at in.bosch.com
` (2 preceding siblings ...)
2021-01-06 15:31 ` [PATCH 03/10] am335x, guardian: configs: add ubi fastmap support Gireesh.Hiremath at in.bosch.com
@ 2021-01-06 15:31 ` Gireesh.Hiremath at in.bosch.com
2021-01-06 15:31 ` [PATCH 05/10] am335x, guardian: cmd: add memtest configs Gireesh.Hiremath at in.bosch.com
` (5 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Gireesh.Hiremath at in.bosch.com @ 2021-01-06 15:31 UTC (permalink / raw)
To: u-boot
From: Moses Christopher <BollavarapuMoses.Christopher@in.bosch.com>
Set tftp_load_addr to 0x82000000 in MEM_LAYOUT_ENV_SETTINGS
Signed-off-by: Moses Christopher <BollavarapuMoses.Christopher@in.bosch.com>
---
include/configs/am335x_guardian.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h
index 1a14b4249d..5e9361d168 100644
--- a/include/configs/am335x_guardian.h
+++ b/include/configs/am335x_guardian.h
@@ -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" \
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 05/10] am335x, guardian: cmd: add memtest configs
2021-01-06 15:31 [PATCH 00/10] Add support am335, Guardian Gireesh.Hiremath at in.bosch.com
` (3 preceding siblings ...)
2021-01-06 15:31 ` [PATCH 04/10] am335x, guardian: set tftp_load_addr in environment Gireesh.Hiremath at in.bosch.com
@ 2021-01-06 15:31 ` Gireesh.Hiremath at in.bosch.com
2021-01-06 15:31 ` [PATCH 06/10] am335x, guardian: display DHCP Failed on lcd when dhcp fails during boot Gireesh.Hiremath at in.bosch.com
` (4 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Gireesh.Hiremath at in.bosch.com @ 2021-01-06 15:31 UTC (permalink / raw)
To: u-boot
From: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
- 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
Signed-off-by: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
---
configs/am335x_guardian_defconfig | 2 ++
include/configs/am335x_guardian.h | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig
index 745a64bba7..dd0c477a86 100644
--- a/configs/am335x_guardian_defconfig
+++ b/configs/am335x_guardian_defconfig
@@ -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
diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h
index 5e9361d168..39e441952c 100644
--- a/include/configs/am335x_guardian.h
+++ b/include/configs/am335x_guardian.h
@@ -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
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 06/10] am335x, guardian: display DHCP Failed on lcd when dhcp fails during boot
2021-01-06 15:31 [PATCH 00/10] Add support am335, Guardian Gireesh.Hiremath at in.bosch.com
` (4 preceding siblings ...)
2021-01-06 15:31 ` [PATCH 05/10] am335x, guardian: cmd: add memtest configs Gireesh.Hiremath at in.bosch.com
@ 2021-01-06 15:31 ` Gireesh.Hiremath at in.bosch.com
2021-01-06 15:31 ` [PATCH 07/10] am335x, guardian: update swi logic Gireesh.Hiremath at in.bosch.com
` (3 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Gireesh.Hiremath at in.bosch.com @ 2021-01-06 15:31 UTC (permalink / raw)
To: u-boot
From: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
* 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
Signed-off-by: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
---
include/configs/am335x_guardian.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h
index 39e441952c..16ef639d9b 100644
--- a/include/configs/am335x_guardian.h
+++ b/include/configs/am335x_guardian.h
@@ -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" \
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 07/10] am335x, guardian: update swi logic
2021-01-06 15:31 [PATCH 00/10] Add support am335, Guardian Gireesh.Hiremath at in.bosch.com
` (5 preceding siblings ...)
2021-01-06 15:31 ` [PATCH 06/10] am335x, guardian: display DHCP Failed on lcd when dhcp fails during boot Gireesh.Hiremath at in.bosch.com
@ 2021-01-06 15:31 ` Gireesh.Hiremath at in.bosch.com
2021-01-06 15:31 ` [PATCH 08/10] am335x, guardian: Update pinmux configuration Gireesh.Hiremath at in.bosch.com
` (2 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Gireesh.Hiremath at in.bosch.com @ 2021-01-06 15:31 UTC (permalink / raw)
To: u-boot
From: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
read boot_mode_gpio and set the swi status
Signed-off-by: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
---
board/bosch/guardian/board.c | 15 +++++++++++++--
include/configs/am335x_guardian.h | 2 +-
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index 394c56d72e..9911e99c09 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -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:
diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h
index 16ef639d9b..7db349d35b 100644
--- a/include/configs/am335x_guardian.h
+++ b/include/configs/am335x_guardian.h
@@ -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=" \
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 08/10] am335x, guardian: Update pinmux configuration
2021-01-06 15:31 [PATCH 00/10] Add support am335, Guardian Gireesh.Hiremath at in.bosch.com
` (6 preceding siblings ...)
2021-01-06 15:31 ` [PATCH 07/10] am335x, guardian: update swi logic Gireesh.Hiremath at in.bosch.com
@ 2021-01-06 15:31 ` Gireesh.Hiremath at in.bosch.com
2021-01-17 10:52 ` Lokesh Vutla
2021-01-06 15:31 ` [PATCH 09/10] am335x, guardian: set environment variable autoload to no Gireesh.Hiremath at in.bosch.com
2021-01-06 15:31 ` [PATCH 10/10] am335x, guardian: code cleanup and boot optimization Gireesh.Hiremath at in.bosch.com
9 siblings, 1 reply; 13+ messages in thread
From: Gireesh.Hiremath at in.bosch.com @ 2021-01-06 15:31 UTC (permalink / raw)
To: u-boot
From: Moses Christopher <BollavarapuMoses.Christopher@in.bosch.com>
pinmux update for guardian board
Signed-off-by: Moses Christopher <BollavarapuMoses.Christopher@in.bosch.com>
---
arch/arm/dts/am335x-guardian.dts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/am335x-guardian.dts b/arch/arm/dts/am335x-guardian.dts
index 93ee2e6c09..69bee45848 100644
--- a/arch/arm/dts/am335x-guardian.dts
+++ b/arch/arm/dts/am335x-guardian.dts
@@ -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)
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 08/10] am335x, guardian: Update pinmux configuration
2021-01-06 15:31 ` [PATCH 08/10] am335x, guardian: Update pinmux configuration Gireesh.Hiremath at in.bosch.com
@ 2021-01-17 10:52 ` Lokesh Vutla
0 siblings, 0 replies; 13+ messages in thread
From: Lokesh Vutla @ 2021-01-17 10:52 UTC (permalink / raw)
To: u-boot
On 06/01/21 9:01 pm, Gireesh.Hiremath at in.bosch.com wrote:
> From: Moses Christopher <BollavarapuMoses.Christopher@in.bosch.com>
>
> pinmux update for guardian board
Please specify what this pinmux update is about.
Thanks and regards,
Lokesh
>
> Signed-off-by: Moses Christopher <BollavarapuMoses.Christopher@in.bosch.com>
> ---
> arch/arm/dts/am335x-guardian.dts | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/dts/am335x-guardian.dts b/arch/arm/dts/am335x-guardian.dts
> index 93ee2e6c09..69bee45848 100644
> --- a/arch/arm/dts/am335x-guardian.dts
> +++ b/arch/arm/dts/am335x-guardian.dts
> @@ -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)
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 09/10] am335x, guardian: set environment variable autoload to no
2021-01-06 15:31 [PATCH 00/10] Add support am335, Guardian Gireesh.Hiremath at in.bosch.com
` (7 preceding siblings ...)
2021-01-06 15:31 ` [PATCH 08/10] am335x, guardian: Update pinmux configuration Gireesh.Hiremath at in.bosch.com
@ 2021-01-06 15:31 ` Gireesh.Hiremath at in.bosch.com
2021-01-06 15:31 ` [PATCH 10/10] am335x, guardian: code cleanup and boot optimization Gireesh.Hiremath at in.bosch.com
9 siblings, 0 replies; 13+ messages in thread
From: Gireesh.Hiremath at in.bosch.com @ 2021-01-06 15:31 UTC (permalink / raw)
To: u-boot
From: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
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
Signed-off-by: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
---
include/configs/am335x_guardian.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h
index 7db349d35b..7723cda14f 100644
--- a/include/configs/am335x_guardian.h
+++ b/include/configs/am335x_guardian.h
@@ -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 " \
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 10/10] am335x, guardian: code cleanup and boot optimization
2021-01-06 15:31 [PATCH 00/10] Add support am335, Guardian Gireesh.Hiremath at in.bosch.com
` (8 preceding siblings ...)
2021-01-06 15:31 ` [PATCH 09/10] am335x, guardian: set environment variable autoload to no Gireesh.Hiremath at in.bosch.com
@ 2021-01-06 15:31 ` Gireesh.Hiremath at in.bosch.com
9 siblings, 0 replies; 13+ messages in thread
From: Gireesh.Hiremath at in.bosch.com @ 2021-01-06 15:31 UTC (permalink / raw)
To: u-boot
From: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
- remove unneeded headers in board.c
- remove unneeded commands and configs from the build
Signed-off-by: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>
---
board/bosch/guardian/board.c | 21 ---------------------
configs/am335x_guardian_defconfig | 3 ++-
2 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index 9911e99c09..a062ec9bfe 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -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);
diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig
index dd0c477a86..b5d8d80d14 100644
--- a/configs/am335x_guardian_defconfig
+++ b/configs/am335x_guardian_defconfig
@@ -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
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread