On 06/04/2023 19:18, Cristian Ciocaltea wrote: > Extend the existing fan53555 driver to support the Rockchip RK860X > regulators. > > RK8600/RK8601 are pretty similar to the FAN53555 regulators. > > RK8602/RK8603 are a bit different, having a wider output voltage > selection range, from 0.5 V to 1.5 V in 6.25 mV steps. They also use > additional VSEL0/VSEL1 registers for the voltage selector, but the > enable and mode bits are still located in the original FAN53555 specific > VSEL0/VSEL1 registers. > > Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx> > --- > drivers/regulator/fan53555.c | 121 ++++++++++++++++++++++++++++++++++- > 1 file changed, 118 insertions(+), 3 deletions(-) > > diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c > index acf14ba7aaa6..130f3dbe9840 100644 > --- a/drivers/regulator/fan53555.c > +++ b/drivers/regulator/fan53555.c > @@ -26,6 +26,9 @@ > #define FAN53555_VSEL0 0x00 > #define FAN53555_VSEL1 0x01 > > +#define RK8602_VSEL0 0x06 > +#define RK8602_VSEL1 0x07 > + > #define TCS4525_VSEL0 0x11 > #define TCS4525_VSEL1 0x10 > #define TCS4525_TIME 0x13 > @@ -55,6 +58,7 @@ > > #define FAN53555_NVOLTAGES 64 /* Numbers of voltages */ > #define FAN53526_NVOLTAGES 128 > +#define RK8602_NVOLTAGES 160 > > #define TCS_VSEL0_MODE BIT(7) > #define TCS_VSEL1_MODE BIT(6) > @@ -64,6 +68,8 @@ > enum fan53555_vendor { > FAN53526_VENDOR_FAIRCHILD = 0, > FAN53555_VENDOR_FAIRCHILD, > + FAN53555_VENDOR_ROCKCHIP, /* RK8600, RK8601 */ > + RK8602_VENDOR_ROCKCHIP, /* RK8602, RK8603 */ Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> Best regards, Krzysztof