ARM: initial Tegra support
v20120528 cover ARM: initial Tegra support
This patch series adds initial NVidia Tegra SoC support.
Also it introduces Tegra 250-based Toshiba AC100 netbook support. Barebox can start from U-Boot only.
[PATCH v20120528 1/5] ARM: initial Tegra support [PATCH v20120528 2/5] ARM: Tegra: add Toshiba AC100 support [PATCH v20120528 3/5] usb: set MAXINTERFACES = 16 [PATCH v20120528 4/5] toshiba-ac100: add USB host support [PATCH v20120528 5/5] toshiba_ac100: add defconfig
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH v20120528 1/5 ARM: initial Tegra support
--- arch/arm/Kconfig | 6 + arch/arm/Makefile | 1 + arch/arm/mach-tegra/Kconfig | 7 + arch/arm/mach-tegra/Makefile | 2 + arch/arm/mach-tegra/clock.c | 59 ++++++ arch/arm/mach-tegra/include/mach/debug_ll.h | 45 +++++ arch/arm/mach-tegra/include/mach/iomap.h | 292 +++++++++++++++++++++++++++ arch/arm/mach-tegra/reset.c | 42 ++++ 8 files changed, 454 insertions(+) create mode 100644 arch/arm/mach-tegra/Kconfig create mode 100644 arch/arm/mach-tegra/Makefile create mode 100644 arch/arm/mach-tegra/clock.c create mode 100644 arch/arm/mach-tegra/include/mach/debug_ll.h create mode 100644 arch/arm/mach-tegra/include/mach/iomap.h create mode 100644 arch/arm/mach-tegra/reset.c
arch/arm/Kconfig +6 -0
@@ -83,6 +83,11 @@ config ARCH_VERSATILE bool "ARM Versatile boards (ARM926EJ-S)" select CPU_ARM926T +config ARCH_TEGRA + bool "Nvidia Tegra-based boards" + select CPU_ARM926T + select HAS_DEBUG_LL + endchoice source arch/arm/cpu/Kconfig
@@ -96,6 +101,7 @@ source arch/arm/mach-omap/Kconfig source arch/arm/mach-pxa/Kconfig source arch/arm/mach-samsung/Kconfig source arch/arm/mach-versatile/Kconfig +source arch/arm/mach-tegra/Kconfig config ARM_ASM_UNIFIED bool
arch/arm/Makefile +1 -0
@@ -61,6 +61,7 @@ machine-$(CONFIG_ARCH_OMAP) := omap machine-$(CONFIG_ARCH_PXA) := pxa machine-$(CONFIG_ARCH_SAMSUNG) := samsung machine-$(CONFIG_ARCH_VERSATILE) := versatile +machine-$(CONFIG_ARCH_TEGRA) := tegra # Board directory name. This list is sorted alphanumerically # by CONFIG_* macro name.
arch/arm/mach-tegra/Kconfig new file +7 -0
@@ -0,0 +1,7 @@ +if ARCH_TEGRA + +config ARCH_TEXT_BASE + hex + default 0x31fc0000 + +endif
arch/arm/mach-tegra/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-y += clock.o +obj-y += reset.o
arch/arm/mach-tegra/clock.c new file +59 -0
59 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/debug_ll.h new file +45 -0
45 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/iomap.h new file +292 -0
292 lines not on this page · raw message
arch/arm/mach-tegra/reset.c new file +42 -0
42 lines not on this page · raw message
Signature · 7 lines
1.7.10 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v20120528 2/5 ARM: Tegra: add Toshiba AC100 support
In reply to Antony Pavlov--- Documentation/boards.dox | 1 + arch/arm/Makefile | 1 + arch/arm/boards/toshiba-ac100/Kconfig | 9 +++++ arch/arm/boards/toshiba-ac100/Makefile | 2 ++ arch/arm/boards/toshiba-ac100/board.c | 34 ++++++++++++++++++ arch/arm/boards/toshiba-ac100/config.h | 5 +++ arch/arm/boards/toshiba-ac100/serial.c | 43 +++++++++++++++++++++++ arch/arm/boards/toshiba-ac100/toshiba-ac100.dox | 37 +++++++++++++++++++ arch/arm/mach-tegra/Kconfig | 12 +++++++ 9 files changed, 144 insertions(+) create mode 100644 arch/arm/boards/toshiba-ac100/Kconfig create mode 100644 arch/arm/boards/toshiba-ac100/Makefile create mode 100644 arch/arm/boards/toshiba-ac100/board.c create mode 100644 arch/arm/boards/toshiba-ac100/config.h create mode 100644 arch/arm/boards/toshiba-ac100/serial.c create mode 100644 arch/arm/boards/toshiba-ac100/toshiba-ac100.dox
Documentation/boards.dox +1 -0
@@ -37,6 +37,7 @@ ARM type: @li @subpage edb9315a @li @subpage board_cupid @li @subpage phycard-a-l1 +@li @subpage toshiba-ac100 Blackfin type:
arch/arm/Makefile +1 -0
@@ -134,6 +134,7 @@ board-$(CONFIG_MACH_TX25) := karo-tx25 board-$(CONFIG_MACH_TQMA53) := tqma53 board-$(CONFIG_MACH_TX51) := karo-tx51 board-$(CONFIG_MACH_MX6Q_ARM2) := freescale-mx6-arm2 +board-$(CONFIG_MACH_TOSHIBA_AC100) := toshiba-ac100 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
arch/arm/boards/toshiba-ac100/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +if MACH_TOSHIBA_AC100 + +config ARCH_TEXT_BASE + hex + default 0x01000000 + +config BOARDINFO + default "Toshiba AC100 (Tegra2)" +endif
arch/arm/boards/toshiba-ac100/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-y += board.o +obj-$(CONFIG_DRIVER_SERIAL_NS16550) += serial.o
arch/arm/boards/toshiba-ac100/board.c new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Copyright (C) 2011 Antony Pavlov <[email protected]> +* +* This file is part of barebox. +* See file CREDITS for list of people who contributed to this project. +* +* 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. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include <common.h> +#include <types.h> +#include <driver.h> +#include <init.h> +#include <asm/armlinux.h> +#include <sizes.h> + +static int ac100_mem_init (void ) +{ +arm_add_mem_device ("ram0" ,0x0 ,SZ_512M ); + +return 0 ; +} +mem_initcall (ac100_mem_init);
arch/arm/boards/toshiba-ac100/config.h new file +5 -0
@@ -0,0 +1,5 @@ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#endif /* __CONFIG_H */
arch/arm/boards/toshiba-ac100/serial.c new file +43 -0
43 lines not on this page · raw message
arch/arm/boards/toshiba-ac100/toshiba-ac100.dox new file +37 -0
@@ -0,0 +1,37 @@ +/** @page toshiba-ac100 Toshiba AC100 + +Toshiba AC100 is a Tegra2-based netbook. + +The netbook has +@li NVidia Tegra 250 SoC; +@li 512 MiB DDR2 RAM; +@li 8 GiB internal e-MMC Flash Memory (some models have 32 GiB); +@li RS232 serial interface (LV-TTL levels on the board!); +@li SD card slot; +@li 2xUSB interface (miniUSB-B and USB-A connectors); +@li 10" LCD display (1024x600); +@li HDMI-interface; +@li touchpad and keyboard connected via I2C; the ENE KB926QF keyboard controller is used; +@li web camera; +@li some models have 3G-modem. + +U-Boot master branch is working on AC100, but there's no support for the keyboard or the display. + +barebox-toshiba-ac100 mini-howto: + +1. Connect to the netbook's UART (see http://pecourt.ovh.org/wiki-tegra/doku.php?id=hardware); + +2. Start U-Boot loader. See http://ac100.grandou.net/uboot and http://ac100.grandou.net/swarren_brain_dump for details. + +3. If you use U-Boot with turned on display support, then switch to serial console: +@verbatim + Tegra2 (ac100) # setenv stdout serial +@endverbatim + +4. Upload barebox.bin via Ymodem and start it: +@verbatim + Tegra2 (ac100) # loady 0x01f00000 + Tegra2 (ac100) # go 0x01f00000 +@endverbatim + +*/
arch/arm/mach-tegra/Kconfig +12 -0
@@ -4,4 +4,16 @@ config ARCH_TEXT_BASE hex default 0x31fc0000 +choice + prompt "Tegra Board Type" + +config MACH_TOSHIBA_AC100 + bool "Toshiba AC100" + help + Say Y here if you are using Toshiba AC100 smartbook. + +endchoice + +source arch/arm/boards/toshiba-ac100/Kconfig + endif
Signature · 7 lines
1.7.10 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v20120528 3/5 usb: set MAXINTERFACES = 16
In reply to Antony PavlovTegra2 needs MAXINTERFACES > 8, so increase the macro's value.
--- include/usb/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/usb/usb.h +1 -1
@@ -38,7 +38,7 @@#define USB_MAX_DEVICE 32#define USB_MAXCONFIG 8 -#define USB_MAXINTERFACES 8 +#define USB_MAXINTERFACES 16#define USB_MAXENDPOINTS 16#define USB_MAXCHILDREN 8/* This is arbitrary */ #define USB_MAX_HUB 16
Signature · 7 lines
1.7.10 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v20120528 4/5 toshiba-ac100: add USB host support
In reply to Antony Pavlov--- arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
arch/arm/boards/toshiba-ac100/board.c +18 -0
@@ -24,6 +24,8 @@#include <init.h> #include <asm/armlinux.h> #include <sizes.h> +#include <usb/ehci.h> +#include <mach/iomap.h> static int ac100_mem_init (void ) {
@@ -32,3 +34,19 @@ static int ac100_mem_init(void)return 0 ; }mem_initcall (ac100_mem_init); + +#ifdef CONFIG_USB_EHCI +static struct ehci_platform_data ehci_pdata = { + .flags =EHCI_HAS_TT , +}; +#endif + +static int ac100_devices_init (void ) +{ +#ifdef CONFIG_USB_EHCI +add_generic_usb_ehci_device (-1 ,TEGRA_USB3_BASE , &ehci_pdata); +#endif + +return 0 ; +} +device_initcall (ac100_devices_init);
Signature · 7 lines
1.7.10 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v20120528 5/5 toshiba_ac100: add defconfig
In reply to Antony Pavlov--- arch/arm/configs/toshiba_ac100_defconfig | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 arch/arm/configs/toshiba_ac100_defconfig
arch/arm/configs/toshiba_ac100_defconfig new file +39 -0
@@ -0,0 +1,39 @@ +CONFIG_ARCH_TEGRA=y +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y +CONFIG_TEXT_BASE=0x01000000 +CONFIG_BROKEN=y +CONFIG_EXPERIMENTAL=y +CONFIG_PROMPT="toshiba ac100> " +CONFIG_LONGHELP=y +CONFIG_CMDLINE_EDITING=y +CONFIG_AUTO_COMPLETE=y +# CONFIG_ERRNO_MESSAGES is not set +# CONFIG_DEFAULT_ENVIRONMENT is not set +CONFIG_POLLER=y +CONFIG_ENABLE_DEVICE_NOISE=y +CONFIG_CMD_SLEEP=y +# CONFIG_CMD_TRUE is not set +# CONFIG_CMD_FALSE is not set +CONFIG_CMD_LOADB=y +CONFIG_CMD_LOADY=y +CONFIG_CMD_LOADS=y +CONFIG_CMD_MEMINFO=y +CONFIG_CMD_MD5SUM=y +CONFIG_CMD_SHA1SUM=y +CONFIG_CMD_BOOTM_SHOW_TYPE=y +CONFIG_CMD_RESET=y +CONFIG_CMD_GO=y +CONFIG_NET=y +CONFIG_NET_DHCP=y +CONFIG_NET_PING=y +CONFIG_NET_TFTP=y +CONFIG_NET_TFTP_PUSH=y +CONFIG_NET_NETCONSOLE=y +CONFIG_DRIVER_SERIAL_NS16550=y +CONFIG_NET_USB=y +CONFIG_NET_USB_ASIX=y +# CONFIG_SPI is not set +CONFIG_USB=y +CONFIG_USB_EHCI=y +CONFIG_USB_STORAGE=y +CONFIG_FS_FAT=y
Signature · 7 lines
1.7.10 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH v20120528 4/5] toshiba-ac100: add USB host support
In reply to Antony PavlovQuoted 24 lines · Antony Pavlov
Signed-off-by Antony Pavlov <[email protected]>--- arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)arch/arm/boards/toshiba-ac100/board.c +4
-0@@ -24,6 +24,8 @@#include <init.h> #include <asm/armlinux.h> #include <sizes.h> +#include <usb/ehci.h> +#include <mach/iomap.h> static int ac100_mem_init (void ) {@@ -32,3 +34,19 @@ static int ac100_mem_init(void)return 0 ; }mem_initcall (ac100_mem_init); + +#ifdef CONFIG_USB_EHCI
arch/arm/boards/toshiba-ac100/board.c static int ac100_mem_init(void) · line 48
Quoted 10 lines
arch/arm/boards/toshiba-ac100/board.c +10
-0+static struct ehci_platform_data ehci_pdata = { + .flags =EHCI_HAS_TT , +}; +#endif + +static int ac100_devices_init (void ) +{ +#ifdef CONFIG_USB_EHCI +add_generic_usb_ehci_device (-1 ,TEGRA_USB3_BASE , &ehci_pdata); +#endif
Better skip the ifdefs. It won't hurt except for a few bytes of wated space.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH v20120528 4/5] toshiba-ac100: add USB host support
Quoted 30 lines · Sascha Hauer
Quoted 29 lines · Antony Pavlov
Signed-off-by Antony Pavlov <[email protected]>--- arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)arch/arm/boards/toshiba-ac100/board.c +9
-0@@ -24,6 +24,8 @@#include <init.h> #include <asm/armlinux.h> #include <sizes.h> +#include <usb/ehci.h> +#include <mach/iomap.h> static int ac100_mem_init (void ) {@@ -32,3 +34,19 @@ static int ac100_mem_init(void)return 0 ; }mem_initcall (ac100_mem_init); + +#ifdef CONFIG_USB_EHCI +static struct ehci_platform_data ehci_pdata = { + .flags =EHCI_HAS_TT , +}; +#endif +
Quoted 8 lines
arch/arm/boards/toshiba-ac100/board.c static int ac100_mem_init(void) · line 48
Quoted 5 lines
arch/arm/boards/toshiba-ac100/board.c +5
-0+static int ac100_devices_init (void ) +{ +#ifdef CONFIG_USB_EHCI +add_generic_usb_ehci_device (-1 ,TEGRA_USB3_BASE , &ehci_pdata); +#endif Better skip the ifdefs. It won't hurt except for a few bytes of wated space.
and the -1 need to be a define
btw I think we need to change the auto allocated dev_id to -2 so -1 one have the same meanning as in the kernel
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH v20120528 4/5] toshiba-ac100: add USB host support
Quoted 39 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 30 lines · Sascha Hauer
Quoted 29 lines · Antony Pavlov
Signed-off-by Antony Pavlov <[email protected]>--- arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)arch/arm/boards/toshiba-ac100/board.c +9
-0@@ -24,6 +24,8 @@#include <init.h> #include <asm/armlinux.h> #include <sizes.h> +#include <usb/ehci.h> +#include <mach/iomap.h> static int ac100_mem_init (void ) {@@ -32,3 +34,19 @@ static int ac100_mem_init(void)return 0 ; }mem_initcall (ac100_mem_init); + +#ifdef CONFIG_USB_EHCI +static struct ehci_platform_data ehci_pdata = { + .flags =EHCI_HAS_TT , +}; +#endif +Quoted 8 lines
arch/arm/boards/toshiba-ac100/board.c static int ac100_mem_init(void) · line 48
Quoted 5 lines
arch/arm/boards/toshiba-ac100/board.c +5
-0+static int ac100_devices_init (void ) +{ +#ifdef CONFIG_USB_EHCI +add_generic_usb_ehci_device (-1 ,TEGRA_USB3_BASE , &ehci_pdata); +#endif Better skip the ifdefs. It won't hurt except for a few bytes of wated space.
Quoted 5 lines
and the -1 need to be a define
btw I think we need to change the auto allocated
dev_idto -2 so -1 one have the same meanning as in the kernel
I think we still have hardcoded -1 around.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH v20120528 4/5] toshiba-ac100: add USB host support
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 39 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 30 lines · Sascha Hauer
Quoted 29 lines · Antony Pavlov
Signed-off-by Antony Pavlov <[email protected]>---
arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++1 file changed, 18 insertions(+)arch/arm/boards/toshiba-ac100/board.c +9
-0@@ -24,6 +24,8 @@ #include <init.h> #include <asm/armlinux.h> #include <sizes.h> +#include <usb/ehci.h> +#include <mach/iomap.h> static int ac100_mem_init(void) {@@ -32,3 +34,19 @@ static int ac100_mem_init(void) return 0; } mem_initcall(ac100_mem_init); + +#ifdef CONFIG_USB_EHCI +static struct ehci_platform_data ehci_pdata = { + .flags = EHCI_HAS_TT, +}; +#endif +Quoted 8 lines
arch/arm/boards/toshiba-ac100/board.c static int ac100_mem_init(void) · line 48
Quoted 5 lines
arch/arm/boards/toshiba-ac100/board.c +5
-0+static int ac100_devices_init (void ) +{ +#ifdef CONFIG_USB_EHCI + add_generic_usb_ehci_device(-1, TEGRA_USB3_BASE, &ehci_pdata); +#endif Better skip the ifdefs. It won't hurt except for a few bytes of wated space.
Quoted 1 line
and the -1 need to be a define
Like this?
add_generic_usb_ehci_device(DEVICE_ID_DYNAMIC, TEGRA_USB3_BASE, &ehci_pdata);
Signature · 7 lines
Best regards, Antony Pavlov _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH v20120528 4/5] toshiba-ac100: add USB host support
In reply to Sascha HauerQuoted 40 lines · Sascha Hauer
Quoted 39 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 38 lines · Sascha Hauer
Quoted 24 lines · Antony Pavlov
Signed-off-by Antony Pavlov <[email protected]>--- arch/arm/boards/toshiba-ac100/board.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)arch/arm/boards/toshiba-ac100/board.c +4
-0@@ -24,6 +24,8 @@#include <init.h> #include <asm/armlinux.h> #include <sizes.h> +#include <usb/ehci.h> +#include <mach/iomap.h> static int ac100_mem_init (void ) {@@ -32,3 +34,19 @@ static int ac100_mem_init(void)return 0 ; }mem_initcall (ac100_mem_init); + +#ifdef CONFIG_USB_EHCI arch/arm/boards/toshiba-ac100/board.c static int ac100_mem_init(void) · line 48
Quoted 10 lines
arch/arm/boards/toshiba-ac100/board.c +10
-0+static struct ehci_platform_data ehci_pdata = { + .flags =EHCI_HAS_TT , +}; +#endif + +static int ac100_devices_init (void ) +{ +#ifdef CONFIG_USB_EHCI +add_generic_usb_ehci_device (-1 ,TEGRA_USB3_BASE , &ehci_pdata); +#endif Better skip the ifdefs. It won't hurt except for a few bytes of wated space.
Quoted 7 lines
Quoted 5 lines
and the -1 need to be a define
btw I think we need to change the auto allocated
dev_idto -2 so -1 one have the same meanning as in the kernelI think we still have hardcoded -1 around.
I check normally no
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH v20120528 4/5] toshiba-ac100: add USB host support
Quoted 7 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 6 lines
Quoted 4 lines
btw I think we need to change the auto allocated
dev_idto -2 so -1 one have the same meanning as in the kernelI think we still have hardcoded -1 around.
I check normally no
Just grep for add_generic_usb_ehci_device. I have a patch for this but I don't know which other wrapper functions are around which might have a -1 in them.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox