Libsoc-file-debug device or resource busy SODIMM_133

After patching board-colibri_t30.c to free up SODIMM_133 (aka TEGRA_GPIO_PT5, aka 157) I still cannot use libsoc to set it as input and get the failure message in the title. I also checked the output of
cat /sys/kernel/debug/gpio
and you can see that the gpio-157 KEY_BACK is already exported

I added a patch to our own layer in Yocto, along with a number of other kernel patches. I am new to yocto so I am not sure where the patched files live after being applied.

I think that we have two patches to the board-colibri_t30.c file, could that be the problem? I checked the patch files, and neither of them add or remove lines or conflict. Should I merge the patches or would yocto do that and report conflicts?

We use the
Colibri T30 1 GB
custom carrier board
Linux BSP 2.8.7
Yocto Rocko

Hi @bertin !

Could you please share:

  • The patch(es) that you are using; and
  • How is your setup on Yocto to apply the patch.

I think that we have two patches to the board-colibri_t30.c file, could that be the problem?

It is possible

Should I merge the patches or would yocto do that and report conflicts?

Yocto is able to apply the patches and it fails if the patches are not applicable (just like Git would do).

Best regards,

Below are the patches to board-colibri_t30.c that we are making for our product.

I see no complaints from Yocto about applying the patches, but maybe I am looking in the wrong place (the amount of information from yocto builds is enourmous). Would Yocto indeed report an error or just a warning if it failed to patch board file? If there was a warning, where I would I find that in the Yocto logs.

I am always having the problem that Yocto is not reporting enough information or reports WAY too much.

diff --git a/arch/arm/mach-tegra/board-colibri_t30.c b/arch/arm/mach-tegra/board-colibri_t30.c
index e6632db39c6a..bf022d082dec 100644
--- a/arch/arm/mach-tegra/board-colibri_t30.c
+++ b/arch/arm/mach-tegra/board-colibri_t30.c
@@ -566,7 +566,7 @@ static struct gpio colibri_t30_gpios[] = {
 //conflicts with volume down key
 	{TEGRA_GPIO_PCC6,	GPIOF_IN,	"SODIMM pin 24"},
 //conflicts with volume up key
-	{TEGRA_GPIO_PDD7,	GPIOF_IN,	"SODIMM pin 22"},
+	/* {TEGRA_GPIO_PDD7,	GPIOF_IN,	"SODIMM pin 22"}, */
 #endif
 #ifndef COLIBRI_T30_VI
 	{TEGRA_GPIO_PDD5,	GPIOF_IN,	"SODIMM pin 69"},
-- 
2.30.2

diff --git a/arch/arm/mach-tegra/board-colibri_t30.c b/arch/arm/mach-tegra/board-colibri_t30.c
index 8deda7ce51db..e6632db39c6a 100644
--- a/arch/arm/mach-tegra/board-colibri_t30.c
+++ b/arch/arm/mach-tegra/board-colibri_t30.c
@@ -519,7 +519,7 @@ static struct gpio colibri_t30_gpios[] = {
 #endif
 #ifndef CONFIG_KEYBOARD_GPIO
 //conflicts with back key
-	{TEGRA_GPIO_PT5,	GPIOF_IN,	"SOD-133, Iris X16-14"},
+	/* {TEGRA_GPIO_PT5,	GPIOF_IN,	"SOD-133, Iris X16-14"}, */
 //conflicts with home key
 	{TEGRA_GPIO_PT6,	GPIOF_IN,	"SODIMM pin 127"},
 //conflicts with power key (WAKE1)
@@ -794,8 +794,8 @@ static struct gpio_keys_button colibri_t30_keys[] = {
 	GPIO_KEY(KEY_FIND, PCC2, 1, 0),		/* SODIMM pin 77 */
 #endif
 	GPIO_KEY(KEY_HOME, PT6, 1, 0),		/* SODIMM pin 127 */
-	GPIO_KEY(KEY_BACK, PT5, 1, 0),		/* SODIMM pin 133,
-						   Iris X16-14 */
+	/* GPIO_KEY(KEY_BACK, PT5, 1, 0),		/\* SODIMM pin 133, */
+						   /* Iris X16-14 *\/ */
 	GPIO_KEY(KEY_VOLUMEUP, PDD7, 1, 0),	/* SODIMM pin 22 */
 	GPIO_KEY(KEY_VOLUMEDOWN, PCC6, 1, 0),	/* SODIMM pin 24 */
 	GPIO_KEY(KEY_POWER, PV1, 0, 1),		/* SODIMM pin 45,

From e76d25fff2b3bce923439538e6ceea891dcc9f2a Mon Sep 17 00:00:00 2001
From: Bradley Drummonds <bradrum@gmail.com>
Date: Mon, 29 Nov 2021 17:04:06 +0100
Subject: [PATCH] SODIMM 22 , cleared for watchdog

---
 arch/arm/mach-tegra/board-colibri_t30.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-tegra/board-colibri_t30.c b/arch/arm/mach-tegra/board-colibri_t30.c
index e6632db39c6a..bf022d082dec 100644
--- a/arch/arm/mach-tegra/board-colibri_t30.c
+++ b/arch/arm/mach-tegra/board-colibri_t30.c
@@ -566,7 +566,7 @@ static struct gpio colibri_t30_gpios[] = {
 //conflicts with volume down key
 	{TEGRA_GPIO_PCC6,	GPIOF_IN,	"SODIMM pin 24"},
 //conflicts with volume up key
-	{TEGRA_GPIO_PDD7,	GPIOF_IN,	"SODIMM pin 22"},
+	/* {TEGRA_GPIO_PDD7,	GPIOF_IN,	"SODIMM pin 22"}, */
 #endif
 #ifndef COLIBRI_T30_VI
 	{TEGRA_GPIO_PDD5,	GPIOF_IN,	"SODIMM pin 69"},
-- 
2.30.2


From a09e957ab2d61808a0ff6a16244a06c251047746 Mon Sep 17 00:00:00 2001
From: Bradley Drummonds <bradrum@gmail.com>
Date: Tue, 30 Nov 2021 12:57:50 +0100
Subject: [PATCH] SODIMM 22 was still being used an input

---
 arch/arm/mach-tegra/board-colibri_t30.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-tegra/board-colibri_t30.c b/arch/arm/mach-tegra/board-colibri_t30.c
index bf022d082dec..641342092de8 100644
--- a/arch/arm/mach-tegra/board-colibri_t30.c
+++ b/arch/arm/mach-tegra/board-colibri_t30.c
@@ -796,7 +796,7 @@ static struct gpio_keys_button colibri_t30_keys[] = {
 	GPIO_KEY(KEY_HOME, PT6, 1, 0),		/* SODIMM pin 127 */
 	/* GPIO_KEY(KEY_BACK, PT5, 1, 0),		/\* SODIMM pin 133, */
 						   /* Iris X16-14 *\/ */
-	GPIO_KEY(KEY_VOLUMEUP, PDD7, 1, 0),	/* SODIMM pin 22 */
+	/* GPIO_KEY(KEY_VOLUMEUP, PDD7, 1, 0),	/\* SODIMM pin 22 *\/ */
 	GPIO_KEY(KEY_VOLUMEDOWN, PCC6, 1, 0),	/* SODIMM pin 24 */
 	GPIO_KEY(KEY_POWER, PV1, 0, 1),		/* SODIMM pin 45,
 						   Iris X16-20 */
-- 
2.30.2

diff --git a/arch/arm/mach-tegra/board-colibri_t30.c b/arch/arm/mach-tegra/board-colibri_t30.c
index 9b6ef7b116ea..8deda7ce51db 100644
--- a/arch/arm/mach-tegra/board-colibri_t30.c
+++ b/arch/arm/mach-tegra/board-colibri_t30.c
@@ -1543,8 +1543,8 @@ static struct tegra_usb_platform_data tegra_ehci3_utmi_pdata = {
 		.hot_plug			= true,
 		.power_off_on_suspend		= true,
 		.remote_wakeup_supported	= true,
-		.vbus_gpio			= USBH_PEN,
-		.vbus_gpio_inverted		= 1,
+		.vbus_gpio			= -1,  //USBH_PEN,
+		.vbus_gpio_inverted		= 0,   //1
 		.vbus_reg			= NULL,
 	},
 };

Hi @bertin !

About your Yocto questions

Would Yocto indeed report an error or just a warning if it failed to patch board file?

If the patch is not applicable, Yocto would fail and stop the whole build process (depending on if you launched it with or without the -k flag).
If the patch is applicable, Yocto will go on, but this does not guarantee that the compilation will be successful.
And, even if the compilation is successful, it is possible to not work during runtime.

If there was a warning, where I would I find that in the Yocto logs.

Yocto stores a lot of logs by default. They can be found at build/tmp/work. For logs rtelated to the kernel, as an example, this is the place for the Colibri iMX6ULL: build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/linux-toradex/5.4.129+gitAUTOINC+022cb949c6-r0/temp. Here you will find logs for every task done. For patch, there will be a log.do_patch file.

Best regards,