linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Christian Zigotzky <chzigotzky@xenosoft.de>
Cc: Darren Stevens <darren@stevens-zone.net>,
	mad skateman <madskateman@gmail.com>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"R.T.Dickinson" <rtd2@xtra.co.nz>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Christian Zigotzky <info@xenosoft.de>
Subject: Re: [FSL P50x0] Keyboard and mouse don't work anymore after the devicetree updates for 5.19
Date: Fri, 27 May 2022 09:23:00 -0500	[thread overview]
Message-ID: <CAL_JsqLN6bT=YhyRTVWU2WmG-htCujtCROQuK+gdMUHMSHVeaQ@mail.gmail.com> (raw)
In-Reply-To: <9e8dd323-4a36-abb2-568d-fe1384b1579c@xenosoft.de>

On Fri, May 27, 2022 at 3:33 AM Christian Zigotzky
<chzigotzky@xenosoft.de> wrote:
>
> On 27 May 2022 at 10:14 am, Prabhakar Mahadev Lad wrote:
> > Hi,
> >
> >> -----Original Message-----
> >> From: Christian Zigotzky <chzigotzky@xenosoft.de>
> >> Sent: 27 May 2022 09:06
> >> To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>;
> >> Christophe Leroy <christophe.leroy@csgroup.eu>; Rob Herring
> >> <robh@kernel.org>
> >> Cc: Darren Stevens <darren@stevens-zone.net>; linuxppc-dev <linuxppc-
> >> dev@lists.ozlabs.org>; mad skateman <madskateman@gmail.com>; R.T.Dickinson
> >> <rtd2@xtra.co.nz>; Christian Zigotzky <info@xenosoft.de>
> >> Subject: [FSL P50x0] Keyboard and mouse don't work anymore after the
> >> devicetree updates for 5.19
> >>
> >> On 27 May 2022 at 09:56 am, Prabhakar Mahadev Lad wrote:
> >>> Hi,
> >>>
> >>>> -----Original Message-----
> >>>> From: Christophe Leroy <christophe.leroy@csgroup.eu>
> >>>> Sent: 27 May 2022 08:23
> >>>> To: Christian Zigotzky <chzigotzky@xenosoft.de>;
> >>>> rob.herring@calxeda.com; Prabhakar Mahadev Lad
> >>>> <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >>>> Cc: Darren Stevens <darren@stevens-zone.net>; linuxppc-dev <linuxppc-
> >>>> dev@lists.ozlabs.org>; mad skateman <madskateman@gmail.com>;
> >>>> R.T.Dickinson <rtd2@xtra.co.nz>; Christian Zigotzky
> >>>> <info@xenosoft.de>
> >>>> Subject: Re: [FSL P50x0] Keyboard and mouse don't work anymore after
> >>>> the devicetree updates for 5.19
> >>>>
> >>>> Hi
> >>>>
> >>>> Le 26/05/2022 à 19:42, Christian Zigotzky a écrit :
> >>>>> Hello,
> >>>>>
> >>>>> My keyboard and mouse don't work anymore with my Cyrus+ board with a
> >>>>> FSL
> >>>>> P50x0 PowerPC SoC [1] after the devicetree updates for 5.19 [2].
> >>>>> After reverting the devicetree updates, my keyboard and mouse work
> >>>>> without any problems.
> >>>>> I figured out that the issue is in the patch for the file platform.c
> >>>>> [3].  I created a patch for reverting the problematic code. (see
> >>>>> attachment)
> >>>>> After reverting the changes with the attached patch, the keyboard
> >>>>> and mouse work again.
> >>>>> Please check your changes in the file platform.c [3].
> >>>>>
> >>>>> Thanks,
> >>>>> Christian
> >>>>>
> >>>>> [1]
> >>>>> https://jpn01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.
> >>>>> amiga.org%2Findex.php%3Ftitle%3DX5000&amp;data=05%7C01%7Cprabhakar.m
> >>>>> ah
> >>>>> adev-lad.rj%40bp.renesas.com%7C4e9c08d1e3874a34bd4208da3fb1c007%7C53
> >>>>> d8
> >>>>> 2571da1947e49cb4625a166a4a2a%7C0%7C0%7C637892329912063922%7CUnknown%
> >>>>> 7C
> >>>>> TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJX
> >>>>> VC
> >>>>> I6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=fSABvBDi%2FYlqU1eydQB6%2F4BzxXkqR
> >>>>> M0
> >>>>> Ln9hdInyTp6w%3D&amp;reserved=0
> >>>>> [2]
> >>>>> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.
> >>>>> kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git
> >>>>> %2
> >>>>> Fcommit%2F%3Fid%3D86c87bea6b42100c67418af690919c44de6ede6e&amp;data=
> >>>>> 05
> >>>>> %7C01%7Cprabhakar.mahadev-lad.rj%40bp.renesas.com%7C4e9c08d1e3874a34
> >>>>> bd
> >>>>> 4208da3fb1c007%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C63789232
> >>>>> 99
> >>>>> 12063922%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI
> >>>>> iL
> >>>>> CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=ENkjlza0J7xF
> >>>>> iI
> >>>>> aPUwMBxHBIkXJNkT%2BLTZ3xuPz%2B10Q%3D&amp;reserved=0
> >>>>>
> >>>>> [3]
> >>>>> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.
> >>>>> kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git
> >>>>> %2
> >>>>> Fdiff%2Fdrivers%2Fof%2Fplatform.c%3Fid%3D86c87bea6b42100c67418af6909
> >>>>> 19
> >>>>> c44de6ede6e&amp;data=05%7C01%7Cprabhakar.mahadev-lad.rj%40bp.renesas
> >>>>> .c
> >>>>> om%7C4e9c08d1e3874a34bd4208da3fb1c007%7C53d82571da1947e49cb4625a166a
> >>>>> 4a
> >>>>> 2a%7C0%7C0%7C637892329912063922%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
> >>>>> Lj
> >>>>> AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C
> >>>>> &a
> >>>>> mp;sdata=yEJUK%2BGK2dzWARC5rfhsSSFSwD%2BLZm8aNNHqQhPYP7Y%3D&amp;rese
> >>>>> rv
> >>>>> ed=0
> >>>> Based on your patch I would say the culprit commit is
> >>>> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
> >>>> hub.c%2F&amp;data=05%7C01%7Cprabhakar.mahadev-lad.rj%40bp.renesas.com
> >>>> %7Cbf899ff2084643971c7908da3fb7d4b9%7C53d82571da1947e49cb4625a166a4a2
> >>>> a%7C0%7C1%7C637892356025845542%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
> >>>> AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&
> >>>> amp;sdata=%2FzI4yueF6Pc%2Fpvh7Ax9WilnaYX8ozFTRyQpiVaaacbg%3D&amp;rese
> >>>> rved=0
> >>>> om%2Ftorvalds%2Flinux%2Fcommit%2Fa1a2b7125e1079cfcc13a116aa3af3df2f9e
> >>>> 002b&
> >>>> amp;data=05%7C01%7Cprabhakar.mahadev-
> >>>> lad.rj%40bp.renesas.com%7C4e9c08d1e3874a34bd4208da3fb1c007%7C53d82571
> >>>> da194
> >>>> 7e49cb4625a166a4a2a%7C0%7C0%7C637892329912063922%7CUnknown%7CTWFpbGZs
> >>>> b3d8e
> >>>> yJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3
> >>>> 000%7
> >>>> C%7C%7C&amp;sdata=ONR1CiaSID6q4%2Fo%2BI6MlPA4ij89BJphQRpEu5tQxvYQ%3D&
> >>>> amp;r
> >>>> eserved=0
> >>>>
> >>>> commit a1a2b7125e1079cfcc13a116aa3af3df2f9e002b
> >>>> Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >>>> Date:   Wed Mar 16 20:06:33 2022 +0000
> >>>>
> >>>>        of/platform: Drop static setup of IRQ resource from DT core
> >>>>
> >>>>        Now that all the DT drivers have switched to platform_get_irq()
> >>>> we can now
> >>>>        safely drop the static setup of IRQ resource from DT core code.
> >>>>
> >>>>        With the above change hierarchical setup of irq domains is no
> >> longer
> >>>>        bypassed and thus allowing hierarchical interrupt domains to
> >> describe
> >>>>        interrupts using "interrupts" DT property.
> >>>>
> >>>>        Signed-off-by: Lad Prabhakar <prabhakar.mahadev-
> >>>> lad.rj@bp.renesas.com>
> >>>>        Acked-by: Marc Zyngier <maz@kernel.org>
> >>>>        Tested-by: Marc Zyngier <maz@kernel.org>
> >>>>        Signed-off-by: Rob Herring <robh@kernel.org>
> >>>>        Link:
> >>>> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flor
> >>>> e.ker%2F&amp;data=05%7C01%7Cprabhakar.mahadev-lad.rj%40bp.renesas.com
> >>>> %7Cbf899ff2084643971c7908da3fb7d4b9%7C53d82571da1947e49cb4625a166a4a2
> >>>> a%7C0%7C1%7C637892356025845542%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
> >>>> AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&
> >>>> amp;sdata=R%2FhdNkjna6kT31Fy9L3HjrDscWR743O%2BAY8sITu9pVE%3D&amp;rese
> >>>> rved=0
> >>>> nel.org%2Fr%2F20220316200633.28974-1-prabhakar.mahadev-
> >>>> lad.rj%40bp.renesas.com&amp;data=05%7C01%7Cprabhakar.mahadev-
> >>>> lad.rj%40bp.renesas.com%7C4e9c08d1e3874a34bd4208da3fb1c007%7C53d82571
> >>>> da194
> >>>> 7e49cb4625a166a4a2a%7C0%7C0%7C637892329912063922%7CUnknown%7CTWFpbGZs
> >>>> b3d8e
> >>>> yJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3
> >>>> 000%7
> >>>> C%7C%7C&amp;sdata=ri76vfLpmxe7vFDAlsBjyrSSkuTMz0ydftu3XObLGLA%3D&amp;
> >>>> reser
> >>>> ved=0
> >>>>
> >>> Looks like the driver which you are using has not been converted to use
> >> platform_get_irq(), could you please check that.
> >>> Cheers,
> >>> Prabhakar
> >> Do 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,
> > Prabhakar
> Good 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;

        retval = platform_device_add(pdev);
        if (retval)

  reply	other threads:[~2022-05-27 14:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26 17:42 [FSL P50x0] Keyboard and mouse don't work anymore after the devicetree updates for 5.19 Christian Zigotzky
2022-05-27  7:23 ` Christophe Leroy
2022-05-27  7:48   ` Christian Zigotzky
2022-05-27  7:54     ` Fwd: " Christian Zigotzky
2022-05-27  7:56   ` Prabhakar Mahadev Lad
2022-05-27  8:06     ` Christian Zigotzky
2022-05-27  8:14       ` Prabhakar Mahadev Lad
2022-05-27  8:32         ` Christian Zigotzky
2022-05-27 14:23           ` Rob Herring [this message]
2022-05-28  8:05             ` Christian Zigotzky
2022-05-28  8:44               ` Christophe Leroy
2022-05-28 10:01               ` Christian Zigotzky
2022-05-30  5:26             ` Christian Zigotzky
2022-05-31 13:45               ` Rob Herring
2022-05-31 16:29                 ` Christian Zigotzky
2022-06-01 12:35                   ` Rob Herring
2022-06-04 13:12                     ` Christian Zigotzky
2022-06-01  2:10                 ` Christian Zigotzky
2022-06-06 14:58             ` Rob Herring
2022-06-06 16:13               ` Christian Zigotzky
2022-06-06 17:06                 ` Rob Herring
2022-06-09 18:03                   ` Christian Zigotzky
2022-06-13 15:57                     ` Rob Herring
2022-06-16 17:04                       ` Christian Zigotzky
  -- strict thread matches above, loose matches on Subject: below --
2022-05-26 17:49 Christian Zigotzky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL_JsqLN6bT=YhyRTVWU2WmG-htCujtCROQuK+gdMUHMSHVeaQ@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=chzigotzky@xenosoft.de \
    --cc=darren@stevens-zone.net \
    --cc=info@xenosoft.de \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madskateman@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=rtd2@xtra.co.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).