karo: tx6: fix out of range CORE_VDD
authorLothar Waßmann <LW@KARO-electronics.de>
Tue, 16 Jun 2020 07:01:50 +0000 (09:01 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 16 Jun 2020 08:18:52 +0000 (10:18 +0200)
Due to a buggy handling of the register mask in the RN5T567 PMIC code,
the core voltage would be set to 2.1V instead of 1.3V.

board/karo/tx6/rn5t567.c

index 7e159c0..45cc87e 100644 (file)
@@ -37,7 +37,7 @@ static int rn5t567_setup_regs(uchar slave_addr, struct pmic_regs *r,
                                __func__, r->addr, ret);
                        return ret;
                }
-               newval = (value & ~r->mask) | r->val;
+               newval = (value & r->mask) | r->val;
 #ifdef DEBUG
                if (value != newval) {
                        printf("Changing PMIC reg %02x from %02x to %02x\n",