All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Convert mxs board files to device tree
@ 2012-07-09  6:14 Shawn Guo
  2012-07-09  6:14 ` [PATCH 1/7] ARM: dts: imx28: move extra gpmi-nand pins into board dts Shawn Guo
                   ` (9 more replies)
  0 siblings, 10 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  6:14 UTC (permalink / raw)
  To: linux-arm-kernel

With imx23-evk and imx28-evk converted to device tree, it's time to
start looking at other mxs boards.

Marek, Lauri and Lothar,

Please do me the favor to test the series on your boards to see if it
provides the same functionality as the board file.  You can just use
the branch below.

  git://git.linaro.org/people/shawnguo/linux-2.6.git mxs/dt/others

Thanks,
Shawn

Marek Vasut (1):
  ARM: mxs: convert m28evk board to device tree

Shawn Guo (6):
  ARM: dts: imx28: move extra gpmi-nand pins into board dts
  ARM: dts: imx28: move lcdif control pins into board dts
  ARM: mxs: convert apx4devkit board to device tree
  ARM: mxs: convert tx28 board to device tree
  ARM: mxs: convert stmp378x_devb board to device tree
  ARM: mxs: add dtb-y target into Makefile.boot

 arch/arm/boot/dts/apx4devkit.dts    |  143 +++++++++++++++++++++
 arch/arm/boot/dts/imx28-evk.dts     |   30 ++++-
 arch/arm/boot/dts/imx28.dtsi        |   96 +++++++++++++-
 arch/arm/boot/dts/m28evk.dts        |  241 +++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/stmp378x_devb.dts |   78 +++++++++++
 arch/arm/boot/dts/tx28.dts          |  112 ++++++++++++++++
 arch/arm/mach-mxs/Makefile.boot     |    9 ++
 arch/arm/mach-mxs/mach-mxs.c        |  102 +++++++++++++++-
 8 files changed, 802 insertions(+), 9 deletions(-)
 create mode 100644 arch/arm/boot/dts/apx4devkit.dts
 create mode 100644 arch/arm/boot/dts/m28evk.dts
 create mode 100644 arch/arm/boot/dts/stmp378x_devb.dts
 create mode 100644 arch/arm/boot/dts/tx28.dts

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 1/7] ARM: dts: imx28: move extra gpmi-nand pins into board dts
  2012-07-09  6:14 [PATCH 0/7] Convert mxs board files to device tree Shawn Guo
@ 2012-07-09  6:14 ` Shawn Guo
  2012-07-09  6:14 ` [PATCH 2/7] ARM: dts: imx28: move lcdif control " Shawn Guo
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  6:14 UTC (permalink / raw)
  To: linux-arm-kernel

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 <shawn.guo@linaro.org>
---
 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 0d8739d..0444964 100644
--- a/arch/arm/boot/dts/imx28-evk.dts
+++ b/arch/arm/boot/dts/imx28-evk.dts
@@ -24,7 +24,8 @@
 		apbh at 80000000 {
 			gpmi-nand at 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 at 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 at 80030000 {
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index adb5ffc..2874adc 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 */
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 2/7] ARM: dts: imx28: move lcdif control pins into board dts
  2012-07-09  6:14 [PATCH 0/7] Convert mxs board files to device tree Shawn Guo
  2012-07-09  6:14 ` [PATCH 1/7] ARM: dts: imx28: move extra gpmi-nand pins into board dts Shawn Guo
@ 2012-07-09  6:14 ` Shawn Guo
  2012-07-09  6:14 ` [PATCH 3/7] ARM: mxs: convert m28evk board to device tree Shawn Guo
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  6:14 UTC (permalink / raw)
  To: linux-arm-kernel

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 <shawn.guo@linaro.org>
---
 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 0444964..0fcc7ea 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 at 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 at 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 2874adc..02e778b 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>;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  6:14 [PATCH 0/7] Convert mxs board files to device tree Shawn Guo
  2012-07-09  6:14 ` [PATCH 1/7] ARM: dts: imx28: move extra gpmi-nand pins into board dts Shawn Guo
  2012-07-09  6:14 ` [PATCH 2/7] ARM: dts: imx28: move lcdif control " Shawn Guo
@ 2012-07-09  6:14 ` Shawn Guo
  2012-07-09  7:10   ` Marek Vasut
  2012-07-09  6:14 ` [PATCH 4/7] ARM: mxs: convert apx4devkit " Shawn Guo
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  6:14 UTC (permalink / raw)
  To: linux-arm-kernel

From: Marek Vasut <marex@denx.de>

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm/boot/dts/imx28.dtsi |   21 ++++
 arch/arm/boot/dts/m28evk.dts |  241 ++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mxs/mach-mxs.c |   30 +++++
 3 files changed, 292 insertions(+), 0 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 02e778b..3390607 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 at 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 at 0 {
 					reg = <0>;
 					fsl,pinmux-ids = <
@@ -373,6 +384,16 @@
 					fsl,pull-up = <0>;
 				};
 
+				pwm3_pins_a: pwm3 at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						0x31c0 /* MX28_PAD_PWM3__PWM_3 */
+					>;
+					fsl,drive-strength = <0>;
+					fsl,voltage = <1>;
+					fsl,pull-up = <0>;
+				};
+
 				lcdif_24bit_pins_a: lcdif-24bit at 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 0000000..0c22792
--- /dev/null
+++ b/arch/arm/boot/dts/m28evk.dts
@@ -0,0 +1,241 @@
+/*
+ * Copyright (C) 2012 Marek Vasut <marex@denx.de>
+ *
+ * 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 at 80000000 {
+		apbh at 80000000 {
+			gpmi-nand at 8000c000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
+				status = "okay";
+
+				partition at 0 {
+					label = "bootloader";
+					reg = <0x00000000 0x00300000>;
+					read-only;
+				};
+
+				partition at 1 {
+					label = "environment";
+					reg = <0x00300000 0x00080000>;
+				};
+
+				partition at 2 {
+					label = "redundant-environment";
+					reg = <0x00380000 0x00080000>;
+				};
+
+				partition at 3 {
+					label = "kernel";
+					reg = <0x00400000 0x00400000>;
+				};
+
+				partition at 4 {
+					label = "filesystem";
+					reg = <0x00800000 0x0f800000>;
+				};
+			};
+
+			ssp0: ssp at 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 at 80018000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&hog_pins_a>;
+
+				hog_pins_a: hog-gpios at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						0x30a3 /* MX28_PAD_AUART2_CTS__GPIO_3_10 */
+						0x30b3 /* MX28_PAD_AUART2_RTS__GPIO_3_11 */
+						0x3103 /* MX28_PAD_PWM0__GPIO_3_16 */
+						0x3113 /* MX28_PAD_PWM1__GPIO_3_17 */
+					>;
+					fsl,drive-strength = <0>;
+					fsl,voltage = <1>;
+					fsl,pull-up = <0>;
+				};
+
+				lcdif_pins_m28: lcdif-m28 at 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 at 80030000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&lcdif_24bit_pins_a
+					     &lcdif_pins_m28>;
+				status = "okay";
+			};
+
+			can0: can at 80032000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&can0_pins_a>;
+				status = "okay";
+			};
+
+			can1: can at 80034000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&can1_pins_a>;
+				status = "okay";
+			};
+		};
+
+		apbx at 80040000 {
+			saif0: saif at 80042000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&saif0_pins_a>;
+				status = "okay";
+			};
+
+			saif1: saif at 80046000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&saif1_pins_a>;
+				fsl,saif-master = <&saif0>;
+				status = "okay";
+			};
+
+			i2c0: i2c at 80058000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&i2c0_pins_a>;
+				status = "okay";
+
+				sgtl5000: codec at 0a {
+					compatible = "fsl,sgtl5000";
+					reg = <0x0a>;
+					VDDA-supply = <&reg_3p3v>;
+					VDDIO-supply = <&reg_3p3v>;
+
+				};
+
+				eeprom: eeprom at 51 {
+					compatible = "atmel,24c128";
+					reg = <0x51>;
+					pagesize = <32>;
+				};
+
+				rtc: rtc at 68 {
+					compatible = "stm,mt41t62";
+					reg = <0x68>;
+				};
+			};
+
+			pwm: pwm at 80064000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pwm3_pins_a>;
+				status = "okay";
+			};
+
+			duart: serial at 80074000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&duart_pins_a>;
+				status = "okay";
+			};
+
+			auart0: serial at 8006a000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart0_2pins_a>;
+				status = "okay";
+			};
+
+			auart3: serial at 80070000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart3_pins_a>;
+				status = "okay";
+			};
+		};
+	};
+
+	ahb at 80080000 {
+		mac0: ethernet at 800f0000 {
+			phy-mode = "rmii";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mac0_pins_a>;
+			phy-reset-gpios = <&gpio3 11 0>;
+			status = "okay";
+		};
+
+		mac1: ethernet at 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 = "fsl,imx28-evk-sgtl5000",
+			     "fsl,mxs-audio-sgtl5000";
+		model = "imx28-evk-sgtl5000";
+		saif-controllers = <&saif0 &saif1>;
+		audio-codec = <&sgtl5000>;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		user1 {
+			label = "Heartbeat1";
+			gpios = <&gpio3 16 0>;
+			linux,default-trigger = "heartbeat";
+		};
+
+		user2 {
+			label = "Heartbeat2";
+			gpios = <&gpio3 17 0>;
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pwm 3 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 7bbb961..6bb6db8 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 = {
@@ -203,12 +220,24 @@ static void __init imx28_evk_init(void)
 	mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
 }
 
+static void __init m28evk_init(void)
+{
+	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 +252,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,
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 4/7] ARM: mxs: convert apx4devkit board to device tree
  2012-07-09  6:14 [PATCH 0/7] Convert mxs board files to device tree Shawn Guo
                   ` (2 preceding siblings ...)
  2012-07-09  6:14 ` [PATCH 3/7] ARM: mxs: convert m28evk board to device tree Shawn Guo
@ 2012-07-09  6:14 ` Shawn Guo
  2012-07-09 15:15   ` Lauri Hintsala
  2012-07-09  6:14 ` [PATCH 5/7] ARM: mxs: convert tx28 " Shawn Guo
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  6:14 UTC (permalink / raw)
  To: linux-arm-kernel

Cc: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm/boot/dts/apx4devkit.dts |  143 ++++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/imx28.dtsi     |   33 +++++++++
 arch/arm/mach-mxs/mach-mxs.c     |   23 ++++++
 3 files changed, 199 insertions(+), 0 deletions(-)
 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 0000000..a670a90
--- /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 at 80000000 {
+		apbh at 80000000 {
+			ssp0: ssp at 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 at 80018000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&hog_pins_a>;
+
+				hog_pins_a: hog-gpios at 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 at 80040000 {
+			saif0: saif at 80042000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&saif0_pins_a>;
+				status = "okay";
+			};
+
+			saif1: saif at 80046000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&saif1_pins_a>;
+				fsl,saif-master = <&saif0>;
+				status = "okay";
+			};
+
+			i2c0: i2c at 80058000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&i2c0_pins_a>;
+				status = "okay";
+
+				sgtl5000: codec at 0a {
+					compatible = "fsl,sgtl5000";
+					reg = <0x0a>;
+					VDDA-supply = <&reg_3p3v>;
+					VDDIO-supply = <&reg_3p3v>;
+
+				};
+
+				pcf8563: rtc at 51 {
+					compatible = "phg,pcf8563";
+					reg = <0x51>;
+				};
+			};
+
+			duart: serial at 80074000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&duart_pins_a>;
+				status = "okay";
+			};
+
+			auart0: serial at 8006a000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart0_pins_a>;
+				status = "okay";
+			};
+
+			auart1: serial at 8006c000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart1_2pins_a>;
+				status = "okay";
+			};
+
+			auart2: serial at 8006e000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart2_2pins_a>;
+				status = "okay";
+			};
+
+			auart3: serial at 80070000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart3_2pins_a>;
+				status = "okay";
+			};
+		};
+	};
+
+	ahb at 80080000 {
+		mac0: ethernet at 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 = "fsl,imx28-evk-sgtl5000",
+			     "fsl,mxs-audio-sgtl5000";
+		model = "imx28-evk-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 3390607..73578cb 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 at 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 at 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 at 0 {
 					reg = <0>;
 					fsl,pinmux-ids = <
@@ -256,6 +278,17 @@
 					fsl,pull-up = <0>;
 				};
 
+				auart3_2pins_a: auart3-2pins at 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 at 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 6bb6db8..646bac5 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>
@@ -230,6 +232,24 @@ 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)
+{
+	struct clk *clk = clk_get_sys("enet_out", NULL);
+
+	if (!IS_ERR(clk))
+		clk_prepare_enable(clk);
+
+	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"))
@@ -238,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);
@@ -251,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",
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-09  6:14 [PATCH 0/7] Convert mxs board files to device tree Shawn Guo
                   ` (3 preceding siblings ...)
  2012-07-09  6:14 ` [PATCH 4/7] ARM: mxs: convert apx4devkit " Shawn Guo
@ 2012-07-09  6:14 ` Shawn Guo
  2012-07-09 13:04   ` Lothar Waßmann
  2012-07-09  6:14 ` [PATCH 6/7] ARM: mxs: convert stmp378x_devb " Shawn Guo
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  6:14 UTC (permalink / raw)
  To: linux-arm-kernel

The function tx28_init is basically a rewriting of tx28_add_fec0.  All
those TX28_FEC_* gpio definitions are meant to be used as a temporary
solution before we get a generic way to set up board specific gpio
pins when booting from device tree.

Cc: Lothar Wa?mann <LW@KARO-electronics.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm/boot/dts/imx28.dtsi |   36 +++++++++++++
 arch/arm/boot/dts/tx28.dts   |  112 ++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mxs/mach-mxs.c |   48 +++++++++++++++++-
 3 files changed, 195 insertions(+), 1 deletions(-)
 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 73578cb..518236b 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 at 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 at 0 {
 					reg = <0>;
 					fsl,pinmux-ids = <
@@ -243,6 +256,19 @@
 					fsl,pull-up = <0>;
 				};
 
+				auart1_pins_a: auart1 at 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 at 0 {
 					reg = <0>;
 					fsl,pinmux-ids = <
@@ -407,6 +433,16 @@
 					fsl,pull-up = <1>;
 				};
 
+				pwm0_pins_a: pwm0 at 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 at 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 0000000..2737c79
--- /dev/null
+++ b/arch/arm/boot/dts/tx28.dts
@@ -0,0 +1,112 @@
+/dts-v1/;
+/include/ "imx28.dtsi"
+
+/ {
+	model = "Ka-Ro electronics TX28 module";
+	compatible = "karo,tx28", "fsl,imx28";
+
+	memory {
+		reg = <0x40000000 0x08000000>;
+	};
+
+	apb at 80000000 {
+		apbh at 80000000 {
+			ssp0: ssp at 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 at 80018000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&hog_pins_a>;
+
+				hog_pins_a: hog-gpios at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						0x31d3 /* MX28_PAD_PWM4__GPIO_3_29 */
+						0x4053 /* MX28_PAD_ENET0_TX_CLK__GPIO_4_5 */
+						0x40a3 /* MX28_PAD_ENET0_RXD3__GPIO_4_10 */
+						0x40d3 /* MX28_PAD_ENET0_RX_CLK__GPIO_4_13 */
+					>;
+					fsl,drive-strength = <0>;
+					fsl,voltage = <1>;
+					fsl,pull-up = <0>;
+				};
+
+				hog_pins_b: hog-gpios-pull at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						0x4023 /* MX28_PAD_ENET0_RX_EN__GPIO_4_2 */
+						0x4033 /* MX28_PAD_ENET0_RXD0__GPIO_4_3 */
+						0x4043 /* MX28_PAD_ENET0_RXD1__GPIO_4_4 */
+					>;
+					fsl,drive-strength = <0>;
+					fsl,voltage = <1>;
+					fsl,pull-up = <1>;
+				};
+			};
+		};
+
+		apbx at 80040000 {
+			i2c0: i2c at 80058000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&i2c0_pins_a>;
+				status = "okay";
+
+				ds1339: rtc at 68 {
+					compatible = "mxim,ds1339";
+					reg = <0x68>;
+				};
+			};
+
+			pwm: pwm at 80064000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pwm0_pins_a>;
+				status = "okay";
+			};
+
+			duart: serial at 80074000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&duart_4pins_a>;
+				status = "okay";
+			};
+
+			auart1: serial at 8006c000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart1_pins_a>;
+				status = "okay";
+			};
+		};
+	};
+
+	ahb at 80080000 {
+		mac0: ethernet at 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 646bac5..e081666 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -12,8 +12,9 @@
 
 #include <linux/clk.h>
 #include <linux/clkdev.h>
+#include <linux/delay.h>
 #include <linux/err.h>
-#include <linux/init.h>
+#include <linux/gpio.h>
 #include <linux/init.h>
 #include <linux/irqdomain.h>
 #include <linux/micrel_phy.h>
@@ -24,6 +25,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include <mach/common.h>
+#include <mach/mxs.h>
 
 static struct fb_videomode mx23evk_video_modes[] = {
 	{
@@ -250,6 +252,47 @@ static void __init apx4devkit_init(void)
 					   apx4devkit_phy_fixup);
 }
 
+#define TX28_FEC_PHY_POWER	MXS_GPIO_NR(3, 29)
+#define TX28_FEC_PHY_RESET	MXS_GPIO_NR(4, 13)
+#define TX28_FEC_MODE_1		MXS_GPIO_NR(4, 2)
+#define TX28_FEC_MODE_2		MXS_GPIO_NR(4, 3)
+#define TX28_FEC_MODE_3		MXS_GPIO_NR(4, 4)
+#define TX28_FEC_nINT		MXS_GPIO_NR(4, 5)
+
+static const struct gpio tx28_gpios[] __initconst = {
+	{ TX28_FEC_PHY_POWER, GPIOF_OUT_INIT_LOW, "fec-phy-power" },
+	{ TX28_FEC_PHY_RESET, GPIOF_OUT_INIT_LOW, "fec-phy-reset" },
+	{ TX28_FEC_MODE_1, GPIOF_OUT_INIT_LOW, "fec-mode-1" },
+	{ TX28_FEC_MODE_2, GPIOF_OUT_INIT_LOW, "fec-mode-2" },
+	{ TX28_FEC_MODE_3, GPIOF_OUT_INIT_LOW, "fec-mode-3" },
+	{ TX28_FEC_nINT, GPIOF_DIR_IN, "fec-int" },
+};
+
+static void __init tx28_init(void)
+{
+	int ret;
+
+	ret = gpio_request_array(tx28_gpios, ARRAY_SIZE(tx28_gpios));
+	if (ret) {
+		pr_err("%s: failed to request gpios: %d\n", __func__, ret);
+		return;
+	}
+
+	/* Power up fec phy */
+	gpio_set_value(TX28_FEC_PHY_POWER, 1);
+	mdelay(26); /* 25ms according to data sheet */
+
+	/* Mode strap pins */
+	gpio_set_value(TX28_FEC_MODE_1, 1);
+	gpio_set_value(TX28_FEC_MODE_2, 1);
+	gpio_set_value(TX28_FEC_MODE_3, 1);
+
+	udelay(100); /* minimum assertion time for nRST */
+
+	/* Deasserting FEC PHY RESET */
+	gpio_set_value(TX28_FEC_PHY_RESET, 1);
+}
+
 static void __init mxs_machine_init(void)
 {
 	if (of_machine_is_compatible("fsl,imx28-evk"))
@@ -260,6 +303,8 @@ static void __init mxs_machine_init(void)
 		m28evk_init();
 	else if (of_machine_is_compatible("bluegiga,apx4devkit"))
 		apx4devkit_init();
+	else if (of_machine_is_compatible("karo,tx28"))
+		tx28_init();
 
 	of_platform_populate(NULL, of_default_bus_match_table,
 			     mxs_auxdata_lookup, NULL);
@@ -277,6 +322,7 @@ static const char *imx28_dt_compat[] __initdata = {
 	"crystalfontz,cfa10036",
 	"denx,m28evk",
 	"fsl,imx28-evk",
+	"karo,tx28",
 	"fsl,imx28",
 	NULL,
 };
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 6/7] ARM: mxs: convert stmp378x_devb board to device tree
  2012-07-09  6:14 [PATCH 0/7] Convert mxs board files to device tree Shawn Guo
                   ` (4 preceding siblings ...)
  2012-07-09  6:14 ` [PATCH 5/7] ARM: mxs: convert tx28 " Shawn Guo
@ 2012-07-09  6:14 ` Shawn Guo
  2012-07-09  6:14 ` [PATCH 7/7] ARM: mxs: add dtb-y target into Makefile.boot Shawn Guo
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  6:14 UTC (permalink / raw)
  To: linux-arm-kernel

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 <shawn.guo@linaro.org>
---
 arch/arm/boot/dts/stmp378x_devb.dts |   78 +++++++++++++++++++++++++++++++++++
 arch/arm/mach-mxs/mach-mxs.c        |    1 +
 2 files changed, 79 insertions(+), 0 deletions(-)
 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 0000000..757a327
--- /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 at 80000000 {
+		apbh at 80000000 {
+			ssp0: ssp at 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 = <&reg_vddio_sd0>;
+				status = "okay";
+			};
+
+			pinctrl at 80018000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&hog_pins_a>;
+
+				hog_pins_a: hog-gpios at 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 at 80040000 {
+			auart0: serial at 8006c000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart0_pins_a>;
+				status = "okay";
+			};
+
+			duart: serial at 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 e081666..f7300fc 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -312,6 +312,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,
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 7/7] ARM: mxs: add dtb-y target into Makefile.boot
  2012-07-09  6:14 [PATCH 0/7] Convert mxs board files to device tree Shawn Guo
                   ` (5 preceding siblings ...)
  2012-07-09  6:14 ` [PATCH 6/7] ARM: mxs: convert stmp378x_devb " Shawn Guo
@ 2012-07-09  6:14 ` Shawn Guo
  2012-07-09  7:04 ` [PATCH 0/7] Convert mxs board files to device tree Marek Vasut
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  6:14 UTC (permalink / raw)
  To: linux-arm-kernel

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 <board>.dts when imx28.dtsi changes.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm/mach-mxs/Makefile.boot |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mxs/Makefile.boot b/arch/arm/mach-mxs/Makefile.boot
index 07b11fe..58733cc 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 \
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 0/7] Convert mxs board files to device tree
  2012-07-09  6:14 [PATCH 0/7] Convert mxs board files to device tree Shawn Guo
                   ` (6 preceding siblings ...)
  2012-07-09  6:14 ` [PATCH 7/7] ARM: mxs: add dtb-y target into Makefile.boot Shawn Guo
@ 2012-07-09  7:04 ` Marek Vasut
  2012-07-09  7:13   ` Shawn Guo
  2012-07-09  8:06 ` [PATCH 3/7] ARM: mxs: convert m28evk board " Shawn Guo
  2012-07-09  8:07 ` [PATCH 6/7] ARM: mxs: convert stmp378x_devb " Shawn Guo
  9 siblings, 1 reply; 43+ messages in thread
From: Marek Vasut @ 2012-07-09  7:04 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Shawn Guo,

> With imx23-evk and imx28-evk converted to device tree, it's time to
> start looking at other mxs boards.
> 
> Marek, Lauri and Lothar,
> 
> Please do me the favor to test the series on your boards to see if it
> provides the same functionality as the board file.  You can just use
> the branch below.

I can send you updated file, but it contains some additional cruft -- especially 
the SPI and i2c stuff. But then, I guess it just won't be probed, right ?

>   git://git.linaro.org/people/shawnguo/linux-2.6.git mxs/dt/others
> 
> Thanks,
> Shawn
> 
> Marek Vasut (1):
>   ARM: mxs: convert m28evk board to device tree
> 
> Shawn Guo (6):
>   ARM: dts: imx28: move extra gpmi-nand pins into board dts
>   ARM: dts: imx28: move lcdif control pins into board dts
>   ARM: mxs: convert apx4devkit board to device tree
>   ARM: mxs: convert tx28 board to device tree
>   ARM: mxs: convert stmp378x_devb board to device tree
>   ARM: mxs: add dtb-y target into Makefile.boot
> 
>  arch/arm/boot/dts/apx4devkit.dts    |  143 +++++++++++++++++++++
>  arch/arm/boot/dts/imx28-evk.dts     |   30 ++++-
>  arch/arm/boot/dts/imx28.dtsi        |   96 +++++++++++++-
>  arch/arm/boot/dts/m28evk.dts        |  241
> +++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/stmp378x_devb.dts | 
>  78 +++++++++++
>  arch/arm/boot/dts/tx28.dts          |  112 ++++++++++++++++
>  arch/arm/mach-mxs/Makefile.boot     |    9 ++
>  arch/arm/mach-mxs/mach-mxs.c        |  102 +++++++++++++++-
>  8 files changed, 802 insertions(+), 9 deletions(-)
>  create mode 100644 arch/arm/boot/dts/apx4devkit.dts
>  create mode 100644 arch/arm/boot/dts/m28evk.dts
>  create mode 100644 arch/arm/boot/dts/stmp378x_devb.dts
>  create mode 100644 arch/arm/boot/dts/tx28.dts

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  6:14 ` [PATCH 3/7] ARM: mxs: convert m28evk board to device tree Shawn Guo
@ 2012-07-09  7:10   ` Marek Vasut
  2012-07-09  7:27     ` Shawn Guo
  0 siblings, 1 reply; 43+ messages in thread
From: Marek Vasut @ 2012-07-09  7:10 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Shawn Guo,

> From: Marek Vasut <marex@denx.de>
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  arch/arm/boot/dts/imx28.dtsi |   21 ++++
>  arch/arm/boot/dts/m28evk.dts |  241
> ++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 
>  30 +++++
>  3 files changed, 292 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/boot/dts/m28evk.dts
[...]

> +static void __init m28evk_init(void)
> +{
> +	update_fec_mac_prop(OUI_DENX);

You need to start the FEC clock here too, otherwise ethernet won't work. Same 
thing as on mx28evk. And I noticed that on other platforms too, so maybe that 
should be somehow the other way around -- turn on the ethernet clock by default.

The rest seems OK. I'll update the .dts file once we get the rest of the stuff 
in (SPI and i2c).

btw. is someone converting the mxs-lcd ?

> +	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 +252,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,

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 0/7] Convert mxs board files to device tree
  2012-07-09  7:04 ` [PATCH 0/7] Convert mxs board files to device tree Marek Vasut
@ 2012-07-09  7:13   ` Shawn Guo
  2012-07-09  7:33     ` Marek Vasut
  0 siblings, 1 reply; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  7:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 09, 2012 at 09:04:52AM +0200, Marek Vasut wrote:
> I can send you updated file, but it contains some additional cruft -- especially 
> the SPI and i2c stuff. But then, I guess it just won't be probed, right ?
> 
Yes.  That should not be a problem.  But we need to make sure the
bindings will stay unchanged till hitting the mainline.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  7:10   ` Marek Vasut
@ 2012-07-09  7:27     ` Shawn Guo
  2012-07-09  7:32       ` Marek Vasut
  0 siblings, 1 reply; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  7:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 09, 2012 at 09:10:54AM +0200, Marek Vasut wrote:
> Dear Shawn Guo,
> 
> > From: Marek Vasut <marex@denx.de>
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > ---
> >  arch/arm/boot/dts/imx28.dtsi |   21 ++++
> >  arch/arm/boot/dts/m28evk.dts |  241
> > ++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 
> >  30 +++++
> >  3 files changed, 292 insertions(+), 0 deletions(-)
> >  create mode 100644 arch/arm/boot/dts/m28evk.dts
> [...]
> 
> > +static void __init m28evk_init(void)
> > +{
> > +	update_fec_mac_prop(OUI_DENX);
> 
> You need to start the FEC clock here too, otherwise ethernet won't work. Same 

Which clock? "enet_out"?  We enabled it for imx28-evk, but
I do not know m28evk also needs it, as I haven't seen mach-m28evk.c
enabling any fec clock.  Instead, I saw the following in the old clock
code.

        /*
         * Extra fec clock setting
         * The DENX M28 uses an external clock source
         * and the clock output must not be enabled
         */
        if (!machine_is_m28evk()) {
                reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET);
                reg &= ~BM_CLKCTRL_ENET_SLEEP;
                reg |= BM_CLKCTRL_ENET_CLK_OUT_EN;
                __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET);
        }

Or you meant other fec clock?

> thing as on mx28evk. And I noticed that on other platforms too, so maybe that 
> should be somehow the other way around -- turn on the ethernet clock by default.
> 
> The rest seems OK. I'll update the .dts file once we get the rest of the stuff 
> in (SPI and i2c).
> 
> btw. is someone converting the mxs-lcd ?
> 
The lcd should be working right now, with the auxdata used.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  7:27     ` Shawn Guo
@ 2012-07-09  7:32       ` Marek Vasut
  2012-07-09  7:42         ` Shawn Guo
  0 siblings, 1 reply; 43+ messages in thread
From: Marek Vasut @ 2012-07-09  7:32 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Shawn Guo,

> On Mon, Jul 09, 2012 at 09:10:54AM +0200, Marek Vasut wrote:
> > Dear Shawn Guo,
> > 
> > > From: Marek Vasut <marex@denx.de>
> > > 
> > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > ---
> > > 
> > >  arch/arm/boot/dts/imx28.dtsi |   21 ++++
> > >  arch/arm/boot/dts/m28evk.dts |  241
> > > 
> > > ++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c
> > > |
> > > 
> > >  30 +++++
> > >  3 files changed, 292 insertions(+), 0 deletions(-)
> > >  create mode 100644 arch/arm/boot/dts/m28evk.dts
> > 
> > [...]
> > 
> > > +static void __init m28evk_init(void)
> > > +{
> > > +	update_fec_mac_prop(OUI_DENX);
> > 
> > You need to start the FEC clock here too, otherwise ethernet won't work.
> > Same
> 
> Which clock? "enet_out"?  We enabled it for imx28-evk, but
> I do not know m28evk also needs it, as I haven't seen mach-m28evk.c
> enabling any fec clock.  Instead, I saw the following in the old clock
> code.

Well, this for the old revision of the board.

>         /*
>          * Extra fec clock setting
>          * The DENX M28 uses an external clock source
>          * and the clock output must not be enabled
>          */
>         if (!machine_is_m28evk()) {
>                 reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET);
>                 reg &= ~BM_CLKCTRL_ENET_SLEEP;
>                 reg |= BM_CLKCTRL_ENET_CLK_OUT_EN;
>                 __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET);
>         }
> 
> Or you meant other fec clock?

I mean these enet_out clock, they need to be enabled.

> > thing as on mx28evk. And I noticed that on other platforms too, so maybe
> > that should be somehow the other way around -- turn on the ethernet
> > clock by default.
> > 
> > The rest seems OK. I'll update the .dts file once we get the rest of the
> > stuff in (SPI and i2c).
> > 
> > btw. is someone converting the mxs-lcd ?
> 
> The lcd should be working right now, with the auxdata used.

Sure, but is someone working on the DT variant?

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 0/7] Convert mxs board files to device tree
  2012-07-09  7:13   ` Shawn Guo
@ 2012-07-09  7:33     ` Marek Vasut
  2012-07-09  7:33       ` Marek Vasut
  0 siblings, 1 reply; 43+ messages in thread
From: Marek Vasut @ 2012-07-09  7:33 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Shawn Guo,

> On Mon, Jul 09, 2012 at 09:04:52AM +0200, Marek Vasut wrote:
> > I can send you updated file, but it contains some additional cruft --
> > especially the SPI and i2c stuff. But then, I guess it just won't be
> > probed, right ?
> 
> Yes.  That should not be a problem.  But we need to make sure the
> bindings will stay unchanged till hitting the mainline.

Correct, so merge this and I'll update it when it's in place.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 0/7] Convert mxs board files to device tree
  2012-07-09  7:33     ` Marek Vasut
@ 2012-07-09  7:33       ` Marek Vasut
  0 siblings, 0 replies; 43+ messages in thread
From: Marek Vasut @ 2012-07-09  7:33 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Marek Vasut,

> Dear Shawn Guo,
> 
> > On Mon, Jul 09, 2012 at 09:04:52AM +0200, Marek Vasut wrote:
> > > I can send you updated file, but it contains some additional cruft --
> > > especially the SPI and i2c stuff. But then, I guess it just won't be
> > > probed, right ?
> > 
> > Yes.  That should not be a problem.  But we need to make sure the
> > bindings will stay unchanged till hitting the mainline.
> 
> Correct, so merge this and I'll update it when it's in place.

And enable enet_out

> Best regards,
> Marek Vasut

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  7:32       ` Marek Vasut
@ 2012-07-09  7:42         ` Shawn Guo
  0 siblings, 0 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  7:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 09, 2012 at 09:32:54AM +0200, Marek Vasut wrote:
> I mean these enet_out clock, they need to be enabled.
> 
Okay.

> Sure, but is someone working on the DT variant?
> 
With this series, you can try mxsfb with DT on m28evk board.  Let me
know if it's not working.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  6:14 [PATCH 0/7] Convert mxs board files to device tree Shawn Guo
                   ` (7 preceding siblings ...)
  2012-07-09  7:04 ` [PATCH 0/7] Convert mxs board files to device tree Marek Vasut
@ 2012-07-09  8:06 ` Shawn Guo
  2012-07-09  8:18   ` Marek Vasut
  2012-07-09  8:07 ` [PATCH 6/7] ARM: mxs: convert stmp378x_devb " Shawn Guo
  9 siblings, 1 reply; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  8:06 UTC (permalink / raw)
  To: linux-arm-kernel

From: Marek Vasut <marex@denx.de>

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm/boot/dts/imx28.dtsi |   21 ++++
 arch/arm/boot/dts/m28evk.dts |  241 ++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mxs/mach-mxs.c |   30 +++++
 3 files changed, 292 insertions(+), 0 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 02e778b..3390607 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 at 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 at 0 {
 					reg = <0>;
 					fsl,pinmux-ids = <
@@ -373,6 +384,16 @@
 					fsl,pull-up = <0>;
 				};
 
+				pwm3_pins_a: pwm3 at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						0x31c0 /* MX28_PAD_PWM3__PWM_3 */
+					>;
+					fsl,drive-strength = <0>;
+					fsl,voltage = <1>;
+					fsl,pull-up = <0>;
+				};
+
 				lcdif_24bit_pins_a: lcdif-24bit at 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 0000000..0c22792
--- /dev/null
+++ b/arch/arm/boot/dts/m28evk.dts
@@ -0,0 +1,241 @@
+/*
+ * Copyright (C) 2012 Marek Vasut <marex@denx.de>
+ *
+ * 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 at 80000000 {
+		apbh at 80000000 {
+			gpmi-nand at 8000c000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
+				status = "okay";
+
+				partition at 0 {
+					label = "bootloader";
+					reg = <0x00000000 0x00300000>;
+					read-only;
+				};
+
+				partition at 1 {
+					label = "environment";
+					reg = <0x00300000 0x00080000>;
+				};
+
+				partition at 2 {
+					label = "redundant-environment";
+					reg = <0x00380000 0x00080000>;
+				};
+
+				partition at 3 {
+					label = "kernel";
+					reg = <0x00400000 0x00400000>;
+				};
+
+				partition at 4 {
+					label = "filesystem";
+					reg = <0x00800000 0x0f800000>;
+				};
+			};
+
+			ssp0: ssp at 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 at 80018000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&hog_pins_a>;
+
+				hog_pins_a: hog-gpios at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <
+						0x30a3 /* MX28_PAD_AUART2_CTS__GPIO_3_10 */
+						0x30b3 /* MX28_PAD_AUART2_RTS__GPIO_3_11 */
+						0x3103 /* MX28_PAD_PWM0__GPIO_3_16 */
+						0x3113 /* MX28_PAD_PWM1__GPIO_3_17 */
+					>;
+					fsl,drive-strength = <0>;
+					fsl,voltage = <1>;
+					fsl,pull-up = <0>;
+				};
+
+				lcdif_pins_m28: lcdif-m28 at 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 at 80030000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&lcdif_24bit_pins_a
+					     &lcdif_pins_m28>;
+				status = "okay";
+			};
+
+			can0: can at 80032000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&can0_pins_a>;
+				status = "okay";
+			};
+
+			can1: can at 80034000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&can1_pins_a>;
+				status = "okay";
+			};
+		};
+
+		apbx at 80040000 {
+			saif0: saif at 80042000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&saif0_pins_a>;
+				status = "okay";
+			};
+
+			saif1: saif at 80046000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&saif1_pins_a>;
+				fsl,saif-master = <&saif0>;
+				status = "okay";
+			};
+
+			i2c0: i2c at 80058000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&i2c0_pins_a>;
+				status = "okay";
+
+				sgtl5000: codec at 0a {
+					compatible = "fsl,sgtl5000";
+					reg = <0x0a>;
+					VDDA-supply = <&reg_3p3v>;
+					VDDIO-supply = <&reg_3p3v>;
+
+				};
+
+				eeprom: eeprom at 51 {
+					compatible = "atmel,24c128";
+					reg = <0x51>;
+					pagesize = <32>;
+				};
+
+				rtc: rtc at 68 {
+					compatible = "stm,mt41t62";
+					reg = <0x68>;
+				};
+			};
+
+			pwm: pwm at 80064000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&pwm3_pins_a>;
+				status = "okay";
+			};
+
+			duart: serial at 80074000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&duart_pins_a>;
+				status = "okay";
+			};
+
+			auart0: serial at 8006a000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart0_2pins_a>;
+				status = "okay";
+			};
+
+			auart3: serial at 80070000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart3_pins_a>;
+				status = "okay";
+			};
+		};
+	};
+
+	ahb at 80080000 {
+		mac0: ethernet at 800f0000 {
+			phy-mode = "rmii";
+			pinctrl-names = "default";
+			pinctrl-0 = <&mac0_pins_a>;
+			phy-reset-gpios = <&gpio3 11 0>;
+			status = "okay";
+		};
+
+		mac1: ethernet at 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 = "fsl,imx28-evk-sgtl5000",
+			     "fsl,mxs-audio-sgtl5000";
+		model = "imx28-evk-sgtl5000";
+		saif-controllers = <&saif0 &saif1>;
+		audio-codec = <&sgtl5000>;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		user1 {
+			label = "Heartbeat1";
+			gpios = <&gpio3 16 0>;
+			linux,default-trigger = "heartbeat";
+		};
+
+		user2 {
+			label = "Heartbeat2";
+			gpios = <&gpio3 17 0>;
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pwm 3 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 7bbb961..6bb6db8 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 = {
@@ -203,12 +220,24 @@ static void __init imx28_evk_init(void)
 	mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
 }
 
+static void __init m28evk_init(void)
+{
+	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 +252,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,
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 6/7] ARM: mxs: convert stmp378x_devb board to device tree
  2012-07-09  6:14 [PATCH 0/7] Convert mxs board files to device tree Shawn Guo
                   ` (8 preceding siblings ...)
  2012-07-09  8:06 ` [PATCH 3/7] ARM: mxs: convert m28evk board " Shawn Guo
@ 2012-07-09  8:07 ` Shawn Guo
  9 siblings, 0 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  8:07 UTC (permalink / raw)
  To: linux-arm-kernel

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 <shawn.guo@linaro.org>
---
 arch/arm/boot/dts/stmp378x_devb.dts |   78 +++++++++++++++++++++++++++++++++++
 arch/arm/mach-mxs/mach-mxs.c        |    1 +
 2 files changed, 79 insertions(+), 0 deletions(-)
 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 0000000..757a327
--- /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 at 80000000 {
+		apbh at 80000000 {
+			ssp0: ssp at 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 = <&reg_vddio_sd0>;
+				status = "okay";
+			};
+
+			pinctrl at 80018000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&hog_pins_a>;
+
+				hog_pins_a: hog-gpios at 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 at 80040000 {
+			auart0: serial at 8006c000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&auart0_pins_a>;
+				status = "okay";
+			};
+
+			duart: serial at 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 e081666..f7300fc 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -312,6 +312,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,
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  8:06 ` [PATCH 3/7] ARM: mxs: convert m28evk board " Shawn Guo
@ 2012-07-09  8:18   ` Marek Vasut
  2012-07-09  8:40     ` Shawn Guo
  0 siblings, 1 reply; 43+ messages in thread
From: Marek Vasut @ 2012-07-09  8:18 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Shawn Guo,

> From: Marek Vasut <marex@denx.de>
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  arch/arm/boot/dts/imx28.dtsi |   21 ++++
>  arch/arm/boot/dts/m28evk.dts |  241
> ++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 
>  30 +++++
>  3 files changed, 292 insertions(+), 0 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 02e778b..3390607 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 at 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 at 0 {
>  					reg = <0>;
>  					fsl,pinmux-ids = <
> @@ -373,6 +384,16 @@
>  					fsl,pull-up = <0>;
>  				};
> 
> +				pwm3_pins_a: pwm3 at 0 {
> +					reg = <0>;
> +					fsl,pinmux-ids = <
> +						0x31c0 /* MX28_PAD_PWM3__PWM_3 
*/
> +					>;
> +					fsl,drive-strength = <0>;
> +					fsl,voltage = <1>;
> +					fsl,pull-up = <0>;
> +				};

Drop the pwm3 stuff, it's not used.

> +
>  				lcdif_24bit_pins_a: lcdif-24bit at 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 0000000..0c22792
> --- /dev/null
> +++ b/arch/arm/boot/dts/m28evk.dts
> @@ -0,0 +1,241 @@
> +/*
> + * Copyright (C) 2012 Marek Vasut <marex@denx.de>
> + *
> + * 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 at 80000000 {
> +		apbh at 80000000 {
> +			gpmi-nand at 8000c000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
> +				status = "okay";
> +
> +				partition at 0 {
> +					label = "bootloader";
> +					reg = <0x00000000 0x00300000>;
> +					read-only;
> +				};
> +
> +				partition at 1 {
> +					label = "environment";
> +					reg = <0x00300000 0x00080000>;
> +				};
> +
> +				partition at 2 {
> +					label = "redundant-environment";
> +					reg = <0x00380000 0x00080000>;
> +				};
> +
> +				partition at 3 {
> +					label = "kernel";
> +					reg = <0x00400000 0x00400000>;
> +				};
> +
> +				partition at 4 {
> +					label = "filesystem";
> +					reg = <0x00800000 0x0f800000>;
> +				};
> +			};
> +
> +			ssp0: ssp at 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 at 80018000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&hog_pins_a>;
> +
> +				hog_pins_a: hog-gpios at 0 {
> +					reg = <0>;
> +					fsl,pinmux-ids = <
> +						0x30a3 /* 
MX28_PAD_AUART2_CTS__GPIO_3_10 */
> +						0x30b3 /* 
MX28_PAD_AUART2_RTS__GPIO_3_11 */
> +						0x3103 /* 
MX28_PAD_PWM0__GPIO_3_16 */
> +						0x3113 /* 
MX28_PAD_PWM1__GPIO_3_17 */

What's this part for ?

> +					>;
> +					fsl,drive-strength = <0>;
> +					fsl,voltage = <1>;
> +					fsl,pull-up = <0>;
> +				};
> +
> +				lcdif_pins_m28: lcdif-m28 at 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 at 80030000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&lcdif_24bit_pins_a
> +					     &lcdif_pins_m28>;
> +				status = "okay";
> +			};
> +
> +			can0: can at 80032000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&can0_pins_a>;
> +				status = "okay";
> +			};
> +
> +			can1: can at 80034000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&can1_pins_a>;
> +				status = "okay";
> +			};
> +		};
> +
> +		apbx at 80040000 {
> +			saif0: saif at 80042000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&saif0_pins_a>;
> +				status = "okay";
> +			};
> +
> +			saif1: saif at 80046000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&saif1_pins_a>;
> +				fsl,saif-master = <&saif0>;
> +				status = "okay";
> +			};
> +
> +			i2c0: i2c at 80058000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&i2c0_pins_a>;
> +				status = "okay";
> +
> +				sgtl5000: codec at 0a {
> +					compatible = "fsl,sgtl5000";
> +					reg = <0x0a>;
> +					VDDA-supply = <&reg_3p3v>;
> +					VDDIO-supply = <&reg_3p3v>;
> +
> +				};
> +
> +				eeprom: eeprom at 51 {
> +					compatible = "atmel,24c128";
> +					reg = <0x51>;
> +					pagesize = <32>;
> +				};
> +
> +				rtc: rtc at 68 {
> +					compatible = "stm,mt41t62";
> +					reg = <0x68>;
> +				};
> +			};
> +
> +			pwm: pwm at 80064000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&pwm3_pins_a>;
> +				status = "okay";
> +			};
> +
> +			duart: serial at 80074000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&duart_pins_a>;
> +				status = "okay";
> +			};
> +
> +			auart0: serial at 8006a000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&auart0_2pins_a>;
> +				status = "okay";
> +			};
> +
> +			auart3: serial at 80070000 {
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&auart3_pins_a>;
> +				status = "okay";
> +			};
> +		};
> +	};
> +
> +	ahb at 80080000 {
> +		mac0: ethernet at 800f0000 {
> +			phy-mode = "rmii";
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&mac0_pins_a>;
> +			phy-reset-gpios = <&gpio3 11 0>;
> +			status = "okay";
> +		};
> +
> +		mac1: ethernet at 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 = "fsl,imx28-evk-sgtl5000",
> +			     "fsl,mxs-audio-sgtl5000";
> +		model = "imx28-evk-sgtl5000";
> +		saif-controllers = <&saif0 &saif1>;
> +		audio-codec = <&sgtl5000>;
> +	};
> +
> +	leds {

Drop the led section, it's some ancient nonsense from who-knows-where :-(

> +		compatible = "gpio-leds";
> +
> +		user1 {
> +			label = "Heartbeat1";
> +			gpios = <&gpio3 16 0>;
> +			linux,default-trigger = "heartbeat";
> +		};
> +
> +		user2 {
> +			label = "Heartbeat2";
> +			gpios = <&gpio3 17 0>;
> +			linux,default-trigger = "heartbeat";
> +		};
> +	};
> +
> +	backlight {

Drop this backlight too please.

> +		compatible = "pwm-backlight";
> +		pwms = <&pwm 3 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 7bbb961..6bb6db8 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 = {
> @@ -203,12 +220,24 @@ static void __init imx28_evk_init(void)
>  	mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
>  }
> 
> +static void __init m28evk_init(void)
> +{
> +	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();

I think you need to call imx28_evk_init() here ?

> 
>  	of_platform_populate(NULL, of_default_bus_match_table,
>  			     mxs_auxdata_lookup, NULL);
> @@ -223,6 +252,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,

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  8:18   ` Marek Vasut
@ 2012-07-09  8:40     ` Shawn Guo
  2012-07-09  8:46       ` Marek Vasut
  2012-07-09  8:50       ` Marek Vasut
  0 siblings, 2 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  8:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 09, 2012 at 10:18:25AM +0200, Marek Vasut wrote:
> > +				pwm3_pins_a: pwm3 at 0 {
> > +					reg = <0>;
> > +					fsl,pinmux-ids = <
> > +						0x31c0 /* MX28_PAD_PWM3__PWM_3 
> */
> > +					>;
> > +					fsl,drive-strength = <0>;
> > +					fsl,voltage = <1>;
> > +					fsl,pull-up = <0>;
> > +				};
> 
> Drop the pwm3 stuff, it's not used.
> 
Okay.  I saw the following in mach-m28evk.c, and thought it's being
used by backlight.  But you knows it better than me.

static const iomux_cfg_t m28evk_pads[] __initconst = {
	...
        /* Backlight */
        MX28_PAD_PWM3__GPIO_3_28 | MXS_PAD_CTRL,
};

> > +			pinctrl at 80018000 {
> > +				pinctrl-names = "default";
> > +				pinctrl-0 = <&hog_pins_a>;
> > +
> > +				hog_pins_a: hog-gpios at 0 {
> > +					reg = <0>;
> > +					fsl,pinmux-ids = <
> > +						0x30a3 /* 
> MX28_PAD_AUART2_CTS__GPIO_3_10 */
> > +						0x30b3 /* 
> MX28_PAD_AUART2_RTS__GPIO_3_11 */

These two were copied from your initial m28evk DTS file, which says
GPIO_3_10 is used as wp-gpios of mmc0 and GPIO_3_11 is used as
phy-reset-gpios of fec.

> > +						0x3103 /* 
> MX28_PAD_PWM0__GPIO_3_16 */
> > +						0x3113 /* 
> MX28_PAD_PWM1__GPIO_3_17 */
> 
>From what mach-m28evk.c tells, they are used as m28evk_leds.

> What's this part for ?
> 
See above.

> > +					>;
> > +					fsl,drive-strength = <0>;
> > +					fsl,voltage = <1>;
> > +					fsl,pull-up = <0>;
> > +				};

<snip>

> > +	leds {
> 
> Drop the led section, it's some ancient nonsense from who-knows-where :-(
> 
Okay.  Now I know why you have above comment.

> > +		compatible = "gpio-leds";
> > +
> > +		user1 {
> > +			label = "Heartbeat1";
> > +			gpios = <&gpio3 16 0>;
> > +			linux,default-trigger = "heartbeat";
> > +		};
> > +
> > +		user2 {
> > +			label = "Heartbeat2";
> > +			gpios = <&gpio3 17 0>;
> > +			linux,default-trigger = "heartbeat";
> > +		};
> > +	};
> > +
> > +	backlight {
> 
> Drop this backlight too please.
> 
Okay.

> > +		compatible = "pwm-backlight";
> > +		pwms = <&pwm 3 5000000>;
> > +		brightness-levels = <0 4 8 16 32 64 128 255>;
> > +		default-brightness-level = <6>;
> > +	};
> > +};

<snip>

> > +static void __init m28evk_init(void)
> > +{
> > +	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();
> 
> I think you need to call imx28_evk_init() here ?
> 
Eh, why?

> > 
> >  	of_platform_populate(NULL, of_default_bus_match_table,
> >  			     mxs_auxdata_lookup, NULL);
> > @@ -223,6 +252,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,

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  8:40     ` Shawn Guo
@ 2012-07-09  8:46       ` Marek Vasut
  2012-07-09  9:02         ` Shawn Guo
  2012-07-09  8:50       ` Marek Vasut
  1 sibling, 1 reply; 43+ messages in thread
From: Marek Vasut @ 2012-07-09  8:46 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Shawn Guo,

[...]

> > Drop the pwm3 stuff, it's not used.
> 
> Okay.  I saw the following in mach-m28evk.c, and thought it's being
> used by backlight.  But you knows it better than me.

Well ... the support for that board that's in current mainline is pretty 
deprecated. And I wasn't really able to update it due to all the DT hype, you 
know the rest of the story more then well etc. etc.

> static const iomux_cfg_t m28evk_pads[] __initconst = {
> 	...
>         /* Backlight */
>         MX28_PAD_PWM3__GPIO_3_28 | MXS_PAD_CTRL,
> };
> 
> > > +			pinctrl at 80018000 {
> > > +				pinctrl-names = "default";
> > > +				pinctrl-0 = <&hog_pins_a>;
> > > +
> > > +				hog_pins_a: hog-gpios at 0 {
> > > +					reg = <0>;
> > > +					fsl,pinmux-ids = <
> > > +						0x30a3 /*
> > 
> > MX28_PAD_AUART2_CTS__GPIO_3_10 */
> > 
> > > +						0x30b3 /*
> > 
> > MX28_PAD_AUART2_RTS__GPIO_3_11 */
> 
> These two were copied from your initial m28evk DTS file, which says
> GPIO_3_10 is used as wp-gpios of mmc0 and GPIO_3_11 is used as
> phy-reset-gpios of fec.

Ah. Leave them there then. Just checked, they're correct.

> > > +						0x3103 /*
> > 
> > MX28_PAD_PWM0__GPIO_3_16 */
> > 
> > > +						0x3113 /*
> > 
> > MX28_PAD_PWM1__GPIO_3_17 */
> 
> From what mach-m28evk.c tells, they are used as m28evk_leds.

There're no leds on the thing that are controlled by GPIOs.

[...]

> > > +	else if (of_machine_is_compatible("denx,m28evk"))
> > > +		m28evk_init();
> > 
> > I think you need to call imx28_evk_init() here ?
> 
> Eh, why?

To start the enet_out clock.

[...]

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  8:40     ` Shawn Guo
  2012-07-09  8:46       ` Marek Vasut
@ 2012-07-09  8:50       ` Marek Vasut
  2012-07-09  9:00         ` Shawn Guo
  1 sibling, 1 reply; 43+ messages in thread
From: Marek Vasut @ 2012-07-09  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Shawn Guo,

[...]

Shouldn't MACH_MXS_DT now select MXS_OCOTP ? It kinda doesn't compile without 
it.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  8:50       ` Marek Vasut
@ 2012-07-09  9:00         ` Shawn Guo
  0 siblings, 0 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  9:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 09, 2012 at 10:50:31AM +0200, Marek Vasut wrote:
> Dear Shawn Guo,
> 
> [...]
> 
> Shouldn't MACH_MXS_DT now select MXS_OCOTP ? It kinda doesn't compile without 
> it.
> 
Yes, you are right.  However, I'm considering to remove both MXS_OCOTP
and MACH_MXS_DT and have them always compiled.  When we convert all
those board files to DT, mach-mxs.c will be always built and all those
MACH_* will no longer exist.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  8:46       ` Marek Vasut
@ 2012-07-09  9:02         ` Shawn Guo
  2012-07-09  9:50           ` Marek Vasut
  0 siblings, 1 reply; 43+ messages in thread
From: Shawn Guo @ 2012-07-09  9:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 09, 2012 at 10:46:36AM +0200, Marek Vasut wrote:
> Well ... the support for that board that's in current mainline is pretty 
> deprecated. And I wasn't really able to update it due to all the DT hype, you 
> know the rest of the story more then well etc. etc.
> 
Let's remove it then :)

> To start the enet_out clock.
> 
Will take care of it in m28evk_init().

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  9:02         ` Shawn Guo
@ 2012-07-09  9:50           ` Marek Vasut
  2012-07-09 14:23             ` Shawn Guo
  0 siblings, 1 reply; 43+ messages in thread
From: Marek Vasut @ 2012-07-09  9:50 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Shawn Guo,

> On Mon, Jul 09, 2012 at 10:46:36AM +0200, Marek Vasut wrote:
> > Well ... the support for that board that's in current mainline is pretty
> > deprecated. And I wasn't really able to update it due to all the DT hype,
> > you know the rest of the story more then well etc. etc.
> 
> Let's remove it then :)

Yea.

> > To start the enet_out clock.
> 
> Will take care of it in m28evk_init().

But almost every board needs that hack ... won't it be easier to make it into 
default behavior? Or can we not somehow configure this via DT itself?

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-09  6:14 ` [PATCH 5/7] ARM: mxs: convert tx28 " Shawn Guo
@ 2012-07-09 13:04   ` Lothar Waßmann
  2012-07-09 14:18     ` Shawn Guo
  2012-07-13  7:14     ` Shawn Guo
  0 siblings, 2 replies; 43+ messages in thread
From: Lothar Waßmann @ 2012-07-09 13:04 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Shawn,

Shawn Guo writes:
> The function tx28_init is basically a rewriting of tx28_add_fec0.  All
> those TX28_FEC_* gpio definitions are meant to be used as a temporary
> solution before we get a generic way to set up board specific gpio
> pins when booting from device tree.
> 
This doesn't work at least because the pins that are used for PHY
strap options need to be reconfigured for their FEC functionality
after releasing the PHY reset. But even after adding the missing
reconfiguration the ethernet PHY does not work.

Since I currently don't have time to delve deeper into this, you may
drop the TX28 board support until I get time to do the conversion to
DT myself.



Lothar Wa?mann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-09 13:04   ` Lothar Waßmann
@ 2012-07-09 14:18     ` Shawn Guo
  2012-07-13  7:14     ` Shawn Guo
  1 sibling, 0 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-09 14:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 09, 2012 at 03:04:53PM +0200, Lothar Wa?mann wrote:
> This doesn't work at least because the pins that are used for PHY
> strap options need to be reconfigured for their FEC functionality
> after releasing the PHY reset.

Ah, right.  I missed that the pins used for PHY strap options are
actually FEC pins.

> But even after adding the missing
> reconfiguration the ethernet PHY does not work.
> 
How did you do that?  Since the pins will be switched between GPIO and
FEC functionality, they should not be defined in "hog" node any more.
It becomes difficult.

> Since I currently don't have time to delve deeper into this, you may
> drop the TX28 board support until I get time to do the conversion to
> DT myself.
> 
I plan to convert all the board files to DT and make the whole mach-mxs
DT only, and then more cleanup works can be proceeded.  It's much
preferred you can work on it yourself, if you can get to this soon.
Otherwise, I can remotely work it out with your help on testing? ;)

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 3/7] ARM: mxs: convert m28evk board to device tree
  2012-07-09  9:50           ` Marek Vasut
@ 2012-07-09 14:23             ` Shawn Guo
  0 siblings, 0 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-09 14:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 09, 2012 at 11:50:10AM +0200, Marek Vasut wrote:
> But almost every board needs that hack ... won't it be easier to make it into 
> default behavior? Or can we not somehow configure this via DT itself?
> 
Yeah, after adopting clock DT bindings, we can make it via DT.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 4/7] ARM: mxs: convert apx4devkit board to device tree
  2012-07-09  6:14 ` [PATCH 4/7] ARM: mxs: convert apx4devkit " Shawn Guo
@ 2012-07-09 15:15   ` Lauri Hintsala
  2012-07-10  4:01     ` Shawn Guo
  0 siblings, 1 reply; 43+ messages in thread
From: Lauri Hintsala @ 2012-07-09 15:15 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/09/2012 09:14 AM, Shawn Guo wrote:
> Cc: Lauri Hintsala <lauri.hintsala@bluegiga.com>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>   arch/arm/boot/dts/apx4devkit.dts |  143 ++++++++++++++++++++++++++++++++++++++
>   arch/arm/boot/dts/imx28.dtsi     |   33 +++++++++
>   arch/arm/mach-mxs/mach-mxs.c     |   23 ++++++
>   3 files changed, 199 insertions(+), 0 deletions(-)
>   create mode 100644 arch/arm/boot/dts/apx4devkit.dts

Apx4devkit boots up and works fine with DT. I would like to add support 
for NAND, display, SSP2, etc... I'll send patches tomorrow.

Thanks!

Lauri

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 4/7] ARM: mxs: convert apx4devkit board to device tree
  2012-07-09 15:15   ` Lauri Hintsala
@ 2012-07-10  4:01     ` Shawn Guo
  2012-07-10  7:10       ` Lauri Hintsala
  0 siblings, 1 reply; 43+ messages in thread
From: Shawn Guo @ 2012-07-10  4:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 09, 2012 at 06:15:53PM +0300, Lauri Hintsala wrote:
> On 07/09/2012 09:14 AM, Shawn Guo wrote:
> >Cc: Lauri Hintsala <lauri.hintsala@bluegiga.com>
> >Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> >---
> >  arch/arm/boot/dts/apx4devkit.dts |  143 ++++++++++++++++++++++++++++++++++++++
> >  arch/arm/boot/dts/imx28.dtsi     |   33 +++++++++
> >  arch/arm/mach-mxs/mach-mxs.c     |   23 ++++++
> >  3 files changed, 199 insertions(+), 0 deletions(-)
> >  create mode 100644 arch/arm/boot/dts/apx4devkit.dts
> 
> Apx4devkit boots up and works fine with DT. I would like to add
> support for NAND, display, SSP2, etc... I'll send patches tomorrow.
> 
Thanks, Lauri.  Can I add your Tested-by?

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 4/7] ARM: mxs: convert apx4devkit board to device tree
  2012-07-10  4:01     ` Shawn Guo
@ 2012-07-10  7:10       ` Lauri Hintsala
  0 siblings, 0 replies; 43+ messages in thread
From: Lauri Hintsala @ 2012-07-10  7:10 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/10/2012 07:01 AM, Shawn Guo wrote:
>> Apx4devkit boots up and works fine with DT. I would like to add
>> support for NAND, display, SSP2, etc... I'll send patches tomorrow.
>>
> Thanks, Lauri.  Can I add your Tested-by?

Yes, you can.

Lauri

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-09 13:04   ` Lothar Waßmann
  2012-07-09 14:18     ` Shawn Guo
@ 2012-07-13  7:14     ` Shawn Guo
  2012-07-13  9:21       ` Lothar Waßmann
  1 sibling, 1 reply; 43+ messages in thread
From: Shawn Guo @ 2012-07-13  7:14 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Lothar,

On Mon, Jul 09, 2012 at 03:04:53PM +0200, Lothar Wa?mann wrote:
> This doesn't work at least because the pins that are used for PHY
> strap options need to be reconfigured for their FEC functionality
> after releasing the PHY reset. But even after adding the missing
> reconfiguration the ethernet PHY does not work.
> 
Can you please test the branch below to see if ethernet PHY works?

  git://git.linaro.org/people/shawnguo/linux-2.6.git mxs/dt/tx28

I hope I have addressed the issue with pin configuration there.
But I'm not sure if "enet_out" clock needs to be enabled on tx28.
I have enabled it in the code above.  You need to remove
enable_clk_enet_out call from tx28_init, if it's not needed.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-13  7:14     ` Shawn Guo
@ 2012-07-13  9:21       ` Lothar Waßmann
  2012-07-15 14:49         ` Shawn Guo
  0 siblings, 1 reply; 43+ messages in thread
From: Lothar Waßmann @ 2012-07-13  9:21 UTC (permalink / raw)
  To: linux-arm-kernel

Shawn Guo writes:
> Hi Lothar,
> 
> On Mon, Jul 09, 2012 at 03:04:53PM +0200, Lothar Wa?mann wrote:
> > This doesn't work at least because the pins that are used for PHY
> > strap options need to be reconfigured for their FEC functionality
> > after releasing the PHY reset. But even after adding the missing
> > reconfiguration the ethernet PHY does not work.
> > 
> Can you please test the branch below to see if ethernet PHY works?
> 
No. See bootlog below.

The following patch is required for the kernel to build:
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -82,6 +82,7 @@ config MODULE_TX28
 	select MXS_HAVE_PLATFORM_MXS_MMC
 	select MXS_HAVE_PLATFORM_MXS_PWM
 	select MXS_HAVE_PLATFORM_RTC_STMP3XXX
+	select MXS_OCOTP
 
 config MODULE_M28
 	bool

>   git://git.linaro.org/people/shawnguo/linux-2.6.git mxs/dt/tx28
> 
> I hope I have addressed the issue with pin configuration there.
> But I'm not sure if "enet_out" clock needs to be enabled on tx28.
> I have enabled it in the code above.  You need to remove
> enable_clk_enet_out call from tx28_init, if it's not needed.
> 
ENET_CLK is required on the module.

## Booting kernel from Legacy Image at 40100000 ...
   Image Name:   Linux-3.5.0-rc6-next-20120712-ka
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2277008 Bytes = 2.2 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...


Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Linux version 3.5.0-rc6-next-20120712-karo+ (lothar at ipc1) (gcc version 4.5.3 (GCC) ) #5 PREEMPT Fri Jul 13 11:06
:19 CEST 2012
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Ka-Ro electronics TX28 module
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 32768
free_area_init_node: node 0, pgdat c046db28, node_mem_map c04a8000
  Normal zone: 256 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 32512 pages, LIFO batch:7
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: init=/linuxrc mtdparts=gpmi-nand:128k at 0x20000(env),1m(u-boot),4m(linux),16m(rootfs),-(userfs) root=/dev/nfs nfsroot=192.168.1.225:/tftpboot/KARO/imx28-new,nolock ip=bootp debug panic=1 console=ttyAMA0,115200 ro
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 125136k/125136k available, 5936k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc0419d40   (4168 kB)
      .init : 0xc041a000 - 0xc043be28   ( 136 kB)
      .data : 0xc043c000 - 0xc046e540   ( 202 kB)
       .bss : 0xc046e564 - 0xc04a7020   ( 227 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:304
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
Console: colour dummy device 80x30
Calibrating delay loop... 226.09 BogoMIPS (lpj=1130496)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x402fc958 - 0x402fc9b0
------------[ cut here ]------------
WARNING: at /usr/local/src/arm/projects/imx28/linux-tx28-dt/kernel/workqueue.c:1217 worker_enter_idle+0x114/0x13
0()
Modules linked in:
[<c001381c>] (unwind_backtrace+0x0/0xe4) from [<c001adf8>] (warn_slowpath_common+0x4c/0x64)
[<c001adf8>] (warn_slowpath_common+0x4c/0x64) from [<c001ae28>] (warn_slowpath_null+0x18/0x1c)
[<c001ae28>] (warn_slowpath_null+0x18/0x1c) from [<c0030304>] (worker_enter_idle+0x114/0x130)
[<c0030304>] (worker_enter_idle+0x114/0x130) from [<c0030348>] (start_worker+0x28/0x34)
[<c0030348>] (start_worker+0x28/0x34) from [<c0420954>] (init_workqueues+0x144/0x2bc)
[<c0420954>] (init_workqueues+0x144/0x2bc) from [<c00088e4>] (do_one_initcall+0x9c/0x174)
[<c00088e4>] (do_one_initcall+0x9c/0x174) from [<c041a7b0>] (kernel_init+0x50/0x1b4)
[<c041a7b0>] (kernel_init+0x50/0x1b4) from [<c000f464>] (kernel_thread_exit+0x0/0x8)
---[ end trace 84ec6457efae102a ]---
devtmpfs: initialized
pinctrl core: initialized pinctrl subsystem
dummy: 
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
gpiochip_add: registered GPIOs 0 to 31 on device: imx28-gpio.0
gpiochip_add: registered GPIOs 32 to 63 on device: imx28-gpio.1
gpiochip_add: registered GPIOs 64 to 95 on device: imx28-gpio.2
gpiochip_add: registered GPIOs 96 to 127 on device: imx28-gpio.3
gpiochip_add: registered GPIOs 128 to 159 on device: imx28-gpio.4
Serial: AMBA PL011 UART driver
duart: ttyAMA0 at MMIO 0x80074000 (irq = 47) is a PL011 rev2
console [ttyAMA0] enabled
bio: create slab <bio-0> at 0
mxs-dma imx28-dma-apbh: initialized
mxs-dma imx28-dma-apbx: initialized
Switching to clocksource mxs_timer
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
NFS: Registering the id_resolver key type
Key type id_resolver registered
jffs2: version 2.2. (NAND) (SUMMARY)  ?? 2001-2006 Red Hat, Inc.
msgmni has been set to 244
alg: No test for stdrng (krng)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
uart-pl011 duart: no DMA platform data
mxs-auart.1: ttyAPP1 at MMIO 0x8006c000 (irq = 113) is a mxs-auart.1
mxs-auart mxs-auart.1: Found APPUART 3.1.0
brd: module loaded
loop: module loaded
GPMI NAND driver registered. (IMX)
libphy: fec_enet_mii_bus: probed
mousedev: PS/2 mouse device common for all mice
rtc-ds1307 0-0068: SET TIME!
rtc-ds1307 0-0068: rtc core: registered ds1339 as rtc0
stmp3xxx-rtc stmp3xxx-rtc.0: rtc core: registered stmp3xxx-rtc as rtc1
Registered led device: GPIO-LED
TCP: cubic registered
NET: Registered protocol family 17
Key type dns_resolver registered
rtc-ds1307 0-0068: setting system clock to 2000-01-01 00:00:33 UTC (946684833)
eth0: no PHY, assuming direct connection to switch
libphy: PHY fixed-0:00 not found
eth0: could not attach to PHY
IP-Config: Failed to open eth0
IP-Config: No network devices available
script "uboot": global timeout
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[<c001381c>] (unwind_backtrace+0x0/0xe4) from [<c02fa1e0>] (panic+0x90/0x1e8)
[<c02fa1e0>] (panic+0x90/0x1e8) from [<c041ac94>] (mount_block_root+0x1d4/0x230)
[<c041ac94>] (mount_block_root+0x1d4/0x230) from [<c041aee4>] (mount_root+0xd0/0xf0)
[<c041aee4>] (mount_root+0xd0/0xf0) from [<c041b054>] (prepare_namespace+0x150/0x1b0)
[<c041b054>] (prepare_namespace+0x150/0x1b0) from [<c041a8cc>] (kernel_init+0x16c/0x1b4)
[<c041a8cc>] (kernel_init+0x16c/0x1b4) from [<c000f464>] (kernel_thread_exit+0x0/0x8)
Rebooting in 1 seconds..


Lothar Wa?mann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-13  9:21       ` Lothar Waßmann
@ 2012-07-15 14:49         ` Shawn Guo
  2012-07-15 15:00           ` Shawn Guo
  2012-07-16  7:00           ` Lothar Waßmann
  0 siblings, 2 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-15 14:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 13, 2012 at 11:21:09AM +0200, Lothar Wa?mann wrote:
> Shawn Guo writes:
> > Hi Lothar,
> > 
> > On Mon, Jul 09, 2012 at 03:04:53PM +0200, Lothar Wa?mann wrote:
> > > This doesn't work at least because the pins that are used for PHY
> > > strap options need to be reconfigured for their FEC functionality
> > > after releasing the PHY reset. But even after adding the missing
> > > reconfiguration the ethernet PHY does not work.
> > > 
> > Can you please test the branch below to see if ethernet PHY works?
> > 
> No. See bootlog below.
> 
Thanks for testing, Lothar.  But from the boot log below, the kernel
did a non-DT boot rather than a boot from device tree.  More on this
below.  But does that mean ethernet PHY does not work even on non-DT
kernel right now?

> The following patch is required for the kernel to build:

Yes, Marek has reported that.  But I'm not so fond of fixing it right
away like that, since mxs_defconfig has it enabled with board file
support and does not expose the problem.

Instead, I would really like to remove those board files with equivalent
device tree support, and build in mach-mxs.c and ocotp.c all the time.

> --- a/arch/arm/mach-mxs/Kconfig
> +++ b/arch/arm/mach-mxs/Kconfig
> @@ -82,6 +82,7 @@ config MODULE_TX28
>  	select MXS_HAVE_PLATFORM_MXS_MMC
>  	select MXS_HAVE_PLATFORM_MXS_PWM
>  	select MXS_HAVE_PLATFORM_RTC_STMP3XXX
> +	select MXS_OCOTP
>  
>  config MODULE_M28
>  	bool
> 
> >   git://git.linaro.org/people/shawnguo/linux-2.6.git mxs/dt/tx28
> > 
> > I hope I have addressed the issue with pin configuration there.
> > But I'm not sure if "enet_out" clock needs to be enabled on tx28.
> > I have enabled it in the code above.  You need to remove
> > enable_clk_enet_out call from tx28_init, if it's not needed.
> > 
> ENET_CLK is required on the module.
> 
Ok, got it.

> ## Booting kernel from Legacy Image at 40100000 ...
>    Image Name:   Linux-3.5.0-rc6-next-20120712-ka
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    2277008 Bytes = 2.2 MiB
>    Load Address: 40008000
>    Entry Point:  40008000
>    Verifying Checksum ... OK
>    Loading Kernel Image ... OK
> OK
> 
> Starting kernel ...
> 
> 
> Uncompressing Linux... done, booting the kernel.
> Booting Linux on physical CPU 0
> Linux version 3.5.0-rc6-next-20120712-karo+ (lothar at ipc1) (gcc version 4.5.3 (GCC) ) #5 PREEMPT Fri Jul 13 11:06
> :19 CEST 2012
> CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
> CPU: VIVT data cache, VIVT instruction cache
> Machine: Ka-Ro electronics TX28 module

This line tells that the kernel is doing a traditional non-DT boot.
If the kernel boots from device tree, you should see the following line
instead.

Machine: Freescale i.MX28 (Device Tree), model: Ka-Ro electronics TX28 module

I'm not sure if you have your bootloader passes dtb to kernel or use
append-dtb approach.  In the later case, here are the brief
instructions.

- Enable CONFIG_ARM_APPENDED_DTB and CONFIG_ARM_ATAG_DTB_COMPAT
- Build kernel
- make ARCH=arm imx28-tx28.dtb
- cat arch/arm/boot/zImage arch/arm/boot/imx28-tx28.dtb > arch/arm/boot/zImage_dtb
- Boot zImage_dtb like you boot zImage as usual

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-15 14:49         ` Shawn Guo
@ 2012-07-15 15:00           ` Shawn Guo
  2012-07-16  7:03             ` Lothar Waßmann
  2012-07-16  7:00           ` Lothar Waßmann
  1 sibling, 1 reply; 43+ messages in thread
From: Shawn Guo @ 2012-07-15 15:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jul 15, 2012 at 10:49:35PM +0800, Shawn Guo wrote:
> below.  But does that mean ethernet PHY does not work even on non-DT
> kernel right now?
> 
So I guess you need something like c46d291 (ARM: apx4devkit: fix FEC
enabling PHY clock) for TX28 too.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-15 14:49         ` Shawn Guo
  2012-07-15 15:00           ` Shawn Guo
@ 2012-07-16  7:00           ` Lothar Waßmann
  2012-07-18 13:39             ` Shawn Guo
  1 sibling, 1 reply; 43+ messages in thread
From: Lothar Waßmann @ 2012-07-16  7:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Shawn Guo writes:
> On Fri, Jul 13, 2012 at 11:21:09AM +0200, Lothar Wa?mann wrote:
> > Shawn Guo writes:
> > > Hi Lothar,
> > > 
> > > On Mon, Jul 09, 2012 at 03:04:53PM +0200, Lothar Wa?mann wrote:
> > > > This doesn't work at least because the pins that are used for PHY
> > > > strap options need to be reconfigured for their FEC functionality
> > > > after releasing the PHY reset. But even after adding the missing
> > > > reconfiguration the ethernet PHY does not work.
> > > > 
> > > Can you please test the branch below to see if ethernet PHY works?
> > > 
> > No. See bootlog below.
> > 
> Thanks for testing, Lothar.  But from the boot log below, the kernel
> did a non-DT boot rather than a boot from device tree.  More on this
>
I compiled the kernel with DT support, but just the TX28 board
selected. When selecting an additional i.MX28 board, the kernel
doesn't boot at all any more. Does this mean in order to get a kernel
with DT support one has to select at least two different platforms?
Is this behaviour intended?

> below.  But does that mean ethernet PHY does not work even on non-DT
> kernel right now?
> 
Seems so.

> > The following patch is required for the kernel to build:
> 
> Yes, Marek has reported that.  But I'm not so fond of fixing it right
> away like that, since mxs_defconfig has it enabled with board file
> support and does not expose the problem.
> 
> Instead, I would really like to remove those board files with equivalent
> device tree support, and build in mach-mxs.c and ocotp.c all the time.
> 
OK.

> This line tells that the kernel is doing a traditional non-DT boot.
> If the kernel boots from device tree, you should see the following line
> instead.
> 
> Machine: Freescale i.MX28 (Device Tree), model: Ka-Ro electronics TX28 module
> 
> I'm not sure if you have your bootloader passes dtb to kernel or use
> append-dtb approach.  In the later case, here are the brief
> instructions.
> 
> - Enable CONFIG_ARM_APPENDED_DTB and CONFIG_ARM_ATAG_DTB_COMPAT
> - Build kernel
> - make ARCH=arm imx28-tx28.dtb
> - cat arch/arm/boot/zImage arch/arm/boot/imx28-tx28.dtb > arch/arm/boot/zImage_dtb
> - Boot zImage_dtb like you boot zImage as usual
> 
I'm using the appended DTB approach, and have done exactly this except
for using uImage rather than zImage.


Lothar Wa?mann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-15 15:00           ` Shawn Guo
@ 2012-07-16  7:03             ` Lothar Waßmann
  2012-07-18 13:36               ` Shawn Guo
  0 siblings, 1 reply; 43+ messages in thread
From: Lothar Waßmann @ 2012-07-16  7:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Shawn Guo writes:
> On Sun, Jul 15, 2012 at 10:49:35PM +0800, Shawn Guo wrote:
> > below.  But does that mean ethernet PHY does not work even on non-DT
> > kernel right now?
> > 
> So I guess you need something like c46d291 (ARM: apx4devkit: fix FEC
> enabling PHY clock) for TX28 too.
> 
That's already in place.


Lothar Wa?mann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-16  7:03             ` Lothar Waßmann
@ 2012-07-18 13:36               ` Shawn Guo
  2012-07-19  5:58                 ` Lothar Waßmann
  0 siblings, 1 reply; 43+ messages in thread
From: Shawn Guo @ 2012-07-18 13:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 16, 2012 at 09:03:28AM +0200, Lothar Wa?mann wrote:
> Hi,
> 
> Shawn Guo writes:
> > On Sun, Jul 15, 2012 at 10:49:35PM +0800, Shawn Guo wrote:
> > > below.  But does that mean ethernet PHY does not work even on non-DT
> > > kernel right now?
> > > 
> > So I guess you need something like c46d291 (ARM: apx4devkit: fix FEC
> > enabling PHY clock) for TX28 too.
> > 
> That's already in place.
> 
Are you using and talking about the branch I prepared for you?
I haven't seen it there.

Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-16  7:00           ` Lothar Waßmann
@ 2012-07-18 13:39             ` Shawn Guo
  2012-07-19  6:13               ` Lothar Waßmann
  0 siblings, 1 reply; 43+ messages in thread
From: Shawn Guo @ 2012-07-18 13:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 16, 2012 at 09:00:24AM +0200, Lothar Wa?mann wrote:
> > below.  But does that mean ethernet PHY does not work even on non-DT
> > kernel right now?
> > 
> Seems so.
> 
Have you got the chance to figure it out why it does not work on
non-DT kernel?

> > I'm not sure if you have your bootloader passes dtb to kernel or use
> > append-dtb approach.  In the later case, here are the brief
> > instructions.
> > 
> > - Enable CONFIG_ARM_APPENDED_DTB and CONFIG_ARM_ATAG_DTB_COMPAT
> > - Build kernel
> > - make ARCH=arm imx28-tx28.dtb
> > - cat arch/arm/boot/zImage arch/arm/boot/imx28-tx28.dtb > arch/arm/boot/zImage_dtb
> > - Boot zImage_dtb like you boot zImage as usual
> > 
> I'm using the appended DTB approach, and have done exactly this except
> for using uImage rather than zImage.
> 
So, got a chance to wrap the zImage_dtb into uImage and have the DT
kernel actually running?

Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-18 13:36               ` Shawn Guo
@ 2012-07-19  5:58                 ` Lothar Waßmann
  2012-07-19  6:05                   ` Shawn Guo
  0 siblings, 1 reply; 43+ messages in thread
From: Lothar Waßmann @ 2012-07-19  5:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

> On Mon, Jul 16, 2012 at 09:03:28AM +0200, Lothar Wa?mann wrote:
> > Hi,
> > 
> > Shawn Guo writes:
> > > On Sun, Jul 15, 2012 at 10:49:35PM +0800, Shawn Guo wrote:
> > > > below.  But does that mean ethernet PHY does not work even on non-DT
> > > > kernel right now?
> > > > 
> > > So I guess you need something like c46d291 (ARM: apx4devkit: fix FEC
> > > enabling PHY clock) for TX28 too.
> > > 
> > That's already in place.
> > 
> Are you using and talking about the branch I prepared for you?
> I haven't seen it there.
> 
I'm using:
git-remote -v
|origin  git://git.linaro.org/people/shawnguo/linux-2.6.git (fetch)
|origin  git://git.linaro.org/people/shawnguo/linux-2.6.git (push)

 git-branch -a
|  mxs/dt/others
|* tx28
|  remotes/origin/HEAD -> origin/master
|  remotes/origin/clk/mxs-for-3.6
|  remotes/origin/imx/cleanup-for-3.6
|  remotes/origin/imx/dt-for-3.6
|  remotes/origin/imx/irqdomain
|  remotes/origin/imx/sparse-irq
|  remotes/origin/master
|  remotes/origin/mxs/defconfig-for-3.6
|  remotes/origin/mxs/dt-for-3.6
|  remotes/origin/mxs/dt/others
|  remotes/origin/mxs/dt/tx28
|  remotes/origin/mxs/fixes-for-3.5
|  remotes/origin/mxs/fixes-for-3.6
|  remotes/origin/mxs/test
where 'tx28' is checked out from remotes/origin/mxs/dt/tx28.

git-show c46d291
commit c46d2916f6c03d3c8a2c38148af2e45cdadaf61f
Author: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Date:   Thu Jul 5 10:31:36 2012 +0300

    ARM: apx4devkit: fix FEC enabling PHY clock
    
    Ethernet stopped to work after mxs clk framework change.
    
    Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
    Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

diff --git a/arch/arm/mach-mxs/mach-apx4devkit.c b/arch/arm/mach-mxs/mach-apx4devkit.c
index 5e90b9d..f5f0617 100644
--- a/arch/arm/mach-mxs/mach-apx4devkit.c
+++ b/arch/arm/mach-mxs/mach-apx4devkit.c
@@ -205,6 +205,16 @@ static int apx4devkit_phy_fixup(struct phy_device *phy)
        return 0;
 }
 
+static void __init apx4devkit_fec_phy_clk_enable(void)
+{
+       struct clk *clk;
+
+       /* Enable fec phy clock */
+       clk = clk_get_sys("enet_out", NULL);
+       if (!IS_ERR(clk))
+               clk_prepare_enable(clk);
+}
+
 static void __init apx4devkit_init(void)
 {
        mx28_soc_init();
@@ -225,6 +235,7 @@ static void __init apx4devkit_init(void)
        phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK,
                        apx4devkit_phy_fixup);
 
+       apx4devkit_fec_phy_clk_enable();
        mx28_add_fec(0, &mx28_fec_pdata);
 
        mx28_add_mxs_mmc(0, &apx4devkit_mmc_pdata);


Lothar Wa?mann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-19  5:58                 ` Lothar Waßmann
@ 2012-07-19  6:05                   ` Shawn Guo
  0 siblings, 0 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-19  6:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jul 19, 2012 at 07:58:41AM +0200, Lothar Wa?mann wrote:
> where 'tx28' is checked out from remotes/origin/mxs/dt/tx28.
> 
Yes, the branch is right.  But the following patch only fixes board
apx4devkit.  What I meant is we probably need to apply the same change
for TX28 board.

Regards,
Shawn

> git-show c46d291
> commit c46d2916f6c03d3c8a2c38148af2e45cdadaf61f
> Author: Lauri Hintsala <lauri.hintsala@bluegiga.com>
> Date:   Thu Jul 5 10:31:36 2012 +0300
> 
>     ARM: apx4devkit: fix FEC enabling PHY clock
>     
>     Ethernet stopped to work after mxs clk framework change.
>     
>     Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
>     Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> 
> diff --git a/arch/arm/mach-mxs/mach-apx4devkit.c b/arch/arm/mach-mxs/mach-apx4devkit.c
> index 5e90b9d..f5f0617 100644
> --- a/arch/arm/mach-mxs/mach-apx4devkit.c
> +++ b/arch/arm/mach-mxs/mach-apx4devkit.c
> @@ -205,6 +205,16 @@ static int apx4devkit_phy_fixup(struct phy_device *phy)
>         return 0;
>  }
>  
> +static void __init apx4devkit_fec_phy_clk_enable(void)
> +{
> +       struct clk *clk;
> +
> +       /* Enable fec phy clock */
> +       clk = clk_get_sys("enet_out", NULL);
> +       if (!IS_ERR(clk))
> +               clk_prepare_enable(clk);
> +}
> +
>  static void __init apx4devkit_init(void)
>  {
>         mx28_soc_init();
> @@ -225,6 +235,7 @@ static void __init apx4devkit_init(void)
>         phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK,
>                         apx4devkit_phy_fixup);
>  
> +       apx4devkit_fec_phy_clk_enable();
>         mx28_add_fec(0, &mx28_fec_pdata);
>  
>         mx28_add_mxs_mmc(0, &apx4devkit_mmc_pdata);
> 
> 
> Lothar Wa?mann
> -- 
> ___________________________________________________________
> 
> Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
> Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
> Gesch?ftsf?hrer: Matthias Kaussen
> Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
> 
> www.karo-electronics.de | info at karo-electronics.de
> ___________________________________________________________

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-18 13:39             ` Shawn Guo
@ 2012-07-19  6:13               ` Lothar Waßmann
  2012-07-19  6:22                 ` Shawn Guo
  0 siblings, 1 reply; 43+ messages in thread
From: Lothar Waßmann @ 2012-07-19  6:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Shawn Guo writes:
> On Mon, Jul 16, 2012 at 09:00:24AM +0200, Lothar Wa?mann wrote:
> > > below.  But does that mean ethernet PHY does not work even on non-DT
> > > kernel right now?
> > > 
> > Seems so.
> > 
> Have you got the chance to figure it out why it does not work on
> non-DT kernel?
> 
No.

> > > I'm not sure if you have your bootloader passes dtb to kernel or use
> > > append-dtb approach.  In the later case, here are the brief
> > > instructions.
> > > 
> > > - Enable CONFIG_ARM_APPENDED_DTB and CONFIG_ARM_ATAG_DTB_COMPAT
> > > - Build kernel
> > > - make ARCH=arm imx28-tx28.dtb
> > > - cat arch/arm/boot/zImage arch/arm/boot/imx28-tx28.dtb > arch/arm/boot/zImage_dtb
> > > - Boot zImage_dtb like you boot zImage as usual
> > > 
> > I'm using the appended DTB approach, and have done exactly this except
> > for using uImage rather than zImage.
> > 
> So, got a chance to wrap the zImage_dtb into uImage and have the DT
> kernel actually running?
> 
Yes, that actually works:
--------
|Linux version 3.5.0-rc6-next-20120712-karo+ (lothar at ipc1) (gcc version 4.5.3 (GCC) ) #11 PREEMPT Mon Jul 16 09:08:40 CEST 2012
|CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
|CPU: VIVT data cache, VIVT instruction cache
|Machine: Freescale i.MX28 (Device Tree), model: Ka-Ro electronics TX28 module
|bootconsole [earlycon0] enabled
|Memory policy: ECC disabled, Data cache writeback
|On node 0 totalpages: 32768
|free_area_init_node: node 0, pgdat c0471ce8, node_mem_map c04ac000
|  Normal zone: 256 pages used for memmap
|  Normal zone: 0 pages reserved
|  Normal zone: 32512 pages, LIFO batch:7
|pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
|pcpu-alloc: [0] 0 
|Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
|Kernel command line: init=/linuxrc kmemleak=on tx28_base=stkv3 tx28_otg_mode=device mtdparts=gpmi-nand:128k at 0x20000(env|),1m(u-boot),4m(linux),16m(rootfs),-(userfs) root=/dev/nfs nfsroot=192.168.1.225:/tftpboot/KARO/imx28-new,nolock ip=boo|tp mxsfb.mode=ETV570 debug earlyprintk panic=1 console=ttyAMA0,115200 ro
|PID hash table entries: 512 (order: -1, 2048 bytes)
|Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
|Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
|Memory: 128MB = 128MB total
|Memory: 125080k/125080k available, 5992k reserved, 0K highmem
|Virtual kernel memory layout:
|    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
|    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
|    vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
|    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
|    modules : 0xbf000000 - 0xc0000000   (  16 MB)
|      .text : 0xc0008000 - 0xc041bd90   (4176 kB)
|      .init : 0xc041c000 - 0xc043e294   ( 137 kB)
|      .data : 0xc0440000 - 0xc0472700   ( 202 kB)
|       .bss : 0xc0472724 - 0xc04ab1e0   ( 227 kB)
|SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
|NR_IRQS:304
|sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
|Console: colour dummy device 80x30
|Calibrating delay loop... 226.09 BogoMIPS (lpj=1130496)
|pid_max: default: 32768 minimum: 301
|Mount-cache hash table entries: 512
|CPU: Testing write buffer coherency: ok
|Setting up static identity map for 0x402fcd58 - 0x402fcdb0
|------------[ cut here ]------------
|WARNING: at /usr/local/src/arm/projects/imx28/linux-tx28-dt/kernel/workqueue.c:1217 worker_enter_idle+0x114/0x130()
|Modules linked in:
|[<c001381c>] (unwind_backtrace+0x0/0xe4) from [<c001b20c>] (warn_slowpath_common+0x4c/0x64)
|[<c001b20c>] (warn_slowpath_common+0x4c/0x64) from [<c001b23c>] (warn_slowpath_null+0x18/0x1c)
|[<c001b23c>] (warn_slowpath_null+0x18/0x1c) from [<c0030718>] (worker_enter_idle+0x114/0x130)
|[<c0030718>] (worker_enter_idle+0x114/0x130) from [<c003075c>] (start_worker+0x28/0x34)
|[<c003075c>] (start_worker+0x28/0x34) from [<c0422bc4>] (init_workqueues+0x144/0x2bc)
|[<c0422bc4>] (init_workqueues+0x144/0x2bc) from [<c00088e4>] (do_one_initcall+0x9c/0x174)
|[<c00088e4>] (do_one_initcall+0x9c/0x174) from [<c041c7b0>] (kernel_init+0x50/0x1b4)
|[<c041c7b0>] (kernel_init+0x50/0x1b4) from [<c000f464>] (kernel_thread_exit+0x0/0x8)
|---[ end trace f60ac847315b779a ]---
|devtmpfs: initialized
|pinctrl core: initialized pinctrl subsystem
|dummy: 
|NET: Registered protocol family 16
|DMA: preallocated 256 KiB pool for atomic coherent allocations
|gpiochip_add: registered GPIOs 0 to 31 on device: gpio.0
|gpiochip_add: registered GPIOs 32 to 63 on device: gpio.1
|gpiochip_add: registered GPIOs 64 to 95 on device: gpio.2
|gpiochip_add: registered GPIOs 96 to 127 on device: gpio.3
|gpiochip_add: registered GPIOs 128 to 159 on device: gpio.4
|Serial: AMBA PL011 UART driver
|80074000.serial: ttyAMA0 at MMIO 0x80074000 (irq = 47) is a PL011 rev2
|console [ttyAMA0] enabled, bootconsole disabled
|console [ttyAMA0] enabled, bootconsole disabled
|bio: create slab <bio-0> at 0
|mxs-dma 80004000.dma-apbh: initialized
|mxs-dma 80024000.dma-apbx: initialized
|Switching to clocksource mxs_timer
|NET: Registered protocol family 2
|IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
|TCP established hash table entries: 4096 (order: 3, 32768 bytes)
|TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
|TCP: Hash tables configured (established 4096 bind 4096)
|TCP: reno registered
|UDP hash table entries: 256 (order: 0, 4096 bytes)
|UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
|NET: Registered protocol family 1
|RPC: Registered named UNIX socket transport module.
|RPC: Registered udp transport module.
|RPC: Registered tcp transport module.
|RPC: Registered tcp NFSv4.1 backchannel transport module.
|NetWinder Floating Point Emulator V0.97 (double precision)
|NFS: Registering the id_resolver key type
|Key type id_resolver registered
|jffs2: version 2.2. (NAND) (SUMMARY)  ?? 2001-2006 Red Hat, Inc.
|msgmni has been set to 244
|alg: No test for stdrng (krng)
|Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
|io scheduler noop registered
|io scheduler deadline registered
|io scheduler cfq registered (default)
|uart-pl011 80074000.serial: no DMA platform data
|8006c000.serial: ttyAPP1 at MMIO 0x8006c000 (irq = 113) is a 8006c000.serial
|mxs-auart 8006c000.serial: Found APPUART 3.1.0
|brd: module loaded
|loop: module loaded
|GPMI NAND driver registered. (IMX)
|of_get_named_gpio_flags: can't parse gpios property
|gpio_request: gpio--2 (phy-reset) status -22
|libphy: fec_enet_mii_bus: probed
|mousedev: PS/2 mouse device common for all mice
|rtc-ds1307 0-0068: SET TIME!
|rtc-ds1307 0-0068: rtc core: registered ds1339 as rtc0
|stmp3xxx-rtc 80056000.rtc: rtc core: registered 80056000.rtc as rtc1
|of_get_named_gpio_flags exited with status 0
|Registered led device: Heartbeat
|TCP: cubic registered
|NET: Registered protocol family 17
|Key type dns_resolver registered
|rtc-ds1307 0-0068: setting system clock to 2000-01-01 00:01:07 UTC (946684867)
|eth0: Freescale FEC PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=800f0000.etherne:00, irq=-1)
|libphy: 800f0000.etherne:00 - Link is Up - 100/Full
|Sending BOOTP requests . OK
|IP-Config: Got BOOTP answer from 192.168.100.1, my address is 192.168.100.73
|IP-Config: Complete:
|     device=eth0, addr=192.168.100.73, mask=255.255.254.0, gw=192.168.100.1
|     host=192.168.100.73, domain=ka-ro, nis-domain=(none)
|     bootserver=192.168.100.1, rootserver=192.168.1.225, rootpath=
|VFS: Mounted root (nfs filesystem) readonly on device 0:12.
|devtmpfs: mounted
|Freeing init memory: 136K
|Executing /sbin/init 
|INIT: version 2.88 booting
|Activating swap...done.
|Initializing /var... Done.
|Setting the system clock.
|Loading kernel modules...done.
|Activating lvm and md swap...done.
|Checking file systems...fsck from util-linux-ng 2.16
|done.
|Mounting local filesystems...done.
|Activating swapfile swap...done.
|Cleaning up temporary files....
|Cleaning up temporary files....
|Setting the system clock.
|ERROR: cannot update random seed file '/var/lib/urandom/random-seed'
|INIT: Entering runlevel: 2
|Starting internet superserver: inetd done.
|Configuring network interfaces: done.
|Starting telnetd...
|Setting sysfs variables....
|
|GNU/Linux 3.5.0-rc6-next-20120712-karo+ on triton1(armv5tejl) ttyAMA0:
--------

So you can have my
Acked-by: Lothar Wa?mann <LW@KARO-electronics.de>
for the patch to convert tx28 to DT.
Thank you very much for your work!


Lothar Wa?mann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 5/7] ARM: mxs: convert tx28 board to device tree
  2012-07-19  6:13               ` Lothar Waßmann
@ 2012-07-19  6:22                 ` Shawn Guo
  0 siblings, 0 replies; 43+ messages in thread
From: Shawn Guo @ 2012-07-19  6:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jul 19, 2012 at 08:13:06AM +0200, Lothar Wa?mann wrote:
> > Have you got the chance to figure it out why it does not work on
> > non-DT kernel?
> > 
> No.
> 
Does not matter then, since you are saying it works with DT, and we
can start replacing those board files with DT support.

> So you can have my
> Acked-by: Lothar Wa?mann <LW@KARO-electronics.de>
> for the patch to convert tx28 to DT.
> 
Great.  Thanks.

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2012-07-19  6:22 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-09  6:14 [PATCH 0/7] Convert mxs board files to device tree Shawn Guo
2012-07-09  6:14 ` [PATCH 1/7] ARM: dts: imx28: move extra gpmi-nand pins into board dts Shawn Guo
2012-07-09  6:14 ` [PATCH 2/7] ARM: dts: imx28: move lcdif control " Shawn Guo
2012-07-09  6:14 ` [PATCH 3/7] ARM: mxs: convert m28evk board to device tree Shawn Guo
2012-07-09  7:10   ` Marek Vasut
2012-07-09  7:27     ` Shawn Guo
2012-07-09  7:32       ` Marek Vasut
2012-07-09  7:42         ` Shawn Guo
2012-07-09  6:14 ` [PATCH 4/7] ARM: mxs: convert apx4devkit " Shawn Guo
2012-07-09 15:15   ` Lauri Hintsala
2012-07-10  4:01     ` Shawn Guo
2012-07-10  7:10       ` Lauri Hintsala
2012-07-09  6:14 ` [PATCH 5/7] ARM: mxs: convert tx28 " Shawn Guo
2012-07-09 13:04   ` Lothar Waßmann
2012-07-09 14:18     ` Shawn Guo
2012-07-13  7:14     ` Shawn Guo
2012-07-13  9:21       ` Lothar Waßmann
2012-07-15 14:49         ` Shawn Guo
2012-07-15 15:00           ` Shawn Guo
2012-07-16  7:03             ` Lothar Waßmann
2012-07-18 13:36               ` Shawn Guo
2012-07-19  5:58                 ` Lothar Waßmann
2012-07-19  6:05                   ` Shawn Guo
2012-07-16  7:00           ` Lothar Waßmann
2012-07-18 13:39             ` Shawn Guo
2012-07-19  6:13               ` Lothar Waßmann
2012-07-19  6:22                 ` Shawn Guo
2012-07-09  6:14 ` [PATCH 6/7] ARM: mxs: convert stmp378x_devb " Shawn Guo
2012-07-09  6:14 ` [PATCH 7/7] ARM: mxs: add dtb-y target into Makefile.boot Shawn Guo
2012-07-09  7:04 ` [PATCH 0/7] Convert mxs board files to device tree Marek Vasut
2012-07-09  7:13   ` Shawn Guo
2012-07-09  7:33     ` Marek Vasut
2012-07-09  7:33       ` Marek Vasut
2012-07-09  8:06 ` [PATCH 3/7] ARM: mxs: convert m28evk board " Shawn Guo
2012-07-09  8:18   ` Marek Vasut
2012-07-09  8:40     ` Shawn Guo
2012-07-09  8:46       ` Marek Vasut
2012-07-09  9:02         ` Shawn Guo
2012-07-09  9:50           ` Marek Vasut
2012-07-09 14:23             ` Shawn Guo
2012-07-09  8:50       ` Marek Vasut
2012-07-09  9:00         ` Shawn Guo
2012-07-09  8:07 ` [PATCH 6/7] ARM: mxs: convert stmp378x_devb " Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.