[U-Boot] [PATCH 00/32] ARM: i.MX: nitrogen6x clean up

This collection of patches comprises a set of updates that have been lingering in our Github repository.
We're pushing them to main-line in preparation for the addition of a couple of boards that have also been lingering for a while.
Patches 1-9 are tweaks to the mx6qsabrelite/nitrogen6x initialization code.
Patches 10-18 add support for additional displays supported by the board(s) and tweak the HDMI detection.
Patches 19-32 enable and configure various features through changes to include/configs/nitrogen6x.h.
Diego Rondini (1): nitrogen6x: config: allow boot to USB stick
Eric Nelson (24): nitrogen6x: implement board_cfb_skip() to disable text output nitrogen6x: configure SD2 pads for SDIO on USDHC2 nitrogen6x: power-down miscellanous peripherals nitrogen6x: staticize board file nitrogen6x: Allow U-Boot to be silent on UART2 nitrogen6x: prevent warnings about board_ehci* callbacks nitrogen6x: display: add qvga panel nitrogen6x: display: add support for LG-9.7 LVDS display nitrogen6x: display: add LDB-WXGA-S for SPWG 1280x800 displays nitrogen6x: display: add support for fusion 7 display nitrogen6x: display: add svga display (800x600) nitrogen6x: display: add Ampire 1024x600 panel nitrogen6x: display: add wvga-lvds panel nitrogen6x: display use I2C detect for HDMI nitrogen6x: config: add USB Mass Storage (ums) support nitrogen6x: config: add initrd_high nitrogen6x: config: expose SATA, then MMC over USB nitrogen6x: config: enable USB keyboard support nitrogen6x: config: add CONFIG_CMD_MEMTEST nitrogen6x: config: enable "i2c edid" nitrogen6x: config: disable logo nitrogen6x: config: configure usb_ether nitrogen6x: config: add gpio command nitrogen6x: config: enable Android fastboot
Kevin Mihelich (2): nitrogen6x: config: use FS_GENERIC load command nitrogen6x: config: enable EXT4 filesystem
Robert Winkler (1): nitrogen6x: display: add support lvds jeida screen
Troy Kisky (4): nitrogen6x: simplify board_mmc_getcd nitrogen6x: configure SGTL5000, CSI camera clock outputs nitrogen6x: phy: add 100 us delay after phy reset nitrogen6x: config: allow more bootargs parameters
board/boundary/nitrogen6x/nitrogen6x.c | 298 +++++++++++++++++++++++++++++---- include/configs/nitrogen6x.h | 98 +++++++++-- 2 files changed, 347 insertions(+), 49 deletions(-)

Several customers have asked to leave the display quiet during boot, so allow the user to express this request by the presence of environment variable "novideo".
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 60a09f4..1a6edac 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -558,6 +558,11 @@ struct display_info_t const displays[] = {{ } } }; size_t display_count = ARRAY_SIZE(displays);
+int board_cfb_skip(void) +{ + return NULL != getenv("novideo"); +} + static void setup_display(void) { struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;

On 02/10/2014 21:16, Eric Nelson wrote:
Several customers have asked to leave the display quiet during boot, so allow the user to express this request by the presence of environment variable "novideo".
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

From: Troy Kisky troy.kisky@boundarydevices.com
The same logic applies to both SD card slots, only with different GPIOs and the code should make that easier to see.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 1a6edac..e8cc243 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -279,17 +279,11 @@ struct fsl_esdhc_cfg usdhc_cfg[2] = { int board_mmc_getcd(struct mmc *mmc) { struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; - int ret; - - if (cfg->esdhc_base == USDHC3_BASE_ADDR) { - gpio_direction_input(IMX_GPIO_NR(7, 0)); - ret = !gpio_get_value(IMX_GPIO_NR(7, 0)); - } else { - gpio_direction_input(IMX_GPIO_NR(2, 6)); - ret = !gpio_get_value(IMX_GPIO_NR(2, 6)); - } + int gp_cd = (cfg->esdhc_base == USDHC3_BASE_ADDR) ? IMX_GPIO_NR(7, 0) : + IMX_GPIO_NR(2, 6);
- return ret; + gpio_direction_input(gp_cd); + return !gpio_get_value(gp_cd); }
int board_mmc_init(bd_t *bis)

On 02/10/2014 21:16, Eric Nelson wrote:
From: Troy Kisky troy.kisky@boundarydevices.com
The same logic applies to both SD card slots, only with different GPIOs and the code should make that easier to see.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Pads SD2_CLK/CMD/DAT0-3 are connected to an SDIO WiFi device on Nitrogen and unconnected on BD-SL-i.MX6 (sabre lite).
Configure them as SDIO pins to prevent them from being in a state that confuses the WiFi part.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index e8cc243..bde299f 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -124,6 +124,15 @@ struct i2c_pads_info i2c_pad_info2 = { } };
+static iomux_v3_cfg_t const usdhc2_pads[] = { + MX6_PAD_SD2_CLK__SD2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD2_CMD__SD2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD2_DAT0__SD2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD2_DAT1__SD2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD2_DAT2__SD2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD2_DAT3__SD2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +}; + iomux_v3_cfg_t const usdhc3_pads[] = { MX6_PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), @@ -657,6 +666,8 @@ int board_init(void) #ifdef CONFIG_MXC_SPI setup_spi(); #endif + imx_iomux_v3_setup_multiple_pads( + usdhc2_pads, ARRAY_SIZE(usdhc2_pads)); setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info0); setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);

On 02/10/2014 21:16, Eric Nelson wrote:
Pads SD2_CLK/CMD/DAT0-3 are connected to an SDIO WiFi device on Nitrogen and unconnected on BD-SL-i.MX6 (sabre lite).
Configure them as SDIO pins to prevent them from being in a state that confuses the WiFi part.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Ensure that cameras and USB OTG power are in a stable (reset) state at reset by configuring their pads and toggling GPIOs.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 47 +++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index bde299f..38f0df8 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -622,17 +622,56 @@ static void setup_display(void) } #endif
+/* wl1271 pads on nitrogen6x */ +static iomux_v3_cfg_t const init_pads[] = { + /* WL12XX_WL_IRQ_GP */ + NEW_PAD_CTRL(MX6_PAD_NANDF_CS1__GPIO6_IO14, WEAK_PULLDOWN), + /* WL12XX_WL_ENABLE_GP */ + NEW_PAD_CTRL(MX6_PAD_NANDF_CS2__GPIO6_IO15, OUTPUT_40OHM), + /* WL12XX_BT_ENABLE_GP */ + NEW_PAD_CTRL(MX6_PAD_NANDF_CS3__GPIO6_IO16, OUTPUT_40OHM), + /* USB otg power */ + NEW_PAD_CTRL(MX6_PAD_EIM_D22__GPIO3_IO22, OUTPUT_40OHM), + NEW_PAD_CTRL(MX6_PAD_NANDF_D5__GPIO2_IO05, OUTPUT_40OHM), + NEW_PAD_CTRL(MX6_PAD_NANDF_WP_B__GPIO6_IO09, OUTPUT_40OHM), + NEW_PAD_CTRL(MX6_PAD_GPIO_8__GPIO1_IO08, OUTPUT_40OHM), + NEW_PAD_CTRL(MX6_PAD_GPIO_6__GPIO1_IO06, OUTPUT_40OHM), +}; + +#define WL12XX_WL_IRQ_GP IMX_GPIO_NR(6, 14) + +static unsigned gpios_out_low[] = { + /* Disable wl1271 */ + IMX_GPIO_NR(6, 15), /* disable wireless */ + IMX_GPIO_NR(6, 16), /* disable bluetooth */ + IMX_GPIO_NR(3, 22), /* disable USB otg power */ + IMX_GPIO_NR(2, 5), /* ov5640 mipi camera reset */ + IMX_GPIO_NR(1, 8), /* ov5642 reset */ +}; + +static unsigned gpios_out_high[] = { + IMX_GPIO_NR(1, 6), /* ov5642 powerdown */ + IMX_GPIO_NR(6, 9), /* ov5640 mipi camera power down */ +}; + +static void set_gpios(unsigned *p, int cnt, int val) +{ + int i; + + for (i = 0; i < cnt; i++) + gpio_direction_output(*p++, val); +} + int board_early_init_f(void) { setup_iomux_uart();
- /* Disable wl1271 For Nitrogen6w */ + set_gpios(gpios_out_high, ARRAY_SIZE(gpios_out_high), 1); + set_gpios(gpios_out_low, ARRAY_SIZE(gpios_out_low), 0); gpio_direction_input(WL12XX_WL_IRQ_GP); - gpio_direction_output(WL12XX_WL_ENABLE_GP, 0); - gpio_direction_output(WL12XX_BT_ENABLE_GP, 0); - gpio_direction_output(GP_USB_OTG_PWR, 0); /* OTG power off */
imx_iomux_v3_setup_multiple_pads(wl12xx_pads, ARRAY_SIZE(wl12xx_pads)); + imx_iomux_v3_setup_multiple_pads(init_pads, ARRAY_SIZE(init_pads)); setup_buttons();
#if defined(CONFIG_VIDEO_IPUV3)

On 02/10/2014 21:16, Eric Nelson wrote:
Ensure that cameras and USB OTG power are in a stable (reset) state at reset by configuring their pads and toggling GPIOs.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

From: Troy Kisky troy.kisky@boundarydevices.com
Configure CLKO outputs for SGTL5000, CSI camera.
The sys_mclk output for the SGTL500 in particular prevents Windows CE from properly driving audio.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 38f0df8..96e2b74 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -622,8 +622,14 @@ static void setup_display(void) } #endif
-/* wl1271 pads on nitrogen6x */ static iomux_v3_cfg_t const init_pads[] = { + /* SGTL5000 sys_mclk */ + NEW_PAD_CTRL(MX6_PAD_GPIO_0__CCM_CLKO1, OUTPUT_40OHM), + + /* J5 - Camera MCLK */ + NEW_PAD_CTRL(MX6_PAD_GPIO_3__CCM_CLKO2, OUTPUT_40OHM), + + /* wl1271 pads on nitrogen6x */ /* WL12XX_WL_IRQ_GP */ NEW_PAD_CTRL(MX6_PAD_NANDF_CS1__GPIO6_IO14, WEAK_PULLDOWN), /* WL12XX_WL_ENABLE_GP */

On 02/10/2014 21:16, Eric Nelson wrote:
From: Troy Kisky troy.kisky@boundarydevices.com
Configure CLKO outputs for SGTL5000, CSI camera.
The sys_mclk output for the SGTL500 in particular prevents Windows CE from properly driving audio.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Declare locally-used data structures and functions as static and pull in header files to prevent compiler warnings of "Should it be static?" when building with "make C=1".
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 96e2b74..e795492 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -28,6 +28,8 @@ #include <asm/arch/crm_regs.h> #include <asm/arch/mxc_hdmi.h> #include <i2c.h> +#include <input.h> +#include <netdev.h>
DECLARE_GLOBAL_DATA_PTR; #define GP_USB_OTG_PWR IMX_GPIO_NR(3, 22) @@ -70,12 +72,12 @@ int dram_init(void) return 0; }
-iomux_v3_cfg_t const uart1_pads[] = { +static iomux_v3_cfg_t const uart1_pads[] = { MX6_PAD_SD3_DAT6__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), MX6_PAD_SD3_DAT7__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), };
-iomux_v3_cfg_t const uart2_pads[] = { +static iomux_v3_cfg_t const uart2_pads[] = { MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), }; @@ -83,7 +85,7 @@ iomux_v3_cfg_t const uart2_pads[] = { #define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
/* I2C1, SGTL5000 */ -struct i2c_pads_info i2c_pad_info0 = { +static struct i2c_pads_info i2c_pad_info0 = { .scl = { .i2c_mode = MX6_PAD_EIM_D21__I2C1_SCL | PC, .gpio_mode = MX6_PAD_EIM_D21__GPIO3_IO21 | PC, @@ -97,7 +99,7 @@ struct i2c_pads_info i2c_pad_info0 = { };
/* I2C2 Camera, MIPI */ -struct i2c_pads_info i2c_pad_info1 = { +static struct i2c_pads_info i2c_pad_info1 = { .scl = { .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL | PC, .gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12 | PC, @@ -111,7 +113,7 @@ struct i2c_pads_info i2c_pad_info1 = { };
/* I2C3, J15 - RGB connector */ -struct i2c_pads_info i2c_pad_info2 = { +static struct i2c_pads_info i2c_pad_info2 = { .scl = { .i2c_mode = MX6_PAD_GPIO_5__I2C3_SCL | PC, .gpio_mode = MX6_PAD_GPIO_5__GPIO1_IO05 | PC, @@ -133,7 +135,7 @@ static iomux_v3_cfg_t const usdhc2_pads[] = { MX6_PAD_SD2_DAT3__SD2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), };
-iomux_v3_cfg_t const usdhc3_pads[] = { +static iomux_v3_cfg_t const usdhc3_pads[] = { MX6_PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD3_DAT0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), @@ -143,7 +145,7 @@ iomux_v3_cfg_t const usdhc3_pads[] = { MX6_PAD_SD3_DAT5__GPIO7_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */ };
-iomux_v3_cfg_t const usdhc4_pads[] = { +static iomux_v3_cfg_t const usdhc4_pads[] = { MX6_PAD_SD4_CLK__SD4_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD4_CMD__SD4_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX6_PAD_SD4_DAT0__SD4_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), @@ -153,7 +155,7 @@ iomux_v3_cfg_t const usdhc4_pads[] = { MX6_PAD_NANDF_D6__GPIO2_IO06 | MUX_PAD_CTRL(NO_PAD_CTRL), /* CD */ };
-iomux_v3_cfg_t const enet_pads1[] = { +static iomux_v3_cfg_t const enet_pads1[] = { MX6_PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL), MX6_PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL), MX6_PAD_RGMII_TXC__RGMII_TXC | MUX_PAD_CTRL(ENET_PAD_CTRL), @@ -180,7 +182,7 @@ iomux_v3_cfg_t const enet_pads1[] = { MX6_PAD_ENET_RXD0__GPIO1_IO27 | MUX_PAD_CTRL(NO_PAD_CTRL), };
-iomux_v3_cfg_t const enet_pads2[] = { +static iomux_v3_cfg_t const enet_pads2[] = { MX6_PAD_RGMII_RXC__RGMII_RXC | MUX_PAD_CTRL(ENET_PAD_CTRL), MX6_PAD_RGMII_RD0__RGMII_RD0 | MUX_PAD_CTRL(ENET_PAD_CTRL), MX6_PAD_RGMII_RD1__RGMII_RD1 | MUX_PAD_CTRL(ENET_PAD_CTRL), @@ -198,7 +200,7 @@ static iomux_v3_cfg_t const misc_pads[] = { };
/* wl1271 pads on nitrogen6x */ -iomux_v3_cfg_t const wl12xx_pads[] = { +static iomux_v3_cfg_t const wl12xx_pads[] = { (MX6_PAD_NANDF_CS1__GPIO6_IO14 & ~MUX_PAD_CTRL_MASK) | MUX_PAD_CTRL(WEAK_PULLDOWN), (MX6_PAD_NANDF_CS2__GPIO6_IO15 & ~MUX_PAD_CTRL_MASK) @@ -246,7 +248,7 @@ static void setup_iomux_enet(void) imx_iomux_v3_setup_multiple_pads(enet_pads2, ARRAY_SIZE(enet_pads2)); }
-iomux_v3_cfg_t const usb_pads[] = { +static iomux_v3_cfg_t const usb_pads[] = { MX6_PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL), };
@@ -280,7 +282,7 @@ int board_ehci_power(int port, int on) #endif
#ifdef CONFIG_FSL_ESDHC -struct fsl_esdhc_cfg usdhc_cfg[2] = { +static struct fsl_esdhc_cfg usdhc_cfg[2] = { {USDHC3_BASE_ADDR}, {USDHC4_BASE_ADDR}, }; @@ -331,7 +333,7 @@ int board_mmc_init(bd_t *bis) #endif
#ifdef CONFIG_MXC_SPI -iomux_v3_cfg_t const ecspi1_pads[] = { +static iomux_v3_cfg_t const ecspi1_pads[] = { /* SS1 */ MX6_PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL), MX6_PAD_EIM_D17__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL), @@ -339,7 +341,7 @@ iomux_v3_cfg_t const ecspi1_pads[] = { MX6_PAD_EIM_D16__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL), };
-void setup_spi(void) +static void setup_spi(void) { imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));

On 02/10/2014 21:16, Eric Nelson wrote:
Declare locally-used data structures and functions as static and pull in header files to prevent compiler warnings of "Should it be static?" when building with "make C=1".
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Several customers are using UART2 (normally the serial console for U-Boot) as connections to printers or other peripherals that are not tolerant of stray inputs during reset.
Provide a simple way to eliminate output on the serial port by conditionally configuring these pads as GPIOs during U-Boot.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index e795492..621cdbc 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -77,9 +77,15 @@ static iomux_v3_cfg_t const uart1_pads[] = { MX6_PAD_SD3_DAT7__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), };
+/* #define CONFIG_SILENT_UART */ static iomux_v3_cfg_t const uart2_pads[] = { +#ifndef CONFIG_SILENT_UART MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), +#else + MX6_PAD_EIM_D26__GPIO3_IO26 | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_EIM_D27__GPIO3_IO27 | MUX_PAD_CTRL(UART_PAD_CTRL), +#endif };
#define PC MUX_PAD_CTRL(I2C_PAD_CTRL)

Hi Eric,
On 02/10/2014 21:16, Eric Nelson wrote:
Several customers are using UART2 (normally the serial console for U-Boot) as connections to printers or other peripherals that are not tolerant of stray inputs during reset.
Provide a simple way to eliminate output on the serial port by conditionally configuring these pads as GPIOs during U-Boot.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
board/boundary/nitrogen6x/nitrogen6x.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index e795492..621cdbc 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -77,9 +77,15 @@ static iomux_v3_cfg_t const uart1_pads[] = { MX6_PAD_SD3_DAT7__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), };
+/* #define CONFIG_SILENT_UART */
Theoretically, we have already in U-Boot CONFIG_SILENT_CONSOLE, without the need to introduce a new CONFIG_.
static iomux_v3_cfg_t const uart2_pads[] = { +#ifndef CONFIG_SILENT_UART MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), +#else
- MX6_PAD_EIM_D26__GPIO3_IO26 | MUX_PAD_CTRL(UART_PAD_CTRL),
- MX6_PAD_EIM_D27__GPIO3_IO27 | MUX_PAD_CTRL(UART_PAD_CTRL),
+#endif
I understand the reason, anyway this looks like a hack (uart is still configured while iomux is not correctly set). Can you check if your goal is simply reached with CONFIG_SILENT_CONSOLE ?
Best regards, Stefano Babic

Thanks Stefano,
On 10/06/2014 08:42 AM, Stefano Babic wrote:
Hi Eric,
On 02/10/2014 21:16, Eric Nelson wrote:
Several customers are using UART2 (normally the serial console for U-Boot) as connections to printers or other peripherals that are not tolerant of stray inputs during reset.
Provide a simple way to eliminate output on the serial port by conditionally configuring these pads as GPIOs during U-Boot.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
board/boundary/nitrogen6x/nitrogen6x.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index e795492..621cdbc 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -77,9 +77,15 @@ static iomux_v3_cfg_t const uart1_pads[] = { MX6_PAD_SD3_DAT7__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), };
+/* #define CONFIG_SILENT_UART */
Theoretically, we have already in U-Boot CONFIG_SILENT_CONSOLE, without the need to introduce a new CONFIG_.
static iomux_v3_cfg_t const uart2_pads[] = { +#ifndef CONFIG_SILENT_UART MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), +#else
- MX6_PAD_EIM_D26__GPIO3_IO26 | MUX_PAD_CTRL(UART_PAD_CTRL),
- MX6_PAD_EIM_D27__GPIO3_IO27 | MUX_PAD_CTRL(UART_PAD_CTRL),
+#endif
I understand the reason, anyway this looks like a hack (uart is still configured while iomux is not correctly set). Can you check if your goal is simply reached with CONFIG_SILENT_CONSOLE ?
Will do. I wasn't aware of that one.
Regards,
Eric

From: Troy Kisky troy.kisky@boundarydevices.com
Testing shows that the Micrel PHY may not be completely out of reset if accessed immediately.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 621cdbc..465f88f 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -252,6 +252,7 @@ static void setup_iomux_enet(void) gpio_set_value(IMX_GPIO_NR(1, 27), 1); /* Nitrogen6X PHY reset */
imx_iomux_v3_setup_multiple_pads(enet_pads2, ARRAY_SIZE(enet_pads2)); + udelay(100); /* Wait 100 us before using mii interface */ }
static iomux_v3_cfg_t const usb_pads[] = {

On 02/10/2014 21:16, Eric Nelson wrote:
From: Troy Kisky troy.kisky@boundarydevices.com
Testing shows that the Micrel PHY may not be completely out of reset if accessed immediately.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Include declarations of board_ehci callbacks to prevent compiler warnings and enforce function prototypes.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 465f88f..2e945a4 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -30,6 +30,7 @@ #include <i2c.h> #include <input.h> #include <netdev.h> +#include <usb/ehci-fsl.h>
DECLARE_GLOBAL_DATA_PTR; #define GP_USB_OTG_PWR IMX_GPIO_NR(3, 22)

On 02/10/2014 21:16, Eric Nelson wrote:
Include declarations of board_ehci callbacks to prevent compiler warnings and enforce function prototypes.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

From: Robert Winkler robert.winkler@boundarydevices.com
Add support for Boundary Devices 7" and 10.1" 1280x800 displays with integrated FocalTech ft5x06 10-point touch controller.
Because they share the touch controller with the 1024x600 displays, auto-detection is disabled and you must explicitly set the 'panel' environment variable:
U-Boot > setenv panel LDB-WXGA U-Boot > saveenv && reset
Signed-off-by: Robert Winkler robert.winkler@boundarydevices.com Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 2e945a4..336a6f9 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -480,6 +480,17 @@ static void enable_lvds(struct display_info_t const *dev) gpio_direction_output(LVDS_BACKLIGHT_GP, 1); }
+static void enable_lvds_jeida(struct display_info_t const *dev) +{ + struct iomuxc *iomux = (struct iomuxc *) + IOMUXC_BASE_ADDR; + u32 reg = readl(&iomux->gpr[2]); + reg |= IOMUXC_GPR2_DATA_WIDTH_CH0_24BIT + |IOMUXC_GPR2_BIT_MAPPING_CH0_JEIDA; + writel(reg, &iomux->gpr[2]); + gpio_direction_output(LVDS_BACKLIGHT_GP, 1); +} + static void enable_rgb(struct display_info_t const *dev) { imx_iomux_v3_setup_multiple_pads( @@ -509,6 +520,26 @@ struct display_info_t const displays[] = {{ .sync = FB_SYNC_EXT, .vmode = FB_VMODE_NONINTERLACED } }, { + .bus = 0, + .addr = 0, + .pixfmt = IPU_PIX_FMT_RGB24, + .detect = NULL, + .enable = enable_lvds_jeida, + .mode = { + .name = "LDB-WXGA", + .refresh = 60, + .xres = 1280, + .yres = 800, + .pixclock = 14065, + .left_margin = 40, + .right_margin = 40, + .upper_margin = 3, + .lower_margin = 80, + .hsync_len = 10, + .vsync_len = 10, + .sync = FB_SYNC_EXT, + .vmode = FB_VMODE_NONINTERLACED +} }, { .bus = 2, .addr = 0x4, .pixfmt = IPU_PIX_FMT_LVDS666,

On 02/10/2014 21:16, Eric Nelson wrote:
From: Robert Winkler robert.winkler@boundarydevices.com
Add support for Boundary Devices 7" and 10.1" 1280x800 displays with integrated FocalTech ft5x06 10-point touch controller.
Because they share the touch controller with the 1024x600 displays, auto-detection is disabled and you must explicitly set the 'panel' environment variable:
U-Boot > setenv panel LDB-WXGA U-Boot > saveenv && reset
Signed-off-by: Robert Winkler robert.winkler@boundarydevices.com Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
As the rest of the display's series:
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Add support for a 1/4 VGA panel with a 24-bit RGB interface. No auto-detection is enabled, so you must configure the 'panel' environment variable to use this display:
U-Boot > setenv panel qvga U-Boot > saveenv && reset
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 336a6f9..b2218c9f 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -599,6 +599,26 @@ struct display_info_t const displays[] = {{ .vsync_len = 10, .sync = 0, .vmode = FB_VMODE_NONINTERLACED +} }, { + .bus = 0, + .addr = 0, + .pixfmt = IPU_PIX_FMT_RGB24, + .detect = NULL, + .enable = enable_rgb, + .mode = { + .name = "qvga", + .refresh = 60, + .xres = 320, + .yres = 240, + .pixclock = 37037, + .left_margin = 38, + .right_margin = 37, + .upper_margin = 16, + .lower_margin = 15, + .hsync_len = 30, + .vsync_len = 3, + .sync = 0, + .vmode = FB_VMODE_NONINTERLACED } } }; size_t display_count = ARRAY_SIZE(displays);

On 02/10/2014 21:16, Eric Nelson wrote:
Add support for a 1/4 VGA panel with a 24-bit RGB interface. No auto-detection is enabled, so you must configure the 'panel' environment variable to use this display:
U-Boot > setenv panel qvga U-Boot > saveenv && reset
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Add support for LG 9.7" LVDS panel (1024x768) with integrated eGalax touch screen.
Note that this panel differs only slightly from the Hannstar XGA panel (margins).
No auto-detection is available because it shares the same touch controller as the Hannstar-XGA display, so you'll need to configure it through the 'panel' environment variable:
U-Boot > setenv panel LG-9.7 U-Boot > saveenv && reset
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index b2218c9f..fd214ca 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -560,6 +560,26 @@ struct display_info_t const displays[] = {{ .sync = FB_SYNC_EXT, .vmode = FB_VMODE_NONINTERLACED } }, { + .bus = 0, + .addr = 0, + .pixfmt = IPU_PIX_FMT_LVDS666, + .detect = NULL, + .enable = enable_lvds, + .mode = { + .name = "LG-9.7", + .refresh = 60, + .xres = 1024, + .yres = 768, + .pixclock = 15385, /* ~65MHz */ + .left_margin = 480, + .right_margin = 260, + .upper_margin = 16, + .lower_margin = 6, + .hsync_len = 250, + .vsync_len = 10, + .sync = FB_SYNC_EXT, + .vmode = FB_VMODE_NONINTERLACED +} }, { .bus = 2, .addr = 0x38, .pixfmt = IPU_PIX_FMT_LVDS666,

On 02/10/2014 21:16, Eric Nelson wrote:
Add support for LG 9.7" LVDS panel (1024x768) with integrated eGalax touch screen.
Note that this panel differs only slightly from the Hannstar XGA panel (margins).
No auto-detection is available because it shares the same touch controller as the Hannstar-XGA display, so you'll need to configure it through the 'panel' environment variable:
U-Boot > setenv panel LG-9.7 U-Boot > saveenv && reset
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

This patch adds support for LVDS WXGA displays that use the SPWG encoding standard instead of JEIDA.
No auto-detection is enabled and you must explicitly set the 'panel' environment variable:
U-Boot > setenv panel LDB-WXGA-S U-Boot > saveenv && reset
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index fd214ca..261fa7e 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -540,6 +540,26 @@ struct display_info_t const displays[] = {{ .sync = FB_SYNC_EXT, .vmode = FB_VMODE_NONINTERLACED } }, { + .bus = 0, + .addr = 0, + .pixfmt = IPU_PIX_FMT_RGB24, + .detect = NULL, + .enable = enable_lvds, + .mode = { + .name = "LDB-WXGA-S", + .refresh = 60, + .xres = 1280, + .yres = 800, + .pixclock = 14065, + .left_margin = 40, + .right_margin = 40, + .upper_margin = 3, + .lower_margin = 80, + .hsync_len = 10, + .vsync_len = 10, + .sync = FB_SYNC_EXT, + .vmode = FB_VMODE_NONINTERLACED +} }, { .bus = 2, .addr = 0x4, .pixfmt = IPU_PIX_FMT_LVDS666,

On 02/10/2014 21:16, Eric Nelson wrote:
This patch adds support for LVDS WXGA displays that use the SPWG encoding standard instead of JEIDA.
No auto-detection is enabled and you must explicitly set the 'panel' environment variable:
U-Boot > setenv panel LDB-WXGA-S U-Boot > saveenv && reset
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Add support for the Touch Revolution Fusion7 display: 800x480 RGB with a custom F0710A resistive touch controller.
Auto-detection of this panel is supported so no configuration is required.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 261fa7e..b1d85da 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -621,6 +621,26 @@ struct display_info_t const displays[] = {{ .vmode = FB_VMODE_NONINTERLACED } }, { .bus = 2, + .addr = 0x10, + .pixfmt = IPU_PIX_FMT_RGB666, + .detect = detect_i2c, + .enable = enable_rgb, + .mode = { + .name = "fusion7", + .refresh = 60, + .xres = 800, + .yres = 480, + .pixclock = 33898, + .left_margin = 96, + .right_margin = 24, + .upper_margin = 3, + .lower_margin = 10, + .hsync_len = 72, + .vsync_len = 7, + .sync = 0x40000002, + .vmode = FB_VMODE_NONINTERLACED +} }, { + .bus = 2, .addr = 0x48, .pixfmt = IPU_PIX_FMT_RGB666, .detect = detect_i2c,

On 02/10/2014 21:16, Eric Nelson wrote:
Add support for the Touch Revolution Fusion7 display: 800x480 RGB with a custom F0710A resistive touch controller.
Auto-detection of this panel is supported so no configuration is required.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Add support for 800x600 18-bit RGB displays using VESA GTF timings.
No auto-detection is supported, so you must configure this panel manually through the 'panel' environment variable:
U-Boot > setenv panel svga U-Boot > saveenv && reset
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index b1d85da..6695f87 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -640,6 +640,26 @@ struct display_info_t const displays[] = {{ .sync = 0x40000002, .vmode = FB_VMODE_NONINTERLACED } }, { + .bus = 0, + .addr = 0, + .pixfmt = IPU_PIX_FMT_RGB666, + .detect = NULL, + .enable = enable_rgb, + .mode = { + .name = "svga", + .refresh = 60, + .xres = 800, + .yres = 600, + .pixclock = 15385, + .left_margin = 220, + .right_margin = 40, + .upper_margin = 21, + .lower_margin = 7, + .hsync_len = 60, + .vsync_len = 10, + .sync = 0, + .vmode = FB_VMODE_NONINTERLACED +} }, { .bus = 2, .addr = 0x48, .pixfmt = IPU_PIX_FMT_RGB666,

On 02/10/2014 21:16, Eric Nelson wrote:
Add support for 800x600 18-bit RGB displays using VESA GTF timings.
No auto-detection is supported, so you must configure this panel manually through the 'panel' environment variable:
U-Boot > setenv panel svga U-Boot > saveenv && reset
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Add support for an Ampire 1024x600 LVDS panel with integrated Ilitek capacitive touch screen.
Auto-detection is enabled, so no explicit configuration is needed.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 6695f87..c91e0c4 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -661,6 +661,26 @@ struct display_info_t const displays[] = {{ .vmode = FB_VMODE_NONINTERLACED } }, { .bus = 2, + .addr = 0x41, + .pixfmt = IPU_PIX_FMT_LVDS666, + .detect = detect_i2c, + .enable = enable_lvds, + .mode = { + .name = "amp1024x600", + .refresh = 60, + .xres = 1024, + .yres = 600, + .pixclock = 15385, + .left_margin = 220, + .right_margin = 40, + .upper_margin = 21, + .lower_margin = 7, + .hsync_len = 60, + .vsync_len = 10, + .sync = FB_SYNC_EXT, + .vmode = FB_VMODE_NONINTERLACED +} }, { + .bus = 2, .addr = 0x48, .pixfmt = IPU_PIX_FMT_RGB666, .detect = detect_i2c,

On 02/10/2014 21:16, Eric Nelson wrote:
Add support for an Ampire 1024x600 LVDS panel with integrated Ilitek capacitive touch screen.
Auto-detection is enabled, so no explicit configuration is needed.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Add support for WVGA (800x480) panels using VESA GTF timings over LVDS.
No auto-detection is supported, so you must configure this panel manually through the 'panel' environment variable:
U-Boot > setenv panel svga U-Boot > saveenv && reset
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index c91e0c4..115ee81 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -680,6 +680,26 @@ struct display_info_t const displays[] = {{ .sync = FB_SYNC_EXT, .vmode = FB_VMODE_NONINTERLACED } }, { + .bus = 0, + .addr = 0, + .pixfmt = IPU_PIX_FMT_LVDS666, + .detect = 0, + .enable = enable_lvds, + .mode = { + .name = "wvga-lvds", + .refresh = 57, + .xres = 800, + .yres = 480, + .pixclock = 15385, + .left_margin = 220, + .right_margin = 40, + .upper_margin = 21, + .lower_margin = 7, + .hsync_len = 60, + .vsync_len = 10, + .sync = FB_SYNC_EXT, + .vmode = FB_VMODE_NONINTERLACED +} }, { .bus = 2, .addr = 0x48, .pixfmt = IPU_PIX_FMT_RGB666,

On 02/10/2014 21:16, Eric Nelson wrote:
Add support for WVGA (800x480) panels using VESA GTF timings over LVDS.
No auto-detection is supported, so you must configure this panel manually through the 'panel' environment variable:
U-Boot > setenv panel svga U-Boot > saveenv && reset
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

The HPD pin and RX_SENSE registers have proven to be less reliable than using I2C on the EDID pins for detection of an HDMI monitor. In particular, when the HDMI output is reset through a "reboot" cycle, the detect_hdmi() routine often bounces, resulting in a failure to detect a connected monitor.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- board/boundary/nitrogen6x/nitrogen6x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 115ee81..269d62e 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -500,10 +500,10 @@ static void enable_rgb(struct display_info_t const *dev) }
struct display_info_t const displays[] = {{ - .bus = -1, - .addr = 0, + .bus = 1, + .addr = 0x50, .pixfmt = IPU_PIX_FMT_RGB24, - .detect = detect_hdmi, + .detect = detect_i2c, .enable = do_enable_hdmi, .mode = { .name = "HDMI",

On 02/10/2014 21:16, Eric Nelson wrote:
The HPD pin and RX_SENSE registers have proven to be less reliable than using I2C on the EDID pins for detection of an HDMI monitor. In particular, when the HDMI output is reset through a "reboot" cycle, the detect_hdmi() routine often bounces, resulting in a failure to detect a connected monitor.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Add support for the USB mass storage to enable access to on-board storage (especially eMMC and SATA).
Details at: http://boundarydevices.com/u-boot-usb-mass-storage-gadget/
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 2a1eb3b..5e9b743 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -368,4 +368,17 @@ #define CONFIG_PCIE_IMX #endif
+#define CONFIG_CMD_ELF + +#define CONFIG_USB_GADGET +#define CONFIG_CMD_USB_MASS_STORAGE +#define CONFIG_USB_GADGET_MASS_STORAGE +#define CONFIG_USBDOWNLOAD_GADGET +#define CONFIG_USB_GADGET_VBUS_DRAW 2 + +/* Netchip IDs */ +#define CONFIG_G_DNL_VENDOR_NUM 0x0525 +#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5 +#define CONFIG_G_DNL_MANUFACTURER "Boundary" + #endif /* __CONFIG_H */

On 02/10/2014 21:16, Eric Nelson wrote:
Add support for the USB mass storage to enable access to on-board storage (especially eMMC and SATA).
Details at: http://boundarydevices.com/u-boot-usb-mass-storage-gadget/
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

From: Diego Rondini diego.rondini@kynetics.it
This patch enables boot to USB storage devices by expanding on the list of boot devices.
Because the USB startup currently takes a long time, it places USB at the end of the list of supported devices.
You can over-ride the boot order using the bootdevs environment variable. For instance, this will make USB the first (highest priority) device:
U-Boot > setenv bootdevs usb mmc sata U-Boot > saveenv
Signed-off-by: Diego Rondini diego.rondini@kynetics.it Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 5e9b743..21a25e0 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -173,7 +173,13 @@ #define CONFIG_DRIVE_MMC #endif
-#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC +#ifdef CONFIG_USB_STORAGE +#define CONFIG_DRIVE_USB "usb " +#else +#define CONFIG_DRIVE_USB +#endif + +#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB
#if defined(CONFIG_SABRELITE) #define CONFIG_EXTRA_ENV_SETTINGS \ @@ -253,12 +259,16 @@ "run netboot; " #else #define CONFIG_EXTRA_ENV_SETTINGS \ + "bootdevs=" CONFIG_DRIVE_TYPES "\0" \ "console=ttymxc1\0" \ "clearenv=if sf probe || sf probe || sf probe 1 ; then " \ "sf erase 0xc0000 0x2000 && " \ "echo restored environment to factory default ; fi\0" \ - "bootcmd=for dtype in " CONFIG_DRIVE_TYPES \ + "bootcmd=for dtype in ${bootdevs}" \ "; do " \ + "if itest.s "xusb" == "x${dtype}" ; then " \ + "usb start ;" \ + "fi; " \ "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ "for fs in fat ext2 ; do " \ "${fs}load " \ @@ -274,7 +284,7 @@ "echo ; echo serial console at 115200, 8N1 ; echo ; " \ "echo details at http://boundarydevices.com/6q_bootscript ; " \ "setenv stdout serial\0" \ - "upgradeu=for dtype in " CONFIG_DRIVE_TYPES \ + "upgradeu=for dtype in ${bootdevs}" \ "; do " \ "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ "for fs in fat ext2 ; do " \

On 02/10/2014 21:16, Eric Nelson wrote:
From: Diego Rondini diego.rondini@kynetics.it
This patch enables boot to USB storage devices by expanding on the list of boot devices.
Because the USB startup currently takes a long time, it places USB at the end of the list of supported devices.
You can over-ride the boot order using the bootdevs environment variable. For instance, this will make USB the first (highest priority) device:
U-Boot > setenv bootdevs usb mmc sata U-Boot > saveenv
Signed-off-by: Diego Rondini diego.rondini@kynetics.it Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

From: Kevin Mihelich kevin@archlinuxarm.org
Remove the individual attempts to load using ext2 and fat, replace with the generic load command supporting available filesystem types.
Signed-off-by: Kevin Mihelich kevin@archlinuxarm.org --- include/configs/nitrogen6x.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 21a25e0..2167d77 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -270,13 +270,11 @@ "usb start ;" \ "fi; " \ "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ - "for fs in fat ext2 ; do " \ - "${fs}load " \ - "${dtype} ${disk}:1 " \ - "10008000 " \ - "/6x_bootscript" \ - "&& source 10008000 ; " \ - "done ; " \ + "load " \ + "${dtype} ${disk}:1 " \ + "10008000 " \ + "/6x_bootscript" \ + "&& source 10008000 ; " \ "done ; " \ "done; " \ "setenv stdout serial,vga ; " \ @@ -287,11 +285,9 @@ "upgradeu=for dtype in ${bootdevs}" \ "; do " \ "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \ - "for fs in fat ext2 ; do " \ - "${fs}load ${dtype} ${disk}:1 10008000 " \ - "/6x_upgrade " \ - "&& source 10008000 ; " \ - "done ; " \ + "load ${dtype} ${disk}:1 10008000 " \ + "/6x_upgrade " \ + "&& source 10008000 ; " \ "done ; " \ "done\0" \

On 02/10/2014 21:16, Eric Nelson wrote:
From: Kevin Mihelich kevin@archlinuxarm.org
Remove the individual attempts to load using ext2 and fat, replace with the generic load command supporting available filesystem types.
Signed-off-by: Kevin Mihelich kevin@archlinuxarm.org
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Support RAM disks by setting initrd_high. See commit 7e9603e
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 2167d77..3c24443 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -282,6 +282,7 @@ "echo ; echo serial console at 115200, 8N1 ; echo ; " \ "echo details at http://boundarydevices.com/6q_bootscript ; " \ "setenv stdout serial\0" \ + "initrd_high=0xffffffff\0" \ "upgradeu=for dtype in ${bootdevs}" \ "; do " \ "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \

On 02/10/2014 21:16, Eric Nelson wrote:
Support RAM disks by setting initrd_high. See commit 7e9603e
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

If no boot script was found, expose internal storage over the USB mass storage gadget to allow easy programming.
This is especially useful when SD cards are inaccessible or when loading SATA drives.
More details are available in this blog post: http://boundarydevices.com/u-boot-usb-mass-storage-gadget/
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 3c24443..b31b922 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -180,6 +180,7 @@ #endif
#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB +#define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
#if defined(CONFIG_SABRELITE) #define CONFIG_EXTRA_ENV_SETTINGS \ @@ -260,6 +261,7 @@ #else #define CONFIG_EXTRA_ENV_SETTINGS \ "bootdevs=" CONFIG_DRIVE_TYPES "\0" \ + "umsdevs=" CONFIG_UMSDEVS "\0" \ "console=ttymxc1\0" \ "clearenv=if sf probe || sf probe || sf probe 1 ; then " \ "sf erase 0xc0000 0x2000 && " \ @@ -281,7 +283,26 @@ "echo ; echo 6x_bootscript not found ; " \ "echo ; echo serial console at 115200, 8N1 ; echo ; " \ "echo details at http://boundarydevices.com/6q_bootscript ; " \ - "setenv stdout serial\0" \ + "setenv stdout serial;" \ + "setenv stdin serial,usbkbd;" \ + "for dtype in ${umsdevs} ; do " \ + "if itest.s sata == ${dtype}; then " \ + "initcmd='sata init' ;" \ + "else " \ + "initcmd='mmc rescan' ;" \ + "fi; " \ + "for disk in 0 1 ; do " \ + "if $initcmd && $dtype dev $disk ; then " \ + "setenv stdout serial,vga; " \ + "echo expose ${dtype} ${disk} " \ + "over USB; " \ + "ums 0 $dtype $disk ;" \ + "fi; " \ + " done; " \ + "done ;" \ + "setenv stdout serial,vga; " \ + "echo no block devices found;" \ + "\0" \ "initrd_high=0xffffffff\0" \ "upgradeu=for dtype in ${bootdevs}" \ "; do " \

On 02/10/2014 21:16, Eric Nelson wrote:
If no boot script was found, expose internal storage over the USB mass storage gadget to allow easy programming.
This is especially useful when SD cards are inaccessible or when loading SATA drives.
More details are available in this blog post: http://boundarydevices.com/u-boot-usb-mass-storage-gadget/
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Enable the use of USB keyboards on SABRE Lite and Nitrogen6x boards.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index b31b922..d505191 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -122,6 +122,8 @@ #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 +#define CONFIG_USB_KEYBOARD +#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
/* Miscellaneous commands */ #define CONFIG_CMD_BMODE

On 02/10/2014 21:16, Eric Nelson wrote:
Enable the use of USB keyboards on SABRE Lite and Nitrogen6x boards.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Enable the 'mtest' command on Nitrogen6x and SABRE Lite boards.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index d505191..82dc0fc 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -382,6 +382,7 @@ #define CONFIG_CMD_BMP
#define CONFIG_CMD_TIME +#define CONFIG_CMD_MEMTEST #define CONFIG_SYS_ALT_MEMTEST
#define CONFIG_CMD_BOOTZ

On 02/10/2014 21:16, Eric Nelson wrote:
Enable the 'mtest' command on Nitrogen6x and SABRE Lite boards.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Enable the "i2c edid" command to query data from an attached HDMI monitor.
Usage is typically this:
U-Boot > i2c dev 1 U-Boot > i2c edid 0x50 ...
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 82dc0fc..b911d06 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -63,6 +63,7 @@ #define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_MXC #define CONFIG_SYS_I2C_SPEED 100000 +#define CONFIG_I2C_EDID
/* MMC Configs */ #define CONFIG_FSL_ESDHC

On 02/10/2014 21:16, Eric Nelson wrote:
Enable the "i2c edid" command to query data from an attached HDMI monitor.
Usage is typically this:
U-Boot > i2c dev 1 U-Boot > i2c edid 0x50 ...
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

From: Troy Kisky troy.kisky@boundarydevices.com
Increase the maximum number of arguments allowed by the Hush parser. This prevents errors when users or scripts aren't quoting parameters when setting the "bootargs" variable et al.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index b911d06..50b6c5a 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -326,7 +326,7 @@
/* Print Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) -#define CONFIG_SYS_MAXARGS 16 +#define CONFIG_SYS_MAXARGS 48 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
#define CONFIG_SYS_MEMTEST_START 0x10000000

On 02/10/2014 21:16, Eric Nelson wrote:
From: Troy Kisky troy.kisky@boundarydevices.com
Increase the maximum number of arguments allowed by the Hush parser. This prevents errors when users or scripts aren't quoting parameters when setting the "bootargs" variable et al.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Some users (QNX and Windows CE users in particular) have asked to disable the Penguin shown on the display at boot time.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 1 - 1 file changed, 1 deletion(-)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 50b6c5a..60c942f 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -140,7 +140,6 @@ #define CONFIG_VIDEO_BMP_RLE8 #define CONFIG_SPLASH_SCREEN #define CONFIG_BMP_16BPP -#define CONFIG_VIDEO_LOGO #define CONFIG_IPUV3_CLK 260000000 #define CONFIG_CMD_HDMIDETECT #define CONFIG_CONSOLE_MUX

On 02/10/2014 21:16, Eric Nelson wrote:
Some users (QNX and Windows CE users in particular) have asked to disable the Penguin shown on the display at boot time.
This is really pity, but I understand :-).
Acked-by: Stefano Babic sbabic@denx.de
Best regards, Stefano Babic

On 02/10/2014 21:16, Eric Nelson wrote:
Some users (QNX and Windows CE users in particular) have asked to disable the Penguin shown on the display at boot time.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Provide fixed USB networking mac addresses for host and client to enable static configuration of host network stacks.
Include a command 'usbrecover' both to illustrate the use of the USB ethernet gadget and also to allow quick booting of a kernel (uImage) and ram disk (uramdisk).
Details and commentary are available here: http://boundarydevices.com/u-boot-2014-01/#usbrecover
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 60c942f..8afbded 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -314,6 +314,16 @@ "&& source 10008000 ; " \ "done ; " \ "done\0" \ + "usbnet_devaddr=00:19:b8:00:00:02\0" \ + "usbnet_hostaddr=00:19:b8:00:00:01\0" \ + "usbrecover=setenv ethact usb_ether; " \ + "setenv ipaddr 10.0.0.2; " \ + "setenv netmask 255.255.255.0; " \ + "setenv serverip 10.0.0.1; " \ + "setenv bootargs console=ttymxc1,115200; " \ + "tftpboot 10800000 10.0.0.1:uImage-${board}-recovery && " \ + "tftpboot 12800000 10.0.0.1:uramdisk-${board}-recovery.img " \ + "&& bootm 10800000 12800000\0" \
#endif /* Miscellaneous configurable options */

Hi Eric,
On 02/10/2014 21:16, Eric Nelson wrote:
Provide fixed USB networking mac addresses for host and client to enable static configuration of host network stacks.
Include a command 'usbrecover' both to illustrate the use of the USB ethernet gadget and also to allow quick booting of a kernel (uImage) and ram disk (uramdisk).
Details and commentary are available here: http://boundarydevices.com/u-boot-2014-01/#usbrecover
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
include/configs/nitrogen6x.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 60c942f..8afbded 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -314,6 +314,16 @@ "&& source 10008000 ; " \ "done ; " \ "done\0" \
- "usbnet_devaddr=00:19:b8:00:00:02\0" \
- "usbnet_hostaddr=00:19:b8:00:00:01\0" \
- "usbrecover=setenv ethact usb_ether; " \
"setenv ipaddr 10.0.0.2; " \
"setenv netmask 255.255.255.0; " \
"setenv serverip 10.0.0.1; " \
"setenv bootargs console=ttymxc1,115200; " \
"tftpboot 10800000 10.0.0.1:uImage-${board}-recovery && " \
"tftpboot 12800000 10.0.0.1:uramdisk-${board}-recovery.img " \
"&& bootm 10800000 12800000\0" \
I understand the use case, but it does not always work (I mean, in all network configurations) and we regret generally having IP addresses hard coded in the default configuration.
Best regards, Stefano Babic

Hi Stefano,
On 10/06/2014 08:54 AM, Stefano Babic wrote:
Hi Eric,
On 02/10/2014 21:16, Eric Nelson wrote:
Provide fixed USB networking mac addresses for host and client to enable static configuration of host network stacks.
Include a command 'usbrecover' both to illustrate the use of the USB ethernet gadget and also to allow quick booting of a kernel (uImage) and ram disk (uramdisk).
Details and commentary are available here: http://boundarydevices.com/u-boot-2014-01/#usbrecover
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
include/configs/nitrogen6x.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 60c942f..8afbded 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -314,6 +314,16 @@ "&& source 10008000 ; " \ "done ; " \ "done\0" \
- "usbnet_devaddr=00:19:b8:00:00:02\0" \
- "usbnet_hostaddr=00:19:b8:00:00:01\0" \
- "usbrecover=setenv ethact usb_ether; " \
"setenv ipaddr 10.0.0.2; " \
"setenv netmask 255.255.255.0; " \
"setenv serverip 10.0.0.1; " \
"setenv bootargs console=ttymxc1,115200; " \
"tftpboot 10800000 10.0.0.1:uImage-${board}-recovery && " \
"tftpboot 12800000 10.0.0.1:uramdisk-${board}-recovery.img " \
"&& bootm 10800000 12800000\0" \
I understand the use case, but it does not always work (I mean, in all network configurations) and we regret generally having IP addresses hard coded in the default configuration.
Can you clarify which parts (mac/IP address/both) are a problem?
The 'usb_ether' is kind of an odd beast, in that it's a link-local protocol, which is why the the IP addresses aren't read from or written to a persistent environment.
Our goal was to only require configuration of one side of the link (the USB Host). It seems that without implementing a DHCP **server**, this is the most convenient.
The mac addresses above are ours, and we can confirm that they are not in use on any other hardware, so they're guaranteed to be unique unless you happen to hook up multiple of our boards to a Host at the same time.
Since the configuration of network adapters on most hosts is based on mac addresses, hard-coding these prevents the need to re-configure each time a new board is connected to a host.
Please advise,
Eric

Hi Eric,
On 06/10/2014 18:41, Eric Nelson wrote:
I understand the use case, but it does not always work (I mean, in all network configurations) and we regret generally having IP addresses hard coded in the default configuration.
Can you clarify which parts (mac/IP address/both) are a problem?
The 'usb_ether' is kind of an odd beast, in that it's a link-local protocol, which is why the the IP addresses aren't read from or written to a persistent environment.
This is not completely true. I mean, I understand that you want to have such as situation, with addresses valid only in the link host / target.
However, if a customer / user has a PC belonging to the 10.0.0.0/24 network, there is a conflict. And this is not a rare case, because as I have seen in companies 10.0.0.0/8 are used more often as 192.168.0.0/16.
You can have two interface (ethernet and USB) acting on the same address range and packets originally sent to network are readdressed to the target, letting the customer without network.
I understand that you want to provide is a special case - but as you can see, you cannot cover all cases by setting a hard coded address.
Our goal was to only require configuration of one side of the link (the USB Host). It seems that without implementing a DHCP **server**, this is the most convenient.
If you really want, why don't you use a script as a 6x_ ? usbrecover can load initially a script setting the network addresses, without hardcoding to the u-boot image.
The mac addresses above are ours, and we can confirm that they are not in use on any other hardware,
I know that and it is exactly the same we had in the past with other boards. Customers can buy more as one instance of the boards, having then multiple boards with the same MAC address - and very bad case.
so they're guaranteed to be unique unless you happen to hook up multiple of our boards to a Host at the same time.
Yes, exactly. Why do you want to restrict your sales chances ? :-D
Seriously, hard coding mac and network addresses was strictly rejected - even if after your patch I have found a couple of boards doing that (maybe it was not seen during review, see for example v38b.h).
Since the configuration of network adapters on most hosts is based on mac addresses, hard-coding these prevents the need to re-configure each time a new board is connected to a host.
I understand that hard coding makes life easier, but I am not convinced it is the correct way to do, specially with IP addresses.
Best regards, Stefano Babic

Thanks Stefano,
On 10/07/2014 07:36 AM, Stefano Babic wrote:
Hi Eric,
On 06/10/2014 18:41, Eric Nelson wrote:
I understand the use case, but it does not always work (I mean, in all network configurations) and we regret generally having IP addresses hard coded in the default configuration.
Can you clarify which parts (mac/IP address/both) are a problem?
The 'usb_ether' is kind of an odd beast, in that it's a link-local protocol, which is why the the IP addresses aren't read from or written to a persistent environment.
This is not completely true. I mean, I understand that you want to have such as situation, with addresses valid only in the link host / target.
However, if a customer / user has a PC belonging to the 10.0.0.0/24 network, there is a conflict. And this is not a rare case, because as I have seen in companies 10.0.0.0/8 are used more often as 192.168.0.0/16.
You can have two interface (ethernet and USB) acting on the same address range and packets originally sent to network are readdressed to the target, letting the customer without network.
I understand that you want to provide is a special case - but as you can see, you cannot cover all cases by setting a hard coded address.
Right. I've also seen that.
It seems that 169.254.x.x is more appropriate. http://tools.ietf.org/html/rfc3927
Our goal was to only require configuration of one side of the link (the USB Host). It seems that without implementing a DHCP **server**, this is the most convenient.
If you really want, why don't you use a script as a 6x_ ? usbrecover can load initially a script setting the network addresses, without hardcoding to the u-boot image.
Chicken and egg.... The goal for usbrecover was/is to allow access to on-board storage (SATA on Nitrogen6x, eMMC on Nitrogen6_Max)
Thankfully, the "ums" utility now functions nicely for that purpose without using IP.
A kernel gadget still performs much better though (~2x), since you can interleave writes to storage with USB I/O.
The mac addresses above are ours, and we can confirm that they are not in use on any other hardware,
I know that and it is exactly the same we had in the past with other boards. Customers can buy more as one instance of the boards, having then multiple boards with the same MAC address - and very bad case.
so they're guaranteed to be unique unless you happen to hook up multiple of our boards to a Host at the same time.
Yes, exactly. Why do you want to restrict your sales chances ? :-D
This (and all of our patches) is an attempt to increase sales by making life easier on users.
Seriously, hard coding mac and network addresses was strictly rejected - even if after your patch I have found a couple of boards doing that (maybe it was not seen during review, see for example v38b.h).
Understood.
Since the configuration of network adapters on most hosts is based on mac addresses, hard-coding these prevents the need to re-configure each time a new board is connected to a host.
I understand that hard coding makes life easier, but I am not convinced it is the correct way to do, specially with IP addresses.
Right.
Perhaps when we have some spare time we could write a DHCP server component to get closer to auto-configuration, although it's not clear how that would interact with other commands.
I appreciate your time in review and commenting.
Regards,
Eric

Enable the 'gpio' command to allow reading and toggling of GPIO pins.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index 8afbded..df3e2bb 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -32,6 +32,7 @@ #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_MISC_INIT_R #define CONFIG_MXC_GPIO +#define CONFIG_CMD_GPIO #define CONFIG_CI_UDC #define CONFIG_USBD_HS #define CONFIG_USB_GADGET_DUALSPEED

On 02/10/2014 21:16, Eric Nelson wrote:
Enable the 'gpio' command to allow reading and toggling of GPIO pins.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Enable 'fastboot' command.
This is currently enabled but not yet functional. Including it in the configuration will ease further testing and development as discussed on the mailing list.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index df3e2bb..f465d9e 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -423,4 +423,9 @@ #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5 #define CONFIG_G_DNL_MANUFACTURER "Boundary"
+#define CONFIG_CMD_FASTBOOT +#define CONFIG_ANDROID_BOOT_IMAGE +#define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR +#define CONFIG_USB_FASTBOOT_BUF_SIZE 0x07000000 + #endif /* __CONFIG_H */

On 02/10/2014 21:16, Eric Nelson wrote:
Enable 'fastboot' command.
This is currently enabled but not yet functional. Including it in the configuration will ease further testing and development as discussed on the mailing list.
Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

From: Kevin Mihelich kevin@archlinuxarm.org
Support reading/writing ext4 partitions.
Signed-off-by: Kevin Mihelich kevin@archlinuxarm.org Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com --- include/configs/nitrogen6x.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h index f465d9e..d08e333 100644 --- a/include/configs/nitrogen6x.h +++ b/include/configs/nitrogen6x.h @@ -77,6 +77,8 @@ #define CONFIG_GENERIC_MMC #define CONFIG_BOUNCE_BUFFER #define CONFIG_CMD_EXT2 +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_EXT4_WRITE #define CONFIG_CMD_FAT #define CONFIG_DOS_PARTITION

On 02/10/2014 21:16, Eric Nelson wrote:
From: Kevin Mihelich kevin@archlinuxarm.org
Support reading/writing ext4 partitions.
Signed-off-by: Kevin Mihelich kevin@archlinuxarm.org Signed-off-by: Eric Nelson eric.nelson@boundarydevices.com
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Hi Eric,
On 02/10/2014 21:16, Eric Nelson wrote:
This collection of patches comprises a set of updates that have been lingering in our Github repository.
We're pushing them to main-line in preparation for the addition of a couple of boards that have also been lingering for a while.
Patches 1-9 are tweaks to the mx6qsabrelite/nitrogen6x initialization code.
Patches 10-18 add support for additional displays supported by the board(s) and tweak the HDMI detection.
Patches 19-32 enable and configure various features through changes to include/configs/nitrogen6x.h.
Patches are orthogonal and can be applied separetely. I have not seen any comments and I have not comments for most of them. I will start to apply the ones (most of them) are straightforward. Please wait until I end up with first pass - your next version will be much shorter !
Diego Rondini (1): nitrogen6x: config: allow boot to USB stick
Eric Nelson (24): nitrogen6x: implement board_cfb_skip() to disable text output nitrogen6x: configure SD2 pads for SDIO on USDHC2 nitrogen6x: power-down miscellanous peripherals nitrogen6x: staticize board file nitrogen6x: Allow U-Boot to be silent on UART2 nitrogen6x: prevent warnings about board_ehci* callbacks nitrogen6x: display: add qvga panel nitrogen6x: display: add support for LG-9.7 LVDS display nitrogen6x: display: add LDB-WXGA-S for SPWG 1280x800 displays nitrogen6x: display: add support for fusion 7 display nitrogen6x: display: add svga display (800x600) nitrogen6x: display: add Ampire 1024x600 panel nitrogen6x: display: add wvga-lvds panel nitrogen6x: display use I2C detect for HDMI nitrogen6x: config: add USB Mass Storage (ums) support nitrogen6x: config: add initrd_high nitrogen6x: config: expose SATA, then MMC over USB nitrogen6x: config: enable USB keyboard support nitrogen6x: config: add CONFIG_CMD_MEMTEST nitrogen6x: config: enable "i2c edid" nitrogen6x: config: disable logo nitrogen6x: config: configure usb_ether
Mainly I have problems with fixed addresses - my comments to the related patch.
Best regards, Stefano Babic
participants (2)
-
Eric Nelson
-
Stefano Babic