Fix a rk356x pinctrl register offset

The pull-up/pull-down register offset was wrong on the Rockchip rk356x.
It was set such that the driver would modify the IOMUX control registers.

This seems to work with the current device tree files, but fails with
upstream files. Fix the offset so the later calculation has the correct
offset for the pull-up/pull-down control register.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Andrew Turner 2022-11-11 08:25:57 +00:00
parent 3d98e253fe
commit 9142f3a885

View file

@ -929,7 +929,14 @@ static uint32_t
rk3568_get_pd_offset(struct rk_pinctrl_softc *sc, uint32_t bank)
{
return (0);
if (bank == 0)
return (0x20);
/*
* Registers start at 0x80, but bank index starts at 1. Return 0x70
* so later calculations get the correct offset.
*/
return (0x70);
}
static struct syscon *