diff options
author | Marek Vasut <marex@denx.de> | 2012-07-07 21:21:38 +0800 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-07-11 11:49:41 +0800 |
commit | 8fa62e11283faa203b360c4ebdbd186b2c8dd844 (patch) | |
tree | cbf888b1a2371d063ec55190c6facd1964869460 /arch/arm/mach-mxs | |
parent | 3dba2596730709fdec65491455a66a7df1ca67db (diff) | |
download | op-kernel-dev-8fa62e11283faa203b360c4ebdbd186b2c8dd844.zip op-kernel-dev-8fa62e11283faa203b360c4ebdbd186b2c8dd844.tar.gz |
ARM: mxs: convert m28evk board to device tree
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-mxs')
-rw-r--r-- | arch/arm/mach-mxs/mach-mxs.c | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 7bbb961..d3fc8ba 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -59,6 +59,23 @@ static struct fb_videomode mx28evk_video_modes[] = { }, }; +static struct fb_videomode m28evk_video_modes[] = { + { + .name = "Ampire AM-800480R2TMQW-T01H", + .refresh = 60, + .xres = 800, + .yres = 480, + .pixclock = 30066, /* picosecond (33.26 MHz) */ + .left_margin = 0, + .right_margin = 256, + .upper_margin = 0, + .lower_margin = 45, + .hsync_len = 1, + .vsync_len = 1, + .sync = FB_SYNC_DATA_ENABLE_HIGH_ACT, + }, +}; + static struct mxsfb_platform_data mxsfb_pdata __initdata; static struct of_dev_auxdata mxs_auxdata_lookup[] __initdata = { @@ -186,15 +203,17 @@ static void __init imx23_evk_init(void) mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT; } -static void __init imx28_evk_init(void) +static inline void enable_clk_enet_out(void) { - struct clk *clk; + struct clk *clk = clk_get_sys("enet_out", NULL); - /* Enable fec phy clock */ - clk = clk_get_sys("enet_out", NULL); if (!IS_ERR(clk)) clk_prepare_enable(clk); +} +static void __init imx28_evk_init(void) +{ + enable_clk_enet_out(); update_fec_mac_prop(OUI_FSL); mxsfb_pdata.mode_list = mx28evk_video_modes; @@ -203,12 +222,25 @@ static void __init imx28_evk_init(void) mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT; } +static void __init m28evk_init(void) +{ + enable_clk_enet_out(); + update_fec_mac_prop(OUI_DENX); + + mxsfb_pdata.mode_list = m28evk_video_modes; + mxsfb_pdata.mode_count = ARRAY_SIZE(m28evk_video_modes); + mxsfb_pdata.default_bpp = 16; + mxsfb_pdata.ld_intf_width = STMLCDIF_18BIT; +} + static void __init mxs_machine_init(void) { if (of_machine_is_compatible("fsl,imx28-evk")) imx28_evk_init(); else if (of_machine_is_compatible("fsl,imx23-evk")) imx23_evk_init(); + else if (of_machine_is_compatible("denx,m28evk")) + m28evk_init(); of_platform_populate(NULL, of_default_bus_match_table, mxs_auxdata_lookup, NULL); @@ -223,6 +255,7 @@ static const char *imx23_dt_compat[] __initdata = { static const char *imx28_dt_compat[] __initdata = { "crystalfontz,cfa10036", + "denx,m28evk", "fsl,imx28-evk", "fsl,imx28", NULL, |