From patchwork Tue Apr 5 06:20:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Kent X-Patchwork-Id: 606285 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (caladan.dune.hu [78.24.191.180]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qfJct757wz9sC4 for ; Tue, 5 Apr 2016 16:20:30 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id CFC7DB917D1; Tue, 5 Apr 2016 08:20:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: ** X-Spam-Status: No, score=2.4 required=5.0 tests=RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Tue, 5 Apr 2016 08:20:23 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 89A00B917D0 for ; Tue, 5 Apr 2016 08:20:21 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_FROM_MX=-3.1; rate: -6.1 Received: from tokyo.semicircular.net (unknown [106.187.93.171]) by arrakis.dune.hu (Postfix) with ESMTP for ; Tue, 5 Apr 2016 08:20:20 +0200 (CEST) Received: by tokyo.semicircular.net (Postfix, from userid 1000) id 74C8ED82EF; Tue, 5 Apr 2016 06:20:18 +0000 (UTC) From: Adam Kent To: openwrt-devel@lists.openwrt.org Date: Tue, 5 Apr 2016 06:20:08 +0000 Message-Id: <1459837208-5544-1-git-send-email-adam@semicircular.net> X-Mailer: git-send-email 1.7.10.4 Subject: [OpenWrt-Devel] [PATCH] Fixes for LinkIt 7688 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Misc fixes for LinkIt 7688 board: - Copy the right wireless firmware for the mt7688 - Add back '0065-mt7688-fixes.patch', left out after the move to Linux 4.4. - Remove SPI_DEV from linux config which otherwise causes a massive warning - Add wmac to LINKIT7688.dts so wireless works --- package/kernel/mt76/Makefile | 2 +- target/linux/ramips/dts/LINKIT7688.dts | 4 ++ target/linux/ramips/mt7688/config-4.4 | 2 +- .../ramips/patches-4.4/0065-mt7688-fixes.patch | 73 ++++++++++++++++++++++ 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 target/linux/ramips/patches-4.4/0065-mt7688-fixes.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 8800b13..33f61cb 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -55,7 +55,7 @@ endef define KernelPackage/mt76/install $(INSTALL_DIR) $(1)/lib/firmware cp \ - $(if $(CONFIG_TARGET_ramips_mt7628), \ + $(if $(CONFIG_TARGET_ramips_mt7628) || $(CONFIG_TARGET_ramips_mt7688), \ $(PKG_BUILD_DIR)/firmware/mt7628_e1.bin \ $(PKG_BUILD_DIR)/firmware/mt7628_e2.bin \ ) \ diff --git a/target/linux/ramips/dts/LINKIT7688.dts b/target/linux/ramips/dts/LINKIT7688.dts index 5ec29ac..2dfb98c 100644 --- a/target/linux/ramips/dts/LINKIT7688.dts +++ b/target/linux/ramips/dts/LINKIT7688.dts @@ -59,6 +59,10 @@ }; }; + wmac@10300000 { + status = "okay"; + }; + palmbus@10000000 { spi@b00 { status = "okay"; diff --git a/target/linux/ramips/mt7688/config-4.4 b/target/linux/ramips/mt7688/config-4.4 index c1e8df2..2bfd3f8 100644 --- a/target/linux/ramips/mt7688/config-4.4 +++ b/target/linux/ramips/mt7688/config-4.4 @@ -193,7 +193,7 @@ CONFIG_SPI=y CONFIG_SPI_MASTER=y CONFIG_SPI_MT7621=y # CONFIG_SPI_RT2880 is not set -CONFIG_SPI_SPIDEV=y +# CONFIG_SPI_SPIDEV is not set CONFIG_SRCU=y CONFIG_SWCONFIG=y CONFIG_SYSCTL_EXCEPTION_TRACE=y diff --git a/target/linux/ramips/patches-4.4/0065-mt7688-fixes.patch b/target/linux/ramips/patches-4.4/0065-mt7688-fixes.patch new file mode 100644 index 0000000..b96be91 --- /dev/null +++ b/target/linux/ramips/patches-4.4/0065-mt7688-fixes.patch @@ -0,0 +1,73 @@ +--- a/arch/mips/ralink/mt7620.c ++++ b/arch/mips/ralink/mt7620.c +@@ -107,31 +107,31 @@ static struct rt2880_pmx_group mt7620a_p + }; + + static struct rt2880_pmx_func pwm1_grp_mt7628[] = { +- FUNC("sdcx", 3, 19, 1), ++ FUNC("sdxc", 3, 19, 1), + FUNC("utif", 2, 19, 1), + FUNC("gpio", 1, 19, 1), + FUNC("pwm", 0, 19, 1), + }; + + static struct rt2880_pmx_func pwm0_grp_mt7628[] = { +- FUNC("sdcx", 3, 18, 1), ++ FUNC("sdxc", 3, 18, 1), + FUNC("utif", 2, 18, 1), + FUNC("gpio", 1, 18, 1), + FUNC("pwm", 0, 18, 1), + }; + + static struct rt2880_pmx_func uart2_grp_mt7628[] = { +- FUNC("sdcx", 3, 20, 2), ++ FUNC("sdxc", 3, 20, 2), + FUNC("pwm", 2, 20, 2), + FUNC("gpio", 1, 20, 2), +- FUNC("uart", 0, 20, 2), ++ FUNC("uart2", 0, 20, 2), + }; + + static struct rt2880_pmx_func uart1_grp_mt7628[] = { + FUNC("sdcx", 3, 45, 2), + FUNC("pwm", 2, 45, 2), + FUNC("gpio", 1, 45, 2), +- FUNC("uart", 0, 45, 2), ++ FUNC("uart1", 0, 45, 2), + }; + + static struct rt2880_pmx_func i2c_grp_mt7628[] = { +@@ -143,21 +143,21 @@ static struct rt2880_pmx_func i2c_grp_mt + + static struct rt2880_pmx_func refclk_grp_mt7628[] = { FUNC("reclk", 0, 36, 1) }; + static struct rt2880_pmx_func perst_grp_mt7628[] = { FUNC("perst", 0, 37, 1) }; +-static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 15, 38) }; ++static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 38, 1) }; + static struct rt2880_pmx_func spi_grp_mt7628[] = { FUNC("spi", 0, 7, 4) }; + + static struct rt2880_pmx_func sd_mode_grp_mt7628[] = { + FUNC("jtag", 3, 22, 8), + FUNC("utif", 2, 22, 8), + FUNC("gpio", 1, 22, 8), +- FUNC("sdcx", 0, 22, 8), ++ FUNC("sdxc", 0, 22, 8), + }; + + static struct rt2880_pmx_func uart0_grp_mt7628[] = { + FUNC("-", 3, 12, 2), + FUNC("-", 2, 12, 2), + FUNC("gpio", 1, 12, 2), +- FUNC("uart", 0, 12, 2), ++ FUNC("uart0", 0, 12, 2), + }; + + static struct rt2880_pmx_func i2s_grp_mt7628[] = { +@@ -438,6 +438,8 @@ void __init ralink_clk_init(void) + ralink_clk_add("10000b00.spi", sys_rate); + ralink_clk_add("10000b40.spi", sys_rate); + ralink_clk_add("10000c00.uartlite", periph_rate); ++ ralink_clk_add("10000d00.uart1", periph_rate); ++ ralink_clk_add("10000e00.uart2", periph_rate); + ralink_clk_add("10180000.wmac", xtal_rate); + + if (IS_ENABLED(CONFIG_USB) && is_mt76x8()) {