From patchwork Tue Sep 24 10:47:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kristian Evensen X-Patchwork-Id: 1166494 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SDzdFAL6"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fNmtxOy7"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46cyZP3cmLz9sPD for ; Tue, 24 Sep 2019 20:47:41 +1000 (AEST) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cWcQmFZ/T0P4kKlD5PmsrrvLltyDu2k/Vn6vpO4V430=; b=SDzdFAL6UE3Bd2 TX+kX94VLaSIGatMBz+HcS63A4ExxyPv4wfMBAX/eXY2CT56c9obspK3oG5xWxgNcfVNY1gCOF7DU +5kMz8ShNm7Jy4sdkXVQp0IPMr5qjjLAgr5RyMErFMwZ7L98mES4/L7xghO5qn1lntQ1UMv2fnkIE MNSQ8vMSJTNIsWtkNRLMvV7Rha1uVbNn/97QY5It3Qb2rO6nfd8fHGRpAVzc4ldpJo0IJEHaK2Zsv zEqZ892Sd+iNbME5wFWImUThkU5XJkgJTwRTIiRnccULEXsWiOMMYeswif7GGwa1MtmYZ0RmLMxrV VXgANZL4ZP2t8R9U6Ohw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCiLu-00089q-0b; Tue, 24 Sep 2019 10:47:26 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCiLl-00080w-SY for openwrt-devel@lists.openwrt.org; Tue, 24 Sep 2019 10:47:19 +0000 Received: by mail-wm1-x343.google.com with SMTP id a6so1660257wma.5 for ; Tue, 24 Sep 2019 03:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Zsz6GcP/IUkkJY4HEna4vJak5auBQKSYE5ZjpKI/zp4=; b=fNmtxOy7X+pA51ycx3vHPQyH1FN+jRfWK9ogYaYJ/xRYyHeuJfGdbgaZGuDo3g6Sva Qji5GL1+/mIlWpi1qQ09WUIQS/RmN8aF2/Xezso0uPPGBHv3E/Eqk5dV0cgqd6RNxdtG 2OTg4DxiiWIcjomrMsrhShg/uZnjuGwKHuh45Y0qde0WQ1lgd1zekuaAkcyguzCHq4y5 11wfynQgcf2ZbGyf/EmEoksn2JGxTEQNeZ7fYetSbKXPtfL9Uz2B6MClNYpsOanXoS5G ejcRZWpZDEuwjN2i33GJA31t3SorbaDWgNa9+nHvPExUILcQd6WKKB9Gua6GMLJLEeP4 EBTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zsz6GcP/IUkkJY4HEna4vJak5auBQKSYE5ZjpKI/zp4=; b=DOTyl94hM/cxQ6HJJALHszwhCLBbKnq2YRtS0exUYRzHj4+H6yqSSGcLmEEfDYVb0K Rejo2JANd8LsBUFLDdjuhHNgm5NR+du7CJ5PXNLWOTqBtaq012fZoHefivSbyN+a2pCe 9OWhw1tQknfKvRL5t1f0b3j1P4a9JpiCKD+mcNKTJOOAzrGEOXOACnFMmob+w623fuQ8 +0e9H4IfBFlew/SiLZON3OkcNQDXyx9y7o0nJoViWyeuzokptlzMdCaecrNaxFUK7Mna 36BX7RIG1nlCMrnnsjiWlLHtA9L7zc+HQhCcno7ImVFBMq8ogU+Uv9JLiBG8YzuWsGwH y2pg== X-Gm-Message-State: APjAAAV5KupXG+ccx9ZIw44BCpuZQNBJxaVWJBV60oVL/i3l6IXHXh47 yyUoPl2Y1YceE8WwZ2QYALQFITk8Zf0= X-Google-Smtp-Source: APXvYqyyxY2RYKrXN0JTlseL08HvzgOwUQFYYPdRjo1YshajrmSDlct0cdTnImoR6rfN/dFKpA8FHw== X-Received: by 2002:a05:600c:2049:: with SMTP id p9mr2134317wmg.30.1569322035833; Tue, 24 Sep 2019 03:47:15 -0700 (PDT) Received: from kristrev-XPS-15-9570.lan ([193.213.155.210]) by smtp.gmail.com with ESMTPSA id f8sm1681490wmb.37.2019.09.24.03.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Sep 2019 03:47:15 -0700 (PDT) From: Kristian Evensen To: openwrt-devel@lists.openwrt.org, dev@kresin.me, monkeh@monkeh.net, musashino.open@gmail.com, ynezz@true.cz Date: Tue, 24 Sep 2019 12:47:11 +0200 Message-Id: <20190924104712.19812-2-kristian.evensen@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190924104712.19812-1-kristian.evensen@gmail.com> References: <20190924104712.19812-1-kristian.evensen@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190924_034717_927983_E2AC3DF4 X-CRM114-Status: GOOD ( 18.19 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:343 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kristian.evensen[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH v2 1/2] ramips: Update ZBT WE1026 DTS-files X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kristian Evensen Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This commit makes the following changes to the WE1026 DTS-files: * The parts that are unique to the -5G-version (LED and 5GHz wifi) are moved to a separate file, so that WE1026.dtsi can be referenced also by the DTS for the -H version. * Changed button from polled to interrupt. * Use the generic "flash"-name for the spi-nor node. All changes have been tested on the WE1026-5G-16M and work fine. I.e., the device works as before the DTS-changes. v1->v2: * Added missing acked-bys. Signed-off-by: Kristian Evensen Acked-by: Mathias Kresin Acked-by: Alex Maclean Acked-by: INAGAKI Hiroshi Acked-by: Petr Štetiar Acked-by: Adrian Schmutzler --- .../dts/mt7620a_zbtlink_we1026-5g-16m.dts | 77 +-------------- .../ramips/dts/mt7620a_zbtlink_we1026-5g.dtsi | 93 +---------------- .../ramips/dts/mt7620a_zbtlink_we1026.dtsi | 99 +++++++++++++++++++ 3 files changed, 108 insertions(+), 161 deletions(-) create mode 100644 target/linux/ramips/dts/mt7620a_zbtlink_we1026.dtsi diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g-16m.dts b/target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g-16m.dts index e2eb5b6329..0bb6812fcf 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g-16m.dts +++ b/target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g-16m.dts @@ -1,81 +1,14 @@ -/* - * BSD LICENSE - * - * Copyright(c) 2017 Kristian Evensen . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Broadcom Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; #include "mt7620a_zbtlink_we1026-5g.dtsi" / { - compatible = "zbtlink,we1026-5g-16m", "ralink,mt7620a-soc"; + compatible = "zbtlink,we1026-5g-16m", "zbtlink,we1026-5g", + "zbtlink,we1026", "ralink,mt7620a-soc"; model = "ZBT WE1026-5G (16M)"; }; -&spi0 { - status = "okay"; - - en25q128@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - firmware: partition@50000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; +&firmware { + reg = <0x50000 0xfb0000>; }; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g.dtsi index e7e64e251a..b90179fe1f 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g.dtsi @@ -1,47 +1,9 @@ -/* - * BSD LICENSE - * - * Copyright(c) 2017 Kristian Evensen . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Broadcom Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "mt7620a.dtsi" - -#include -#include +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include "mt7620a_zbtlink_we1026.dtsi" / { - compatible = "zbtlink,we1026-5g", "ralink,mt7620a-soc"; - - chosen { - bootargs = "console=ttyS0,115200"; - }; + compatible = "zbtlink,we1026-5g", "zbtlink,we1026", + "ralink,mt7620a-soc"; leds { compatible = "gpio-leds"; @@ -62,53 +24,6 @@ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; }; - - keys { - compatible = "gpio-keys-polled"; - poll-interval = <20>; - reset { - label = "reset"; - gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; -}; - -&gpio2 { - status = "okay"; -}; - -&gpio3 { - status = "okay"; -}; - -&sdhci { - status = "okay"; -}; - -&ehci { - status = "okay"; -}; - -&ohci { - status = "okay"; -}; - -ðernet { - mtd-mac-address = <&factory 0x28>; -}; - -&wmac { - ralink,mtd-eeprom = <&factory 0>; -}; - -&pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "i2c", "uartf", "spi refclk", "ephy", "wled"; - ralink,function = "gpio"; - }; - }; }; &pcie { diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_we1026.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_we1026.dtsi new file mode 100644 index 0000000000..522a354305 --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_zbtlink_we1026.dtsi @@ -0,0 +1,99 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include "mt7620a.dtsi" + +#include +#include + +/ { + compatible = "zbtlink,we1026", "ralink,mt7620a-soc"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + firmware: partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + }; + }; + }; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&sdhci { + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "uartf", "spi refclk", "ephy", "wled"; + ralink,function = "gpio"; + }; + }; +};