Re: [PATCH] platform/x86: pmc_atom: Add Lex 3I380NX industrial PC to critclk_systems DMI table

From: Hans de Goede
Date: Thu Jul 28 2022 - 14:31:38 EST


Hi,

On 7/19/22 14:48, Paul Spooren wrote:
> The Lex 3I380NX industrial PC has 4 ethernet controllers on board
> which need pmc_plt_clk0 - 3 to function, add it to the critclk_systems
> DMI table, so that drivers/clk/x86/clk-pmc-atom.c will mark the clocks
> as CLK_CRITICAL and they will not get turned off.
>
> This commit is nearly redundant to 3d0818f5eba8 ("platform/x86:
> pmc_atom: Add Lex 3I380D industrial PC to critclk_systems DMI table")
> but for the 3I380NX device.
>
> The original vendor firmware is only available using the WaybackMachine:
> http://www.lex.com.tw/products/3I380NX.html
>
> Signed-off-by: Michael Schöne <michael.schoene@xxxxxxxxx>
> Signed-off-by: Paul Spooren <paul.spooren@xxxxxxxxx>

Thank you for the patch.

The last week I have received 2 different patches adding
a total of 3 new "Lex BayTrail" entries to critclk_systems[]
on top of the existing 2.

Looking at: https://www.lex.com.tw/products/embedded-ipc-board/
we can see that Lex BayTrail makes many embedded boards with
multiple ethernet boards and none of their products are battery
powered so we don't need to worry (too much) about power consumption
when suspended.

So instead of adding 3 new entries I've written a patch to
simply disable the turning off of the clocks on all
systems which have "Lex BayTrail" as their DMI sys_vendor:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=review-hans&id=f046d13750b759f090cae13e47cab06b023a700b

I've added a Reported-by tag to give you credit for the work
you have done on this.

I will send this alternative fix to Linus as part of
the other pdx86 patches for 5.21.

Regards,

Hans




> ---
> drivers/platform/x86/pmc_atom.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/platform/x86/pmc_atom.c b/drivers/platform/x86/pmc_atom.c
> index b8b1ed1406de..15973a400e43 100644
> --- a/drivers/platform/x86/pmc_atom.c
> +++ b/drivers/platform/x86/pmc_atom.c
> @@ -397,6 +397,15 @@ static const struct dmi_system_id critclk_systems[] = {
> DMI_MATCH(DMI_PRODUCT_NAME, "3I380D"),
> },
> },
> + {
> + /* pmc_plt_clk0 - 3 are used for the 4 ethernet controllers */
> + .ident = "Lex 3I380NX",
> + .callback = dmi_callback,
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "3I380NX"),
> + },
> + },
> {
> /* pmc_plt_clk* - are used for ethernet controllers */
> .ident = "Lex 2I385SW",