soc: mediatek: mtk-svs: Subtract offset from regs_v2 to avoid conflict

The svs_regs_v2 array of registers was offsetted by 0xc00 because the
SVS node was supposed to have the same iostart as the thermal sensors.
That's wrong for two reasons:
 1. Two different devices cannot have the same iostart in devicetree,
    as those would technically be the same device otherwise; and
 2. SVS and Thermal Sensor (be it LVTS or AUXADC thermal) are not the
    same IP, and those two do obviously have a different iospace.

Even though there already are users of this register array, the only
one that declares a devicetree node for SVS is MT8183 - but it never
actually worked because the "tzts1" thermal zone missed thermal trips,
hence this driver's probe always failed on that SoC.

Knowing this - it is safe to say that keeping compatibility with older
device trees is pointless, hence simply subtract the 0xc00 offset from
the register offset array.

Link: https://lore.kernel.org/r/20231121125044.78642-3-angelogioacchino.delregno@collabora.comSigned-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
parent 27222a77
...@@ -256,60 +256,60 @@ enum svs_reg_index { ...@@ -256,60 +256,60 @@ enum svs_reg_index {
}; };
static const u32 svs_regs_v2[] = { static const u32 svs_regs_v2[] = {
[DESCHAR] = 0xc00, [DESCHAR] = 0x00,
[TEMPCHAR] = 0xc04, [TEMPCHAR] = 0x04,
[DETCHAR] = 0xc08, [DETCHAR] = 0x08,
[AGECHAR] = 0xc0c, [AGECHAR] = 0x0c,
[DCCONFIG] = 0xc10, [DCCONFIG] = 0x10,
[AGECONFIG] = 0xc14, [AGECONFIG] = 0x14,
[FREQPCT30] = 0xc18, [FREQPCT30] = 0x18,
[FREQPCT74] = 0xc1c, [FREQPCT74] = 0x1c,
[LIMITVALS] = 0xc20, [LIMITVALS] = 0x20,
[VBOOT] = 0xc24, [VBOOT] = 0x24,
[DETWINDOW] = 0xc28, [DETWINDOW] = 0x28,
[CONFIG] = 0xc2c, [CONFIG] = 0x2c,
[TSCALCS] = 0xc30, [TSCALCS] = 0x30,
[RUNCONFIG] = 0xc34, [RUNCONFIG] = 0x34,
[SVSEN] = 0xc38, [SVSEN] = 0x38,
[INIT2VALS] = 0xc3c, [INIT2VALS] = 0x3c,
[DCVALUES] = 0xc40, [DCVALUES] = 0x40,
[AGEVALUES] = 0xc44, [AGEVALUES] = 0x44,
[VOP30] = 0xc48, [VOP30] = 0x48,
[VOP74] = 0xc4c, [VOP74] = 0x4c,
[TEMP] = 0xc50, [TEMP] = 0x50,
[INTSTS] = 0xc54, [INTSTS] = 0x54,
[INTSTSRAW] = 0xc58, [INTSTSRAW] = 0x58,
[INTEN] = 0xc5c, [INTEN] = 0x5c,
[CHKINT] = 0xc60, [CHKINT] = 0x60,
[CHKSHIFT] = 0xc64, [CHKSHIFT] = 0x64,
[STATUS] = 0xc68, [STATUS] = 0x68,
[VDESIGN30] = 0xc6c, [VDESIGN30] = 0x6c,
[VDESIGN74] = 0xc70, [VDESIGN74] = 0x70,
[DVT30] = 0xc74, [DVT30] = 0x74,
[DVT74] = 0xc78, [DVT74] = 0x78,
[AGECOUNT] = 0xc7c, [AGECOUNT] = 0x7c,
[SMSTATE0] = 0xc80, [SMSTATE0] = 0x80,
[SMSTATE1] = 0xc84, [SMSTATE1] = 0x84,
[CTL0] = 0xc88, [CTL0] = 0x88,
[DESDETSEC] = 0xce0, [DESDETSEC] = 0xe0,
[TEMPAGESEC] = 0xce4, [TEMPAGESEC] = 0xe4,
[CTRLSPARE0] = 0xcf0, [CTRLSPARE0] = 0xf0,
[CTRLSPARE1] = 0xcf4, [CTRLSPARE1] = 0xf4,
[CTRLSPARE2] = 0xcf8, [CTRLSPARE2] = 0xf8,
[CTRLSPARE3] = 0xcfc, [CTRLSPARE3] = 0xfc,
[CORESEL] = 0xf00, [CORESEL] = 0x300,
[THERMINTST] = 0xf04, [THERMINTST] = 0x304,
[INTST] = 0xf08, [INTST] = 0x308,
[THSTAGE0ST] = 0xf0c, [THSTAGE0ST] = 0x30c,
[THSTAGE1ST] = 0xf10, [THSTAGE1ST] = 0x310,
[THSTAGE2ST] = 0xf14, [THSTAGE2ST] = 0x314,
[THAHBST0] = 0xf18, [THAHBST0] = 0x318,
[THAHBST1] = 0xf1c, [THAHBST1] = 0x31c,
[SPARE0] = 0xf20, [SPARE0] = 0x320,
[SPARE1] = 0xf24, [SPARE1] = 0x324,
[SPARE2] = 0xf28, [SPARE2] = 0x328,
[SPARE3] = 0xf2c, [SPARE3] = 0x32c,
[THSLPEVEB] = 0xf30, [THSLPEVEB] = 0x330,
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment