Re: help on udoo_neo power up on mainline uboot

Fabio Estevam
2021-12-29T21:51:46Z

Hi Peter,

On Wed, Dec 29, 2021 at 6:14 PM Peter Robinson <pbrobinson@gmail.com> wrote:

> I'll give that a go shortly, that was still on my todo list do debug,
> it was detecting it earlier in the boot for memory detection but
> failing with a -6 when doing board detection and working later but
> hadn't got to the bottom of it yet.

I think I understand the issue: since get_board_value() is called from
SPL and U-Boot
proper, we need to call gpio_free(), otherwise, the gpio_request()
will be called on GPIOs
that were already requested.

Does the patch below fix the problem?

diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index 62f81fff6817..075c4f208f23 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -333,6 +333,8 @@ static int get_board_value(void)
* Extended 1 1
*/

+ gpio_free(IMX_GPIO_NR(4, 13));
+ gpio_free(IMX_GPIO_NR(4, 0));
return (r184 << 1) + r185;
}

Thanks