[PATCH v2 3/6] mmc: sdhci-of-at91: add LAN969x support

Robert Marko robert.marko at sartura.hr
Tue Sep 22 05:09:55 PDT 2026


On Wed, Sep 9, 2026 at 12:42 PM Adrian Hunter <adrian.hunter at intel.com> wrote:
>
> On 07/09/2026 16:25, Robert Marko wrote:
> > LAN969x uses the same internally generated base clock layout as SAM9X60,
> > but its SDMMC controller stops responding when runtime PM gates its clocks.
> > Software resets then fail to complete and the internal SDHCI clock never
> > stabilises, causing subsequent I/O requests to time out.
>
> Is this a known issue of the SoC?  Is there perhaps a hardware reset
> for the controller that would bring it back to life?

Hi Adrian,
It seems like the controller was reused from SAMA7G5, which shares the
same behaviour.
Unfortunately, there is no HW reset for the controller.

>
> Does that mean unbind and rebind of the device from the driver
> also does not work?

It works as long as we avoid disabling the clocks.

Regards,
Robert

>
> >
> > Add LAN969x-specific SoC data using the SAM9X60 clock layout and select the
> > option to leave its clocks enabled across runtime suspend.
> >
> > Signed-off-by: Robert Marko <robert.marko at sartura.hr>
> >
> >  drivers/mmc/host/sdhci-of-at91.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c
> > index b7e2a89da348..e7affca8da25 100644
> > --- a/drivers/mmc/host/sdhci-of-at91.c
> > +++ b/drivers/mmc/host/sdhci-of-at91.c
> > @@ -158,9 +158,17 @@ static const struct sdhci_at91_soc_data soc_data_sam9x60 = {
> >       .divider_for_baseclk = 2,
> >  };
> >
> > +static const struct sdhci_at91_soc_data soc_data_lan969x = {
> > +     .pdata = &sdhci_sama5d2_pdata,
> > +     .baseclk_is_generated_internally = true,
>
> Should be a comment here explaining the issue that needs
> keep_clks_on = true
>
> > +     .keep_clks_on = true,
> > +     .divider_for_baseclk = 2,
> > +};
> > +
> >  static const struct of_device_id sdhci_at91_dt_match[] = {
> >       { .compatible = "atmel,sama5d2-sdhci", .data = &soc_data_sama5d2 },
> >       { .compatible = "microchip,sam9x60-sdhci", .data = &soc_data_sam9x60 },
> > +     { .compatible = "microchip,lan9691-sdhci", .data = &soc_data_lan969x },
> >       {}
> >  };
> >  MODULE_DEVICE_TABLE(of, sdhci_at91_dt_match);
>


-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura d.d.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko at sartura.hr
Web: www.sartura.hr



More information about the linux-arm-kernel mailing list