From patchwork Thu Apr 19 07:19:41 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: 900622 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="RV1TzG0h"; 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 40RVVW1MhTz9s27 for ; Thu, 19 Apr 2018 17:09:55 +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=09d5rmrvHAZzpe9+AsklbF60Bs7ny8klfARH9anusW0=; b=RV1TzG0h5knZUD rS4afndwE/YfuXWDLdlTOpFZDYGKfMl33RPjSSfxli4eIoG0ThacwhR4nREIX45tP8+aO7RzCuya8 aJJJeAy61yuW/paNorHg91PiwxT7dGdcRMjdBS3bFIxfKvqdmVfyCYoWQNQjKUAtyztU5w3VG0/Wk xauZ/Mny+PiBo4rG7IeWFeqNWzPiwhgm81zkWWlBPMTj0eOoAKtN5pP4uxnzaTfDonhY8Yi0RRl/R v2BQavpRuOgYlo259oPBf76EqI/LF7Z6H/aAnrf8jGosPPrtP6EYfslQFwi/CnxQr7MXhIEo2qhnV zazKVbwlCLX2O4I8tnSg==; 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 1f93hV-0007c6-Md; Thu, 19 Apr 2018 07:09:49 +0000 Received: from 9.mo69.mail-out.ovh.net ([46.105.56.78]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f93hP-0007av-B7 for linux-arm-kernel@lists.infradead.org; Thu, 19 Apr 2018 07:09:45 +0000 Received: from player738.ha.ovh.net (unknown [10.109.108.55]) by mo69.mail-out.ovh.net (Postfix) with ESMTP id 04AFF13120 for ; Thu, 19 Apr 2018 09:09:27 +0200 (CEST) Received: from localhost.localdomain (22.220.201.77.rev.sfr.net [77.201.220.22]) (Authenticated sender: sebastien.szymanski@armadeus.com) by player738.ha.ovh.net (Postfix) with ESMTPSA id C1127131C; Thu, 19 Apr 2018 09:09:18 +0200 (CEST) From: =?utf-8?q?S=C3=A9bastien_Szymanski?= To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/2] cpufreq: imx6q: check speed grades for i.MX6ULL Date: Thu, 19 Apr 2018 09:19:41 +0200 Message-Id: <20180419071942.14828-1-sebastien.szymanski@armadeus.com> X-Mailer: git-send-email 2.16.1 MIME-Version: 1.0 X-Ovh-Tracer-Id: 4658129390218007804 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtgedrjeeggdduudehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180419_000943_534994_96D49627 X-CRM114-Status: GOOD ( 13.72 ) 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.56.78 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: linux-pm@vger.kernel.org, "Rafael J . Wysocki" , Stefan Agner , Fabio Estevam , Shawn Guo 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 --- Changes for v2: - none 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 Thu Apr 19 07:19:42 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: 900627 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="sAf5UN6o"; 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 40RVWY639Lz9s1w for ; Thu, 19 Apr 2018 17:10:49 +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=SvurgNoAAGi+CWblWnoD7s87c/Y+9Zpl1nXXbzZywew=; b=sAf5UN6obDTXyH z1w7LDcqB3BzM2vAACz8DFHCthvIWzT76g9YGfxHpc3DpWMykBNtbgurGe2+nsYyDyV2fn3Oufh0t q02nsLG64qIJmkbEKJqPc01VGAHtU9azUJkomaObplEIfmd4kTORuqstu1exKLREfVv3kla4RBZbk S8PdAzQH5OX2DJhSxsXk4o5i+iYbhS8W6blHN6BAd3JjEn+CE7kLAJZZNDgDstG5tnpQG9CWxwO3r jsB2TkgI/WOlttyVhdO0i7fs/tYonVdvRcJPjYvzkANJUODZdTjPhXR/rdwWxaIhNCM7aZGIZCL50 p/dwu86RoNFAn/rcuSMg==; 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 1f93iM-0000bz-OB; Thu, 19 Apr 2018 07:10:42 +0000 Received: from 6.mo69.mail-out.ovh.net ([46.105.50.107]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f93hT-0007bO-Gg for linux-arm-kernel@lists.infradead.org; Thu, 19 Apr 2018 07:09:49 +0000 Received: from player738.ha.ovh.net (unknown [10.109.105.7]) by mo69.mail-out.ovh.net (Postfix) with ESMTP id 49D4C138CA for ; Thu, 19 Apr 2018 09:09:35 +0200 (CEST) Received: from localhost.localdomain (22.220.201.77.rev.sfr.net [77.201.220.22]) (Authenticated sender: sebastien.szymanski@armadeus.com) by player738.ha.ovh.net (Postfix) with ESMTPSA id EBA3A248; Thu, 19 Apr 2018 09:09:27 +0200 (CEST) From: =?utf-8?q?S=C3=A9bastien_Szymanski?= To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/2] ARM: dts: imx6ull: add operating points Date: Thu, 19 Apr 2018 09:19:42 +0200 Message-Id: <20180419071942.14828-2-sebastien.szymanski@armadeus.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180419071942.14828-1-sebastien.szymanski@armadeus.com> References: <20180419071942.14828-1-sebastien.szymanski@armadeus.com> MIME-Version: 1.0 X-Ovh-Tracer-Id: 4660944142808863996 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtgedrjeeggdduudehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180419_000947_759621_A55800D7 X-CRM114-Status: GOOD ( 12.81 ) 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.50.107 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: linux-pm@vger.kernel.org, "Rafael J . Wysocki" , Stefan Agner , Fabio Estevam , Shawn Guo 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 --- Changes for v2: - Fix soc-operating-points voltage for 792MHz and 900MHz 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..530d5526b890 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 1175000 + 792000 1175000 + 528000 1175000 + 396000 1175000 + 198000 1175000 + >; +}; + / { soc { aips3: aips-bus@2200000 {