From: Rafał Miłecki Date: Mon, 27 Feb 2023 07:44:12 +0000 (+0000) Subject: bcm47xx: add pending devices support X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=84576368689cef5491a34eb76ae2a1dfd2a0a3ba;p=openwrt%2Fstaging%2Fdangole.git bcm47xx: add pending devices support This includes Lines E2500 V2 and Huawei B593u-12. Signed-off-by: Rafał Miłecki --- diff --git a/target/linux/bcm47xx/patches-5.10/032-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch b/target/linux/bcm47xx/patches-5.10/032-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch new file mode 100644 index 0000000000..4faecdc7d5 --- /dev/null +++ b/target/linux/bcm47xx/patches-5.10/032-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch @@ -0,0 +1,65 @@ +From fc605b914167de75432c3b5aae239fb191e84a31 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 8 Feb 2023 08:03:01 +0100 +Subject: [PATCH] MIPS: BCM47XX: Add support for Linksys E2500 V3 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's a BCM5358 based home WiFi router. 16 MiB flash, 64 MiB RAM, BCM5325 +switch, on-SoC 802.11n radio. + +Signed-off-by: Rafał Miłecki +Reviewed-by: Florian Fainelli +Signed-off-by: Thomas Bogendoerfer +--- + arch/mips/bcm47xx/board.c | 1 + + arch/mips/bcm47xx/buttons.c | 9 +++++++++ + arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 + + 3 files changed, 11 insertions(+) + +--- a/arch/mips/bcm47xx/board.c ++++ b/arch/mips/bcm47xx/board.c +@@ -130,6 +130,7 @@ struct bcm47xx_board_type_list2 bcm47xx_ + {{BCM47XX_BOARD_LINKSYS_E1000V21, "Linksys E1000 V2.1"}, "E1000", "2.1"}, + {{BCM47XX_BOARD_LINKSYS_E1200V2, "Linksys E1200 V2"}, "E1200", "2.0"}, + {{BCM47XX_BOARD_LINKSYS_E2000V1, "Linksys E2000 V1"}, "Linksys E2000", "1.0"}, ++ {{BCM47XX_BOARD_LINKSYS_E2500V3, "Linksys E2500 V3"}, "E2500", "1.0"}, + /* like WRT610N v2.0 */ + {{BCM47XX_BOARD_LINKSYS_E3000V1, "Linksys E3000 V1"}, "E300", "1.0"}, + {{BCM47XX_BOARD_LINKSYS_E3200V1, "Linksys E3200 V1"}, "E3200", "1.0"}, +--- a/arch/mips/bcm47xx/buttons.c ++++ b/arch/mips/bcm47xx/buttons.c +@@ -223,6 +223,12 @@ bcm47xx_buttons_linksys_e2000v1[] __init + }; + + static const struct gpio_keys_button ++bcm47xx_buttons_linksys_e2500v3[] __initconst = { ++ BCM47XX_GPIO_KEY(9, KEY_WPS_BUTTON), ++ BCM47XX_GPIO_KEY(10, KEY_RESTART), ++}; ++ ++static const struct gpio_keys_button + bcm47xx_buttons_linksys_e3000v1[] __initconst = { + BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON), + BCM47XX_GPIO_KEY(6, KEY_RESTART), +@@ -617,6 +623,9 @@ int __init bcm47xx_buttons_register(void + case BCM47XX_BOARD_LINKSYS_E2000V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2000v1); + break; ++ case BCM47XX_BOARD_LINKSYS_E2500V3: ++ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2500v3); ++ break; + case BCM47XX_BOARD_LINKSYS_E3000V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e3000v1); + break; +--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h ++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +@@ -61,6 +61,7 @@ enum bcm47xx_board { + BCM47XX_BOARD_LINKSYS_E1000V21, + BCM47XX_BOARD_LINKSYS_E1200V2, + BCM47XX_BOARD_LINKSYS_E2000V1, ++ BCM47XX_BOARD_LINKSYS_E2500V3, + BCM47XX_BOARD_LINKSYS_E3000V1, + BCM47XX_BOARD_LINKSYS_E3200V1, + BCM47XX_BOARD_LINKSYS_E4200V1, diff --git a/target/linux/bcm47xx/patches-5.10/130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch b/target/linux/bcm47xx/patches-5.10/130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch new file mode 100644 index 0000000000..333c3d7b87 --- /dev/null +++ b/target/linux/bcm47xx/patches-5.10/130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch @@ -0,0 +1,61 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 27 Feb 2023 07:44:38 +0100 +Subject: [PATCH] MIPS: BCM47XX: Add support for Huawei B593u-12 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's a BCM5358 based home router. One of very few bcm47xx devices with +cellular modems (here: LTE). + +Signed-off-by: Rafał Miłecki +--- + arch/mips/bcm47xx/board.c | 1 + + arch/mips/bcm47xx/leds.c | 8 ++++++++ + arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 + + 3 files changed, 10 insertions(+) + +--- a/arch/mips/bcm47xx/board.c ++++ b/arch/mips/bcm47xx/board.c +@@ -193,6 +193,7 @@ struct bcm47xx_board_type_list1 bcm47xx_ + /* boardtype, boardnum, boardrev */ + static const + struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = { ++ {{BCM47XX_BOARD_HUAWEI_B593U_12, "Huawei B593u-12"}, "0x053d", "1234", "0x1301"}, + {{BCM47XX_BOARD_HUAWEI_E970, "Huawei E970"}, "0x048e", "0x5347", "0x11"}, + {{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"}, + {{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"}, +--- a/arch/mips/bcm47xx/leds.c ++++ b/arch/mips/bcm47xx/leds.c +@@ -223,6 +223,11 @@ bcm47xx_leds_dlink_dir330[] __initconst + /* Huawei */ + + static const struct gpio_led ++bcm47xx_leds_huawei_b593u_12[] __initconst = { ++ BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), ++}; ++ ++static const struct gpio_led + bcm47xx_leds_huawei_e970[] __initconst = { + BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), + }; +@@ -672,6 +677,9 @@ void __init bcm47xx_leds_register(void) + bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330); + break; + ++ case BCM47XX_BOARD_HUAWEI_B593U_12: ++ bcm47xx_set_pdata(bcm47xx_leds_huawei_b593u_12); ++ break; + case BCM47XX_BOARD_HUAWEI_E970: + bcm47xx_set_pdata(bcm47xx_leds_huawei_e970); + break; +--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h ++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +@@ -53,6 +53,7 @@ enum bcm47xx_board { + BCM47XX_BOARD_DLINK_DIR130, + BCM47XX_BOARD_DLINK_DIR330, + ++ BCM47XX_BOARD_HUAWEI_B593U_12, + BCM47XX_BOARD_HUAWEI_E970, + + BCM47XX_BOARD_LINKSYS_E900V1, diff --git a/target/linux/bcm47xx/patches-5.15/032-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch b/target/linux/bcm47xx/patches-5.15/032-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch new file mode 100644 index 0000000000..4faecdc7d5 --- /dev/null +++ b/target/linux/bcm47xx/patches-5.15/032-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch @@ -0,0 +1,65 @@ +From fc605b914167de75432c3b5aae239fb191e84a31 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 8 Feb 2023 08:03:01 +0100 +Subject: [PATCH] MIPS: BCM47XX: Add support for Linksys E2500 V3 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's a BCM5358 based home WiFi router. 16 MiB flash, 64 MiB RAM, BCM5325 +switch, on-SoC 802.11n radio. + +Signed-off-by: Rafał Miłecki +Reviewed-by: Florian Fainelli +Signed-off-by: Thomas Bogendoerfer +--- + arch/mips/bcm47xx/board.c | 1 + + arch/mips/bcm47xx/buttons.c | 9 +++++++++ + arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 + + 3 files changed, 11 insertions(+) + +--- a/arch/mips/bcm47xx/board.c ++++ b/arch/mips/bcm47xx/board.c +@@ -130,6 +130,7 @@ struct bcm47xx_board_type_list2 bcm47xx_ + {{BCM47XX_BOARD_LINKSYS_E1000V21, "Linksys E1000 V2.1"}, "E1000", "2.1"}, + {{BCM47XX_BOARD_LINKSYS_E1200V2, "Linksys E1200 V2"}, "E1200", "2.0"}, + {{BCM47XX_BOARD_LINKSYS_E2000V1, "Linksys E2000 V1"}, "Linksys E2000", "1.0"}, ++ {{BCM47XX_BOARD_LINKSYS_E2500V3, "Linksys E2500 V3"}, "E2500", "1.0"}, + /* like WRT610N v2.0 */ + {{BCM47XX_BOARD_LINKSYS_E3000V1, "Linksys E3000 V1"}, "E300", "1.0"}, + {{BCM47XX_BOARD_LINKSYS_E3200V1, "Linksys E3200 V1"}, "E3200", "1.0"}, +--- a/arch/mips/bcm47xx/buttons.c ++++ b/arch/mips/bcm47xx/buttons.c +@@ -223,6 +223,12 @@ bcm47xx_buttons_linksys_e2000v1[] __init + }; + + static const struct gpio_keys_button ++bcm47xx_buttons_linksys_e2500v3[] __initconst = { ++ BCM47XX_GPIO_KEY(9, KEY_WPS_BUTTON), ++ BCM47XX_GPIO_KEY(10, KEY_RESTART), ++}; ++ ++static const struct gpio_keys_button + bcm47xx_buttons_linksys_e3000v1[] __initconst = { + BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON), + BCM47XX_GPIO_KEY(6, KEY_RESTART), +@@ -617,6 +623,9 @@ int __init bcm47xx_buttons_register(void + case BCM47XX_BOARD_LINKSYS_E2000V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2000v1); + break; ++ case BCM47XX_BOARD_LINKSYS_E2500V3: ++ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2500v3); ++ break; + case BCM47XX_BOARD_LINKSYS_E3000V1: + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e3000v1); + break; +--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h ++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +@@ -61,6 +61,7 @@ enum bcm47xx_board { + BCM47XX_BOARD_LINKSYS_E1000V21, + BCM47XX_BOARD_LINKSYS_E1200V2, + BCM47XX_BOARD_LINKSYS_E2000V1, ++ BCM47XX_BOARD_LINKSYS_E2500V3, + BCM47XX_BOARD_LINKSYS_E3000V1, + BCM47XX_BOARD_LINKSYS_E3200V1, + BCM47XX_BOARD_LINKSYS_E4200V1, diff --git a/target/linux/bcm47xx/patches-5.15/130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch b/target/linux/bcm47xx/patches-5.15/130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch new file mode 100644 index 0000000000..333c3d7b87 --- /dev/null +++ b/target/linux/bcm47xx/patches-5.15/130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch @@ -0,0 +1,61 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 27 Feb 2023 07:44:38 +0100 +Subject: [PATCH] MIPS: BCM47XX: Add support for Huawei B593u-12 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's a BCM5358 based home router. One of very few bcm47xx devices with +cellular modems (here: LTE). + +Signed-off-by: Rafał Miłecki +--- + arch/mips/bcm47xx/board.c | 1 + + arch/mips/bcm47xx/leds.c | 8 ++++++++ + arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 + + 3 files changed, 10 insertions(+) + +--- a/arch/mips/bcm47xx/board.c ++++ b/arch/mips/bcm47xx/board.c +@@ -193,6 +193,7 @@ struct bcm47xx_board_type_list1 bcm47xx_ + /* boardtype, boardnum, boardrev */ + static const + struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = { ++ {{BCM47XX_BOARD_HUAWEI_B593U_12, "Huawei B593u-12"}, "0x053d", "1234", "0x1301"}, + {{BCM47XX_BOARD_HUAWEI_E970, "Huawei E970"}, "0x048e", "0x5347", "0x11"}, + {{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"}, + {{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"}, +--- a/arch/mips/bcm47xx/leds.c ++++ b/arch/mips/bcm47xx/leds.c +@@ -223,6 +223,11 @@ bcm47xx_leds_dlink_dir330[] __initconst + /* Huawei */ + + static const struct gpio_led ++bcm47xx_leds_huawei_b593u_12[] __initconst = { ++ BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), ++}; ++ ++static const struct gpio_led + bcm47xx_leds_huawei_e970[] __initconst = { + BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF), + }; +@@ -672,6 +677,9 @@ void __init bcm47xx_leds_register(void) + bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330); + break; + ++ case BCM47XX_BOARD_HUAWEI_B593U_12: ++ bcm47xx_set_pdata(bcm47xx_leds_huawei_b593u_12); ++ break; + case BCM47XX_BOARD_HUAWEI_E970: + bcm47xx_set_pdata(bcm47xx_leds_huawei_e970); + break; +--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h ++++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +@@ -53,6 +53,7 @@ enum bcm47xx_board { + BCM47XX_BOARD_DLINK_DIR130, + BCM47XX_BOARD_DLINK_DIR330, + ++ BCM47XX_BOARD_HUAWEI_B593U_12, + BCM47XX_BOARD_HUAWEI_E970, + + BCM47XX_BOARD_LINKSYS_E900V1,