[PATCH RFC 3/3] pinctrl: spacemit: k3: adjust drive strength and schmitter trigger
Troy Mitchell
troy.mitchell at linux.spacemit.com
Sun Dec 21 18:54:19 PST 2025
Hi Yixun,
On Sat, Dec 20, 2025 at 06:14:55PM +0800, Yixun Lan wrote:
> K3 SoC expand drive strength to 4 bits which support even larger
> settings table comparing to old SoC generation. Also schmitter trigger
> setting is changed to 1 bit.
>
> Signed-off-by: Yixun Lan <dlan at gentoo.org>
> ---
> drivers/pinctrl/spacemit/pinctrl-k1.c | 163 ++++++++++++++++++++++++----------
> 1 file changed, 116 insertions(+), 47 deletions(-)
>
> diff --git a/drivers/pinctrl/spacemit/pinctrl-k1.c b/drivers/pinctrl/spacemit/pinctrl-k1.c
> index 441817f539e3..8ca247fb8ba0 100644
> --- a/drivers/pinctrl/spacemit/pinctrl-k1.c
> +++ b/drivers/pinctrl/spacemit/pinctrl-k1.c
[...]
> - val = spacemit_get_driver_strength(type, drv_strength);
> + val = spacemit_get_driver_strength(type, dconf, drv_strength);
>
> - v &= ~PAD_DRIVE;
> - v |= FIELD_PREP(PAD_DRIVE, val);
> + v &= ~dconf->drive_mask;
> + v |= (arg << __ffs(dconf->drive_mask)) & dconf->drive_mask;
^^^^
use val here.
- Troy
More information about the linux-riscv
mailing list