From ba743ac5c123d4a3491a995e20b930989d485795 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Wed, 1 Oct 2014 18:33:48 -0700 Subject: nitrogen6x: Update DDR timings for 2G memory arrangement Update DDR calibration settings based on a larger test set. The initial values were gathered on a small number of boards, and have been found to fail on some boards under load. Signed-off-by: Eric Nelson --- board/boundary/nitrogen6x/1066mhz_4x256mx16.cfg | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/1066mhz_4x256mx16.cfg b/board/boundary/nitrogen6x/1066mhz_4x256mx16.cfg index bb5716e88d..1096f777ec 100644 --- a/board/boundary/nitrogen6x/1066mhz_4x256mx16.cfg +++ b/board/boundary/nitrogen6x/1066mhz_4x256mx16.cfg @@ -24,18 +24,18 @@ DATA 4, MX6_MMDC_P1_MPZQHWCTRL, 0xA1390003 DATA 4, MX6_MMDC_P0_MDREF, 0x00007800 DATA 4, MX6_MMDC_P0_MPODTCTRL, 0x00022227 DATA 4, MX6_MMDC_P1_MPODTCTRL, 0x00022227 -DATA 4, MX6_MMDC_P0_MPDGCTRL0, 0x43040319 -DATA 4, MX6_MMDC_P0_MPDGCTRL1, 0x03040279 -DATA 4, MX6_MMDC_P1_MPDGCTRL0, 0x43040321 -DATA 4, MX6_MMDC_P1_MPDGCTRL1, 0x03030251 -DATA 4, MX6_MMDC_P0_MPRDDLCTL, 0x4d434248 -DATA 4, MX6_MMDC_P1_MPRDDLCTL, 0x42413c4d -DATA 4, MX6_MMDC_P0_MPWRDLCTL, 0x34424543 -DATA 4, MX6_MMDC_P1_MPWRDLCTL, 0x49324933 -DATA 4, MX6_MMDC_P0_MPWLDECTRL0, 0x001a0017 -DATA 4, MX6_MMDC_P0_MPWLDECTRL1, 0x001F001F -DATA 4, MX6_MMDC_P1_MPWLDECTRL0, 0x00170027 -DATA 4, MX6_MMDC_P1_MPWLDECTRL1, 0x000a001f +DATA 4, MX6_MMDC_P0_MPDGCTRL0, 0x42740304 +DATA 4, MX6_MMDC_P0_MPDGCTRL1, 0x026e0265 +DATA 4, MX6_MMDC_P1_MPDGCTRL0, 0x02750306 +DATA 4, MX6_MMDC_P1_MPDGCTRL1, 0x02720244 +DATA 4, MX6_MMDC_P0_MPRDDLCTL, 0x463d4041 +DATA 4, MX6_MMDC_P1_MPRDDLCTL, 0x42413c47 +DATA 4, MX6_MMDC_P0_MPWRDLCTL, 0x37414441 +DATA 4, MX6_MMDC_P1_MPWRDLCTL, 0x4633473b +DATA 4, MX6_MMDC_P0_MPWLDECTRL0, 0x0025001f +DATA 4, MX6_MMDC_P0_MPWLDECTRL1, 0x00290027 +DATA 4, MX6_MMDC_P1_MPWLDECTRL0, 0x001f002b +DATA 4, MX6_MMDC_P1_MPWLDECTRL1, 0x000f0029 DATA 4, MX6_MMDC_P0_MPMUR0, 0x00000800 DATA 4, MX6_MMDC_P1_MPMUR0, 0x00000800 DATA 4, MX6_MMDC_P0_MDSCR, 0x00000000 -- cgit v1.2.1 From c9c86bde3d8d24a9eee06f64eaa2e14206c76d77 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:22 -0700 Subject: nitrogen6x: implement board_cfb_skip() to disable text output 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 --- board/boundary/nitrogen6x/nitrogen6x.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 60a09f4bb3..1a6edac02b 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; -- cgit v1.2.1 From 213e9e334822ba6a08d8d222d392dc30db8aa381 Mon Sep 17 00:00:00 2001 From: Troy Kisky Date: Thu, 2 Oct 2014 12:16:23 -0700 Subject: nitrogen6x: simplify board_mmc_getcd 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 --- board/boundary/nitrogen6x/nitrogen6x.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 1a6edac02b..e8cc243774 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) -- cgit v1.2.1 From 41612472b6de135598d0dcf24da783a9802badc8 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:24 -0700 Subject: nitrogen6x: configure SD2 pads for SDIO on USDHC2 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 --- board/boundary/nitrogen6x/nitrogen6x.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index e8cc243774..bde299f55d 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); -- cgit v1.2.1 From a3b527a947f6f71b2673bb7943854b4459f4142e Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:25 -0700 Subject: nitrogen6x: power-down miscellanous peripherals 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 Signed-off-by: Eric Nelson --- board/boundary/nitrogen6x/nitrogen6x.c | 47 +++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index bde299f55d..38f0df8fdd 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) -- cgit v1.2.1 From 693cccf412b14b69cd6c81e10f150302ebfdd696 Mon Sep 17 00:00:00 2001 From: Troy Kisky Date: Thu, 2 Oct 2014 12:16:26 -0700 Subject: nitrogen6x: configure SGTL5000, CSI camera clock outputs 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 Signed-off-by: Eric Nelson --- board/boundary/nitrogen6x/nitrogen6x.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 38f0df8fdd..96e2b7430c 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 */ -- cgit v1.2.1 From 9fc425278b333f481d1bbf1efd98813dcd4d57d4 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:27 -0700 Subject: nitrogen6x: staticize board file 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 --- board/boundary/nitrogen6x/nitrogen6x.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 96e2b7430c..e795492046 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -28,6 +28,8 @@ #include #include #include +#include +#include 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)); -- cgit v1.2.1 From adc4a2bd03ad6ab4cc7f73609d60ab740c8126e6 Mon Sep 17 00:00:00 2001 From: Troy Kisky Date: Thu, 2 Oct 2014 12:16:29 -0700 Subject: nitrogen6x: phy: add 100 us delay after phy reset Testing shows that the Micrel PHY may not be completely out of reset if accessed immediately. Signed-off-by: Troy Kisky Signed-off-by: Eric Nelson --- board/boundary/nitrogen6x/nitrogen6x.c | 1 + 1 file changed, 1 insertion(+) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index e795492046..a89a15ca74 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -246,6 +246,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[] = { -- cgit v1.2.1 From 84caf0b26b513df0a0f45832d053a623963e5c6f Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:30 -0700 Subject: nitrogen6x: prevent warnings about board_ehci* callbacks Include declarations of board_ehci callbacks to prevent compiler warnings and enforce function prototypes. Signed-off-by: Eric Nelson --- board/boundary/nitrogen6x/nitrogen6x.c | 1 + 1 file changed, 1 insertion(+) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index a89a15ca74..67d4154480 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -30,6 +30,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; #define GP_USB_OTG_PWR IMX_GPIO_NR(3, 22) -- cgit v1.2.1 From 4328fb05bf8c90e96afa023d39395efa5fb2fda5 Mon Sep 17 00:00:00 2001 From: Robert Winkler Date: Thu, 2 Oct 2014 12:16:31 -0700 Subject: nitrogen6x: display: add support lvds jeida screen 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 Signed-off-by: Eric Nelson --- board/boundary/nitrogen6x/nitrogen6x.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 67d4154480..39e8013480 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -474,6 +474,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( @@ -502,6 +513,26 @@ struct display_info_t const displays[] = {{ .vsync_len = 10, .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, -- cgit v1.2.1 From 443d4d15d7bd2f2bd5a58a6a6dd8da2a8dd23de4 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:32 -0700 Subject: nitrogen6x: display: add qvga panel 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 --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 39e8013480..5e0461c54c 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -593,6 +593,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); -- cgit v1.2.1 From 4adc1127f8c50c4361d0024e098a91e7050e7400 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:33 -0700 Subject: nitrogen6x: display: add support for LG-9.7 LVDS display 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 --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 5e0461c54c..2200bc7c3b 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -553,6 +553,26 @@ struct display_info_t const displays[] = {{ .vsync_len = 10, .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, -- cgit v1.2.1 From d6949e3f9dc6f2bbc63b1614601291091d1f0347 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:34 -0700 Subject: nitrogen6x: display: add LDB-WXGA-S for SPWG 1280x800 displays 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 --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 2200bc7c3b..045f81ecb7 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -533,6 +533,26 @@ struct display_info_t const displays[] = {{ .vsync_len = 10, .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, -- cgit v1.2.1 From 04edda266d333af5fe8cd5775f49071e8098082a Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:35 -0700 Subject: nitrogen6x: display: add support for fusion 7 display 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 --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 045f81ecb7..be2a41f1a4 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -613,6 +613,26 @@ struct display_info_t const displays[] = {{ .vsync_len = 10, .sync = FB_SYNC_EXT, .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, -- cgit v1.2.1 From 135663061ffa78c391dd502674bb50823555b675 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:36 -0700 Subject: nitrogen6x: display: add svga display (800x600) 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 --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index be2a41f1a4..ccbb9b7e29 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -633,6 +633,26 @@ struct display_info_t const displays[] = {{ .vsync_len = 7, .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, -- cgit v1.2.1 From 865aa30bb30fb1675ea516bfab8850f91da69a29 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:37 -0700 Subject: nitrogen6x: display: add Ampire 1024x600 panel 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 --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index ccbb9b7e29..38d0b529de 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -653,6 +653,26 @@ struct display_info_t const displays[] = {{ .vsync_len = 10, .sync = 0, .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, -- cgit v1.2.1 From c745de7174e9f59f68ec281bf094259ada46d2a8 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:38 -0700 Subject: nitrogen6x: display: add wvga-lvds panel 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 --- board/boundary/nitrogen6x/nitrogen6x.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 38d0b529de..a82ec45b0f 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -673,6 +673,26 @@ struct display_info_t const displays[] = {{ .vsync_len = 10, .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, -- cgit v1.2.1 From ce9507b793a0755b37b3612657a12f4d19ee0b61 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Thu, 2 Oct 2014 12:16:39 -0700 Subject: nitrogen6x: display use I2C detect for HDMI 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 --- board/boundary/nitrogen6x/nitrogen6x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'board/boundary/nitrogen6x') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index a82ec45b0f..2762fcffae 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -494,10 +494,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", -- cgit v1.2.1