Skip to contentSkip to conversation

ARM: OMAP: convert N950/N9 to DT

PATCH Superseded Aaro Koskinen 2 participants 6 messages Sep 21, 2013 – Sep 23, 2013

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Aaro Koskinen

author maintainer
#0 lore raw

cover ARM: OMAP: convert N950/N9 to DT

Hi,

This adds DTS for N950/N9 and removes the legacy board file. However, I guess the HACK in patch 1 needs to be solved somehow before we can do this...

Aaro Koskinen (3):
ARM: OMAP2: HACK: hardcode hsmmc2 input clock source for N950/N9
ARM: dts: add minimal DT support for Nokia N950 & N9 phones
ARM: OMAP2: delete board-rm680

 arch/arm/boot/dts/Makefile           |   2 +
 arch/arm/boot/dts/omap3-n9.dts       |  18 ++++
 arch/arm/boot/dts/omap3-n950-n9.dtsi | 172 +++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/omap3-n950.dts     |  18 ++++
 arch/arm/mach-omap2/Kconfig          |   7 --
 arch/arm/mach-omap2/Makefile         |   1 -
 arch/arm/mach-omap2/board-generic.c  |  15 +++
 arch/arm/mach-omap2/board-rm680.c    | 167 ----------------------------------
 8 files changed, 225 insertions(+), 175 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap3-n9.dts
 create mode 100644 arch/arm/boot/dts/omap3-n950-n9.dtsi
 create mode 100644 arch/arm/boot/dts/omap3-n950.dts
 delete mode 100644 arch/arm/mach-omap2/board-rm680.c
Signature · 1 line
1.8.4.rc3
author maintainer
#1 lore raw

PATCH 1/3 ARM: OMAP2: HACK: hardcode hsmmc2 input clock source for N950/N9

Without this the eMMC (root file system) cannot be used on N950/N9. Any ideas for a proper solution?

---
 arch/arm/mach-omap2/board-generic.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/mach-omap2/board-generic.c +15 -0
index 39c7838..8be49b3 100644
@@ -20,6 +20,7 @@
 #include <asm/mach/arch.h>
 
 #include "common.h"
+#include "control.h"
 #include "common-board-devices.h"
 #include "dss-common.h"
 
@@ -51,12 +52,26 @@ static void __init legacy_init_ehci_clk(char *clkname)
 	}
 }
 
+static void __init hsmmc2_input_clk(void)
+{
+	u32 reg;
+
+	reg = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
+	reg |= OMAP2_MMCSDIO2ADPCLKISEL;
+	omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1);
+}
+
 static void __init omap_generic_init(void)
 {
 	omap_sdrc_init(NULL, NULL);
 
 	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
 
+	/* HACK: Configure the MMC input clock source on N950/N9. */
+	if (of_machine_is_compatible("nokia,omap3-n950") ||
+	    of_machine_is_compatible("nokia,omap3-n9"))
+		hsmmc2_input_clk();
+
 	/*
 	 * HACK: call display setup code for selected boards to enable omapdss.
 	 * This will be removed when omapdss supports DT.
Signature · 1 line
1.8.4.rc3
maintainer
#2 lore raw

PATCH 1/3 ARM: OMAP2: HACK: hardcode hsmmc2 input clock source for N950/N9

Quoted 38 lines · Aaro Koskinen

Without this the eMMC (root file system) cannot be used on N950/N9. Any ideas for a proper solution?

---
 arch/arm/mach-omap2/board-generic.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/mach-omap2/board-generic.c +10 -0
index 39c7838..8be49b3 100644
@@ -20,6 +20,7 @@
 #include <asm/mach/arch.h>
 
 #include "common.h"
+#include "control.h"
 #include "common-board-devices.h"
 #include "dss-common.h"
 
@@ -51,12 +52,26 @@ static void __init legacy_init_ehci_clk(char *clkname)
 	}
 }
 
+static void __init hsmmc2_input_clk(void)
+{
+	u32 reg;
+
+	reg = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
+	reg |= OMAP2_MMCSDIO2ADPCLKISEL;
+	omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1);
+}
+
 static void __init omap_generic_init(void)
 {
 	omap_sdrc_init(NULL, NULL);
 

arch/arm/mach-omap2/board-generic.c static void __init legacy_init_ehci_clk(char *clkname) · line 77

Quoted 10 lines
arch/arm/mach-omap2/board-generic.c +5 -0
 	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
 
+	/* HACK: Configure the MMC input clock source on N950/N9. */
+	if (of_machine_is_compatible("nokia,omap3-n950") ||
+	    of_machine_is_compatible("nokia,omap3-n9"))
+		hsmmc2_input_clk();
+
 	/*
 	 * HACK: call display setup code for selected boards to enable omapdss.
 	 * This will be removed when omapdss supports DT.

Can you please update this patch on the quirks series I posted few days ago?

Regards,

Tony

author maintainer
#3 lore raw

PATCH 1/3 ARM: OMAP2: HACK: hardcode hsmmc2 input clock source for N950/N9

Hi,

Quoted 6 lines · Tony Lindgren
Quoted 2 lines · Aaro Koskinen

Without this the eMMC (root file system) cannot be used on N950/N9. Any ideas for a proper solution?

Can you please update this patch on the quirks series I posted few days ago?

Ok, will do (sorry I missed that series).

Thanks,

A.

author maintainer
#4 lore raw

PATCH 2/3 ARM: dts: add minimal DT support for Nokia N950 & N9 phones

In reply to Aaro Koskinen

Add minimal DT support for Nokia N950 & N9 phones. The same functionality that is provided by the current board file should work: serial console, USB, OneNAND and MMC.

---
 arch/arm/boot/dts/Makefile           |   2 +
 arch/arm/boot/dts/omap3-n9.dts       |  18 ++++
 arch/arm/boot/dts/omap3-n950-n9.dtsi | 172 +++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/omap3-n950.dts     |  18 ++++
 4 files changed, 210 insertions(+)
 create mode 100644 arch/arm/boot/dts/omap3-n9.dts
 create mode 100644 arch/arm/boot/dts/omap3-n950-n9.dtsi
 create mode 100644 arch/arm/boot/dts/omap3-n950.dts
arch/arm/boot/dts/Makefile +2 -0
index cc0f1fb..5680410 100644
@@ -173,6 +173,8 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
 	omap3-tobi.dtb \
 	omap3-igep0020.dtb \
 	omap3-igep0030.dtb \
+	omap3-n9.dtb \
+	omap3-n950.dtb \
 	omap4-panda.dtb \
 	omap4-panda-a4.dtb \
 	omap4-panda-es.dtb \
arch/arm/boot/dts/omap3-n9.dts new file +18 -0
new file mode 100644
index 0000000..39828ce
@@ -0,0 +1,18 @@
+/*
+ * omap3-n9.dts - Device Tree file for Nokia N9
+ *
+ * Written by: Aaro Koskinen <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "omap3-n950-n9.dtsi"
+
+/ {
+	model = "Nokia N9";
+	compatible = "nokia,omap3-n9", "ti,omap3";
+};
arch/arm/boot/dts/omap3-n950-n9.dtsi new file +172 -0

172 lines not on this page · raw message

arch/arm/boot/dts/omap3-n950.dts new file +18 -0
new file mode 100644
index 0000000..b076a52
@@ -0,0 +1,18 @@
+/*
+ * omap3-n950.dts - Device Tree file for Nokia N950
+ *
+ * Written by: Aaro Koskinen <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "omap3-n950-n9.dtsi"
+
+/ {
+	model = "Nokia N950";
+	compatible = "nokia,omap3-n950", "ti,omap3";
+};
Signature · 1 line
1.8.4.rc3
author maintainer
#5 lore raw

PATCH 3/3 ARM: OMAP2: delete board-rm680

In reply to Aaro Koskinen

Delete board file for Nokia RM-680/RM-696 (N950/N9). DT-based booting should be used for further development on this HW.

---
 arch/arm/mach-omap2/Kconfig       |   7 --
 arch/arm/mach-omap2/Makefile      |   1 -
 arch/arm/mach-omap2/board-rm680.c | 167 --------------------------------------
 3 files changed, 175 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/Kconfig +0 -7
index b5fb5f7..5a8e6bf 100644
@@ -314,13 +314,6 @@ config MACH_NOKIA_N8X0
 	select MACH_NOKIA_N810_WIMAX
 	select OMAP_PACKAGE_ZAC
 
-config MACH_NOKIA_RM680
-	bool "Nokia N950 (RM-680) / N9 (RM-696) phones"
-	depends on ARCH_OMAP3
-	default y
-	select MACH_NOKIA_RM696
-	select OMAP_PACKAGE_CBB
-
 config MACH_NOKIA_RX51
 	bool "Nokia N900 (RX-51) phone"
 	depends on ARCH_OMAP3
arch/arm/mach-omap2/Makefile +0 -1
index afb457c..8d6d156 100644
@@ -246,7 +246,6 @@ obj-$(CONFIG_MACH_OMAP3EVM)		+= board-omap3evm.o
 obj-$(CONFIG_MACH_OMAP3_PANDORA)	+= board-omap3pandora.o
 obj-$(CONFIG_MACH_OMAP_3430SDP)		+= board-3430sdp.o
 obj-$(CONFIG_MACH_NOKIA_N8X0)		+= board-n8x0.o
-obj-$(CONFIG_MACH_NOKIA_RM680)		+= board-rm680.o sdram-nokia.o
 obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51.o sdram-nokia.o
 obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51-peripherals.o
 obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51-video.o
arch/arm/mach-omap2/board-rm680.c deleted +0 -167

167 lines not on this page · raw message

Signature · 1 line
1.8.4.rc3