summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2014-11-21 18:43:49 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2014-12-05 17:37:24 +0100
commitfab8c6af7615a66403e5e6a62863a7b2feda41d4 (patch)
treef977ca73ba10504af6e61223f421384fe0bd8f57
parent08d02a8ca747753cc0844bde932a91e5e964a00a (diff)
apalis-imx6: V1.1 HW changes
- use PWM 4 through a buffer for BL_PWM - use UARTs in DTE mode (Pinout change from V1.1 HW) - enable mtest
-rw-r--r--board/toradex/apalis_imx6/apalis_imx6.c15
-rw-r--r--include/configs/apalis_imx6.h5
2 files changed, 16 insertions, 4 deletions
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index b7b96b79ce..5782eeeb0c 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -72,6 +72,8 @@ static unsigned char config_block[roundup(CONFIG_BLOCK_BUFFER_SIZE, ARCH_DMA_MIN
PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \
PAD_CTL_HYS | PAD_CTL_SRE_SLOW)
+#define TRISTATE (PAD_CTL_HYS | PAD_CTL_SPEED_MED)
+
#define OUTPUT_40OHM (PAD_CTL_SPEED_MED|PAD_CTL_DSE_40ohm)
int dram_init(void)
@@ -445,8 +447,14 @@ static iomux_v3_cfg_t const backlight_pads[] = {
MX6_PAD_EIM_DA13__GPIO3_IO13 | MUX_PAD_CTRL(NO_PAD_CTRL),
#define RGB_BACKLIGHT_GP IMX_GPIO_NR(3, 13)
/* TODO PWM not GPIO */
- MX6_PAD_EIM_DA14__GPIO3_IO14 | MUX_PAD_CTRL(NO_PAD_CTRL),
-#define RGB_BACKLIGHTPWM_GP IMX_GPIO_NR(3, 14)
+ /* additional CPU pin on BKL_PWM, keep in tristate */
+ MX6_PAD_EIM_DA14__GPIO3_IO14 | MUX_PAD_CTRL(TRISTATE),
+ /* PWM4 pin */
+ MX6_PAD_SD4_DAT2__GPIO2_IO10 | MUX_PAD_CTRL(NO_PAD_CTRL),
+#define RGB_BACKLIGHTPWM_GP IMX_GPIO_NR(2, 10)
+ /* buffer output enable 0: buffer enabled*/
+ MX6_PAD_EIM_A25__GPIO5_IO02 | MUX_PAD_CTRL(WEAK_PULLUP),
+#define RGB_BACKLIGHTPWM_OE IMX_GPIO_NR(5, 2)
/* PSAVE# integrated VDAC */
MX6_PAD_EIM_BCLK__GPIO6_IO31 | MUX_PAD_CTRL(NO_PAD_CTRL),
#define VGA_PSAVE_NOT_GP IMX_GPIO_NR(6, 31)
@@ -573,6 +581,7 @@ static void enable_lvds(struct display_info_t const *dev)
writel(reg, &iomux->gpr[2]);
gpio_direction_output(RGB_BACKLIGHT_GP, 1);
gpio_direction_output(RGB_BACKLIGHTPWM_GP, 0);
+ gpio_direction_output(RGB_BACKLIGHTPWM_OE, 0);
}
static void enable_rgb(struct display_info_t const *dev)
@@ -582,6 +591,7 @@ static void enable_rgb(struct display_info_t const *dev)
ARRAY_SIZE(rgb_pads));
gpio_direction_output(RGB_BACKLIGHT_GP, 1);
gpio_direction_output(RGB_BACKLIGHTPWM_GP, 0);
+ gpio_direction_output(RGB_BACKLIGHTPWM_OE, 0);
}
static void enable_vga(struct display_info_t const *dev)
@@ -798,6 +808,7 @@ static void setup_display(void)
ARRAY_SIZE(backlight_pads));
/* use 0 for EDT 7", use 1 for LG fullHD panel */
gpio_direction_output(RGB_BACKLIGHTPWM_GP, 0);
+ gpio_direction_output(RGB_BACKLIGHTPWM_OE, 0);
gpio_direction_output(RGB_BACKLIGHT_GP, 1);
}
#endif /* defined(CONFIG_VIDEO_IPUV3) */
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 3fb17e2d46..92bf253231 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -42,7 +42,7 @@
#define CONFIG_MXC_UART
#define CONFIG_MXC_UART_BASE UART1_BASE
-//#define CONFIG_MXC_UART_DTE /* use the uart in DTE mode */
+#define CONFIG_MXC_UART_DTE /* use the uart in DTE mode */
/* Make the HW version stuff available in u-boot env */
#define CONFIG_VERSION_VARIABLE /* ver environment variable */
@@ -268,6 +268,8 @@
#define CONFIG_SYS_MAXARGS 32
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
+#define CONFIG_SYS_ALT_MEMTEST
+#define CONFIG_CMD_MEMTEST
#define CONFIG_SYS_MEMTEST_START 0x10000000
#define CONFIG_SYS_MEMTEST_END 0x10010000
#define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
@@ -315,7 +317,6 @@
#define CONFIG_CMD_BMP
#define CONFIG_CMD_TIME
-#define CONFIG_SYS_ALT_MEMTEST
#define CONFIG_CMD_BOOTZ
#define CONFIG_SUPPORT_RAW_INITRD