Skip to content

Commit dae9750

Browse files
xry111Bartosz Golaszewski
authored andcommitted
gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE
The manuals of 2K2000 says both BIT_CTRL_MODE and BYTE_CTRL_MODE are supported but the latter is recommended. Also on 2K3000, per the ACPI DSDT the GPIO controller is compatible with 2K2000, but it fails to operate GPIOs 62 and 63 (and maybe others) using BIT_CTRL_MODE. Using BYTE_CTRL_MODE also makes those 2K3000 GPIOs work. Fixes: 3feb70a ("gpio: loongson: add more gpio chip support") Cc: stable@vger.kernel.org Signed-off-by: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Link: https://lore.kernel.org/r/20251128075033.255821-1-xry111@xry111.site Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent f01c0f7 commit dae9750

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/gpio/gpio-loongson-64bit.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,11 @@ static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data0 = {
408408

409409
static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data1 = {
410410
.label = "ls2k2000_gpio",
411-
.mode = BIT_CTRL_MODE,
412-
.conf_offset = 0x0,
413-
.in_offset = 0x20,
414-
.out_offset = 0x10,
415-
.inten_offset = 0x30,
411+
.mode = BYTE_CTRL_MODE,
412+
.conf_offset = 0x800,
413+
.in_offset = 0xa00,
414+
.out_offset = 0x900,
415+
.inten_offset = 0xb00,
416416
};
417417

418418
static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data2 = {

0 commit comments

Comments
 (0)