2
0

030-v6.3-MIPS-BCM47XX-Add-support-for-Linksys-E2500-V3.patch 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. From fc605b914167de75432c3b5aae239fb191e84a31 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  3. Date: Wed, 8 Feb 2023 08:03:01 +0100
  4. Subject: [PATCH] MIPS: BCM47XX: Add support for Linksys E2500 V3
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. It's a BCM5358 based home WiFi router. 16 MiB flash, 64 MiB RAM, BCM5325
  9. switch, on-SoC 802.11n radio.
  10. Signed-off-by: Rafał Miłecki <[email protected]>
  11. Reviewed-by: Florian Fainelli <[email protected]>
  12. Signed-off-by: Thomas Bogendoerfer <[email protected]>
  13. ---
  14. arch/mips/bcm47xx/board.c | 1 +
  15. arch/mips/bcm47xx/buttons.c | 9 +++++++++
  16. arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
  17. 3 files changed, 11 insertions(+)
  18. --- a/arch/mips/bcm47xx/board.c
  19. +++ b/arch/mips/bcm47xx/board.c
  20. @@ -130,6 +130,7 @@ struct bcm47xx_board_type_list2 bcm47xx_
  21. {{BCM47XX_BOARD_LINKSYS_E1000V21, "Linksys E1000 V2.1"}, "E1000", "2.1"},
  22. {{BCM47XX_BOARD_LINKSYS_E1200V2, "Linksys E1200 V2"}, "E1200", "2.0"},
  23. {{BCM47XX_BOARD_LINKSYS_E2000V1, "Linksys E2000 V1"}, "Linksys E2000", "1.0"},
  24. + {{BCM47XX_BOARD_LINKSYS_E2500V3, "Linksys E2500 V3"}, "E2500", "1.0"},
  25. /* like WRT610N v2.0 */
  26. {{BCM47XX_BOARD_LINKSYS_E3000V1, "Linksys E3000 V1"}, "E300", "1.0"},
  27. {{BCM47XX_BOARD_LINKSYS_E3200V1, "Linksys E3200 V1"}, "E3200", "1.0"},
  28. --- a/arch/mips/bcm47xx/buttons.c
  29. +++ b/arch/mips/bcm47xx/buttons.c
  30. @@ -223,6 +223,12 @@ bcm47xx_buttons_linksys_e2000v1[] __init
  31. };
  32. static const struct gpio_keys_button
  33. +bcm47xx_buttons_linksys_e2500v3[] __initconst = {
  34. + BCM47XX_GPIO_KEY(9, KEY_WPS_BUTTON),
  35. + BCM47XX_GPIO_KEY(10, KEY_RESTART),
  36. +};
  37. +
  38. +static const struct gpio_keys_button
  39. bcm47xx_buttons_linksys_e3000v1[] __initconst = {
  40. BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
  41. BCM47XX_GPIO_KEY(6, KEY_RESTART),
  42. @@ -617,6 +623,9 @@ int __init bcm47xx_buttons_register(void
  43. case BCM47XX_BOARD_LINKSYS_E2000V1:
  44. err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2000v1);
  45. break;
  46. + case BCM47XX_BOARD_LINKSYS_E2500V3:
  47. + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2500v3);
  48. + break;
  49. case BCM47XX_BOARD_LINKSYS_E3000V1:
  50. err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e3000v1);
  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. @@ -61,6 +61,7 @@ enum bcm47xx_board {
  55. BCM47XX_BOARD_LINKSYS_E1000V21,
  56. BCM47XX_BOARD_LINKSYS_E1200V2,
  57. BCM47XX_BOARD_LINKSYS_E2000V1,
  58. + BCM47XX_BOARD_LINKSYS_E2500V3,
  59. BCM47XX_BOARD_LINKSYS_E3000V1,
  60. BCM47XX_BOARD_LINKSYS_E3200V1,
  61. BCM47XX_BOARD_LINKSYS_E4200V1,