All of lore.kernel.org
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno  <angelogioacchino.delregno@collabora.com>
To: Chen-Yu Tsai <wenst@chromium.org>, Lee Jones <lee@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: Zhiyong Tao <zhiyong.tao@mediatek.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 3/9] mfd: mt6397: Split MediaTek MT6366 PMIC out of MT6358
Date: Thu, 3 Aug 2023 11:01:32 +0200	[thread overview]
Message-ID: <aa8f232f-701a-5b4c-eda8-89fc0e6fe5a8@collabora.com> (raw)
In-Reply-To: <20230803074249.3065586-4-wenst@chromium.org>

Il 03/08/23 09:42, Chen-Yu Tsai ha scritto:
> The MT6366 PMIC is mostly, but not fully, compatible with MT6358. It has
> a different set of regulators. Specifically, it lacks the camera related
> VCAM* LDOs, but has additional VM18, VMDDR, and VSRAM_CORE LDOs.
> 
> Add a separate compatible for the MT6366 PMIC. The regulator cell for
> this new entry uses a new compatible string matching MT6366.
> 
> Fixes: c47383f84909 ("mfd: Add support for the MediaTek MT6366 PMIC")
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>

I agree in that the LDOs are a bit different, but that's handled by the
mt6358-regulator driver regardless of the actual devicetree compatible,
as that's selected through a chip_id check.

Finally, looking at the driver implementation itself, the addition of a
specific mt6366 compatible here seems redundant, because the actual HW is
  - Handled by drivers, but
  - Described by bindings

Any other opinions on this?

Regards,
Angelo

> ---
>   drivers/mfd/mt6397-core.c | 31 +++++++++++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
> 
> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index f6c1f80f94a4..3f8dfe60a59b 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -206,6 +206,26 @@ static const struct mfd_cell mt6359_devs[] = {
>   	},
>   };
>   
> +static const struct mfd_cell mt6366_devs[] = {
> +	{
> +		.name = "mt6358-regulator",
> +		.of_compatible = "mediatek,mt6366-regulator"
> +	}, {
> +		.name = "mt6358-rtc",
> +		.num_resources = ARRAY_SIZE(mt6358_rtc_resources),
> +		.resources = mt6358_rtc_resources,
> +		.of_compatible = "mediatek,mt6358-rtc",
> +	}, {
> +		.name = "mt6358-sound",
> +		.of_compatible = "mediatek,mt6358-sound"
> +	}, {
> +		.name = "mt6358-keys",
> +		.num_resources = ARRAY_SIZE(mt6358_keys_resources),
> +		.resources = mt6358_keys_resources,
> +		.of_compatible = "mediatek,mt6358-keys"
> +	},
> +};
> +
>   static const struct mfd_cell mt6397_devs[] = {
>   	{
>   		.name = "mt6397-rtc",
> @@ -280,6 +300,14 @@ static const struct chip_data mt6359_core = {
>   	.irq_init = mt6358_irq_init,
>   };
>   
> +static const struct chip_data mt6366_core = {
> +	.cid_addr = MT6358_SWCID,
> +	.cid_shift = 8,
> +	.cells = mt6366_devs,
> +	.cell_size = ARRAY_SIZE(mt6366_devs),
> +	.irq_init = mt6358_irq_init,
> +};
> +
>   static const struct chip_data mt6397_core = {
>   	.cid_addr = MT6397_CID,
>   	.cid_shift = 0,
> @@ -358,6 +386,9 @@ static const struct of_device_id mt6397_of_match[] = {
>   	}, {
>   		.compatible = "mediatek,mt6359",
>   		.data = &mt6359_core,
> +	}, {
> +		.compatible = "mediatek,mt6366",
> +		.data = &mt6366_core,
>   	}, {
>   		.compatible = "mediatek,mt6397",
>   		.data = &mt6397_core,



WARNING: multiple messages have this Message-ID (diff)
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Chen-Yu Tsai <wenst@chromium.org>, Lee Jones <lee@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: Zhiyong Tao <zhiyong.tao@mediatek.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 3/9] mfd: mt6397: Split MediaTek MT6366 PMIC out of MT6358
Date: Thu, 3 Aug 2023 11:01:32 +0200	[thread overview]
Message-ID: <aa8f232f-701a-5b4c-eda8-89fc0e6fe5a8@collabora.com> (raw)
In-Reply-To: <20230803074249.3065586-4-wenst@chromium.org>

Il 03/08/23 09:42, Chen-Yu Tsai ha scritto:
> The MT6366 PMIC is mostly, but not fully, compatible with MT6358. It has
> a different set of regulators. Specifically, it lacks the camera related
> VCAM* LDOs, but has additional VM18, VMDDR, and VSRAM_CORE LDOs.
> 
> Add a separate compatible for the MT6366 PMIC. The regulator cell for
> this new entry uses a new compatible string matching MT6366.
> 
> Fixes: c47383f84909 ("mfd: Add support for the MediaTek MT6366 PMIC")
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>

I agree in that the LDOs are a bit different, but that's handled by the
mt6358-regulator driver regardless of the actual devicetree compatible,
as that's selected through a chip_id check.

Finally, looking at the driver implementation itself, the addition of a
specific mt6366 compatible here seems redundant, because the actual HW is
  - Handled by drivers, but
  - Described by bindings

Any other opinions on this?

Regards,
Angelo

> ---
>   drivers/mfd/mt6397-core.c | 31 +++++++++++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
> 
> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index f6c1f80f94a4..3f8dfe60a59b 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -206,6 +206,26 @@ static const struct mfd_cell mt6359_devs[] = {
>   	},
>   };
>   
> +static const struct mfd_cell mt6366_devs[] = {
> +	{
> +		.name = "mt6358-regulator",
> +		.of_compatible = "mediatek,mt6366-regulator"
> +	}, {
> +		.name = "mt6358-rtc",
> +		.num_resources = ARRAY_SIZE(mt6358_rtc_resources),
> +		.resources = mt6358_rtc_resources,
> +		.of_compatible = "mediatek,mt6358-rtc",
> +	}, {
> +		.name = "mt6358-sound",
> +		.of_compatible = "mediatek,mt6358-sound"
> +	}, {
> +		.name = "mt6358-keys",
> +		.num_resources = ARRAY_SIZE(mt6358_keys_resources),
> +		.resources = mt6358_keys_resources,
> +		.of_compatible = "mediatek,mt6358-keys"
> +	},
> +};
> +
>   static const struct mfd_cell mt6397_devs[] = {
>   	{
>   		.name = "mt6397-rtc",
> @@ -280,6 +300,14 @@ static const struct chip_data mt6359_core = {
>   	.irq_init = mt6358_irq_init,
>   };
>   
> +static const struct chip_data mt6366_core = {
> +	.cid_addr = MT6358_SWCID,
> +	.cid_shift = 8,
> +	.cells = mt6366_devs,
> +	.cell_size = ARRAY_SIZE(mt6366_devs),
> +	.irq_init = mt6358_irq_init,
> +};
> +
>   static const struct chip_data mt6397_core = {
>   	.cid_addr = MT6397_CID,
>   	.cid_shift = 0,
> @@ -358,6 +386,9 @@ static const struct of_device_id mt6397_of_match[] = {
>   	}, {
>   		.compatible = "mediatek,mt6359",
>   		.data = &mt6359_core,
> +	}, {
> +		.compatible = "mediatek,mt6366",
> +		.data = &mt6366_core,
>   	}, {
>   		.compatible = "mediatek,mt6397",
>   		.data = &mt6397_core,



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

  reply	other threads:[~2023-08-03  9:01 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03  7:42 [PATCH 0/9] regulator: mt6366: Split out of MT6358 and cleanup Chen-Yu Tsai
2023-08-03  7:42 ` Chen-Yu Tsai
2023-08-03  7:42 ` [PATCH 1/9] dt-bindings: mfd: mt6397: Split out compatible for MediaTek MT6366 PMIC Chen-Yu Tsai
2023-08-03  7:42   ` Chen-Yu Tsai
2023-08-04 15:31   ` Conor Dooley
2023-08-04 15:31     ` Conor Dooley
2023-08-03  7:42 ` [PATCH 2/9] mfd: mt6358: Add registers for MT6366 specific regulators Chen-Yu Tsai
2023-08-03  7:42   ` Chen-Yu Tsai
2023-08-03  7:42 ` [PATCH 3/9] mfd: mt6397: Split MediaTek MT6366 PMIC out of MT6358 Chen-Yu Tsai
2023-08-03  7:42   ` Chen-Yu Tsai
2023-08-03  9:01   ` AngeloGioacchino Del Regno [this message]
2023-08-03  9:01     ` AngeloGioacchino Del Regno
2023-08-04  3:47     ` Chen-Yu Tsai
2023-08-04  3:47       ` Chen-Yu Tsai
2023-08-04  6:39       ` AngeloGioacchino Del Regno
2023-08-04  6:39         ` AngeloGioacchino Del Regno
2023-08-03  7:42 ` [PATCH 4/9] regulator: dt-bindings: mediatek: Add MT6366 PMIC Chen-Yu Tsai
2023-08-03  7:42   ` Chen-Yu Tsai
2023-08-07  6:23   ` Krzysztof Kozlowski
2023-08-07  6:23     ` Krzysztof Kozlowski
2023-08-07  6:30     ` Chen-Yu Tsai
2023-08-07  6:30       ` Chen-Yu Tsai
2023-08-07  6:36       ` Krzysztof Kozlowski
2023-08-07  6:36         ` Krzysztof Kozlowski
2023-08-03  7:42 ` [PATCH 5/9] regulator: mt6358: fix and drop type prefix in MT6366 regulator node names Chen-Yu Tsai
2023-08-03  7:42   ` Chen-Yu Tsai
2023-08-03  9:01   ` AngeloGioacchino Del Regno
2023-08-03  9:01     ` AngeloGioacchino Del Regno
2023-08-04 10:13     ` Eugen Hristev
2023-08-04 10:13       ` Eugen Hristev
2023-08-07  3:54       ` Chen-Yu Tsai
2023-08-07  3:54         ` Chen-Yu Tsai
2023-08-03  7:42 ` [PATCH 6/9] regulator: mt6358: Make MT6366 vcn18 LDO configurable Chen-Yu Tsai
2023-08-03  7:42   ` Chen-Yu Tsai
2023-08-03  9:01   ` AngeloGioacchino Del Regno
2023-08-03  9:01     ` AngeloGioacchino Del Regno
2023-08-03  7:42 ` [PATCH 7/9] regulator: mt6358: Add missing regulators for MT6366 Chen-Yu Tsai
2023-08-03  7:42   ` Chen-Yu Tsai
2023-08-03  9:01   ` AngeloGioacchino Del Regno
2023-08-03  9:01     ` AngeloGioacchino Del Regno
2023-08-03  7:42 ` [PATCH 8/9] regulator: mt6358: Add supply names for MT6366 regulators Chen-Yu Tsai
2023-08-03  7:42   ` Chen-Yu Tsai
2023-08-03  9:01   ` AngeloGioacchino Del Regno
2023-08-03  9:01     ` AngeloGioacchino Del Regno
2023-08-03  7:42 ` [PATCH 9/9] soc: mediatek: pwrap: add support for MT6366 PMIC Chen-Yu Tsai
2023-08-03  7:42   ` Chen-Yu Tsai
2023-08-03  9:01   ` AngeloGioacchino Del Regno
2023-08-03  9:01     ` AngeloGioacchino Del Regno
2023-08-04  3:49     ` Chen-Yu Tsai
2023-08-04  3:49       ` Chen-Yu Tsai

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=aa8f232f-701a-5b4c-eda8-89fc0e6fe5a8@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=wenst@chromium.org \
    --cc=zhiyong.tao@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 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.