Re: [PATCH] gpio: mvebu: use devm_clk_get_optional_enabled()
From: Rosen Penev
Date: Thu Jul 09 2026 - 18:34:51 EST
On Thu, Jul 9, 2026 at 6:28 AM Andrew Lunn <andrew@xxxxxxx> wrote:
>
> > So is the clock optional or is it not? The answer determines the correct
> > clk API to use.
>
> The Orion5x family does not have the clock. As far as i remember, all
> the other families using this driver do have the clock. And for this
> line of Marvell devices, if the clock exists, you need it ticking,
> otherwise the hardware just wedges if you access registers with the
> clock disabled.
I asked my LLM about this:
Compatible SoCs Has clocks in DTS?
marvell,orion-gpio Orion 5x, Dove, Kirkwood, Armada XP 98dx3236,
Armada 39x, Armada 375 Mixed - Kirkwood YES, Orion 5x/Dove NO,
98dx3236 NO, Armada 39x NO, Armada 375 NO
marvell,armada-370-g Armada 370, Armada 38x, Armada XP
(mv78230/60/460) Some have clocks, some don't
Not as simple as that looks like.
>
> Also, as far as i remember, the Orion5x family does not have the PWM
> extension to the GPIO controller. I don't remember the code well
> enough, but it is possible the missing clock check is dual purpose, it
> also detects an invalid DT when Orion5x has PWM properties when it
> should not?
>
> Andrew