[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250918082436.3nfs7lo7hv5jdqhd@DEN-DL-M70577>
Date: Thu, 18 Sep 2025 08:24:36 +0000
From: Daniel Machon <daniel.machon@...rochip.com>
To: Robert Marko <robert.marko@...tura.hr>
CC: <p.zabel@...gutronix.de>, <robh@...nel.org>, <krzk+dt@...nel.org>,
<conor+dt@...nel.org>, <Steen.Hegelund@...rochip.com>,
<UNGLinuxDriver@...rochip.com>, <lars.povlsen@...rochip.com>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <luka.perkov@...tura.hr>,
<benjamin.ryzman@...onical.com>
Subject: Re: [PATCH 2/2] reset: sparx5: add LAN969x support
Hi Robert,
> LAN969x uses the same reset configuration as LAN966x so lets add support
> for it as well.
>
> Signed-off-by: Robert Marko <robert.marko@...tura.hr>
> ---
> drivers/reset/Kconfig | 2 +-
> drivers/reset/reset-microchip-sparx5.c | 3 +++
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> index 78b7078478d4..35cb84d1de4e 100644
> --- a/drivers/reset/Kconfig
> +++ b/drivers/reset/Kconfig
> @@ -170,7 +170,7 @@ config RESET_LPC18XX
>
> config RESET_MCHP_SPARX5
> tristate "Microchip Sparx5 reset driver"
> - depends on ARCH_SPARX5 || SOC_LAN966 || MCHP_LAN966X_PCI || COMPILE_TEST
> + depends on ARCH_SPARX5 || ARCH_LAN969X ||SOC_LAN966 || MCHP_LAN966X_PCI || COMPILE_TEST
Missing space at ||SOC_LAN966.
> default y if SPARX5_SWITCH
> select MFD_SYSCON
> help
> diff --git a/drivers/reset/reset-microchip-sparx5.c b/drivers/reset/reset-microchip-sparx5.c
> index 6d3e75b33260..28ad8f1298a0 100644
> --- a/drivers/reset/reset-microchip-sparx5.c
> +++ b/drivers/reset/reset-microchip-sparx5.c
> @@ -198,6 +198,9 @@ static const struct of_device_id mchp_sparx5_reset_of_match[] = {
> }, {
> .compatible = "microchip,lan966x-switch-reset",
> .data = &reset_props_lan966x,
> + }, {
> + .compatible = "microchip,lan969x-switch-reset",
> + .data = &reset_props_lan966x,
> },
> { }
> };
> --
> 2.51.0
>
When upstreaming support for the other SoC peripherals [1] [2], I got some
push-back on the use of wildcards in the compatible string. Instead, we used a
fallback, which is the accepted ways of expressing the individual SKU's.
This boils down to: using the lan9691-switch-reset compatible string, and
documenting each individual SKU in the bindings, with a fallback to lan9691.
The linked patches should give you and idea.
[1] https://lore.kernel.org/linux-gpio/20240917-lan969x-pinctrl-v2-1-ea02cbc56831@microchip.com/
[2] https://lore.kernel.org/linux-clk/20240916-lan969x-clock-v1-1-0e150336074d@microchip.com/
/Daniel
Powered by blists - more mailing lists