Skip to contentSkip to conversation

ARM: tegra: initial support for Colibri T30

PATCH Superseded [email protected] 4 participants 8 messages May 13, 2014 – May 14, 2014

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ARM: tegra: initial support for Colibri T30

From: Stefan Agner <[email protected]>

This patches cooked a while in our repository and is now quite complete. All is tested on several Colibri T30 modules and evaluation boards by Marcel and me. The device tree is splitted into a module part and the carrier board. The former is then included by the latter (in this case the evaluation board). The comments "Colibri: " represent the SO-DIMM Pin name as defined in the Colibri standard, and should be helpful for users adopting the device tree for other carrier boards.

Stefan Agner (2):
ARM: tegra: enable MCP251x CAN controller and DS1307 RTC
ARM: tegra: initial add of Colibri T30

 arch/arm/boot/dts/Makefile                    |   1 +
 arch/arm/boot/dts/tegra30-colibri-eval-v3.dts | 202 ++++++++++++++
 arch/arm/boot/dts/tegra30-colibri.dtsi        | 375 ++++++++++++++++++++++++++
 arch/arm/configs/tegra_defconfig              |   6 +
 4 files changed, 584 insertions(+)
 create mode 100644 arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
 create mode 100644 arch/arm/boot/dts/tegra30-colibri.dtsi
Signature · 1 line
1.9.2
#1 lore raw

PATCH 1/2 ARM: tegra: enable MCP251x CAN controller and DS1307 RTC

From: Stefan Agner <[email protected]>

Toradex Colibri Evaluation Board uses the DS1307 RTC and the MCP251x CAN controller. The NVIDIA Tegra 3 based Colibri T30 module can be used on this carrier board, hence enable those drivers in tegra_defonfig.

Furthermore the NVIDIA Tegra 3 based Apalis T30 module too contains two MCP251x CAN controller.

---
 arch/arm/configs/tegra_defconfig | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/configs/tegra_defconfig +6 -0
index 2926281..6329632 100644
@@ -73,6 +73,11 @@ CONFIG_INET6_IPCOMP=y
 CONFIG_IPV6_MIP6=y
 CONFIG_IPV6_TUNNEL=y
 CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_CAN=y
+CONFIG_CAN_RAW=y
+CONFIG_CAN_BCM=y
+CONFIG_CAN_DEV=y
+CONFIG_CAN_MCP251X=y
 CONFIG_BT=y
 CONFIG_BT_RFCOMM=y
 CONFIG_BT_BNEP=y
@@ -222,6 +227,7 @@ CONFIG_LEDS_TRIGGER_TRANSIENT=y
 CONFIG_LEDS_TRIGGER_CAMERA=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_AS3722=y
+CONFIG_RTC_DRV_DS1307=y
 CONFIG_RTC_DRV_MAX8907=y
 CONFIG_RTC_DRV_PALMAS=y
 CONFIG_RTC_DRV_TPS6586X=y
Signature · 1 line
1.9.2
#3 lore raw

PATCH 2/2 ARM: tegra: initial add of Colibri T30

In reply to [email protected]

From: Stefan Agner <[email protected]>

This patch adds the device tree to support Toradex Colibri T30, a computer on module which can be used on different carrier boards.

The module consists of a Tegra 30 SoC, two PMIC, DDR3L RAM, eMMC, a LM95245 temperature sensor and an AX88772B USB Ethernet Controller. Furthermore, there is a STMPE811 and SGTL5000 audio codec which are not yet supported. Anything that is not self contained on the module is disabled by default.

The device tree for the Evaluation Board includes the modules device tree and enables the supported pheripherials of the carrier board (the Evaluation Board supports almost all of them).

---
 arch/arm/boot/dts/Makefile                    |   1 +
 arch/arm/boot/dts/tegra30-colibri-eval-v3.dts | 202 ++++++++++++++
 arch/arm/boot/dts/tegra30-colibri.dtsi        | 375 ++++++++++++++++++++++++++
 3 files changed, 578 insertions(+)
 create mode 100644 arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
 create mode 100644 arch/arm/boot/dts/tegra30-colibri.dtsi
arch/arm/boot/dts/Makefile +1 -0
index 35c146f..9e9669c 100644
@@ -367,6 +367,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
 	tegra30-beaver.dtb \
 	tegra30-cardhu-a02.dtb \
 	tegra30-cardhu-a04.dtb \
+	tegra30-colibri-eval-v3.dtb \
 	tegra114-dalmore.dtb \
 	tegra124-venice2.dtb
 dtb-$(CONFIG_ARCH_VERSATILE) += versatile-ab.dtb \
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts new file +202 -0

202 lines not on this page · raw message

arch/arm/boot/dts/tegra30-colibri.dtsi new file +375 -0

375 lines not on this page · raw message

Signature · 1 line
1.9.2
#4 lore raw

Re: [PATCH 2/2] ARM: tegra: initial add of Colibri T30

Quoted 14 lines · stefan at agner.ch

This patch adds the device tree to support Toradex Colibri T30, a computer on module which can be used on different carrier boards.

The module consists of a Tegra 30 SoC, two PMIC, DDR3L RAM, eMMC, a LM95245 temperature sensor and an AX88772B USB Ethernet Controller. Furthermore, there is a STMPE811 and SGTL5000 audio codec which are not yet supported. Anything that is not self contained on the module is disabled by default.

The device tree for the Evaluation Board includes the modules device tree and enables the supported pheripherials of the carrier board (the Evaluation Board supports almost all of them).

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 7

Quoted 6 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +5 -0
 
+#include "tegra30-colibri.dtsi"
+
+/ {
+	model = "Toradex Colibri T30 on Colibri Evaluation Board";
+	compatible = "toradex,colibri_t30-eval-v3", "nvidia,tegra30";

That should include all the compatible values "inherited" from the Colibri T30 module .dtsi file too.

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 13

Quoted 5 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +5 -0
+	aliases {
+		rtc0 = "/i2c at 7000c000/rtc at 68";
+		rtc1 = "/i2c at 7000d000/tps65911 at 2d";
+		rtc2 = "/rtc at 7000e000";
+	};

Wow, no shortage of RTCs!

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 75

Quoted 11 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +11 -0
+	/* SPI1: Colibri SSP */
+	spi at 7000d400 {
+		status = "okay";
+		spi-max-frequency = <25000000>;
+		can0: can at 0 {
+			compatible = "microchip,mcp2515";
+			reg = <0>;
+			clocks = <&clk16m>;
+			interrupt-parent = <&gpio>;
+			interrupts = <TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>;
+			spi-max-frequency = <10000000>;

So this chip doesn't get confused by a faster clock frequency when its chip-select line isn't asserted? I would have expected spi-max-frequency for the bus to be the minimum value that any device on the bus would tolerate.

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 94

Quoted 4 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +4 -0
+	/* EHCI instance 0: USB1_DP/N -> USBC_P/N */
+	usb at 7d000000 {
+		status = "okay";
+		dr_mode = "otg";

The dr_mode property is only for the PHY node.

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 147

Quoted 2 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +2 -0
+	panel: panel {
+		compatible = "edt,et057090dhu", "simple-panel";

The panel-simple driver doesn't seem to know about that EDT panel. How will it work out the display timings?

arch/arm/boot/dts/tegra30-colibri.dtsi line 13

Quoted 8 lines
arch/arm/boot/dts/tegra30-colibri.dtsi +6 -0
 
+/ {
+	model = "Toradex Colibri T30";
+	compatible = "toradex,colibri_t30-v11b",
+		     "toradex,colibri_t30-v11c",
+		     "toradex,colibri_t30-v11d",
+		     "toradex,colibri_t30", "nvidia,tegra30";

Do we really need all those compatible values? If those board revisions are all SW-compatible, then you may as well write just:

	compatible = "toradex,colibri_t30", "nvidia,tegra30";

arch/arm/boot/dts/tegra30-colibri.dtsi line 19

Quoted 5 lines
arch/arm/boot/dts/tegra30-colibri.dtsi +5 -0
+	aliases {
+		serial0 = &uarta;
+		serial1 = &uartd;
+		serial2 = &uartb;
+	};

tegra20.dtsi already sets the alias names for the serial ports. Previous discussions settled on giving each on-chip UART a static name, rather than renaming them per board.

arch/arm/boot/dts/tegra30-colibri.dtsi

Quoted 2 lines
arch/arm/boot/dts/tegra30-colibri.dtsi +2 -0
+	pmc at 7000e400 {
+		status = "okay";

The PMC node isn't disabled in tegra20.dtsi, so you don't need the status property here.

#2 lore raw

Re: [PATCH 1/2] ARM: tegra: enable MCP251x CAN controller and DS1307 RTC

In reply to [email protected]
Quoted 9 lines · stefan at agner.ch

From: Stefan Agner <[email protected]>

Toradex Colibri Evaluation Board uses the DS1307 RTC and the MCP251x CAN controller. The NVIDIA Tegra 3 based Colibri T30 module can be used on this carrier board, hence enable those drivers in tegra_defonfig.

Furthermore the NVIDIA Tegra 3 based Apalis T30 module too contains two MCP251x CAN controller.

I have squashed this patch into Tegra's for-3.16/defconfig branch.

Can you please also send a patch to enable the same options in multi_v7_defconfig. Send that to arm at kernel.org (it's an alias for the armsoc tree maintainers). That will ensure that anyone using that config will also get these changes.

Thanks.

#5 lore raw

Re: [PATCH 2/2] ARM: tegra: initial add of Colibri T30

In reply to Stephen Warren
Quoted 25 lines · Stephen Warren
Quoted 14 lines · stefan at agner.ch

This patch adds the device tree to support Toradex Colibri T30, a computer on module which can be used on different carrier boards.

The module consists of a Tegra 30 SoC, two PMIC, DDR3L RAM, eMMC, a LM95245 temperature sensor and an AX88772B USB Ethernet Controller. Furthermore, there is a STMPE811 and SGTL5000 audio codec which are not yet supported. Anything that is not self contained on the module is disabled by default.

The device tree for the Evaluation Board includes the modules device tree and enables the supported pheripherials of the carrier board (the Evaluation Board supports almost all of them).

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 7

Quoted 6 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +5 -0
 
+#include "tegra30-colibri.dtsi"
+
+/ {
+	model = "Toradex Colibri T30 on Colibri Evaluation Board";
+	compatible = "toradex,colibri_t30-eval-v3", "nvidia,tegra30";

That should include all the compatible values "inherited" from the Colibri T30 module .dtsi file too.

Quoted 7 lines

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 13

Quoted 5 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +5 -0
+	aliases {
+		rtc0 = "/i2c at 7000c000/rtc at 68";
+		rtc1 = "/i2c at 7000d000/tps65911 at 2d";
+		rtc2 = "/rtc at 7000e000";
+	};

Wow, no shortage of RTCs!

Yes (;-p). Please understand however that there are certain limitation if it comes to real-time clocks: The first one is the ultra low-power RTC available on the carrier board. The second one is PMIC integrated usually drawing much more current that the first dedicated one. The third one is Tegra SoC internal and won't keep the time across power-cycles in our design.

Quoted 8 lines
Quoted 8 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +8 -0
+	/* SPI1: Colibri SSP */
+	spi at 7000d400 {
+		status = "okay";
+		spi-max-frequency = <25000000>;
+		can0: can at 0 {
+			compatible = "microchip,mcp2515";
+			reg = <0>;
+			clocks = <&clk16m>;
Quoted 8 lines

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 75

Quoted 3 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +3 -0
+			interrupt-parent = <&gpio>;
+			interrupts = <TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>;
+			spi-max-frequency = <10000000>;

So this chip doesn't get confused by a faster clock frequency when its chip-select line isn't asserted? I would have expected spi-max-frequency for the bus to be the minimum value that any device on the bus would tolerate.

No SPI chip should ever get confused like that as long as they are chip select gated. At least by the traditional chip select meaning as opposed to NVIDIA's designers taking the term chip select a little too personal:
they indeed only select a chip otherwise all the chip select pins are just left floating!

Quoted 7 lines

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 94

Quoted 4 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +4 -0
+	/* EHCI instance 0: USB1_DP/N -> USBC_P/N */
+	usb at 7d000000 {
+		status = "okay";
+		dr_mode = "otg";

The dr_mode property is only for the PHY node.

Quoted 5 lines

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 147

Quoted 2 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts +2 -0
+	panel: panel {
+		compatible = "edt,et057090dhu", "simple-panel";

The panel-simple driver doesn't seem to know about that EDT panel. How will it work out the display timings?

Good question and me and Stefan actually even talked about that yesterday. I am actually using KMS right now as follows:

video=HDMI-A-1:1280x720-16 at 60 video=LVDS-1:640x480-16 at 60'

So the panel node is purely used to hook up the back light part right now.

From our point of view for our completely generic module approach where
each customer potentially hooks up his own display make/model it would be desirable to have some way of defining such timings directly through the device tree.

Quoted 11 lines

arch/arm/boot/dts/tegra30-colibri.dtsi line 13

Quoted 8 lines
arch/arm/boot/dts/tegra30-colibri.dtsi +6 -0
 
+/ {
+	model = "Toradex Colibri T30";
+	compatible = "toradex,colibri_t30-v11b",
+		     "toradex,colibri_t30-v11c",
+		     "toradex,colibri_t30-v11d",
+		     "toradex,colibri_t30", "nvidia,tegra30";

Do we really need all those compatible values? If those board revisions are all SW-compatible, then you may as well write just:

You are right. It indeed does not make much sense as only V1.0a which never actually went on sale would be software incompatible.

Quoted 11 lines
	compatible = "toradex,colibri_t30", "nvidia,tegra30";

arch/arm/boot/dts/tegra30-colibri.dtsi line 19

Quoted 5 lines
arch/arm/boot/dts/tegra30-colibri.dtsi +5 -0
+	aliases {
+		serial0 = &uarta;
+		serial1 = &uartd;
+		serial2 = &uartb;
+	};

tegra20.dtsi already sets the alias names for the serial ports. Previous discussions settled on giving each on-chip UART a static name, rather than renaming them per board.

Understood, however our Colibri standard defines a completely different order of the UARTs which is what we attempted to indicate by this aliases.

Quoted 5 lines

arch/arm/boot/dts/tegra30-colibri.dtsi

Quoted 2 lines
arch/arm/boot/dts/tegra30-colibri.dtsi +2 -0
+	pmc at 7000e400 {
+		status = "okay";

The PMC node isn't disabled in tegra20.dtsi, so you don't need the status property here.

#6 lore raw

Re: [PATCH 2/2] ARM: tegra: initial add of Colibri T30

Quoted 2 lines · Marcel Ziswiler
Quoted 1 line · Stephen Warren

On 05/13/2014 11:27 AM, stefan at agner.ch wrote:

[...]

Quoted 9 lines
Quoted 5 lines

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 147

Quoted 2 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts new file +2 -0
+	panel: panel {
+		compatible = "edt,et057090dhu", "simple-panel";

The panel-simple driver doesn't seem to know about that EDT panel. How will it work out the display timings?

Good question and me and Stefan actually even talked about that yesterday. I am actually using KMS right now as follows:

Quoted 8 lines

video=HDMI-A-1:1280x720-16 at 60 video=LVDS-1:640x480-16 at 60'

So the panel node is purely used to hook up the back light part right now.

From our point of view for our completely generic module approach where each customer potentially hooks up his own display make/model it would be desirable to have some way of defining such timings directly through the device tree.

Every customer design would presumably get its own device tree file, so they could easily follow the current conventions and update the panel-simple driver with the proper compatible value and display timings and then simply make the panel device node compatible with that.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140514/8441c07f/attachment-0001.sig>

#7 lore raw

Re: [PATCH 2/2] ARM: tegra: initial add of Colibri T30

In reply to Marcel Ziswiler
Quoted 23 lines · Marcel Ziswiler
Quoted 22 lines · Stephen Warren
Quoted 20 lines · stefan at agner.ch

This patch adds the device tree to support Toradex Colibri T30, a computer on module which can be used on different carrier boards.

The module consists of a Tegra 30 SoC, two PMIC, DDR3L RAM, eMMC, a LM95245 temperature sensor and an AX88772B USB Ethernet Controller. Furthermore, there is a STMPE811 and SGTL5000 audio codec which are not yet supported. Anything that is not self contained on the module is disabled by default.

The device tree for the Evaluation Board includes the modules device tree and enables the supported pheripherials of the carrier board (the Evaluation Board supports almost all of them).

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts new file +5 -0
 
+    aliases {
+        rtc0 = "/i2c at 7000c000/rtc at 68";
+        rtc1 = "/i2c at 7000d000/tps65911 at 2d";
+        rtc2 = "/rtc at 7000e000";
+    };
Quoted 8 lines
Quoted 1 line

Wow, no shortage of RTCs!

Yes (;-p). Please understand however that there are certain limitation if it comes to real-time clocks: The first one is the ultra low-power RTC available on the carrier board. The second one is PMIC integrated usually drawing much more current that the first dedicated one. The third one is Tegra SoC internal and won't keep the time across power-cycles in our design.

Sure, I understand this is just representing the HW. It was just surprising to see so many.

Quoted 17 lines
Quoted 12 lines

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 75

Quoted 11 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts new file +11 -0
+    /* SPI1: Colibri SSP */
+    spi at 7000d400 {
+        status = "okay";
+        spi-max-frequency = <25000000>;
+        can0: can at 0 {
+            compatible = "microchip,mcp2515";
+            reg = <0>;
+            clocks = <&clk16m>;
+            interrupt-parent = <&gpio>;
+            interrupts = <TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>;
+            spi-max-frequency = <10000000>;
Quoted 4 lines

So this chip doesn't get confused by a faster clock frequency when its chip-select line isn't asserted? I would have expected spi-max-frequency for the bus to be the minimum value that any device on the bus would tolerate.

Quoted 5 lines

No SPI chip should ever get confused like that as long as they are chip select gated. At least by the traditional chip select meaning as opposed to NVIDIA's designers taking the term chip select a little too personal:
they indeed only select a chip otherwise all the chip select pins are just left floating!

I'm not convinced about this. The clock signal still reaches all the chips, and hence still reaches some logic inside those chips. If the setup/hold timings aren't met (for internal parts of the chip's SPI state machine), then presumably all bets are off re: performance of the chip, irrespective of whether the CS line happens to gate how much of the chip actually does anything.

Quoted 11 lines
Quoted 7 lines

The dr_mode property is only for the PHY node.

arch/arm/boot/dts/tegra30-colibri-eval-v3.dts line 147

Quoted 2 lines
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts new file +2 -0
+    panel: panel {
+        compatible = "edt,et057090dhu", "simple-panel";

The panel-simple driver doesn't seem to know about that EDT panel. How will it work out the display timings?

Good question and me and Stefan actually even talked about that yesterday. I am actually using KMS right now as follows:

Quoted 8 lines

video=HDMI-A-1:1280x720-16 at 60 video=LVDS-1:640x480-16 at 60'

So the panel node is purely used to hook up the back light part right now.

From our point of view for our completely generic module approach where each customer potentially hooks up his own display make/model it would be desirable to have some way of defining such timings directly through the device tree.

Like Thierry, I think the DT needs to represent the actual HW.

If there's no panel on the carrier board itself, then it probably shouldn't even be in the base DT. If a user adds a panel, then they will modify their own DT to correctly represent it.

Quoted 8 lines
Quoted 8 lines
    compatible = "toradex,colibri_t30", "nvidia,tegra30";
Quoted 5 lines
arch/arm/boot/dts/tegra30-colibri.dtsi new file +5 -0
+    aliases {
+        serial0 = &uarta;
+        serial1 = &uartd;
+        serial2 = &uartb;
+    };
Quoted 6 lines
Quoted 3 lines

tegra20.dtsi already sets the alias names for the serial ports. Previous discussions settled on giving each on-chip UART a static name, rather than renaming them per board.

Understood, however our Colibri standard defines a completely different order of the UARTs which is what we attempted to indicate by this aliases.

I'd prefer that all Tegra boards use serial aliases consistently. If there's a real issue with this, please talk to Laxman (CC'd) and see if we can move all the UART alias entries into individual board files, so that this board isn't the odd one out.