brcm63xx: register SPI controllers through DT
[openwrt/openwrt.git] / target / linux / brcm63xx / patches-4.4 / 382-brcm63xx-setup-pinctrl-for-internal-switch-leds-on-b.patch
1 From 8940437e017d446d61a035e847c2a1d7a57a4354 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jonas.gorski@gmail.com>
3 Date: Wed, 1 Feb 2017 12:17:13 +0100
4 Subject: [PATCH] brcm63xx: setup pinctrl for internal switch leds on bcm6368
5
6 ---
7 arch/mips/bcm63xx/boards/board_common.c | 9 +++++++++
8 1 file changed, 9 insertions(+)
9
10 --- a/arch/mips/bcm63xx/boards/board_common.c
11 +++ b/arch/mips/bcm63xx/boards/board_common.c
12 @@ -104,6 +104,15 @@ void __init board_early_setup(const stru
13 GPIO_MODE_6348_G0_EXT_MII;
14 }
15
16 + if (BCMCPU_IS_6368() && board.has_enetsw) {
17 + int i;
18 +
19 + for (i = 0; i < 4; i++) {
20 + if (board.enetsw.used_ports[i].used)
21 + val |= (GPIO_MODE_6368_EPHY0_LED << i);
22 + }
23 + }
24 +
25 bcm_gpio_writel(val, GPIO_MODE_REG);
26
27 #if IS_ENABLED(CONFIG_USB)