[PATCH v2 0/8] power: pmic: mtk-pwrap: add more capability flags
Peng Fan
peng.fan at oss.nxp.com
Wed Apr 29 04:18:38 CEST 2026
On Mon, Apr 27, 2026 at 06:15:55PM -0500, David Lechner wrote:
>On 4/9/26 3:30 PM, David Lechner wrote:
>> After using the mtk-pwrap driver a bit, we noticed that there were a few
>> places where it was writing to registers that were not defined on all
>> platforms. The undefined registers are treated as 0, which is the DONE2
>> register on the affected platforms. This could cause the DONE2 register
>> to have an incorrect value, which could cause Linux to re-initialize the
>> PMIC unnecessarily.
>>
>> To avoid this issue and ensure that we only write to registers that are
>> defined on a given platform, we can add some more capability flags to
>> conditionally call any register writes that aren't common to all
>> platforms.
>>
>> There are also a couple of other cleanups that we do along the way. And
>> in v2, I've picked up Julien's patch to add support for MT8195 and
>> rebased on top of this.
>>
>> Signed-off-by: David Lechner <dlechner at baylibre.com>
>> ---
>> Changes in v2:
>> - Use EOPNOTSUPP.
>> - Reorder patches to reduce churn.
>> - Added new patch to fix driver description comment.
>> - Added new patch to drop chip type enum.
>> - Picked up Julien's patches from [1] and rebased on these changes.
>> - Link to [1]: https://lore.kernel.org/u-boot/20260317-mt8195-add-ufs-support-v1-0-7d731ec438ae@baylibre.com/
>> - Link to v1: https://patch.msgid.link/20260327-mtk-pmic-fixes-v1-0-ef874ca82409@baylibre.com
>>
>> ---
>> David Lechner (6):
>> power: pmic: mtk-pwrap: fix file description
>> power: pmic: mtk-pwrap: add PWRAP_CAP_WDT_SRC flag
>> power: pmic: mtk-pwrap: add init capability flag
>> power: pmic: mtk-pwrap: drop PWRAP_SLV_CAP_DUALIO on mt6359
>> power: pmic: mtk-pwrap: remove interrupt related code
>> power: pmic: mtk-pwrap: use pmic compatible to select child info
>>
>> Julien Stephan (2):
>> power: pmic: mtk-pwrap: use tabs for alignment
>> power: pmic: mtk-pwrap: add MT8195 support
>>
>> drivers/power/pmic/mtk-pwrap.c | 115 +++++++++++++++++++++--------------------
>> 1 file changed, 60 insertions(+), 55 deletions(-)
>> ---
>> base-commit: 2a1bcefce835b827bbf88a9e112d646c5c4af9c1
>> change-id: 20260317-mtk-pmic-fixes-c1523b1b0dad
>>
>> Best regards,
>> --
>> David Lechner <dlechner at baylibre.com>
>>
>
>Hi Jaehoon,
>
>Is it OK if I take this through the MediaTek tree? We need to
>pick this up for v2026.07 to make sure the boards we added recently
>are working correctly.
>
Feel free to take it through MTK tree.
Regards
Peng.
More information about the U-Boot
mailing list