From patchwork Thu Mar 2 13:50:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_Gonz=C3=A1lez_Cabanelas?= X-Patchwork-Id: 734611 X-Patchwork-Delegate: jogo@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vYtyR1gpyz9s7m for ; Fri, 3 Mar 2017 00:51:27 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="p7lqekXj"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="b6LFhmQR"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-ID:Date:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=6mylwZz5bcKcCFLROpNGQuFAAUnMv/8u1Fdori1GwTM=; b=p7lqekXjs6KxSn os/mNbkiPi39QR5pb6X98I7lyze3ghwjkW5tF7l/c5xZ6s4PDaX9adRAMxn6jIY82FhA6DA7Amzmf PnKhJlRC6agaZJpmk8NoClmYNGfTH3ddgiFLGkFrCobddX+awHQps0uwNHeEmE14FyLjRha7p8UuR Lj1F0d2QHSUJQV1Xgfx9+qrT66kQ/kgTJvQiwaLzNlIi2u+qd16DfrJPjq08Fs4fKBviktoGmdb3p oaF+TXAHHhEYHiSTsClx0Zhnti8ZWomuPg8EthvXWR4dHuufKMVaAvuOP5aLreGFOlRCM4XSZkaE5 FIe/OPBpxFsPsnnG/o5w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cjR8Y-00056p-T3; Thu, 02 Mar 2017 13:51:18 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cjR8V-000542-0R for lede-dev@lists.infradead.org; Thu, 02 Mar 2017 13:51:17 +0000 Received: by mail-wm0-x243.google.com with SMTP id v190so6561557wme.3 for ; Thu, 02 Mar 2017 05:50:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=XKqR8u7n2ApBWs1/w/Gs4qDDSgNMahxPQQi1tFJZo1A=; b=b6LFhmQRV4L9nbabAkOKdeZzDoCbsJNa48PGFZQ6DtiGpd/Ns4WEs/dpL3qQcMjR5a 6gXcfAXXQ0pIIWOPrlomAR92ZM012g0H/YwGtrpx9gNve+F0Q8H2z/IZBoWGObKFufCc hMaG7cPng2CgdEZUfg/aEhdbIj1PCxUoq1dMuZ48/TMD+zOOfy74LTdr+rmaxftqZBDJ 1wU9Pda6rLSnbefii9qSFdKZNRDYeyjRVUSaVAtqtBCnEj43QP1cS8mhBF9za4NbbiMY jPw1YxH2F+TmGrI4veIdAwQDarS7LCfdTm+ZV7bx8RdblAuFV3fXJUK86nRFXL9GJ+qU nmUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=XKqR8u7n2ApBWs1/w/Gs4qDDSgNMahxPQQi1tFJZo1A=; b=ippqZXeTvdwxQFHDg5N53T6E+whG0aJOc6Qa570imrMsjrV1QWcuXu3DQEyuvpACNk 6jWf5/6z7cL2mS8WMZ7r9NBUtX7bM0OjTxFzw/JxwL+Mh0NTfz6ngrbcxZweEdDtHbzj +DI319mKPYbZMcIgepZOsgaUggOBMqs+DpqfNbuZBQTR7/sEshaPKBA5vxt2BNuokqZK 2t8oWLFkQEUHCksgp4hVB2aUryo/oMcXCDjQCvI0dCdu8Pr9N4FPt4WO6cqc9TKg2XdT qFri/lHgCtcjXTHmHvkm64xJwgxllmb3LZwlX8wne1ZFeRyg3YutXEmeurwcsNgyp8Tr 9Yyw== X-Gm-Message-State: AMke39kC2ep3bd6tF9/xRhWCWShwAc3nu5Pf5voz7qwT8zBK/euOyCk0pHW19TeRSd35nw== X-Received: by 10.28.165.196 with SMTP id o187mr8053388wme.6.1488462653174; Thu, 02 Mar 2017 05:50:53 -0800 (PST) Received: from tool.localnet ([188.86.75.31]) by smtp.googlemail.com with ESMTPSA id v102sm10939049wrb.11.2017.03.02.05.50.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Mar 2017 05:50:52 -0800 (PST) From: Daniel Gonzalez Cabanelas To: lede-dev@lists.infradead.org, jogo@openwrt.org Date: Thu, 02 Mar 2017 14:50:50 +0100 Message-ID: <1760419.fqFY2NKBM8@tool> User-Agent: KMail/4.14.10 (Linux/4.6.5-1-zen; KDE/4.14.14; x86_64; ; ) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170302_055115_437333_17D5AD58 X-CRM114-Status: GOOD ( 14.50 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgcbueu[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [LEDE-DEV] [PATCH] brcm63xx: Setup BCM6318 pinmux to make the switch LEDs work X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- ...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 */