All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Chun-Jie Chen <chun-jie.chen@mediatek.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] soc: mediatek: Add support always on flag
Date: Wed, 24 Nov 2021 14:38:17 +0800	[thread overview]
Message-ID: <26704c3979b1c8936ab14d9ea7704166aca66887.camel@mediatek.com> (raw)
In-Reply-To: <e6ebf764-b94a-7b77-df17-1cb8e4b14635@collabora.com>

On Thu, 2021-11-11 at 14:56 +0100, AngeloGioacchino Del Regno wrote:
> Il 02/11/21 08:20, Chunfeng Yun ha scritto:
> > There is a t-phy shared by PCIe and USB3 on mt8195, if the t-phy is
> > used by PCIe, when power off its mtcmos, need software reset it
> > (workaround way, usually hardware do it, but has an issue on
> > mt8195),
> > but it has side effect to USB2 phy(works with USB3 phy to support
> > USB3.2 Gen1), so add support GENPD_FLAG_ALWAYS_ON flag, and make
> > its
> > power always on;
> > Another reason is that USB3.2 Gen1/2 need keep power always on when
> > support runtime-pm due to hardware limitation until now;
> > 
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> >   drivers/soc/mediatek/mt8195-pm-domains.h | 2 +-
> >   drivers/soc/mediatek/mtk-pm-domains.c    | 2 ++
> >   drivers/soc/mediatek/mtk-pm-domains.h    | 1 +
> >   3 files changed, 4 insertions(+), 1 deletion(-)
> > 
> 
> Hello Chunfeng,
> what are are the side effects on the USB2 PHY? Can you please expand?
Sorry for later reply, I missed this message.

the side effect on u2 phy is that it will cause u2 phy power off and
cause other issues, e.g. if there is a device plugged in u2 port, it
will disconnect, more over it will not work until reboot platform.

> 
> Also, wouldn't it be possible to also reset the USB2 PHY when
> resetting the t-phy
> in order to get it back up and running?
No, the usb driver don't reset or reinit phy after probe;

> 
> Moreover, as for the USB3.2 hardware limitation... I would say that
> this is more
> like something that has to be accounted for in the USB driver,
> instead of the PM
> domains driver... unless there's some reason that stops you from
> doing that?
Usb driver itself can't handle this case. but power domain's driver can
handle it easily.

> 
> Thanks,
> - Angelo

WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Chun-Jie Chen <chun-jie.chen@mediatek.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] soc: mediatek: Add support always on flag
Date: Wed, 24 Nov 2021 14:38:17 +0800	[thread overview]
Message-ID: <26704c3979b1c8936ab14d9ea7704166aca66887.camel@mediatek.com> (raw)
In-Reply-To: <e6ebf764-b94a-7b77-df17-1cb8e4b14635@collabora.com>

On Thu, 2021-11-11 at 14:56 +0100, AngeloGioacchino Del Regno wrote:
> Il 02/11/21 08:20, Chunfeng Yun ha scritto:
> > There is a t-phy shared by PCIe and USB3 on mt8195, if the t-phy is
> > used by PCIe, when power off its mtcmos, need software reset it
> > (workaround way, usually hardware do it, but has an issue on
> > mt8195),
> > but it has side effect to USB2 phy(works with USB3 phy to support
> > USB3.2 Gen1), so add support GENPD_FLAG_ALWAYS_ON flag, and make
> > its
> > power always on;
> > Another reason is that USB3.2 Gen1/2 need keep power always on when
> > support runtime-pm due to hardware limitation until now;
> > 
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> >   drivers/soc/mediatek/mt8195-pm-domains.h | 2 +-
> >   drivers/soc/mediatek/mtk-pm-domains.c    | 2 ++
> >   drivers/soc/mediatek/mtk-pm-domains.h    | 1 +
> >   3 files changed, 4 insertions(+), 1 deletion(-)
> > 
> 
> Hello Chunfeng,
> what are are the side effects on the USB2 PHY? Can you please expand?
Sorry for later reply, I missed this message.

the side effect on u2 phy is that it will cause u2 phy power off and
cause other issues, e.g. if there is a device plugged in u2 port, it
will disconnect, more over it will not work until reboot platform.

> 
> Also, wouldn't it be possible to also reset the USB2 PHY when
> resetting the t-phy
> in order to get it back up and running?
No, the usb driver don't reset or reinit phy after probe;

> 
> Moreover, as for the USB3.2 hardware limitation... I would say that
> this is more
> like something that has to be accounted for in the USB driver,
> instead of the PM
> domains driver... unless there's some reason that stops you from
> doing that?
Usb driver itself can't handle this case. but power domain's driver can
handle it easily.

> 
> Thanks,
> - Angelo
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Chun-Jie Chen <chun-jie.chen@mediatek.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] soc: mediatek: Add support always on flag
Date: Wed, 24 Nov 2021 14:38:17 +0800	[thread overview]
Message-ID: <26704c3979b1c8936ab14d9ea7704166aca66887.camel@mediatek.com> (raw)
In-Reply-To: <e6ebf764-b94a-7b77-df17-1cb8e4b14635@collabora.com>

On Thu, 2021-11-11 at 14:56 +0100, AngeloGioacchino Del Regno wrote:
> Il 02/11/21 08:20, Chunfeng Yun ha scritto:
> > There is a t-phy shared by PCIe and USB3 on mt8195, if the t-phy is
> > used by PCIe, when power off its mtcmos, need software reset it
> > (workaround way, usually hardware do it, but has an issue on
> > mt8195),
> > but it has side effect to USB2 phy(works with USB3 phy to support
> > USB3.2 Gen1), so add support GENPD_FLAG_ALWAYS_ON flag, and make
> > its
> > power always on;
> > Another reason is that USB3.2 Gen1/2 need keep power always on when
> > support runtime-pm due to hardware limitation until now;
> > 
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> >   drivers/soc/mediatek/mt8195-pm-domains.h | 2 +-
> >   drivers/soc/mediatek/mtk-pm-domains.c    | 2 ++
> >   drivers/soc/mediatek/mtk-pm-domains.h    | 1 +
> >   3 files changed, 4 insertions(+), 1 deletion(-)
> > 
> 
> Hello Chunfeng,
> what are are the side effects on the USB2 PHY? Can you please expand?
Sorry for later reply, I missed this message.

the side effect on u2 phy is that it will cause u2 phy power off and
cause other issues, e.g. if there is a device plugged in u2 port, it
will disconnect, more over it will not work until reboot platform.

> 
> Also, wouldn't it be possible to also reset the USB2 PHY when
> resetting the t-phy
> in order to get it back up and running?
No, the usb driver don't reset or reinit phy after probe;

> 
> Moreover, as for the USB3.2 hardware limitation... I would say that
> this is more
> like something that has to be accounted for in the USB driver,
> instead of the PM
> domains driver... unless there's some reason that stops you from
> doing that?
Usb driver itself can't handle this case. but power domain's driver can
handle it easily.

> 
> Thanks,
> - Angelo
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-11-24  6:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02  7:20 [RFC PATCH] soc: mediatek: Add support always on flag Chunfeng Yun
2021-11-02  7:20 ` Chunfeng Yun
2021-11-02  7:20 ` Chunfeng Yun
2021-11-11 13:56 ` AngeloGioacchino Del Regno
2021-11-11 13:56   ` AngeloGioacchino Del Regno
2021-11-11 13:56   ` AngeloGioacchino Del Regno
2021-11-24  6:38   ` Chunfeng Yun [this message]
2021-11-24  6:38     ` Chunfeng Yun
2021-11-24  6:38     ` Chunfeng Yun

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=26704c3979b1c8936ab14d9ea7704166aca66887.camel@mediatek.com \
    --to=chunfeng.yun@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chun-jie.chen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.