From: Macpaul Lin <macpaul.lin@mediatek.com>
To: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Mathias Nyman <mathias.nyman@intel.com>,
"Chunfeng Yun" <chunfeng.yun@mediatek.com>,
<linux-usb@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
Ainge Hsu <ainge.hsu@mediatek.com>,
Eddie Hung <eddie.hung@mediatek.com>,
"Mediatek WSD Upstream" <wsd_upstream@mediatek.com>,
Macpaul Lin <macpaul@gmail.com>
Subject: Re: [PATCH 1/2] dt-bindings: usb: mediatek,mtk-xhci: add keep-clock-on
Date: Fri, 6 Nov 2020 17:29:47 +0800 [thread overview]
Message-ID: <1604654987.24301.23.camel@mtkswgap22> (raw)
In-Reply-To: <20201104223926.GA54259@bogus>
On Wed, 2020-11-04 at 16:39 -0600, Rob Herring wrote:
> On Mon, Nov 02, 2020 at 03:18:48PM +0800, Macpaul Lin wrote:
> > Option "mediatek,keep-clock-on" means to keep clock on during system
> > suspend and resume. Some platform will flush register settings if clock has
> > been disabled when system is suspended. Set this option to avoid clock off.
> >
> > Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
> > ---
> > .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> > index ea696c8..a956dde 100644
> > --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> > +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> > @@ -104,6 +104,12 @@ properties:
> > description: enable USB remote wakeup, see power/wakeup-source.txt
> > type: boolean
> >
> > + mediatek,keep-clock-on:
> > + description: |
> > + Keep clock on during system suspend and resume. Some platform will flush
> > + register settings if clock has been disabled when system is suspended.
> > + type: boolean
> > +
>
> This should be implied by the compatible string.
This should be an property according to system-wide design.
Mtk-xhci may be applied to different product lines for the same platform
(IC). Suspend on phone system is different to tablet or laptop. Phone's
power management module will turn off XHCI's power once the clock has
been turned off. For example, the headset plugged into phone won't do
disconnect and re-enumeration during system suspend. Click a button on
the headset to wake-up phone is necessary, and then, XHCI needs ready to
work immediately.
If the IC has been applied to a tablet or laptop product. When system is
suspending, the headset will be disconnected. The headset will do
re-enumerate when system is waking up. In this kind of applications, the
power of XHCI can be turned off with clock.
> > mediatek,syscon-wakeup:
> > $ref: /schemas/types.yaml#/definitions/phandle-array
> > maxItems: 1
> > @@ -175,6 +181,7 @@ examples:
> > imod-interval-ns = <10000>;
> > mediatek,syscon-wakeup = <&pericfg 0x400 1>;
> > wakeup-source;
> > + mediatek,keep-clock-on;
> > usb3-lpm-capable;
> > };
> > ...
> > --
> > 1.7.9.5
After a discussion with Chunfeng, I'll send a new version for
Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt because the
YAML file still need to be revised. The property
"mediatek,keep-clock-on" will be renamed to "mediatek,str-clock-on" for
implying it relates to suspend/resume capability.
Thanks.
Macpaul Lin
prev parent reply other threads:[~2020-11-06 9:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 7:18 [PATCH 1/2] dt-bindings: usb: mediatek,mtk-xhci: add keep-clock-on Macpaul Lin
2020-11-02 7:18 ` [PATCH 2/2] usb: host: XHCI: xhci-mtk.c: support mediatek,keep-clock-on Macpaul Lin
2020-11-03 3:01 ` [PATCH 1/2] dt-bindings: usb: mediatek,mtk-xhci: add keep-clock-on Chunfeng Yun
2020-11-04 22:39 ` Rob Herring
2020-11-06 9:29 ` Macpaul Lin [this message]
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=1604654987.24301.23.camel@mtkswgap22 \
--to=macpaul.lin@mediatek.com \
--cc=ainge.hsu@mediatek.com \
--cc=chunfeng.yun@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=eddie.hung@mediatek.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=macpaul@gmail.com \
--cc=mathias.nyman@intel.com \
--cc=matthias.bgg@gmail.com \
--cc=robh@kernel.org \
--cc=wsd_upstream@mediatek.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).