Skip to contentSkip to conversation

arm: tegra: initial support for apalis t30

PATCH Superseded Marcel Ziswiler 3 participants 6 messages Aug 22, 2014 – Aug 26, 2014 1 message not in the archive

Subsystems (2)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 4e5681daf84a08d160751c3da392f654e2b440ef.1408687805.git.marcel@ziswiler.com

#1 lore raw

PATCH v2 1/1 arm: tegra: initial support for apalis t30

This patch adds board support for the Toradex Apalis T30 a computer on module which can be used on different carrier boards.

For the sake of ease of use we do not distinguish between different carrier boards for now as the base module features are deemed sufficient enough for regular booting.

The following functionality is working so far:
- eMMC boot and environment storage
- Gigabit Ethernet (once Thierry's PCIe as well as Marek's i210 patches hit mainline)
- MMC/SD cards (both 8-bit as well as 4-bit slot)
- USB client/host (dual role port as client e.g. for DFU/UMS, other two ports as host)

---
Changes in v2:
- Fixed my odd commenting style within the device tree
- Added gigabit Ethernet (and with it PCIe and PMIC) support
- Fixed PCIe pinmux
- Cleaned-up order of includes in board file
- Added comments in configuration file
- Use architecture specific memcpy to speed up things

This patch got re-based to u-boot-tegra.

 arch/arm/Kconfig                                   |   4 +
 arch/arm/dts/Makefile                              |   1 +
 arch/arm/dts/tegra30-apalis.dts                    | 295 ++++++++++++++++++
 arch/arm/include/asm/mach-types.h                  |  13 +
 board/toradex/apalis_t30/Kconfig                   |  24 ++
 board/toradex/apalis_t30/MAINTAINERS               |   7 +
 board/toradex/apalis_t30/Makefile                  |   6 +
 board/toradex/apalis_t30/apalis_t30.c              |  92 ++++++
 .../toradex/apalis_t30/pinmux-config-apalis_t30.h  | 347 +++++++++++++++++++++
 configs/apalis_t30_defconfig                       |   3 +
 include/configs/apalis_t30.h                       |  82 +++++
 11 files changed, 874 insertions(+)
 create mode 100644 arch/arm/dts/tegra30-apalis.dts
 create mode 100644 board/toradex/apalis_t30/Kconfig
 create mode 100644 board/toradex/apalis_t30/MAINTAINERS
 create mode 100644 board/toradex/apalis_t30/Makefile
 create mode 100644 board/toradex/apalis_t30/apalis_t30.c
 create mode 100644 board/toradex/apalis_t30/pinmux-config-apalis_t30.h
 create mode 100644 configs/apalis_t30_defconfig
 create mode 100644 include/configs/apalis_t30.h
arch/arm/Kconfig +4 -0
index dd987cc..e5d31f9 100644
@@ -701,6 +701,9 @@ config TARGET_WHISTLER
 config TARGET_COLIBRI_T20_IRIS
 	bool "Support colibri_t20_iris"
 
+config TARGET_APALIS_T30
+	bool "Support Apalis T30"
+
 config TARGET_COLIBRI_T30
 	bool "Support Colibri T30"
 
@@ -990,6 +993,7 @@ source "board/ti/ti816x/Kconfig"
 source "board/ti/tnetv107xevm/Kconfig"
 source "board/timll/devkit3250/Kconfig"
 source "board/timll/devkit8000/Kconfig"
+source "board/toradex/apalis_t30/Kconfig"
 source "board/toradex/colibri_pxa270/Kconfig"
 source "board/toradex/colibri_t20_iris/Kconfig"
 source "board/toradex/colibri_t30/Kconfig"
arch/arm/dts/Makefile +1 -0
index c46b7be..45f7f8b 100644
@@ -19,6 +19,7 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
 	tegra20-ventana.dtb \
 	tegra20-whistler.dtb \
 	tegra20-colibri_t20_iris.dtb \
+	tegra30-apalis.dtb \
 	tegra30-beaver.dtb \
 	tegra30-cardhu.dtb \
 	tegra30-colibri.dtb \
arch/arm/dts/tegra30-apalis.dts new file +295 -0

295 lines not on this page · raw message

arch/arm/include/asm/mach-types.h +13 -0
index 560924e..d4a447b 100644
@@ -1107,6 +1107,7 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_ARMADILLO_800EVA     3863
 #define MACH_TYPE_KZM9G                4140
 #define MACH_TYPE_COLIBRI_T30          4493
+#define MACH_TYPE_APALIS_T30           4513
 
 #ifdef CONFIG_ARCH_EBSA110
 # ifdef machine_arch_type
@@ -14248,6 +14249,18 @@ extern unsigned int __machine_arch_type;
 # define machine_is_colibri_t30()	(0)
 #endif
 
+#ifdef CONFIG_MACH_APALIS_T30
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type	__machine_arch_type
+# else
+#  define machine_arch_type	MACH_TYPE_APALIS_T30
+# endif
+# define machine_is_apalis_t30()	(machine_arch_type == MACH_TYPE_APALIS_T30)
+#else
+# define machine_is_apalis_t30()	(0)
+#endif
+
 /*
  * These have not yet been registered
  */
board/toradex/apalis_t30/Kconfig new file +24 -0
new file mode 100644
index 0000000..4a9ccc2
@@ -0,0 +1,24 @@
+if TARGET_APALIS_T30
+
+config SYS_CPU
+	string
+	default "arm720t" if SPL_BUILD
+	default "armv7" if !SPL_BUILD
+
+config SYS_BOARD
+	string
+	default "apalis_t30"
+
+config SYS_VENDOR
+	string
+	default "toradex"
+
+config SYS_SOC
+	string
+	default "tegra30"
+
+config SYS_CONFIG_NAME
+	string
+	default "apalis_t30"
+
+endif
board/toradex/apalis_t30/MAINTAINERS new file +7 -0
new file mode 100644
index 0000000..01bc73e
@@ -0,0 +1,7 @@
+Apalis T30
+M:	Marcel Ziswiler <[email protected]>
+S:	Maintained
+F:	board/toradex/apalis_t30/
+F:	include/configs/apalis_t30.h
+F:	configs/apalis_t30_defconfig
+F:	arch/arm/dts/tegra30-apalis.dtb
board/toradex/apalis_t30/Makefile new file +6 -0
new file mode 100644
index 0000000..a968e6b
@@ -0,0 +1,6 @@
+# Copyright (c) 2014 Marcel Ziswiler
+# SPDX-License-Identifier:      GPL-2.0+
+
+include $(srctree)/board/nvidia/common/common.mk
+
+obj-y	+= apalis_t30.o
board/toradex/apalis_t30/apalis_t30.c new file +92 -0

92 lines not on this page · raw message

board/toradex/apalis_t30/pinmux-config-apalis_t30.h new file +347 -0

347 lines not on this page · raw message

configs/apalis_t30_defconfig new file +3 -0
new file mode 100644
index 0000000..782298f
@@ -0,0 +1,3 @@
+CONFIG_SPL=y
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_APALIS_T30=y
include/configs/apalis_t30.h new file +82 -0

82 lines not on this page · raw message

Signature · 1 line
1.9.3
#2 lore raw

PATCH v2 1/1 arm: tegra: initial support for apalis t30

Quoted 7 lines · Marcel Ziswiler

This patch adds board support for the Toradex Apalis T30 a computer on module which can be used on different carrier boards.

For the sake of ease of use we do not distinguish between different carrier boards for now as the base module features are deemed sufficient enough for regular booting.

Quoted 7 lines

The following functionality is working so far:
- eMMC boot and environment storage
- Gigabit Ethernet (once Thierry's PCIe as well as Marek's i210 patches hit mainline)
- MMC/SD cards (both 8-bit as well as 4-bit slot)
- USB client/host (dual role port as client e.g. for DFU/UMS, other two ports as host)

Looks fine at a quick glance, just one nit below, otherwise,

configs/apalis_t30_defconfig

Quoted 7 lines
configs/apalis_t30_defconfig +5 -0
 
+/* USB networking support */
+#define CONFIG_USB_HOST_ETHER
+#define CONFIG_USB_ETHER_ASIX
+
+#define CONFIG_USE_ARCH_MEMCPY

That last option isn't set on other Tegra boards; what's it for?

#3 lore raw

PATCH v2 1/1 arm: tegra: initial support for apalis t30

Quoted 3 lines · Stephen Warren
Quoted 1 line

+#define CONFIG_USE_ARCH_MEMCPY

That last option isn't set on other Tegra boards; what's it for?

This is my special gift to Thierry to leverage architecture specific memory copying routine which gives another few percent performance boost on image download curtsey Stefan initially experimenting with it on Vybrid (;-p).

#4 lore raw

PATCH v2 1/1 arm: tegra: initial support for apalis t30

Quoted 9 lines · Marcel Ziswiler
Quoted 3 lines · Stephen Warren
Quoted 1 line

+#define CONFIG_USE_ARCH_MEMCPY

That last option isn't set on other Tegra boards; what's it for?

This is my special gift to Thierry to leverage architecture specific memory copying routine which gives another few percent performance boost on image download curtsey Stefan initially experimenting with it on Vybrid (;-p).

Unfortunately enabling this doesn't seem to make much difference on Jetson TK1. TFTP downloads are still around 2 MiB/s. But I suspect that this might be a more general issue with the r8169 driver not being very optimized for speed.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140825/54e8db4b/attachment.pgp>

#5 lore raw

PATCH v2 1/1 arm: tegra: initial support for apalis t30

In reply to Marcel Ziswiler
Quoted 9 lines · Marcel Ziswiler
Quoted 3 lines · Stephen Warren
Quoted 1 line

+#define CONFIG_USE_ARCH_MEMCPY

That last option isn't set on other Tegra boards; what's it for?

This is my special gift to Thierry to leverage architecture specific memory copying routine which gives another few percent performance boost on image download curtsey Stefan initially experimenting with it on Vybrid (;-p).

This sounds like, if we enable it, it should be part of one of include/configs/tegra*.h, not just one board-specific file. I think we should drop it from this patch, and add it to an appropriate common file in a separate patch.

#6 lore raw

PATCH v2 1/1 arm: tegra: initial support for apalis t30

Quoted 4 lines · Stephen Warren

This sounds like, if we enable it, it should be part of one of include/configs/tegra*.h, not just one board-specific file. I think we should drop it from this patch, and add it to an appropriate common file in a separate patch.

OK, will re-submit a v3 with that dropped plus submit a separate patch enabling this across all Tegra boards.