From daefb6961cc64745c285b279d938b1854f74f870 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Sat, 7 Jul 2012 20:59:09 +0800 Subject: [PATCH 01/15] ARM: dts: imx28: move extra gpmi-nand pins into board dts Only pins GPMI_CE0N and GPMI_READY0 are generally used by other boards. Move GPMI_CE1N and GPMI_READY1 into imx28-evk.dts to make gpmi_pins_a more general, and can be used by other boards. Signed-off-by: Shawn Guo --- arch/arm/boot/dts/imx28-evk.dts | 14 +++++++++++++- arch/arm/boot/dts/imx28.dtsi | 2 -- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts index 0d8739dda1af..0444964dae56 100644 --- a/arch/arm/boot/dts/imx28-evk.dts +++ b/arch/arm/boot/dts/imx28-evk.dts @@ -24,7 +24,8 @@ apbh@80000000 { gpmi-nand@8000c000 { pinctrl-names = "default"; - pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>; + pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg + &gpmi_pins_evk>; status = "okay"; }; @@ -64,6 +65,17 @@ fsl,voltage = <1>; fsl,pull-up = <0>; }; + + gpmi_pins_evk: gpmi-nand-evk@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x0110 /* MX28_PAD_GPMI_CE1N__GPMI_CE1N */ + 0x0150 /* MX28_PAD_GPMI_RDY1__GPMI_READY1 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; }; lcdif@80030000 { diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index adb5ffc2ff0d..2874adcafad3 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -198,9 +198,7 @@ 0x0060 /* MX28_PAD_GPMI_D06__GPMI_D6 */ 0x0070 /* MX28_PAD_GPMI_D07__GPMI_D7 */ 0x0100 /* MX28_PAD_GPMI_CE0N__GPMI_CE0N */ - 0x0110 /* MX28_PAD_GPMI_CE1N__GPMI_CE1N */ 0x0140 /* MX28_PAD_GPMI_RDY0__GPMI_READY0 */ - 0x0150 /* MX28_PAD_GPMI_RDY1__GPMI_READY1 */ 0x0180 /* MX28_PAD_GPMI_RDN__GPMI_RDN */ 0x0190 /* MX28_PAD_GPMI_WRN__GPMI_WRN */ 0x01a0 /* MX28_PAD_GPMI_ALE__GPMI_ALE */ From 3dba2596730709fdec65491455a66a7df1ca67db Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Sat, 7 Jul 2012 21:09:51 +0800 Subject: [PATCH 02/15] ARM: dts: imx28: move lcdif control pins into board dts The presence and muxing of lcdif control pins can vary much on different boards. Move them into imx28-evk.dts to make lcdif_24bit_pins_a only about data pins, so that it can be reused by other boards. Signed-off-by: Shawn Guo --- arch/arm/boot/dts/imx28-evk.dts | 16 +++++++++++++++- arch/arm/boot/dts/imx28.dtsi | 4 ---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts index 0444964dae56..0fcc7eae5982 100644 --- a/arch/arm/boot/dts/imx28-evk.dts +++ b/arch/arm/boot/dts/imx28-evk.dts @@ -76,11 +76,25 @@ fsl,voltage = <1>; fsl,pull-up = <0>; }; + + lcdif_pins_evk: lcdif-evk@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */ + 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */ + 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */ + 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; }; lcdif@80030000 { pinctrl-names = "default"; - pinctrl-0 = <&lcdif_24bit_pins_a>; + pinctrl-0 = <&lcdif_24bit_pins_a + &lcdif_pins_evk>; panel-enable-gpios = <&gpio3 30 0>; status = "okay"; }; diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index 2874adcafad3..02e778b30fc8 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -400,10 +400,6 @@ 0x1150 /* MX28_PAD_LCD_D21__LCD_D21 */ 0x1160 /* MX28_PAD_LCD_D22__LCD_D22 */ 0x1170 /* MX28_PAD_LCD_D23__LCD_D23 */ - 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */ - 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */ - 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */ - 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */ >; fsl,drive-strength = <0>; fsl,voltage = <1>; From 8fa62e11283faa203b360c4ebdbd186b2c8dd844 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 7 Jul 2012 21:21:38 +0800 Subject: [PATCH 03/15] ARM: mxs: convert m28evk board to device tree Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo --- arch/arm/boot/dts/imx28.dtsi | 11 ++ arch/arm/boot/dts/m28evk.dts | 210 +++++++++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 41 ++++++- 3 files changed, 258 insertions(+), 4 deletions(-) create mode 100644 arch/arm/boot/dts/m28evk.dts diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index 02e778b30fc8..895a07264210 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -232,6 +232,17 @@ fsl,pull-up = <0>; }; + auart0_2pins_a: auart0-2pins@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x3000 /* MX28_PAD_AUART0_RX__AUART0_RX */ + 0x3010 /* MX28_PAD_AUART0_TX__AUART0_TX */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + auart3_pins_a: auart3@0 { reg = <0>; fsl,pinmux-ids = < diff --git a/arch/arm/boot/dts/m28evk.dts b/arch/arm/boot/dts/m28evk.dts new file mode 100644 index 000000000000..183a3fd2d859 --- /dev/null +++ b/arch/arm/boot/dts/m28evk.dts @@ -0,0 +1,210 @@ +/* + * Copyright (C) 2012 Marek Vasut + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/dts-v1/; +/include/ "imx28.dtsi" + +/ { + model = "DENX M28EVK"; + compatible = "denx,m28evk", "fsl,imx28"; + + memory { + reg = <0x40000000 0x08000000>; + }; + + apb@80000000 { + apbh@80000000 { + gpmi-nand@8000c000 { + pinctrl-names = "default"; + pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>; + status = "okay"; + + partition@0 { + label = "bootloader"; + reg = <0x00000000 0x00300000>; + read-only; + }; + + partition@1 { + label = "environment"; + reg = <0x00300000 0x00080000>; + }; + + partition@2 { + label = "redundant-environment"; + reg = <0x00380000 0x00080000>; + }; + + partition@3 { + label = "kernel"; + reg = <0x00400000 0x00400000>; + }; + + partition@4 { + label = "filesystem"; + reg = <0x00800000 0x0f800000>; + }; + }; + + ssp0: ssp@80010000 { + compatible = "fsl,imx28-mmc"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_8bit_pins_a + &mmc0_cd_cfg + &mmc0_sck_cfg>; + bus-width = <8>; + wp-gpios = <&gpio3 10 1>; + status = "okay"; + }; + + pinctrl@80018000 { + pinctrl-names = "default"; + pinctrl-0 = <&hog_pins_a>; + + hog_pins_a: hog-gpios@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x30a3 /* MX28_PAD_AUART2_CTS__GPIO_3_10 */ + 0x30b3 /* MX28_PAD_AUART2_RTS__GPIO_3_11 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + + lcdif_pins_m28: lcdif-m28@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x11e0 /* MX28_PAD_LCD_DOTCLK__LCD_DOTCLK */ + 0x11f0 /* MX28_PAD_LCD_ENABLE__LCD_ENABLE */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + }; + + lcdif@80030000 { + pinctrl-names = "default"; + pinctrl-0 = <&lcdif_24bit_pins_a + &lcdif_pins_m28>; + status = "okay"; + }; + + can0: can@80032000 { + pinctrl-names = "default"; + pinctrl-0 = <&can0_pins_a>; + status = "okay"; + }; + + can1: can@80034000 { + pinctrl-names = "default"; + pinctrl-0 = <&can1_pins_a>; + status = "okay"; + }; + }; + + apbx@80040000 { + saif0: saif@80042000 { + pinctrl-names = "default"; + pinctrl-0 = <&saif0_pins_a>; + status = "okay"; + }; + + saif1: saif@80046000 { + pinctrl-names = "default"; + pinctrl-0 = <&saif1_pins_a>; + fsl,saif-master = <&saif0>; + status = "okay"; + }; + + i2c0: i2c@80058000 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + + sgtl5000: codec@0a { + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + VDDA-supply = <®_3p3v>; + VDDIO-supply = <®_3p3v>; + + }; + + eeprom: eeprom@51 { + compatible = "atmel,24c128"; + reg = <0x51>; + pagesize = <32>; + }; + + rtc: rtc@68 { + compatible = "stm,mt41t62"; + reg = <0x68>; + }; + }; + + duart: serial@80074000 { + pinctrl-names = "default"; + pinctrl-0 = <&duart_pins_a>; + status = "okay"; + }; + + auart0: serial@8006a000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart0_2pins_a>; + status = "okay"; + }; + + auart3: serial@80070000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart3_pins_a>; + status = "okay"; + }; + }; + }; + + ahb@80080000 { + mac0: ethernet@800f0000 { + phy-mode = "rmii"; + pinctrl-names = "default"; + pinctrl-0 = <&mac0_pins_a>; + phy-reset-gpios = <&gpio3 11 0>; + status = "okay"; + }; + + mac1: ethernet@800f4000 { + phy-mode = "rmii"; + pinctrl-names = "default"; + pinctrl-0 = <&mac1_pins_a>; + status = "okay"; + }; + }; + + regulators { + compatible = "simple-bus"; + + reg_3p3v: 3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; + + sound { + compatible = "denx,m28evk-sgtl5000", + "fsl,mxs-audio-sgtl5000"; + model = "m28evk-sgtl5000"; + saif-controllers = <&saif0 &saif1>; + audio-codec = <&sgtl5000>; + }; +}; diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 7bbb961cc52d..d3fc8ba9d759 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, From 3143bbb42b3d27a5f799c97c84fb7a4a1de88f91 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Sat, 7 Jul 2012 23:12:03 +0800 Subject: [PATCH 04/15] ARM: mxs: convert apx4devkit board to device tree Tested-by: Lauri Hintsala Signed-off-by: Shawn Guo --- arch/arm/boot/dts/apx4devkit.dts | 143 +++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx28.dtsi | 33 +++++++ arch/arm/mach-mxs/mach-mxs.c | 20 +++++ 3 files changed, 196 insertions(+) create mode 100644 arch/arm/boot/dts/apx4devkit.dts diff --git a/arch/arm/boot/dts/apx4devkit.dts b/arch/arm/boot/dts/apx4devkit.dts new file mode 100644 index 000000000000..04664bce194e --- /dev/null +++ b/arch/arm/boot/dts/apx4devkit.dts @@ -0,0 +1,143 @@ +/dts-v1/; +/include/ "imx28.dtsi" + +/ { + model = "Bluegiga APX4 Development Kit"; + compatible = "bluegiga,apx4devkit", "fsl,imx28"; + + memory { + reg = <0x40000000 0x04000000>; + }; + + apb@80000000 { + apbh@80000000 { + ssp0: ssp@80010000 { + compatible = "fsl,imx28-mmc"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_8bit_pins_a + &mmc0_cd_cfg + &mmc0_sck_cfg>; + bus-width = <8>; + status = "okay"; + }; + + pinctrl@80018000 { + pinctrl-names = "default"; + pinctrl-0 = <&hog_pins_a>; + + hog_pins_a: hog-gpios@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x31c3 /* MX28_PAD_PWM3__GPIO_3_28 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + }; + }; + + apbx@80040000 { + saif0: saif@80042000 { + pinctrl-names = "default"; + pinctrl-0 = <&saif0_pins_a>; + status = "okay"; + }; + + saif1: saif@80046000 { + pinctrl-names = "default"; + pinctrl-0 = <&saif1_pins_a>; + fsl,saif-master = <&saif0>; + status = "okay"; + }; + + i2c0: i2c@80058000 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + + sgtl5000: codec@0a { + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + VDDA-supply = <®_3p3v>; + VDDIO-supply = <®_3p3v>; + + }; + + pcf8563: rtc@51 { + compatible = "phg,pcf8563"; + reg = <0x51>; + }; + }; + + duart: serial@80074000 { + pinctrl-names = "default"; + pinctrl-0 = <&duart_pins_a>; + status = "okay"; + }; + + auart0: serial@8006a000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart0_pins_a>; + status = "okay"; + }; + + auart1: serial@8006c000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart1_2pins_a>; + status = "okay"; + }; + + auart2: serial@8006e000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart2_2pins_a>; + status = "okay"; + }; + + auart3: serial@80070000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart3_2pins_a>; + status = "okay"; + }; + }; + }; + + ahb@80080000 { + mac0: ethernet@800f0000 { + phy-mode = "rmii"; + pinctrl-names = "default"; + pinctrl-0 = <&mac0_pins_a>; + status = "okay"; + }; + }; + + regulators { + compatible = "simple-bus"; + + reg_3p3v: 3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; + + sound { + compatible = "bluegiga,apx4devkit-sgtl5000", + "fsl,mxs-audio-sgtl5000"; + model = "apx4devkit-sgtl5000"; + saif-controllers = <&saif0 &saif1>; + audio-codec = <&sgtl5000>; + }; + + leds { + compatible = "gpio-leds"; + + user { + label = "Heartbeat"; + gpios = <&gpio3 28 0>; + linux,default-trigger = "heartbeat"; + }; + }; +}; diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index 895a07264210..8595977b5424 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -243,6 +243,28 @@ fsl,pull-up = <0>; }; + auart1_2pins_a: auart1-2pins@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x3040 /* MX28_PAD_AUART1_RX__AUART1_RX */ + 0x3050 /* MX28_PAD_AUART1_TX__AUART1_TX */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + + auart2_2pins_a: auart2-2pins@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x2101 /* MX28_PAD_SSP2_SCK__AUART2_RX */ + 0x2111 /* MX28_PAD_SSP2_MOSI__AUART2_TX */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + auart3_pins_a: auart3@0 { reg = <0>; fsl,pinmux-ids = < @@ -256,6 +278,17 @@ fsl,pull-up = <0>; }; + auart3_2pins_a: auart3-2pins@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x2121 /* MX28_PAD_SSP2_MISO__AUART3_RX */ + 0x2131 /* MX28_PAD_SSP2_SS0__AUART3_TX */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + mac0_pins_a: mac0@0 { reg = <0>; fsl,pinmux-ids = < diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index d3fc8ba9d759..d0bf4149f3e5 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -16,9 +16,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -233,6 +235,21 @@ static void __init m28evk_init(void) 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); +} + static void __init mxs_machine_init(void) { if (of_machine_is_compatible("fsl,imx28-evk")) @@ -241,6 +258,8 @@ static void __init mxs_machine_init(void) 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); @@ -254,6 +273,7 @@ static const char *imx23_dt_compat[] __initdata = { }; static const char *imx28_dt_compat[] __initdata = { + "bluegiga,apx4devkit", "crystalfontz,cfa10036", "denx,m28evk", "fsl,imx28-evk", From e1a4d18f6c74cf3df59c73f526ede607196f2257 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Mon, 9 Jul 2012 12:34:35 +0800 Subject: [PATCH 05/15] ARM: mxs: convert tx28 board to device tree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FEC support is missing because we need to find a proper way to rewrite tx28_add_fec0 for device tree boot. Cc: Lothar Waßmann Signed-off-by: Shawn Guo --- arch/arm/boot/dts/imx28.dtsi | 36 +++++++++++++ arch/arm/boot/dts/tx28.dts | 97 ++++++++++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 1 + 3 files changed, 134 insertions(+) create mode 100644 arch/arm/boot/dts/tx28.dts diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index 8595977b5424..e906ec12046c 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -186,6 +186,19 @@ fsl,pull-up = <0>; }; + duart_4pins_a: duart-4pins@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x3022 /* MX28_PAD_AUART0_CTS__DUART_RX */ + 0x3032 /* MX28_PAD_AUART0_RTS__DUART_TX */ + 0x3002 /* MX28_PAD_AUART0_RX__DUART_CTS */ + 0x3012 /* MX28_PAD_AUART0_TX__DUART_RTS */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + gpmi_pins_a: gpmi-nand@0 { reg = <0>; fsl,pinmux-ids = < @@ -243,6 +256,19 @@ fsl,pull-up = <0>; }; + auart1_pins_a: auart1@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x3040 /* MX28_PAD_AUART1_RX__AUART1_RX */ + 0x3050 /* MX28_PAD_AUART1_TX__AUART1_TX */ + 0x3060 /* MX28_PAD_AUART1_CTS__AUART1_CTS */ + 0x3070 /* MX28_PAD_AUART1_RTS__AUART1_RTS */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + auart1_2pins_a: auart1-2pins@0 { reg = <0>; fsl,pinmux-ids = < @@ -407,6 +433,16 @@ fsl,pull-up = <1>; }; + pwm0_pins_a: pwm0@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x3100 /* MX28_PAD_PWM0__PWM_0 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + pwm2_pins_a: pwm2@0 { reg = <0>; fsl,pinmux-ids = < diff --git a/arch/arm/boot/dts/tx28.dts b/arch/arm/boot/dts/tx28.dts new file mode 100644 index 000000000000..62bf767409a6 --- /dev/null +++ b/arch/arm/boot/dts/tx28.dts @@ -0,0 +1,97 @@ +/dts-v1/; +/include/ "imx28.dtsi" + +/ { + model = "Ka-Ro electronics TX28 module"; + compatible = "karo,tx28", "fsl,imx28"; + + memory { + reg = <0x40000000 0x08000000>; + }; + + apb@80000000 { + apbh@80000000 { + ssp0: ssp@80010000 { + compatible = "fsl,imx28-mmc"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_4bit_pins_a + &mmc0_cd_cfg + &mmc0_sck_cfg>; + bus-width = <4>; + status = "okay"; + }; + + pinctrl@80018000 { + pinctrl-names = "default"; + pinctrl-0 = <&hog_pins_a>; + + hog_pins_a: hog-gpios@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x40a3 /* MX28_PAD_ENET0_RXD3__GPIO_4_10 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + }; + }; + + apbx@80040000 { + i2c0: i2c@80058000 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + + ds1339: rtc@68 { + compatible = "mxim,ds1339"; + reg = <0x68>; + }; + }; + + pwm: pwm@80064000 { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_pins_a>; + status = "okay"; + }; + + duart: serial@80074000 { + pinctrl-names = "default"; + pinctrl-0 = <&duart_4pins_a>; + status = "okay"; + }; + + auart1: serial@8006c000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart1_pins_a>; + status = "okay"; + }; + }; + }; + + ahb@80080000 { + mac0: ethernet@800f0000 { + phy-mode = "rmii"; + pinctrl-names = "default"; + pinctrl-0 = <&mac0_pins_a>; + status = "okay"; + }; + }; + + leds { + compatible = "gpio-leds"; + + user { + label = "Heartbeat"; + gpios = <&gpio4 10 0>; + linux,default-trigger = "heartbeat"; + }; + }; + + backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 5000000>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + }; +}; diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index d0bf4149f3e5..a04bec8aa4ce 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -277,6 +277,7 @@ static const char *imx28_dt_compat[] __initdata = { "crystalfontz,cfa10036", "denx,m28evk", "fsl,imx28-evk", + "karo,tx28", "fsl,imx28", NULL, }; From dd852aa5215b9a976b8949378e8f3b6fcb8c5291 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Mon, 9 Jul 2012 13:33:02 +0800 Subject: [PATCH 06/15] ARM: mxs: convert stmp378x_devb board to device tree The enc28j60 spi device does not get converted to dts file, because there is no mxs spi driver on mainline so far. The enc28j60 spi in mach-stmp378x_devb.c does not work anyway. Signed-off-by: Shawn Guo --- arch/arm/boot/dts/stmp378x_devb.dts | 78 +++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 1 + 2 files changed, 79 insertions(+) create mode 100644 arch/arm/boot/dts/stmp378x_devb.dts diff --git a/arch/arm/boot/dts/stmp378x_devb.dts b/arch/arm/boot/dts/stmp378x_devb.dts new file mode 100644 index 000000000000..757a327ff3e8 --- /dev/null +++ b/arch/arm/boot/dts/stmp378x_devb.dts @@ -0,0 +1,78 @@ +/* + * Copyright 2012 Freescale Semiconductor, Inc. + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/dts-v1/; +/include/ "imx23.dtsi" + +/ { + model = "Freescale STMP378x Development Board"; + compatible = "fsl,stmp378x-devb", "fsl,imx23"; + + memory { + reg = <0x40000000 0x04000000>; + }; + + apb@80000000 { + apbh@80000000 { + ssp0: ssp@80010000 { + compatible = "fsl,imx23-mmc"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_pins_fixup>; + bus-width = <4>; + wp-gpios = <&gpio1 30 0>; + vmmc-supply = <®_vddio_sd0>; + status = "okay"; + }; + + pinctrl@80018000 { + pinctrl-names = "default"; + pinctrl-0 = <&hog_pins_a>; + + hog_pins_a: hog-gpios@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x11d3 /* MX23_PAD_PWM3__GPIO_1_29 */ + 0x11e3 /* MX23_PAD_PWM4__GPIO_1_30 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + }; + }; + + apbx@80040000 { + auart0: serial@8006c000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart0_pins_a>; + status = "okay"; + }; + + duart: serial@80070000 { + pinctrl-names = "default"; + pinctrl-0 = <&duart_pins_a>; + status = "okay"; + }; + }; + }; + + regulators { + compatible = "simple-bus"; + + reg_vddio_sd0: vddio-sd0 { + compatible = "regulator-fixed"; + regulator-name = "vddio-sd0"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio1 29 0>; + }; + }; +}; diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index a04bec8aa4ce..bd8db7b21e68 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -267,6 +267,7 @@ 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, From 841730e74393a9f6b10fb22cb1d5047de6246119 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Mon, 9 Jul 2012 13:45:01 +0800 Subject: [PATCH 07/15] ARM: mxs: add dtb-y target into Makefile.boot Add dtb-y target into Makefile.boot, so that "make ARCH=arm dtbs" can build out all the dtbs listed there. It's very useful for build-testing all the .dts when imx28.dtsi changes. Signed-off-by: Shawn Guo --- arch/arm/mach-mxs/Makefile.boot | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-mxs/Makefile.boot b/arch/arm/mach-mxs/Makefile.boot index 07b11fe6453f..58733cc0726b 100644 --- a/arch/arm/mach-mxs/Makefile.boot +++ b/arch/arm/mach-mxs/Makefile.boot @@ -1 +1,10 @@ zreladdr-y += 0x40008000 + +dtb-y += apx4devkit.dtb \ + cfa10036.dtb \ + imx23-evk.dtb \ + imx23-olinuxino.dtb \ + imx28-evk.dtb \ + m28evk.dtb \ + stmp378x_devb.dtb \ + tx28.dtb \ From 3317d99e444988e71a32edbca092b1aed098c2f1 Mon Sep 17 00:00:00 2001 From: Lauri Hintsala Date: Tue, 10 Jul 2012 10:08:07 +0300 Subject: [PATCH 08/15] ARM: apx4devkit: add NAND support Signed-off-by: Lauri Hintsala Signed-off-by: Shawn Guo --- arch/arm/boot/dts/apx4devkit.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/apx4devkit.dts b/arch/arm/boot/dts/apx4devkit.dts index 04664bce194e..51ed36a6413c 100644 --- a/arch/arm/boot/dts/apx4devkit.dts +++ b/arch/arm/boot/dts/apx4devkit.dts @@ -11,6 +11,12 @@ apb@80000000 { apbh@80000000 { + gpmi-nand@8000c000 { + pinctrl-names = "default"; + pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>; + status = "okay"; + }; + ssp0: ssp@80010000 { compatible = "fsl,imx28-mmc"; pinctrl-names = "default"; From d8bb823d31a1405e42aa4a2162d3c00e657b6516 Mon Sep 17 00:00:00 2001 From: Lauri Hintsala Date: Tue, 10 Jul 2012 10:08:08 +0300 Subject: [PATCH 09/15] ARM: apx4devkit: add display support Add HannStar display and device tree configuration. Signed-off-by: Lauri Hintsala Signed-off-by: Shawn Guo --- arch/arm/boot/dts/apx4devkit.dts | 21 +++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 24 ++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/arch/arm/boot/dts/apx4devkit.dts b/arch/arm/boot/dts/apx4devkit.dts index 51ed36a6413c..03de5b87a366 100644 --- a/arch/arm/boot/dts/apx4devkit.dts +++ b/arch/arm/boot/dts/apx4devkit.dts @@ -35,11 +35,32 @@ reg = <0>; fsl,pinmux-ids = < 0x31c3 /* MX28_PAD_PWM3__GPIO_3_28 */ + 0x31e3 /* MX28_PAD_LCD_RESET__GPIO_3_30 */ >; fsl,drive-strength = <0>; fsl,voltage = <1>; fsl,pull-up = <0>; }; + + lcdif_pins_apx4: lcdif-apx4@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */ + 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */ + 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */ + 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + }; + + lcdif@80030000 { + pinctrl-names = "default"; + pinctrl-0 = <&lcdif_24bit_pins_a + &lcdif_pins_apx4>; + status = "okay"; }; }; diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index bd8db7b21e68..648bdd05d38b 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -78,6 +78,25 @@ static struct fb_videomode m28evk_video_modes[] = { }, }; +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 = { @@ -248,6 +267,11 @@ static void __init apx4devkit_init(void) 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) From 1eb73ca0b5b0b26a829471c5e8bb8ccf9a05a7bd Mon Sep 17 00:00:00 2001 From: Lauri Hintsala Date: Tue, 10 Jul 2012 10:08:09 +0300 Subject: [PATCH 10/15] ARM: apx4devkit: fix the bus-width of SSP0 to 4 bits Signed-off-by: Lauri Hintsala Signed-off-by: Shawn Guo --- arch/arm/boot/dts/apx4devkit.dts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/apx4devkit.dts b/arch/arm/boot/dts/apx4devkit.dts index 03de5b87a366..35b75131ddc9 100644 --- a/arch/arm/boot/dts/apx4devkit.dts +++ b/arch/arm/boot/dts/apx4devkit.dts @@ -20,10 +20,8 @@ ssp0: ssp@80010000 { compatible = "fsl,imx28-mmc"; pinctrl-names = "default"; - pinctrl-0 = <&mmc0_8bit_pins_a - &mmc0_cd_cfg - &mmc0_sck_cfg>; - bus-width = <8>; + pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_sck_cfg>; + bus-width = <4>; status = "okay"; }; From 557763b31cf1019a6f26fe86a586609d9ada3d96 Mon Sep 17 00:00:00 2001 From: Lauri Hintsala Date: Tue, 10 Jul 2012 10:08:10 +0300 Subject: [PATCH 11/15] ARM: apx4devkit: add SSP2 support Signed-off-by: Lauri Hintsala Signed-off-by: Shawn Guo --- arch/arm/boot/dts/apx4devkit.dts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/apx4devkit.dts b/arch/arm/boot/dts/apx4devkit.dts index 35b75131ddc9..d3fed0b42e68 100644 --- a/arch/arm/boot/dts/apx4devkit.dts +++ b/arch/arm/boot/dts/apx4devkit.dts @@ -25,6 +25,14 @@ status = "okay"; }; + ssp2: ssp@80014000 { + compatible = "fsl,imx28-mmc"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_4bit_pins_apx4 &mmc2_sck_cfg_apx4>; + bus-width = <4>; + status = "okay"; + }; + pinctrl@80018000 { pinctrl-names = "default"; pinctrl-0 = <&hog_pins_a>; @@ -52,6 +60,29 @@ fsl,voltage = <1>; fsl,pull-up = <0>; }; + + mmc2_4bit_pins_apx4: mmc2-4bit-apx4@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x2041 /* MX28_PAD_SSP0_DATA4__SSP2_D0 */ + 0x2051 /* MX28_PAD_SSP0_DATA5__SSP2_D3 */ + 0x2061 /* MX28_PAD_SSP0_DATA6__SSP2_CMD */ + 0x2071 /* MX28_PAD_SSP0_DATA7__SSP2_SCK */ + 0x2141 /* MX28_PAD_SSP2_SS1__SSP2_D1 */ + 0x2151 /* MX28_PAD_SSP2_SS2__SSP2_D2 */ + >; + fsl,drive-strength = <1>; + fsl,voltage = <1>; + fsl,pull-up = <1>; + }; + + mmc2_sck_cfg_apx4: mmc2-sck-cfg-apx4 { + fsl,pinmux-ids = < + 0x2071 /* MX28_PAD_SSP0_DATA7__SSP2_SCK */ + >; + fsl,drive-strength = <2>; + fsl,pull-up = <0>; + }; }; lcdif@80030000 { From 78771f05c8211782f4af162cd1ef10de114f8786 Mon Sep 17 00:00:00 2001 From: Lauri Hintsala Date: Tue, 10 Jul 2012 10:08:11 +0300 Subject: [PATCH 12/15] ARM: apx4devkit: remove AUART3 AUART3 is not available anymore. Pins are used as GPIOs. Signed-off-by: Lauri Hintsala Signed-off-by: Shawn Guo --- arch/arm/boot/dts/apx4devkit.dts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/arm/boot/dts/apx4devkit.dts b/arch/arm/boot/dts/apx4devkit.dts index d3fed0b42e68..ee988b7d2364 100644 --- a/arch/arm/boot/dts/apx4devkit.dts +++ b/arch/arm/boot/dts/apx4devkit.dts @@ -149,12 +149,6 @@ pinctrl-0 = <&auart2_2pins_a>; status = "okay"; }; - - auart3: serial@80070000 { - pinctrl-names = "default"; - pinctrl-0 = <&auart3_2pins_a>; - status = "okay"; - }; }; }; From 1ad0ceacb4cdb2d5eac320bea166ff728fadadeb Mon Sep 17 00:00:00 2001 From: Lauri Hintsala Date: Tue, 10 Jul 2012 10:08:12 +0300 Subject: [PATCH 13/15] ARM: apx4devkit: add pin muxing for GPIOs Some pins are used as GPIOs in user space. Signed-off-by: Lauri Hintsala Signed-off-by: Shawn Guo --- arch/arm/boot/dts/apx4devkit.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/apx4devkit.dts b/arch/arm/boot/dts/apx4devkit.dts index ee988b7d2364..b383417a558f 100644 --- a/arch/arm/boot/dts/apx4devkit.dts +++ b/arch/arm/boot/dts/apx4devkit.dts @@ -40,8 +40,13 @@ hog_pins_a: hog-gpios@0 { reg = <0>; fsl,pinmux-ids = < + 0x0113 /* MX28_PAD_GPMI_CE1N__GPIO_0_17 */ + 0x0153 /* MX28_PAD_GPMI_RDY1__GPIO_0_21 */ + 0x2123 /* MX28_PAD_SSP2_MISO__GPIO_2_18 */ + 0x2131 /* MX28_PAD_SSP2_SS0__GPIO_2_19 */ 0x31c3 /* MX28_PAD_PWM3__GPIO_3_28 */ 0x31e3 /* MX28_PAD_LCD_RESET__GPIO_3_30 */ + 0x4143 /* MX28_PAD_JTAG_RTCK__GPIO_4_20 */ >; fsl,drive-strength = <0>; fsl,voltage = <1>; From ce9b9febe1cf3e01a7dcb0d3772734addb96606c Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Wed, 11 Jul 2012 12:25:22 +0800 Subject: [PATCH 14/15] ARM: mxs: rename dts files with soc name being the prefix Rename mxs dts files with soc name being the prefix, so that the board dts file can be located easily by soc name, and we also gain the consistency of naming. Suggested-by: Marek Vasut Signed-off-by: Shawn Guo --- .../{stmp378x_devb.dts => imx23-stmp378x_devb.dts} | 0 .../dts/{apx4devkit.dts => imx28-apx4devkit.dts} | 0 .../boot/dts/{cfa10036.dts => imx28-cfa10036.dts} | 0 arch/arm/boot/dts/{m28evk.dts => imx28-m28evk.dts} | 0 arch/arm/boot/dts/{tx28.dts => imx28-tx28.dts} | 0 arch/arm/mach-mxs/Makefile.boot | 12 ++++++------ 6 files changed, 6 insertions(+), 6 deletions(-) rename arch/arm/boot/dts/{stmp378x_devb.dts => imx23-stmp378x_devb.dts} (100%) rename arch/arm/boot/dts/{apx4devkit.dts => imx28-apx4devkit.dts} (100%) rename arch/arm/boot/dts/{cfa10036.dts => imx28-cfa10036.dts} (100%) rename arch/arm/boot/dts/{m28evk.dts => imx28-m28evk.dts} (100%) rename arch/arm/boot/dts/{tx28.dts => imx28-tx28.dts} (100%) diff --git a/arch/arm/boot/dts/stmp378x_devb.dts b/arch/arm/boot/dts/imx23-stmp378x_devb.dts similarity index 100% rename from arch/arm/boot/dts/stmp378x_devb.dts rename to arch/arm/boot/dts/imx23-stmp378x_devb.dts diff --git a/arch/arm/boot/dts/apx4devkit.dts b/arch/arm/boot/dts/imx28-apx4devkit.dts similarity index 100% rename from arch/arm/boot/dts/apx4devkit.dts rename to arch/arm/boot/dts/imx28-apx4devkit.dts diff --git a/arch/arm/boot/dts/cfa10036.dts b/arch/arm/boot/dts/imx28-cfa10036.dts similarity index 100% rename from arch/arm/boot/dts/cfa10036.dts rename to arch/arm/boot/dts/imx28-cfa10036.dts diff --git a/arch/arm/boot/dts/m28evk.dts b/arch/arm/boot/dts/imx28-m28evk.dts similarity index 100% rename from arch/arm/boot/dts/m28evk.dts rename to arch/arm/boot/dts/imx28-m28evk.dts diff --git a/arch/arm/boot/dts/tx28.dts b/arch/arm/boot/dts/imx28-tx28.dts similarity index 100% rename from arch/arm/boot/dts/tx28.dts rename to arch/arm/boot/dts/imx28-tx28.dts diff --git a/arch/arm/mach-mxs/Makefile.boot b/arch/arm/mach-mxs/Makefile.boot index 58733cc0726b..4582999cf080 100644 --- a/arch/arm/mach-mxs/Makefile.boot +++ b/arch/arm/mach-mxs/Makefile.boot @@ -1,10 +1,10 @@ zreladdr-y += 0x40008000 -dtb-y += apx4devkit.dtb \ - cfa10036.dtb \ - imx23-evk.dtb \ +dtb-y += imx23-evk.dtb \ imx23-olinuxino.dtb \ + imx23-stmp378x_devb.dtb \ + imx28-apx4devkit.dtb \ + imx28-cfa10036.dtb \ imx28-evk.dtb \ - m28evk.dtb \ - stmp378x_devb.dtb \ - tx28.dtb \ + imx28-m28evk.dtb \ + imx28-tx28.dtb \ From 5da0127093efb47c61e48d0af3d6ef0762aac00b Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Thu, 12 Jul 2012 10:25:27 +0800 Subject: [PATCH 15/15] ARM: dts: imx28-evk: add usb devices - add usb phy devices - add usb controller devices - add usb vbus regulators Signed-off-by: Richard Zhao Tested-by: Subodh Nijsure Signed-off-by: Shawn Guo --- arch/arm/boot/dts/imx28-evk.dts | 38 +++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx28.dtsi | 12 +++++++++-- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts index 0fcc7eae5982..773c0e84d1fb 100644 --- a/arch/arm/boot/dts/imx28-evk.dts +++ b/arch/arm/boot/dts/imx28-evk.dts @@ -60,6 +60,8 @@ 0x31c3 /* MX28_PAD_PWM3__GPIO_3_28 */ 0x31e3 /* MX28_PAD_LCD_RESET__GPIO_3_30 */ 0x3053 /* MX28_PAD_AUART1_TX__GPIO_3_5 */ + 0x3083 /* MX28_PAD_AUART2_RX__GPIO_3_8 */ + 0x3093 /* MX28_PAD_AUART2_TX__GPIO_3_9 */ >; fsl,drive-strength = <0>; fsl,voltage = <1>; @@ -163,10 +165,28 @@ pinctrl-0 = <&auart3_pins_a>; status = "okay"; }; + + usbphy0: usbphy@8007c000 { + status = "okay"; + }; + + usbphy1: usbphy@8007e000 { + status = "okay"; + }; }; }; ahb@80080000 { + usb0: usb@80080000 { + vbus-supply = <®_usb0_vbus>; + status = "okay"; + }; + + usb1: usb@80090000 { + vbus-supply = <®_usb1_vbus>; + status = "okay"; + }; + mac0: ethernet@800f0000 { phy-mode = "rmii"; pinctrl-names = "default"; @@ -211,6 +231,24 @@ regulator-max-microvolt = <3300000>; gpio = <&gpio2 15 0>; }; + + reg_usb0_vbus: usb0_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb0_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio3 9 0>; + enable-active-high; + }; + + reg_usb1_vbus: usb1_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb1_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio3 8 0>; + enable-active-high; + }; }; sound { diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index e906ec12046c..915db89e3644 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -728,11 +728,13 @@ }; usbphy0: usbphy@8007c000 { + compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy"; reg = <0x8007c000 0x2000>; status = "disabled"; }; usbphy1: usbphy@8007e000 { + compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy"; reg = <0x8007e000 0x2000>; status = "disabled"; }; @@ -746,13 +748,19 @@ reg = <0x80080000 0x80000>; ranges; - usbctrl0: usbctrl@80080000 { + usb0: usb@80080000 { + compatible = "fsl,imx28-usb", "fsl,imx27-usb"; reg = <0x80080000 0x10000>; + interrupts = <93>; + fsl,usbphy = <&usbphy0>; status = "disabled"; }; - usbctrl1: usbctrl@80090000 { + usb1: usb@80090000 { + compatible = "fsl,imx28-usb", "fsl,imx27-usb"; reg = <0x80090000 0x10000>; + interrupts = <92>; + fsl,usbphy = <&usbphy1>; status = "disabled"; };