linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Yu-chang Lee (李禹璋)" <Yu-chang.Lee@mediatek.com>
To: "wenst@chromium.org" <wenst@chromium.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"mturquette@baylibre.com" <mturquette@baylibre.com>,
	"u.kleine-koenig@pengutronix.de" <u.kleine-koenig@pengutronix.de>,
	"sboyd@kernel.org" <sboyd@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Chun-Jie Chen (陳浚桀)" <Chun-Jie.Chen@mediatek.com>,
	"Miles Chen (陳民樺)" <Miles.Chen@mediatek.com>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH] clk: mediatek: mt8186: Change I2C 4/5/6 ap clocks parent to infra
Date: Wed, 25 Oct 2023 09:50:11 +0000	[thread overview]
Message-ID: <e049985de9da9958ba425824ab5f38c7cf41025b.camel@mediatek.com> (raw)
In-Reply-To: <CAGXv+5HQ2sVx=F3my2jOGMw3j3pU2aarEg+Dj1XgNzwio98ezA@mail.gmail.com>

On Tue, 2023-10-24 at 17:20 +0800, Chen-Yu Tsai wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  On Tue, Oct 24, 2023 at 3:47 PM Yu-chang Lee (李禹璋)
> <Yu-chang.Lee@mediatek.com> wrote:
> >
> > On Tue, 2023-10-24 at 10:58 +0800, Chen-Yu Tsai wrote:
> > > On Tue, Oct 24, 2023 at 10:52 AM Stephen Boyd <sboyd@kernel.org>
> > > wrote:
> > > >
> > > > Quoting Chen-Yu Tsai (2023-10-19 22:06:35)
> > > > > On Thu, Oct 19, 2023 at 8:49 PM AngeloGioacchino Del Regno
> > > > > <angelogioacchino.delregno@collabora.com> wrote:
> > > > > >
> > > > > > Fix the parenting of clocks imp_iic_wrap_ap_clock_i2c{4-6}, 
> as
> > > > > > those
> > > > > > are effectively parented to infra_ao_i2c{4-6} and not to
> the
> > > > > > I2C_AP.
> > > > > > This permits the correct (and full) enablement and
> disablement
> > > > > > of the
> > > > > > I2C4, I2C5 and I2C6 bus clocks, satisfying the whole clock
> tree
> > > > > > of
> > > > > > those.
> > > > > >
> > > > > > As an example, when requesting to enable
> > > > > > imp_iic_wrap_ap_clock_i2c4:
> > > > > >
> > > > > > Before: infra_ao_i2c_ap -> imp_iic_wrap_ap_clock_i2c4
> > > > > > After:  infra_ao_i2c_ap -> infra_ao_i2c4 ->
> > > > > > imp_iic_wrap_ap_clock_i2c4
> > > > > >
> > > > > > Fixes: 66cd0b4b0ce5 ("clk: mediatek: Add MT8186 imp i2c
> wrapper
> > > > > > clock support")
> > > > > > Signed-off-by: AngeloGioacchino Del Regno <
> > > > > > angelogioacchino.delregno@collabora.com>
> > > > >
> > > > > I'm curious about what led to discovering this error?
> > > > >
> > > >
> > > > Is that an acked-by?
> > >
> > > MediaTek engineers are saying the original code already matches
> the
> > > documentation provided by their hardware engineers. I'm trying to
> get
> > > them to respond on the mailing list.
> > >
> > > ChenYu
> > >
> > After checking with I2C clock hardware designer there is no
> > infra_ao_i2c{4-6} clock gate in between. And the clock document at
> hand
> > aslo shows the same result. Generallly speaking, we would like to
> keep
> > sw setting align with the hardware design document. I would
> recommand
> > not to change this part of code, but enable infra_ao_i2c{4-6} prior
> to
> > the usage of imp_iic_wrap_ap_clock_i2c clock.
> 
> Are infra_ao_i2c{4-6} actually used by the hardware? If so, for what
> purpose?

According to hardware designer it servers no purpose. Just a legacy of
previous design...

> If it is actually needed by the hardware and it is not in the
> existing path,
> then it needs to be described in the device tree and handled by the
> driver.
> 
> ChenYu

After reviewing hardware design diagram, hardware designer concludes
that the clock tree is indeed

top_i2c -> infra_ao_i2c{4-6}
top_i2c -> infra_ao_i2c_ap -> imp_iic_wrap_ap_clock_i2c{4-6}

so I think we should keep this clock relation unchanged.

Thanks
YuChang

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

  reply	other threads:[~2023-10-25  9:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19 12:49 [PATCH] clk: mediatek: mt8186: Change I2C 4/5/6 ap clocks parent to infra AngeloGioacchino Del Regno
2023-10-20  5:06 ` Chen-Yu Tsai
2023-10-20  7:52   ` AngeloGioacchino Del Regno
2023-10-24  2:52   ` Stephen Boyd
2023-10-24  2:58     ` Chen-Yu Tsai
2023-10-24  7:47       ` Yu-chang Lee (李禹璋)
2023-10-24  9:20         ` Chen-Yu Tsai
2023-10-25  9:50           ` Yu-chang Lee (李禹璋) [this message]
2023-10-25 11:29             ` AngeloGioacchino Del Regno
2023-10-26  3:49               ` Yu-chang Lee (李禹璋)
2023-10-26  8:24                 ` AngeloGioacchino Del Regno

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=e049985de9da9958ba425824ab5f38c7cf41025b.camel@mediatek.com \
    --to=yu-chang.lee@mediatek.com \
    --cc=Chun-Jie.Chen@mediatek.com \
    --cc=Miles.Chen@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wenst@chromium.org \
    /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).