From patchwork Sat Jun 23 20:49:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 933771 X-Patchwork-Delegate: blogic@openwrt.org 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="JHt65hJS"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SLTNU2JR"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::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 41Cnct1L67z9s2R for ; Sun, 24 Jun 2018 06:50:03 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject: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=Hf6HH9Qf3q9JieX543Ydfmw01NScAamm4htB3cUw5iA=; b=JHt65hJSocqNjA SwrKLPEPfWDK5dX2pb96IfD9wF8nqXLJEGEbdDWhwpCoGva9pYzzzBX92klF+cGDS+5YrAuiV9x7+ 2L5mlC9DTBZQLQ/BcQKR811IU6GoXG4krY88duFzAVAmDITl5zO9a7MSp4Tof9ykh5f106kPjh8YS C74HkYqhhJjHwH/AbWs49jyjaVsPqDFSl3r5w6MrzaXWUjJG0PXEfN3fzW3x01SIf8EF6pxvLbkWr q5JGgdyRwUmFHj6JX9bTHPNRRTx1PaCY+SQZXi8B91OJX0LCsAxBxiXStk5PYpnZj+5fvzQQ/a7va 9PY2hx2NWT1TwfIC5z3g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fWpTn-0004JH-0j; Sat, 23 Jun 2018 20:49:55 +0000 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fWpTk-0004IF-20 for lede-dev@lists.infradead.org; Sat, 23 Jun 2018 20:49:53 +0000 Received: by mail-pg0-x242.google.com with SMTP id l65-v6so4396828pgl.8 for ; Sat, 23 Jun 2018 13:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=YCI1VIKcSS9y9/F/GtLlVYL4fIgNq/5o8/3W00UigXY=; b=SLTNU2JRPIh1zwdH0ToL+Sf5ZLw2CApBWZH9cu4gr152srd5spSCtssG9FU4pAqTG/ dtOR+RlCC/pOeaHo2MYogmZsUrnIz/jQEBfSwPa3sonm+i/uZLR3tkuDbLNxfwvfnTs3 VcC9s3QhoTJUcG97vO/ShmdkeX7RvU1nWVnTr91m4ZN9xawgQHltrz7HvnDzKKXB2S7D 2kvomYMdscR81bAZCWwKt914PULaK1V48DAUTZIjCX7nOuHHpWdQW4BmmOf3dMs8qYtq C+uJHxL7/JeoEsHBjp2GgtYHkNVlOZgVGh1la9l9wPVQLnHjsMerqgC3hhgjnvjm126v 7YrQ== 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; bh=YCI1VIKcSS9y9/F/GtLlVYL4fIgNq/5o8/3W00UigXY=; b=Y5FRRjwnEem9rUGF23rW7MNErBfD9CS4Q97ep0DBgkr8sXhhpHsyZ9sNslLuKSTYY5 9yjPKf0i+aBoPYVzBeq6UEbJcwVhqCjiTEJzM2XjFMfQc+6MxuBN8icSzRZBsiicSwtP hkoE/bQ3F+rhXDT5faoQDXg1miRbN/XeKTULcMYNODqzbguCZdOU6yDwlRls2BM32nGm 5cyggO50GKzoPeeznQ5LFlRRjn2/oRaBP8w378RrNI8Ey80XzxvhqtAK4/RLyFj+aVfW pRUegmKBWY8O1asBOMFiZM1cYBMZabrhgv9FO19XUqU3XZHLNR7xiYNxKp2IiSxWv0vD R+tg== X-Gm-Message-State: APt69E3AD/ww7T4TcPDLUMQ41RmkWUojuZyxBljHFMVijPOAQA3fbYj1 XElmV8ROeBCsf9RenH3fhOhZUF3y X-Google-Smtp-Source: ADUXVKLpO37TO+E7u6dJ+BG9t4iuAbLvazR26I9UA+7cZ4eqoc+uWzGC8II6cJFAQYY36j76YfGzrw== X-Received: by 2002:a63:9543:: with SMTP id t3-v6mr5643968pgn.77.1529786979120; Sat, 23 Jun 2018 13:49:39 -0700 (PDT) Received: from clevo-mangix.lan ([2001:470:1f05:c3e::ddd]) by smtp.gmail.com with ESMTPSA id y10-v6sm15187454pgr.44.2018.06.23.13.49.38 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Jun 2018 13:49:38 -0700 (PDT) From: Rosen Penev To: openwrt-devel@lists.openwrt.org Date: Sat, 23 Jun 2018 13:49:37 -0700 Message-Id: <20180623204937.5475-1-rosenp@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180623_134952_104037_4F97BEA9 X-CRM114-Status: GOOD ( 11.02 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c05:0:0:0:242 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rosenp[at]gmail.com) 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list Subject: [OpenWrt-Devel] [PATCH] staging: mt7621-dts: correct various clock frequencies. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: NeilBrown The MT7621 documentation says that the sys clock - also known as OCP clock for the Open Core Protocol - can be configured to 1/3 or 1/4 of the CPU clock. Testing on my hardware, using the fact that the SPI clock is based on the OCP clock and measuring transfer rates, shows a clock of a little over 200MHz with a CPU clock of 900MHz. So assume 1/4 is the default. Also, the nor-flash in the gbpc1 is documented as accepting 50MHz for request requests, and higher for other requests. So set maximum to 50MHz. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman --- target/linux/ramips/dts/GB-PC1.dts | 8 +++++++- target/linux/ramips/dts/mt7621.dtsi | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/target/linux/ramips/dts/GB-PC1.dts b/target/linux/ramips/dts/GB-PC1.dts index 3b29d335b9..db6c3a86b0 100644 --- a/target/linux/ramips/dts/GB-PC1.dts +++ b/target/linux/ramips/dts/GB-PC1.dts @@ -71,7 +71,7 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; + spi-max-frequency = <50000000>; m25p,chunked-io = <32>; partition@0 { @@ -99,6 +99,12 @@ }; }; +&sysclock { + compatible = "fixed-clock"; + /* This is normally 1/4 of cpuclock */ + clock-frequency = <225000000>; +}; + &cpuclock { compatible = "fixed-clock"; clock-frequency = <900000000>; diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index 0655e35301..dd8e87f7ce 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -45,8 +45,8 @@ #clock-cells = <0>; compatible = "fixed-clock"; - /* FIXME: there should be way to detect this */ - clock-frequency = <50000000>; + /* This is normally 1/4 of cpuclock */ + clock-frequency = <220000000>; };