* [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL
@ 2021-12-18 21:10 Fabio Estevam
2021-12-18 21:10 ` [PATCH 2/6] ARM: dts: imx6qdl-udoo: Properly describe the SD card detect Fabio Estevam
` (6 more replies)
0 siblings, 7 replies; 21+ messages in thread
From: Fabio Estevam @ 2021-12-18 21:10 UTC (permalink / raw)
To: sbabic; +Cc: pbrobinson, trini, u-boot, Fabio Estevam
Currently, imx6q udoo board fails to boot like this:
U-Boot SPL 2022.01-rc3-00061-g95ca715adad3 (Dec 18 2021 - 18:04:40 -0300)
Trying to boot from MMC1
The reason is that the eSDHC controller is not initialized in SPL.
Initialize the eSDHC controller in SPL via C code as DM is not
used in SPL.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
board/udoo/udoo_spl.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c
index d9afbbb74198..754bd9dfe21e 100644
--- a/board/udoo/udoo_spl.c
+++ b/board/udoo/udoo_spl.c
@@ -254,4 +254,39 @@ void board_init_f(ulong dummy)
/* DDR initialization */
spl_dram_init();
}
+
+#define USDHC3_CD_GPIO IMX_GPIO_NR(7, 0)
+
+#define USDHC_PAD_CTRL (PAD_CTL_PUS_47K_UP | \
+ PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \
+ PAD_CTL_SRE_FAST | PAD_CTL_HYS)
+
+static struct fsl_esdhc_cfg usdhc_cfg[2] = {
+ {USDHC3_BASE_ADDR},
+};
+
+static const iomux_v3_cfg_t usdhc3_pads[] = {
+ IOMUX_PADS(PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+ IOMUX_PADS(PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+ IOMUX_PADS(PAD_SD3_DAT0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+ IOMUX_PADS(PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+ IOMUX_PADS(PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+ IOMUX_PADS(PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
+ IOMUX_PADS(PAD_SD3_DAT5__GPIO7_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL)),
+};
+
+int board_mmc_getcd(struct mmc *mmc)
+{
+ return !gpio_get_value(USDHC3_CD_GPIO);
+}
+
+int board_mmc_init(struct bd_info *bis)
+{
+ SETUP_IOMUX_PADS(usdhc3_pads);
+ usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
+ usdhc_cfg[0].max_bus_width = 4;
+ gpio_direction_input(USDHC3_CD_GPIO);
+
+ return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
+}
#endif
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 2/6] ARM: dts: imx6qdl-udoo: Properly describe the SD card detect
2021-12-18 21:10 [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL Fabio Estevam
@ 2021-12-18 21:10 ` Fabio Estevam
2021-12-19 15:54 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
2021-12-18 21:10 ` [PATCH 3/6] udoo: Call gpio_request() Fabio Estevam
` (5 subsequent siblings)
6 siblings, 2 replies; 21+ messages in thread
From: Fabio Estevam @ 2021-12-18 21:10 UTC (permalink / raw)
To: sbabic; +Cc: pbrobinson, trini, u-boot, Fabio Estevam
GPIO7_IO00 is used as SD card detect.
Properly describe this in the devicetree.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
arch/arm/dts/imx6qdl-udoo.dtsi | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/dts/imx6qdl-udoo.dtsi b/arch/arm/dts/imx6qdl-udoo.dtsi
index d07d8f83456d..2d0d102661bd 100644
--- a/arch/arm/dts/imx6qdl-udoo.dtsi
+++ b/arch/arm/dts/imx6qdl-udoo.dtsi
@@ -4,7 +4,7 @@
*
* Author: Fabio Estevam <fabio.estevam@freescale.com>
*/
-
+#include <dt-bindings/gpio/gpio.h>
/ {
aliases {
backlight = &backlight;
@@ -226,6 +226,7 @@
MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
+ MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x1b0b0
>;
};
@@ -304,7 +305,7 @@
&usdhc3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc3>;
- non-removable;
+ cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
status = "okay";
};
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 3/6] udoo: Call gpio_request()
2021-12-18 21:10 [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL Fabio Estevam
2021-12-18 21:10 ` [PATCH 2/6] ARM: dts: imx6qdl-udoo: Properly describe the SD card detect Fabio Estevam
@ 2021-12-18 21:10 ` Fabio Estevam
2021-12-20 16:10 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
2021-12-18 21:10 ` [PATCH 4/6] udoo: Adjust the SD card device numbering Fabio Estevam
` (4 subsequent siblings)
6 siblings, 2 replies; 21+ messages in thread
From: Fabio Estevam @ 2021-12-18 21:10 UTC (permalink / raw)
To: sbabic; +Cc: pbrobinson, trini, u-boot, Fabio Estevam
Calling gpio_request() prior to its usage is now mandatory.
This fixes the following GPIO errors:
U-Boot SPL 2022.01-rc3-00067-g7a5be871c0ec (Dec 18 2021 - 17:45:07 -0300)
Trying to boot from MMC1
U-Boot 2022.01-rc3-00067-g7a5be871c0ec (Dec 18 2021 - 17:45:07 -0300)
CPU: Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: WDOG
Model: Udoo i.MX6 Quad Board
Board: Udoo Quad
DRAM: 1 GiB
MMC: FSL_SDHC: 2
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
gpio@20a0000: set_dir_flags: error: gpio GPIO2_31 not reserved
gpio@20a4000: set_dir_flags: error: gpio GPIO3_23 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_24 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_25 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_27 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_28 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_29 not reserved
gpio@20a4000: set_value: error: gpio GPIO3_23 not reserved
Net: Could not get PHY for FEC0: addr -2
No ethernet found.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
board/udoo/udoo.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/board/udoo/udoo.c b/board/udoo/udoo.c
index 5c49388cbfbe..9e0365615d6d 100644
--- a/board/udoo/udoo.c
+++ b/board/udoo/udoo.c
@@ -90,6 +90,14 @@ int mx6_rgmii_rework(struct phy_device *phydev)
static void setup_iomux_enet(void)
{
+ gpio_request(IMX_GPIO_NR(2, 31), "eth_power");
+ gpio_request(IMX_GPIO_NR(3, 23), "eth_phy_reset");
+ gpio_request(IMX_GPIO_NR(6, 24), "strap1");
+ gpio_request(IMX_GPIO_NR(6, 25), "strap2");
+ gpio_request(IMX_GPIO_NR(6, 27), "strap3");
+ gpio_request(IMX_GPIO_NR(6, 28), "strap4");
+ gpio_request(IMX_GPIO_NR(6, 29), "strap5");
+
gpio_direction_output(IMX_GPIO_NR(2, 31), 1); /* Power supply on */
gpio_direction_output(IMX_GPIO_NR(3, 23), 0); /* assert PHY rst */
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 4/6] udoo: Adjust the SD card device numbering
2021-12-18 21:10 [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL Fabio Estevam
2021-12-18 21:10 ` [PATCH 2/6] ARM: dts: imx6qdl-udoo: Properly describe the SD card detect Fabio Estevam
2021-12-18 21:10 ` [PATCH 3/6] udoo: Call gpio_request() Fabio Estevam
@ 2021-12-18 21:10 ` Fabio Estevam
2021-12-21 9:52 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
2021-12-18 21:10 ` [PATCH 5/6] udoo: Increase CONFIG_ENV_OFFSET Fabio Estevam
` (3 subsequent siblings)
6 siblings, 2 replies; 21+ messages in thread
From: Fabio Estevam @ 2021-12-18 21:10 UTC (permalink / raw)
To: sbabic; +Cc: pbrobinson, trini, u-boot, Fabio Estevam
After the conversion to DM the SD card shows up as 'mmc 2'
device.
Adjust the 'mmcdev' and the distro command 'func' accordingly.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
configs/udoo_defconfig | 1 +
include/configs/udoo.h | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configs/udoo_defconfig b/configs/udoo_defconfig
index 8e1bba112041..284ea0588465 100644
--- a/configs/udoo_defconfig
+++ b/configs/udoo_defconfig
@@ -35,6 +35,7 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_DEV=2
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_DM=y
CONFIG_BOUNCE_BUFFER=y
diff --git a/include/configs/udoo.h b/include/configs/udoo.h
index fe6ea68dd461..4bddc0eca30e 100644
--- a/include/configs/udoo.h
+++ b/include/configs/udoo.h
@@ -28,7 +28,7 @@
"fdt_addr=0x18000000\0" \
"fdt_addr_r=0x18000000\0" \
"ip_dyn=yes\0" \
- "mmcdev=0\0" \
+ "mmcdev=2\0" \
"mmcrootfstype=ext4\0" \
"findfdt="\
"if test ${board_rev} = MX6Q; then " \
@@ -44,7 +44,7 @@
BOOTENV
#define BOOT_TARGET_DEVICES(func) \
- func(MMC, mmc, 0) \
+ func(MMC, mmc, 2) \
func(SATA, sata, 0) \
func(DHCP, dhcp, na)
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 5/6] udoo: Increase CONFIG_ENV_OFFSET
2021-12-18 21:10 [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL Fabio Estevam
` (2 preceding siblings ...)
2021-12-18 21:10 ` [PATCH 4/6] udoo: Adjust the SD card device numbering Fabio Estevam
@ 2021-12-18 21:10 ` Fabio Estevam
2021-12-21 9:52 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
2021-12-18 21:10 ` [PATCH 6/6] udoo: Select CMD_DM Fabio Estevam
` (2 subsequent siblings)
6 siblings, 2 replies; 21+ messages in thread
From: Fabio Estevam @ 2021-12-18 21:10 UTC (permalink / raw)
To: sbabic; +Cc: pbrobinson, trini, u-boot, Fabio Estevam
Increase CONFIG_ENV_OFFSET to avoid the environment region to
overlap with U-Boot proper.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
configs/udoo_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configs/udoo_defconfig b/configs/udoo_defconfig
index 284ea0588465..ab2b2ee67550 100644
--- a/configs/udoo_defconfig
+++ b/configs/udoo_defconfig
@@ -7,7 +7,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_SIZE=0x2000
-CONFIG_ENV_OFFSET=0x60000
+CONFIG_ENV_OFFSET=0xC0000
CONFIG_MX6QDL=y
CONFIG_TARGET_UDOO=y
CONFIG_DM_GPIO=y
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 6/6] udoo: Select CMD_DM
2021-12-18 21:10 [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL Fabio Estevam
` (3 preceding siblings ...)
2021-12-18 21:10 ` [PATCH 5/6] udoo: Increase CONFIG_ENV_OFFSET Fabio Estevam
@ 2021-12-18 21:10 ` Fabio Estevam
2021-12-21 9:53 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
2021-12-20 16:09 ` [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL Peter Robinson
2022-01-09 1:27 ` Tom Rini
6 siblings, 2 replies; 21+ messages in thread
From: Fabio Estevam @ 2021-12-18 21:10 UTC (permalink / raw)
To: sbabic; +Cc: pbrobinson, trini, u-boot, Fabio Estevam
CMD_DM is useful for showing the whole DM tree.
Enable it via "imply CMD_DM".
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
arch/arm/mach-imx/mx6/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
index 62de942a32aa..98df4d4e4281 100644
--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -588,6 +588,7 @@ config TARGET_UDOO
depends on MX6QDL
select BOARD_LATE_INIT
select SUPPORT_SPL
+ imply CMD_DM
config TARGET_UDOO_NEO
bool "UDOO Neo"
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 2/6] ARM: dts: imx6qdl-udoo: Properly describe the SD card detect
2021-12-18 21:10 ` [PATCH 2/6] ARM: dts: imx6qdl-udoo: Properly describe the SD card detect Fabio Estevam
@ 2021-12-19 15:54 ` Peter Robinson
2021-12-19 22:43 ` Fabio Estevam
2022-01-09 1:27 ` Tom Rini
1 sibling, 1 reply; 21+ messages in thread
From: Peter Robinson @ 2021-12-19 15:54 UTC (permalink / raw)
To: Fabio Estevam; +Cc: sbabic, trini, u-boot
> GPIO7_IO00 is used as SD card detect.
>
> Properly describe this in the devicetree.
Has this also been sent upstream for the Linux kernel dt?
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> arch/arm/dts/imx6qdl-udoo.dtsi | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/dts/imx6qdl-udoo.dtsi b/arch/arm/dts/imx6qdl-udoo.dtsi
> index d07d8f83456d..2d0d102661bd 100644
> --- a/arch/arm/dts/imx6qdl-udoo.dtsi
> +++ b/arch/arm/dts/imx6qdl-udoo.dtsi
> @@ -4,7 +4,7 @@
> *
> * Author: Fabio Estevam <fabio.estevam@freescale.com>
> */
> -
> +#include <dt-bindings/gpio/gpio.h>
> / {
> aliases {
> backlight = &backlight;
> @@ -226,6 +226,7 @@
> MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
> MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
> MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
> + MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x1b0b0
> >;
> };
>
> @@ -304,7 +305,7 @@
> &usdhc3 {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_usdhc3>;
> - non-removable;
> + cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
> status = "okay";
> };
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 2/6] ARM: dts: imx6qdl-udoo: Properly describe the SD card detect
2021-12-19 15:54 ` Peter Robinson
@ 2021-12-19 22:43 ` Fabio Estevam
0 siblings, 0 replies; 21+ messages in thread
From: Fabio Estevam @ 2021-12-19 22:43 UTC (permalink / raw)
To: Peter Robinson; +Cc: Stefano Babic, Tom Rini, U-Boot-Denx
Hi Peter,
On Sun, Dec 19, 2021 at 12:54 PM Peter Robinson <pbrobinson@gmail.com> wrote:
>
> > GPIO7_IO00 is used as SD card detect.
> >
> > Properly describe this in the devicetree.
>
> Has this also been sent upstream for the Linux kernel dt?
Yes, here it goes:
http://lists.infradead.org/pipermail/linux-arm-kernel/2021-December/705590.html
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL
2021-12-18 21:10 [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL Fabio Estevam
` (4 preceding siblings ...)
2021-12-18 21:10 ` [PATCH 6/6] udoo: Select CMD_DM Fabio Estevam
@ 2021-12-20 16:09 ` Peter Robinson
2021-12-23 15:03 ` Fabio Estevam
2022-01-09 1:27 ` Tom Rini
6 siblings, 1 reply; 21+ messages in thread
From: Peter Robinson @ 2021-12-20 16:09 UTC (permalink / raw)
To: Fabio Estevam; +Cc: sbabic, trini, u-boot
On Sat, Dec 18, 2021 at 9:10 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Currently, imx6q udoo board fails to boot like this:
>
> U-Boot SPL 2022.01-rc3-00061-g95ca715adad3 (Dec 18 2021 - 18:04:40 -0300)
> Trying to boot from MMC1
>
> The reason is that the eSDHC controller is not initialized in SPL.
>
> Initialize the eSDHC controller in SPL via C code as DM is not
> used in SPL.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> board/udoo/udoo_spl.c | 35 +++++++++++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
> diff --git a/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c
> index d9afbbb74198..754bd9dfe21e 100644
> --- a/board/udoo/udoo_spl.c
> +++ b/board/udoo/udoo_spl.c
> @@ -254,4 +254,39 @@ void board_init_f(ulong dummy)
> /* DDR initialization */
> spl_dram_init();
> }
> +
> +#define USDHC3_CD_GPIO IMX_GPIO_NR(7, 0)
> +
> +#define USDHC_PAD_CTRL (PAD_CTL_PUS_47K_UP | \
> + PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \
> + PAD_CTL_SRE_FAST | PAD_CTL_HYS)
> +
> +static struct fsl_esdhc_cfg usdhc_cfg[2] = {
> + {USDHC3_BASE_ADDR},
> +};
> +
> +static const iomux_v3_cfg_t usdhc3_pads[] = {
> + IOMUX_PADS(PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
> + IOMUX_PADS(PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
> + IOMUX_PADS(PAD_SD3_DAT0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
> + IOMUX_PADS(PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
> + IOMUX_PADS(PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
> + IOMUX_PADS(PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
> + IOMUX_PADS(PAD_SD3_DAT5__GPIO7_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL)),
> +};
> +
> +int board_mmc_getcd(struct mmc *mmc)
> +{
> + return !gpio_get_value(USDHC3_CD_GPIO);
> +}
> +
> +int board_mmc_init(struct bd_info *bis)
> +{
> + SETUP_IOMUX_PADS(usdhc3_pads);
> + usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
> + usdhc_cfg[0].max_bus_width = 4;
Shouldn't there be a gpio_request here before you set direction like
in your first patch?
> + gpio_direction_input(USDHC3_CD_GPIO);
> +
> + return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
> +}
> #endif
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 3/6] udoo: Call gpio_request()
2021-12-18 21:10 ` [PATCH 3/6] udoo: Call gpio_request() Fabio Estevam
@ 2021-12-20 16:10 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
1 sibling, 0 replies; 21+ messages in thread
From: Peter Robinson @ 2021-12-20 16:10 UTC (permalink / raw)
To: Fabio Estevam; +Cc: sbabic, trini, u-boot
On Sat, Dec 18, 2021 at 9:10 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Calling gpio_request() prior to its usage is now mandatory.
>
> This fixes the following GPIO errors:
>
> U-Boot SPL 2022.01-rc3-00067-g7a5be871c0ec (Dec 18 2021 - 17:45:07 -0300)
> Trying to boot from MMC1
>
>
> U-Boot 2022.01-rc3-00067-g7a5be871c0ec (Dec 18 2021 - 17:45:07 -0300)
>
> CPU: Freescale i.MX6Q rev1.2 at 792 MHz
> Reset cause: WDOG
> Model: Udoo i.MX6 Quad Board
> Board: Udoo Quad
> DRAM: 1 GiB
> MMC: FSL_SDHC: 2
> Loading Environment from MMC... OK
> In: serial
> Out: serial
> Err: serial
> gpio@20a0000: set_dir_flags: error: gpio GPIO2_31 not reserved
> gpio@20a4000: set_dir_flags: error: gpio GPIO3_23 not reserved
> gpio@20b0000: set_dir_flags: error: gpio GPIO6_24 not reserved
> gpio@20b0000: set_dir_flags: error: gpio GPIO6_25 not reserved
> gpio@20b0000: set_dir_flags: error: gpio GPIO6_27 not reserved
> gpio@20b0000: set_dir_flags: error: gpio GPIO6_28 not reserved
> gpio@20b0000: set_dir_flags: error: gpio GPIO6_29 not reserved
> gpio@20a4000: set_value: error: gpio GPIO3_23 not reserved
> Net: Could not get PHY for FEC0: addr -2
> No ethernet found.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---
> board/udoo/udoo.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/board/udoo/udoo.c b/board/udoo/udoo.c
> index 5c49388cbfbe..9e0365615d6d 100644
> --- a/board/udoo/udoo.c
> +++ b/board/udoo/udoo.c
> @@ -90,6 +90,14 @@ int mx6_rgmii_rework(struct phy_device *phydev)
>
> static void setup_iomux_enet(void)
> {
> + gpio_request(IMX_GPIO_NR(2, 31), "eth_power");
> + gpio_request(IMX_GPIO_NR(3, 23), "eth_phy_reset");
> + gpio_request(IMX_GPIO_NR(6, 24), "strap1");
> + gpio_request(IMX_GPIO_NR(6, 25), "strap2");
> + gpio_request(IMX_GPIO_NR(6, 27), "strap3");
> + gpio_request(IMX_GPIO_NR(6, 28), "strap4");
> + gpio_request(IMX_GPIO_NR(6, 29), "strap5");
> +
> gpio_direction_output(IMX_GPIO_NR(2, 31), 1); /* Power supply on */
>
> gpio_direction_output(IMX_GPIO_NR(3, 23), 0); /* assert PHY rst */
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 4/6] udoo: Adjust the SD card device numbering
2021-12-18 21:10 ` [PATCH 4/6] udoo: Adjust the SD card device numbering Fabio Estevam
@ 2021-12-21 9:52 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
1 sibling, 0 replies; 21+ messages in thread
From: Peter Robinson @ 2021-12-21 9:52 UTC (permalink / raw)
To: Fabio Estevam; +Cc: sbabic, trini, u-boot
On Sat, Dec 18, 2021 at 9:10 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> After the conversion to DM the SD card shows up as 'mmc 2'
> device.
>
> Adjust the 'mmcdev' and the distro command 'func' accordingly.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---
> configs/udoo_defconfig | 1 +
> include/configs/udoo.h | 4 ++--
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/configs/udoo_defconfig b/configs/udoo_defconfig
> index 8e1bba112041..284ea0588465 100644
> --- a/configs/udoo_defconfig
> +++ b/configs/udoo_defconfig
> @@ -35,6 +35,7 @@ CONFIG_OF_CONTROL=y
> CONFIG_ENV_OVERWRITE=y
> CONFIG_ENV_IS_IN_MMC=y
> CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> +CONFIG_SYS_MMC_ENV_DEV=2
> CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
> CONFIG_DM=y
> CONFIG_BOUNCE_BUFFER=y
> diff --git a/include/configs/udoo.h b/include/configs/udoo.h
> index fe6ea68dd461..4bddc0eca30e 100644
> --- a/include/configs/udoo.h
> +++ b/include/configs/udoo.h
> @@ -28,7 +28,7 @@
> "fdt_addr=0x18000000\0" \
> "fdt_addr_r=0x18000000\0" \
> "ip_dyn=yes\0" \
> - "mmcdev=0\0" \
> + "mmcdev=2\0" \
> "mmcrootfstype=ext4\0" \
> "findfdt="\
> "if test ${board_rev} = MX6Q; then " \
> @@ -44,7 +44,7 @@
> BOOTENV
>
> #define BOOT_TARGET_DEVICES(func) \
> - func(MMC, mmc, 0) \
> + func(MMC, mmc, 2) \
> func(SATA, sata, 0) \
> func(DHCP, dhcp, na)
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 5/6] udoo: Increase CONFIG_ENV_OFFSET
2021-12-18 21:10 ` [PATCH 5/6] udoo: Increase CONFIG_ENV_OFFSET Fabio Estevam
@ 2021-12-21 9:52 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
1 sibling, 0 replies; 21+ messages in thread
From: Peter Robinson @ 2021-12-21 9:52 UTC (permalink / raw)
To: Fabio Estevam; +Cc: sbabic, trini, u-boot
On Sat, Dec 18, 2021 at 9:10 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Increase CONFIG_ENV_OFFSET to avoid the environment region to
> overlap with U-Boot proper.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---
> configs/udoo_defconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configs/udoo_defconfig b/configs/udoo_defconfig
> index 284ea0588465..ab2b2ee67550 100644
> --- a/configs/udoo_defconfig
> +++ b/configs/udoo_defconfig
> @@ -7,7 +7,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
> CONFIG_SPL_LIBGENERIC_SUPPORT=y
> CONFIG_NR_DRAM_BANKS=1
> CONFIG_ENV_SIZE=0x2000
> -CONFIG_ENV_OFFSET=0x60000
> +CONFIG_ENV_OFFSET=0xC0000
> CONFIG_MX6QDL=y
> CONFIG_TARGET_UDOO=y
> CONFIG_DM_GPIO=y
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 6/6] udoo: Select CMD_DM
2021-12-18 21:10 ` [PATCH 6/6] udoo: Select CMD_DM Fabio Estevam
@ 2021-12-21 9:53 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
1 sibling, 0 replies; 21+ messages in thread
From: Peter Robinson @ 2021-12-21 9:53 UTC (permalink / raw)
To: Fabio Estevam; +Cc: sbabic, trini, u-boot
On Sat, Dec 18, 2021 at 9:10 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> CMD_DM is useful for showing the whole DM tree.
>
> Enable it via "imply CMD_DM".
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
> ---
> arch/arm/mach-imx/mx6/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
> index 62de942a32aa..98df4d4e4281 100644
> --- a/arch/arm/mach-imx/mx6/Kconfig
> +++ b/arch/arm/mach-imx/mx6/Kconfig
> @@ -588,6 +588,7 @@ config TARGET_UDOO
> depends on MX6QDL
> select BOARD_LATE_INIT
> select SUPPORT_SPL
> + imply CMD_DM
>
> config TARGET_UDOO_NEO
> bool "UDOO Neo"
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL
2021-12-20 16:09 ` [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL Peter Robinson
@ 2021-12-23 15:03 ` Fabio Estevam
2022-01-07 20:17 ` Fabio Estevam
0 siblings, 1 reply; 21+ messages in thread
From: Fabio Estevam @ 2021-12-23 15:03 UTC (permalink / raw)
To: Peter Robinson; +Cc: Stefano Babic, Tom Rini, u-boot
Hi Tom/Stefano,
On Mon, Dec 20, 2021 at 1:10 PM Peter Robinson <pbrobinson@gmail.com> wrote:
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Please consider this series and Peter's series on udoo_neo for 2022.01.
They make udoo and udoo_neo functional in U-Boot again.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL
2021-12-23 15:03 ` Fabio Estevam
@ 2022-01-07 20:17 ` Fabio Estevam
0 siblings, 0 replies; 21+ messages in thread
From: Fabio Estevam @ 2022-01-07 20:17 UTC (permalink / raw)
To: Peter Robinson; +Cc: Stefano Babic, Tom Rini, U-Boot-Denx
Hi Tom,
On Thu, Dec 23, 2021 at 12:03 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Tom/Stefano,
>
> On Mon, Dec 20, 2021 at 1:10 PM Peter Robinson <pbrobinson@gmail.com> wrote:
>
> > Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
>
> Please consider this series and Peter's series on udoo_neo for 2022.01.
>
> They make udoo and udoo_neo functional in U-Boot again.
I saw you picked the udoo_neo series.
Could you please pick this one too for 2022.01?
Thanks
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL
2021-12-18 21:10 [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL Fabio Estevam
` (5 preceding siblings ...)
2021-12-20 16:09 ` [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL Peter Robinson
@ 2022-01-09 1:27 ` Tom Rini
6 siblings, 0 replies; 21+ messages in thread
From: Tom Rini @ 2022-01-09 1:27 UTC (permalink / raw)
To: Fabio Estevam; +Cc: sbabic, pbrobinson, u-boot
[-- Attachment #1: Type: text/plain, Size: 551 bytes --]
On Sat, Dec 18, 2021 at 06:10:20PM -0300, Fabio Estevam wrote:
> Currently, imx6q udoo board fails to boot like this:
>
> U-Boot SPL 2022.01-rc3-00061-g95ca715adad3 (Dec 18 2021 - 18:04:40 -0300)
> Trying to boot from MMC1
>
> The reason is that the eSDHC controller is not initialized in SPL.
>
> Initialize the eSDHC controller in SPL via C code as DM is not
> used in SPL.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 2/6] ARM: dts: imx6qdl-udoo: Properly describe the SD card detect
2021-12-18 21:10 ` [PATCH 2/6] ARM: dts: imx6qdl-udoo: Properly describe the SD card detect Fabio Estevam
2021-12-19 15:54 ` Peter Robinson
@ 2022-01-09 1:27 ` Tom Rini
1 sibling, 0 replies; 21+ messages in thread
From: Tom Rini @ 2022-01-09 1:27 UTC (permalink / raw)
To: Fabio Estevam; +Cc: sbabic, pbrobinson, u-boot
[-- Attachment #1: Type: text/plain, Size: 262 bytes --]
On Sat, Dec 18, 2021 at 06:10:21PM -0300, Fabio Estevam wrote:
> GPIO7_IO00 is used as SD card detect.
>
> Properly describe this in the devicetree.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 3/6] udoo: Call gpio_request()
2021-12-18 21:10 ` [PATCH 3/6] udoo: Call gpio_request() Fabio Estevam
2021-12-20 16:10 ` Peter Robinson
@ 2022-01-09 1:27 ` Tom Rini
1 sibling, 0 replies; 21+ messages in thread
From: Tom Rini @ 2022-01-09 1:27 UTC (permalink / raw)
To: Fabio Estevam; +Cc: sbabic, pbrobinson, u-boot
[-- Attachment #1: Type: text/plain, Size: 2462 bytes --]
On Sat, Dec 18, 2021 at 06:10:22PM -0300, Fabio Estevam wrote:
> Calling gpio_request() prior to its usage is now mandatory.
>
> This fixes the following GPIO errors:
>
> U-Boot SPL 2022.01-rc3-00067-g7a5be871c0ec (Dec 18 2021 - 17:45:07 -0300)
> Trying to boot from MMC1
>
>
> U-Boot 2022.01-rc3-00067-g7a5be871c0ec (Dec 18 2021 - 17:45:07 -0300)
>
> CPU: Freescale i.MX6Q rev1.2 at 792 MHz
> Reset cause: WDOG
> Model: Udoo i.MX6 Quad Board
> Board: Udoo Quad
> DRAM: 1 GiB
> MMC: FSL_SDHC: 2
> Loading Environment from MMC... OK
> In: serial
> Out: serial
> Err: serial
> gpio@20a0000: set_dir_flags: error: gpio GPIO2_31 not reserved
> gpio@20a4000: set_dir_flags: error: gpio GPIO3_23 not reserved
> gpio@20b0000: set_dir_flags: error: gpio GPIO6_24 not reserved
> gpio@20b0000: set_dir_flags: error: gpio GPIO6_25 not reserved
> gpio@20b0000: set_dir_flags: error: gpio GPIO6_27 not reserved
> gpio@20b0000: set_dir_flags: error: gpio GPIO6_28 not reserved
> gpio@20b0000: set_dir_flags: error: gpio GPIO6_29 not reserved
> gpio@20a4000: set_value: error: gpio GPIO3_23 not reserved
> Net: Could not get PHY for FEC0: addr -2
> No ethernet found.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 4/6] udoo: Adjust the SD card device numbering
2021-12-18 21:10 ` [PATCH 4/6] udoo: Adjust the SD card device numbering Fabio Estevam
2021-12-21 9:52 ` Peter Robinson
@ 2022-01-09 1:27 ` Tom Rini
1 sibling, 0 replies; 21+ messages in thread
From: Tom Rini @ 2022-01-09 1:27 UTC (permalink / raw)
To: Fabio Estevam; +Cc: sbabic, pbrobinson, u-boot
[-- Attachment #1: Type: text/plain, Size: 369 bytes --]
On Sat, Dec 18, 2021 at 06:10:23PM -0300, Fabio Estevam wrote:
> After the conversion to DM the SD card shows up as 'mmc 2'
> device.
>
> Adjust the 'mmcdev' and the distro command 'func' accordingly.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 5/6] udoo: Increase CONFIG_ENV_OFFSET
2021-12-18 21:10 ` [PATCH 5/6] udoo: Increase CONFIG_ENV_OFFSET Fabio Estevam
2021-12-21 9:52 ` Peter Robinson
@ 2022-01-09 1:27 ` Tom Rini
1 sibling, 0 replies; 21+ messages in thread
From: Tom Rini @ 2022-01-09 1:27 UTC (permalink / raw)
To: Fabio Estevam; +Cc: sbabic, pbrobinson, u-boot
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
On Sat, Dec 18, 2021 at 06:10:24PM -0300, Fabio Estevam wrote:
> Increase CONFIG_ENV_OFFSET to avoid the environment region to
> overlap with U-Boot proper.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 6/6] udoo: Select CMD_DM
2021-12-18 21:10 ` [PATCH 6/6] udoo: Select CMD_DM Fabio Estevam
2021-12-21 9:53 ` Peter Robinson
@ 2022-01-09 1:27 ` Tom Rini
1 sibling, 0 replies; 21+ messages in thread
From: Tom Rini @ 2022-01-09 1:27 UTC (permalink / raw)
To: Fabio Estevam; +Cc: sbabic, pbrobinson, u-boot
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
On Sat, Dec 18, 2021 at 06:10:25PM -0300, Fabio Estevam wrote:
> CMD_DM is useful for showing the whole DM tree.
>
> Enable it via "imply CMD_DM".
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2022-01-09 1:28 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-18 21:10 [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL Fabio Estevam
2021-12-18 21:10 ` [PATCH 2/6] ARM: dts: imx6qdl-udoo: Properly describe the SD card detect Fabio Estevam
2021-12-19 15:54 ` Peter Robinson
2021-12-19 22:43 ` Fabio Estevam
2022-01-09 1:27 ` Tom Rini
2021-12-18 21:10 ` [PATCH 3/6] udoo: Call gpio_request() Fabio Estevam
2021-12-20 16:10 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
2021-12-18 21:10 ` [PATCH 4/6] udoo: Adjust the SD card device numbering Fabio Estevam
2021-12-21 9:52 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
2021-12-18 21:10 ` [PATCH 5/6] udoo: Increase CONFIG_ENV_OFFSET Fabio Estevam
2021-12-21 9:52 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
2021-12-18 21:10 ` [PATCH 6/6] udoo: Select CMD_DM Fabio Estevam
2021-12-21 9:53 ` Peter Robinson
2022-01-09 1:27 ` Tom Rini
2021-12-20 16:09 ` [PATCH 1/6] udoo_spl: Initialize the eSDHC controller in SPL Peter Robinson
2021-12-23 15:03 ` Fabio Estevam
2022-01-07 20:17 ` Fabio Estevam
2022-01-09 1:27 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.