Skip to contentSkip to conversation

ARM: Samsung: Add basic device tree support for Exynos4 boards

PATCH New Thomas Abraham 2 participants 4 messages Nov 1, 2011 – Nov 2, 2011

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

v2 cover ARM: Samsung: Add basic device tree support for Exynos4 boards

Changes since v1:
- Removed unique per-controller compatible string value from gpio controller nodes to align with the updated device tree support for exynos4 gpio controller.
- Removed the interrupt combiner controller node.

This patchset adds a new basic device tree enabled machine/board file which is based on the Samsung's Exynos4 family of SoC's. Also included in this patchset is the dts file for Exynos4210 SoC, Samsung's SMDKV310 board and Insignal's Origen board.

The Exynos4210 dts file includes support for IRQ, GPIO, WDT, RTC, UART, SDHCI, Keypad, DMA and I2C controllers. As device tree coverage for Exynos4210 increases, additional device nodes to represent the controllers should be added.

The device tree enabled machine file enables boot on two boards based on the Exynos4210 SoC. This provides a starting point to add additional device tree support on these boards, migrate other existing Exynos4 based boards to use device tree and enable device tree based boot on new upcoming boards.

This patchset has been tested on the following tree:
git://git.linaro.org/git/people/arnd/arm-soc.git branch: for-next

Thomas Abraham (2):
ARM: Samsung: Add Exynos4 device tree enabled board file
ARM: dts: Add intial dts file for Exynos4210 SoC, SMDKV310 and Origen board

 .../devicetree/bindings/arm/insignal-boards.txt    |    8 +
 .../devicetree/bindings/arm/samsung-boards.txt     |    8 +
 arch/arm/boot/dts/exynos4210-origen.dts            |  137 +++++++
 arch/arm/boot/dts/exynos4210-smdkv310.dts          |  182 +++++++++
 arch/arm/boot/dts/exynos4210.dtsi                  |  397 ++++++++++++++++++++
 arch/arm/mach-exynos4/Kconfig                      |   14 +
 arch/arm/mach-exynos4/Makefile                     |    2 +
 arch/arm/mach-exynos4/mach-exynos4-dt.c            |   85 +++++
 8 files changed, 833 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/insignal-boards.txt
 create mode 100644 Documentation/devicetree/bindings/arm/samsung-boards.txt
 create mode 100644 arch/arm/boot/dts/exynos4210-origen.dts
 create mode 100644 arch/arm/boot/dts/exynos4210-smdkv310.dts
 create mode 100644 arch/arm/boot/dts/exynos4210.dtsi
 create mode 100644 arch/arm/mach-exynos4/mach-exynos4-dt.c
#1 lore raw

PATCH v2 1/2 ARM: Samsung: Add Exynos4 device tree enabled board file

Add a new Exynos4 compatible device tree enabled board file. Boards based on the Exynos4 family of SoC's can use this as the machine/board file. When using this machine fike, a corresponding device tree blob which describes the board's properties should be supplied at boot time to the kernel.

---
 .../devicetree/bindings/arm/insignal-boards.txt    |    8 ++
 .../devicetree/bindings/arm/samsung-boards.txt     |    8 ++
 arch/arm/mach-exynos4/Kconfig                      |   14 +++
 arch/arm/mach-exynos4/Makefile                     |    2 +
 arch/arm/mach-exynos4/mach-exynos4-dt.c            |   85 ++++++++++++++++++++
 5 files changed, 117 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/insignal-boards.txt
 create mode 100644 Documentation/devicetree/bindings/arm/samsung-boards.txt
 create mode 100644 arch/arm/mach-exynos4/mach-exynos4-dt.c
Documentation/devicetree/bindings/arm/insignal-boards.txt new file +8 -0
new file mode 100644
index 0000000..524c3dc
@@ -0,0 +1,8 @@
+* Insignal's Exynos4210 based Origen evaluation board
+
+Origen low-cost evaluation board is based on Samsung's Exynos4210 SoC.
+
+Required root node properties:
+    - compatible = should be one or more of the following.
+        (a) "samsung,smdkv310" - for Samsung's SMDKV310 eval board.
+        (b) "samsung,exynos4210"  - for boards based on Exynos4210 SoC.
Documentation/devicetree/bindings/arm/samsung-boards.txt new file +8 -0
new file mode 100644
index 0000000..0bf68be
@@ -0,0 +1,8 @@
+* Samsung's Exynos4210 based SMDKV310 evaluation board
+
+SMDKV310 evaluation board is based on Samsung's Exynos4210 SoC.
+
+Required root node properties:
+    - compatible = should be one or more of the following.
+        (a) "samsung,smdkv310" - for Samsung's SMDKV310 eval board.
+        (b) "samsung,exynos4210"  - for boards based on Exynos4210 SoC.
arch/arm/mach-exynos4/Kconfig +14 -0
index 9eefd1e..7313500 100644
@@ -306,6 +306,20 @@ config MACH_SMDK4412
 	help
 	  Machine support for Samsung SMDK4412
 
+comment "Flattened Device Tree based board for Exynos4 based SoC"
+
+config MACH_EXYNOS4_DT
+	bool "Samsung Exynos4 Machine using device tree"
+	select CPU_EXYNOS4210
+	select USE_OF
+	select ARM_AMBA
+	select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD
+	help
+	  Machine support for Samsung Exynos4 machine with device tree enabled.
+	  Select this if a fdt blob is available for the Exynos4 SoC based board.
+	  Note: This is under development and not all peripherals can be supported
+	  with this machine file.
+
 endmenu
 
 comment "Configuration for HSMMC bus width"
arch/arm/mach-exynos4/Makefile +2 -0
index 2bb18f4..3ef8873 100644
@@ -37,6 +37,8 @@ obj-$(CONFIG_MACH_ORIGEN)		+= mach-origen.o
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
 
+obj-$(CONFIG_MACH_EXYNOS4_DT)		+= mach-exynos4-dt.o
+
 # device support
 
 obj-y					+= dev-audio.o
arch/arm/mach-exynos4/mach-exynos4-dt.c new file +85 -0

85 lines not on this page · raw message

Signature · 1 line
1.7.4.4
#2 lore raw

PATCH v2 2/2 ARM: dts: Add intial dts file for Exynos4210 SoC, SMDKV310 and Origen board

In reply to Thomas Abraham

Add initial dts file for Exynos4210 SoC. This dts file describes the SoC specific devices and properties. Along with this, add dts file for Samsung's SMDKV310 board and Insignal's Origen board which uses the Exynos4210 dts file and extends it to describe the board specific properties.

---
 arch/arm/boot/dts/exynos4210-origen.dts   |  137 ++++++++++
 arch/arm/boot/dts/exynos4210-smdkv310.dts |  182 +++++++++++++
 arch/arm/boot/dts/exynos4210.dtsi         |  397 +++++++++++++++++++++++++++++
 3 files changed, 716 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/exynos4210-origen.dts
 create mode 100644 arch/arm/boot/dts/exynos4210-smdkv310.dts
 create mode 100644 arch/arm/boot/dts/exynos4210.dtsi
arch/arm/boot/dts/exynos4210-origen.dts new file +137 -0
new file mode 100644
index 0000000..b8c4763
@@ -0,0 +1,137 @@
+/*
+ * Samsung's Exynos4210 based Origen board device tree source
+ *
+ * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ * Copyright (c) 2010-2011 Linaro Ltd.
+ *		www.linaro.org
+ *
+ * Device tree source file for Insignal's Origen board which is based on
+ * Samsung's Exynos4210 SoC.
+ *
+ * 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/ "exynos4210.dtsi"
+
+/ {
+	model = "Insignal Origen evaluation board based on Exynos4210";
+	compatible = "insignal,origen", "samsung,exynos4210";
+
+	memory {
+		reg = <0x40000000 0x40000000>;
+	};
+
+	chosen {
+		bootargs ="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC2,115200 init=/linuxrc";
+	};
+
+	sdhci at 12530000 {
+		samsung,sdhci-bus-width = <4>;
+		linux,mmc_cap_4_bit_data;
+		samsung,sdhci-cd-internal;
+		gpio-cd = <&gpk2 2 2 3 3>;
+		gpios = <&gpk2 0 2 0 3>,
+			<&gpk2 1 2 0 3>,
+			<&gpk2 3 2 3 3>,
+			<&gpk2 4 2 3 3>,
+			<&gpk2 5 2 3 3>,
+			<&gpk2 6 2 3 3>;
+	};
+
+	sdhci at 12510000 {
+		samsung,sdhci-bus-width = <4>;
+		linux,mmc_cap_4_bit_data;
+		samsung,sdhci-cd-internal;
+		gpio-cd = <&gpk0 2 2 3 3>;
+		gpios = <&gpk0 0 2 0 3>,
+			<&gpk0 1 2 0 3>,
+			<&gpk0 3 2 3 3>,
+			<&gpk0 4 2 3 3>,
+			<&gpk0 5 2 3 3>,
+			<&gpk0 6 2 3 3>;
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		up {
+			label = "Up";
+			gpios = <&gpx2 0 0 0 2>;
+			linux,code = <103>;
+		};
+
+		down {
+			label = "Down";
+			gpios = <&gpx2 1 0 0 2>;
+			linux,code = <108>;
+		};
+
+		back {
+			label = "Back";
+			gpios = <&gpx1 7 0 0 2>;
+			linux,code = <158>;
+		};
+
+		home {
+			label = "Home";
+			gpios = <&gpx1 6 0 0 2>;
+			linux,code = <102>;
+		};
+
+		menu {
+			label = "Menu";
+			gpios = <&gpx1 5 0 0 2>;
+			linux,code = <139>;
+		};
+	};
+
+	keypad at 100A0000 {
+		status = "disabled";
+	};
+
+	sdhci at 12520000 {
+		status = "disabled";
+	};
+
+	sdhci at 12540000 {
+		status = "disabled";
+	};
+
+	i2c at 13860000 {
+		status = "disabled";
+	};
+
+	i2c at 13870000 {
+		status = "disabled";
+	};
+
+	i2c at 13880000 {
+		status = "disabled";
+	};
+
+	i2c at 13890000 {
+		status = "disabled";
+	};
+
+	i2c at 138A0000 {
+		status = "disabled";
+	};
+
+	i2c at 138B0000 {
+		status = "disabled";
+	};
+
+	i2c at 138C0000 {
+		status = "disabled";
+	};
+
+	i2c at 138D0000 {
+		status = "disabled";
+	};
+};
arch/arm/boot/dts/exynos4210-smdkv310.dts new file +182 -0

182 lines not on this page · raw message

arch/arm/boot/dts/exynos4210.dtsi new file +397 -0

397 lines not on this page · raw message

Signature · 1 line
1.7.4.4
#3 lore raw

v2 cover ARM: Samsung: Add basic device tree support for Exynos4 boards

In reply to Thomas Abraham
Quoted 3 lines · Thomas Abraham

Changes since v1:
- Removed unique per-controller compatible string value from gpio

controller

Quoted 2 lines

nodes
to align with the updated device tree support for exynos4 gpio

controller.

Quoted 3 lines

- Removed the interrupt combiner controller node.

This patchset adds a new basic device tree enabled machine/board file

which is

Quoted 1 line

based on the Samsung's Exynos4 family of SoC's. Also included in this

patchset

Quoted 2 lines

is the
dts file for Exynos4210 SoC, Samsung's SMDKV310 board and Insignal's

Origen

Quoted 3 lines

board.

The Exynos4210 dts file includes support for IRQ, GPIO, WDT, RTC, UART,

SDHCI,

Quoted 6 lines

Keypad,
DMA and I2C controllers. As device tree coverage for Exynos4210 increases, additional
device nodes to represent the controllers should be added.

The device tree enabled machine file enables boot on two boards based on

the

Quoted 1 line

Exynos4210 SoC. This provides a starting point to add additional device

tree

Quoted 2 lines

support
on these boards, migrate other existing Exynos4 based boards to use device

tree

Quoted 8 lines

and enable device tree based boot on new upcoming boards.

This patchset has been tested on the following tree:
git://git.linaro.org/git/people/arnd/arm-soc.git branch: for-next

Thomas Abraham (2):
ARM: Samsung: Add Exynos4 device tree enabled board file
ARM: dts: Add intial dts file for Exynos4210 SoC, SMDKV310 and Origen

board

Quoted 12 lines
 .../devicetree/bindings/arm/insignal-boards.txt    |    8 +
 .../devicetree/bindings/arm/samsung-boards.txt     |    8 +
 arch/arm/boot/dts/exynos4210-origen.dts            |  137 +++++++
 arch/arm/boot/dts/exynos4210-smdkv310.dts          |  182 +++++++++
 arch/arm/boot/dts/exynos4210.dtsi                  |  397
++++++++++++++++++++
 arch/arm/mach-exynos4/Kconfig                      |   14 +
 arch/arm/mach-exynos4/Makefile                     |    2 +
 arch/arm/mach-exynos4/mach-exynos4-dt.c            |   85 +++++
 8 files changed, 833 insertions(+), 0 deletions(-)
 create mode 100644

Documentation/devicetree/bindings/arm/insignal-boards.txt

Quoted 1 line
 create mode 100644

Documentation/devicetree/bindings/arm/samsung-boards.txt

Quoted 4 lines
 create mode 100644 arch/arm/boot/dts/exynos4210-origen.dts
 create mode 100644 arch/arm/boot/dts/exynos4210-smdkv310.dts
 create mode 100644 arch/arm/boot/dts/exynos4210.dtsi
 create mode 100644 arch/arm/mach-exynos4/mach-exynos4-dt.c

OK. replaced with this in next-samsung-dt branch.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.