summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mxs
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-07-12 17:57:25 +0200
committerArnd Bergmann <arnd@arndb.de>2012-07-12 17:57:25 +0200
commite3b897c1ae5341daa6f00ef9b70bc7e44f3b1705 (patch)
treee030f3d3d82e4e5036b8ddace57738af112e7110 /arch/arm/mach-mxs
parent8d5776d5fed6c3d2d5b5bce9512faa41321d6a8a (diff)
parent5da0127093efb47c61e48d0af3d6ef0762aac00b (diff)
downloadlinux-3.10-e3b897c1ae5341daa6f00ef9b70bc7e44f3b1705.tar.gz
linux-3.10-e3b897c1ae5341daa6f00ef9b70bc7e44f3b1705.tar.bz2
linux-3.10-e3b897c1ae5341daa6f00ef9b70bc7e44f3b1705.zip
Merge branch 'mxs/dt-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/dt
From Shawn Guo <shawn.guo@linaro.org>: Here is the second (last) batch of mxs mxs device tree changes for 3.6. * 'mxs/dt-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2.6: ARM: dts: imx28-evk: add usb devices ARM: mxs: rename dts files with soc name being the prefix ARM: apx4devkit: add pin muxing for GPIOs ARM: apx4devkit: remove AUART3 ARM: apx4devkit: add SSP2 support ARM: apx4devkit: fix the bus-width of SSP0 to 4 bits ARM: apx4devkit: add display support ARM: apx4devkit: add NAND support ARM: mxs: add dtb-y target into Makefile.boot ARM: mxs: convert stmp378x_devb board to device tree ARM: mxs: convert tx28 board to device tree ARM: mxs: convert apx4devkit board to device tree ARM: mxs: convert m28evk board to device tree ARM: dts: imx28: move lcdif control pins into board dts ARM: dts: imx28: move extra gpmi-nand pins into board dts Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-mxs')
-rw-r--r--arch/arm/mach-mxs/Makefile.boot9
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c87
2 files changed, 92 insertions, 4 deletions
diff --git a/arch/arm/mach-mxs/Makefile.boot b/arch/arm/mach-mxs/Makefile.boot
index 07b11fe6453..4582999cf08 100644
--- a/arch/arm/mach-mxs/Makefile.boot
+++ b/arch/arm/mach-mxs/Makefile.boot
@@ -1 +1,10 @@
zreladdr-y += 0x40008000
+
+dtb-y += imx23-evk.dtb \
+ imx23-olinuxino.dtb \
+ imx23-stmp378x_devb.dtb \
+ imx28-apx4devkit.dtb \
+ imx28-cfa10036.dtb \
+ imx28-evk.dtb \
+ imx28-m28evk.dtb \
+ imx28-tx28.dtb \
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 7bbb961cc52..648bdd05d38 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -16,9 +16,11 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/irqdomain.h>
+#include <linux/micrel_phy.h>
#include <linux/mxsfb.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
+#include <linux/phy.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <mach/common.h>
@@ -59,6 +61,42 @@ 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 fb_videomode apx4devkit_video_modes[] = {
+ {
+ .name = "HannStar PJ70112A",
+ .refresh = 60,
+ .xres = 800,
+ .yres = 480,
+ .pixclock = 33333, /* picosecond (30.00 MHz) */
+ .left_margin = 88,
+ .right_margin = 40,
+ .upper_margin = 32,
+ .lower_margin = 13,
+ .hsync_len = 48,
+ .vsync_len = 3,
+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT |
+ FB_SYNC_DATA_ENABLE_HIGH_ACT |
+ FB_SYNC_DOTCLK_FAILING_ACT,
+ },
+};
+
static struct mxsfb_platform_data mxsfb_pdata __initdata;
static struct of_dev_auxdata mxs_auxdata_lookup[] __initdata = {
@@ -186,15 +224,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 +243,47 @@ 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 int apx4devkit_phy_fixup(struct phy_device *phy)
+{
+ phy->dev_flags |= MICREL_PHY_50MHZ_CLK;
+ return 0;
+}
+
+static void __init apx4devkit_init(void)
+{
+ enable_clk_enet_out();
+
+ if (IS_BUILTIN(CONFIG_PHYLIB))
+ phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK,
+ apx4devkit_phy_fixup);
+
+ mxsfb_pdata.mode_list = apx4devkit_video_modes;
+ mxsfb_pdata.mode_count = ARRAY_SIZE(apx4devkit_video_modes);
+ mxsfb_pdata.default_bpp = 32;
+ mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
+}
+
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();
+ else if (of_machine_is_compatible("bluegiga,apx4devkit"))
+ apx4devkit_init();
of_platform_populate(NULL, of_default_bus_match_table,
mxs_auxdata_lookup, NULL);
@@ -216,14 +291,18 @@ static void __init mxs_machine_init(void)
static const char *imx23_dt_compat[] __initdata = {
"fsl,imx23-evk",
+ "fsl,stmp378x_devb"
"olimex,imx23-olinuxino",
"fsl,imx23",
NULL,
};
static const char *imx28_dt_compat[] __initdata = {
+ "bluegiga,apx4devkit",
"crystalfontz,cfa10036",
+ "denx,m28evk",
"fsl,imx28-evk",
+ "karo,tx28",
"fsl,imx28",
NULL,
};