diff mbox

[v2] ARM: mx25pdk: Add device tree support

Message ID 1357230455-12690-1-git-send-email-fabio.estevam@freescale.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Estevam Jan. 3, 2013, 4:27 p.m. UTC
Add basic device tree support for mx25pdk board.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Follow the new dt style and rebased against Shawn's imx/dt tree.

 Documentation/devicetree/bindings/arm/fsl.txt |    4 +++
 arch/arm/boot/dts/Makefile                    |    1 +
 arch/arm/boot/dts/imx25-pdk.dts               |   36 +++++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx25-pdk.dts

Comments

Shawn Guo Jan. 4, 2013, 5:13 a.m. UTC | #1
On Thu, Jan 03, 2013 at 02:27:35PM -0200, Fabio Estevam wrote:
> --- /dev/null
> +++ b/arch/arm/boot/dts/imx25-pdk.dts
> @@ -0,0 +1,36 @@
> +/*
> + * Copyright 2013 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/ "imx25.dtsi"
> +
> +/ {
> +	model = "Freescale i.MX25 Product Development Kit";
> +	compatible = "fsl,imx25-pdk", "fsl,imx25";
> +
> +	memory {
> +		reg = <0x80000000 0x4000000>;

Isn't imx25-pdk equipped with a 128 MB DDR?

> +	};
> +};
> +
> +&uart1 {
> +	status = "okay";
> +};
> +
> +&fec {
> +	status = "okay";
> +	phy-mode = "rmii";

Let the "status" be the last one.

Shawn

> +};
> +
> +&nfc {
> +	nand-on-flash-bbt;
> +	status = "okay";
> +};
> -- 
> 1.7.9.5
> 
>
Fabio Estevam Jan. 4, 2013, 11:29 a.m. UTC | #2
On Fri, Jan 4, 2013 at 3:13 AM, Shawn Guo <shawn.guo@linaro.org> wrote:

>> +     model = "Freescale i.MX25 Product Development Kit";
>> +     compatible = "fsl,imx25-pdk", "fsl,imx25";
>> +
>> +     memory {
>> +             reg = <0x80000000 0x4000000>;
>
> Isn't imx25-pdk equipped with a 128 MB DDR?

Production version of the board has 64MB. Check this comment from FSL U-boot:

/* iMX25 V-1.0 has 128MB but V-1.1 has only 64MB */
#ifdef CONFIG_MX25_3DS_V10
#define PHYS_SDRAM_1_SIZE	(128 * 1024 * 1024)
#else
#define PHYS_SDRAM_1_SIZE       (64 * 1024 * 1024)
#endif

Should I use reg = <0x0 0x0>; instead and let the bootloader detect
the RAM size?

Regards,

Fabio Estevam
Shawn Guo Jan. 4, 2013, 11:47 a.m. UTC | #3
On Fri, Jan 04, 2013 at 09:29:46AM -0200, Fabio Estevam wrote:
> On Fri, Jan 4, 2013 at 3:13 AM, Shawn Guo <shawn.guo@linaro.org> wrote:
> 
> >> +     model = "Freescale i.MX25 Product Development Kit";
> >> +     compatible = "fsl,imx25-pdk", "fsl,imx25";
> >> +
> >> +     memory {
> >> +             reg = <0x80000000 0x4000000>;
> >
> > Isn't imx25-pdk equipped with a 128 MB DDR?
> 
> Production version of the board has 64MB. Check this comment from FSL U-boot:
> 
> /* iMX25 V-1.0 has 128MB but V-1.1 has only 64MB */
> #ifdef CONFIG_MX25_3DS_V10
> #define PHYS_SDRAM_1_SIZE	(128 * 1024 * 1024)
> #else
> #define PHYS_SDRAM_1_SIZE       (64 * 1024 * 1024)
> #endif

I'm good then.  Let's target production version.  I will fix up the
other minor comment I gave and apply the patch, so that you do not
have to resend.

Shawn
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt
index 4c25c98..e935d7d 100644
--- a/Documentation/devicetree/bindings/arm/fsl.txt
+++ b/Documentation/devicetree/bindings/arm/fsl.txt
@@ -5,6 +5,10 @@  i.MX23 Evaluation Kit
 Required root node properties:
     - compatible = "fsl,imx23-evk", "fsl,imx23";
 
+i.MX25 Product Development Kit
+Required root node properties:
+    - compatible = "fsl,imx25-pdk", "fsl,imx25";
+
 i.MX27 Product Development Kit
 Required root node properties:
     - compatible = "fsl,imx27-pdk", "fsl,imx27";
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e3ae5e2..ffcdb61 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -81,6 +81,7 @@  dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
 	armada-xp-openblocks-ax3-4.dtb
 dtb-$(CONFIG_ARCH_MXC) += \
 	imx25-karo-tx25.dtb \
+	imx25-pdk.dtb \
 	imx27-apf27.dtb \
 	imx27-pdk.dtb \
 	imx31-bug.dtb \
diff --git a/arch/arm/boot/dts/imx25-pdk.dts b/arch/arm/boot/dts/imx25-pdk.dts
new file mode 100644
index 0000000..b430ed7
--- /dev/null
+++ b/arch/arm/boot/dts/imx25-pdk.dts
@@ -0,0 +1,36 @@ 
+/*
+ * Copyright 2013 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/ "imx25.dtsi"
+
+/ {
+	model = "Freescale i.MX25 Product Development Kit";
+	compatible = "fsl,imx25-pdk", "fsl,imx25";
+
+	memory {
+		reg = <0x80000000 0x4000000>;
+	};
+};
+
+&uart1 {
+	status = "okay";
+};
+
+&fec {
+	status = "okay";
+	phy-mode = "rmii";
+};
+
+&nfc {
+	nand-on-flash-bbt;
+	status = "okay";
+};