From: Neil Armstrong <narmstrong@baylibre.com>
To: Anand Moon <linux.amoon@gmail.com>, Dan Robertson <dan@dlrobertson.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Kevin Hilman <khilman@baylibre.com>,
Linux USB Mailing List <linux-usb@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-amlogic@lists.infradead.org
Subject: Re: [PATCH 0/1] usb: dwc3: meson-g12a: fix shared reset control use
Date: Sat, 18 Jul 2020 10:46:01 +0200 [thread overview]
Message-ID: <46ff6ff0-f8dc-d0c8-3ae0-ffd8b78d3a21@baylibre.com> (raw)
In-Reply-To: <CANAwSgT7XrdEKREr6qLCH0D2RO1K+H4Q-41JkykLW0JXaUwvHw@mail.gmail.com>
Hi Anand,
Le 18/07/2020 à 08:31, Anand Moon a écrit :
> Hi Dan,
>
>>> Sorry for the _noise_ :‑(
>>> This feature seems to be working fine with VRTC drivers.
>>> I have tested this with a pre-compiled image of Archlinux distro.
>>>
>>> [root@alarm alarm]# uname -a
>>> Linux alarm 5.7.8-1-ARCH #1 SMP Sun Jul 12 03:38:28 UTC 2020 aarch64 GNU/Linux
>>> [root@alarm alarm]# rtcwake -s 30 -m mem
>>> rtcwake: assuming RTC uses UTC ...
>>> rtcwake: wakeup from "mem" using /dev/rtc0 at Thu Jan 1 00:10:14 1970
>>> [ 583.591477] PM: suspend entry (deep)
>>> [ 583.593737] Filesystems sync: 0.002 seconds
>>> [ 583.818967] Freezing user space processes ... (elapsed 0.005 seconds) done.
>>> [ 583.825802] OOM killer disabled.
>>> [ 583.828966] Freezing remaining freezable tasks ... (elapsed 0.003
>>> seconds) done.
>>> [ 583.880280] sd 0:0:0:0: [sda] Synchronizing SCSI cache
>>> [ 584.020094] PM: suspend devices took 0.190 seconds
>>> [ 584.070586] Disabling non-boot CPUs ...
>>> [ 584.075037] CPU1: shutdown
>>> [ 584.075223] psci: CPU1 killed (polled 0 ms)
>>> [ 584.097199] CPU2: shutdown
>>> [ 584.098546] psci: CPU2 killed (polled 0 ms)
>>> [ 584.115370] CPU3: shutdown
>>> [ 584.116500] psci: CPU3 killed (polled 0 ms)
>>> [ 584.128116] CPU4: shutdown
>>> [ 584.129235] psci: CPU4 killed (polled 10 ms)
>>> [ 584.140122] CPU5: shutdown
>>> [ 584.147289] psci: CPU5 killed (polled 0 ms)
>>> bl30 get wakeup sources!
>>> process command 00000006
>>> bl30 enter suspend!
>>> Little core clk suspend rate 1896000000
>>> Big core clk suspend rate 24000000
>>> store restore gp0 pll
>>> suspend_counter: 3
>>> Enter ddr suspend
>>> ddr suspend time: 16us
>>> alarm=31S
>>> process command 00000001
>>> GPIOA_11/13 off
>>> cec ver:2018/04/19
>>> CEC cfg:0x0000
>>> WAKEUP GPIO cfg:0x00000000
>>> use vddee new table!
>>> use vddee new table!
>>> exit_reason:0x03
>>> Enter ddr resume
>>> DMC_DRAM_STAT3: 0x544
>>> ddr resume time: 3188us
>>> store restore gp0 pll
>>> cfg15 33b00000
>>> cfg15 33b00000
>>> Li[ 584.148720] Enabling non-boot CPUs ...
>>> [ 584.149124] Detected VIPT I-cache on CPU1
>>> [ 584.149167] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
>>> [ 584.149594] CPU1 is up
>>> [ 584.160687] Detected VIPT I-cache on CPU2
>>> [ 584.160730] arch_timer: CPU2: Trapping CNTVCT access
>>> [ 584.160741] CPU2: Booted secondary processor 0x0000000100 [0x410fd092]
>>> [ 584.161327] CPU2 is up
>>> [ 584.177645] Detected VIPT I-cache on CPU3
>>> [ 584.177668] arch_timer: CPU3: Trapping CNTVCT access
>>> [ 584.177675] CPU3: Booted secondary processor 0x0000000101 [0x410fd092]
>>> [ 584.178036] CPU3 is up
>>> [ 584.195338] Detected VIPT I-cache on CPU4
>>> [ 584.195361] arch_timer: CPU4: Trapping CNTVCT access
>>> [ 584.195368] CPU4: Booted secondary processor 0x0000000102 [0x410fd092]
>>> [ 584.195762] CPU4 is up
>>> [ 584.213002] Detected VIPT I-cache on CPU5
>>> [ 584.213024] arch_timer: CPU5: Trapping CNTVCT access
>>> [ 584.213032] CPU5: Booted secondary processor 0x0000000103 [0x410fd092]
>>> [ 584.213450] CPU5 is up
>>> ttle core clk resume rate 1896000000
>>> Big core clk resume rate 50000000
>>> [ 584.279042] meson8b-dwmac ff3f0000.ethernet eth0: No Safety
>>> Features support found
>>> [ 584.281232] meson8b-dwmac ff3f0000.ethernet eth0: configuring for
>>> phy/rgmii link mode
>>> [ 584.401216] usb usb1: root hub lost power or was reset
>>> [ 584.401470] usb usb2: root hub lost power or was reset
>>> [ 584.655446] dwc3-meson-g12a ffe09000.usb: switching to Device Mode
>>> [ 584.801108] usb 2-1: reset SuperSpeed Gen 1 USB device number 2
>>> using xhci-hcd
>>> [ 584.979632] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
>>> [ 585.260450] usb 2-1.1: reset SuperSpeed Gen 1 USB device number 3
>>> using xhci-hcd
>>> [ 585.333303] PM: resume devices took 1.100 seconds
>>> [ 585.333507] OOM killer enabled.
>>> [ 585.335549] Restarting tasks ... done.
>>> [ 585.378044] PM: suspend exit
>>> rtcwake: read rtc alarm failed: Invalid argument
>>> [root@alarm alarm]#
>>>
>>> -Anand
>>
>> After confirming that the suspend resume feature is working correctly
>> I found the solution to the reset warning on 5.8.x kernel
>> Please can you try this following patch.
>>
>> $ cat resetwarn.patch
>> diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c
>> b/drivers/usb/dwc3/dwc3-meson-g12a.c
>> index 1f7f4d88ed9d..60a6f49139fd 100644
>> --- a/drivers/usb/dwc3/dwc3-meson-g12a.c
>> +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
>> @@ -730,7 +730,7 @@ static int dwc3_meson_g12a_probe(struct
>> platform_device *pdev)
>>
>> platform_set_drvdata(pdev, priv);
>>
>> - priv->reset = devm_reset_control_get_shared(dev, NULL);
>> + priv->reset = devm_reset_control_get_shared(dev, "dwc3_meson");
>> if (IS_ERR(priv->reset)) {
>> ret = PTR_ERR(priv->reset);
>> dev_err(dev, "failed to get device reset, err=%d\n", ret);
>>
>> -Anand
>
> Apologize once again above changes break the usb functionality.
> the correct fix along with these changes should be as below.
> reset controllers need *resets* and *reset-names* to work correctly.
>
> But the _reset controller_ warning continues on suspend / resume features,
> I am looking to find a FIX into this issue.
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> index 593a006f4b7b..6d34dfa9825c 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> @@ -2318,6 +2318,7 @@ usb: usb@ffe09000 {
>
> clocks = <&clkc CLKID_USB>;
> resets = <&reset RESET_USB>;
> + reset-names = "dwc3_meson";
>
> dr_mode = "otg";
>
> -Anand
>
Theses 2 changes :
>> - priv->reset = devm_reset_control_get_shared(dev, NULL);
>> + priv->reset = devm_reset_control_get_shared(dev, "dwc3_meson");
and
> + reset-names = "dwc3_meson";
are a no-op, since devm_reset_control_get_shared(dev, NULL) takes the
first reset, with or without a reset-names.
Neil
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-07-18 8:47 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 16:05 [PATCH 0/1] usb: dwc3: meson-g12a: fix shared reset control use Dan Robertson
2020-07-13 16:05 ` [PATCH 1/1] " Dan Robertson
2020-07-18 8:47 ` Neil Armstrong
2020-07-18 22:57 ` Dan Robertson
2020-08-19 15:03 ` Jerome Brunet
2020-08-20 18:02 ` Kevin Hilman
2020-08-20 18:27 ` Jerome Brunet
2020-08-20 18:49 ` Kevin Hilman
2020-08-20 18:44 ` Dan Robertson
2020-08-24 8:14 ` Jerome Brunet
2020-08-24 10:24 ` Philipp Zabel
2020-08-24 14:26 ` Jerome Brunet
2020-08-25 10:20 ` Philipp Zabel
2020-08-25 14:20 ` Jerome Brunet
2020-08-26 8:14 ` Philipp Zabel
2020-08-26 8:34 ` Jerome Brunet
2020-08-29 15:25 ` Martin Blumenstingl
2020-09-02 14:13 ` Amjad Ouled-Ameur
2020-09-07 8:31 ` Jerome Brunet
2020-09-07 8:33 ` Amjad Ouled-Ameur
2020-07-14 6:56 ` [PATCH 0/1] " Anand Moon
2020-07-14 13:30 ` Dan Robertson
2020-07-14 15:27 ` Anand Moon
2020-07-15 2:58 ` Dan Robertson
2020-07-15 16:23 ` Anand Moon
2020-07-17 9:01 ` Anand Moon
2020-07-17 16:38 ` Anand Moon
2020-07-18 6:31 ` Anand Moon
2020-07-18 8:46 ` Neil Armstrong [this message]
2020-07-18 9:54 ` Anand Moon
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=46ff6ff0-f8dc-d0c8-3ae0-ffd8b78d3a21@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=dan@dlrobertson.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux.amoon@gmail.com \
--cc=martin.blumenstingl@googlemail.com \
/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).