27 #include <mach/common.h>
33 .name =
"Samsung-LMS430HF02",
51 .name =
"Seiko-43WVF1G",
69 .name =
"Ampire AM-800480R2TMQW-T01H",
86 .name =
"HannStar PJ70112A",
108 #define MX28EVK_FLEXCAN_SWITCH MXS_GPIO_NR(2, 13)
110 static int flexcan0_en, flexcan1_en;
112 static void mx28evk_flexcan_switch(
void)
114 if (flexcan0_en || flexcan1_en)
120 static void mx28evk_flexcan0_switch(
int enable)
123 mx28evk_flexcan_switch();
126 static void mx28evk_flexcan1_switch(
int enable)
129 mx28evk_flexcan_switch();
134 static struct of_dev_auxdata mxs_auxdata_lookup[]
__initdata = {
135 OF_DEV_AUXDATA(
"fsl,imx23-lcdif", 0x80030000,
NULL, &mxsfb_pdata),
136 OF_DEV_AUXDATA(
"fsl,imx28-lcdif", 0x80030000,
NULL, &mxsfb_pdata),
137 OF_DEV_AUXDATA(
"fsl,imx28-flexcan", 0x80032000,
NULL, &flexcan_pdata[0]),
138 OF_DEV_AUXDATA(
"fsl,imx28-flexcan", 0x80034000,
NULL, &flexcan_pdata[1]),
142 static void __init imx23_timer_init(
void)
148 .init = imx23_timer_init,
151 static void __init imx28_timer_init(
void)
157 .init = imx28_timer_init,
174 for (i = 0; i < 2; i++) {
180 newmac = kzalloc(
sizeof(*newmac) + 6,
GFP_KERNEL);
183 newmac->
value = newmac + 1;
196 macaddr = newmac->
value;
210 macaddr[3] = (val >> 16) & 0xff;
211 macaddr[4] = (val >> 8) & 0xff;
212 macaddr[5] = (val >> 0) & 0xff;
218 static void __init imx23_evk_init(
void)
220 mxsfb_pdata.mode_list = mx23evk_video_modes;
221 mxsfb_pdata.mode_count =
ARRAY_SIZE(mx23evk_video_modes);
222 mxsfb_pdata.default_bpp = 32;
226 static inline void enable_clk_enet_out(
void)
231 clk_prepare_enable(clk);
234 static void __init imx28_evk_init(
void)
236 enable_clk_enet_out();
239 mxsfb_pdata.mode_list = mx28evk_video_modes;
240 mxsfb_pdata.mode_count =
ARRAY_SIZE(mx28evk_video_modes);
241 mxsfb_pdata.default_bpp = 32;
247 static void __init imx28_evk_post_init(
void)
251 flexcan_pdata[0].transceiver_switch = mx28evk_flexcan0_switch;
252 flexcan_pdata[1].transceiver_switch = mx28evk_flexcan1_switch;
256 static void __init m28evk_init(
void)
258 mxsfb_pdata.mode_list = m28evk_video_modes;
259 mxsfb_pdata.mode_count =
ARRAY_SIZE(m28evk_video_modes);
260 mxsfb_pdata.default_bpp = 16;
270 static void __init apx4devkit_init(
void)
272 enable_clk_enet_out();
276 apx4devkit_phy_fixup);
278 mxsfb_pdata.mode_list = apx4devkit_video_modes;
279 mxsfb_pdata.mode_count =
ARRAY_SIZE(apx4devkit_video_modes);
280 mxsfb_pdata.default_bpp = 32;
284 #define ENET0_MDC__GPIO_4_0 MXS_GPIO_NR(4, 0)
285 #define ENET0_MDIO__GPIO_4_1 MXS_GPIO_NR(4, 1)
286 #define ENET0_RX_EN__GPIO_4_2 MXS_GPIO_NR(4, 2)
287 #define ENET0_RXD0__GPIO_4_3 MXS_GPIO_NR(4, 3)
288 #define ENET0_RXD1__GPIO_4_4 MXS_GPIO_NR(4, 4)
289 #define ENET0_TX_EN__GPIO_4_6 MXS_GPIO_NR(4, 6)
290 #define ENET0_TXD0__GPIO_4_7 MXS_GPIO_NR(4, 7)
291 #define ENET0_TXD1__GPIO_4_8 MXS_GPIO_NR(4, 8)
292 #define ENET_CLK__GPIO_4_16 MXS_GPIO_NR(4, 16)
294 #define TX28_FEC_PHY_POWER MXS_GPIO_NR(3, 29)
295 #define TX28_FEC_PHY_RESET MXS_GPIO_NR(4, 13)
296 #define TX28_FEC_nINT MXS_GPIO_NR(4, 5)
313 static void __init tx28_post_init(
void)
320 enable_clk_enet_out();
325 pr_err(
"%s: failed to find fec device\n", __func__);
329 pctl = pinctrl_get_select(&pdev->
dev,
"gpio_mode");
331 pr_err(
"%s: failed to get pinctrl state\n", __func__);
337 pr_err(
"%s: failed to request gpios: %d\n", __func__, ret);
358 static void __init mxs_machine_init(
void)
370 mxs_auxdata_lookup,
NULL);
376 imx28_evk_post_init();
379 static const char *imx23_dt_compat[]
__initdata = {
384 static const char *imx28_dt_compat[] __initdata = {
393 .timer = &imx23_timer,
394 .init_machine = mxs_machine_init,
395 .dt_compat = imx23_dt_compat,
403 .timer = &imx28_timer,
404 .init_machine = mxs_machine_init,
405 .dt_compat = imx28_dt_compat,