Skip to contentSkip to conversation

ARM: mx23: Add initial support for olinuxino board

PATCH New Fabio Estevam 4 participants 7 messages Jun 17, 2012 – Jun 18, 2012

Subsystems (4)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 ARM: mx23: Add initial support for olinuxino board

From: Fabio Estevam <[email protected]>

mx23-olinuxino is a low cost board designed by Olimex.

It has the following features:

- Freescale iMX233 ARM926J processor at 454MHz
-64 MB RAM
-SD-card connector
-TV PAL/NTSC video output
-2 USB High Speed Hosts
-Ethernet 100 Mbit
-Stereo Audio Input
-Stereo Headphones Audio Output

More information at:
http://www.olimex.com/dev/imx233-olinuxino-maxi.html

---
 Documentation/devicetree/bindings/arm/fsl.txt |    4 ++
 arch/arm/boot/dts/imx23-olinuxino.dts         |   45 +++++++++++++++++++++++++
 arch/arm/boot/dts/imx23.dtsi                  |   14 ++++++++
 arch/arm/mach-mxs/mach-mxs.c                  |    1 +
 4 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/imx23-olinuxino.dts
Documentation/devicetree/bindings/arm/fsl.txt +4 -0
index ac9e751..ca2bc1c 100644
@@ -5,6 +5,10 @@ i.MX23 Evaluation Kit
 Required root node properties:
     - compatible = "fsl,imx23-evk", "fsl,imx23";
 
+i.MX23 Olinuxino Low Cost Board
+Required root node properties:
+    - compatible = "fsl,imx23-olinuxino", "fsl,imx23";
+
 i.MX28 Evaluation Kit
 Required root node properties:
     - compatible = "fsl,imx28-evk", "fsl,imx28";
arch/arm/boot/dts/imx23-olinuxino.dts new file +44 -0

44 lines not on this page · raw message

arch/arm/boot/dts/imx23.dtsi +14 -0
index 8c5f999..89044f0 100644
@@ -134,6 +134,20 @@
 					fsl,pinmux-ids = <0x2010 0x2060>;
 					fsl,pull-up = <0>;
 				};
+
+				mmc0_4bit_pins_a: mmc0-4bit at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <0x2000 0x2020 0x2030
+						0x2040 0x2050>;
+					fsl,drive-strength = <1>;
+					fsl,voltage = <1>;
+					fsl,pull-up = <1>;
+				};
+
+				mmc0_sck_cfg: mmc0_sck_cfg {
+					fsl,pinmux-ids = <0x2010>;
+					fsl,pull-up = <0>;
+				};
 			};
 
 			digctl at 8001c000 {
arch/arm/mach-mxs/mach-mxs.c +1 -0
index 8cac94b..a321753 100644
@@ -92,6 +92,7 @@ static void __init mxs_machine_init(void)
 
 static const char *imx23_dt_compat[] __initdata = {
 	"fsl,imx23-evk",
+	"fsl,imx23-olinuxino",
 	"fsl,imx23",
 	NULL,
 };
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 ARM: mx23: Add initial support for olinuxino board

Dear Fabio Estevam,

Quoted 124 lines

From: Fabio Estevam <[email protected]>

mx23-olinuxino is a low cost board designed by Olimex.

It has the following features:

- Freescale iMX233 ARM926J processor at 454MHz
-64 MB RAM

(quoted diff) +0 -6
-SD-card connector
-TV PAL/NTSC video output
-2 USB High Speed Hosts
-Ethernet 100 Mbit
-Stereo Audio Input
-Stereo Headphones Audio Output

More information at:
http://www.olimex.com/dev/imx233-olinuxino-maxi.html

---
 Documentation/devicetree/bindings/arm/fsl.txt |    4 ++
 arch/arm/boot/dts/imx23-olinuxino.dts         |   45
+++++++++++++++++++++++++ arch/arm/boot/dts/imx23.dtsi                  | 
 14 ++++++++
 arch/arm/mach-mxs/mach-mxs.c                  |    1 +
 4 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/imx23-olinuxino.dts
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/arm/fsl.txt index ac9e751..ca2bc1c 100644

Documentation/devicetree/bindings/arm/fsl.txt +4 -0
@@ -5,6 +5,10 @@ i.MX23 Evaluation Kit
 Required root node properties:
     - compatible = "fsl,imx23-evk", "fsl,imx23";
 
+i.MX23 Olinuxino Low Cost Board
+Required root node properties:
+    - compatible = "fsl,imx23-olinuxino", "fsl,imx23";
+
 i.MX28 Evaluation Kit
 Required root node properties:
     - compatible = "fsl,imx28-evk", "fsl,imx28";
(quoted diff) +0 -0

b/arch/arm/boot/dts/imx23-olinuxino.dts new file mode 100644 index 0000000..3c56010

arch/arm/boot/dts/imx23-olinuxino.dts new file +44 -0
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2012 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <[email protected]>
+ *
+ * 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 = "i.MX23 Olinuxino Low Cost Board";
+	compatible = "fsl,imx23-olinuxino", "fsl,imx23";
+
+	memory {
+		reg = <0x40000000 0x08000000>;
+	};
+
+	apb at 80000000 {
+		apbh at 80000000 {
+			ssp0: ssp at 80010000 {
+				compatible = "fsl,imx23-mmc";
+				pinctrl-names = "default";
+				pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_sck_cfg>;
+				bus-width = <4>;
+				status = "okay";
+			};
+		};
+
+		apbx at 80040000 {
+			duart: serial at 80070000 {
+				pinctrl-names = "default";
+				pinctrl-0 = <&duart_pins_a>;
+				status = "okay";
+			};
+		};
+	};
+};
arch/arm/boot/dts/imx23.dtsi +14 -0
index 8c5f999..89044f0 100644
@@ -134,6 +134,20 @@
 					fsl,pinmux-ids = <0x2010 0x2060>;
 					fsl,pull-up = <0>;
 				};
+
+				mmc0_4bit_pins_a: mmc0-4bit at 0 {
+					reg = <0>;
+					fsl,pinmux-ids = <0x2000 0x2020 0x2030
+						0x2040 0x2050>;
+					fsl,drive-strength = <1>;
+					fsl,voltage = <1>;
+					fsl,pull-up = <1>;
+				};
+
+				mmc0_sck_cfg: mmc0_sck_cfg {
+					fsl,pinmux-ids = <0x2010>;
+					fsl,pull-up = <0>;
+				};
 			};
 
 			digctl at 8001c000 {
arch/arm/mach-mxs/mach-mxs.c +0 -0
index 8cac94b..a321753 100644

arch/arm/mach-mxs/mach-mxs.c static void __init mxs_machine_init(void) · line 95

Quoted 4 lines
arch/arm/mach-mxs/mach-mxs.c +1 -0
@@ -92,6 +92,7 @@ static void __init mxs_machine_init(void)
 
 static const char *imx23_dt_compat[] __initdata = {
 	"fsl,imx23-evk",
+	"fsl,imx23-olinuxino",

Is this addition needed?

arch/arm/mach-mxs/mach-mxs.c static void __init mxs_machine_init(void) · line 98

Quoted 3 lines
arch/arm/mach-mxs/mach-mxs.c +0 -0
 	"fsl,imx23",
 	NULL,
 };

Best regards,
Marek Vasut

author reviewer
#2 lore raw

PATCH 1/1 ARM: mx23: Add initial support for olinuxino board

Quoted 5 lines · Marek Vasut
Quoted 3 lines

?static const char *imx23_dt_compat[] __initdata = { ? ? ? "fsl,imx23-evk",
+ ? ? "fsl,imx23-olinuxino",

Is this addition needed?

Actually it is not required. Board boots just fine without it.

I have just kept this for compatibilty with other i.MX boards boards added to dt.

I followed the same approach from imx6q_dt_compat and imx53_dt_compat.

author reviewer
#3 lore raw

PATCH 1/1 ARM: mx23: Add initial support for olinuxino board

Quoted 6 lines · Fabio Estevam
Quoted 4 lines · Marek Vasut
Quoted 3 lines

?static const char *imx23_dt_compat[] __initdata = { ? ? ? "fsl,imx23-evk",
+ ? ? "fsl,imx23-olinuxino",

Quoted 8 lines
Quoted 1 line

Is this addition needed?

Actually it is not required. Board boots just fine without it.

I have just kept this for compatibilty with other i.MX boards boards added to dt.

I followed the same approach from imx6q_dt_compat and imx53_dt_compat.

I would prefer to do something like that instead:

static const char *<soc>_dt_compat[] __initdata = {
	"fsl,<soc>",
	NULL,
}

,this way we do not have to patch a C file when adding a new board file.

Shawn, what do you think?

Should I drop the "fsl,imx23-olinuxino",

addition of this patch and then work on another patch that keeps the

static const char *<soc>_dt_compat[] __initdata = {
	"fsl,<soc>",
	NULL,
}

approach?

maintainer
#4 lore raw

PATCH 1/1 ARM: mx23: Add initial support for olinuxino board

Quoted 16 lines · Fabio Estevam
Quoted 6 lines · Fabio Estevam
Quoted 4 lines · Marek Vasut
Quoted 3 lines

?static const char *imx23_dt_compat[] __initdata = { ? ? ? "fsl,imx23-evk",
+ ? ? "fsl,imx23-olinuxino",

Quoted 8 lines
Quoted 1 line

Is this addition needed?

Actually it is not required. Board boots just fine without it.

I have just kept this for compatibilty with other i.MX boards boards added to dt.

I followed the same approach from imx6q_dt_compat and imx53_dt_compat.

Quoted 9 lines

I would prefer to do something like that instead:

static const char *<soc>_dt_compat[] __initdata = {
	"fsl,<soc>",
	NULL,
}

,this way we do not have to patch a C file when adding a new board file.

There already is a fsl,imx23 compatible entry, you just have to use it.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#5 lore raw

PATCH 1/1 ARM: mx23: Add initial support for olinuxino board

In reply to Marek Vasut
Quoted 6 lines · Marek Vasut

arch/arm/mach-mxs/mach-mxs.c static void __init mxs_machine_init(void) · line 95

Quoted 3 lines

static const char *imx23_dt_compat[] __initdata = {

arch/arm/mach-mxs/mach-mxs.c +1 -0
 	"fsl,imx23-evk",
+	"fsl,imx23-olinuxino",

Is this addition needed?

Unlike the .of_match_table of platform_driver, I would prefer to maintain such an explicit compatible list to show all the in-tree boards supported by the DT_MACHINE. Also, if we only list "fsl,imx23" there, I'm a little worrying about people will start even dropping the board compatible string from their board dts, then we will have no way to play of_machine_is_compatible().

Regards,
Shawn

Quoted 4 lines
Quoted 3 lines
arch/arm/mach-mxs/mach-mxs.c +0 -0
 	"fsl,imx23",
 	NULL,
 };
#6 lore raw

PATCH 1/1 ARM: mx23: Add initial support for olinuxino board

In reply to Fabio Estevam
Quoted 32 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

mx23-olinuxino is a low cost board designed by Olimex.

It has the following features:

- Freescale iMX233 ARM926J processor at 454MHz
-64 MB RAM

(quoted diff) +0 -6
-SD-card connector
-TV PAL/NTSC video output
-2 USB High Speed Hosts
-Ethernet 100 Mbit
-Stereo Audio Input
-Stereo Headphones Audio Output

More information at:
http://www.olimex.com/dev/imx233-olinuxino-maxi.html

---
 Documentation/devicetree/bindings/arm/fsl.txt |    4 ++
 arch/arm/boot/dts/imx23-olinuxino.dts         |   45 +++++++++++++++++++++++++
 arch/arm/boot/dts/imx23.dtsi                  |   14 ++++++++
 arch/arm/mach-mxs/mach-mxs.c                  |    1 +
 4 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/imx23-olinuxino.dts
Documentation/devicetree/bindings/arm/fsl.txt +0 -0
index ac9e751..ca2bc1c 100644

Documentation/devicetree/bindings/arm/fsl.txt i.MX23 Evaluation Kit · line 11

Quoted 7 lines
Documentation/devicetree/bindings/arm/fsl.txt +4 -0
@@ -5,6 +5,10 @@ i.MX23 Evaluation Kit
 Required root node properties:
     - compatible = "fsl,imx23-evk", "fsl,imx23";
 
+i.MX23 Olinuxino Low Cost Board
+Required root node properties:
+    - compatible = "fsl,imx23-olinuxino", "fsl,imx23";
+

I'm not sure it's appropriate to have these in fsl.txt which should only contain the boards made by Freescale I think.

And I even think the compatible string should be something like "olimex,imx23-olinuxino"?

Regards,
Shawn