diff mbox series

[v1,1/1] i2c: designware: Add ACPI ID MSFT0006 for Microsoft Cobalt SoCs

Message ID 20261104234928.86458-1-sidchintamaneni@gmail.com
State Changes Requested
Delegated to: Wolfram Sang
Headers show
Series [v1,1/1] i2c: designware: Add ACPI ID MSFT0006 for Microsoft Cobalt SoCs | expand

Commit Message

Siddharth Chintamaneni Nov. 4, 2026, 11:49 p.m. UTC
Add the MSFT0006 ACPI ID for the DesignWare I2C controller integrated
on Microsoft Cobalt SoCs, along with its 300 MHz input clock description
in acpi_apd.c.

Without an explicit MSFT0006 entry, ACPI device matching falls back to
its _CID (APMC0D0F), which configures a 100 MHz input clock instead of
the controller's actual 300 MHz clock.

Cc: Jarred White <jarredwhite@microsoft.com>
Cc: Jeff Kirsher <jeff.kirsher@microsoft.com>
Signed-off-by: Siddharth Chintamaneni <sidchintamaneni@gmail.com>
---
 drivers/acpi/acpi_apd.c                     | 6 ++++++
 drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
 2 files changed, 7 insertions(+)

Comments

Andy Shevchenko Nov. 5, 2026, 10:03 a.m. UTC | #1
On Wed, Nov 04, 2026 at 11:49:28PM +0000, Siddharth Chintamaneni wrote:
> Add the MSFT0006 ACPI ID for the DesignWare I2C controller integrated
> on Microsoft Cobalt SoCs, along with its 300 MHz input clock description
> in acpi_apd.c.
> 
> Without an explicit MSFT0006 entry, ACPI device matching falls back to
> its _CID (APMC0D0F), which configures a 100 MHz input clock instead of
> the controller's actual 300 MHz clock.

> Cc: Jarred White <jarredwhite@microsoft.com>
> Cc: Jeff Kirsher <jeff.kirsher@microsoft.com>

Move Cc list after the '---' line below. It will reduce the noise in the commit
message and hence Git history.

> Signed-off-by: Siddharth Chintamaneni <sidchintamaneni@gmail.com>
> ---

Cc list goes here...

>  drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
>  2 files changed, 7 insertions(+)

Code wise LGTM, I assume MS allocated that HID for the specific device and
we will not see collisions in the future.
Jeff Kirsher Nov. 5, 2026, 6:03 p.m. UTC | #2
> -----Original Message-----
> From: Siddharth Chintamaneni <sidchintamaneni@gmail.com>
> Sent: Wednesday, November 4, 2026 3:49 PM
> To: Andi Shyti <andi.shyti@kernel.org>; Mika Westerberg
> <mika.westerberg@linux.intel.com>; Rafael J . Wysocki <rafael@kernel.org>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>; Len Brown
> <lenb@kernel.org>; linux-i2c@vger.kernel.org; linux-acpi@vger.kernel.org;
> linux-kernel@vger.kernel.org; Allen Pais <apais@microsoft.com>;
> rlmenge@gmail.com; hargar@linux.microsoft.com; Siddharth Chintamaneni
> <sidchintamaneni@gmail.com>; Jarred White <jarred.white@microsoft.com>;
> Jeff Kirsher <jeff.kirsher@microsoft.com>
> Subject: [EXTERNAL] [PATCH v1 1/1] i2c: designware: Add ACPI ID MSFT0006
> for Microsoft Cobalt SoCs
> 
> [You don't often get email from sidchintamaneni@gmail.com. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> Add the MSFT0006 ACPI ID for the DesignWare I2C controller integrated on
> Microsoft Cobalt SoCs, along with its 300 MHz input clock description in
> acpi_apd.c.
> 
> Without an explicit MSFT0006 entry, ACPI device matching falls back to its
> _CID (APMC0D0F), which configures a 100 MHz input clock instead of the
> controller's actual 300 MHz clock.
> 
> Signed-off-by: Siddharth Chintamaneni <sidchintamaneni@gmail.com>

Acked-by: Jeff Kirsher <jeff.kirsher@microsoft.com>

> ---
> Cc: Jarred White <jarredwhite@microsoft.com>
>
>  drivers/acpi/acpi_apd.c                     | 6 ++++++
>  drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
>  2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index
> 9fc667d6776c8..a1baa056931c4 100644
> --- a/drivers/acpi/acpi_apd.c
> +++ b/drivers/acpi/acpi_apd.c
> @@ -198,6 +198,11 @@ static const struct apd_device_desc hjmc_i2c_desc =
> {
>         .fixed_clk_rate = 200 * HZ_PER_MHZ,  };
> 
> +static const struct apd_device_desc msft_i2c_desc = {
> +       .setup = acpi_apd_setup,
> +       .fixed_clk_rate = 300 * HZ_PER_MHZ, };
> +
>  #endif /* CONFIG_ARM64 */
> 
>  #endif
> @@ -272,6 +277,7 @@ static const struct acpi_device_id
> acpi_apd_device_ids[] = {
>         { "HJMC3001", APD_ADDR(hjmc_i2c_desc) },
>         { "LECA0002", APD_ADDR(leca_spi_desc) },
>         { "LECA0003", APD_ADDR(leca_i2c_desc) },
> +       { "MSFT0006", APD_ADDR(msft_i2c_desc) },
>         { "NXP0001", APD_ADDR(nxp_i2c_desc) },  #endif
>         { }
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c
> b/drivers/i2c/busses/i2c-designware-platdrv.c
> index 1da6b0314b6a0..f359d38cc63c7 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -280,6 +280,7 @@ static const struct acpi_device_id
> dw_i2c_acpi_match[] = {
>         { .id = "INT3433" },
>         { .id = "INTC10EF" },
>         { .id = "LECA0003" },
> +       { .id = "MSFT0006" },
>         { }
>  };
>  MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
> --
> 2.45.4
Jarred White Nov. 5, 2026, 9:27 p.m. UTC | #3
> [You don't often get email from sidchintamaneni@gmail.com. Learn why 
> this is important at https://aka.ms/LearnAboutSenderIdentification 
> <https://aka.ms/LearnAboutSenderIdentification> ]
> 
> Add the MSFT0006 ACPI ID for the DesignWare I2C controller integrated
> on Microsoft Cobalt SoCs, along with its 300 MHz input clock description
> in acpi_apd.c.
> 
> Without an explicit MSFT0006 entry, ACPI device matching falls back to
> its _CID (APMC0D0F), which configures a 100 MHz input clock instead of
> the controller's actual 300 MHz clock.
> 
> Signed-off-by: Siddharth Chintamaneni <sidchintamaneni@gmail.com>

Acked-by: Jarred White <jarredwhite@linux.microsoft.com>

> ---
 > Cc: Jarred White <jarredwhite@linux.microsoft.com>
 > Cc: Jeff Kirsher <jeff.kirsher@microsoft.com>
 >
>   drivers/acpi/acpi_apd.c                     | 6 ++++++
>   drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
>   2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
> index 9fc667d6776c8..a1baa056931c4 100644
> --- a/drivers/acpi/acpi_apd.c
> +++ b/drivers/acpi/acpi_apd.c
> @@ -198,6 +198,11 @@ static const struct apd_device_desc hjmc_i2c_desc = {
>          .fixed_clk_rate = 200 * HZ_PER_MHZ,
>   };
> 
> +static const struct apd_device_desc msft_i2c_desc = {
> +       .setup = acpi_apd_setup,
> +       .fixed_clk_rate = 300 * HZ_PER_MHZ,
> +};
> +
>   #endif /* CONFIG_ARM64 */
> 
>   #endif
> @@ -272,6 +277,7 @@ static const struct acpi_device_id 
> acpi_apd_device_ids[] = {
>          { "HJMC3001", APD_ADDR(hjmc_i2c_desc) },
>          { "LECA0002", APD_ADDR(leca_spi_desc) },
>          { "LECA0003", APD_ADDR(leca_i2c_desc) },
> +       { "MSFT0006", APD_ADDR(msft_i2c_desc) },
>          { "NXP0001", APD_ADDR(nxp_i2c_desc) },
>   #endif
>          { }
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/ 
> busses/i2c-designware-platdrv.c
> index 1da6b0314b6a0..f359d38cc63c7 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -280,6 +280,7 @@ static const struct acpi_device_id 
> dw_i2c_acpi_match[] = {
>          { .id = "INT3433" },
>          { .id = "INTC10EF" },
>          { .id = "LECA0003" },
> +       { .id = "MSFT0006" },
>          { }
>   };
>   MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
> --
> 2.45.4
>
Siddharth Chintamaneni Nov. 6, 2026, 4:30 p.m. UTC | #4
On Thu, 5 Nov 2026 at 13:27, Jarred White
<jarredwhite@linux.microsoft.com> wrote:
>
> > [You don't often get email from sidchintamaneni@gmail.com. Learn why
> > this is important at https://aka.ms/LearnAboutSenderIdentification
> > <https://aka.ms/LearnAboutSenderIdentification> ]
> >
> > Add the MSFT0006 ACPI ID for the DesignWare I2C controller integrated
> > on Microsoft Cobalt SoCs, along with its 300 MHz input clock description
> > in acpi_apd.c.
> >
> > Without an explicit MSFT0006 entry, ACPI device matching falls back to
> > its _CID (APMC0D0F), which configures a 100 MHz input clock instead of
> > the controller's actual 300 MHz clock.
> >
> > Signed-off-by: Siddharth Chintamaneni <sidchintamaneni@gmail.com>
>
> Acked-by: Jarred White <jarredwhite@linux.microsoft.com>
>

Thanks!
Do I have to respin the patch?

> > ---
>  > Cc: Jarred White <jarredwhite@linux.microsoft.com>
>  > Cc: Jeff Kirsher <jeff.kirsher@microsoft.com>
>  >
> >   drivers/acpi/acpi_apd.c                     | 6 ++++++
> >   drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
> >   2 files changed, 7 insertions(+)
> >
> > diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
> > index 9fc667d6776c8..a1baa056931c4 100644
> > --- a/drivers/acpi/acpi_apd.c
> > +++ b/drivers/acpi/acpi_apd.c
> > @@ -198,6 +198,11 @@ static const struct apd_device_desc hjmc_i2c_desc = {
> >          .fixed_clk_rate = 200 * HZ_PER_MHZ,
> >   };
> >
> > +static const struct apd_device_desc msft_i2c_desc = {
> > +       .setup = acpi_apd_setup,
> > +       .fixed_clk_rate = 300 * HZ_PER_MHZ,
> > +};
> > +
> >   #endif /* CONFIG_ARM64 */
> >
> >   #endif
> > @@ -272,6 +277,7 @@ static const struct acpi_device_id
> > acpi_apd_device_ids[] = {
> >          { "HJMC3001", APD_ADDR(hjmc_i2c_desc) },
> >          { "LECA0002", APD_ADDR(leca_spi_desc) },
> >          { "LECA0003", APD_ADDR(leca_i2c_desc) },
> > +       { "MSFT0006", APD_ADDR(msft_i2c_desc) },
> >          { "NXP0001", APD_ADDR(nxp_i2c_desc) },
> >   #endif
> >          { }
> > diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/
> > busses/i2c-designware-platdrv.c
> > index 1da6b0314b6a0..f359d38cc63c7 100644
> > --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> > +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> > @@ -280,6 +280,7 @@ static const struct acpi_device_id
> > dw_i2c_acpi_match[] = {
> >          { .id = "INT3433" },
> >          { .id = "INTC10EF" },
> >          { .id = "LECA0003" },
> > +       { .id = "MSFT0006" },
> >          { }
> >   };
> >   MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
> > --
> > 2.45.4
> >
>
Siddharth Chintamaneni Nov. 7, 2026, 12:44 a.m. UTC | #5
On Fri, 6 Nov 2026 at 08:30, Siddharth Chintamaneni
<sidchintamaneni@gmail.com> wrote:
>
> On Thu, 5 Nov 2026 at 13:27, Jarred White
> <jarredwhite@linux.microsoft.com> wrote:
> >
> > > [You don't often get email from sidchintamaneni@gmail.com. Learn why
> > > this is important at https://aka.ms/LearnAboutSenderIdentification
> > > <https://aka.ms/LearnAboutSenderIdentification> ]
> > >
> > > Add the MSFT0006 ACPI ID for the DesignWare I2C controller integrated
> > > on Microsoft Cobalt SoCs, along with its 300 MHz input clock description
> > > in acpi_apd.c.
> > >
> > > Without an explicit MSFT0006 entry, ACPI device matching falls back to
> > > its _CID (APMC0D0F), which configures a 100 MHz input clock instead of
> > > the controller's actual 300 MHz clock.
> > >
> > > Signed-off-by: Siddharth Chintamaneni <sidchintamaneni@gmail.com>
> >
> > Acked-by: Jarred White <jarredwhite@linux.microsoft.com>
> >
>
> Thanks!
> Do I have to respin the patch?
>
> > > ---
> >  > Cc: Jarred White <jarredwhite@linux.microsoft.com>
> >  > Cc: Jeff Kirsher <jeff.kirsher@microsoft.com>
> >  >
> > >   drivers/acpi/acpi_apd.c                     | 6 ++++++
> > >   drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
> > >   2 files changed, 7 insertions(+)
> > >
> > > diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
> > > index 9fc667d6776c8..a1baa056931c4 100644
> > > --- a/drivers/acpi/acpi_apd.c
> > > +++ b/drivers/acpi/acpi_apd.c
> > > @@ -198,6 +198,11 @@ static const struct apd_device_desc hjmc_i2c_desc = {
> > >          .fixed_clk_rate = 200 * HZ_PER_MHZ,
> > >   };
> > >
> > > +static const struct apd_device_desc msft_i2c_desc = {
> > > +       .setup = acpi_apd_setup,
> > > +       .fixed_clk_rate = 300 * HZ_PER_MHZ,
> > > +};
> > > +
> > >   #endif /* CONFIG_ARM64 */
> > >
> > >   #endif
> > > @@ -272,6 +277,7 @@ static const struct acpi_device_id
> > > acpi_apd_device_ids[] = {
> > >          { "HJMC3001", APD_ADDR(hjmc_i2c_desc) },
> > >          { "LECA0002", APD_ADDR(leca_spi_desc) },
> > >          { "LECA0003", APD_ADDR(leca_i2c_desc) },
> > > +       { "MSFT0006", APD_ADDR(msft_i2c_desc) },
> > >          { "NXP0001", APD_ADDR(nxp_i2c_desc) },
> > >   #endif
> > >          { }
> > > diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/
> > > busses/i2c-designware-platdrv.c
> > > index 1da6b0314b6a0..f359d38cc63c7 100644
> > > --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> > > +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> > > @@ -280,6 +280,7 @@ static const struct acpi_device_id
> > > dw_i2c_acpi_match[] = {
> > >          { .id = "INT3433" },
> > >          { .id = "INTC10EF" },
> > >          { .id = "LECA0003" },
> > > +       { .id = "MSFT0006" },
> > >          { }
> > >   };
> > >   MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
> > > --
> > > 2.45.4
> > >
> >

Andy,

For Cobalt, the firmware exposes the designware input clock frequency
through the ACPI HCLK object.
Is there an existing way to retrieve or configure this clock frequency
through the ACPI tables, rather than hardcoding it in the driver?
Although the frequency is currently constant, it could change in
future hardware revisions that use the same ACPI HID. Would it make
sense to retrieve the frequency from firmware instead of relying on a
fixed value?
Wolfram Sang Nov. 8, 2026, 10:41 a.m. UTC | #6
> Do I have to respin the patch?

Yes, please.
Wolfram Sang Nov. 8, 2026, 10:45 a.m. UTC | #7
Hi Siddharth,

> For Cobalt, the firmware exposes the designware input clock frequency
> through the ACPI HCLK object.
> Is there an existing way to retrieve or configure this clock frequency
> through the ACPI tables, rather than hardcoding it in the driver?

Calling for Andy here for being the designware + ACPI expert.

> Although the frequency is currently constant, it could change in
> future hardware revisions that use the same ACPI HID. Would it make
> sense to retrieve the frequency from firmware instead of relying on a
> fixed value?

Yes, as long at it can be overridden by the driver. I heard of buggy
firmware out there...

Happy hacking,

   Wolfram
Andy Shevchenko Nov. 9, 2026, 12:34 p.m. UTC | #8
On Sun, Nov 08, 2026 at 11:45:00AM +0100, Wolfram Sang wrote:
> 
> > For Cobalt, the firmware exposes the designware input clock frequency
> > through the ACPI HCLK object.
> > Is there an existing way to retrieve or configure this clock frequency
> > through the ACPI tables, rather than hardcoding it in the driver?
> 
> Calling for Andy here for being the designware + ACPI expert.

We don't have the common way, it's unspecified. However, many drivers and some
firmwares adopted the "clock-frequency" property. Unfortunately for I2C it means
the clock of the bus, and not functional clock of the controller. So, I'm
afraid you will need to have your own custom solution. Also makes sense to look
what ARM people do in the same situtions (I know that Qualcomm tries hard to
enable ACPI on laptops, if I was you, I would ask them first).
Siddharth Chintamaneni Nov. 9, 2026, 8:53 p.m. UTC | #9
On Mon, 9 Nov 2026 at 04:34, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Sun, Nov 08, 2026 at 11:45:00AM +0100, Wolfram Sang wrote:
> >
> > > For Cobalt, the firmware exposes the designware input clock frequency
> > > through the ACPI HCLK object.
> > > Is there an existing way to retrieve or configure this clock frequency
> > > through the ACPI tables, rather than hardcoding it in the driver?
> >
> > Calling for Andy here for being the designware + ACPI expert.
>
> We don't have the common way, it's unspecified. However, many drivers and some
> firmwares adopted the "clock-frequency" property. Unfortunately for I2C it means
> the clock of the bus, and not functional clock of the controller. So, I'm
> afraid you will need to have your own custom solution. Also makes sense to look
> what ARM people do in the same situtions (I know that Qualcomm tries hard to
> enable ACPI on laptops, if I was you, I would ask them first).
>

Thanks Andy for the suggestion. Not sure how to reach out to Qualocomm
ppl, I'll figure that out. I'll re-spin the patch for now.

> --
> With Best Regards,
> Andy Shevchenko
>
>
diff mbox series

Patch

diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 9fc667d6776c8..a1baa056931c4 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -198,6 +198,11 @@  static const struct apd_device_desc hjmc_i2c_desc = {
 	.fixed_clk_rate = 200 * HZ_PER_MHZ,
 };
 
+static const struct apd_device_desc msft_i2c_desc = {
+	.setup = acpi_apd_setup,
+	.fixed_clk_rate = 300 * HZ_PER_MHZ,
+};
+
 #endif /* CONFIG_ARM64 */
 
 #endif
@@ -272,6 +277,7 @@  static const struct acpi_device_id acpi_apd_device_ids[] = {
 	{ "HJMC3001", APD_ADDR(hjmc_i2c_desc) },
 	{ "LECA0002", APD_ADDR(leca_spi_desc) },
 	{ "LECA0003", APD_ADDR(leca_i2c_desc) },
+	{ "MSFT0006", APD_ADDR(msft_i2c_desc) },
 	{ "NXP0001", APD_ADDR(nxp_i2c_desc) },
 #endif
 	{ }
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 1da6b0314b6a0..f359d38cc63c7 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -280,6 +280,7 @@  static const struct acpi_device_id dw_i2c_acpi_match[] = {
 	{ .id = "INT3433" },
 	{ .id = "INTC10EF" },
 	{ .id = "LECA0003" },
+	{ .id = "MSFT0006" },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);