[BUG] pinctrl: mt7981: some obviously incorrect register maps
From: Shiji Yang <hidden>
Date: 2026-01-03 09:28:45
Also in:
linux-gpio, linux-mediatek, lkml
From: Shiji Yang <hidden>
Date: 2026-01-03 09:28:45
Also in:
linux-gpio, linux-mediatek, lkml
Hi, In 'drivers/pinctrl/mediatek/pinctrl-mt7981.c', I noticed that some register map definitions are clearly incorrect because the same bits are used to control different pin functions. I think these are obvious copy && paste issues. Perhaps there are more wrong PIN_FIELD_BASE definitions than what I've found here. If you have relevant programming guide documents, please help check and fix them.
static const struct mtk_pin_field_calc mt7981_pin_ies_range[] = {
PIN_FIELD_BASE(11, 11, 5, 0x40, 0x10, 10, 1), // regmap overlap
};
static const struct mtk_pin_field_calc mt7981_pin_smt_range[] = {
PIN_FIELD_BASE(44, 44, 7, 0x30, 0x10, 8, 1), // regmap overlap
};
static const struct mtk_pin_field_calc mt7981_pin_drv_range[] = {
PIN_FIELD_BASE(3, 3, 4, 0x00, 0x10, 18, 1), // ? need check
PIN_FIELD_BASE(11, 11, 5, 0x00, 0x10, 0, 3), // regmap overlap
PIN_FIELD_BASE(13, 13, 5, 0x00, 0x10, 3, 3), // regmap overlap
PIN_FIELD_BASE(15, 15, 2, 0x00, 0x10, 0, 3), // regmap overlap
PIN_FIELD_BASE(34, 34, 4, 0x00, 0x10, 15, 3), // ? need check
};
static const struct mtk_pin_field_calc mt7981_pin_pupd_range[] = {
PIN_FIELD_BASE(20, 20, 2, 0x90, 0x10, 3, 1), // regmap overlap
};
Regards, Shiji Yang