[FSL P50x0] Keyboard and mouse don't work anymore after the devicetree updates for 5.19
From: Christian Zigotzky <hidden>
Date: 2022-06-06 16:14:43
On 06 June 2022 at 04:58 pm, Rob Herring wrote:
On Fri, May 27, 2022 at 9:23 AM Rob Herring [off-list ref] wrote:quoted
On Fri, May 27, 2022 at 3:33 AM Christian Zigotzky [off-list ref] wrote:quoted
On 27 May 2022 at 10:14 am, Prabhakar Mahadev Lad wrote:quoted
Hi,quoted
-----Original Message----- From: Christian Zigotzky <redacted> On 27 May 2022 at 09:56 am, Prabhakar Mahadev Lad wrote:quoted
Hi,quoted
-----Original Message----- From: Christophe Leroy <redacted>[...]quoted
quoted
quoted
quoted
quoted
Looks like the driver which you are using has not been converted to useplatform_get_irq(), could you please check that.quoted
Cheers, PrabhakarDo you mean the mouse and keyboard driver?No it could be your gpio/pinctrl driver assuming the keyboard/mouse are using GPIO's. If you are using interrupts then it might be some hierarchal irqc driver in drivers/irqchip/. Cheers, PrabhakarGood to know. I only use unmodified drivers from the official Linux kernel so it's not an issue of the Cyrus+ board.The issue is in drivers/usb/host/fsl-mph-dr-of.c which copies the resources to a child platform device. Can you try the following change:diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c index 44a7e58a26e3..47d9b7be60da 100644 --- a/drivers/usb/host/fsl-mph-dr-of.c +++ b/drivers/usb/host/fsl-mph-dr-of.c@@ -80,8 +80,6 @@ static struct platform_device *fsl_usb2_device_register( const char *name, int id) { struct platform_device *pdev; - const struct resource *res = ofdev->resource; - unsigned int num = ofdev->num_resources; int retval; pdev = platform_device_alloc(name, id);@@ -106,11 +104,7 @@ static struct platform_device *fsl_usb2_device_register( if (retval) goto error; - if (num) { - retval = platform_device_add_resources(pdev, res, num); - if (retval) - goto error; - } + pdev->dev.of_node = ofdev->dev.of_node;From the log, I think you also need to add this line:pdev->dev.of_node_reused = true;quoted
retval = platform_device_add(pdev); if (retval)
Hello Rob, Thanks a lot for your answer. Is the following patch correct?
--- a/drivers/usb/host/fsl-mph-dr-of.c 2022-05-28 09:10:26.797688422
+0200
+++ b/drivers/usb/host/fsl-mph-dr-of.c 2022-05-28 09:15:01.668594809
+0200@@ -80,8 +80,6 @@ static struct platform_device *fsl_usb2_ const char *name, int id) { struct platform_device *pdev; - const struct resource *res = ofdev->resource; - unsigned int num = ofdev->num_resources; int retval; pdev = platform_device_alloc(name, id);
@@ -106,11 +104,7 @@ static struct platform_device *fsl_usb2_ if (retval) goto error; - if (num) { - retval = platform_device_add_resources(pdev, res, num); - if (retval) - goto error; - } + pdev->dev.of_node = ofdev->dev.of_node; + pdev->dev.of_node_reused = true; retval = platform_device_add(pdev); if (retval) ---
Thanks, Christian