All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/12] Refactor bur board/common code
@ 2018-07-06 13:41 Hannes Schmelzer
  2018-07-06 13:41 ` [U-Boot] [PATCH 01/12] board/BuR: drop devicetree loading and lcd setup for linux-targets Hannes Schmelzer
                   ` (11 more replies)
  0 siblings, 12 replies; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot


This patch series has the intention of preparing the move of all bur
boards to driver-model, cleaning up the over years growed code, make os
boot more flexible.

In another series we will make the move to DM with all its consequences
(adapting drivers, ....)

For doing all this there are several things todo and some decisions
regarding design were made.

decisions:
- move all boards to driver model
- no need for displaying splash/summary on linux targets
- more flexible boot process

todos:
- drop device-tree loading in common code
in future we can rely on the u-boot devicetree
- drop the device-tree based lcd initialization code
- use standard mechanism for getting mac-addresses
- new default-environment for more flexible boot



Hannes Schmelzer (12):
  board/BuR: drop devicetree loading and lcd setup for linux-targets
  board/BuR/common: drop simple-framebuffer setup
  board/BuR/common: make CONFIG_LCD optional
  board/BuR/brppt1: drop LCD-support
  board/BuR/common: remove interface Label from summary screen
  board/BuR/common: fix PMIC mpu-pll setup
  board/BuR/brppt1: drop dead code (CONFIG_SPL_OS_BOOT)
  board/BuR/common: refactor ft_board_setup(...)
  board/BuR/brppt1: implement more flexible boot process
  dts: am33xx: add u-boot, dm-spl to ocp bus
  board/BuR/brppt1: convert brppt1 boards to driver model
  board/BuR/brppt1: add makerule for generating production files

 arch/arm/dts/am335x-brppt1-mmc.dts  | 345 ++++++++++++++++++++++++++++++
 arch/arm/dts/am335x-brppt1-nand.dts | 363 ++++++++++++++++++++++++++++++++
 arch/arm/dts/am335x-brppt1-spi.dts  | 366 ++++++++++++++++++++++++++++++++
 arch/arm/dts/am33xx.dtsi            |   1 +
 board/BuR/brppt1/board.c            |  70 ++++---
 board/BuR/brppt1/config.mk          |  36 ++++
 board/BuR/common/common.c           | 407 ++++--------------------------------
 configs/brppt1_mmc_defconfig        |  52 ++++-
 configs/brppt1_nand_defconfig       |  54 ++++-
 configs/brppt1_spi_defconfig        |  57 +++--
 include/configs/brppt1.h            | 202 ++++++++----------
 include/configs/bur_am335x_common.h |  26 +--
 scripts/config_whitelist.txt        |   1 -
 13 files changed, 1418 insertions(+), 562 deletions(-)
 create mode 100644 arch/arm/dts/am335x-brppt1-mmc.dts
 create mode 100644 arch/arm/dts/am335x-brppt1-nand.dts
 create mode 100644 arch/arm/dts/am335x-brppt1-spi.dts
 create mode 100644 board/BuR/brppt1/config.mk

-- 
2.7.4

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 01/12] board/BuR: drop devicetree loading and lcd setup for linux-targets
  2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
@ 2018-07-06 13:41 ` Hannes Schmelzer
  2018-07-20 12:36   ` [U-Boot] [U-Boot, " Tom Rini
  2018-07-06 13:41 ` [U-Boot] [PATCH 02/12] board/BuR/common: drop simple-framebuffer setup Hannes Schmelzer
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot

This patch  drops the lcd-screen setup, the summary screen and getting
mac-addresses based on a previous loaded device-tree for linux targets.
Selecting those linux target is simple, since we have only the brppt1.

In detail we do:
- drop the common lcd-setup code which relys on a fdt_blob
- drop the common dtb loading mechanism
- drop the now obsolete CONFIG_USE_FDT from board header and whitelist.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 board/BuR/common/common.c    | 230 ++-----------------------------------------
 include/configs/brppt1.h     |   1 -
 scripts/config_whitelist.txt |   1 -
 3 files changed, 6 insertions(+), 226 deletions(-)

diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 9df1979..98132b7 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -26,42 +26,22 @@
 #include <cpsw.h>
 #include <power/tps65217.h>
 #include <lcd.h>
-#include <fs.h>
-#ifdef CONFIG_USE_FDT
-  #include <fdt_support.h>
-#endif
 #include "bur_common.h"
 #include "../../../drivers/video/am335x-fb.h"
-#include <nand.h>
 #include <fdt_simplefb.h>
 
 static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifdef CONFIG_USE_FDT
-  #define FDTPROP(b, c) fdt_getprop_u32_default(gd->fdt_blob, b, c, ~0UL)
-  #define PATHTIM "/panel/display-timings/default"
-  #define PATHINF "/panel/panel-info"
-#endif
 /* --------------------------------------------------------------------------*/
 #if defined(CONFIG_LCD) && defined(CONFIG_AM335X_LCD) && \
 	!defined(CONFIG_SPL_BUILD)
 void lcdbacklight(int on)
 {
-#ifdef CONFIG_USE_FDT
-	if (gd->fdt_blob == NULL) {
-		printf("%s: don't have a valid gd->fdt_blob!\n", __func__);
-		return;
-	}
-	unsigned int driver = FDTPROP(PATHINF, "brightdrv");
-	unsigned int bright = FDTPROP(PATHINF, "brightdef");
-	unsigned int pwmfrq = FDTPROP(PATHINF, "brightfdim");
-#else
 	unsigned int driver = env_get_ulong("ds1_bright_drv", 16, 0UL);
 	unsigned int bright = env_get_ulong("ds1_bright_def", 10, 50);
 	unsigned int pwmfrq = env_get_ulong("ds1_pwmfreq", 10, ~0UL);
-#endif
 	unsigned int tmp;
 	struct gptimer *timerhw;
 
@@ -116,70 +96,7 @@ void lcdbacklight(int on)
 int load_lcdtiming(struct am335x_lcdpanel *panel)
 {
 	struct am335x_lcdpanel pnltmp;
-#ifdef CONFIG_USE_FDT
-	u32 dtbprop;
-	char buf[32];
-	const char *nodep = 0;
-	int nodeoff;
-
-	if (gd->fdt_blob == NULL) {
-		printf("%s: don't have a valid gd->fdt_blob!\n", __func__);
-		return -1;
-	}
-	memcpy(&pnltmp, (void *)panel, sizeof(struct am335x_lcdpanel));
-
-	pnltmp.hactive = FDTPROP(PATHTIM, "hactive");
-	pnltmp.vactive = FDTPROP(PATHTIM, "vactive");
-	pnltmp.bpp = FDTPROP(PATHINF, "bpp");
-	pnltmp.hfp = FDTPROP(PATHTIM, "hfront-porch");
-	pnltmp.hbp = FDTPROP(PATHTIM, "hback-porch");
-	pnltmp.hsw = FDTPROP(PATHTIM, "hsync-len");
-	pnltmp.vfp = FDTPROP(PATHTIM, "vfront-porch");
-	pnltmp.vbp = FDTPROP(PATHTIM, "vback-porch");
-	pnltmp.vsw = FDTPROP(PATHTIM, "vsync-len");
-	pnltmp.pup_delay = FDTPROP(PATHTIM, "pupdelay");
-	pnltmp.pon_delay = FDTPROP(PATHTIM, "pondelay");
-	pnltmp.pxl_clk = FDTPROP(PATHTIM, "clock-frequency");
-
-	/* check polarity of control-signals */
-	dtbprop = FDTPROP(PATHTIM, "hsync-active");
-	if (dtbprop == 0)
-		pnltmp.pol |= HSYNC_INVERT;
-	dtbprop = FDTPROP(PATHTIM, "vsync-active");
-	if (dtbprop == 0)
-		pnltmp.pol |= VSYNC_INVERT;
-	dtbprop = FDTPROP(PATHINF, "sync-ctrl");
-	if (dtbprop == 1)
-		pnltmp.pol |= HSVS_CONTROL;
-	dtbprop = FDTPROP(PATHINF, "sync-edge");
-	if (dtbprop == 1)
-		pnltmp.pol |= HSVS_RISEFALL;
-	dtbprop = FDTPROP(PATHTIM, "pixelclk-active");
-	if (dtbprop == 0)
-		pnltmp.pol |= PXCLK_INVERT;
-	dtbprop = FDTPROP(PATHTIM, "de-active");
-	if (dtbprop == 0)
-		pnltmp.pol |= DE_INVERT;
-
-	nodeoff = fdt_path_offset(gd->fdt_blob, "/factory-settings");
-	if (nodeoff >= 0) {
-		nodep = fdt_getprop(gd->fdt_blob, nodeoff, "rotation", NULL);
-		if (nodep != 0) {
-			if (strcmp(nodep, "cw") == 0)
-				panel_info.vl_rot = 1;
-			else if (strcmp(nodep, "ud") == 0)
-				panel_info.vl_rot = 2;
-			else if (strcmp(nodep, "ccw") == 0)
-				panel_info.vl_rot = 3;
-			else
-				panel_info.vl_rot = 0;
-		}
-	} else {
-		puts("no 'factory-settings / rotation' in dtb!\n");
-	}
-	snprintf(buf, sizeof(buf), "fbcon=rotate:%d", panel_info.vl_rot);
-	env_set("optargs_rot", buf);
-#else
+
 	pnltmp.hactive = env_get_ulong("ds1_hactive", 10, ~0UL);
 	pnltmp.vactive = env_get_ulong("ds1_vactive", 10, ~0UL);
 	pnltmp.bpp = env_get_ulong("ds1_bpp", 10, ~0UL);
@@ -194,7 +111,7 @@ int load_lcdtiming(struct am335x_lcdpanel *panel)
 	pnltmp.pup_delay = env_get_ulong("ds1_pupdelay", 10, ~0UL);
 	pnltmp.pon_delay = env_get_ulong("ds1_tondelay", 10, ~0UL);
 	panel_info.vl_rot = env_get_ulong("ds1_rotation", 10, 0);
-#endif
+
 	if (
 	   ~0UL == (pnltmp.hactive) ||
 	   ~0UL == (pnltmp.vactive) ||
@@ -240,117 +157,6 @@ int load_lcdtiming(struct am335x_lcdpanel *panel)
 	return 0;
 }
 
-#ifdef CONFIG_USE_FDT
-static int load_devicetree(void)
-{
-	int rc;
-	loff_t dtbsize;
-	u32 dtbaddr = env_get_ulong("dtbaddr", 16, 0UL);
-
-	if (dtbaddr == 0) {
-		printf("%s: don't have a valid <dtbaddr> in env!\n", __func__);
-		return -1;
-	}
-#ifdef CONFIG_NAND
-	dtbsize = 0x20000;
-	rc = nand_read_skip_bad(get_nand_dev_by_index(0), 0x40000,
-				(size_t *)&dtbsize,
-				NULL, 0x20000, (u_char *)dtbaddr);
-#else
-	char *dtbname = env_get("dtb");
-	char *dtbdev = env_get("dtbdev");
-	char *dtbpart = env_get("dtbpart");
-	if (!dtbdev || !dtbpart || !dtbname) {
-		printf("%s: <dtbdev>/<dtbpart>/<dtb> missing.\n", __func__);
-		return -1;
-	}
-
-	if (fs_set_blk_dev(dtbdev, dtbpart, FS_TYPE_EXT)) {
-		puts("load_devicetree: set_blk_dev failed.\n");
-		return -1;
-	}
-	rc = fs_read(dtbname, (u32)dtbaddr, 0, 0, &dtbsize);
-#endif
-	if (rc == 0) {
-		gd->fdt_blob = (void *)dtbaddr;
-		gd->fdt_size = dtbsize;
-		debug("loaded %d bytes of dtb onto 0x%08x\n",
-		      (u32)dtbsize, (u32)gd->fdt_blob);
-		return dtbsize;
-	}
-
-	printf("%s: load dtb failed!\n", __func__);
-	return -1;
-}
-
-static const char *dtbmacaddr(u32 ifno)
-{
-	int node, len;
-	char enet[16];
-	const char *mac;
-	const char *path;
-
-	if (gd->fdt_blob == NULL) {
-		printf("%s: don't have a valid gd->fdt_blob!\n", __func__);
-		return NULL;
-	}
-
-	node = fdt_path_offset(gd->fdt_blob, "/aliases");
-	if (node < 0)
-		return NULL;
-
-	sprintf(enet, "ethernet%d", ifno);
-	path = fdt_getprop(gd->fdt_blob, node, enet, NULL);
-	if (!path) {
-		printf("no alias for %s\n", enet);
-		return NULL;
-	}
-
-	node = fdt_path_offset(gd->fdt_blob, path);
-	mac = fdt_getprop(gd->fdt_blob, node, "mac-address", &len);
-	if (mac && is_valid_ethaddr((u8 *)mac))
-		return mac;
-
-	return NULL;
-}
-
-static void br_summaryscreen_printdtb(char *prefix,
-				       char *name,
-				       char *suffix)
-{
-	char buf[32] = { 0 };
-	const char *nodep = buf;
-	char *mac = 0;
-	int nodeoffset;
-	int len;
-
-	if (gd->fdt_blob == NULL) {
-		printf("%s: don't have a valid gd->fdt_blob!\n", __func__);
-		return;
-	}
-
-	if (strcmp(name, "brmac1") == 0) {
-		mac = (char *)dtbmacaddr(0);
-		if (mac)
-			sprintf(buf, "%pM", mac);
-	} else if (strcmp(name, "brmac2") == 0) {
-		mac =  (char *)dtbmacaddr(1);
-		if (mac)
-			sprintf(buf, "%pM", mac);
-	} else {
-		nodeoffset = fdt_path_offset(gd->fdt_blob,
-					     "/factory-settings");
-		if (nodeoffset < 0) {
-			puts("no 'factory-settings' in dtb!\n");
-			return;
-		}
-		nodep = fdt_getprop(gd->fdt_blob, nodeoffset, name, &len);
-	}
-	if (nodep && strlen(nodep) > 1)
-		lcd_printf("%s %s %s", prefix, nodep, suffix);
-	else
-		lcd_printf("\n");
-}
 int ft_board_setup(void *blob, bd_t *bd)
 {
 	int nodeoffset;
@@ -393,7 +199,6 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	return 0;
 }
-#else
 
 static void br_summaryscreen_printenv(char *prefix,
 				       char *name, char *altname,
@@ -410,39 +215,23 @@ static void br_summaryscreen_printenv(char *prefix,
 		lcd_printf("\n");
 	}
 }
-#endif
+
 void br_summaryscreen(void)
 {
-#ifdef CONFIG_USE_FDT
-	br_summaryscreen_printdtb(" - B&R -", "order-no", "-\n");
-	br_summaryscreen_printdtb(" Serial/Rev :", "serial-no", " /");
-	br_summaryscreen_printdtb(" ", "hw-revision", "\n");
-	br_summaryscreen_printdtb(" MAC (IF1)  :", "brmac1", "\n");
-	br_summaryscreen_printdtb(" MAC (IF2)  :", "brmac2", "\n");
-	lcd_puts(" Bootloader : " PLAIN_VERSION "\n");
-	lcd_puts("\n");
-#else
 	br_summaryscreen_printenv(" - B&R -", "br_orderno", 0, "-\n");
 	br_summaryscreen_printenv(" Serial/Rev :", "br_serial", 0, "\n");
 	br_summaryscreen_printenv(" MAC (IF1)  :", "br_mac1", "ethaddr", "\n");
 	br_summaryscreen_printenv(" MAC (IF2)  :", "br_mac2", 0, "\n");
 	lcd_puts(" Bootloader : " PLAIN_VERSION "\n");
 	lcd_puts("\n");
-#endif
 }
 
 void lcdpower(int on)
 {
 	u32 pin, swval, i;
-#ifdef CONFIG_USE_FDT
-	if (gd->fdt_blob == NULL) {
-		printf("%s: don't have a valid gd->fdt_blob!\n", __func__);
-		return;
-	}
-	pin = FDTPROP(PATHINF, "pwrpin");
-#else
+
 	pin = env_get_ulong("ds1_pwr", 16, ~0UL);
-#endif
+
 	if (pin == ~0UL) {
 		puts("no pwrpin in dtb/env, cannot powerup display!\n");
 		return;
@@ -475,10 +264,7 @@ vidinfo_t	panel_info = {
 void lcd_ctrl_init(void *lcdbase)
 {
 	struct am335x_lcdpanel lcd_panel;
-#ifdef CONFIG_USE_FDT
-	/* TODO: is there a better place to load the dtb ? */
-	load_devicetree();
-#endif
+
 	memset(&lcd_panel, 0, sizeof(struct am335x_lcdpanel));
 	if (load_lcdtiming(&lcd_panel) != 0)
 		return;
@@ -652,10 +438,6 @@ int board_eth_init(bd_t *bis)
 	mac_addr[5] = (mac_lo & 0xFF00) >> 8;
 
 	if (!env_get("ethaddr")) {
-		#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_USE_FDT)
-		printf("<ethaddr> not set. trying DTB ... ");
-		mac = dtbmacaddr(0);
-		#endif
 		if (!mac) {
 			printf("<ethaddr> not set. validating E-fuse MAC ... ");
 			if (is_valid_ethaddr((const u8 *)mac_addr))
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index eb45331..a6cf9ac 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -29,7 +29,6 @@
 #define CONFIG_POWER_TPS65217
 
 /* Support both device trees and ATAGs. */
-#define CONFIG_USE_FDT			/* use fdt within board code */
 #define CONFIG_CMDLINE_TAG
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 1219dcc..ec00d77 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -4682,7 +4682,6 @@ CONFIG_USB_XHCI_EXYNOS
 CONFIG_USB_XHCI_KEYSTONE
 CONFIG_USB_XHCI_OMAP
 CONFIG_USER_LOWLEVEL_INIT
-CONFIG_USE_FDT
 CONFIG_USE_INTERRUPT
 CONFIG_USE_NAND
 CONFIG_USE_NOR
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 02/12] board/BuR/common: drop simple-framebuffer setup
  2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
  2018-07-06 13:41 ` [U-Boot] [PATCH 01/12] board/BuR: drop devicetree loading and lcd setup for linux-targets Hannes Schmelzer
@ 2018-07-06 13:41 ` Hannes Schmelzer
  2018-07-20 12:36   ` [U-Boot] [U-Boot, " Tom Rini
  2018-07-06 13:41 ` [U-Boot] [PATCH 03/12] board/BuR/common: make CONFIG_LCD optional Hannes Schmelzer
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot

The linux systems running on the brppt1 targets are using modern DRM
drivers since long time ago. Further we are going to drop the LCD
support completely on this board, so the simple-framebuffer setup
becomes obsolete.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 board/BuR/common/common.c | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 98132b7..29430e9 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -28,7 +28,6 @@
 #include <lcd.h>
 #include "bur_common.h"
 #include "../../../drivers/video/am335x-fb.h"
-#include <fdt_simplefb.h>
 
 static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
 
@@ -171,31 +170,6 @@ int ft_board_setup(void *blob, bd_t *bd)
 		puts("set bootloader version 'bl-version' prop. not in dtb!\n");
 		return -1;
 	}
-	/*
-	 * if no simplefb is requested through environment, we don't set up
-	 * one, instead we turn off backlight.
-	 */
-	if (env_get_ulong("simplefb", 10, 0) == 0) {
-		lcdbacklight(0);
-		return 0;
-	}
-	/* Setup simplefb devicetree node, also adapt memory-node,
-	 * upper limit for kernel e.g. linux is memtop-framebuffer alligned
-	 * to a full megabyte.
-	 */
-	u64 start = gd->bd->bi_dram[0].start;
-	u64 size = (gd->fb_base - start) & ~0xFFFFF;
-	int rc = fdt_fixup_memory_banks(blob, &start, &size, 1);
-
-	if (rc) {
-		puts("cannot setup simplefb: Error reserving memory!\n");
-		return rc;
-	}
-	rc = lcd_dt_simplefb_enable_existing_node(blob);
-	if (rc) {
-		puts("cannot setup simplefb: error enabling simplefb node!\n");
-		return rc;
-	}
 
 	return 0;
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 03/12] board/BuR/common: make CONFIG_LCD optional
  2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
  2018-07-06 13:41 ` [U-Boot] [PATCH 01/12] board/BuR: drop devicetree loading and lcd setup for linux-targets Hannes Schmelzer
  2018-07-06 13:41 ` [U-Boot] [PATCH 02/12] board/BuR/common: drop simple-framebuffer setup Hannes Schmelzer
@ 2018-07-06 13:41 ` Hannes Schmelzer
  2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
  2018-07-06 13:41 ` [U-Boot] [PATCH 04/12] board/BuR/brppt1: drop LCD-support Hannes Schmelzer
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot

Since we're going to drop LCD-support on brppt1 boards, we have to make
this stuff here optional and remove the #error path.

We also move out the ft_board_setup(...) from this #ifdef because
there's no relationship with the LCD-code and on the other hand this is
still needed in future even with LCD-support off.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 board/BuR/common/common.c | 39 ++++++++++++++++++---------------------
 1 file changed, 18 insertions(+), 21 deletions(-)

diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 29430e9..e1ac6c4 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -156,24 +156,6 @@ int load_lcdtiming(struct am335x_lcdpanel *panel)
 	return 0;
 }
 
-int ft_board_setup(void *blob, bd_t *bd)
-{
-	int nodeoffset;
-
-	nodeoffset = fdt_path_offset(blob, "/factory-settings");
-	if (nodeoffset < 0) {
-		puts("set bootloader version 'factory-settings' not in dtb!\n");
-		return -1;
-	}
-	if (fdt_setprop(blob, nodeoffset, "bl-version",
-			PLAIN_VERSION, strlen(PLAIN_VERSION)) != 0) {
-		puts("set bootloader version 'bl-version' prop. not in dtb!\n");
-		return -1;
-	}
-
-	return 0;
-}
-
 static void br_summaryscreen_printenv(char *prefix,
 				       char *name, char *altname,
 				       char *suffix)
@@ -262,11 +244,26 @@ void lcd_enable(void)
 	br_summaryscreen();
 	lcdbacklight(1);
 }
-#elif CONFIG_SPL_BUILD
-#else
-#error "LCD-support with a suitable FB-Driver is mandatory !"
 #endif /* CONFIG_LCD */
 
+int ft_board_setup(void *blob, bd_t *bd)
+{
+	int nodeoffset;
+
+	nodeoffset = fdt_path_offset(blob, "/factory-settings");
+	if (nodeoffset < 0) {
+		puts("set bootloader version 'factory-settings' not in dtb!\n");
+		return -1;
+	}
+	if (fdt_setprop(blob, nodeoffset, "bl-version",
+			PLAIN_VERSION, strlen(PLAIN_VERSION)) != 0) {
+		puts("set bootloader version 'bl-version' prop. not in dtb!\n");
+		return -1;
+	}
+
+	return 0;
+}
+
 #ifdef CONFIG_SPL_BUILD
 void pmicsetup(u32 mpupll)
 {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 04/12] board/BuR/brppt1: drop LCD-support
  2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
                   ` (2 preceding siblings ...)
  2018-07-06 13:41 ` [U-Boot] [PATCH 03/12] board/BuR/common: make CONFIG_LCD optional Hannes Schmelzer
@ 2018-07-06 13:41 ` Hannes Schmelzer
  2018-07-20 12:37   ` [U-Boot] [U-Boot,04/12] " Tom Rini
  2018-07-06 13:41 ` [U-Boot] [PATCH 05/12] board/BuR/common: remove interface Label from summary screen Hannes Schmelzer
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot

On this linux target long time ago the OS is using DRM driver for
handling video output, the pre initialization of u-boot and the display
summary screen is obsolete. With this patch we drop the LCD-support from
thisd board.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 board/BuR/brppt1/board.c      | 4 ----
 configs/brppt1_mmc_defconfig  | 3 ---
 configs/brppt1_nand_defconfig | 3 ---
 configs/brppt1_spi_defconfig  | 3 ---
 include/configs/brppt1.h      | 5 -----
 5 files changed, 18 deletions(-)

diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c
index 41db449..ff2a3a2 100644
--- a/board/BuR/brppt1/board.c
+++ b/board/BuR/brppt1/board.c
@@ -26,7 +26,6 @@
 #include <i2c.h>
 #include <power/tps65217.h>
 #include "../common/bur_common.h"
-#include <lcd.h>
 #include <watchdog.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -160,9 +159,6 @@ int board_init(void)
 int board_late_init(void)
 {
 	if (0 == gpio_get_value(REPSWITCH)) {
-		lcd_position_cursor(1, 8);
-		lcd_puts(
-		"switching to network-console ...       ");
 		env_set("bootcmd", "run netconsole");
 	}
 	return 0;
diff --git a/configs/brppt1_mmc_defconfig b/configs/brppt1_mmc_defconfig
index a9d0f71..b8db509 100644
--- a/configs/brppt1_mmc_defconfig
+++ b/configs/brppt1_mmc_defconfig
@@ -11,7 +11,6 @@ CONFIG_SPL=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,EMMC_BOOT"
 CONFIG_BOOTDELAY=-2
-# CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
@@ -57,7 +56,5 @@ CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_DSPS=y
 CONFIG_USB_STORAGE=y
-CONFIG_SYS_WHITE_ON_BLACK=y
-CONFIG_LCD=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/brppt1_nand_defconfig b/configs/brppt1_nand_defconfig
index ac50abc..907ce71 100644
--- a/configs/brppt1_nand_defconfig
+++ b/configs/brppt1_nand_defconfig
@@ -10,7 +10,6 @@ CONFIG_SPL=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1"
 CONFIG_BOOTDELAY=-2
-# CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
@@ -59,7 +58,5 @@ CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_DSPS=y
 CONFIG_USB_STORAGE=y
-CONFIG_SYS_WHITE_ON_BLACK=y
-CONFIG_LCD=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/brppt1_spi_defconfig b/configs/brppt1_spi_defconfig
index 140a7dd..90054aa 100644
--- a/configs/brppt1_spi_defconfig
+++ b/configs/brppt1_spi_defconfig
@@ -14,7 +14,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,SPI_BOOT,EMMC_BOOT"
 CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=-2
-# CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
@@ -69,7 +68,5 @@ CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_DSPS=y
 CONFIG_USB_STORAGE=y
-CONFIG_SYS_WHITE_ON_BLACK=y
-CONFIG_LCD=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index a6cf9ac..6a210b7 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -14,11 +14,6 @@
 #include <configs/bur_cfg_common.h>
 #include <configs/bur_am335x_common.h>
 /* ------------------------------------------------------------------------- */
-#define CONFIG_AM335X_LCD
-#define CONFIG_LCD_ROTATION
-#define CONFIG_LCD_DT_SIMPLEFB
-#define LCD_BPP				LCD_COLOR32
-
 /* memory */
 #define CONFIG_SYS_MALLOC_LEN		(5 * 1024 * 1024)
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 05/12] board/BuR/common: remove interface Label from summary screen
  2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
                   ` (3 preceding siblings ...)
  2018-07-06 13:41 ` [U-Boot] [PATCH 04/12] board/BuR/brppt1: drop LCD-support Hannes Schmelzer
@ 2018-07-06 13:41 ` Hannes Schmelzer
  2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
  2018-07-06 13:41 ` [U-Boot] [PATCH 06/12] board/BuR/common: fix PMIC mpu-pll setup Hannes Schmelzer
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot

This interface names may vary over different products, to consider this
fact we replace the interface label "IF1" and "IF2" on the summary
screen with some more generic wording "MAC1" and "MAC2".

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 board/BuR/common/common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index e1ac6c4..1e14a90 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -176,8 +176,8 @@ void br_summaryscreen(void)
 {
 	br_summaryscreen_printenv(" - B&R -", "br_orderno", 0, "-\n");
 	br_summaryscreen_printenv(" Serial/Rev :", "br_serial", 0, "\n");
-	br_summaryscreen_printenv(" MAC (IF1)  :", "br_mac1", "ethaddr", "\n");
-	br_summaryscreen_printenv(" MAC (IF2)  :", "br_mac2", 0, "\n");
+	br_summaryscreen_printenv(" MAC1       :", "br_mac1", "ethaddr", "\n");
+	br_summaryscreen_printenv(" MAC2       :", "br_mac2", 0, "\n");
 	lcd_puts(" Bootloader : " PLAIN_VERSION "\n");
 	lcd_puts("\n");
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 06/12] board/BuR/common: fix PMIC mpu-pll setup
  2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
                   ` (4 preceding siblings ...)
  2018-07-06 13:41 ` [U-Boot] [PATCH 05/12] board/BuR/common: remove interface Label from summary screen Hannes Schmelzer
@ 2018-07-06 13:41 ` Hannes Schmelzer
  2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
  2018-07-06 13:41 ` [U-Boot] [PATCH 07/12] board/BuR/brppt1: drop dead code (CONFIG_SPL_OS_BOOT) Hannes Schmelzer
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot

If a board-code calls the  pmicsetup(u32 mpupll) with a mpupll value
!= 0 it wants to force some frequency with the value provided by mpupll.
Setting up 1 GHz is wrong here.

Nobody did take notice about that yet, since every board calls this
function with zero.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 board/BuR/common/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 1e14a90..38da36d 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -280,7 +280,7 @@ void pmicsetup(u32 mpupll)
 	printf("detected max. frequency: %d - ", dpll_mpu_opp100.m);
 
 	if (0 != mpupll) {
-		dpll_mpu_opp100.m = MPUPLL_M_1000;
+		dpll_mpu_opp100.m = mpupll;
 		printf("retuning MPU-PLL to: %d MHz.\n", dpll_mpu_opp100.m);
 	} else {
 		puts("ok.\n");
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 07/12] board/BuR/brppt1: drop dead code (CONFIG_SPL_OS_BOOT)
  2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
                   ` (5 preceding siblings ...)
  2018-07-06 13:41 ` [U-Boot] [PATCH 06/12] board/BuR/common: fix PMIC mpu-pll setup Hannes Schmelzer
@ 2018-07-06 13:41 ` Hannes Schmelzer
  2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
  2018-07-06 13:41 ` [U-Boot] [PATCH 08/12] board/BuR/common: refactor ft_board_setup(...) Hannes Schmelzer
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot

The falcon mode was never used on this board, there is also no plan to
use it. So drop this dead code.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 board/BuR/brppt1/board.c | 16 ----------------
 include/configs/brppt1.h | 14 --------------
 2 files changed, 30 deletions(-)

diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c
index ff2a3a2..f970f98 100644
--- a/board/BuR/brppt1/board.c
+++ b/board/BuR/brppt1/board.c
@@ -72,22 +72,6 @@ static const struct ctrl_ioregs ddr3_ioregs = {
 	.dt1ioctl = MT41K256M16HA125E_IOCTRL_VALUE,
 };
 
-#ifdef CONFIG_SPL_OS_BOOT
-/*
- * called from spl_nand.c
- * return 0 for loading linux, return 1 for loading u-boot
- */
-int spl_start_uboot(void)
-{
-	if (0 == gpio_get_value(REPSWITCH)) {
-		mdelay(1000);
-		printf("SPL: entering u-boot instead kernel image.\n");
-		return 1;
-	}
-	return 0;
-}
-#endif /* CONFIG_SPL_OS_BOOT */
-
 #define OSC	(V_OSCK/1000000)
 static const struct dpll_params dpll_ddr3 = { 400, OSC-1, 1, -1, -1, -1, -1};
 
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index 6a210b7..32bb83c 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -44,20 +44,6 @@
 #define CONFIG_MTD_DEVICE		/* Required for mtdparts */
 #endif /* CONFIG_SPI_BOOT, ... */
 
-#ifdef CONFIG_SPL_OS_BOOT
-#define CONFIG_SYS_SPL_ARGS_ADDR		0x80F80000
-
-/* RAW SD card / eMMC */
-#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR	0x900	/* address 0x120000 */
-#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR	0x80	/* address 0x10000 */
-#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS	0x80	/* 64KiB */
-
-/* NAND */
-#ifdef CONFIG_NAND
-#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS		0x140000
-#endif /* CONFIG_NAND */
-#endif /* CONFIG_SPL_OS_BOOT */
-
 #ifdef CONFIG_NAND
 #define CONFIG_SPL_NAND_BASE
 #define CONFIG_SPL_NAND_DRIVERS
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 08/12] board/BuR/common: refactor ft_board_setup(...)
  2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
                   ` (6 preceding siblings ...)
  2018-07-06 13:41 ` [U-Boot] [PATCH 07/12] board/BuR/brppt1: drop dead code (CONFIG_SPL_OS_BOOT) Hannes Schmelzer
@ 2018-07-06 13:41 ` Hannes Schmelzer
  2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
  2018-07-06 13:41 ` [U-Boot] [PATCH 09/12] board/BuR/brppt1: implement more flexible boot process Hannes Schmelzer
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot

On other OS, not one provided by B&R, it is not guaranteed that there
are factory-settings within a devicetree. So we must not treat the
absence of them as error.
Further we've the fact that on different version of the device-tree
files there are different namings of the factory-settings, we consider
this with searching for an alternative name.

changing things as following:

- don't treat as error if the bootloader version cannot written into
devicetree.

- since the naming of the factory-settings are different in different
versions of the provided device-tree we search for the alternate name
"/fset"

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 board/BuR/common/common.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 38da36d..01e3078 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -252,15 +252,20 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	nodeoffset = fdt_path_offset(blob, "/factory-settings");
 	if (nodeoffset < 0) {
-		puts("set bootloader version 'factory-settings' not in dtb!\n");
-		return -1;
+		printf("%s: cannot find /factory-settings, trying /fset\n",
+		       __func__);
+		nodeoffset = fdt_path_offset(blob, "/fset");
+		if (nodeoffset < 0) {
+			printf("%s: cannot find /fset.\n", __func__);
+			return 0;
+		}
 	}
+
 	if (fdt_setprop(blob, nodeoffset, "bl-version",
 			PLAIN_VERSION, strlen(PLAIN_VERSION)) != 0) {
-		puts("set bootloader version 'bl-version' prop. not in dtb!\n");
-		return -1;
+		printf("%s: no 'bl-version' prop in fdt!\n", __func__);
+		return 0;
 	}
-
 	return 0;
 }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 09/12] board/BuR/brppt1: implement more flexible boot process
  2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
                   ` (7 preceding siblings ...)
  2018-07-06 13:41 ` [U-Boot] [PATCH 08/12] board/BuR/common: refactor ft_board_setup(...) Hannes Schmelzer
@ 2018-07-06 13:41 ` Hannes Schmelzer
  2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
  2018-07-06 13:41 ` [U-Boot] [PATCH 10/12] dts: am33xx: add u-boot, dm-spl to ocp bus Hannes Schmelzer
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot

With this commit we do:

- set the bootdelay in all brppt1 defconfigs to 0, this makes
development easier, since we can break into serial console.

- move CONFIG_BOOTCOMMAND from header file to defconfig

- introduce b_mode variable for selecting the final boot-target.
This b_mode represents the boot-switch, which can found on most b&r
targets. On the brppt1 this boot-switch is derived from some gpio and
the bootcounter within the RTC block, making it so possible to force
a boot-target (as example for repair-case).

- refactor the environment for booting new flexible way
primary we want to get some bootscr.img within the mass-storage,
this script then loads everything needed for the boot.
For legacy reason we implement the t30lgcy#x boot targets, booting the
already delivered linux-images.

- make space for the cfgscr within mtdparts on brppt1_nand

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 board/BuR/brppt1/board.c      |  28 +++++++-
 configs/brppt1_mmc_defconfig  |   4 +-
 configs/brppt1_nand_defconfig |   6 +-
 configs/brppt1_spi_defconfig  |   4 +-
 include/configs/brppt1.h      | 145 +++++++++++++++++++-----------------------
 5 files changed, 102 insertions(+), 85 deletions(-)

diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c
index f970f98..87b76a6 100644
--- a/board/BuR/brppt1/board.c
+++ b/board/BuR/brppt1/board.c
@@ -140,11 +140,33 @@ int board_init(void)
 }
 
 #ifdef CONFIG_BOARD_LATE_INIT
+static char *bootmodeascii[16] = {
+	"BOOT",		"reserved",	"reserved",	"reserved",
+	"RUN",		"reserved",	"reserved",	"reserved",
+	"reserved",	"reserved",	"reserved",	"reserved",
+	"PME",		"reserved",	"reserved",	"DIAG",
+};
+
 int board_late_init(void)
 {
-	if (0 == gpio_get_value(REPSWITCH)) {
-		env_set("bootcmd", "run netconsole");
-	}
+	unsigned char bmode = 0;
+	ulong bootcount = 0;
+
+	bootcount = bootcount_load() & 0xF;
+
+	if (gpio_get_value(REPSWITCH) == 0 || bootcount == 12)
+		bmode = 12;
+	else if (bootcount > 0)
+		bmode = 0;
+	else
+		bmode = 4;
+
+	printf("Mode:  %s\n", bootmodeascii[bmode & 0x0F]);
+	env_set_ulong("b_mode", bmode);
+
+	/* get sure that bootcmd isn't affected by any bootcount value */
+	env_set_ulong("bootlimit", 0);
+
 	return 0;
 }
 #endif /* CONFIG_BOARD_LATE_INIT */
diff --git a/configs/brppt1_mmc_defconfig b/configs/brppt1_mmc_defconfig
index b8db509..6bb4657 100644
--- a/configs/brppt1_mmc_defconfig
+++ b/configs/brppt1_mmc_defconfig
@@ -10,7 +10,9 @@ CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,EMMC_BOOT"
-CONFIG_BOOTDELAY=-2
+CONFIG_BOOTDELAY=0
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="run b_default"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
diff --git a/configs/brppt1_nand_defconfig b/configs/brppt1_nand_defconfig
index 907ce71..7846e55 100644
--- a/configs/brppt1_nand_defconfig
+++ b/configs/brppt1_nand_defconfig
@@ -9,7 +9,9 @@ CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1"
-CONFIG_BOOTDELAY=-2
+CONFIG_BOOTDELAY=0
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="run b_default"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
@@ -46,7 +48,7 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_CMD_MTDPARTS=y
 CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:128k(MLO),128k(MLO.backup),128k(dtb),128k(u-boot-env),512k(u-boot),4m(kernel),128m(rootfs),-(user)"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:128k(MLO),128k(cfgscr),128k(dtb),128k(u-boot-env),512k(u-boot),4m(kernel),128m(rootfs),-(user)"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
diff --git a/configs/brppt1_spi_defconfig b/configs/brppt1_spi_defconfig
index 90054aa..f4197c4 100644
--- a/configs/brppt1_spi_defconfig
+++ b/configs/brppt1_spi_defconfig
@@ -13,7 +13,9 @@ CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,SPI_BOOT,EMMC_BOOT"
 CONFIG_SPI_BOOT=y
-CONFIG_BOOTDELAY=-2
+CONFIG_BOOTDELAY=0
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="run b_default"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index 32bb83c..d5b2573 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -16,6 +16,7 @@
 /* ------------------------------------------------------------------------- */
 /* memory */
 #define CONFIG_SYS_MALLOC_LEN		(5 * 1024 * 1024)
+#define CONFIG_SYS_BOOTM_LEN		SZ_32M
 
 /* Clock Defines */
 #define V_OSCK				26000000  /* Clock output from T2 */
@@ -56,100 +57,88 @@
 #define CONFIG_ENV_SIZE			(64 << 10)
 
 #ifdef CONFIG_NAND
-#define NANDARGS \
-	"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
-	"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
-	"nandargs=setenv bootargs console=${console} " \
-		"${optargs} " \
-		"${optargs_rot} " \
-		"root=mtd6 " \
-		"rootfstype=jffs2\0" \
-	"kernelsize=0x400000\0" \
-	"nandboot=echo booting from nand ...; " \
-		"run nandargs; " \
-		"nand read ${loadaddr} kernel ${kernelsize}; " \
-		"bootz ${loadaddr} - ${dtbaddr}\0" \
-	"defboot=run nandboot\0" \
-	"bootlimit=1\0" \
-	"simplefb=1\0 " \
-	"altbootcmd=run usbscript\0"
+#define NANDTGTS \
+"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
+"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
+"cfgscr=nand read ${cfgaddr} cfgscr && source ${cfgaddr}\0" \
+"nandargs=setenv bootargs console=${console} ${optargs} ${optargs_rot} " \
+	"root=mtd6 rootfstype=jffs2 b_mode=${b_mode}\0" \
+"b_nand=nand read ${loadaddr} kernel; nand read ${dtbaddr} dtb; " \
+	"run nandargs; run cfgscr; bootz ${loadaddr} - ${dtbaddr}\0" \
+"b_tgts_std=usb0 nand net\0" \
+"b_tgts_rcy=net usb0 nand\0" \
+"b_tgts_pme=usb0 nand net\0"
 #else
-#define NANDARGS ""
+#define NANDTGTS ""
 #endif /* CONFIG_NAND */
 
+#define MMCSPI_TGTS \
+"t30args#0=setenv bootargs ${optargs_rot} ${optargs} console=${console} " \
+	"b_mode=${b_mode} root=/dev/mmcblk0p2 rootfstype=ext4\0" \
+"b_t30lgcy#0=" \
+	"load ${loaddev}:2 ${loadaddr} /boot/PPTImage.md5 && " \
+	"load ${loaddev}:2 ${loadaddr} /boot/zImage && " \
+	"load ${loaddev}:2 ${dtbaddr} /boot/am335x-ppt30.dtb || " \
+	"load ${loaddev}:1 ${dtbaddr} am335x-ppt30-legacy.dtb; "\
+	"run t30args#0; run cfgscr; bootz ${loadaddr} - ${dtbaddr}\0" \
+"t30args#1=setenv bootargs ${optargs_rot} ${optargs} console=${console} " \
+	"b_mode=${b_mode}\0" \
+"b_t30lgcy#1=" \
+	"load ${loaddev}:1 ${loadaddr} zImage && " \
+	"load ${loaddev}:1 ${dtbaddr} am335x-ppt30.dtb && " \
+	"load ${loaddev}:1 ${ramaddr} rootfsPPT30.uboot && " \
+	"run t30args#1; run cfgscr; bootz ${loadaddr} ${ramaddr} ${dtbaddr}\0" \
+"b_mmc0=load ${loaddev}:1 ${scraddr} bootscr.img && source ${scraddr}\0" \
+"b_mmc1=load ${loaddev}:1 ${scraddr} /boot/bootscr.img && source ${scraddr}\0" \
+"b_tgts_std=mmc0 mmc1 t30lgcy#0 t30lgcy#1 usb0 net\0" \
+"b_tgts_rcy=t30lgcy#1 usb0 net\0" \
+"b_tgts_pme=net usb0 mmc0 mmc1\0" \
+"loaddev=mmc 1\0"
+
 #ifdef CONFIG_MMC
-#define MMCARGS \
-"dtbdev=mmc\0" \
-"dtbpart=1:1\0" \
-"mmcroot0=setenv bootargs ${optargs_rot} ${optargs} console=${console}\0" \
-"mmcroot1=setenv bootargs ${optargs_rot} ${optargs} console=${console} " \
-	"root=/dev/mmcblk0p2 rootfstype=ext4\0" \
-"mmcboot0=echo booting Updatesystem from mmc (ext4-fs) ...; " \
-	"setenv simplefb 1; " \
-	"ext4load mmc 1:1 ${loadaddr} /${kernel}; " \
-	"ext4load mmc 1:1 ${ramaddr} /${ramdisk}; " \
-	"run mmcroot0; bootz ${loadaddr} ${ramaddr} ${dtbaddr};\0" \
-"mmcboot1=echo booting PPT-OS from mmc (ext4-fs) ...; " \
-	"setenv simplefb 0; " \
-	"ext4load mmc 1:2 ${loadaddr} /boot/${kernel}; " \
-	"run mmcroot1; bootz ${loadaddr} - ${dtbaddr};\0" \
-"defboot=ext4load mmc 1:2 ${loadaddr} /boot/PPTImage.md5 && run mmcboot1; " \
-	"ext4load mmc 1:1 ${dtbaddr} /$dtb && run mmcboot0; " \
-	"run ramboot; run usbscript;\0" \
-"bootlimit=1\0" \
-"altbootcmd=mmc dev 1; run mmcboot0;\0" \
-"upduboot=dhcp; " \
-	"tftp ${loadaddr} MLO && mmc write ${loadaddr} 100 100; " \
-	"tftp ${loadaddr} u-boot.img && mmc write ${loadaddr} 300 400;\0"
+#define MMCTGTS \
+MMCSPI_TGTS \
+"cfgscr=mmc dev 1; mmc read ${cfgaddr} 200 80; source ${cfgaddr}\0"
 #else
-#define MMCARGS ""
+#define MMCTGTS ""
 #endif /* CONFIG_MMC */
 
+#ifdef CONFIG_SPI
+#define SPITGTS \
+MMCSPI_TGTS \
+"cfgscr=sf probe; sf read ${cfgaddr} 0xC0000 10000; source ${cfgaddr}\0"
+#else
+#define SPITGTS ""
+#endif /* CONFIG_SPI */
+
+#define LOAD_OFFSET(x)			0x8##x
+
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_EXTRA_ENV_SETTINGS \
 BUR_COMMON_ENV \
 "verify=no\0" \
 "autoload=0\0" \
-"dtb=bur-ppt-ts30.dtb\0" \
-"dtbaddr=0x80100000\0" \
-"loadaddr=0x80200000\0" \
-"ramaddr=0x80A00000\0" \
-"kernel=zImage\0" \
-"ramdisk=rootfs.cpio.uboot\0" \
+"scraddr=" __stringify(LOAD_OFFSET(0000000)) "\0" \
+"cfgaddr=" __stringify(LOAD_OFFSET(0020000)) "\0" \
+"dtbaddr=" __stringify(LOAD_OFFSET(0040000)) "\0" \
+"loadaddr=" __stringify(LOAD_OFFSET(0100000)) "\0" \
+"ramaddr=" __stringify(LOAD_OFFSET(2000000)) "\0" \
 "console=ttyO0,115200n8\0" \
 "optargs=consoleblank=0 quiet panic=2\0" \
-"nfsroot=/tftpboot/tseries/rootfs-small\0" \
-"nfsopts=nolock\0" \
-"ramargs=setenv bootargs ${optargs} console=${console} root=/dev/ram0\0" \
-"netargs=setenv bootargs console=${console} " \
-	"${optargs} " \
-	"root=/dev/nfs " \
-	"nfsroot=${serverip}:${nfsroot},${nfsopts} rw " \
-	"ip=dhcp\0" \
-"netboot=echo Booting from network ...; " \
-	"dhcp; " \
-	"tftp ${loadaddr} ${kernel}; " \
-	"tftp ${dtbaddr} ${dtb}; " \
-	"run netargs; " \
-	"bootz ${loadaddr} - ${dtbaddr}\0" \
-"ramboot=echo Booting from network into RAM ...; "\
-	"if dhcp; then; " \
-	"tftp ${loadaddr} ${kernel}; " \
-	"tftp ${ramaddr} ${ramdisk}; " \
-	"if ext4load ${dtbdev} ${dtbpart} ${dtbaddr} /${dtb}; " \
-	"then; else tftp ${dtbaddr} ${dtb}; fi;" \
-	"run mmcroot0; " \
-	"bootz ${loadaddr} ${ramaddr} ${dtbaddr}; fi;\0" \
-"netupdate=echo Updating UBOOT from Network (TFTP) ...; " \
-	"setenv autoload 0; " \
-	"dhcp && tftp 0x80000000 updateUBOOT.img && source;\0" \
-NANDARGS \
-MMCARGS
+"b_break=0\0" \
+"b_usb0=usb start && load usb 0 ${scraddr} bootscr.img && source ${scraddr}\0" \
+"b_net=tftp ${scraddr} netscript.img && source ${scraddr}\0" \
+MMCTGTS \
+SPITGTS \
+NANDTGTS \
+"b_deftgts=if test ${b_mode} = 12; then setenv b_tgts ${b_tgts_pme};" \
+" elif test ${b_mode} = 0; then setenv b_tgts ${b_tgts_rcy};" \
+" else setenv b_tgts ${b_tgts_std}; fi\0" \
+"b_default=run b_deftgts; for target in ${b_tgts};"\
+" do echo \"### booting ${target} ###\"; run b_${target};" \
+" if test ${b_break} = 1; then; exit; fi; done\0"
 #endif /* !CONFIG_SPL_BUILD*/
 
-#define CONFIG_BOOTCOMMAND \
-	"mmc dev 1; run defboot;"
-
 #ifdef CONFIG_NAND
 /*
  * GPMC  block.  We support 1 device and the physical address to
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 10/12] dts: am33xx: add u-boot, dm-spl to ocp bus
  2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
                   ` (8 preceding siblings ...)
  2018-07-06 13:41 ` [U-Boot] [PATCH 09/12] board/BuR/brppt1: implement more flexible boot process Hannes Schmelzer
@ 2018-07-06 13:41 ` Hannes Schmelzer
  2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
  2018-07-06 13:41 ` [U-Boot] [PATCH 11/12] board/BuR/brppt1: convert brppt1 boards to driver model Hannes Schmelzer
  2018-07-06 13:41 ` [U-Boot] [PATCH 12/12] board/BuR/brppt1: add makerule for generating production files Hannes Schmelzer
  11 siblings, 1 reply; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot

This is needed for having access to the devices below this bus, most
important is uart and boot-device (spi, mmc, ...) in SPL stage.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 arch/arm/dts/am33xx.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/dts/am33xx.dtsi b/arch/arm/dts/am33xx.dtsi
index 14caee7..4234537 100644
--- a/arch/arm/dts/am33xx.dtsi
+++ b/arch/arm/dts/am33xx.dtsi
@@ -91,6 +91,7 @@
 	 * the whole bus hierarchy.
 	 */
 	ocp {
+		u-boot,dm-spl;
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 11/12] board/BuR/brppt1: convert brppt1 boards to driver model
  2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
                   ` (9 preceding siblings ...)
  2018-07-06 13:41 ` [U-Boot] [PATCH 10/12] dts: am33xx: add u-boot, dm-spl to ocp bus Hannes Schmelzer
@ 2018-07-06 13:41 ` Hannes Schmelzer
  2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
  2018-07-06 13:41 ` [U-Boot] [PATCH 12/12] board/BuR/brppt1: add makerule for generating production files Hannes Schmelzer
  11 siblings, 1 reply; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot

- add a devicetree for each variant (mmc, spi, nand)
- drop unneeded code from board and bur/common
- drop unneeded stuff from config header files
- minor adaptions to be compliant with driver model (requesting gpio,..)
- harmonize the commandset over all brppt1 targets

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 arch/arm/dts/am335x-brppt1-mmc.dts  | 345 +++++++++++++++++++++++++++++++++
 arch/arm/dts/am335x-brppt1-nand.dts | 363 +++++++++++++++++++++++++++++++++++
 arch/arm/dts/am335x-brppt1-spi.dts  | 366 ++++++++++++++++++++++++++++++++++++
 board/BuR/brppt1/board.c            |  24 ++-
 board/BuR/common/common.c           | 101 +---------
 configs/brppt1_mmc_defconfig        |  45 ++++-
 configs/brppt1_nand_defconfig       |  45 ++++-
 configs/brppt1_spi_defconfig        |  50 ++++-
 include/configs/brppt1.h            |  37 ++--
 include/configs/bur_am335x_common.h |  26 +--
 10 files changed, 1248 insertions(+), 154 deletions(-)
 create mode 100644 arch/arm/dts/am335x-brppt1-mmc.dts
 create mode 100644 arch/arm/dts/am335x-brppt1-nand.dts
 create mode 100644 arch/arm/dts/am335x-brppt1-spi.dts

diff --git a/arch/arm/dts/am335x-brppt1-mmc.dts b/arch/arm/dts/am335x-brppt1-mmc.dts
new file mode 100644
index 0000000..9be34d9
--- /dev/null
+++ b/arch/arm/dts/am335x-brppt1-mmc.dts
@@ -0,0 +1,345 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018 B&R Industrial Automation GmbH
+ * http://www.br-automation.com
+ *
+ */
+/dts-v1/;
+
+#include "am33xx.dtsi"
+
+/ {
+	model = "BRPPT1 (MMC) Panel";
+	compatible = "ti,am33xx";
+
+	fset: factory-settings {
+		bl-version	= "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456890";
+		version		= <0x0100>;
+		order-no	= "6PPT30 (MMC)";
+		hw-revision	= "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456890";
+		serial-no	= "0";
+		device-id	= <0x0>;
+		parent-id	= <0x0>;
+		hw-variant	= <0x1>;
+	};
+
+	aliases {
+		ds1bkl0 = &pwmbacklight;
+		ds1bkl1 = &tps_bl;
+		ds1timing = &timing0;
+		ds1ctrl = &lcdc;
+		gpmc = &gpmc;
+		mmc = &mmc2;
+		fset = &fset;
+	};
+
+	chosen {
+		bootargs = "console=ttyO0,115200 earlyprintk";
+		stdout-path = &uart0;
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>; /* 256 MB */
+	};
+
+	panel {
+		status = "disabled";
+
+		compatible = "ti,tilcdc,panel";
+		enable-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+
+		backlight = <&pwmbacklight>;
+		bkl-pwm = <&pwmbacklight>;
+		bkl-tps = <&tps_bl>;
+
+		panel-info {
+			ac-bias		= <255>;
+			ac-bias-intrpt	= <0>;
+			dma-burst-sz	= <16>;
+			bpp		= <32>;
+			fdd		= <0x80>;
+			sync-edge	= <0>;
+			sync-ctrl	= <1>;
+			raster-order	= <0>;
+			fifo-th		= <0>;
+		};
+
+		display-timings {
+			native-mode = <&timing0>;
+			timing0: lcd {
+				clock-frequency	= <32000000>;
+				hactive		= <800>;
+				vactive		= <480>;
+				hfront-porch	= <2>;
+				hback-porch	= <192>;
+				hsync-len	= <1>;
+				vfront-porch	= <20>;
+				vback-porch	= <2>;
+				vsync-len	= <1>;
+				hsync-active	= <1>;
+				vsync-active	= <1>;
+				pupdelay	= <10>;
+				pondelay	= <10>;
+			};
+		};
+	};
+
+	vmmcsd_fixed: fixedregulator at 0 {
+		compatible = "regulator-fixed";
+		regulator-name = "vmmcsd_fixed";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+	};
+
+	pwm0: omap-pwm at timer5 {
+		compatible = "ti,omap-dmtimer-pwm";
+		ti,timers = <&timer5>;
+		#pwm-cells = <3>;
+	};
+
+	pwm1: omap-pwm at timer6 {
+		compatible = "ti,omap-dmtimer-pwm";
+		ti,timers = <&timer6>;
+		#pwm-cells = <3>;
+	};
+
+	beeper: pwm-beep {
+		compatible = "pwm-beeper";
+		pwms = <&pwm0 0 0 0>;
+	};
+
+	pwmbacklight: pwm-bkl {
+		compatible = "pwm-backlight";
+		pwms = <&pwm1 0 5000000 0>;
+
+		default-brightness-level = <255>;
+		brightness-levels = <0 16 32 64 128 170 202 234 255>;
+
+		power-supply = <&vmmcsd_fixed>;
+		enable-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+	};
+};
+
+&uart0 {		/* console uart */
+	u-boot,dm-spl;
+	status = "okay";
+};
+
+&uart1 {
+	status = "okay";
+};
+
+&i2c0 {
+	u-boot,dm-spl;
+	status = "okay";
+	clock-frequency = <400000>;
+
+	tps: tps at 24 {		/* PMIC controller */
+		u-boot,dm-spl;
+		reg = <0x24>;
+		compatible = "ti,tps65217";
+
+		tps_bl: backlight {
+			compatible = "ti,tps65217-bl";
+			isel = <1>;	/* 1 - ISET1, 2 ISET2 */
+			fdim = <1000>;	/* TPS65217_BL_FDIM_1kHZ */
+			default-brightness = <50>;
+		};
+	};
+};
+
+&i2c2 {
+	status = "okay";
+	clock-frequency = <100000>;
+};
+
+&edma {
+	status = "okay";
+};
+
+&cppi41dma  {
+	status = "okay";
+};
+
+&usb {
+	status = "okay";
+};
+
+&usb_ctrl_mod {
+	status = "okay";
+};
+
+&usb0_phy {
+	status = "okay";
+};
+
+&usb1_phy {
+	status = "okay";
+};
+
+&usb0 {
+	status = "okay";
+	dr_mode = "host";
+};
+
+&usb1 {
+	status = "okay";
+	dr_mode = "host";
+};
+
+&davinci_mdio {
+	status = "okay";
+
+	phy0: ethernet-phy at 0 {
+		reg = <1>;
+	};
+
+	phy1: ethernet-phy at 1 {
+		reg = <2>;
+	};
+};
+
+&mac {
+	status = "okay";
+};
+
+&cpsw_emac0 {
+	phy-handle = <&phy0>;
+	dual_emac_res_vlan = <1>;
+	phy-mode = "mii";
+};
+
+&cpsw_emac1 {
+	phy-handle = <&phy1>;
+	dual_emac_res_vlan = <2>;
+	phy-mode = "mii";
+};
+
+&mmc1 {
+	u-boot,dm-spl;
+	vmmc-supply = <&vmmcsd_fixed>;
+	bus-width = <0x4>;
+	ti,non-removable;
+	ti,needs-special-hs-handling;
+	ti,vcc-aux-disable-is-sleep;
+	status = "okay";
+};
+
+&mmc2 {
+	u-boot,dm-spl;
+	vmmc-supply = <&vmmcsd_fixed>;
+	bus-width = <0x8>;
+	ti,non-removable;
+	ti,needs-special-hs-handling;
+	ti,vcc-aux-disable-is-sleep;
+	status = "okay";
+};
+
+&lcdc {
+	status = "disabled";
+};
+
+&elm {
+	status = "okay";
+};
+
+&sham {
+	status = "okay";
+};
+
+&aes {
+	status = "okay";
+};
+
+&gpio0 {
+	u-boot,dm-spl;
+	ti,no-reset-on-init;
+};
+
+&gpio1 {
+	u-boot,dm-spl;
+	ti,no-reset-on-init;
+};
+
+&gpio2 {
+	u-boot,dm-spl;
+	ti,no-reset-on-init;
+};
+
+&gpio3 {
+	u-boot,dm-spl;
+	ti,no-reset-on-init;
+};
+
+&wdt2 {
+	ti,no-reset-on-init;
+	ti,no-idle-on-init;
+};
+
+&tscadc {
+	status = "okay";
+	tsc {
+		ti,wires = <4>;
+		ti,x-plate-resistance = <200>;
+		ti,zx-cutoff-ratio = <40>;
+		ti,min_deviation = <60>;
+		ti,max_deviation = <600>;
+		ti,coordinate-readouts = <5>;
+		ti,wire-config = <0x00 0x11 0x22 0x33>;
+
+		bnr-buttons {
+			Home-Button {};
+		};
+	};
+
+	adc {
+		ti,adc-channels = <5 6 7>;
+	};
+};
+
+&timer6 {		/* used for cpsw end device */
+	status = "okay";
+	ti,no-reset-on-init;
+	ti,no-idle-on-init;
+};
+
+&timer7 {		/* used for cpsw end device */
+	status = "okay";
+	ti,no-reset-on-init;
+	ti,no-idle-on-init;
+};
+
+&wdt2 {
+	status = "okay";
+	ti,no-reset-on-init;
+	ti,no-idle-on-init;
+};
+
+&epwmss0 {
+	status = "okay";
+};
+
+&tscadc {
+	status = "okay";
+};
+
+&dcan0 {
+	status = "okay";
+};
+
+&dcan1 {
+	status = "okay";
+};
+
+&sham {
+	status = "disabled";
+};
+
+&aes {
+	status = "disabled";
+};
+
+&rng {
+	status = "disabled";
+};
diff --git a/arch/arm/dts/am335x-brppt1-nand.dts b/arch/arm/dts/am335x-brppt1-nand.dts
new file mode 100644
index 0000000..11bd5c5
--- /dev/null
+++ b/arch/arm/dts/am335x-brppt1-nand.dts
@@ -0,0 +1,363 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018 B&R Industrial Automation GmbH
+ * http://www.br-automation.com
+ *
+ */
+/dts-v1/;
+
+#include "am33xx.dtsi"
+
+/ {
+	model = "BRPPT1 (NAND) Panel";
+	compatible = "ti,am33xx";
+
+	fset: factory-settings {
+		bl-version	= "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456890";
+		version		= <0x0100>;
+		order-no	= "6PPT30 (NAND)";
+		hw-revision	= "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456890";
+		serial-no	= "0";
+		device-id	= <0x0>;
+		parent-id	= <0x0>;
+		hw-variant	= <0x1>;
+	};
+
+	aliases {
+		ds1bkl0 = &pwmbacklight;
+		ds1bkl1 = &tps_bl;
+		ds1timing = &timing0;
+		ds1ctrl = &lcdc;
+		gpmc = &gpmc;
+		mmc = &mmc2;
+		fset = &fset;
+	};
+
+	chosen {
+		bootargs = "console=ttyO0,115200 earlyprintk";
+		stdout-path = &uart0;
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>; /* 256 MB */
+	};
+
+	panel {
+		status = "disabled";
+
+		compatible = "ti,tilcdc,panel";
+		enable-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+
+		backlight = <&pwmbacklight>;
+		bkl-pwm = <&pwmbacklight>;
+		bkl-tps = <&tps_bl>;
+
+		panel-info {
+			ac-bias		= <255>;
+			ac-bias-intrpt	= <0>;
+			dma-burst-sz	= <16>;
+			bpp		= <32>;
+			fdd		= <0x80>;
+			sync-edge	= <0>;
+			sync-ctrl	= <1>;
+			raster-order	= <0>;
+			fifo-th		= <0>;
+		};
+
+		display-timings {
+			native-mode = <&timing0>;
+			timing0: lcd {
+				clock-frequency	= <32000000>;
+				hactive		= <800>;
+				vactive		= <480>;
+				hfront-porch	= <2>;
+				hback-porch	= <192>;
+				hsync-len	= <1>;
+				vfront-porch	= <20>;
+				vback-porch	= <2>;
+				vsync-len	= <1>;
+				hsync-active	= <1>;
+				vsync-active	= <1>;
+				pupdelay	= <10>;
+				pondelay	= <10>;
+			};
+		};
+	};
+
+	vmmcsd_fixed: fixedregulator at 0 {
+		compatible = "regulator-fixed";
+		regulator-name = "vmmcsd_fixed";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+	};
+
+	pwm0: omap-pwm at timer5 {
+		compatible = "ti,omap-dmtimer-pwm";
+		ti,timers = <&timer5>;
+		#pwm-cells = <3>;
+	};
+
+	pwm1: omap-pwm at timer6 {
+		compatible = "ti,omap-dmtimer-pwm";
+		ti,timers = <&timer6>;
+		#pwm-cells = <3>;
+	};
+
+	beeper: pwm-beep {
+		compatible = "pwm-beeper";
+		pwms = <&pwm0 0 0 0>;
+	};
+
+	pwmbacklight: pwm-bkl {
+		compatible = "pwm-backlight";
+		pwms = <&pwm1 0 5000000 0>;
+
+		default-brightness-level = <255>;
+		brightness-levels = <0 16 32 64 128 170 202 234 255>;
+
+		power-supply = <&vmmcsd_fixed>;
+		enable-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+	};
+};
+
+&uart0 {		/* console uart */
+	u-boot,dm-spl;
+	status = "okay";
+};
+
+&uart1 {
+	status = "okay";
+};
+
+&i2c0 {
+	u-boot,dm-spl;
+	status = "okay";
+	clock-frequency = <400000>;
+
+	tps: tps at 24 {		/* PMIC controller */
+		u-boot,dm-spl;
+		reg = <0x24>;
+		compatible = "ti,tps65217";
+
+		tps_bl: backlight {
+			compatible = "ti,tps65217-bl";
+			isel = <1>;	/* 1 - ISET1, 2 ISET2 */
+			fdim = <1000>;	/* TPS65217_BL_FDIM_1kHZ */
+			default-brightness = <50>;
+		};
+	};
+};
+
+&i2c2 {
+	status = "okay";
+	clock-frequency = <100000>;
+};
+
+&edma {
+	status = "okay";
+};
+
+&cppi41dma  {
+	status = "okay";
+};
+
+&usb {
+	status = "okay";
+};
+
+&usb_ctrl_mod {
+	status = "okay";
+};
+
+&usb0_phy {
+	status = "okay";
+};
+
+&usb1_phy {
+	status = "okay";
+};
+
+&usb0 {
+	status = "okay";
+	dr_mode = "host";
+};
+
+&usb1 {
+	status = "okay";
+	dr_mode = "host";
+};
+
+&davinci_mdio {
+	status = "okay";
+
+	phy0: ethernet-phy at 0 {
+		reg = <1>;
+	};
+
+	phy1: ethernet-phy at 1 {
+		reg = <2>;
+	};
+};
+
+&mac {
+	dual_emac;
+	status = "okay";
+};
+
+&cpsw_emac0 {
+	phy-handle = <&phy0>;
+	dual_emac_res_vlan = <1>;
+	phy-mode = "mii";
+};
+
+&cpsw_emac1 {
+	phy-handle = <&phy1>;
+	dual_emac_res_vlan = <2>;
+	phy-mode = "mii";
+};
+
+&mmc2 {
+	vmmc-supply = <&vmmcsd_fixed>;
+	bus-width = <0x4>;
+	ti,non-removable;
+	ti,needs-special-hs-handling;
+	ti,vcc-aux-disable-is-sleep;
+	status = "disabled";
+};
+
+&lcdc {
+	status = "disabled";
+};
+
+&elm {
+	status = "okay";
+};
+
+&sham {
+	status = "okay";
+};
+
+&aes {
+	status = "okay";
+};
+
+&gpio0 {
+	u-boot,dm-spl;
+	ti,no-reset-on-init;
+};
+
+&gpio1 {
+	u-boot,dm-spl;
+	ti,no-reset-on-init;
+};
+
+&gpio2 {
+	u-boot,dm-spl;
+	ti,no-reset-on-init;
+};
+
+&gpio3 {
+	u-boot,dm-spl;
+	ti,no-reset-on-init;
+};
+
+&wdt2 {
+	ti,no-reset-on-init;
+	ti,no-idle-on-init;
+};
+
+&tscadc {
+	status = "okay";
+	tsc {
+		ti,wires = <4>;
+		ti,x-plate-resistance = <200>;
+		ti,zx-cutoff-ratio = <40>;
+		ti,min_deviation = <60>;
+		ti,max_deviation = <600>;
+		ti,coordinate-readouts = <5>;
+		ti,wire-config = <0x00 0x11 0x22 0x33>;
+
+		bnr-buttons {
+			Home-Button {};
+		};
+	};
+
+	adc {
+		ti,adc-channels = <5 6 7>;
+	};
+};
+
+&gpmc {
+	u-boot,dm-spl;
+	status = "okay";
+	pinctrl-names = "default";
+	ranges = <0 0 0x08000000 0x10000000>;	/* CS0: NAND */
+	nand at 0,0 {
+		compatible = "ti,omap2-nand";
+		reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
+		interrupt-parent = <&gpmc>;
+		rb-gpios = <&gpmc 1 GPIO_ACTIVE_HIGH>; /* gpmc_wait1 */
+		ti,nand-ecc-opt = "bch8";
+		ti,elm-id = <&elm>;
+		nand-bus-width = <8>;
+		gpmc,device-width = <1>;
+		gpmc,sync-clk-ps = <0>;
+		gpmc,cs-on-ns = <0>;
+		gpmc,cs-rd-off-ns = <44>;
+		gpmc,cs-wr-off-ns = <44>;
+		gpmc,adv-on-ns = <6>;
+		gpmc,adv-rd-off-ns = <34>;
+		gpmc,adv-wr-off-ns = <44>;
+		gpmc,we-on-ns = <0>;
+		gpmc,we-off-ns = <40>;
+		gpmc,oe-on-ns = <0>;
+		gpmc,oe-off-ns = <54>;
+		gpmc,access-ns = <64>;
+		gpmc,rd-cycle-ns = <82>;
+		gpmc,wr-cycle-ns = <82>;
+		gpmc,wait-on-read = "true";
+		gpmc,wait-on-write = "true";
+		gpmc,bus-turnaround-ns = <0>;
+		gpmc,cycle2cycle-delay-ns = <0>;
+		gpmc,clk-activation-ns = <0>;
+		gpmc,wait-monitoring-ns = <0>;
+		gpmc,wr-access-ns = <40>;
+		gpmc,wr-data-mux-bus-ns = <0>;
+		gpmc,wait-pin = <1>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		partition at 0 {
+			label = "NAND.MLO";
+			reg = <0x00000000 0x000020000>;
+		};
+		partition at 1 {
+			label = "NAND.cfgscr";
+			reg = <0x00020000 0x00020000>;
+		};
+		partition at 2 {
+			label = "NAND.dtb";
+			reg = <0x00040000 0x00020000>;
+		};
+		partition at 3 {
+			label = "NAND.u-boot-env";
+			reg = <0x00060000 0x00020000>;
+		};
+		partition at 4 {
+			label = "NAND.u-boot";
+			reg = <0x00080000 0x00080000>;
+		};
+		partition at 5 {
+			label = "NAND.kernel";
+			reg = <0x00100000 0x00400000>;
+		};
+		partition at 6 {
+			label = "NAND.rootfs";
+			reg = <0x00500000 0x08000000>;
+		};
+		partition at 7 {
+			label = "NAND.user";
+			reg = <0x08500000 0x17b00000>;
+		};
+	};
+};
diff --git a/arch/arm/dts/am335x-brppt1-spi.dts b/arch/arm/dts/am335x-brppt1-spi.dts
new file mode 100644
index 0000000..522ed50
--- /dev/null
+++ b/arch/arm/dts/am335x-brppt1-spi.dts
@@ -0,0 +1,366 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018 B&R Industrial Automation GmbH
+ * http://www.br-automation.com
+ *
+ */
+/dts-v1/;
+
+#include "am33xx.dtsi"
+
+/ {
+	model = "BRPPT1 (MMC) Panel";
+	compatible = "ti,am33xx";
+
+	fset: factory-settings {
+		bl-version	= "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456890";
+		version		= <0x0100>;
+		order-no	= "6PPT30 (SPI)";
+		hw-revision	= "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456890";
+		serial-no	= "0";
+		device-id	= <0x0>;
+		parent-id	= <0x0>;
+		hw-variant	= <0x1>;
+	};
+
+	aliases {
+		ds1bkl0 = &pwmbacklight;
+		ds1bkl1 = &tps_bl;
+		ds1timing = &timing0;
+		ds1ctrl = &lcdc;
+		gpmc = &gpmc;
+		mmc = &mmc2;
+		spi0 = &spi0;
+		fset = &fset;
+	};
+
+	chosen {
+		bootargs = "console=ttyO0,115200 earlyprintk";
+		stdout-path = &uart0;
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>; /* 256 MB */
+	};
+
+	panel {
+		status = "disabled";
+
+		compatible = "ti,tilcdc,panel";
+		enable-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+
+		backlight = <&pwmbacklight>;
+		bkl-pwm = <&pwmbacklight>;
+		bkl-tps = <&tps_bl>;
+
+		panel-info {
+			ac-bias		= <255>;
+			ac-bias-intrpt	= <0>;
+			dma-burst-sz	= <16>;
+			bpp		= <32>;
+			fdd		= <0x80>;
+			sync-edge	= <0>;
+			sync-ctrl	= <1>;
+			raster-order	= <0>;
+			fifo-th		= <0>;
+		};
+
+		display-timings {
+			native-mode = <&timing0>;
+			timing0: lcd {
+				clock-frequency	= <32000000>;
+				hactive		= <800>;
+				vactive		= <480>;
+				hfront-porch	= <2>;
+				hback-porch	= <192>;
+				hsync-len	= <1>;
+				vfront-porch	= <20>;
+				vback-porch	= <2>;
+				vsync-len	= <1>;
+				hsync-active	= <1>;
+				vsync-active	= <1>;
+				pupdelay	= <10>;
+				pondelay	= <10>;
+			};
+		};
+	};
+
+	vmmcsd_fixed: fixedregulator at 0 {
+		compatible = "regulator-fixed";
+		regulator-name = "vmmcsd_fixed";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+	};
+
+	pwm0: omap-pwm at timer5 {
+		compatible = "ti,omap-dmtimer-pwm";
+		ti,timers = <&timer5>;
+		#pwm-cells = <3>;
+	};
+
+	pwm1: omap-pwm at timer6 {
+		compatible = "ti,omap-dmtimer-pwm";
+		ti,timers = <&timer6>;
+		#pwm-cells = <3>;
+	};
+
+	beeper: pwm-beep {
+		compatible = "pwm-beeper";
+		pwms = <&pwm0 0 0 0>;
+	};
+
+	pwmbacklight: pwm-bkl {
+		compatible = "pwm-backlight";
+		pwms = <&pwm1 0 5000000 0>;
+
+		default-brightness-level = <255>;
+		brightness-levels = <0 16 32 64 128 170 202 234 255>;
+
+		power-supply = <&vmmcsd_fixed>;
+		enable-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+	};
+};
+
+&uart0 {		/* console uart */
+	u-boot,dm-spl;
+	status = "okay";
+};
+
+&uart1 {
+	status = "okay";
+};
+
+&i2c0 {
+	u-boot,dm-spl;
+	status = "okay";
+	clock-frequency = <400000>;
+
+	tps: tps at 24 {		/* PMIC controller */
+		u-boot,dm-spl;
+		reg = <0x24>;
+		compatible = "ti,tps65217";
+
+		tps_bl: backlight {
+			compatible = "ti,tps65217-bl";
+			isel = <1>;	/* 1 - ISET1, 2 ISET2 */
+			fdim = <1000>;	/* TPS65217_BL_FDIM_1kHZ */
+			default-brightness = <50>;
+		};
+	};
+};
+
+&i2c2 {
+	status = "okay";
+	clock-frequency = <100000>;
+};
+
+&spi0 {
+	u-boot,dm-spl;
+	status = "okay";
+
+	cs-gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>,
+		   <&gpio0 6 GPIO_ACTIVE_HIGH>,
+		   <0>,
+		   <0>;
+
+	spi-max-frequency = <24000000>;
+
+	spi_flash: spiflash at 0 {
+		u-boot,dm-spl;
+		u-boot,dm-pre-reloc;
+		compatible = "spidev", "spi-flash";
+		spi-max-frequency = <24000000>;
+		reg = <0>;
+	};
+};
+
+&edma {
+	status = "okay";
+};
+
+&cppi41dma  {
+	status = "okay";
+};
+
+&usb {
+	status = "okay";
+};
+
+&usb_ctrl_mod {
+	status = "okay";
+};
+
+&usb0_phy {
+	status = "okay";
+};
+
+&usb1_phy {
+	status = "okay";
+};
+
+&usb0 {
+	status = "okay";
+	dr_mode = "host";
+};
+
+&usb1 {
+	status = "okay";
+	dr_mode = "host";
+};
+
+&davinci_mdio {
+	status = "okay";
+
+	phy0: ethernet-phy at 0 {
+		reg = <1>;
+	};
+
+	phy1: ethernet-phy at 1 {
+		reg = <2>;
+	};
+};
+
+&mac {
+	status = "okay";
+};
+
+&cpsw_emac0 {
+	phy-handle = <&phy0>;
+	dual_emac_res_vlan = <1>;
+	phy-mode = "mii";
+};
+
+&cpsw_emac1 {
+	phy-handle = <&phy1>;
+	dual_emac_res_vlan = <2>;
+	phy-mode = "mii";
+};
+
+&mmc1 {
+	u-boot,dm-spl;
+	vmmc-supply = <&vmmcsd_fixed>;
+	bus-width = <0x4>;
+	ti,non-removable;
+	ti,needs-special-hs-handling;
+	ti,vcc-aux-disable-is-sleep;
+	status = "okay";
+};
+
+&mmc2 {
+	u-boot,dm-spl;
+	vmmc-supply = <&vmmcsd_fixed>;
+	bus-width = <0x8>;
+	ti,non-removable;
+	ti,needs-special-hs-handling;
+	ti,vcc-aux-disable-is-sleep;
+	status = "okay";
+};
+
+&lcdc {
+	status = "disabled";
+};
+
+&elm {
+	status = "okay";
+};
+
+&sham {
+	status = "okay";
+};
+
+&aes {
+	status = "okay";
+};
+
+&gpio0 {
+	u-boot,dm-spl;
+	ti,no-reset-on-init;
+};
+
+&gpio1 {
+	u-boot,dm-spl;
+	ti,no-reset-on-init;
+};
+
+&gpio2 {
+	u-boot,dm-spl;
+	ti,no-reset-on-init;
+};
+
+&gpio3 {
+	u-boot,dm-spl;
+	ti,no-reset-on-init;
+};
+
+&wdt2 {
+	ti,no-reset-on-init;
+	ti,no-idle-on-init;
+};
+
+&tscadc {
+	status = "okay";
+	tsc {
+		ti,wires = <4>;
+		ti,x-plate-resistance = <200>;
+		ti,zx-cutoff-ratio = <40>;
+		ti,min_deviation = <60>;
+		ti,max_deviation = <600>;
+		ti,coordinate-readouts = <5>;
+		ti,wire-config = <0x00 0x11 0x22 0x33>;
+
+		bnr-buttons {
+			Home-Button {};
+		};
+	};
+
+	adc {
+		ti,adc-channels = <5 6 7>;
+	};
+};
+
+&timer6 {		/* used for cpsw end device */
+	status = "okay";
+	ti,no-reset-on-init;
+	ti,no-idle-on-init;
+};
+
+&timer7 {		/* used for cpsw end device */
+	status = "okay";
+	ti,no-reset-on-init;
+	ti,no-idle-on-init;
+};
+
+&wdt2 {
+	status = "okay";
+	ti,no-reset-on-init;
+	ti,no-idle-on-init;
+};
+
+&epwmss0 {
+	status = "okay";
+};
+
+&tscadc {
+	status = "okay";
+};
+
+&dcan0 {
+	status = "okay";
+};
+
+&dcan1 {
+	status = "okay";
+};
+
+&sham {
+	status = "disabled";
+};
+
+&aes {
+	status = "disabled";
+};
+
+&rng {
+	status = "disabled";
+};
diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c
index 87b76a6..d2e7c72 100644
--- a/board/BuR/brppt1/board.c
+++ b/board/BuR/brppt1/board.c
@@ -77,6 +77,8 @@ static const struct dpll_params dpll_ddr3 = { 400, OSC-1, 1, -1, -1, -1, -1};
 
 void am33xx_spl_board_init(void)
 {
+	int rc;
+
 	struct cm_perpll *const cmper = (struct cm_perpll *)CM_PER;
 	/*struct cm_wkuppll *const cmwkup = (struct cm_wkuppll *)CM_WKUP;*/
 	struct cm_dpll *const cmdpll = (struct cm_dpll *)CM_DPLL;
@@ -108,8 +110,21 @@ void am33xx_spl_board_init(void)
 	i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
 	pmicsetup(0);
 
-	gpio_direction_output(64+29, 1); /* switch NAND_RnB to GPMC_WAIT1 */
-	gpio_direction_output(64+28, 1); /* switch MII2_CRS to GPMC_WAIT0 */
+	/* peripheral reset */
+	rc = gpio_request(64 + 29, "GPMC_WAIT1");
+	if (rc != 0)
+		printf("cannot request GPMC_WAIT1 GPIO!\n");
+	rc = gpio_direction_output(64 + 29, 1);
+	if (rc != 0)
+		printf("cannot set GPMC_WAIT1 GPIO!\n");
+
+	rc = gpio_request(64 + 28, "GPMC_WAIT0");
+	if (rc != 0)
+		printf("cannot request GPMC_WAIT0 GPIO!\n");
+	rc = gpio_direction_output(64 + 28, 1);
+	if (rc != 0)
+		printf("cannot set GPMC_WAIT0 GPIO!\n");
+
 }
 
 const struct dpll_params *get_dpll_ddr_params(void)
@@ -151,10 +166,13 @@ int board_late_init(void)
 {
 	unsigned char bmode = 0;
 	ulong bootcount = 0;
+	int rc;
 
 	bootcount = bootcount_load() & 0xF;
 
-	if (gpio_get_value(REPSWITCH) == 0 || bootcount == 12)
+	rc = gpio_request(REPSWITCH, "REPSWITCH");
+
+	if (rc != 0 || gpio_get_value(REPSWITCH) == 0 || bootcount == 12)
 		bmode = 12;
 	else if (bootcount > 0)
 		bmode = 0;
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 01e3078..f3eae5c 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -22,15 +22,11 @@
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <i2c.h>
-#include <miiphy.h>
-#include <cpsw.h>
 #include <power/tps65217.h>
 #include <lcd.h>
 #include "bur_common.h"
 #include "../../../drivers/video/am335x-fb.h"
 
-static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
-
 DECLARE_GLOBAL_DATA_PTR;
 
 /* --------------------------------------------------------------------------*/
@@ -270,6 +266,9 @@ int ft_board_setup(void *blob, bd_t *bd)
 }
 
 #ifdef CONFIG_SPL_BUILD
+
+static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
+
 void pmicsetup(u32 mpupll)
 {
 	int mpu_vdd;
@@ -354,100 +353,6 @@ void set_mux_conf_regs(void)
 
 #endif /* CONFIG_SPL_BUILD */
 
-#if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
-	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
-static void cpsw_control(int enabled)
-{
-	/* VTP can be added here */
-	return;
-}
-
-/* describing port offsets of TI's CPSW block */
-static struct cpsw_slave_data cpsw_slaves[] = {
-	{
-		.slave_reg_ofs	= 0x208,
-		.sliver_reg_ofs	= 0xd80,
-		.phy_addr	= 1,
-	},
-	{
-		.slave_reg_ofs	= 0x308,
-		.sliver_reg_ofs	= 0xdc0,
-		.phy_addr	= 2,
-	},
-};
-
-static struct cpsw_platform_data cpsw_data = {
-	.mdio_base		= CPSW_MDIO_BASE,
-	.cpsw_base		= CPSW_BASE,
-	.mdio_div		= 0xff,
-	.channels		= 8,
-	.cpdma_reg_ofs		= 0x800,
-	.slaves			= 1,
-	.slave_data		= cpsw_slaves,
-	.ale_reg_ofs		= 0xd00,
-	.ale_entries		= 1024,
-	.host_port_reg_ofs	= 0x108,
-	.hw_stats_reg_ofs	= 0x900,
-	.bd_ram_ofs		= 0x2000,
-	.mac_control		= (1 << 5),
-	.control		= cpsw_control,
-	.host_port_num		= 0,
-	.version		= CPSW_CTRL_VERSION_2,
-};
-#endif /* CONFIG_DRIVER_TI_CPSW, ... */
-
-#if defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)
-int board_eth_init(bd_t *bis)
-{
-	int rv = 0;
-	char mac_addr[6];
-	const char *mac = 0;
-	uint32_t mac_hi, mac_lo;
-	/* try reading mac address from efuse */
-	mac_lo = readl(&cdev->macid0l);
-	mac_hi = readl(&cdev->macid0h);
-	mac_addr[0] = mac_hi & 0xFF;
-	mac_addr[1] = (mac_hi & 0xFF00) >> 8;
-	mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
-	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
-	mac_addr[4] = mac_lo & 0xFF;
-	mac_addr[5] = (mac_lo & 0xFF00) >> 8;
-
-	if (!env_get("ethaddr")) {
-		if (!mac) {
-			printf("<ethaddr> not set. validating E-fuse MAC ... ");
-			if (is_valid_ethaddr((const u8 *)mac_addr))
-				mac = (const char *)mac_addr;
-		}
-
-		if (mac) {
-			printf("using: %pM on ", mac);
-			eth_env_set_enetaddr("ethaddr", (const u8 *)mac);
-		}
-	}
-	writel(MII_MODE_ENABLE, &cdev->miisel);
-	cpsw_slaves[0].phy_if = PHY_INTERFACE_MODE_MII;
-	cpsw_slaves[1].phy_if =	PHY_INTERFACE_MODE_MII;
-
-	rv = cpsw_register(&cpsw_data);
-	if (rv < 0) {
-		printf("Error %d registering CPSW switch\n", rv);
-		return 0;
-	}
-	return rv;
-}
-#endif /* defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD) */
-#if defined(CONFIG_MMC)
-int board_mmc_init(bd_t *bis)
-{
-	int rc = 0;
-
-	rc |= omap_mmc_init(0, 0, 0, -1, -1);
-	rc |= omap_mmc_init(1, 0, 0, -1, -1);
-
-	return rc;
-}
-#endif
 int overwrite_console(void)
 {
 	return 1;
diff --git a/configs/brppt1_mmc_defconfig b/configs/brppt1_mmc_defconfig
index 6bb4657..3a83ecf 100644
--- a/configs/brppt1_mmc_defconfig
+++ b/configs/brppt1_mmc_defconfig
@@ -3,13 +3,18 @@ CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x4000
 CONFIG_AM33XX=y
 CONFIG_TARGET_BRPPT1=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
+# CONFIG_SPL_NAND_SUPPORT is not set
 CONFIG_SPL=y
+CONFIG_DEFAULT_DEVICE_TREE="am335x-brppt1-mmc"
+CONFIG_TPL_SYS_MALLOC_F_LEN=0x0
+# CONFIG_EXPERT is not set
+# CONFIG_FIT is not set
 CONFIG_OF_BOARD_SETUP=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,EMMC_BOOT"
 CONFIG_BOOTDELAY=0
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="run b_default"
@@ -20,8 +25,9 @@ CONFIG_VERSION_VARIABLE=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_ARCH_MISC_INIT=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_I2C_SUPPORT=y
-# CONFIG_SPL_NAND_SUPPORT is not set
 CONFIG_SPL_POWER_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_SPL_YMODEM_SUPPORT=y
@@ -34,29 +40,56 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
-# CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_ITEST is not set
-# CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
+CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
+CONFIG_CMD_BOOTCOUNT=y
+CONFIG_CMD_BKOPS_ENABLE=y
+CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+# CONFIG_SPL_DOS_PARTITION is not set
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clocks clock-names interrupt-parent interrupt-controller interrupt-cells dma-names dmas "
 CONFIG_ENV_IS_IN_MMC=y
-CONFIG_NETCONSOLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+# CONFIG_OF_TRANSLATE is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_DM_I2C_COMPAT=y
+CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
+CONFIG_MISC=y
+CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_PHY_NATSEMI=y
+CONFIG_DM_ETH=y
 CONFIG_DRIVER_TI_CPSW=y
+# CONFIG_NETDEVICES is not set
+CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_MUSB_TI=y
 CONFIG_USB_MUSB_DSPS=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
 CONFIG_FAT_WRITE=y
-CONFIG_OF_LIBFDT=y
+CONFIG_LZO=y
+# CONFIG_OF_LIBFDT_OVERLAY is not set
+# CONFIG_EFI_LOADER is not set
diff --git a/configs/brppt1_nand_defconfig b/configs/brppt1_nand_defconfig
index 7846e55..342d31a 100644
--- a/configs/brppt1_nand_defconfig
+++ b/configs/brppt1_nand_defconfig
@@ -3,12 +3,16 @@ CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_AM33XX=y
 CONFIG_TARGET_BRPPT1=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
+CONFIG_DEFAULT_DEVICE_TREE="am335x-brppt1-nand"
+CONFIG_TPL_SYS_MALLOC_F_LEN=0x0
+# CONFIG_EXPERT is not set
+# CONFIG_FIT is not set
 CONFIG_OF_BOARD_SETUP=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1"
 CONFIG_BOOTDELAY=0
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="run b_default"
@@ -19,6 +23,9 @@ CONFIG_VERSION_VARIABLE=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_ARCH_MISC_INIT=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_SPL_SEPARATE_BSS=y
+# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_POWER_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
@@ -32,15 +39,17 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
-# CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_NAND=y
+CONFIG_CMD_PART=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_ITEST is not set
-# CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
+CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
+CONFIG_CMD_BOOTCOUNT=y
+CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
@@ -49,16 +58,42 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_CMD_MTDPARTS=y
 CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:128k(MLO),128k(cfgscr),128k(dtb),128k(u-boot-env),512k(u-boot),4m(kernel),128m(rootfs),-(user)"
+# CONFIG_SPL_DOS_PARTITION is not set
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clocks clock-names interrupt-parent interrupt-controller interrupt-cells dma-names dmas "
 CONFIG_ENV_IS_IN_NAND=y
-CONFIG_NETCONSOLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+# CONFIG_OF_TRANSLATE is not set
+CONFIG_BLK=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_DM_I2C_COMPAT=y
+CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
+CONFIG_MISC=y
 # CONFIG_MMC is not set
 CONFIG_NAND=y
+CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
+CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000
+CONFIG_PHY_NATSEMI=y
+CONFIG_DM_ETH=y
 CONFIG_DRIVER_TI_CPSW=y
+# CONFIG_NETDEVICES is not set
+CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_MUSB_TI=y
 CONFIG_USB_MUSB_DSPS=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
 CONFIG_FAT_WRITE=y
-CONFIG_OF_LIBFDT=y
+CONFIG_LZO=y
+# CONFIG_OF_LIBFDT_OVERLAY is not set
+# CONFIG_EFI_LOADER is not set
diff --git a/configs/brppt1_spi_defconfig b/configs/brppt1_spi_defconfig
index f4197c4..826a93c 100644
--- a/configs/brppt1_spi_defconfig
+++ b/configs/brppt1_spi_defconfig
@@ -3,15 +3,18 @@ CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x4000
 CONFIG_AM33XX=y
 CONFIG_TARGET_BRPPT1=y
-CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="am335x-brppt1-spi"
+CONFIG_TPL_SYS_MALLOC_F_LEN=0x0
+# CONFIG_EXPERT is not set
+# CONFIG_FIT is not set
 CONFIG_OF_BOARD_SETUP=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,SPI_BOOT,EMMC_BOOT"
 CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=0
 CONFIG_USE_BOOTCOMMAND=y
@@ -23,6 +26,9 @@ CONFIG_VERSION_VARIABLE=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_ARCH_MISC_INIT=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_SPL_SEPARATE_BSS=y
+# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_NAND_SUPPORT is not set
 CONFIG_SPL_POWER_SUPPORT=y
@@ -38,37 +44,65 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
-# CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
 CONFIG_CMD_SF=y
-CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_ITEST is not set
-# CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
+CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
+CONFIG_CMD_BOOTCOUNT=y
+CONFIG_CMD_BKOPS_ENABLE=y
+CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
-CONFIG_CMD_MTDPARTS=y
+# CONFIG_SPL_DOS_PARTITION is not set
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clocks clock-names interrupt-parent interrupt-controller interrupt-cells dma-names dmas "
 CONFIG_ENV_IS_IN_SPI_FLASH=y
-CONFIG_NETCONSOLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+# CONFIG_OF_TRANSLATE is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_DM_I2C_COMPAT=y
+CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
+CONFIG_MISC=y
+CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_PHY_NATSEMI=y
+CONFIG_DM_ETH=y
 CONFIG_DRIVER_TI_CPSW=y
+# CONFIG_NETDEVICES is not set
+CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
+CONFIG_DM_SPI=y
 CONFIG_OMAP3_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_MUSB_TI=y
 CONFIG_USB_MUSB_DSPS=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
 CONFIG_FAT_WRITE=y
-CONFIG_OF_LIBFDT=y
+CONFIG_LZO=y
+# CONFIG_OF_LIBFDT_OVERLAY is not set
+# CONFIG_EFI_LOADER is not set
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index d5b2573..aa476f6 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -37,13 +37,13 @@
 #endif /* CONFIG_EMMC_BOOT */
 
 /*
- * When we have SPI or NAND flash we expect to be making use of mtdparts,
+ * When we have NAND flash we expect to be making use of mtdparts,
  * both for ease of use in U-Boot and for passing information on to
  * the Linux kernel.
  */
-#if defined(CONFIG_SPI_BOOT) || defined(CONFIG_NAND)
+#if defined(CONFIG_NAND)
 #define CONFIG_MTD_DEVICE		/* Required for mtdparts */
-#endif /* CONFIG_SPI_BOOT, ... */
+#endif
 
 #ifdef CONFIG_NAND
 #define CONFIG_SPL_NAND_BASE
@@ -95,7 +95,7 @@
 "b_tgts_pme=net usb0 mmc0 mmc1\0" \
 "loaddev=mmc 1\0"
 
-#ifdef CONFIG_MMC
+#ifdef CONFIG_ENV_IS_IN_MMC
 #define MMCTGTS \
 MMCSPI_TGTS \
 "cfgscr=mmc dev 1; mmc read ${cfgaddr} 200 80; source ${cfgaddr}\0"
@@ -167,37 +167,32 @@ NANDTGTS \
 #define CONFIG_SYS_NAND_ECCBYTES	14
 
 #define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_NAND_U_BOOT_OFFS	0x80000
 
 #define CONFIG_NAND_OMAP_GPMC_WSCFG	1
 #endif /* CONFIG_NAND */
 
 /* USB configuration */
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
-#define CONFIG_AM335X_USB0
-#define CONFIG_AM335X_USB0_MODE	MUSB_HOST
-#define CONFIG_AM335X_USB1
-#define CONFIG_AM335X_USB1_MODE MUSB_HOST
 
-#if defined(CONFIG_SPI_BOOT)
-/* McSPI IP block */
-#define CONFIG_SF_DEFAULT_SPEED		24000000
-
-#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x20000
+#if defined(CONFIG_SPI)
+/* SPI Flash */
+#define CONFIG_SF_DEFAULT_SPEED			24000000
+#define CONFIG_SYS_SPI_U_BOOT_OFFS		0x40000
+/* Environment */
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
-#define CONFIG_ENV_SPI_MAX_HZ		CONFIG_SF_DEFAULT_SPEED
-#define CONFIG_ENV_SECT_SIZE		(4 << 10) /* 4 KB sectors */
-#define CONFIG_ENV_OFFSET		(768 << 10) /* 768 KiB in */
-#define CONFIG_ENV_OFFSET_REDUND	(896 << 10) /* 896 KiB in */
-
-#elif defined(CONFIG_EMMC_BOOT)
+#define CONFIG_ENV_SPI_MAX_HZ			CONFIG_SF_DEFAULT_SPEED
+#define CONFIG_ENV_SECT_SIZE			CONFIG_ENV_SIZE
+#define CONFIG_ENV_OFFSET			0x20000
+#define CONFIG_ENV_OFFSET_REDUND		(CONFIG_ENV_OFFSET + \
+						 CONFIG_ENV_SECT_SIZE)
+#elif defined(CONFIG_ENV_IS_IN_MMC)
 #define CONFIG_SYS_MMC_ENV_DEV		1
 #define CONFIG_SYS_MMC_ENV_PART		2
 #define CONFIG_ENV_OFFSET		0x40000	/* TODO: Adresse definieren */
 #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
-#elif defined(CONFIG_NAND)
+#elif defined(CONFIG_ENV_IS_IN_NAND)
 /* No NAND env support in SPL */
 #define CONFIG_ENV_OFFSET		0x60000
 #define CONFIG_SYS_ENV_SECT_SIZE	CONFIG_ENV_SIZE
diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h
index bdcbee4..926ba99 100644
--- a/include/configs/bur_am335x_common.h
+++ b/include/configs/bur_am335x_common.h
@@ -11,6 +11,19 @@
 #ifndef __BUR_AM335X_COMMON_H__
 #define __BUR_AM335X_COMMON_H__
 /* ------------------------------------------------------------------------- */
+
+/* legacy #defines for non DM bur-board */
+#ifndef CONFIG_DM
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE	(-4)
+#define CONFIG_SYS_NS16550_CLK		(48000000)
+#define CONFIG_SYS_NS16550_COM1		0x44e09000
+
+#define CONFIG_I2C
+#define CONFIG_SYS_I2C
+
+#endif /* CONFIG_DM */
+
 #define CONFIG_MAX_RAM_BANK_SIZE	(1024 << 20)	/* 1GB */
 
 /* Timer information */
@@ -20,16 +33,6 @@
 
 #include <asm/arch/omap.h>
 
-/* NS16550 Configuration */
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE	(-4)
-#define CONFIG_SYS_NS16550_CLK		48000000
-#define CONFIG_SYS_NS16550_COM1		0x44e09000	/* UART0 */
-
-/* Network defines */
-#define CONFIG_MII			/* Required in net/eth.c */
-#define CONFIG_PHY_NATSEMI
-
 /*
  * SPL related defines.  The Public RAM memory map the ROM defines the
  * area between 0x402F0400 and 0x4030B800 as a download area and
@@ -65,9 +68,6 @@
 #define CONFIG_SYS_INIT_SP_ADDR		(NON_SECURE_SRAM_END - \
 					GENERATED_GBL_DATA_SIZE)
 
-/* I2C */
-#define CONFIG_SYS_I2C
-
 /*
  * Our platforms make use of SPL to initalize the hardware (primarily
  * memory) enough for full U-Boot to be loaded.  We also support Falcon
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 12/12] board/BuR/brppt1: add makerule for generating production files
  2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
                   ` (10 preceding siblings ...)
  2018-07-06 13:41 ` [U-Boot] [PATCH 11/12] board/BuR/brppt1: convert brppt1 boards to driver model Hannes Schmelzer
@ 2018-07-06 13:41 ` Hannes Schmelzer
  2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
  11 siblings, 1 reply; 25+ messages in thread
From: Hannes Schmelzer @ 2018-07-06 13:41 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
---

 board/BuR/brppt1/config.mk | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 board/BuR/brppt1/config.mk

diff --git a/board/BuR/brppt1/config.mk b/board/BuR/brppt1/config.mk
new file mode 100644
index 0000000..b11b544
--- /dev/null
+++ b/board/BuR/brppt1/config.mk
@@ -0,0 +1,36 @@
+#
+# Copyright (C) 2018 Hannes Schmelzer <oe5hpm@oevsv.at> -
+# B&R Industrial Automation GmbH - http://www.br-automation.com
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE) | sed -e 's/am335x-//')
+
+payload_off :=$(shell printf "%d" $(CONFIG_SYS_SPI_U_BOOT_OFFS))
+
+quiet_cmd_prodbin = PRODBIN $@ $(payload_off)
+cmd_prodbin =								\
+	dd if=/dev/zero ibs=1M count=2 2>/dev/null | tr "\000" "\377" >$@ && \
+	dd conv=notrunc bs=1 if=MLO.byteswap of=$@ seek=0 2>/dev/null && \
+	dd bs=1 if=u-boot-dtb.img of=$@ seek=$(payload_off) 2>/dev/null
+
+quiet_cmd_prodzip = SAPZIP  $@
+cmd_prodzip =					\
+	test -d misc && rm -r misc;		\
+	mkdir misc &&				\
+	cp MLO.byteswap misc/ &&		\
+	cp spl/u-boot-spl.bin misc/ &&		\
+	cp u-boot-dtb.img misc/ &&		\
+	zip -9 -r $@ misc/* >/dev/null $<
+
+ifeq ($(hw-platform-y),brppt1-spi)
+ALL-y += $(hw-platform-y)_prog.bin
+ALL-y += $(hw-platform-y)_prod.zip
+endif
+
+$(hw-platform-y)_prog.bin: u-boot-dtb.img spl/u-boot-spl.bin
+	$(call if_changed,prodbin)
+
+$(hw-platform-y)_prod.zip: $(hw-platform-y)_prog.bin
+	$(call if_changed,prodzip)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [U-Boot, 01/12] board/BuR: drop devicetree loading and lcd setup for linux-targets
  2018-07-06 13:41 ` [U-Boot] [PATCH 01/12] board/BuR: drop devicetree loading and lcd setup for linux-targets Hannes Schmelzer
@ 2018-07-20 12:36   ` Tom Rini
  0 siblings, 0 replies; 25+ messages in thread
From: Tom Rini @ 2018-07-20 12:36 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 06, 2018 at 03:41:18PM +0200, Hannes Schmelzer wrote:

> This patch  drops the lcd-screen setup, the summary screen and getting
> mac-addresses based on a previous loaded device-tree for linux targets.
> Selecting those linux target is simple, since we have only the brppt1.
> 
> In detail we do:
> - drop the common lcd-setup code which relys on a fdt_blob
> - drop the common dtb loading mechanism
> - drop the now obsolete CONFIG_USE_FDT from board header and whitelist.
> 
> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/d0c06bb9/attachment.sig>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [U-Boot, 02/12] board/BuR/common: drop simple-framebuffer setup
  2018-07-06 13:41 ` [U-Boot] [PATCH 02/12] board/BuR/common: drop simple-framebuffer setup Hannes Schmelzer
@ 2018-07-20 12:36   ` Tom Rini
  0 siblings, 0 replies; 25+ messages in thread
From: Tom Rini @ 2018-07-20 12:36 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 06, 2018 at 03:41:19PM +0200, Hannes Schmelzer wrote:

> The linux systems running on the brppt1 targets are using modern DRM
> drivers since long time ago. Further we are going to drop the LCD
> support completely on this board, so the simple-framebuffer setup
> becomes obsolete.
> 
> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/7f462399/attachment.sig>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [U-Boot, 03/12] board/BuR/common: make CONFIG_LCD optional
  2018-07-06 13:41 ` [U-Boot] [PATCH 03/12] board/BuR/common: make CONFIG_LCD optional Hannes Schmelzer
@ 2018-07-20 12:37   ` Tom Rini
  0 siblings, 0 replies; 25+ messages in thread
From: Tom Rini @ 2018-07-20 12:37 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 06, 2018 at 03:41:20PM +0200, Hannes Schmelzer wrote:

> Since we're going to drop LCD-support on brppt1 boards, we have to make
> this stuff here optional and remove the #error path.
> 
> We also move out the ft_board_setup(...) from this #ifdef because
> there's no relationship with the LCD-code and on the other hand this is
> still needed in future even with LCD-support off.
> 
> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/5fd31e61/attachment.sig>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [U-Boot,04/12] board/BuR/brppt1: drop LCD-support
  2018-07-06 13:41 ` [U-Boot] [PATCH 04/12] board/BuR/brppt1: drop LCD-support Hannes Schmelzer
@ 2018-07-20 12:37   ` Tom Rini
  0 siblings, 0 replies; 25+ messages in thread
From: Tom Rini @ 2018-07-20 12:37 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 06, 2018 at 03:41:21PM +0200, Hannes Schmelzer wrote:

> On this linux target long time ago the OS is using DRM driver for
> handling video output, the pre initialization of u-boot and the display
> summary screen is obsolete. With this patch we drop the LCD-support from
> thisd board.
> 
> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/aeb55b8a/attachment.sig>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [U-Boot, 05/12] board/BuR/common: remove interface Label from summary screen
  2018-07-06 13:41 ` [U-Boot] [PATCH 05/12] board/BuR/common: remove interface Label from summary screen Hannes Schmelzer
@ 2018-07-20 12:37   ` Tom Rini
  0 siblings, 0 replies; 25+ messages in thread
From: Tom Rini @ 2018-07-20 12:37 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 06, 2018 at 03:41:22PM +0200, Hannes Schmelzer wrote:

> This interface names may vary over different products, to consider this
> fact we replace the interface label "IF1" and "IF2" on the summary
> screen with some more generic wording "MAC1" and "MAC2".
> 
> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/49cf87a2/attachment.sig>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [U-Boot, 06/12] board/BuR/common: fix PMIC mpu-pll setup
  2018-07-06 13:41 ` [U-Boot] [PATCH 06/12] board/BuR/common: fix PMIC mpu-pll setup Hannes Schmelzer
@ 2018-07-20 12:37   ` Tom Rini
  0 siblings, 0 replies; 25+ messages in thread
From: Tom Rini @ 2018-07-20 12:37 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 06, 2018 at 03:41:23PM +0200, Hannes Schmelzer wrote:

> If a board-code calls the  pmicsetup(u32 mpupll) with a mpupll value
> != 0 it wants to force some frequency with the value provided by mpupll.
> Setting up 1 GHz is wrong here.
> 
> Nobody did take notice about that yet, since every board calls this
> function with zero.
> 
> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/f7382a36/attachment.sig>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [U-Boot, 07/12] board/BuR/brppt1: drop dead code (CONFIG_SPL_OS_BOOT)
  2018-07-06 13:41 ` [U-Boot] [PATCH 07/12] board/BuR/brppt1: drop dead code (CONFIG_SPL_OS_BOOT) Hannes Schmelzer
@ 2018-07-20 12:37   ` Tom Rini
  0 siblings, 0 replies; 25+ messages in thread
From: Tom Rini @ 2018-07-20 12:37 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 06, 2018 at 03:41:24PM +0200, Hannes Schmelzer wrote:

> The falcon mode was never used on this board, there is also no plan to
> use it. So drop this dead code.
> 
> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/f55d8c24/attachment.sig>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [U-Boot, 08/12] board/BuR/common: refactor ft_board_setup(...)
  2018-07-06 13:41 ` [U-Boot] [PATCH 08/12] board/BuR/common: refactor ft_board_setup(...) Hannes Schmelzer
@ 2018-07-20 12:37   ` Tom Rini
  0 siblings, 0 replies; 25+ messages in thread
From: Tom Rini @ 2018-07-20 12:37 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 06, 2018 at 03:41:25PM +0200, Hannes Schmelzer wrote:

> On other OS, not one provided by B&R, it is not guaranteed that there
> are factory-settings within a devicetree. So we must not treat the
> absence of them as error.
> Further we've the fact that on different version of the device-tree
> files there are different namings of the factory-settings, we consider
> this with searching for an alternative name.
> 
> changing things as following:
> 
> - don't treat as error if the bootloader version cannot written into
> devicetree.
> 
> - since the naming of the factory-settings are different in different
> versions of the provided device-tree we search for the alternate name
> "/fset"
> 
> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/b1b81e0c/attachment.sig>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [U-Boot, 09/12] board/BuR/brppt1: implement more flexible boot process
  2018-07-06 13:41 ` [U-Boot] [PATCH 09/12] board/BuR/brppt1: implement more flexible boot process Hannes Schmelzer
@ 2018-07-20 12:37   ` Tom Rini
  0 siblings, 0 replies; 25+ messages in thread
From: Tom Rini @ 2018-07-20 12:37 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 06, 2018 at 03:41:26PM +0200, Hannes Schmelzer wrote:

> With this commit we do:
> 
> - set the bootdelay in all brppt1 defconfigs to 0, this makes
> development easier, since we can break into serial console.
> 
> - move CONFIG_BOOTCOMMAND from header file to defconfig
> 
> - introduce b_mode variable for selecting the final boot-target.
> This b_mode represents the boot-switch, which can found on most b&r
> targets. On the brppt1 this boot-switch is derived from some gpio and
> the bootcounter within the RTC block, making it so possible to force
> a boot-target (as example for repair-case).
> 
> - refactor the environment for booting new flexible way
> primary we want to get some bootscr.img within the mass-storage,
> this script then loads everything needed for the boot.
> For legacy reason we implement the t30lgcy#x boot targets, booting the
> already delivered linux-images.
> 
> - make space for the cfgscr within mtdparts on brppt1_nand
> 
> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/00269fef/attachment.sig>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [U-Boot, 10/12] dts: am33xx: add u-boot, dm-spl to ocp bus
  2018-07-06 13:41 ` [U-Boot] [PATCH 10/12] dts: am33xx: add u-boot, dm-spl to ocp bus Hannes Schmelzer
@ 2018-07-20 12:37   ` Tom Rini
  0 siblings, 0 replies; 25+ messages in thread
From: Tom Rini @ 2018-07-20 12:37 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 06, 2018 at 03:41:27PM +0200, Hannes Schmelzer wrote:

> This is needed for having access to the devices below this bus, most
> important is uart and boot-device (spi, mmc, ...) in SPL stage.
> 
> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/3bc4fe4c/attachment.sig>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [U-Boot, 11/12] board/BuR/brppt1: convert brppt1 boards to driver model
  2018-07-06 13:41 ` [U-Boot] [PATCH 11/12] board/BuR/brppt1: convert brppt1 boards to driver model Hannes Schmelzer
@ 2018-07-20 12:37   ` Tom Rini
  0 siblings, 0 replies; 25+ messages in thread
From: Tom Rini @ 2018-07-20 12:37 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 06, 2018 at 03:41:28PM +0200, Hannes Schmelzer wrote:

> - add a devicetree for each variant (mmc, spi, nand)
> - drop unneeded code from board and bur/common
> - drop unneeded stuff from config header files
> - minor adaptions to be compliant with driver model (requesting gpio,..)
> - harmonize the commandset over all brppt1 targets
> 
> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/0fb11e3e/attachment.sig>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [U-Boot, 12/12] board/BuR/brppt1: add makerule for generating production files
  2018-07-06 13:41 ` [U-Boot] [PATCH 12/12] board/BuR/brppt1: add makerule for generating production files Hannes Schmelzer
@ 2018-07-20 12:37   ` Tom Rini
  0 siblings, 0 replies; 25+ messages in thread
From: Tom Rini @ 2018-07-20 12:37 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 06, 2018 at 03:41:29PM +0200, Hannes Schmelzer wrote:

> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/42bb05e8/attachment.sig>

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2018-07-20 12:37 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-06 13:41 [U-Boot] [PATCH 00/12] Refactor bur board/common code Hannes Schmelzer
2018-07-06 13:41 ` [U-Boot] [PATCH 01/12] board/BuR: drop devicetree loading and lcd setup for linux-targets Hannes Schmelzer
2018-07-20 12:36   ` [U-Boot] [U-Boot, " Tom Rini
2018-07-06 13:41 ` [U-Boot] [PATCH 02/12] board/BuR/common: drop simple-framebuffer setup Hannes Schmelzer
2018-07-20 12:36   ` [U-Boot] [U-Boot, " Tom Rini
2018-07-06 13:41 ` [U-Boot] [PATCH 03/12] board/BuR/common: make CONFIG_LCD optional Hannes Schmelzer
2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
2018-07-06 13:41 ` [U-Boot] [PATCH 04/12] board/BuR/brppt1: drop LCD-support Hannes Schmelzer
2018-07-20 12:37   ` [U-Boot] [U-Boot,04/12] " Tom Rini
2018-07-06 13:41 ` [U-Boot] [PATCH 05/12] board/BuR/common: remove interface Label from summary screen Hannes Schmelzer
2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
2018-07-06 13:41 ` [U-Boot] [PATCH 06/12] board/BuR/common: fix PMIC mpu-pll setup Hannes Schmelzer
2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
2018-07-06 13:41 ` [U-Boot] [PATCH 07/12] board/BuR/brppt1: drop dead code (CONFIG_SPL_OS_BOOT) Hannes Schmelzer
2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
2018-07-06 13:41 ` [U-Boot] [PATCH 08/12] board/BuR/common: refactor ft_board_setup(...) Hannes Schmelzer
2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
2018-07-06 13:41 ` [U-Boot] [PATCH 09/12] board/BuR/brppt1: implement more flexible boot process Hannes Schmelzer
2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
2018-07-06 13:41 ` [U-Boot] [PATCH 10/12] dts: am33xx: add u-boot, dm-spl to ocp bus Hannes Schmelzer
2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
2018-07-06 13:41 ` [U-Boot] [PATCH 11/12] board/BuR/brppt1: convert brppt1 boards to driver model Hannes Schmelzer
2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini
2018-07-06 13:41 ` [U-Boot] [PATCH 12/12] board/BuR/brppt1: add makerule for generating production files Hannes Schmelzer
2018-07-20 12:37   ` [U-Boot] [U-Boot, " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.