Skip to contentSkip to conversation

tegra: paz00: add device tree support

PATCH New Stephen Warren 2 participants 7 messages May 21, 2012 – May 23, 2012 Tegra architecture support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tegra: paz00: add device tree support

From: Stephen Warren <[email protected]>

... to enable USB host support, which enables Ethernet support.

---
 board/compal/dts/tegra2-paz00.dts |   57 +++++++++++++++++++++++++++++++++++++
 include/configs/paz00.h           |   22 +++++++++++++-
 2 files changed, 78 insertions(+), 1 deletions(-)
 create mode 100644 board/compal/dts/tegra2-paz00.dts
board/compal/dts/tegra2-paz00.dts new file +57 -0
new file mode 100644
index 0000000..9e3e169
@@ -0,0 +1,57 @@
+/dts-v1/;
+
+/include/ ARCH_CPU_DTS
+
+/ {
+        model = "Toshiba AC100 / Dynabook AZ";
+        compatible = "compal,paz00", "nvidia,tegra20";
+
+	aliases {
+		usb0 = "/usb at c5008000";
+	};
+
+	memory {
+		reg = <0x00000000 0x20000000>;
+	};
+
+	clocks {
+		clk_32k: clk_32k {
+			clock-frequency = <32000>;
+		};
+		osc {
+			clock-frequency = <12000000>;
+		};
+	};
+
+	clock at 60006000 {
+		clocks = <&clk_32k &osc>;
+	};
+
+	serial at 70006000 {
+		clock-frequency = < 216000000 >;
+	};
+
+	i2c at 7000c000 {
+		status = "disabled";
+	};
+
+	i2c at 7000c400 {
+		status = "disabled";
+	};
+
+	i2c at 7000c500 {
+		status = "disabled";
+	};
+
+	i2c at 7000d000 {
+		status = "disabled";
+	};
+
+	usb at c5000000 {
+		status = "disabled";
+	};
+
+	usb at c5004000 {
+		status = "disabled";
+	};
+};
include/configs/paz00.h +21 -1
index ced185e..f8bd7dc 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010,2011, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2010-2012 NVIDIA CORPORATION.  All rights reserved.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -20,6 +20,11 @@
 #include <asm/sizes.h>
 #include "tegra2-common.h"
 
+/* Enable fdt support for Paz00. Flash the image in u-boot-dtb.bin */
+#define CONFIG_DEFAULT_DEVICE_TREE	tegra2-paz00
+#define CONFIG_OF_CONTROL
+#define CONFIG_OF_SEPARATE
+
 /* High-level configuration options */
 #define V_PROMPT		"Tegra2 (Paz00) MOD # "
 #define CONFIG_TEGRA2_BOARD_STRING	"Compal Paz00"
@@ -48,6 +53,21 @@
 /* Environment not stored */
 #define CONFIG_ENV_IS_NOWHERE
 
+/* USB Host support */
+#define CONFIG_USB_EHCI
+#define CONFIG_USB_EHCI_TEGRA
+#define CONFIG_USB_STORAGE
+#define CONFIG_CMD_USB
+
+/* USB networking support */
+#define CONFIG_USB_HOST_ETHER
+#define CONFIG_USB_ETHER_SMSC95XX
+#define CONFIG_USB_ETHER_ASIX
+
+/* General networking support */
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_DHCP
+
 #include "tegra2-common-post.h"
 
 #endif /* __CONFIG_H */
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 tegra: paz00: add device tree support

Hi Stephen,

Am Montag, 21. Mai 2012, 14:04:37 schrieb Stephen Warren:

Quoted 5 lines

From: Stephen Warren <[email protected]>

... to enable USB host support, which enables Ethernet support.

while adding usb support is fine, I see no reason to add smsc95xx support because contrary to harmony, paz00 does not contain an ethernet port.

Marc

Quoted 115 lines
---
 board/compal/dts/tegra2-paz00.dts |   57
+++++++++++++++++++++++++++++++++++++ include/configs/paz00.h           |  
22 +++++++++++++-
 2 files changed, 78 insertions(+), 1 deletions(-)
 create mode 100644 board/compal/dts/tegra2-paz00.dts
(quoted diff) +0 -0

b/board/compal/dts/tegra2-paz00.dts new file mode 100644 index 0000000..9e3e169

board/compal/dts/tegra2-paz00.dts new file +57 -0
@@ -0,0 +1,57 @@
+/dts-v1/;
+
+/include/ ARCH_CPU_DTS
+
+/ {
+        model = "Toshiba AC100 / Dynabook AZ";
+        compatible = "compal,paz00", "nvidia,tegra20";
+
+	aliases {
+		usb0 = "/usb at c5008000";
+	};
+
+	memory {
+		reg = <0x00000000 0x20000000>;
+	};
+
+	clocks {
+		clk_32k: clk_32k {
+			clock-frequency = <32000>;
+		};
+		osc {
+			clock-frequency = <12000000>;
+		};
+	};
+
+	clock at 60006000 {
+		clocks = <&clk_32k &osc>;
+	};
+
+	serial at 70006000 {
+		clock-frequency = < 216000000 >;
+	};
+
+	i2c at 7000c000 {
+		status = "disabled";
+	};
+
+	i2c at 7000c400 {
+		status = "disabled";
+	};
+
+	i2c at 7000c500 {
+		status = "disabled";
+	};
+
+	i2c at 7000d000 {
+		status = "disabled";
+	};
+
+	usb at c5000000 {
+		status = "disabled";
+	};
+
+	usb at c5004000 {
+		status = "disabled";
+	};
+};
include/configs/paz00.h +21 -1
index ced185e..f8bd7dc 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010,2011, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2010-2012 NVIDIA CORPORATION.  All rights reserved.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -20,6 +20,11 @@
 #include <asm/sizes.h>
 #include "tegra2-common.h"
 
+/* Enable fdt support for Paz00. Flash the image in u-boot-dtb.bin */
+#define CONFIG_DEFAULT_DEVICE_TREE	tegra2-paz00
+#define CONFIG_OF_CONTROL
+#define CONFIG_OF_SEPARATE
+
 /* High-level configuration options */
 #define V_PROMPT		"Tegra2 (Paz00) MOD # "
 #define CONFIG_TEGRA2_BOARD_STRING	"Compal Paz00"
@@ -48,6 +53,21 @@
 /* Environment not stored */
 #define CONFIG_ENV_IS_NOWHERE
 
+/* USB Host support */
+#define CONFIG_USB_EHCI
+#define CONFIG_USB_EHCI_TEGRA
+#define CONFIG_USB_STORAGE
+#define CONFIG_CMD_USB
+
+/* USB networking support */
+#define CONFIG_USB_HOST_ETHER
+#define CONFIG_USB_ETHER_SMSC95XX
+#define CONFIG_USB_ETHER_ASIX
+
+/* General networking support */
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_DHCP
+
 #include "tegra2-common-post.h"
 
 #endif /* __CONFIG_H */
#2 lore raw

PATCH 1/1 tegra: paz00: add device tree support

Quoted 11 lines · Marc Dietrich

Hi Stephen,

Am Montag, 21. Mai 2012, 14:04:37 schrieb Stephen Warren:

Quoted 5 lines

From: Stephen Warren <[email protected]>

... to enable USB host support, which enables Ethernet support.

while adding usb support is fine, I see no reason to add smsc95xx support because contrary to harmony, paz00 does not contain an ethernet port.

Is the SMSC95xx only an internal part, or could it be present on a user-pluggable USB dongle? I wasn't sure, so I left it in.

#3 lore raw

PATCH 1/1 tegra: paz00: add device tree support

Quoted 8 lines · Stephen Warren
Quoted 7 lines · Marc Dietrich

Hi Stephen,

Am Montag, 21. Mai 2012, 14:04:37 schrieb Stephen Warren:

Quoted 4 lines

From: Stephen Warren <[email protected]>

... to enable USB host support, which enables Ethernet support.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

while adding usb support is fine, I see no reason to add smsc95xx support because contrary to harmony, paz00 does not contain an ethernet port.

Is the SMSC95xx only an internal part, or could it be present on a user-pluggable USB dongle? I wasn't sure, so I left it in.

Looking at the driver (and the Linux kernel driver and SMSC's website), it supports both the standalone USB->Ethernet 9500 chip that's likely to be in USB Ethernet dongles, and various combo USB hub + Ethernet chips that are found on motherboards (e.g. Harmony). As such, I think it's reasonable to leave this config option enabled on Paz00 and other Tegra boards even when such a chip isn't on the board itself. Do you agree?

#4 lore raw

PATCH 1/1 tegra: paz00: add device tree support

Quoted 17 lines · On Tuesday 22 May 2012 10:58:37 Stephen Warren wrote:
Quoted 8 lines · Stephen Warren
Quoted 7 lines · Marc Dietrich

Hi Stephen,

Am Montag, 21. Mai 2012, 14:04:37 schrieb Stephen Warren:

Quoted 4 lines

From: Stephen Warren <[email protected]>

... to enable USB host support, which enables Ethernet support.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

while adding usb support is fine, I see no reason to add smsc95xx support because contrary to harmony, paz00 does not contain an ethernet port.

Is the SMSC95xx only an internal part, or could it be present on a user-pluggable USB dongle? I wasn't sure, so I left it in.

Quoted 6 lines

Looking at the driver (and the Linux kernel driver and SMSC's website), it supports both the standalone USB->Ethernet 9500 chip that's likely to be in USB Ethernet dongles, and various combo USB hub + Ethernet chips that are found on motherboards (e.g. Harmony). As such, I think it's reasonable to leave this config option enabled on Paz00 and other Tegra boards even when such a chip isn't on the board itself. Do you agree?

Following this argument would mean to enable all current (and future) usb devices and we end up with an u-boot which is to heavy to swim. I only have a mcs7830 which is unfortunately not supported. Do you have a SMSC95xx based usb adapter or plan to get one? In this case I think it would be ok to enable it, otherwise I tend to disagree here. On the other hand, given that you kindly take care of the paz00 code, the decision is up to you.

Just my two cents,

Marc

#5 lore raw

PATCH 1/1 tegra: paz00: add device tree support

Quoted 25 lines · Marc Dietrich
Quoted 17 lines · On Tuesday 22 May 2012 10:58:37 Stephen Warren wrote:
Quoted 8 lines · Stephen Warren
Quoted 7 lines · Marc Dietrich

Hi Stephen,

Am Montag, 21. Mai 2012, 14:04:37 schrieb Stephen Warren:

Quoted 4 lines

From: Stephen Warren <[email protected]>

... to enable USB host support, which enables Ethernet support.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

while adding usb support is fine, I see no reason to add smsc95xx support because contrary to harmony, paz00 does not contain an ethernet port.

Is the SMSC95xx only an internal part, or could it be present on a user-pluggable USB dongle? I wasn't sure, so I left it in.

Quoted 6 lines

Looking at the driver (and the Linux kernel driver and SMSC's website), it supports both the standalone USB->Ethernet 9500 chip that's likely to be in USB Ethernet dongles, and various combo USB hub + Ethernet chips that are found on motherboards (e.g. Harmony). As such, I think it's reasonable to leave this config option enabled on Paz00 and other Tegra boards even when such a chip isn't on the board itself. Do you agree?

Quoted 6 lines

Following this argument would mean to enable all current (and future) usb devices and we end up with an u-boot which is to heavy to swim. I only have a mcs7830 which is unfortunately not supported. Do you have a SMSC95xx based usb adapter or plan to get one? In this case I think it would be ok to enable it, otherwise I tend to disagree here. On the other hand, given that you kindly take care of the paz00 code, the decision is up to you.

Mine is an Asix-based dongle.

It seems a pity to artificially limit ourselves. I'd be happy seeing all the USB devices enabled as the drivers are written myself.

But I suppose net-booting is a developer thing, and developers can easily turn on this option if they want, so I can remove it.

Is your objection for the Paz00 board only? I turned it on for all the other boards too. Note that Harmony really does have this chip on the board, so would need this option enabled either way.

#6 lore raw

PATCH 1/1 tegra: paz00: add device tree support

Am Dienstag, 22. Mai 2012, 16:30:29 schrieb Stephen Warren:

Quoted 40 lines · Marc Dietrich
Quoted 26 lines · On Tuesday 22 May 2012 10:58:37 Stephen Warren wrote:
Quoted 18 lines · Stephen Warren
Quoted 8 lines · Marc Dietrich
Quoted 7 lines

Hi Stephen,

Am Montag, 21. Mai 2012, 14:04:37 schrieb Stephen Warren:

Quoted 4 lines

From: Stephen Warren <[email protected]>

... to enable USB host support, which enables Ethernet support.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

while adding usb support is fine, I see no reason to add smsc95xx support
because contrary to harmony, paz00 does not contain an ethernet port.

Is the SMSC95xx only an internal part, or could it be present on a user-pluggable USB dongle? I wasn't sure, so I left it in.

Quoted 6 lines

Looking at the driver (and the Linux kernel driver and SMSC's website), it supports both the standalone USB->Ethernet 9500 chip that's likely to be in USB Ethernet dongles, and various combo USB hub + Ethernet chips that are found on motherboards (e.g. Harmony). As such, I think it's reasonable to leave this config option enabled on Paz00 and other Tegra boards even when such a chip isn't on the board itself. Do you agree?

Quoted 7 lines

Following this argument would mean to enable all current (and future) usb devices and we end up with an u-boot which is to heavy to swim. I only have a mcs7830 which is unfortunately not supported. Do you have a SMSC95xx based usb adapter or plan to get one? In this case I think it would be ok to enable it, otherwise I tend to disagree here. On the other hand, given that you kindly take care of the paz00 code, the decision is up to you.

Mine is an Asix-based dongle.

It seems a pity to artificially limit ourselves. I'd be happy seeing all the USB devices enabled as the drivers are written myself.

Quoted 6 lines

But I suppose net-booting is a developer thing, and developers can easily turn on this option if they want, so I can remove it.

Is your objection for the Paz00 board only? I turned it on for all the other boards too. Note that Harmony really does have this chip on the board, so would need this option enabled either way.

My comment was only with regard to Paz00. Of course, if Harmony has it build in (I mean the hardware), it should also be included in u-boot. The question was more if we should also support all possible "pluggable" hw. I only found a smsc 9500 eval board (usb adapter) for 160 pounds, while my mcs only cost me 1/10th of that. As I said, I'll leave it up to you (and the "vendors") to enable it in the build.

Marc