130-MIPS-BCM47XX-Add-support-for-Huawei-B593u-12.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  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. It's a BCM5358 based home router. One of very few bcm47xx devices with
  8. cellular modems (here: LTE).
  9. Signed-off-by: Rafał Miłecki <[email protected]>
  10. ---
  11. arch/mips/bcm47xx/board.c | 1 +
  12. arch/mips/bcm47xx/leds.c | 8 ++++++++
  13. arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
  14. 3 files changed, 10 insertions(+)
  15. --- a/arch/mips/bcm47xx/board.c
  16. +++ b/arch/mips/bcm47xx/board.c
  17. @@ -193,6 +193,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
  18. /* boardtype, boardnum, boardrev */
  19. static const
  20. struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = {
  21. + {{BCM47XX_BOARD_HUAWEI_B593U_12, "Huawei B593u-12"}, "0x053d", "1234", "0x1301"},
  22. {{BCM47XX_BOARD_HUAWEI_E970, "Huawei E970"}, "0x048e", "0x5347", "0x11"},
  23. {{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
  24. {{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
  25. --- a/arch/mips/bcm47xx/leds.c
  26. +++ b/arch/mips/bcm47xx/leds.c
  27. @@ -223,6 +223,11 @@ bcm47xx_leds_dlink_dir330[] __initconst
  28. /* Huawei */
  29. static const struct gpio_led
  30. +bcm47xx_leds_huawei_b593u_12[] __initconst = {
  31. + BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
  32. +};
  33. +
  34. +static const struct gpio_led
  35. bcm47xx_leds_huawei_e970[] __initconst = {
  36. BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
  37. };
  38. @@ -672,6 +677,9 @@ void __init bcm47xx_leds_register(void)
  39. bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330);
  40. break;
  41. + case BCM47XX_BOARD_HUAWEI_B593U_12:
  42. + bcm47xx_set_pdata(bcm47xx_leds_huawei_b593u_12);
  43. + break;
  44. case BCM47XX_BOARD_HUAWEI_E970:
  45. bcm47xx_set_pdata(bcm47xx_leds_huawei_e970);
  46. break;
  47. --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
  48. +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
  49. @@ -53,6 +53,7 @@ enum bcm47xx_board {
  50. BCM47XX_BOARD_DLINK_DIR130,
  51. BCM47XX_BOARD_DLINK_DIR330,
  52. + BCM47XX_BOARD_HUAWEI_B593U_12,
  53. BCM47XX_BOARD_HUAWEI_E970,
  54. BCM47XX_BOARD_LINKSYS_E900V1,