Re: [PATCH v2 2/7] mfd: axp20x: Add support for the AXP2101

From: Olivier Louvignes

Date: Sat Dec 05 2026 - 10:36:30 EST


Hi Chen-Yu,

On Fri, Dec 04, 2026 at 12:57:10AM +0900, Chen-Yu Tsai wrote:
> So I actually found datasheets: https://github.com/eggfly/AXP2101
>
> And there are two variants, a linear charge and a SW charge. So
> first you need to say which variant you are targeting.

Thanks for finding them. The R1 has the linear charge one: register 0x86
(DCDC5's voltage, absent from the SW charge datasheet) holds its default
0x13 and reads back what is written to it. v3 targets that variant and
says so, in the cover letter and in this patch's commit message. The SW
charge variant has no DCDC5 and charges up to 1.5 A, so it would need
its own regulator and charger tables; it is not handled.

The whole series is now checked against the V1.0 datasheet. That also
fixed DLDO1's maximum (3.3 V, not 3.4 V) in the regulator patch, and
capped the termination and precharge currents at 200 mA in the battery
patch.

>> + regmap_reg_range(AXP2101_IRQ0_EN, AXP2101_IRQ2_STATE),
>
> There are holes in this range.
[...]
> And this one. Please split them.

Split in v3, both of them and the others with holes.

> Missing AXP2101_COMM_CFG, AXP2101_GAUGE_RESET, AXP2101_WDT_CTRL, and
> AXP2101_SLEEP_WAKEUP.

Added.

> Please stick with one ordering for all the objects you add.
>
> Either it's between AXP8xx and AXP15060, or just before AXP717.

Between AXP8xx and AXP15060 for everything, in axp20x.h too.

>> +#define AXP2101_TTE_H 0xa6
>> +#define AXP2101_TTF_L 0xa9
>
> Datasheet does not have these registers.

Dropped, and DCDC_MODE_CTRL (0x87) with them, which isn't in the
datasheet either.

v3 follows.

Thanks,
Olivier