regressions.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Fixing the devicetree of Rock 5 Model B (and possibly others)
@ 2024-03-23 17:02 Pratham Patel
  2024-03-23 17:08 ` Pratham Patel
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Pratham Patel @ 2024-03-23 17:02 UTC (permalink / raw)
  To: sebastian.reichel, saravanak
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	regressions, stable


[-- Attachment #1.1: Type: text/plain, Size: 1961 bytes --]

Since the introduction of the `of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing` patch, an issue with the device-tree of the Rock 5 Model B has been detected. All the stable kernels (6.7.y and 6.8.y) work on the Orange Pi 5, which has the Rockchip RK3588S SoC (same as the RK3588, but less I/O basically). So, being an owner of only two SBCs which use the RK3588* SoC, it appears that the Rock 5 Model B's DT is incorrect.

I looked at the patch and tried several things, neither resulted in anything that would point me to the core issue. Then I tried this:

```
$ grep -C 3 remote-endpoint arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts

                port {
                        es8316_p0_0: endpoint {
                                remote-endpoint = <&i2s0_8ch_p0_0>;
                        };
                };
        };
--
                i2s0_8ch_p0_0: endpoint {
                        dai-format = "i2s";
                        mclk-fs = <256>;
                        remote-endpoint = <&es8316_p0_0>;
                };
        };
};
```

So, from a cursory look, the issue seems to be related to either the DT node for the audio codec or related to the es8316's binding itself. Though I doubt that the later is the issue because if that were the issue, _someone_ with a Pine64 Pinebook Pro would've raised alarms. So far, this seems to be related to the `rk3588-rock-5b.dts` and possibly with the `rk3588s-rock-5a.dts` too.

I would **love** to help but I'm afraid I device-trees are not something that I am at-all familiar with. That said, I am open to methods of debugging this issue to provide a fix myself.

I would have replied to the patch's link but unfortunately, I haven't yet setup neomutt and my email provider's web UI doesn't have a [straightforward] way to reply using the 'In-Reply-To' header, hence a new thread. Apologies for the inconvenience caused.

  -- Pratham Patel

[-- Attachment #1.2: publickey - prathampatel@thefossguy.com - 0xF2DDE54D.asc --]
[-- Type: application/pgp-keys, Size: 669 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Fixing the devicetree of Rock 5 Model B (and possibly others)
@ 2024-04-03 15:26 Pratham Patel
  0 siblings, 0 replies; 13+ messages in thread
From: Pratham Patel @ 2024-04-03 15:26 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Saravana Kannan, Dragan Simic, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, regressions, stable

On Wed Apr 3, 2024 at 7:22 PM IST, Sebastian Reichel wrote:
> Hi,
>
> On Wed, Apr 03, 2024 at 01:03:07AM +0000, Pratham Patel wrote:
> > > > > Also, can you give the output of <debugfs>/devices_deferred for the
> > > > > good vs bad case?
> > > >
> > > > I can't provide you with requested output from the bad case, since the
> > > > kernel never moves past this to an initramfs rescue shell, but following
> > > > is the output from v6.8.1 (**with aforementioned patch reverted**).
> > > >
> > > > # cat /sys/kernel/debug/devices_deferred
> > > > fc400000.usb    platform: wait for supplier /phy@fed90000/usb3-port
> > > > 1-0022  typec_fusb302: cannot register tcpm port
> > > > fc000000.usb    platform: wait for supplier /phy@fed80000/usb3-port
> > > >
> > > > It seems that v6.8.2 works _without needing to revert the patch_. I will
> > > > have to look into this sometime this week but it seems like
> > > > a8037ceb8964 (arm64: dts: rockchip: drop rockchip,trcm-sync-tx-only from rk3588 i2s)
> > > > seems to be the one that fixed the root issue. I will have to test it
> > > > sometime later this week.
> > >
> > > Ok, once you find the patch that fixes things, let me know too.
> >
> > Will do!
>
> FWIW the v6.8.1 kernel referenced above is definitely patched, since
> upstream's Rock 5B DT does neither describe fusb302, nor the USB
> port it is connected to.
>
> We have a few Rock 5B in Kernel CI and upstream boots perfectly
> fine:
>
> https://lava.collabora.dev/scheduler/device_type/rk3588-rock-5b

Hmm, weird then. I can confirm that v6.8.1 doesn't _always_ boot. It
boots some times but still fails a majority of times. There is a
2 out of 10 chance that v6.8.1 will not boot. If you keep rebooting
enough times, you might get it to boot but the next boot is
likely to be borked. :(

That said, v6.8.2 might still have the same issue, but the probably of a
failed boot might be _lesser_ than v6.8.1 (from what I saw). I will
verify that behaviour sometime tomorrow or day after tomorrow.

>
> So it could be one of your downstream patches, which is introducing
> this problem.

I thought so too. So I built a vanilla kernel from the release tarball
of v6.8.1, using GCC + arm64 defconfig. I also tried using LLVM just in
case but noticed the same result.

 -- Pratham Patel


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-04-05  8:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-23 17:02 Fixing the devicetree of Rock 5 Model B (and possibly others) Pratham Patel
2024-03-23 17:08 ` Pratham Patel
2024-03-23 17:09 ` Dragan Simic
2024-04-01 23:24   ` Saravana Kannan
2024-04-02 23:32     ` Pratham Patel
2024-04-03  0:46       ` Saravana Kannan
2024-04-03  1:03         ` Pratham Patel
2024-04-03 13:52           ` Sebastian Reichel
2024-04-05  8:32           ` Pratham Patel
2024-04-03 13:51       ` Dragan Simic
2024-03-23 17:17 ` Linux regression tracking (Thorsten Leemhuis)
2024-03-23 17:23   ` Pratham Patel
2024-04-03 15:26 Pratham Patel

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).