[U-Boot] [PATCH v2 0/4] various fixes for apalis/colibri_t30

The following is a set of various fixes for Toradex Apalis and Colibri T30.
Changes in v2: - Include commit subject too when referencing a previous commit as suggested by Stephen - Add various acked- and reviewed-by - Drop CONFIG_CMDLINE_EDITING and CONFIG_CMD_FS_GENERIC as they already get pulled in via config_distro_defaults.h as noted by Stephen
Marcel Ziswiler (4): dm: tegra: dts: add aliases for spi on apalis_t30 apalis/colibri_t30: fix MMC/SD card detect GPIOs apalis_t30: enable gigabit ethernet via pcie apalis/colibri_t30: add misc cmds increase buf sizes and max args
arch/arm/dts/tegra30-apalis.dts | 13 +++++++++++-- arch/arm/dts/tegra30-colibri.dts | 4 +++- include/configs/apalis_t30.h | 29 ++++++++++++++++++++++------- include/configs/colibri_t30.h | 24 ++++++++++++++++++++++-- 4 files changed, 58 insertions(+), 12 deletions(-)

All boards with a SPI interface have a suitable spi alias except Apalis T30. Add these missing aliases just as the following commit did for the others:
d2f60f93325a "dm: tegra: dts: Add aliases for spi on tegra30 boards"
Signed-off-by: Marcel Ziswiler marcel@ziswiler.com ---
Changes in v2: - Include commit subject too when referencing a previous commit as suggested by Stephen
arch/arm/dts/tegra30-apalis.dts | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/arch/arm/dts/tegra30-apalis.dts b/arch/arm/dts/tegra30-apalis.dts index 15db0f2..75c5d5f 100644 --- a/arch/arm/dts/tegra30-apalis.dts +++ b/arch/arm/dts/tegra30-apalis.dts @@ -18,6 +18,10 @@ sdhci0 = "/sdhci@78000600"; sdhci1 = "/sdhci@78000400"; sdhci2 = "/sdhci@78000000"; + spi0 = "/spi@7000d400"; + spi1 = "/spi@7000dc00"; + spi2 = "/spi@7000de00"; + spi3 = "/spi@7000da00"; usb0 = "/usb@7d000000"; usb1 = "/usb@7d004000"; usb2 = "/usb@7d008000";

This fixes the MMC/SD card detect GPIOs for Apalis T30 which got broken by the following commit:
2b2b50bc8748 "dm: tegra: dts: Use TEGRA_GPIO() macro for all GPIOs"
While at it also re-add the comments describing which particular Apalis/Colibri pins those GPIOs are on.
Signed-off-by: Marcel Ziswiler marcel@ziswiler.com Reviewed-by: Simon Glass sjg@chromium.org Acked-by: Stefan Agner stefan.agner@toradex.com ---
Changes in v2: - Include commit subject too when referencing a previous commit as suggested by Stephen
arch/arm/dts/tegra30-apalis.dts | 9 +++++++-- arch/arm/dts/tegra30-colibri.dts | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/tegra30-apalis.dts b/arch/arm/dts/tegra30-apalis.dts index 75c5d5f..13ab42b 100644 --- a/arch/arm/dts/tegra30-apalis.dts +++ b/arch/arm/dts/tegra30-apalis.dts @@ -247,13 +247,15 @@ sdhci@78000000 { status = "okay"; bus-width = <4>; - cd-gpios = <&gpio TEGRA_GPIO(CC, 5) GPIO_ACTIVE_HIGH>; + /* SD1_CD# */ + cd-gpios = <&gpio TEGRA_GPIO(CC, 5) GPIO_ACTIVE_LOW>; };
sdhci@78000400 { status = "okay"; bus-width = <8>; - cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; + /* MMC1_CD# */ + cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>; };
sdhci@78000600 { @@ -266,12 +268,14 @@ usb@7d000000 { status = "okay"; dr_mode = "peripheral"; + /* USBO1_EN */ nvidia,vbus-gpio = <&gpio TEGRA_GPIO(T, 5) GPIO_ACTIVE_HIGH>; };
/* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */ usb@7d004000 { status = "okay"; + /* USBH_EN */ nvidia,vbus-gpio = <&gpio TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>; phy_type = "utmi"; }; @@ -279,6 +283,7 @@ /* EHCI instance 2: USB3_DP/N -> USBH3_DP/N */ usb@7d008000 { status = "okay"; + /* USBH_EN */ nvidia,vbus-gpio = <&gpio TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>; };
diff --git a/arch/arm/dts/tegra30-colibri.dts b/arch/arm/dts/tegra30-colibri.dts index 6cd1902..36533dc 100644 --- a/arch/arm/dts/tegra30-colibri.dts +++ b/arch/arm/dts/tegra30-colibri.dts @@ -64,7 +64,7 @@ sdhci@78000200 { status = "okay"; bus-width = <4>; - cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>; + cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>; /* MMCD */ };
sdhci@78000600 { @@ -83,12 +83,14 @@ usb@7d004000 { status = "okay"; phy_type = "utmi"; + /* VBUS_LAN */ nvidia,vbus-gpio = <&gpio TEGRA_GPIO(DD, 2) GPIO_ACTIVE_HIGH>; };
/* EHCI instance 2: USB3_DP/N -> USBH_P/N */ usb@7d008000 { status = "okay"; + /* USBH_PEN */ nvidia,vbus-gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>; }; };

Now with all the Tegra PCIe and Intel E1000 gigabit Ethernet driver updates being merged actually make use of it.
While at it get rid of the USB networking support which now does not make much sense any longer.
Signed-off-by: Marcel Ziswiler marcel@ziswiler.com Reviewed-by: Simon Glass sjg@chromium.org ---
Changes in v2: None
include/configs/apalis_t30.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h index 61809fc..b301f9e 100644 --- a/include/configs/apalis_t30.h +++ b/include/configs/apalis_t30.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Marcel Ziswiler + * Copyright (c) 2014-2015 Marcel Ziswiler * * SPDX-License-Identifier: GPL-2.0+ */ @@ -47,12 +47,8 @@ #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB
-/* USB networking support */ -#define CONFIG_USB_HOST_ETHER -#define CONFIG_USB_ETHER_ASIX - /* PCI host support */ -#undef CONFIG_PCI /* just define once Tegra PCIe support got merged */ +#define CONFIG_PCI #define CONFIG_PCI_TEGRA #define CONFIG_PCI_PNP #define CONFIG_CMD_PCI @@ -60,7 +56,7 @@
/* PCI networking support */ #define CONFIG_E1000 -#undef CONFIG_E1000_NO_NVM /* just define once E1000 driver got fixed */ +#define CONFIG_E1000_NO_NVM
/* General networking support */ #define CONFIG_CMD_NET

In order to work with our downstream U-Boot environment and update scripts add support for the following miscellaneous commands:
CONFIG_CMD_SETEXPR CONFIG_FAT_WRITE
Increase the console I/O and print as well as argument buffer sizes:
CONFIG_SYS_CBSIZE CONFIG_SYS_PBSIZE CONFIG_SYS_BARGSIZE
Increase the maximum number of arguments allowed:
CONFIG_SYS_MAXARGS
Signed-off-by: Marcel Ziswiler marcel@ziswiler.com ---
Changes in v2: - Drop CONFIG_CMDLINE_EDITING and CONFIG_CMD_FS_GENERIC as they already get pulled in via config_distro_defaults.h as noted by Stephen
include/configs/apalis_t30.h | 19 +++++++++++++++++++ include/configs/colibri_t30.h | 24 ++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h index b301f9e..ca9982e 100644 --- a/include/configs/apalis_t30.h +++ b/include/configs/apalis_t30.h @@ -62,6 +62,25 @@ #define CONFIG_CMD_NET #define CONFIG_CMD_DHCP
+/* Miscellaneous commands */ +#define CONFIG_CMD_SETEXPR +#define CONFIG_FAT_WRITE + +/* Increase console I/O buffer size */ +#undef CONFIG_SYS_CBSIZE +#define CONFIG_SYS_CBSIZE 1024 + +/* Increase arguments buffer size */ +#undef CONFIG_SYS_BARGSIZE +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE + +/* Increase print buffer size */ +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) + +/* Increase maximum number of arguments */ +#undef CONFIG_SYS_MAXARGS +#define CONFIG_SYS_MAXARGS 32 + #include "tegra-common-usb-gadget.h" #include "tegra-common-post.h"
diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h index ce6f23b..f785046 100644 --- a/include/configs/colibri_t30.h +++ b/include/configs/colibri_t30.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014 Stefan Agner + * Copyright (c) 2013-2015 Stefan Agner * * SPDX-License-Identifier: GPL-2.0+ */ @@ -11,10 +11,11 @@
#include "tegra30-common.h"
+/* High-level configuration options */ #define V_PROMPT "Colibri T30 # " #define CONFIG_TEGRA_BOARD_STRING "Toradex Colibri T30"
-/* Board-specific config */ +/* Board-specific serial config */ #define CONFIG_SERIAL_MULTI #define CONFIG_TEGRA_ENABLE_UARTA #define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE @@ -54,6 +55,25 @@ #define CONFIG_CMD_NET #define CONFIG_CMD_DHCP
+/* Miscellaneous commands */ +#define CONFIG_CMD_SETEXPR +#define CONFIG_FAT_WRITE + +/* Increase console I/O buffer size */ +#undef CONFIG_SYS_CBSIZE +#define CONFIG_SYS_CBSIZE 1024 + +/* Increase arguments buffer size */ +#undef CONFIG_SYS_BARGSIZE +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE + +/* Increase print buffer size */ +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) + +/* Increase maximum number of arguments */ +#undef CONFIG_SYS_MAXARGS +#define CONFIG_SYS_MAXARGS 32 + #include "tegra-common-usb-gadget.h" #include "tegra-common-post.h"

On 02/28/2015 06:05 PM, Marcel Ziswiler wrote:
The following is a set of various fixes for Toradex Apalis and Colibri T30.
The series, Acked-by: Stephen Warren swarren@nvidia.com

On Mon, 2015-03-02 at 09:56 -0700, Stephen Warren wrote:
The series, Acked-by: Stephen Warren swarren@nvidia.com
Thanks mate. Anybody actually gona pick that one up please?
participants (2)
-
Marcel Ziswiler
-
Stephen Warren