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

The following is a set of various fixes for Toradex Apalis and Colibri T30.
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 | 31 ++++++++++++++++++++++++------- include/configs/colibri_t30.h | 26 ++++++++++++++++++++++++-- 4 files changed, 62 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:
d2f60f93325ac31f5f30ee94f15b87c89db46aec
Signed-off-by: Marcel Ziswiler marcel@ziswiler.com --- 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";

On 02/17/2015 07:28 AM, Marcel Ziswiler wrote:
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:
d2f60f93325ac31f5f30ee94f15b87c89db46aec
You probably don't need to respin like this, but it's a good idea to include the commit subject too, so it can be found in other branches/... that have cherry-picked it. In this case:
d2f60f93325a "dm: tegra: dts: Add aliases for spi on tegra30 boards"

This fixes the MMC/SD card detect GPIOs for Apalis T30 which got broken by the following commit:
2b2b50bc8748bf1ddb2d96da7157f9eecbe24961
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 --- 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>; }; };

On 17 February 2015 at 07:28, Marcel Ziswiler marcel@ziswiler.com wrote:
This fixes the MMC/SD card detect GPIOs for Apalis T30 which got broken by the following commit:
2b2b50bc8748bf1ddb2d96da7157f9eecbe24961
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
arch/arm/dts/tegra30-apalis.dts | 9 +++++++-- arch/arm/dts/tegra30-colibri.dts | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On 17.02.2015 15:28, Marcel Ziswiler wrote:
This fixes the MMC/SD card detect GPIOs for Apalis T30 which got broken by the following commit:
2b2b50bc8748bf1ddb2d96da7157f9eecbe24961
While at it also re-add the comments describing which particular Apalis/Colibri pins those GPIOs are on.
Acked-by: Stefan Agner stefan.agner@toradex.com
Signed-off-by: Marcel Ziswiler marcel@ziswiler.com
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";
nvidia,vbus-gpio = <&gpio TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>; };/* USBH_EN */
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 --- 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

On 17 February 2015 at 07:28, Marcel Ziswiler marcel@ziswiler.com wrote:
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

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 CONFIG_CMDLINE_EDITING CONFIG_CMD_FS_GENERIC
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 --- include/configs/apalis_t30.h | 21 +++++++++++++++++++++ include/configs/colibri_t30.h | 26 ++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 2 deletions(-)
diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h index b301f9e..bc87ed7 100644 --- a/include/configs/apalis_t30.h +++ b/include/configs/apalis_t30.h @@ -62,6 +62,27 @@ #define CONFIG_CMD_NET #define CONFIG_CMD_DHCP
+/* Miscellaneous commands */ +#define CONFIG_CMD_FS_GENERIC +#define CONFIG_CMD_SETEXPR +#define CONFIG_CMDLINE_EDITING +#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..10305d9 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,27 @@ #define CONFIG_CMD_NET #define CONFIG_CMD_DHCP
+/* Miscellaneous commands */ +#define CONFIG_CMD_FS_GENERIC +#define CONFIG_CMD_SETEXPR +#define CONFIG_CMDLINE_EDITING +#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/17/2015 07:28 AM, Marcel Ziswiler wrote:
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
CONFIG_CMDLINE_EDITING
README isn't very informative on this subject. What does this add? I can already up-arrow and edit command-lines on all Tegra devices. If it's not that big, I wonder if enabling it for all Tegra would make sense?
CONFIG_CMD_FS_GENERIC
Isn't that already set as part of the generic distro boot support? include/config_distro_defaults.h:#define CONFIG_CMD_FS_GENERIC

On Tue, 2015-02-17 at 13:38 -0700, Stephen Warren wrote:
CONFIG_CMDLINE_EDITING
README isn't very informative on this subject. What does this add? I can already up-arrow and edit command-lines on all Tegra devices. If it's not that big, I wonder if enabling it for all Tegra would make sense?
CONFIG_CMD_FS_GENERIC
Isn't that already set as part of the generic distro boot support? include/config_distro_defaults.h:#define CONFIG_CMD_FS_GENERIC
Yes, you are absolutely right. Both were actually already set via config_distro_defaults.h which I missed noticing, sorry about that. I will drop those two from a v2.
participants (4)
-
Marcel Ziswiler
-
Simon Glass
-
Stefan Agner
-
Stephen Warren