All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Initial DT support for SIMpad devices.
@ 2011-11-20 20:37 ` Jochen Friedrich
  0 siblings, 0 replies; 8+ messages in thread
From: Jochen Friedrich @ 2011-11-20 20:37 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

Signed-off-by: Jochen Friedrich <jochen-NIgtFMG+Po8@public.gmane.org>
---
 .../devicetree/bindings/vendor-prefixes.txt        |    1 +
 arch/arm/boot/dts/sa1110.dtsi                      |   72 ++++++++++++++++++++
 arch/arm/boot/dts/simpad.dts                       |   49 +++++++++++++
 arch/arm/mach-sa1100/Kconfig                       |   13 ++++
 arch/arm/mach-sa1100/Makefile.boot                 |    1 +
 arch/arm/mach-sa1100/simpad.c                      |   29 ++++++++-
 6 files changed, 164 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/boot/dts/sa1110.dtsi
 create mode 100644 arch/arm/boot/dts/simpad.dts

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 5b14518..cbe7046 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -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
diff --git a/arch/arm/boot/dts/sa1110.dtsi b/arch/arm/boot/dts/sa1110.dtsi
new file mode 100644
index 0000000..e1ca379
--- /dev/null
+++ b/arch/arm/boot/dts/sa1110.dtsi
@@ -0,0 +1,72 @@
+/*
+ * sa1110.dtsi - Device Tree Include file for Intel SA1110 SoC
+ *
+ *  Copyright (C) 2011 Jochen Friedrich <jochen-NIgtFMG+Po8@public.gmane.org>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+	model = "Intel SA1110 SoC";
+	compatible = "intel,sa1110";
+	interrupt-parent = <&aic>;
+
+	cpus {
+		cpu@0 {
+			compatible = "intel,sa1110";
+		};
+	};
+
+	localbus {
+		compatible = "intel,sa1110-localbus";
+		#address-cells = <2>;
+		#size-cells = <1>;
+
+		ranges = <
+			0x0 0x0 0x00000000 0x08000000
+			0x1 0x0 0x08000000 0x08000000
+			0x2 0x0 0x10000000 0x08000000
+			0x3 0x0 0x18000000 0x08000000
+			0x4 0x0 0x40000000 0x08000000
+			0x5 0x0 0x48000000 0x08000000
+		>;
+	};
+
+	soc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		uart0: serial@0x80010000 {
+			compatible = "intel,sa1100-uart";
+			reg = <0x80010000 0x24>;
+			interrupts = <15>;
+			status = "disabled";
+		};
+
+		uart1: serial@0x80030000 {
+			compatible = "intel,sa1100-uart";
+			reg = <0x80030000 0x24>;
+			interrupts = <16>;
+			status = "disabled";
+		};
+
+		uart2: serial@0x80050000 {
+			compatible = "intel,sa1100-uart";
+			reg = <0x80050000 0x24>;
+			interrupts = <17>;
+			status = "disabled";
+		};
+
+		aic: interrupt-controller@0x90050000 {
+			compatible = "intel,sa1110-icr";
+			reg = <0x90050000 0x24>;
+			#interrupt-cells = <1>;
+			interrupt-controller;
+			interrupt-parent;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/simpad.dts b/arch/arm/boot/dts/simpad.dts
new file mode 100644
index 0000000..fdd7969
--- /dev/null
+++ b/arch/arm/boot/dts/simpad.dts
@@ -0,0 +1,49 @@
+/dts-v1/;
+/include/ "sa1110.dtsi"
+
+/ {
+	model = "SIEMENS, SIMpad";
+	compatible = "siemens,simpad";
+
+	aliases {
+		serial0 = &uart2;
+		serial1 = &uart0;
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x0 0x08000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttySA0";
+	};
+
+	localbus {
+		flash@0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0 0x08000000>;
+			bank-width = <1>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
+
+		flash@1,0 {
+			compatible = "cfi-flash";
+			reg = <1 0 0x08000000>;
+			bank-width = <1>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
+	};
+
+	soc {
+		uart0: serial@0x80010000 {
+			status = "okay";
+		};
+
+		uart2: serial@0x80050000 {
+			status = "okay";
+		};
+	};
+};
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
index 42625e4..31238c3 100644
--- a/arch/arm/mach-sa1100/Kconfig
+++ b/arch/arm/mach-sa1100/Kconfig
@@ -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
diff --git a/arch/arm/mach-sa1100/Makefile.boot b/arch/arm/mach-sa1100/Makefile.boot
index 5a616f6..1d17767 100644
--- a/arch/arm/mach-sa1100/Makefile.boot
+++ b/arch/arm/mach-sa1100/Makefile.boot
@@ -6,3 +6,4 @@ endif
 params_phys-y	:= 0xc0000100
 initrd_phys-y	:= 0xc0800000
 
+dtb-$(CONFIG_SA1100_SIMPAD_DT)		+= simpad.dtb
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index d3c9d2b..9d6f663 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -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>
@@ -211,8 +212,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;
@@ -392,6 +394,31 @@ static int __init simpad_init(void)
 
 arch_initcall(simpad_init);
 
+#ifdef CONFIG_OF
+const struct of_device_id simpad_bus_match_table[] = {
+	{ .compatible = "simple-bus", },
+	{ .compatible = "intel,sa1110-localbus", },
+	{} /* Empty terminated list */
+};
+
+static void __init simpad_dt_device_init(void)
+{
+	of_platform_populate(NULL, simpad_bus_match_table, NULL, NULL);
+}
+
+static const char *simpad_dt_board_compat[] __initdata = {
+	"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 */
-- 
1.7.7.3

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

* [PATCH] Initial DT support for SIMpad devices.
@ 2011-11-20 20:37 ` Jochen Friedrich
  0 siblings, 0 replies; 8+ messages in thread
From: Jochen Friedrich @ 2011-11-20 20:37 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
 .../devicetree/bindings/vendor-prefixes.txt        |    1 +
 arch/arm/boot/dts/sa1110.dtsi                      |   72 ++++++++++++++++++++
 arch/arm/boot/dts/simpad.dts                       |   49 +++++++++++++
 arch/arm/mach-sa1100/Kconfig                       |   13 ++++
 arch/arm/mach-sa1100/Makefile.boot                 |    1 +
 arch/arm/mach-sa1100/simpad.c                      |   29 ++++++++-
 6 files changed, 164 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/boot/dts/sa1110.dtsi
 create mode 100644 arch/arm/boot/dts/simpad.dts

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 5b14518..cbe7046 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -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
diff --git a/arch/arm/boot/dts/sa1110.dtsi b/arch/arm/boot/dts/sa1110.dtsi
new file mode 100644
index 0000000..e1ca379
--- /dev/null
+++ b/arch/arm/boot/dts/sa1110.dtsi
@@ -0,0 +1,72 @@
+/*
+ * sa1110.dtsi - Device Tree Include file for Intel SA1110 SoC
+ *
+ *  Copyright (C) 2011 Jochen Friedrich <jochen@scram.de>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+	model = "Intel SA1110 SoC";
+	compatible = "intel,sa1110";
+	interrupt-parent = <&aic>;
+
+	cpus {
+		cpu at 0 {
+			compatible = "intel,sa1110";
+		};
+	};
+
+	localbus {
+		compatible = "intel,sa1110-localbus";
+		#address-cells = <2>;
+		#size-cells = <1>;
+
+		ranges = <
+			0x0 0x0 0x00000000 0x08000000
+			0x1 0x0 0x08000000 0x08000000
+			0x2 0x0 0x10000000 0x08000000
+			0x3 0x0 0x18000000 0x08000000
+			0x4 0x0 0x40000000 0x08000000
+			0x5 0x0 0x48000000 0x08000000
+		>;
+	};
+
+	soc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		uart0: serial at 0x80010000 {
+			compatible = "intel,sa1100-uart";
+			reg = <0x80010000 0x24>;
+			interrupts = <15>;
+			status = "disabled";
+		};
+
+		uart1: serial at 0x80030000 {
+			compatible = "intel,sa1100-uart";
+			reg = <0x80030000 0x24>;
+			interrupts = <16>;
+			status = "disabled";
+		};
+
+		uart2: serial at 0x80050000 {
+			compatible = "intel,sa1100-uart";
+			reg = <0x80050000 0x24>;
+			interrupts = <17>;
+			status = "disabled";
+		};
+
+		aic: interrupt-controller at 0x90050000 {
+			compatible = "intel,sa1110-icr";
+			reg = <0x90050000 0x24>;
+			#interrupt-cells = <1>;
+			interrupt-controller;
+			interrupt-parent;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/simpad.dts b/arch/arm/boot/dts/simpad.dts
new file mode 100644
index 0000000..fdd7969
--- /dev/null
+++ b/arch/arm/boot/dts/simpad.dts
@@ -0,0 +1,49 @@
+/dts-v1/;
+/include/ "sa1110.dtsi"
+
+/ {
+	model = "SIEMENS, SIMpad";
+	compatible = "siemens,simpad";
+
+	aliases {
+		serial0 = &uart2;
+		serial1 = &uart0;
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x0 0x08000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttySA0";
+	};
+
+	localbus {
+		flash at 0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0 0x08000000>;
+			bank-width = <1>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
+
+		flash at 1,0 {
+			compatible = "cfi-flash";
+			reg = <1 0 0x08000000>;
+			bank-width = <1>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+		};
+	};
+
+	soc {
+		uart0: serial at 0x80010000 {
+			status = "okay";
+		};
+
+		uart2: serial at 0x80050000 {
+			status = "okay";
+		};
+	};
+};
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
index 42625e4..31238c3 100644
--- a/arch/arm/mach-sa1100/Kconfig
+++ b/arch/arm/mach-sa1100/Kconfig
@@ -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
diff --git a/arch/arm/mach-sa1100/Makefile.boot b/arch/arm/mach-sa1100/Makefile.boot
index 5a616f6..1d17767 100644
--- a/arch/arm/mach-sa1100/Makefile.boot
+++ b/arch/arm/mach-sa1100/Makefile.boot
@@ -6,3 +6,4 @@ endif
 params_phys-y	:= 0xc0000100
 initrd_phys-y	:= 0xc0800000
 
+dtb-$(CONFIG_SA1100_SIMPAD_DT)		+= simpad.dtb
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index d3c9d2b..9d6f663 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -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>
@@ -211,8 +212,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;
@@ -392,6 +394,31 @@ static int __init simpad_init(void)
 
 arch_initcall(simpad_init);
 
+#ifdef CONFIG_OF
+const struct of_device_id simpad_bus_match_table[] = {
+	{ .compatible = "simple-bus", },
+	{ .compatible = "intel,sa1110-localbus", },
+	{} /* Empty terminated list */
+};
+
+static void __init simpad_dt_device_init(void)
+{
+	of_platform_populate(NULL, simpad_bus_match_table, NULL, NULL);
+}
+
+static const char *simpad_dt_board_compat[] __initdata = {
+	"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 */
-- 
1.7.7.3

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

* Re: [PATCH] Initial DT support for SIMpad devices.
  2011-11-20 20:37 ` Jochen Friedrich
@ 2011-11-21  9:50     ` Jamie Iles
  -1 siblings, 0 replies; 8+ messages in thread
From: Jamie Iles @ 2011-11-21  9:50 UTC (permalink / raw)
  To: Jochen Friedrich
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Jochen,

Just a couple of nits inline, otherwise looks nice to me!

Jamie

On Sun, Nov 20, 2011 at 09:37:50PM +0100, Jochen Friedrich wrote:
> Signed-off-by: Jochen Friedrich <jochen-NIgtFMG+Po8@public.gmane.org>
> ---
>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>  arch/arm/boot/dts/sa1110.dtsi                      |   72 ++++++++++++++++++++
>  arch/arm/boot/dts/simpad.dts                       |   49 +++++++++++++
>  arch/arm/mach-sa1100/Kconfig                       |   13 ++++
>  arch/arm/mach-sa1100/Makefile.boot                 |    1 +
>  arch/arm/mach-sa1100/simpad.c                      |   29 ++++++++-
>  6 files changed, 164 insertions(+), 1 deletions(-)
>  create mode 100644 arch/arm/boot/dts/sa1110.dtsi
>  create mode 100644 arch/arm/boot/dts/simpad.dts
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 5b14518..cbe7046 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -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
> diff --git a/arch/arm/boot/dts/sa1110.dtsi b/arch/arm/boot/dts/sa1110.dtsi
> new file mode 100644
> index 0000000..e1ca379
> --- /dev/null
> +++ b/arch/arm/boot/dts/sa1110.dtsi
> @@ -0,0 +1,72 @@
> +/*
> + * sa1110.dtsi - Device Tree Include file for Intel SA1110 SoC
> + *
> + *  Copyright (C) 2011 Jochen Friedrich <jochen-NIgtFMG+Po8@public.gmane.org>
> + *
> + * Licensed under GPLv2 or later.
> + */
> +
> +/include/ "skeleton.dtsi"
> +
> +/ {
> +	model = "Intel SA1110 SoC";
> +	compatible = "intel,sa1110";
> +	interrupt-parent = <&aic>;
> +
> +	cpus {
> +		cpu@0 {
> +			compatible = "intel,sa1110";
> +		};
> +	};
> +
> +	localbus {
> +		compatible = "intel,sa1110-localbus";

Could this claim compatibility with simple-bus?

> +		#address-cells = <2>;
> +		#size-cells = <1>;
> +
> +		ranges = <
> +			0x0 0x0 0x00000000 0x08000000
> +			0x1 0x0 0x08000000 0x08000000
> +			0x2 0x0 0x10000000 0x08000000
> +			0x3 0x0 0x18000000 0x08000000
> +			0x4 0x0 0x40000000 0x08000000
> +			0x5 0x0 0x48000000 0x08000000
> +		>;
> +	};
> +
> +	soc {
> +		compatible = "simple-bus";
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges;
> +
> +		uart0: serial@0x80010000 {
> +			compatible = "intel,sa1100-uart";
> +			reg = <0x80010000 0x24>;
> +			interrupts = <15>;
> +			status = "disabled";
> +		};
> +
> +		uart1: serial@0x80030000 {
> +			compatible = "intel,sa1100-uart";
> +			reg = <0x80030000 0x24>;
> +			interrupts = <16>;
> +			status = "disabled";
> +		};
> +
> +		uart2: serial@0x80050000 {
> +			compatible = "intel,sa1100-uart";
> +			reg = <0x80050000 0x24>;
> +			interrupts = <17>;
> +			status = "disabled";

Hmm, I couldn't see status defined in the UART binding or where it was 
used...  Is this required?

> +		};
> +
> +		aic: interrupt-controller@0x90050000 {
> +			compatible = "intel,sa1110-icr";
> +			reg = <0x90050000 0x24>;
> +			#interrupt-cells = <1>;
> +			interrupt-controller;
> +			interrupt-parent;
> +		};
> +	};
> +};
> diff --git a/arch/arm/boot/dts/simpad.dts b/arch/arm/boot/dts/simpad.dts
> new file mode 100644
> index 0000000..fdd7969
> --- /dev/null
> +++ b/arch/arm/boot/dts/simpad.dts
> @@ -0,0 +1,49 @@
> +/dts-v1/;
> +/include/ "sa1110.dtsi"
> +
> +/ {
> +	model = "SIEMENS, SIMpad";
> +	compatible = "siemens,simpad";

It may be worth adding the SoC compatible string after the board one for 
completeness.

> +
> +	aliases {
> +		serial0 = &uart2;
> +		serial1 = &uart0;
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x0 0x08000000>;
> +	};
> +
> +	chosen {
> +		bootargs = "console=ttySA0";

It is preferred for the bootloader to set these up rather than having 
them statically in the DTS if at all possible.

> +	};
> +
> +	localbus {
> +		flash@0,0 {
> +			compatible = "cfi-flash";
> +			reg = <0 0 0x08000000>;
> +			bank-width = <1>;
> +			#size-cells = <1>;
> +			#address-cells = <1>;
> +		};
> +
> +		flash@1,0 {
> +			compatible = "cfi-flash";
> +			reg = <1 0 0x08000000>;
> +			bank-width = <1>;
> +			#size-cells = <1>;
> +			#address-cells = <1>;
> +		};
> +	};
> +
> +	soc {
> +		uart0: serial@0x80010000 {
> +			status = "okay";

And here.

> +		};
> +
> +		uart2: serial@0x80050000 {
> +			status = "okay";
> +		};
> +	};
> +};
> diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
> index 42625e4..31238c3 100644
> --- a/arch/arm/mach-sa1100/Kconfig
> +++ b/arch/arm/mach-sa1100/Kconfig
> @@ -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
> diff --git a/arch/arm/mach-sa1100/Makefile.boot b/arch/arm/mach-sa1100/Makefile.boot
> index 5a616f6..1d17767 100644
> --- a/arch/arm/mach-sa1100/Makefile.boot
> +++ b/arch/arm/mach-sa1100/Makefile.boot
> @@ -6,3 +6,4 @@ endif
>  params_phys-y	:= 0xc0000100
>  initrd_phys-y	:= 0xc0800000
>  
> +dtb-$(CONFIG_SA1100_SIMPAD_DT)		+= simpad.dtb
> diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
> index d3c9d2b..9d6f663 100644
> --- a/arch/arm/mach-sa1100/simpad.c
> +++ b/arch/arm/mach-sa1100/simpad.c
> @@ -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>
> @@ -211,8 +212,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;
> @@ -392,6 +394,31 @@ static int __init simpad_init(void)
>  
>  arch_initcall(simpad_init);
>  
> +#ifdef CONFIG_OF
> +const struct of_device_id simpad_bus_match_table[] = {
> +	{ .compatible = "simple-bus", },
> +	{ .compatible = "intel,sa1110-localbus", },
> +	{} /* Empty terminated list */
> +};
> +
> +static void __init simpad_dt_device_init(void)
> +{
> +	of_platform_populate(NULL, simpad_bus_match_table, NULL, NULL);
> +}

If the localbus was compatible with simple-bus then you could do:

	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);

and remove simpad_bus_match_table.

> +
> +static const char *simpad_dt_board_compat[] __initdata = {

I think this should be __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 */
> -- 
> 1.7.7.3
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

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

* [PATCH] Initial DT support for SIMpad devices.
@ 2011-11-21  9:50     ` Jamie Iles
  0 siblings, 0 replies; 8+ messages in thread
From: Jamie Iles @ 2011-11-21  9:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Jochen,

Just a couple of nits inline, otherwise looks nice to me!

Jamie

On Sun, Nov 20, 2011 at 09:37:50PM +0100, Jochen Friedrich wrote:
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
> ---
>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>  arch/arm/boot/dts/sa1110.dtsi                      |   72 ++++++++++++++++++++
>  arch/arm/boot/dts/simpad.dts                       |   49 +++++++++++++
>  arch/arm/mach-sa1100/Kconfig                       |   13 ++++
>  arch/arm/mach-sa1100/Makefile.boot                 |    1 +
>  arch/arm/mach-sa1100/simpad.c                      |   29 ++++++++-
>  6 files changed, 164 insertions(+), 1 deletions(-)
>  create mode 100644 arch/arm/boot/dts/sa1110.dtsi
>  create mode 100644 arch/arm/boot/dts/simpad.dts
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 5b14518..cbe7046 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -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
> diff --git a/arch/arm/boot/dts/sa1110.dtsi b/arch/arm/boot/dts/sa1110.dtsi
> new file mode 100644
> index 0000000..e1ca379
> --- /dev/null
> +++ b/arch/arm/boot/dts/sa1110.dtsi
> @@ -0,0 +1,72 @@
> +/*
> + * sa1110.dtsi - Device Tree Include file for Intel SA1110 SoC
> + *
> + *  Copyright (C) 2011 Jochen Friedrich <jochen@scram.de>
> + *
> + * Licensed under GPLv2 or later.
> + */
> +
> +/include/ "skeleton.dtsi"
> +
> +/ {
> +	model = "Intel SA1110 SoC";
> +	compatible = "intel,sa1110";
> +	interrupt-parent = <&aic>;
> +
> +	cpus {
> +		cpu at 0 {
> +			compatible = "intel,sa1110";
> +		};
> +	};
> +
> +	localbus {
> +		compatible = "intel,sa1110-localbus";

Could this claim compatibility with simple-bus?

> +		#address-cells = <2>;
> +		#size-cells = <1>;
> +
> +		ranges = <
> +			0x0 0x0 0x00000000 0x08000000
> +			0x1 0x0 0x08000000 0x08000000
> +			0x2 0x0 0x10000000 0x08000000
> +			0x3 0x0 0x18000000 0x08000000
> +			0x4 0x0 0x40000000 0x08000000
> +			0x5 0x0 0x48000000 0x08000000
> +		>;
> +	};
> +
> +	soc {
> +		compatible = "simple-bus";
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges;
> +
> +		uart0: serial at 0x80010000 {
> +			compatible = "intel,sa1100-uart";
> +			reg = <0x80010000 0x24>;
> +			interrupts = <15>;
> +			status = "disabled";
> +		};
> +
> +		uart1: serial at 0x80030000 {
> +			compatible = "intel,sa1100-uart";
> +			reg = <0x80030000 0x24>;
> +			interrupts = <16>;
> +			status = "disabled";
> +		};
> +
> +		uart2: serial at 0x80050000 {
> +			compatible = "intel,sa1100-uart";
> +			reg = <0x80050000 0x24>;
> +			interrupts = <17>;
> +			status = "disabled";

Hmm, I couldn't see status defined in the UART binding or where it was 
used...  Is this required?

> +		};
> +
> +		aic: interrupt-controller at 0x90050000 {
> +			compatible = "intel,sa1110-icr";
> +			reg = <0x90050000 0x24>;
> +			#interrupt-cells = <1>;
> +			interrupt-controller;
> +			interrupt-parent;
> +		};
> +	};
> +};
> diff --git a/arch/arm/boot/dts/simpad.dts b/arch/arm/boot/dts/simpad.dts
> new file mode 100644
> index 0000000..fdd7969
> --- /dev/null
> +++ b/arch/arm/boot/dts/simpad.dts
> @@ -0,0 +1,49 @@
> +/dts-v1/;
> +/include/ "sa1110.dtsi"
> +
> +/ {
> +	model = "SIEMENS, SIMpad";
> +	compatible = "siemens,simpad";

It may be worth adding the SoC compatible string after the board one for 
completeness.

> +
> +	aliases {
> +		serial0 = &uart2;
> +		serial1 = &uart0;
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x0 0x08000000>;
> +	};
> +
> +	chosen {
> +		bootargs = "console=ttySA0";

It is preferred for the bootloader to set these up rather than having 
them statically in the DTS if at all possible.

> +	};
> +
> +	localbus {
> +		flash at 0,0 {
> +			compatible = "cfi-flash";
> +			reg = <0 0 0x08000000>;
> +			bank-width = <1>;
> +			#size-cells = <1>;
> +			#address-cells = <1>;
> +		};
> +
> +		flash at 1,0 {
> +			compatible = "cfi-flash";
> +			reg = <1 0 0x08000000>;
> +			bank-width = <1>;
> +			#size-cells = <1>;
> +			#address-cells = <1>;
> +		};
> +	};
> +
> +	soc {
> +		uart0: serial at 0x80010000 {
> +			status = "okay";

And here.

> +		};
> +
> +		uart2: serial at 0x80050000 {
> +			status = "okay";
> +		};
> +	};
> +};
> diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
> index 42625e4..31238c3 100644
> --- a/arch/arm/mach-sa1100/Kconfig
> +++ b/arch/arm/mach-sa1100/Kconfig
> @@ -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
> diff --git a/arch/arm/mach-sa1100/Makefile.boot b/arch/arm/mach-sa1100/Makefile.boot
> index 5a616f6..1d17767 100644
> --- a/arch/arm/mach-sa1100/Makefile.boot
> +++ b/arch/arm/mach-sa1100/Makefile.boot
> @@ -6,3 +6,4 @@ endif
>  params_phys-y	:= 0xc0000100
>  initrd_phys-y	:= 0xc0800000
>  
> +dtb-$(CONFIG_SA1100_SIMPAD_DT)		+= simpad.dtb
> diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
> index d3c9d2b..9d6f663 100644
> --- a/arch/arm/mach-sa1100/simpad.c
> +++ b/arch/arm/mach-sa1100/simpad.c
> @@ -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>
> @@ -211,8 +212,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;
> @@ -392,6 +394,31 @@ static int __init simpad_init(void)
>  
>  arch_initcall(simpad_init);
>  
> +#ifdef CONFIG_OF
> +const struct of_device_id simpad_bus_match_table[] = {
> +	{ .compatible = "simple-bus", },
> +	{ .compatible = "intel,sa1110-localbus", },
> +	{} /* Empty terminated list */
> +};
> +
> +static void __init simpad_dt_device_init(void)
> +{
> +	of_platform_populate(NULL, simpad_bus_match_table, NULL, NULL);
> +}

If the localbus was compatible with simple-bus then you could do:

	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);

and remove simpad_bus_match_table.

> +
> +static const char *simpad_dt_board_compat[] __initdata = {

I think this should be __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 */
> -- 
> 1.7.7.3
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

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

* Re: [PATCH] Initial DT support for SIMpad devices.
  2011-11-21  9:50     ` Jamie Iles
@ 2011-11-21 14:32       ` Jochen Friedrich
  -1 siblings, 0 replies; 8+ messages in thread
From: Jochen Friedrich @ 2011-11-21 14:32 UTC (permalink / raw)
  To: Jamie Iles
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Jamie,

>> +	localbus {
>> +		compatible = "intel,sa1110-localbus";
>
> Could this claim compatibility with simple-bus?

I wasn't sure about this. I took a look in the powerpc DTS files for reference and they used
some kind of <chip>-localbus compatible entries. So I took the same approach here.

>> +		uart2: serial@0x80050000 {
>> +			compatible = "intel,sa1100-uart";
>> +			reg =<0x80050000 0x24>;
>> +			interrupts =<17>;
>> +			status = "disabled";
>
> Hmm, I couldn't see status defined in the UART binding or where it was
> used...  Is this required?

status is a global property and it's being used in drivers/of/base.c, of_device_is_available().
It is used in other dtsi files like e.g. at91sam9g45.dtsi as well to define optional nodes.

>> +/ {
>> +	model = "SIEMENS, SIMpad";
>> +	compatible = "siemens,simpad";
>
> It may be worth adding the SoC compatible string after the board one for
> completeness.

Do you mean something like this?

	compatible = "siemens,simpad", "intel,sa1100";

>> +	chosen {
>> +		bootargs = "console=ttySA0";
>
> It is preferred for the bootloader to set these up rather than having
> them statically in the DTS if at all possible.

Yes, my boot loader does this, but simpad support is not in official U-BOOT yet.
This allows testing with a different boot loader like the hh.org one and a Linux
binary with DTB appended.

>> +const struct of_device_id simpad_bus_match_table[] = {
>> +	{ .compatible = "simple-bus", },
>> +	{ .compatible = "intel,sa1110-localbus", },
>> +	{} /* Empty terminated list */
>> +};
>> +
>> +static void __init simpad_dt_device_init(void)
>> +{
>> +	of_platform_populate(NULL, simpad_bus_match_table, NULL, NULL);
>> +}
>
> If the localbus was compatible with simple-bus then you could do:
>
> 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
>
> and remove simpad_bus_match_table.

True, I just wasn't sure if it's OK to do so.

>> +static const char *simpad_dt_board_compat[] __initdata = {
>
> I think this should be __initconst.

OK.

Thanks,
Jochen

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

* [PATCH] Initial DT support for SIMpad devices.
@ 2011-11-21 14:32       ` Jochen Friedrich
  0 siblings, 0 replies; 8+ messages in thread
From: Jochen Friedrich @ 2011-11-21 14:32 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Jamie,

>> +	localbus {
>> +		compatible = "intel,sa1110-localbus";
>
> Could this claim compatibility with simple-bus?

I wasn't sure about this. I took a look in the powerpc DTS files for reference and they used
some kind of <chip>-localbus compatible entries. So I took the same approach here.

>> +		uart2: serial at 0x80050000 {
>> +			compatible = "intel,sa1100-uart";
>> +			reg =<0x80050000 0x24>;
>> +			interrupts =<17>;
>> +			status = "disabled";
>
> Hmm, I couldn't see status defined in the UART binding or where it was
> used...  Is this required?

status is a global property and it's being used in drivers/of/base.c, of_device_is_available().
It is used in other dtsi files like e.g. at91sam9g45.dtsi as well to define optional nodes.

>> +/ {
>> +	model = "SIEMENS, SIMpad";
>> +	compatible = "siemens,simpad";
>
> It may be worth adding the SoC compatible string after the board one for
> completeness.

Do you mean something like this?

	compatible = "siemens,simpad", "intel,sa1100";

>> +	chosen {
>> +		bootargs = "console=ttySA0";
>
> It is preferred for the bootloader to set these up rather than having
> them statically in the DTS if at all possible.

Yes, my boot loader does this, but simpad support is not in official U-BOOT yet.
This allows testing with a different boot loader like the hh.org one and a Linux
binary with DTB appended.

>> +const struct of_device_id simpad_bus_match_table[] = {
>> +	{ .compatible = "simple-bus", },
>> +	{ .compatible = "intel,sa1110-localbus", },
>> +	{} /* Empty terminated list */
>> +};
>> +
>> +static void __init simpad_dt_device_init(void)
>> +{
>> +	of_platform_populate(NULL, simpad_bus_match_table, NULL, NULL);
>> +}
>
> If the localbus was compatible with simple-bus then you could do:
>
> 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
>
> and remove simpad_bus_match_table.

True, I just wasn't sure if it's OK to do so.

>> +static const char *simpad_dt_board_compat[] __initdata = {
>
> I think this should be __initconst.

OK.

Thanks,
Jochen

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

* Re: [PATCH] Initial DT support for SIMpad devices.
  2011-11-21 14:32       ` Jochen Friedrich
@ 2011-11-21 14:47           ` Jamie Iles
  -1 siblings, 0 replies; 8+ messages in thread
From: Jamie Iles @ 2011-11-21 14:47 UTC (permalink / raw)
  To: Jochen Friedrich
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Jochen,

On Mon, Nov 21, 2011 at 03:32:56PM +0100, Jochen Friedrich wrote:
> >>+	localbus {
> >>+		compatible = "intel,sa1110-localbus";
> >
> >Could this claim compatibility with simple-bus?
> 
> I wasn't sure about this. I took a look in the powerpc DTS files for reference and they used
> some kind of <chip>-localbus compatible entries. So I took the same approach here.

Hmm, I haven't seen any of the ARM platforms doing this, and unless the 
sa1110 bus has some extra knobs that need tweaking, then simple-bus 
should be fine.

> >>+		uart2: serial@0x80050000 {
> >>+			compatible = "intel,sa1100-uart";
> >>+			reg =<0x80050000 0x24>;
> >>+			interrupts =<17>;
> >>+			status = "disabled";
> >
> >Hmm, I couldn't see status defined in the UART binding or where it was
> >used...  Is this required?
> 
> status is a global property and it's being used in drivers/of/base.c, of_device_is_available().
> It is used in other dtsi files like e.g. at91sam9g45.dtsi as well to define optional nodes.

Ahh, I wasn't aware of that one - thanks!

> >>+/ {
> >>+	model = "SIEMENS, SIMpad";
> >>+	compatible = "siemens,simpad";
> >
> >It may be worth adding the SoC compatible string after the board one for
> >completeness.
> 
> Do you mean something like this?
> 
> 	compatible = "siemens,simpad", "intel,sa1100";

Yup, that looks about right.

> >>+	chosen {
> >>+		bootargs = "console=ttySA0";
> >
> >It is preferred for the bootloader to set these up rather than having
> >them statically in the DTS if at all possible.
> 
> Yes, my boot loader does this, but simpad support is not in official U-BOOT yet.
> This allows testing with a different boot loader like the hh.org one and a Linux
> binary with DTB appended.

OK, I guess that's fair enough, though I certainly shouldn't be 
considered an authoritative source on this!

Jamie

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

* [PATCH] Initial DT support for SIMpad devices.
@ 2011-11-21 14:47           ` Jamie Iles
  0 siblings, 0 replies; 8+ messages in thread
From: Jamie Iles @ 2011-11-21 14:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Jochen,

On Mon, Nov 21, 2011 at 03:32:56PM +0100, Jochen Friedrich wrote:
> >>+	localbus {
> >>+		compatible = "intel,sa1110-localbus";
> >
> >Could this claim compatibility with simple-bus?
> 
> I wasn't sure about this. I took a look in the powerpc DTS files for reference and they used
> some kind of <chip>-localbus compatible entries. So I took the same approach here.

Hmm, I haven't seen any of the ARM platforms doing this, and unless the 
sa1110 bus has some extra knobs that need tweaking, then simple-bus 
should be fine.

> >>+		uart2: serial at 0x80050000 {
> >>+			compatible = "intel,sa1100-uart";
> >>+			reg =<0x80050000 0x24>;
> >>+			interrupts =<17>;
> >>+			status = "disabled";
> >
> >Hmm, I couldn't see status defined in the UART binding or where it was
> >used...  Is this required?
> 
> status is a global property and it's being used in drivers/of/base.c, of_device_is_available().
> It is used in other dtsi files like e.g. at91sam9g45.dtsi as well to define optional nodes.

Ahh, I wasn't aware of that one - thanks!

> >>+/ {
> >>+	model = "SIEMENS, SIMpad";
> >>+	compatible = "siemens,simpad";
> >
> >It may be worth adding the SoC compatible string after the board one for
> >completeness.
> 
> Do you mean something like this?
> 
> 	compatible = "siemens,simpad", "intel,sa1100";

Yup, that looks about right.

> >>+	chosen {
> >>+		bootargs = "console=ttySA0";
> >
> >It is preferred for the bootloader to set these up rather than having
> >them statically in the DTS if at all possible.
> 
> Yes, my boot loader does this, but simpad support is not in official U-BOOT yet.
> This allows testing with a different boot loader like the hh.org one and a Linux
> binary with DTB appended.

OK, I guess that's fair enough, though I certainly shouldn't be 
considered an authoritative source on this!

Jamie

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

end of thread, other threads:[~2011-11-21 14:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-20 20:37 [PATCH] Initial DT support for SIMpad devices Jochen Friedrich
2011-11-20 20:37 ` Jochen Friedrich
     [not found] ` <1321821470-32396-1-git-send-email-jochen-NIgtFMG+Po8@public.gmane.org>
2011-11-21  9:50   ` Jamie Iles
2011-11-21  9:50     ` Jamie Iles
2011-11-21 14:32     ` Jochen Friedrich
2011-11-21 14:32       ` Jochen Friedrich
     [not found]       ` <4ECA6118.1050806-NIgtFMG+Po8@public.gmane.org>
2011-11-21 14:47         ` Jamie Iles
2011-11-21 14:47           ` Jamie Iles

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.