Skip to contentSkip to conversation

arm/tegra: Add device-tree support for TrimSlice board

PATCH New Stephen Warren 4 participants 5 messages Oct 24, 2011 – Oct 25, 2011

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

PATCH 1/1 arm/tegra: Add device-tree support for TrimSlice board

* Add device-tree file for TrimSlice
* Add that to the list of .dts files to build
* Update board-dt.c to recognize TrimSlice board name

---
 arch/arm/boot/dts/tegra-trimslice.dts |   38 +++++++++++++++++++++++++++++++++
 arch/arm/mach-tegra/Makefile.boot     |    1 +
 arch/arm/mach-tegra/board-dt.c        |    3 ++
 3 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/tegra-trimslice.dts
arch/arm/boot/dts/tegra-trimslice.dts new file +38 -0
new file mode 100644
index 0000000..d3d0d20
@@ -0,0 +1,38 @@
+/dts-v1/;
+
+/memreserve/ 0x1c000000 0x04000000;
+/include/ "tegra20.dtsi"
+
+/ {
+	model = "Compulab TrimSlice board";
+	compatible = "compulab,trimslice", "nvidia,tegra20";
+
+	chosen {
+		bootargs = "vmalloc=192M video=tegrafb console=ttyS0,115200n8 root=/dev/mmcblk0p1 rw rootwait";
+	};
+
+	memory at 0 {
+		reg = < 0x00000000 0x40000000 >;
+	};
+
+	i2c at 7000c000 {
+		clock-frequency = <400000>;
+	};
+
+	i2c at 7000c400 {
+		clock-frequency = <400000>;
+	};
+
+	i2c at 7000c500 {
+		clock-frequency = <400000>;
+	};
+
+	serial at 70006000 {
+		clock-frequency = < 216000000 >;
+	};
+
+	sdhci at c8000600 {
+		cd-gpios = <&gpio 121 0>;
+		wp-gpios = <&gpio 122 0>;
+	};
+};
arch/arm/mach-tegra/Makefile.boot +1 -0
index bd12c9f..9f177a4 100644
@@ -4,4 +4,5 @@ initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC)	:= 0x00800000
 
 dtb-$(CONFIG_MACH_HARMONY) += tegra-harmony.dtb
 dtb-$(CONFIG_MACH_SEABOARD) += tegra-seaboard.dtb
+dtb-$(CONFIG_MACH_TRIMSLICE) += tegra-trimslice.dtb
 dtb-$(CONFIG_MACH_VENTANA) += tegra-ventana.dtb
arch/arm/mach-tegra/board-dt.c +3 -0
index 0d22212..9ac4ed7 100644
@@ -47,6 +47,7 @@
 
 void harmony_pinmux_init(int is_dt);
 void seaboard_pinmux_init(int is_dt);
+void trimslice_pinmux_init(int is_dt);
 void ventana_pinmux_init(int is_dt);
 
 struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
@@ -84,6 +85,7 @@ static struct {
 	char *machine;
 	void (*init)(int is_dt);
 } pinmux_configs[] = {
+	{ "compulab,trimslice", trimslice_pinmux_init },
 	{ "nvidia,harmony", harmony_pinmux_init },
 	{ "nvidia,seaboard", seaboard_pinmux_init },
 	{ "nvidia,ventana", ventana_pinmux_init },
@@ -120,6 +122,7 @@ static void __init tegra_dt_init(void)
 }
 
 static const char * tegra_dt_board_compat[] = {
+	"compulab,trimslice",
 	"nvidia,harmony",
 	"nvidia,seaboard",
 	"nvidia,ventana",
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 arm/tegra: Add device-tree support for TrimSlice board

Hi Stephen,

Quoted 4 lines · On Monday 24 October 2011 12:01:07 Stephen Warren wrote:

* Add device-tree file for TrimSlice
* Add that to the list of .dts files to build
* Update board-dt.c to recognize TrimSlice board name

Quoted 8 lines
---
 arch/arm/boot/dts/tegra-trimslice.dts |   38
+++++++++++++++++++++++++++++++++ arch/arm/mach-tegra/Makefile.boot     |  
 1 +
 arch/arm/mach-tegra/board-dt.c        |    3 ++
 3 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/tegra-trimslice.dts

doesn't this also require to add something like

obj-${CONFIG_MACH_TEGRA_DT} += board-trimslice-pinmux.o

to the Makefile?

And how is the binary device tree generated? I cannot find the proper CONFIG so that Makefile.boot is executed.

Marc

Quoted 82 lines
(quoted diff) +0 -0

b/arch/arm/boot/dts/tegra-trimslice.dts new file mode 100644 index 0000000..d3d0d20

arch/arm/boot/dts/tegra-trimslice.dts new file +11 -0
@@ -0,0 +1,38 @@
+/dts-v1/;
+
+/memreserve/ 0x1c000000 0x04000000;
+/include/ "tegra20.dtsi"
+
+/ {
+	model = "Compulab TrimSlice board";
+	compatible = "compulab,trimslice", "nvidia,tegra20";
+
+	chosen {
+		bootargs = "vmalloc=192M video=tegrafb console=ttyS0,115200n8

root=/dev/mmcblk0p1 rw rootwait"; + };

arch/arm/boot/dts/tegra-trimslice.dts new file +26 -0
+
+	memory at 0 {
+		reg = < 0x00000000 0x40000000 >;
+	};
+
+	i2c at 7000c000 {
+		clock-frequency = <400000>;
+	};
+
+	i2c at 7000c400 {
+		clock-frequency = <400000>;
+	};
+
+	i2c at 7000c500 {
+		clock-frequency = <400000>;
+	};
+
+	serial at 70006000 {
+		clock-frequency = < 216000000 >;
+	};
+
+	sdhci at c8000600 {
+		cd-gpios = <&gpio 121 0>;
+		wp-gpios = <&gpio 122 0>;
+	};
+};
(quoted diff) +0 -0

b/arch/arm/mach-tegra/Makefile.boot index bd12c9f..9f177a4 100644

arch/arm/mach-tegra/Makefile.boot +1 -0
@@ -4,4 +4,5 @@ initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC)	:= 0x00800000
 
 dtb-$(CONFIG_MACH_HARMONY) += tegra-harmony.dtb
 dtb-$(CONFIG_MACH_SEABOARD) += tegra-seaboard.dtb
+dtb-$(CONFIG_MACH_TRIMSLICE) += tegra-trimslice.dtb
 dtb-$(CONFIG_MACH_VENTANA) += tegra-ventana.dtb
arch/arm/mach-tegra/board-dt.c +3 -0
index 0d22212..9ac4ed7 100644
@@ -47,6 +47,7 @@
 
 void harmony_pinmux_init(int is_dt);
 void seaboard_pinmux_init(int is_dt);
+void trimslice_pinmux_init(int is_dt);
 void ventana_pinmux_init(int is_dt);
 
 struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
@@ -84,6 +85,7 @@ static struct {
 	char *machine;
 	void (*init)(int is_dt);
 } pinmux_configs[] = {
+	{ "compulab,trimslice", trimslice_pinmux_init },
 	{ "nvidia,harmony", harmony_pinmux_init },
 	{ "nvidia,seaboard", seaboard_pinmux_init },
 	{ "nvidia,ventana", ventana_pinmux_init },
@@ -120,6 +122,7 @@ static void __init tegra_dt_init(void)
 }
 
 static const char * tegra_dt_board_compat[] = {
+	"compulab,trimslice",
 	"nvidia,harmony",
 	"nvidia,seaboard",
 	"nvidia,ventana",
#2 lore raw

PATCH 1/1 arm/tegra: Add device-tree support for TrimSlice board

Marc Dietrich wrote at Monday, October 24, 2011 3:28 PM:

Quoted 14 lines · On Monday 24 October 2011 12:01:07 Stephen Warren wrote:
Quoted 4 lines

* Add device-tree file for TrimSlice
* Add that to the list of .dts files to build
* Update board-dt.c to recognize TrimSlice board name

Quoted 8 lines
---
 arch/arm/boot/dts/tegra-trimslice.dts |   38
+++++++++++++++++++++++++++++++++ arch/arm/mach-tegra/Makefile.boot     |
 1 +
 arch/arm/mach-tegra/board-dt.c        |    3 ++
 3 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/tegra-trimslice.dts
Quoted 5 lines

doesn't this also require to add something like

obj-${CONFIG_MACH_TEGRA_DT} += board-trimslice-pinmux.o

to the Makefile?

Yes, definitely. I've fixed this up locally; I hope to repost soon.

Quoted 2 lines

And how is the binary device tree generated? I cannot find the proper CONFIG so that Makefile.boot is executed.

make dtbs
(this relies on having built dtc, which happens only by "make" not e.g. "make zImage" IIRC)

Signature · 1 line
nvpublic
#3 lore raw

PATCH 1/1 arm/tegra: Add device-tree support for TrimSlice board

Quoted 15 lines · Stephen Warren

Marc Dietrich wrote at Monday, October 24, 2011 3:28 PM:

Quoted 14 lines · On Monday 24 October 2011 12:01:07 Stephen Warren wrote:
Quoted 12 lines

* Add device-tree file for TrimSlice
* Add that to the list of .dts files to build
* Update board-dt.c to recognize TrimSlice board name

---
 arch/arm/boot/dts/tegra-trimslice.dts |   38
+++++++++++++++++++++++++++++++++ arch/arm/mach-tegra/Makefile.boot     |
 1 +
 arch/arm/mach-tegra/board-dt.c        |    3 ++
 3 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/tegra-trimslice.dts
Quoted 7 lines
Quoted 5 lines

doesn't this also require to add something like

obj-${CONFIG_MACH_TEGRA_DT} += board-trimslice-pinmux.o

to the Makefile?

Yes, definitely. I've fixed this up locally; I hope to repost soon.

Can it please be obj-$(CONFIG_MACH_TEGRA_DT) instead? I think both Russell and Olof agreed[0] to use parens instead of braces, even though the current practice is to copy what previous boards did.

Thierry

[0]: http://article.gmane.org/gmane.linux.ports.tegra/1670
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111025/e6ad7097/attachment-0001.sig>

#4 lore raw

PATCH 1/1 arm/tegra: Add device-tree support for TrimSlice board

Quoted 20 lines · Thierry Reding
Quoted 19 lines · Stephen Warren

Marc Dietrich wrote at Monday, October 24, 2011 3:28 PM:

Quoted 18 lines · On Monday 24 October 2011 12:01:07 Stephen Warren wrote:
Quoted 4 lines

* Add device-tree file for TrimSlice
* Add that to the list of .dts files to build
* Update board-dt.c to recognize TrimSlice board name

Quoted 8 lines

---
?arch/arm/boot/dts/tegra-trimslice.dts | ? 38 +++++++++++++++++++++++++++++++++ arch/arm/mach-tegra/Makefile.boot ? ? | ?1 +
?arch/arm/mach-tegra/board-dt.c ? ? ? ?| ? ?3 ++
?3 files changed, 42 insertions(+), 0 deletions(-)
?create mode 100644 arch/arm/boot/dts/tegra-trimslice.dts

doesn't this also require to add something like

obj-${CONFIG_MACH_TEGRA_DT} += board-trimslice-pinmux.o

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

to the Makefile?

Yes, definitely. I've fixed this up locally; I hope to repost soon.

Can it please be obj-$(CONFIG_MACH_TEGRA_DT) instead? I think both Russell and Olof agreed[0] to use parens instead of braces, even though the current practice is to copy what previous boards did.

Ah yeah, I forgot to clean that up for 3.2, I'll post a patch shortly. Braces are nonstandard, and will continue to proliferate if left in there.

-Olof