From patchwork Wed Apr 18 14:52:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?S=C3=A9bastien_Szymanski?= X-Patchwork-Id: 900158 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=armadeus.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EUAxsIhM"; 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 40R4bf1SzJz9s4c for ; Thu, 19 Apr 2018 00:42:53 +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:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/qlVLdCu6+weYTGSqRrVv1DySlVnOCnnYKkAO1/RhEY=; b=EUAxsIhM6FZCcQ wH4EUBWZ/0HDnXYjG+449hLAepC9cAoycTt1Pi0cJTHsSV+T96eHvdqmVQpmt4X9t8UChvhDsBvA7 kHD6ej1Nhxy8vVv/WBfHZrXM/Jc/LmWi/OiJgVtSoKCI81kgNQYnusPsRVuvb6a60v5bt1mkkpK1O 43gPGutL3qI1lFPc2asuiNgig3SnwBjd0LyuqgR68/9YnTiHNvQwuTSt1Qku9bkVIxNqv+Uu585JT C56JPMIR3mnoqWbMYT9TGCcaEy+hJ8W3n/snGDZZgsSugz1VmaipiuyWfz829KYfQO3TSnBIyUbb5 bD7MaKFqR5wMVfb7Mgog==; 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 1f8oIG-00064Q-OQ; Wed, 18 Apr 2018 14:42:44 +0000 Received: from 7.mo173.mail-out.ovh.net ([46.105.44.159]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8oIA-00062x-3v for linux-arm-kernel@lists.infradead.org; Wed, 18 Apr 2018 14:42:40 +0000 Received: from player796.ha.ovh.net (unknown [10.109.108.76]) by mo173.mail-out.ovh.net (Postfix) with ESMTP id D6305BE215 for ; Wed, 18 Apr 2018 16:42:19 +0200 (CEST) Received: from localhost.localdomain (22.220.201.77.rev.sfr.net [77.201.220.22]) (Authenticated sender: sebastien.szymanski@armadeus.com) by player796.ha.ovh.net (Postfix) with ESMTPSA id D3ED85C00BB; Wed, 18 Apr 2018 16:42:09 +0200 (CEST) From: =?utf-8?q?S=C3=A9bastien_Szymanski?= To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] cpufreq: imx6q: check speed grades for i.MX6ULL Date: Wed, 18 Apr 2018 16:52:29 +0200 Message-Id: <20180418145230.10249-1-sebastien.szymanski@armadeus.com> X-Mailer: git-send-email 2.16.1 MIME-Version: 1.0 X-Ovh-Tracer-Id: 6433955021466326268 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtgedrjeefgdejhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180418_074238_310135_3CA2A501 X-CRM114-Status: GOOD ( 13.04 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [46.105.44.159 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , "Rafael J . Wysocki" , Shawn Guo , linux-pm@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Check the max speed supported from the fuses for i.MX6ULL and update the operating points table accordingly. Signed-off-by: Sébastien Szymanski --- drivers/cpufreq/imx6q-cpufreq.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 83cf631fc9bc..f094687cae52 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -266,6 +266,8 @@ static void imx6q_opp_check_speed_grading(struct device *dev) } #define OCOTP_CFG3_6UL_SPEED_696MHZ 0x2 +#define OCOTP_CFG3_6ULL_SPEED_792MHZ 0x2 +#define OCOTP_CFG3_6ULL_SPEED_900MHZ 0x3 static void imx6ul_opp_check_speed_grading(struct device *dev) { @@ -287,16 +289,30 @@ static void imx6ul_opp_check_speed_grading(struct device *dev) * Speed GRADING[1:0] defines the max speed of ARM: * 2b'00: Reserved; * 2b'01: 528000000Hz; - * 2b'10: 696000000Hz; - * 2b'11: Reserved; + * 2b'10: 696000000Hz on i.MX6UL, 792000000Hz on i.MX6ULL; + * 2b'11: 900000000Hz on i.MX6ULL only; * We need to set the max speed of ARM according to fuse map. */ val = readl_relaxed(base + OCOTP_CFG3); val >>= OCOTP_CFG3_SPEED_SHIFT; val &= 0x3; - if (val != OCOTP_CFG3_6UL_SPEED_696MHZ) - if (dev_pm_opp_disable(dev, 696000000)) - dev_warn(dev, "failed to disable 696MHz OPP\n"); + + if (of_machine_is_compatible("fsl,imx6ul")) { + if (val != OCOTP_CFG3_6UL_SPEED_696MHZ) + if (dev_pm_opp_disable(dev, 696000000)) + dev_warn(dev, "failed to disable 696MHz OPP\n"); + } + + if (of_machine_is_compatible("fsl,imx6ull")) { + if (val != OCOTP_CFG3_6ULL_SPEED_792MHZ) + if (dev_pm_opp_disable(dev, 792000000)) + dev_warn(dev, "failed to disable 792MHz OPP\n"); + + if (val != OCOTP_CFG3_6ULL_SPEED_900MHZ) + if (dev_pm_opp_disable(dev, 900000000)) + dev_warn(dev, "failed to disable 900MHz OPP\n"); + } + iounmap(base); put_node: of_node_put(np); @@ -356,7 +372,8 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) goto put_reg; } - if (of_machine_is_compatible("fsl,imx6ul")) + if (of_machine_is_compatible("fsl,imx6ul") || + of_machine_is_compatible("fsl,imx6ull")) imx6ul_opp_check_speed_grading(cpu_dev); else imx6q_opp_check_speed_grading(cpu_dev); From patchwork Wed Apr 18 14:52:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?S=C3=A9bastien_Szymanski?= X-Patchwork-Id: 900159 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=armadeus.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="faCrfj+J"; 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 40R4cW6rZTz9s4c for ; Thu, 19 Apr 2018 00:43:39 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4GrhGLzbuAH4qWxCFh100MMATjrmq1WwGHZ7VSmktIs=; b=faCrfj+J+lKZ7u LGBxc8ca81/47oPJpvugRqRXqHIfNCicokTIg0YBz714L2gISJXopbv765H8UOYsHoIU3KjCbRVTn zigT/Hn/wry7CFDdm3Kn0BlV4TwuBDrsIOYiwH1CaBknJNAbSaRbXetxc07KgthM9UEesPQoZE+HW 9+PLHrHQhX2NT3DSpVL0vUW04cjmOMaAvrD4FwG6XGH/YIODEnCo+6/J+Eh+c9zO2FKcxNlM61nT5 yK5oAFeEus27sRuuAo3G1AePLx50qH2xRr7XKruY3Smw/ERTpU9DCDy7oHaxnuNXKMGSIUZnS/icO 67hrX9VRUkaduJMo6iLA==; 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 1f8oJ2-0006My-P3; Wed, 18 Apr 2018 14:43:32 +0000 Received: from 14.mo3.mail-out.ovh.net ([188.165.43.98]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8oIB-000637-Sw for linux-arm-kernel@lists.infradead.org; Wed, 18 Apr 2018 14:42:41 +0000 Received: from player796.ha.ovh.net (unknown [10.109.120.83]) by mo3.mail-out.ovh.net (Postfix) with ESMTP id 7FDA51B3328 for ; Wed, 18 Apr 2018 16:42:26 +0200 (CEST) Received: from localhost.localdomain (22.220.201.77.rev.sfr.net [77.201.220.22]) (Authenticated sender: sebastien.szymanski@armadeus.com) by player796.ha.ovh.net (Postfix) with ESMTPSA id 4AF835C00BE; Wed, 18 Apr 2018 16:42:20 +0200 (CEST) From: =?utf-8?q?S=C3=A9bastien_Szymanski?= To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] ARM: dts: imx6ull: add operating points Date: Wed, 18 Apr 2018 16:52:30 +0200 Message-Id: <20180418145230.10249-2-sebastien.szymanski@armadeus.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180418145230.10249-1-sebastien.szymanski@armadeus.com> References: <20180418145230.10249-1-sebastien.szymanski@armadeus.com> MIME-Version: 1.0 X-Ovh-Tracer-Id: 6436206818775160060 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtgedrjeefgdejhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180418_074240_098677_BA1BA9A2 X-CRM114-Status: GOOD ( 11.55 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [188.165.43.98 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , "Rafael J . Wysocki" , Shawn Guo , linux-pm@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org i.MX6ULL has different operating ranges than i.MX6UL so add the operating points for the i.MX6ULL. A 25mV offset is added to the minimum allowed values like for the i.MX6UL. Signed-off-by: Sébastien Szymanski --- arch/arm/boot/dts/imx6ull.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/boot/dts/imx6ull.dtsi b/arch/arm/boot/dts/imx6ull.dtsi index 571ddd71cdba..7e6273be0291 100644 --- a/arch/arm/boot/dts/imx6ull.dtsi +++ b/arch/arm/boot/dts/imx6ull.dtsi @@ -46,6 +46,25 @@ /* Delete UART8 in AIPS-1 (i.MX6UL specific) */ /delete-node/ &uart8; +&cpu0 { + operating-points = < + /* kHz uV */ + 900000 1275000 + 792000 1225000 + 528000 1175000 + 396000 1025000 + 198000 950000 + >; + fsl,soc-operating-points = < + /* KHz uV */ + 900000 1400000 + 792000 1350000 + 528000 1175000 + 396000 1175000 + 198000 1175000 + >; +}; + / { soc { aips3: aips-bus@2200000 {