board: advantech: dms-ba16: Add the configuration options for display initialization
PATCH 1/4 board: advantech: dms-ba16: Add the configuration options for display initialization
Add the configuration options for display initialization in case we need to do the display initialization in kernel to support different timing settings
--- board/advantech/dms-ba16/dms-ba16.c | 3 +++ include/configs/advantech_dms-ba16.h | 2 ++ 2 files changed, 5 insertions(+)
board/advantech/dms-ba16/dms-ba16.c +3 -0
@@ -539,6 +539,8 @@ int board_late_init(void)#ifdef CONFIG_CMD_BMODE add_board_boot_modes (board_boot_modes);#endif + +#if defined(CONFIG_VIDEO_IPUV3 )/* * We need at least 200ms between power on and backlight on * as per specifications from CHI MEI
@@ -555,6 +557,7 @@ int board_late_init(void)gpio_direction_output (LVDS_BACKLIGHT_GP ,1 );pwm_enable (0 ); +#endif #ifdef CONFIG_CMD_SATA setup_ba16_sata ();
include/configs/advantech_dms-ba16.h +2 -0
@@ -262,6 +262,7 @@#define CONFIG_SYS_FSL_USDHC_NUM 3/* Framebuffer */ +#ifdef CONFIG_VIDEO #define CONFIG_VIDEO_IPUV3 #define CONFIG_VIDEO_BMP_RLE8 #define CONFIG_SPLASH_SCREEN
@@ -272,6 +273,7 @@#define CONFIG_IPUV3_CLK 260000000#define CONFIG_IMX_HDMI #define CONFIG_IMX_VIDEO_SKIP +#endif #define CONFIG_PWM_IMX #define CONFIG_IMX6_PWM_PER_CLK 66000000
Signature · 1 line
2.11.0
PATCH 2/4 board: advantech: dms-ba16: add the PMIC configuration support
Change the PMIC bulk configuration from auto mode to sync mode to avoid the voltage shutdown issue
--- board/advantech/dms-ba16/dms-ba16.c | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
board/advantech/dms-ba16/dms-ba16.c +51 -0
@@ -534,6 +534,54 @@ static const struct boot_mode board_boot_modes[] = { };#endif +void pmic_init (void ) +{ + +#define DA9063_ADDR 0x58 +#define BCORE2_CONF 0x9D +#define BCORE1_CONF 0x9E +#define BPRO_CONF 0x9F +#define BIO_CONF 0xA0 +#define BMEM_CONF 0xA1 +#define BPERI_CONF 0xA2 +#define MODE_BIT_H 7 +#define MODE_BIT_L 6 + +uchar val; +i2c_set_bus_num (2 ); + +i2c_read (DA9063_ADDR ,BCORE2_CONF ,1 , &val,1 ); + val |= (1 <<MODE_BIT_H ); + val &= ~(1 <<MODE_BIT_L ); +i2c_write (DA9063_ADDR ,BCORE2_CONF ,1 , &val,1 ); + +i2c_read (DA9063_ADDR ,BCORE1_CONF ,1 , &val,1 ); + val |= (1 <<MODE_BIT_H ); + val &= ~(1 <<MODE_BIT_L ); +i2c_write (DA9063_ADDR ,BCORE1_CONF ,1 , &val,1 ); + +i2c_read (DA9063_ADDR ,BPRO_CONF ,1 , &val,1 ); + val |= (1 <<MODE_BIT_H ); + val &= ~(1 <<MODE_BIT_L ); +i2c_write (DA9063_ADDR ,BPRO_CONF ,1 , &val,1 ); + +i2c_read (DA9063_ADDR ,BIO_CONF ,1 , &val,1 ); + val |= (1 <<MODE_BIT_H ); + val &= ~(1 <<MODE_BIT_L ); +i2c_write (DA9063_ADDR ,BIO_CONF ,1 , &val,1 ); + +i2c_read (DA9063_ADDR ,BMEM_CONF ,1 , &val,1 ); + val |= (1 <<MODE_BIT_H ); + val &= ~(1 <<MODE_BIT_L ); +i2c_write (DA9063_ADDR ,BMEM_CONF ,1 , &val,1 ); + +i2c_read (DA9063_ADDR ,BPERI_CONF ,1 , &val,1 ); + val |= (1 <<MODE_BIT_H ); + val &= ~(1 <<MODE_BIT_L ); +i2c_write (DA9063_ADDR ,BPERI_CONF ,1 , &val,1 ); + +} +int board_late_init (void ) {#ifdef CONFIG_CMD_BMODE
@@ -563,6 +611,9 @@ int board_late_init(void)setup_ba16_sata ();#endif +/* board specific pmic init */ +pmic_init (); +return 0 ; }
Signature · 1 line
2.11.0
PATCH 2/4 board: advantech: dms-ba16: add the PMIC configuration support
Quoted 4 lines · Ken Lin
Change the PMIC bulk configuration from auto mode to sync mode to avoid the voltage shutdown issue
Signed-off-by Ken Lin <[email protected]>---
PATCH 3/4 board: advantech: dms-ba16: fix AR8033 reset timing issue
In reply to Ken LinAdd the delay (10ms) to ensure the clock is stable and to meet the clock-to-reset(1ms) requirement recommended in the AR8033 datasheet
--- board/advantech/dms-ba16/dms-ba16.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
board/advantech/dms-ba16/dms-ba16.c +2 -1
@@ -103,8 +103,9 @@ static void setup_iomux_enet(void)/* Reset AR8033 PHY */ gpio_direction_output (IMX_GPIO_NR (1 ,28 ),0 ); -udelay (500 ); +mdelay (10 );gpio_set_value (IMX_GPIO_NR (1 ,28 ),1 ); +mdelay (1 ); }static iomux_v3_cfg_t const usdhc2_pads[] = {
Signature · 1 line
2.11.0
PATCH 3/4 board: advantech: dms-ba16: fix AR8033 reset timing issue
Quoted 4 lines · Ken Lin
Add the delay (10ms) to ensure the clock is stable and to meet the clock-to-reset(1ms) requirement recommended in the AR8033 datasheet
Signed-off-by Ken Lin <[email protected]>---
PATCH 4/4 board: advantech: dms-ba16: apply the proper register setting to fix the voltage peak issue
In reply to Ken LinApply the proper setting for the reserved bits in SetDes Test and System Mode Control register to avoid the voltage peak issue while we do the IEEE PHY comformance test
--- board/advantech/dms-ba16/dms-ba16.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
board/advantech/dms-ba16/dms-ba16.c +2 -1
@@ -304,7 +304,8 @@ static int mx6_rgmii_rework(struct phy_device *phydev)/* set debug port address: SerDes Test and System Mode Control */ phy_write (phydev,MDIO_DEVAD_NONE ,0x1d ,0x05 );/* enable rgmii tx clock delay */ -phy_write (phydev,MDIO_DEVAD_NONE ,0x1e ,0x100 ); +/* set the reserved bits to avoid board specific voltage peak issue*/ +phy_write (phydev,MDIO_DEVAD_NONE ,0x1e ,0x3D47 );return 0 ; }
Signature · 1 line
2.11.0
PATCH 4/4 board: advantech: dms-ba16: apply the proper register setting to fix the voltage peak issue
Quoted 5 lines · Ken Lin
Apply the proper setting for the reserved bits in SetDes Test and System Mode Control register to avoid the voltage peak issue while we do the IEEE PHY comformance test
Signed-off-by Ken Lin <[email protected]>---
PATCH 1/4 board: advantech: dms-ba16: Add the configuration options for display initialization
In reply to Ken LinQuoted 5 lines · Ken Lin
Add the configuration options for display initialization in case we need to do the display initialization in kernel to support different timing settings
Signed-off-by Ken Lin <[email protected]>---
PATCH 1/4 board: advantech: dms-ba16: Add the configuration options for display initialization
In reply to Ken LinQuoted 5 lines · Ken Lin
Add the configuration options for display initialization in case we need to do the display initialization in kernel to support different timing settings
Signed-off-by Ken Lin <[email protected]>---
Whole series applied to u-boot-imx, thanks!
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================