ath25: switch default kernel to 5.15
[openwrt/staging/ldir.git] / target / linux / bcm47xx / patches-5.10 / 130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
2 Date: Mon, 27 Feb 2023 07:44:38 +0100
3 Subject: [PATCH] MIPS: BCM47XX: Add support for Huawei B593u-12
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7
8 It's a BCM5358 based home router. One of very few bcm47xx devices with
9 cellular modems (here: LTE).
10
11 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
12 ---
13 arch/mips/bcm47xx/board.c | 1 +
14 arch/mips/bcm47xx/leds.c | 8 ++++++++
15 arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
16 3 files changed, 10 insertions(+)
17
18 --- a/arch/mips/bcm47xx/board.c
19 +++ b/arch/mips/bcm47xx/board.c
20 @@ -193,6 +193,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
21 /* boardtype, boardnum, boardrev */
22 static const
23 struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = {
24 + {{BCM47XX_BOARD_HUAWEI_B593U_12, "Huawei B593u-12"}, "0x053d", "1234", "0x1301"},
25 {{BCM47XX_BOARD_HUAWEI_E970, "Huawei E970"}, "0x048e", "0x5347", "0x11"},
26 {{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
27 {{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
28 --- a/arch/mips/bcm47xx/leds.c
29 +++ b/arch/mips/bcm47xx/leds.c
30 @@ -223,6 +223,11 @@ bcm47xx_leds_dlink_dir330[] __initconst
31 /* Huawei */
32
33 static const struct gpio_led
34 +bcm47xx_leds_huawei_b593u_12[] __initconst = {
35 + BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
36 +};
37 +
38 +static const struct gpio_led
39 bcm47xx_leds_huawei_e970[] __initconst = {
40 BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
41 };
42 @@ -672,6 +677,9 @@ void __init bcm47xx_leds_register(void)
43 bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330);
44 break;
45
46 + case BCM47XX_BOARD_HUAWEI_B593U_12:
47 + bcm47xx_set_pdata(bcm47xx_leds_huawei_b593u_12);
48 + break;
49 case BCM47XX_BOARD_HUAWEI_E970:
50 bcm47xx_set_pdata(bcm47xx_leds_huawei_e970);
51 break;
52 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
53 +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
54 @@ -53,6 +53,7 @@ enum bcm47xx_board {
55 BCM47XX_BOARD_DLINK_DIR130,
56 BCM47XX_BOARD_DLINK_DIR330,
57
58 + BCM47XX_BOARD_HUAWEI_B593U_12,
59 BCM47XX_BOARD_HUAWEI_E970,
60
61 BCM47XX_BOARD_LINKSYS_E900V1,