[LEDE-DEV] [PATCH] brcm63xx: fix BCM6368 switch hw LEDs

Daniel Gonzalez Cabanelas dgcbueu at gmail.com
Fri Dec 2 12:54:51 PST 2016


Prevent from erasing the pinmux of HW ephy LEDs in BCM6368

In BCM6368 CFE configures the HW controled LEDs for the switch
by setting the required GPIO pinmux. But in OpenWrt when the 
peripherals are initialized, the code is erasing the pinmux previously
configured by CFE. 

Just don't erase those bits to let the LEDs blink with LAN activity.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu at gmail.com>
diff --git a/target/linux/brcm63xx/patches-4.4/805-bcm6368-dont_erase_ephy_ledmux.patch b/target/linux/brcm63xx/patches-4.4/805-bcm6368-dont_erase_ephy_ledmux.patch
new file mode 100644
index 0000000..84208b6
--- /dev/null
+++ b/target/linux/brcm63xx/patches-4.4/805-bcm6368-dont_erase_ephy_ledmux.patch
@@ -0,0 +1,18 @@
+--- a/arch/mips/bcm63xx/boards/board_common.c
++++ b/arch/mips/bcm63xx/boards/board_common.c
+@@ -81,6 +81,15 @@
+ 	 * inside arch_initcall */
+ 	val = 0;
+ 
++	if (board.has_enetsw && BCMCPU_IS_6368()) {
++		/* Don't erase EPHY LEDmux! */
++		val |= bcm_gpio_readl(GPIO_MODE_REG) & (
++			GPIO_MODE_6368_EPHY0_LED |
++			GPIO_MODE_6368_EPHY1_LED |
++			GPIO_MODE_6368_EPHY2_LED |
++			GPIO_MODE_6368_EPHY3_LED);
++	}
++
+ #ifdef CONFIG_PCI
+ 	if (board.has_pci) {
+ 		bcm63xx_pci_enabled = 1;




More information about the Lede-dev mailing list