Skip to contentSkip to conversation

Initial DT support for SIMpad devices.

PATCH New Jochen Friedrich 2 participants 2 messages Nov 21, 2011 – Nov 22, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Initial DT support for SIMpad devices.

---

V2:
- make localbus "simple-bus" compatible.
- add soc compatible entry to board.
- add sample partition table to DTS.
- fix flash bus width.
- switch to DT initialization of flash.

 .../devicetree/bindings/vendor-prefixes.txt        |    1 +
 arch/arm/boot/dts/sa1110.dtsi                      |   72 +++++++++++++++++++
 arch/arm/boot/dts/simpad.dts                       |   75 ++++++++++++++++++++
 arch/arm/mach-sa1100/Kconfig                       |   13 ++++
 arch/arm/mach-sa1100/Makefile.boot                 |    1 +
 arch/arm/mach-sa1100/simpad.c                      |   27 +++++++-
 6 files changed, 188 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/boot/dts/sa1110.dtsi
 create mode 100644 arch/arm/boot/dts/simpad.dts
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index 5b14518..cbe7046 100644
@@ -34,6 +34,7 @@ qcom	Qualcomm, Inc.
 ramtron	Ramtron International
 samsung	Samsung Semiconductor
 schindler	Schindler
+siemens	SIEMENS
 simtek
 sirf	SiRF Technology, Inc.
 stericsson	ST-Ericsson
arch/arm/boot/dts/sa1110.dtsi new file +72 -0

72 lines not on this page · raw message

arch/arm/boot/dts/simpad.dts new file +75 -0

75 lines not on this page · raw message

arch/arm/mach-sa1100/Kconfig +13 -0
index 42625e4..31238c3 100644
@@ -157,6 +157,19 @@ config SA1100_SIMPAD
 	  like CL4 in additional it has a PCMCIA-Slot. For more information
 	  visit <http://www.usa.siemens.com/> or <http://www.siemens.ch/>.
 
+config SA1100_SIMPAD_DT
+	bool "Simpad with device tree support"
+	select CPU_FREQ_SA1110
+	select SA1100_SIMPAD
+	select USE_OF
+	help
+	  The SIEMENS webpad SIMpad is based on the StrongARM 1110. There
+	  are two different versions CL4 and SL4. CL4 has 32MB RAM and 16MB
+	  FLASH. The SL4 version got 64 MB RAM and 32 MB FLASH and a
+	  PCMCIA-Slot. The version for the Germany Telecom (DTAG) is the same
+	  like CL4 in additional it has a PCMCIA-Slot. For more information
+	  visit <http://www.usa.siemens.com/> or <http://www.siemens.ch/>.
+
 config SA1100_SSP
 	tristate "Generic PIO SSP"
 	help
arch/arm/mach-sa1100/Makefile.boot +1 -0
index 5a616f6..1d17767 100644
@@ -6,3 +6,4 @@ endif
 params_phys-y	:= 0xc0000100
 initrd_phys-y	:= 0xc0800000
 
+dtb-$(CONFIG_SA1100_SIMPAD_DT)		+= simpad.dtb
arch/arm/mach-sa1100/simpad.c +26 -1
index d3c9d2b..fb8b224 100644
@@ -10,6 +10,7 @@
 #include <linux/string.h> 
 #include <linux/pm.h>
 #include <linux/platform_device.h>
+#include <linux/of_platform.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/io.h>
@@ -151,6 +152,7 @@ static struct sa1100_port_fns simpad_port_fns __initdata = {
 };
 
 
+#ifndef CONFIG_OF
 static struct mtd_partition simpad_partitions[] = {
 	{
 		.name       = "SIMpad boot firmware",
@@ -186,6 +188,7 @@ static struct resource simpad_flash_resources [] = {
 		.flags     = IORESOURCE_MEM,
 	}
 };
+#endif
 
 static struct mcp_plat_data simpad_mcp_data = {
 	.mccr0		= MCCR0_ADM,
@@ -211,8 +214,9 @@ static void __init simpad_map_io(void)
 
 	sa1100_register_uart_fns(&simpad_port_fns);
 	sa1100_register_uart(0, 3);  /* serial interface */
+#ifndef CONFIG_OF
 	sa1100_register_uart(1, 1);  /* DECT             */
-
+#endif
 	// Reassign UART 1 pins
 	GAFR |= GPIO_UART_TXD | GPIO_UART_RXD;
 	GPDR |= GPIO_UART_TXD | GPIO_LDD13 | GPIO_LDD15;
@@ -379,8 +383,10 @@ static int __init simpad_init(void)
 
 	pm_power_off = simpad_power_off;
 
+#ifndef CONFIG_OF
 	sa11x0_register_mtd(&simpad_flash_data, simpad_flash_resources,
 			      ARRAY_SIZE(simpad_flash_resources));
+#endif
 	sa11x0_register_mcp(&simpad_mcp_data);
 
 	ret = platform_add_devices(devices, ARRAY_SIZE(devices));
@@ -392,6 +398,25 @@ static int __init simpad_init(void)
 
 arch_initcall(simpad_init);
 
+#ifdef CONFIG_OF
+static void __init simpad_dt_device_init(void)
+{
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
+
+static const char *simpad_dt_board_compat[] __initconst = {
+	"siemens,simpad",
+	NULL
+};
+
+DT_MACHINE_START(simpad_dt, "SIMpad")
+	.timer		= &sa1100_timer,
+	.map_io		= simpad_map_io,
+	.init_irq	= sa1100_init_irq,
+	.init_machine	= simpad_dt_device_init,
+	.dt_compat	= simpad_dt_board_compat,
+MACHINE_END
+#endif
 
 MACHINE_START(SIMPAD, "Simpad")
 	/* Maintainer: Holger Freyther */
Signature · 1 line
1.7.7.3