summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-04-04 15:44:57 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-04-04 15:44:57 +0200
commitfed029f3c31b7d5df674b5090a13356b631918c7 (patch)
treef1948b23396505a4f5568ab9d37800235b815e0b /board
parentbe08abc2429c2e9cbce3d0abc1d315171d683520 (diff)
parent4fdebefa453a58c7b4ca653ab40f7a9791aba6c9 (diff)
downloadu-boot-imx-fed029f3c31b7d5df674b5090a13356b631918c7.zip
u-boot-imx-fed029f3c31b7d5df674b5090a13356b631918c7.tar.gz
u-boot-imx-fed029f3c31b7d5df674b5090a13356b631918c7.tar.bz2
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
Diffstat (limited to 'board')
-rw-r--r--board/samsung/dts/exynos5250-smdk5250.dts40
-rw-r--r--board/samsung/smdk5250/clock_init.c22
-rw-r--r--board/samsung/smdk5250/setup.h2
-rw-r--r--board/samsung/smdk5250/smdk5250.c19
-rw-r--r--board/samsung/trats/trats.c6
-rw-r--r--board/samsung/universal_c210/universal.c23
6 files changed, 78 insertions, 34 deletions
diff --git a/board/samsung/dts/exynos5250-smdk5250.dts b/board/samsung/dts/exynos5250-smdk5250.dts
index 1c2d52d..8da973b 100644
--- a/board/samsung/dts/exynos5250-smdk5250.dts
+++ b/board/samsung/dts/exynos5250-smdk5250.dts
@@ -79,4 +79,44 @@
samsung,slope = <274761730>;
samsung,dc-value = <25>;
};
+
+ fimd@14400000 {
+ samsung,vl-freq = <60>;
+ samsung,vl-col = <2560>;
+ samsung,vl-row = <1600>;
+ samsung,vl-width = <2560>;
+ samsung,vl-height = <1600>;
+
+ samsung,vl-clkp;
+ samsung,vl-dp;
+ samsung,vl-bpix = <4>;
+
+ samsung,vl-hspw = <32>;
+ samsung,vl-hbpd = <80>;
+ samsung,vl-hfpd = <48>;
+ samsung,vl-vspw = <6>;
+ samsung,vl-vbpd = <37>;
+ samsung,vl-vfpd = <3>;
+ samsung,vl-cmd-allow-len = <0xf>;
+
+ samsung,winid = <3>;
+ samsung,interface-mode = <1>;
+ samsung,dp-enabled = <1>;
+ samsung,dual-lcd-enabled = <0>;
+ };
+
+ dp@145b0000 {
+ samsung,lt-status = <0>;
+
+ samsung,master-mode = <0>;
+ samsung,bist-mode = <0>;
+ samsung,bist-pattern = <0>;
+ samsung,h-sync-polarity = <0>;
+ samsung,v-sync-polarity = <0>;
+ samsung,interlaced = <0>;
+ samsung,color-space = <0>;
+ samsung,dynamic-range = <0>;
+ samsung,ycbcr-coeff = <0>;
+ samsung,color-depth = <1>;
+ };
};
diff --git a/board/samsung/smdk5250/clock_init.c b/board/samsung/smdk5250/clock_init.c
index c009ae5..5b9e82f 100644
--- a/board/samsung/smdk5250/clock_init.c
+++ b/board/samsung/smdk5250/clock_init.c
@@ -434,10 +434,10 @@ void system_clock_init()
val = readl(&clk->mux_stat_core1);
} while ((val | MUX_MPLL_SEL_MASK) != val);
- clrbits_le32(&clk->src_core1, MUX_CPLL_SEL_MASK);
- clrbits_le32(&clk->src_core1, MUX_EPLL_SEL_MASK);
- clrbits_le32(&clk->src_core1, MUX_VPLL_SEL_MASK);
- clrbits_le32(&clk->src_core1, MUX_GPLL_SEL_MASK);
+ clrbits_le32(&clk->src_top2, MUX_CPLL_SEL_MASK);
+ clrbits_le32(&clk->src_top2, MUX_EPLL_SEL_MASK);
+ clrbits_le32(&clk->src_top2, MUX_VPLL_SEL_MASK);
+ clrbits_le32(&clk->src_top2, MUX_GPLL_SEL_MASK);
tmp = MUX_CPLL_SEL_MASK | MUX_EPLL_SEL_MASK | MUX_VPLL_SEL_MASK
| MUX_GPLL_SEL_MASK;
do {
@@ -494,35 +494,35 @@ void system_clock_init()
val = set_pll(arm_clk_ratio->apll_mdiv, arm_clk_ratio->apll_pdiv,
arm_clk_ratio->apll_sdiv);
writel(val, &clk->apll_con0);
- while (readl(&clk->apll_con0) & APLL_CON0_LOCKED)
+ while ((readl(&clk->apll_con0) & APLL_CON0_LOCKED) == 0)
;
/* Set MPLL */
writel(MPLL_CON1_VAL, &clk->mpll_con1);
val = set_pll(mem->mpll_mdiv, mem->mpll_pdiv, mem->mpll_sdiv);
writel(val, &clk->mpll_con0);
- while (readl(&clk->mpll_con0) & MPLL_CON0_LOCKED)
+ while ((readl(&clk->mpll_con0) & MPLL_CON0_LOCKED) == 0)
;
/* Set BPLL */
writel(BPLL_CON1_VAL, &clk->bpll_con1);
val = set_pll(mem->bpll_mdiv, mem->bpll_pdiv, mem->bpll_sdiv);
writel(val, &clk->bpll_con0);
- while (readl(&clk->bpll_con0) & BPLL_CON0_LOCKED)
+ while ((readl(&clk->bpll_con0) & BPLL_CON0_LOCKED) == 0)
;
/* Set CPLL */
writel(CPLL_CON1_VAL, &clk->cpll_con1);
val = set_pll(mem->cpll_mdiv, mem->cpll_pdiv, mem->cpll_sdiv);
writel(val, &clk->cpll_con0);
- while (readl(&clk->cpll_con0) & CPLL_CON0_LOCKED)
+ while ((readl(&clk->cpll_con0) & CPLL_CON0_LOCKED) == 0)
;
/* Set GPLL */
writel(GPLL_CON1_VAL, &clk->gpll_con1);
val = set_pll(mem->gpll_mdiv, mem->gpll_pdiv, mem->gpll_sdiv);
writel(val, &clk->gpll_con0);
- while (readl(&clk->gpll_con0) & GPLL_CON0_LOCKED)
+ while ((readl(&clk->gpll_con0) & GPLL_CON0_LOCKED) == 0)
;
/* Set EPLL */
@@ -530,7 +530,7 @@ void system_clock_init()
writel(EPLL_CON1_VAL, &clk->epll_con1);
val = set_pll(mem->epll_mdiv, mem->epll_pdiv, mem->epll_sdiv);
writel(val, &clk->epll_con0);
- while (readl(&clk->epll_con0) & EPLL_CON0_LOCKED)
+ while ((readl(&clk->epll_con0) & EPLL_CON0_LOCKED) == 0)
;
/* Set VPLL */
@@ -538,7 +538,7 @@ void system_clock_init()
writel(VPLL_CON1_VAL, &clk->vpll_con1);
val = set_pll(mem->vpll_mdiv, mem->vpll_pdiv, mem->vpll_sdiv);
writel(val, &clk->vpll_con0);
- while (readl(&clk->vpll_con0) & VPLL_CON0_LOCKED)
+ while ((readl(&clk->vpll_con0) & VPLL_CON0_LOCKED) == 0)
;
writel(CLK_SRC_CORE0_VAL, &clk->src_core0);
diff --git a/board/samsung/smdk5250/setup.h b/board/samsung/smdk5250/setup.h
index a159601..34d8bc31 100644
--- a/board/samsung/smdk5250/setup.h
+++ b/board/samsung/smdk5250/setup.h
@@ -343,7 +343,7 @@
#define TOP2_VAL 0x0110000
/* CLK_SRC_PERIC0 */
-#define PWM_SEL 0
+#define PWM_SEL 6
#define UART3_SEL 6
#define UART2_SEL 6
#define UART1_SEL 6
diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
index 217c6df..8b09e1d 100644
--- a/board/samsung/smdk5250/smdk5250.c
+++ b/board/samsung/smdk5250/smdk5250.c
@@ -312,9 +312,10 @@ int board_eth_init(bd_t *bis)
u32 smc_bw_conf, smc_bc_conf;
struct fdt_sromc config;
fdt_addr_t base_addr;
- int node;
#ifdef CONFIG_OF_CONTROL
+ int node;
+
node = decode_sromc(gd->fdt_blob, &config);
if (node < 0) {
debug("%s: Could not find sromc configuration\n", __func__);
@@ -454,7 +455,7 @@ int board_early_init_f(void)
#endif
#ifdef CONFIG_LCD
-void cfg_lcd_gpio(void)
+void exynos_cfg_lcd_gpio(void)
{
struct exynos5_gpio_part1 *gpio1 =
(struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
@@ -471,6 +472,12 @@ void cfg_lcd_gpio(void)
s5p_gpio_cfg_pin(&gpio1->x0, 7, GPIO_FUNC(0x3));
}
+void exynos_set_dp_phy(unsigned int onoff)
+{
+ set_dp_phy_ctrl(onoff);
+}
+
+#ifndef CONFIG_OF_CONTROL
vidinfo_t panel_info = {
.vl_freq = 60,
.vl_col = 2560,
@@ -494,10 +501,6 @@ vidinfo_t panel_info = {
.vl_cmd_allow_len = 0xf,
.win_id = 3,
- .cfg_gpio = cfg_lcd_gpio,
- .backlight_on = NULL,
- .lcd_power_on = NULL,
- .reset_lcd = NULL,
.dual_lcd_enabled = 0,
.init_delay = 0,
@@ -537,14 +540,16 @@ static struct edp_device_info edp_info = {
};
static struct exynos_dp_platform_data dp_platform_data = {
- .phy_enable = set_dp_phy_ctrl,
.edp_dev_info = &edp_info,
};
+#endif
void init_panel_info(vidinfo_t *vid)
{
+#ifndef CONFIG_OF_CONTROL
vid->rgb_mode = MODE_RGB_P,
exynos_set_dp_platform_data(&dp_platform_data);
+#endif
}
#endif
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 9207646..e20fb3d 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -635,7 +635,7 @@ int board_early_init_f(void)
return 0;
}
-static void lcd_reset(void)
+void exynos_reset_lcd(void)
{
struct exynos4_gpio_part2 *gpio2 =
(struct exynos4_gpio_part2 *)samsung_get_base_gpio_part2();
@@ -755,10 +755,6 @@ vidinfo_t panel_info = {
.vl_cmd_allow_len = 0xf,
.win_id = 3,
- .cfg_gpio = NULL,
- .backlight_on = NULL,
- .lcd_power_on = NULL, /* lcd_power_on in mipi dsi driver */
- .reset_lcd = lcd_reset,
.dual_lcd_enabled = 0,
.init_delay = 0,
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index e742707..9b2770f 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -384,7 +384,7 @@ static void init_pmic_lcd(void)
puts("LCD pmic initialisation error!\n");
}
-static void lcd_cfg_gpio(void)
+void exynos_cfg_lcd_gpio(void)
{
unsigned int i, f3_end = 4;
@@ -423,7 +423,7 @@ static void lcd_cfg_gpio(void)
spi_init();
}
-static void reset_lcd(void)
+void exynos_reset_lcd(void)
{
s5p_gpio_set_value(&gpio2->y4, 5, 1);
udelay(10000);
@@ -433,7 +433,7 @@ static void reset_lcd(void)
udelay(100);
}
-static void lcd_power_on(void)
+void exynos_lcd_power_on(void)
{
struct pmic *p = pmic_get("MAX8998_PMIC");
@@ -471,10 +471,6 @@ vidinfo_t panel_info = {
.vl_cmd_allow_len = 0xf,
.win_id = 0,
- .cfg_gpio = lcd_cfg_gpio,
- .backlight_on = NULL,
- .lcd_power_on = lcd_power_on,
- .reset_lcd = reset_lcd,
.dual_lcd_enabled = 0,
.init_delay = 0,
@@ -484,6 +480,16 @@ vidinfo_t panel_info = {
.mipi_enabled = 0,
};
+void exynos_cfg_ldo(void)
+{
+ ld9040_cfg_ldo();
+}
+
+void exynos_enable_ldo(unsigned int onoff)
+{
+ ld9040_enable_ldo(onoff);
+}
+
void init_panel_info(vidinfo_t *vid)
{
vid->logo_on = 1;
@@ -498,9 +504,6 @@ void init_panel_info(vidinfo_t *vid)
vid->pclk_name = 1; /* MPLL */
vid->sclk_div = 1;
- vid->cfg_ldo = ld9040_cfg_ldo;
- vid->enable_ldo = ld9040_enable_ldo;
-
setenv("lcdinfo", "lcd=ld9040");
}