Add BCM6318 to GPIO_MODE internal switch port leds setup.

As with BCM6368 the pinmux for the switch LEDs in BCM6318
is also lost when LEDE initializes the peripherals. Fix it.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcb...@gmail.com>
---
 ...rcm63xx-setup-pinctrl-for-internal-switch-leds-on-b.patch | 12 ++++++++----
 .../patches-4.4/403-6358-enet1-external-mii-clk.patch        |  2 +-
 ...13-BCM63XX-allow-providing-fixup-data-in-board-data.patch |  4 ++--
 .../418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch        |  2 +-
 .../patches-4.4/420-BCM63XX-add-endian-check-for-ath9k.patch |  2 +-
 .../patches-4.4/421-BCM63XX-add-led-pin-for-ath9k.patch      |  2 +-
 .../422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch         |  2 +-
 7 files changed, 15 insertions(+), 11 deletions(-)

diff --git 
a/target/linux/brcm63xx/patches-4.4/382-brcm63xx-setup-pinctrl-for-internal-switch-leds-on-b.patch
 
b/target/linux/brcm63xx/patches-4.4/382-brcm63xx-setup-pinctrl-for-internal-switch-leds-on-b.patch
index 83e1ddc..b89c8d1 100644
--- 
a/target/linux/brcm63xx/patches-4.4/382-brcm63xx-setup-pinctrl-for-internal-switch-leds-on-b.patch
+++ 
b/target/linux/brcm63xx/patches-4.4/382-brcm63xx-setup-pinctrl-for-internal-switch-leds-on-b.patch
@@ -9,16 +9,20 @@ Subject: [PATCH] brcm63xx: setup pinctrl for internal switch 
leds on bcm6368
 
 --- a/arch/mips/bcm63xx/boards/board_common.c
 +++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -104,6 +104,15 @@ void __init board_early_setup(const stru
+@@ -104,6 +104,19 @@ void __init board_early_setup(const stru
                                GPIO_MODE_6348_G0_EXT_MII;
        }
  
-+      if (BCMCPU_IS_6368() && board.has_enetsw) {
++      if ((BCMCPU_IS_6368() || (BCMCPU_IS_6318())) && board.has_enetsw) {
 +              int i;
 +
 +              for (i = 0; i < 4; i++) {
-+                      if (board.enetsw.used_ports[i].used)
-+                              val |= (GPIO_MODE_6368_EPHY0_LED << i);
++                      if (board.enetsw.used_ports[i].used) {
++                              if (BCMCPU_IS_6368())
++                                      val |= (GPIO_MODE_6368_EPHY0_LED << i);
++                              else if (BCMCPU_IS_6318())
++                                      val |= BIT(i+4);
++                      }
 +              }
 +      }
 +
diff --git 
a/target/linux/brcm63xx/patches-4.4/403-6358-enet1-external-mii-clk.patch 
b/target/linux/brcm63xx/patches-4.4/403-6358-enet1-external-mii-clk.patch
index 206fc3f..43215a6 100644
--- a/target/linux/brcm63xx/patches-4.4/403-6358-enet1-external-mii-clk.patch
+++ b/target/linux/brcm63xx/patches-4.4/403-6358-enet1-external-mii-clk.patch
@@ -8,7 +8,7 @@
 +                      val |= GPIO_MODE_6358_ENET1_MII_CLK_INV;
        }
  
-       if (BCMCPU_IS_6368() && board.has_enetsw) {
+       if ((BCMCPU_IS_6368() || (BCMCPU_IS_6318())) && board.has_enetsw) {
 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
 +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
 @@ -651,6 +651,8 @@
diff --git 
a/target/linux/brcm63xx/patches-4.4/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
 
b/target/linux/brcm63xx/patches-4.4/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
index b02ab44..bd8a915 100644
--- 
a/target/linux/brcm63xx/patches-4.4/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
+++ 
b/target/linux/brcm63xx/patches-4.4/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
@@ -18,7 +18,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in 
board data
  
  #include "board_common.h"
  
-@@ -191,6 +192,7 @@ static struct of_device_id of_ids[] = {
+@@ -195,6 +196,7 @@ static struct of_device_id of_ids[] = {
  int __init board_register_devices(void)
  {
        int usbh_ports = 0;
@@ -26,7 +26,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in 
board data
  
  #if CONFIG_OF
        if (of_have_populated_dt()) {
-@@ -271,6 +273,10 @@ int __init board_register_devices(void)
+@@ -275,6 +277,10 @@ int __init board_register_devices(void)
                                        board.ephy_reset_gpio_flags);
        }
  
diff --git 
a/target/linux/brcm63xx/patches-4.4/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
 
b/target/linux/brcm63xx/patches-4.4/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
index ccdcefd..ac07eb0 100644
--- 
a/target/linux/brcm63xx/patches-4.4/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
+++ 
b/target/linux/brcm63xx/patches-4.4/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
@@ -11,7 +11,7 @@ Subject: [PATCH 69/80] MIPS: BCM63XX: pass caldata info to 
flash
 
 --- a/arch/mips/bcm63xx/boards/board_common.c
 +++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -261,7 +261,7 @@ int __init board_register_devices(void)
+@@ -265,7 +265,7 @@ int __init board_register_devices(void)
        if (board.num_spis)
                spi_register_board_info(board.spis, board.num_spis);
  
diff --git 
a/target/linux/brcm63xx/patches-4.4/420-BCM63XX-add-endian-check-for-ath9k.patch
 
b/target/linux/brcm63xx/patches-4.4/420-BCM63XX-add-endian-check-for-ath9k.patch
index 9f1fcc3..60411f0 100644
--- 
a/target/linux/brcm63xx/patches-4.4/420-BCM63XX-add-endian-check-for-ath9k.patch
+++ 
b/target/linux/brcm63xx/patches-4.4/420-BCM63XX-add-endian-check-for-ath9k.patch
@@ -39,7 +39,7 @@
                return;
 --- a/arch/mips/bcm63xx/boards/board_common.c
 +++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -275,7 +275,8 @@ int __init board_register_devices(void)
+@@ -279,7 +279,8 @@ int __init board_register_devices(void)
  
        /* register any fixups */
        for (i = 0; i < board.has_caldata; i++)
diff --git 
a/target/linux/brcm63xx/patches-4.4/421-BCM63XX-add-led-pin-for-ath9k.patch 
b/target/linux/brcm63xx/patches-4.4/421-BCM63XX-add-led-pin-for-ath9k.patch
index d8dbcbe..59bcd62 100644
--- a/target/linux/brcm63xx/patches-4.4/421-BCM63XX-add-led-pin-for-ath9k.patch
+++ b/target/linux/brcm63xx/patches-4.4/421-BCM63XX-add-led-pin-for-ath9k.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_common.c
 +++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -276,7 +276,7 @@ int __init board_register_devices(void)
+@@ -280,7 +280,7 @@ int __init board_register_devices(void)
        /* register any fixups */
        for (i = 0; i < board.has_caldata; i++)
                pci_enable_ath9k_fixup(board.caldata[i].slot, 
board.caldata[i].caldata_offset,
diff --git 
a/target/linux/brcm63xx/patches-4.4/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
 
b/target/linux/brcm63xx/patches-4.4/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
index 46ac608..1a685e7 100644
--- 
a/target/linux/brcm63xx/patches-4.4/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
+++ 
b/target/linux/brcm63xx/patches-4.4/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
@@ -36,7 +36,7 @@ Subject: [PATCH 72/72] 
446-BCM63XX-add-a-fixup-for-rt2x00-devices
  
  #include "board_common.h"
  
-@@ -274,9 +275,19 @@ int __init board_register_devices(void)
+@@ -278,9 +279,19 @@ int __init board_register_devices(void)
        }
  
        /* register any fixups */
-- 
2.6.4



_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to