mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Yegor Yefremov <yegorslists@googlemail.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: t.remmet@phytec.de, barebox <barebox@lists.infradead.org>
Subject: Re: musb is broken in master
Date: Mon, 24 Feb 2020 15:08:36 +0100	[thread overview]
Message-ID: <CAGm1_kvpLeAgZyNiwZ1gJFCcRHCm2ijNo7JtzGZjuJx-V632rA@mail.gmail.com> (raw)
In-Reply-To: <64cbefba-5ce4-919e-1de2-48e2247ca391@pengutronix.de>

On Mon, Feb 24, 2020 at 1:02 PM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>
> On 2/24/20 12:55 PM, Yegor Yefremov wrote:
> > On Mon, Feb 24, 2020 at 12:54 PM Yegor Yefremov
> > <yegorslists@googlemail.com> wrote:
> >>
> >> On Mon, Feb 24, 2020 at 12:50 PM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
> >>>
> >>> Hi,
> >>>
> >>> On 2/24/20 12:09 PM, Yegor Yefremov wrote:
> >>>> Can it be that musb was broken because of this change in the mainline
> >>>> linux kernel [1]?
> >>>
> >>> But you said that it works when you readd status = "okay" to some
> >>> of the USB device tree nodes? Which node was it in particular?
> >>>
> >>>> The kernel uses ti-sysc mechanism to get/configure the related hw
> >>>> blocks. If I grep for ti-sysc in kernel, I get a lot of hits. But in
> >>>> barebox, it is only drivers/bus/ti-sysc.c that I find. Seems like a
> >>>> rather big update is required.
> >>>>
> >>>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/am33xx.dtsi?h=v5.6-rc3&id=0782e8572ce43f521ed6ff15e4a7ab9aa5acdc85
> >>>
> >>> I don't think that's the problem. Looks to me like it should work with
> >>> barebox as well. Or did you revert this patch and got USB working again?
> >>
> >> Yes, I just reverted the whole patch and got USB working again. It has
> >> nothing to do with my dts file as it is hosted only in barebox
> >> (arch/arm/dts/am335x-baltos-minimal.dts). It just includes the common
> >> DTS files like am33xx.dtsi.
> >
> > I mean, I have reverted only this one 574eed3f6fcf056aa4c9e46c4b5224e3f7844d8d.
>
> I meant that you revert the upstream device tree patch only. Either manually or by doing
> some temporary hack like symlink $BAREBOX/dts/src/arm to $LINUX/arch/arm/boot/dts
> and revert inside the kernel git tree.

I've checked out barebox master and then reverted
574eed3f6fcf056aa4c9e46c4b5224e3f7844d8d (dts: update to v5.5-rc1).
After examining the changes, I found out that am33xx.dtsi was changed.
One of this changes is the following:

-               usb: usb@47400000 {
-                       compatible = "ti,am33xx-usb";
-                       reg = <0x47400000 0x1000>;
-                       ranges;
+               usb: target-module@47400000 {
+                       compatible = "ti,sysc-omap4", "ti,sysc";
+                       reg = <0x47400000 0x4>,
+                             <0x47400010 0x4>;
+                       reg-names = "rev", "sysc";
+                       ti,sysc-mask = <(SYSC_OMAP4_FREEEMU |
+                                        SYSC_OMAP2_SOFTRESET)>;
+                       ti,sysc-midle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>;
+                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+                                       <SYSC_IDLE_NO>,
+                                       <SYSC_IDLE_SMART>,
+                                       <SYSC_IDLE_SMART_WKUP>;
+                       clocks = <&l3s_clkctrl AM3_L3S_USB_OTG_HS_CLKCTRL 0>;
+                       clock-names = "fck";

If I understand it correctly, drivers/usb/musb/musb_am335x.c still has
the old .compatible string:

static __maybe_unused struct of_device_id am335x_child_dt_ids[] = {
        {
                .compatible = "ti,am33xx-usb",
        }, {
                /* sentinel */
        },
};

This node was removed:

-                       usb_ctrl_mod: control@44e10620 {
-                               compatible = "ti,am335x-usb-ctrl-module";
-                               reg = <0x44e10620 0x10
-                                       0x44e10648 0x4>;
-                               reg-names = "phy_ctrl", "wakeup";
-                               status = "disabled";
-                       };

So there are many changes in device tree files that are not reflected
in the drivers. I haven't debugged it but just examined the introduced
changes.

Yegor

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-02-24 14:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18  9:58 Yegor Yefremov
2020-02-18 10:57 ` Ahmad Fatoum
2020-02-18 11:19   ` Yegor Yefremov
2020-02-18 11:48     ` Ahmad Fatoum
2020-02-24 11:09       ` Yegor Yefremov
2020-02-24 11:50         ` Ahmad Fatoum
2020-02-24 11:54           ` Yegor Yefremov
2020-02-24 11:55             ` Yegor Yefremov
2020-02-24 12:02               ` Ahmad Fatoum
2020-02-24 14:08                 ` Yegor Yefremov [this message]
2020-02-25 17:13                   ` Ahmad Fatoum
2020-02-26  7:27                     ` Yegor Yefremov

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=CAGm1_kvpLeAgZyNiwZ1gJFCcRHCm2ijNo7JtzGZjuJx-V632rA@mail.gmail.com \
    --to=yegorslists@googlemail.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=t.remmet@phytec.de \
    /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