From patchwork Mon Jan 28 18:32:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784449 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C16D114E1 for ; Mon, 28 Jan 2019 18:34:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B236B2C01A for ; Mon, 28 Jan 2019 18:34:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B01192C036; Mon, 28 Jan 2019 18:34:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A9D92C01A for ; Mon, 28 Jan 2019 18:34:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727827AbfA1SdU (ORCPT ); Mon, 28 Jan 2019 13:33:20 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44878 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727771AbfA1SdT (ORCPT ); Mon, 28 Jan 2019 13:33:19 -0500 Received: by mail-wr1-f67.google.com with SMTP id z5so19195344wrt.11 for ; Mon, 28 Jan 2019 10:33:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=g60ZjpL7981mWpyGrLVdtBfYDiHQgHKtcJ+DI6e0xyM=; b=F+uqjAbnKbzSB8lfWnOU2J3SGhkWEVCMLZC3sUtR3HXaCnr1T3kqZPUPHf/YumVdKC Sq6oGx60KrbI/cxgTud27xWXcH66R026zdPHMhZ40kP5o8pcYYEGX0Plh5TLzLpm/0pn y2E4NXreMTTrwKoHhHrk3QbTvRY2WfofqEXz8= 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; bh=g60ZjpL7981mWpyGrLVdtBfYDiHQgHKtcJ+DI6e0xyM=; b=mky/4e3F2sKrUaoVcrgiqbS2XDsFwL+E95kQ9W78QoORD8haS0skgJTHsXHGxOpZXM Zt23fZUgDZU11I78/SVR9wijbKrB4AjTsfvbUUEOD5H+30Q9bOT0OEqJzcugyyqlvpn8 mcbDriTaDqVazUOJfEvWFbEVv9rMG5LSRfm2g9PItUJkiuJFWmmxpD37cEZTQNuRxTtG R+OTtxP4JYdaOr+h+znfVAfKp3JfRM65VGX3i+bYoO1EaniafgEDlww9XWsHTHuhca7s 6lHTNd7zEM9sBzz7kPDOgi/LYQuWPfq7tErHaJnsE+JFvmUSzZtSw5wgJfPeZTSz080Y lKSg== X-Gm-Message-State: AJcUukcHouPz4x+QcBicRVmPXLuF8qFKGrJ1D7LMEwkWhOunH0Xg8ANU dbUrDX+vGrsQ1vSdqJwu/ijOkA== X-Google-Smtp-Source: ALg8bN4SRXJFb7sF6JfwvIIY+PbZNdJ3774v6FxX3VzvIw1l7b+hlY9AIM0B9i5z3hedHzuDb8SXDQ== X-Received: by 2002:adf:cd0e:: with SMTP id w14mr23694468wrm.218.1548700397788; Mon, 28 Jan 2019 10:33:17 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:17 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 01/14] clk: qcom: gcc: limit GPLL0_AO_OUT operating frequency Date: Mon, 28 Jan 2019 19:32:48 +0100 Message-Id: <1548700381-22376-2-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Limit the GPLL0_AO_OUT_MAIN operating frequency as per its hardware specifications. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Acked-by: Stephen Boyd --- drivers/clk/qcom/clk-alpha-pll.c | 8 ++++++++ drivers/clk/qcom/clk-alpha-pll.h | 1 + drivers/clk/qcom/gcc-qcs404.c | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index 0ced4a5..ef51f30 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -730,6 +730,14 @@ static long alpha_pll_huayra_round_rate(struct clk_hw *hw, unsigned long rate, return alpha_huayra_pll_round_rate(rate, *prate, &l, &a); } +const struct clk_ops clk_alpha_pll_fixed_ops = { + .enable = clk_alpha_pll_enable, + .disable = clk_alpha_pll_disable, + .is_enabled = clk_alpha_pll_is_enabled, + .recalc_rate = clk_alpha_pll_recalc_rate, +}; +EXPORT_SYMBOL_GPL(clk_alpha_pll_fixed_ops); + const struct clk_ops clk_alpha_pll_ops = { .enable = clk_alpha_pll_enable, .disable = clk_alpha_pll_disable, diff --git a/drivers/clk/qcom/clk-alpha-pll.h b/drivers/clk/qcom/clk-alpha-pll.h index 66755f0..6b4eb74 100644 --- a/drivers/clk/qcom/clk-alpha-pll.h +++ b/drivers/clk/qcom/clk-alpha-pll.h @@ -104,6 +104,7 @@ struct alpha_pll_config { }; extern const struct clk_ops clk_alpha_pll_ops; +extern const struct clk_ops clk_alpha_pll_fixed_ops; extern const struct clk_ops clk_alpha_pll_hwfsm_ops; extern const struct clk_ops clk_alpha_pll_postdiv_ops; extern const struct clk_ops clk_alpha_pll_huayra_ops; diff --git a/drivers/clk/qcom/gcc-qcs404.c b/drivers/clk/qcom/gcc-qcs404.c index 64da032..7de4fcf 100644 --- a/drivers/clk/qcom/gcc-qcs404.c +++ b/drivers/clk/qcom/gcc-qcs404.c @@ -304,6 +304,7 @@ static struct clk_alpha_pll gpll0_out_main = { }, }; + static struct clk_alpha_pll gpll0_ao_out_main = { .offset = 0x21000, .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT], @@ -316,7 +317,7 @@ static struct clk_alpha_pll gpll0_ao_out_main = { .parent_names = (const char *[]){ "cxo" }, .num_parents = 1, .flags = CLK_IS_CRITICAL, - .ops = &clk_alpha_pll_ops, + .ops = &clk_alpha_pll_fixed_ops, }, }, }; From patchwork Mon Jan 28 18:32:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 48A1191E for ; Mon, 28 Jan 2019 18:34:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A0C72C027 for ; Mon, 28 Jan 2019 18:34:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D6862C01B; Mon, 28 Jan 2019 18:34:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DABC72C01A for ; Mon, 28 Jan 2019 18:34:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727441AbfA1Sej (ORCPT ); Mon, 28 Jan 2019 13:34:39 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:39416 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727818AbfA1SdV (ORCPT ); Mon, 28 Jan 2019 13:33:21 -0500 Received: by mail-wm1-f67.google.com with SMTP id y8so14992326wmi.4 for ; Mon, 28 Jan 2019 10:33:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CByMJapU1NSkj2K6jtzA4klxdw2kAUsE2KAShgBobpo=; b=Q6f9KG0tQSMK7v4MMXKg9Vd31jOXjH7CP9t+KgkhFYmdQpoyZV6HBbFm3l4TqXT+PX hr8hgWw4OZxPVL8DpYBSfsPfjAjV/+AHnfBn2DRYjXOl8DbczY4kDSEFL1rC5bCrDLoT ohHlTGHsTYIF6efkQA1tlhU/U3e9wcYqnhm38= 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; bh=CByMJapU1NSkj2K6jtzA4klxdw2kAUsE2KAShgBobpo=; b=Y8Bhg/gfMScFgDlSrAps+HTBFLtXZLlHSWLkyjLEi5lGFzI2lb3zoiNyZnOkTgTTKR +kWpKK1sfISKDKyjncBYGloGyG0ejIBQ0O5y4R1570zfv9eGp8w0lhmgP4Bw2zFwrQUE nCoEAkcgxUMc8v/P5RggGHRtI11bDMQd5Bqwp3VX/oQLVJnw7gi3/6kgslDvqowFQx1e xZlMxD5X1UEszxvUFb1XbfMyBiiB1NHbvZNXDAXGOWvn2tCz8gKsHRyzU/QGcyhTovW7 Bz/EcsS6QJAB/f8L1g6Pe7s0XAWiVAOMYC9WXpmR8aXGqOTQuPswCi1yAdoYDcM8p4YX WRXw== X-Gm-Message-State: AJcUukc1nF3WKn98tX1TAePoI17mEp7WFpC5C+/G6XDh3tgE8jtFHnnm M+q+jO425rHSBVy1ea+jIipfig== X-Google-Smtp-Source: ALg8bN5uTTcLsM/5hu9M1d/2tZ5GXlZp7xlAlHOAgHNAZwjGQ/mxSNxCBB3KJ6tzvl5Nj9oJFtBp7Q== X-Received: by 2002:a1c:dd04:: with SMTP id u4mr18068554wmg.84.1548700399573; Mon, 28 Jan 2019 10:33:19 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:19 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 02/14] mbox: qcom: add APCS child device for QCS404 Date: Mon, 28 Jan 2019 19:32:49 +0100 Message-Id: <1548700381-22376-3-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is clock controller functionality in the APCS hardware block of qcs404 devices similar to msm8916. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz --- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c index 3cf2937..0d64aa5 100644 --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c @@ -97,16 +97,21 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) return ret; } - if (of_device_is_compatible(np, "qcom,msm8916-apcs-kpss-global")) { - apcs->clk = platform_device_register_data(&pdev->dev, - "qcom-apcs-msm8916-clk", - -1, NULL, 0); - if (IS_ERR(apcs->clk)) - dev_err(&pdev->dev, "failed to register APCS clk\n"); - } - platform_set_drvdata(pdev, apcs); + if (of_device_is_compatible(np, "qcom,msm8916-apcs-kpss-global") || + of_device_is_compatible(np, "qcom,qcs404-apcs-apps-global")) + goto register_clk; + + return 0; + +register_clk: + apcs->clk = platform_device_register_data(&pdev->dev, + "qcom-apcs-msm8916-clk", + -1, NULL, 0); + if (IS_ERR(apcs->clk)) + dev_err(&pdev->dev, "failed to register APCS clk\n"); + return 0; } From patchwork Mon Jan 28 18:32:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784389 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 01B7217E9 for ; Mon, 28 Jan 2019 18:33:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E68032BF2E for ; Mon, 28 Jan 2019 18:33:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D94692BFE8; Mon, 28 Jan 2019 18:33:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97A142BFE5 for ; Mon, 28 Jan 2019 18:33:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727772AbfA1SdX (ORCPT ); Mon, 28 Jan 2019 13:33:23 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:40100 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727846AbfA1SdW (ORCPT ); Mon, 28 Jan 2019 13:33:22 -0500 Received: by mail-wm1-f66.google.com with SMTP id f188so14973307wmf.5 for ; Mon, 28 Jan 2019 10:33:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RRgZHYe/sVOgOfTVgbFLvS25NV8X1dawYq/ksWlnIWI=; b=aBkjHG8f4o7l4eAKKLn0A5CYBd6ZjbqSwcMHrsKnKYYsX+97CiBkCBRosG00FDtOec 6bj0G87MmFaIKC27H2bBs+H41I3bzjfQof/VXxY65M62SBLpVr3H1oeLoz6tIVhdXu1C fA825X/ocmyVr9XKqUYCZitYuJ7skV1pTC4Ts= 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; bh=RRgZHYe/sVOgOfTVgbFLvS25NV8X1dawYq/ksWlnIWI=; b=aJlR75wjBp7XE6cNwWPlGeXzgsql9RadQuu6NGeqE7M35tBzZ6sNYJHAlNruu0Syoi 7rSwFwgrkx7pptn9/9/R36oCsd2VeqZhqQZ6SKTmd88SnTiehgtMoU0I63Rwuvw+AbPx VCwUoQOReNLIUp5JptEh+EjuZcq+v5eZE6uPUznYplQ3HgRVwRSBlsoQCJBQeyZbily8 Vrtc2MrHW90kr0Wyy25lFF0DycrQ/oL7yXhoMBpfJdfHeeaSpU1M1gJZZgfDnN/xq80+ k/mBWATrySu9b8O7erz/K21v5TWPB/MADG0l4UuQiihsWL/ai6Tf2rxfCtGH9Y7hVpUI ny1A== X-Gm-Message-State: AJcUukeoAreIFwbcPl2erxC1SADbnuE3mDeKpPcZdrTDmkeQyNAiX/DL Q+BLy82P/wA/r4A6UBMq8KSa9g== X-Google-Smtp-Source: ALg8bN6cE9J4XbUBm/UdlGabrLL56GfQlK48Skq315vXOb+ojjzflSNy6lUxVrSh2ha2PeblIBB66g== X-Received: by 2002:a1c:a755:: with SMTP id q82mr18771984wme.6.1548700401391; Mon, 28 Jan 2019 10:33:21 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:20 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 03/14] mbox: qcom: replace integer with valid macro Date: Mon, 28 Jan 2019 19:32:50 +0100 Message-Id: <1548700381-22376-4-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the correct macro when registering the platform device. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz --- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c index 0d64aa5..7a1b4ff 100644 --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c @@ -108,7 +108,7 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) register_clk: apcs->clk = platform_device_register_data(&pdev->dev, "qcom-apcs-msm8916-clk", - -1, NULL, 0); + PLATFORM_DEVID_NONE, NULL, 0); if (IS_ERR(apcs->clk)) dev_err(&pdev->dev, "failed to register APCS clk\n"); From patchwork Mon Jan 28 18:32:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 22E986C2 for ; Mon, 28 Jan 2019 18:34:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13F1A2BA5A for ; Mon, 28 Jan 2019 18:34:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 080852BF2E; Mon, 28 Jan 2019 18:34:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C2B42BFE5 for ; Mon, 28 Jan 2019 18:34:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727892AbfA1SdZ (ORCPT ); Mon, 28 Jan 2019 13:33:25 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55766 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727864AbfA1SdZ (ORCPT ); Mon, 28 Jan 2019 13:33:25 -0500 Received: by mail-wm1-f66.google.com with SMTP id y139so14984509wmc.5 for ; Mon, 28 Jan 2019 10:33:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FIFLlUi8drrhCNTy3FqCtrXujaAw4Y9ofI00ORq7Auk=; b=b6Ldp0I3RPws0bLT95JFNpvw76wG74hw+6/PgQ+T41Qa8oNK+XLjTZ6buT5NPiYHUc q+U9eKO10Tvrzvpnw1hkX/EmEPRxnsv2+mVnwmqqTVBDCq2oqX9OxC0nAv9ML7iAZ2i5 tomOdp46RvvGVncKz7AEC+UnNyUd3lAnxhgPE= 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; bh=FIFLlUi8drrhCNTy3FqCtrXujaAw4Y9ofI00ORq7Auk=; b=lubEcDusK0ymUUX36LB8xAZIPk2vO0J3fpmPEz5BBMk0lu1IHGJIDeVN9WFbWcJ90I nbkNmMS6z8GzZAVuwVSy1mVa+mfh3BUAHKNq/jZzeuvatlpNB4zvaiEObVg6Bbp0nil3 g06MOHvtN4kpru4ZWmQgHI0CJ0nP3XsAqKoUOztU+phkI/fsnD7/BA6DBN9XCn5fKim/ QJYovR9U01MHL8hi+4ED5BAILE30kKbUEGcZnr84Ve9Lu4bAbmgQuiN77oVN/7vh0691 04VkvQ7m1nCBEmmGn0A41lPVWsAUZzYnfjU+t4w8v7dGqMc9lvhyq22POI2Qo/X6wetb W6WA== X-Gm-Message-State: AJcUukdofeL31l/eEBSulCe+D6E0cOXUu5FmXV+eT2gENllyZn2zsR+K hPUP/CvsNG1Qqcqst8Wxs6TFRg== X-Google-Smtp-Source: ALg8bN79ttzTGTtXdASSq0kwSmgMOpjbXbSGhLwpIeLye7gxlRPIWKGEFgVIcaGSokTzE2quyKJaiQ== X-Received: by 2002:a1c:ad45:: with SMTP id w66mr17892760wme.60.1548700403197; Mon, 28 Jan 2019 10:33:23 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:22 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 04/14] dt-bindings: mailbox: qcom: Add clock-name optional property Date: Mon, 28 Jan 2019 19:32:51 +0100 Message-Id: <1548700381-22376-5-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When the APCS clock is registered (platform dependent), it retrieves its parent names from hardcoded values in the driver. The following commit allows the DT node to provide such clock names to the platform data based clock driver therefore avoiding having to explicitly embed those names in the clock driver source code. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz --- .../bindings/mailbox/qcom,apcs-kpss-global.txt | 24 +++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt index 1232fc9..b693103 100644 --- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt +++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt @@ -18,10 +18,11 @@ platforms. Usage: required Value type: Definition: must specify the base address and size of the global block + - clocks: - Usage: required if #clocks-cells property is present - Value type: - Definition: phandle to the input PLL, which feeds the APCS mux/divider + Usage: required if #clock-names property is present + Value type: + Definition: phandles to the two parent clocks of the clock driver. - #mbox-cells: Usage: required @@ -33,6 +34,12 @@ platforms. Value type: Definition: as described in clock.txt, must be 0 +- clock-names: + Usage: required if the platform data based clock driver needs to + retrieve the parent clock names from device tree. + This will requires two mandatory clocks to be defined. + Value type: + Definition: must be "aux" and "pll" = EXAMPLE The following example describes the APCS HMSS found in MSM8996 and part of the @@ -65,3 +72,14 @@ Below is another example of the APCS binding on MSM8916 platforms: clocks = <&a53pll>; #clock-cells = <0>; }; + +Below is another example of the APCS binding on QCS404 platforms: + + apcs_glb: mailbox@b011000 { + compatible = "qcom,qcs404-apcs-apps-global", "syscon"; + reg = <0x0b011000 0x1000>; + #mbox-cells = <1>; + clocks = <&gcc GCC_GPLL0_AO_OUT_MAIN>, <&apcs_hfpll>; + clock-names = "aux", "pll"; + #clock-cells = <0>; + }; From patchwork Mon Jan 28 18:32:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 216E091E for ; Mon, 28 Jan 2019 18:34:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12EF52BA4C for ; Mon, 28 Jan 2019 18:34:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06B052BFE5; Mon, 28 Jan 2019 18:34:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A34ED2BEF7 for ; Mon, 28 Jan 2019 18:34:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727917AbfA1Sd2 (ORCPT ); Mon, 28 Jan 2019 13:33:28 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:32980 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727878AbfA1Sd1 (ORCPT ); Mon, 28 Jan 2019 13:33:27 -0500 Received: by mail-wm1-f67.google.com with SMTP id r24so11105027wmh.0 for ; Mon, 28 Jan 2019 10:33:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0hHd3izZjkE/zbr93sjgSJI16UQMbc5YRiXdFWOT/jk=; b=kI8S6AduKzz9wxl/MDzKM3malF+7UGzYK1zbeBoG8GSNdFgohonCQflEcSHdoTPASw lzFxi7YYPRdbm7u9A4i4mwfq7Z9NQoDBZcCOmUfxZcA5EEpZPKd7qZL7D3Y4XG/dCscu it9CLMygETIGCMm0PJbLFRg787N1t84tffxIs= 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; bh=0hHd3izZjkE/zbr93sjgSJI16UQMbc5YRiXdFWOT/jk=; b=thh0Xa8mpFdvrjkmZkAogwga+oP8KQCm52rAyZIJoDFjqT7/3zva+y6HsbQWrpWs5K QvROWpiDaNt80/vBzly1Sh0bmcZOY9R/D+N9FhapySiMe3CiGVD1X/a3shsxN16UANls WsJmeVqgSzuM+dBJ1lHptlsX9R+IH/6SqqOfE3CsMHuaHRIOXBkIZZHT6JA1kzOJcpv/ LUcq9ZEXkz2TqcwC/O/AtsrnGZnbUdeU5ueYxPVIpyjVDTwJIuYvSjEq4j9nk8s2/Ii4 WfkTpZmWUcDsS/0pa2JAJ+Ao7Hf3GTGxKz87j3dXh29nqt2twsjX4n+4/6DGujaMwR+Y PnCg== X-Gm-Message-State: AJcUukdN1e+Ty5IUZRoVc4pxarqp+nRqH5cA55GhOKJ7w6iwQRTkcWNL vaI5jW9ru01vwjxxPvECzH6JUw== X-Google-Smtp-Source: ALg8bN6t+0vjlFUpTvlcpNaeEM5rLYmpagl1jx/x0bgSvlVKSQhUx/xwm1tGzvEU9vC4IEKq6yUb/g== X-Received: by 2002:a1c:968a:: with SMTP id y132mr17912179wmd.107.1548700405028; Mon, 28 Jan 2019 10:33:25 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:24 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 05/14] clk: qcom: apcs-msm8916: get parent clock names from DT Date: Mon, 28 Jan 2019 19:32:52 +0100 Message-Id: <1548700381-22376-6-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allow accessing the parent clock names required for the driver operation by using the device tree node. This permits extending the driver to other platforms without having to modify its source code. For backwards compatibility leave previous values as default. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz --- drivers/clk/qcom/apcs-msm8916.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/drivers/clk/qcom/apcs-msm8916.c b/drivers/clk/qcom/apcs-msm8916.c index a6c89a3..987ee00 100644 --- a/drivers/clk/qcom/apcs-msm8916.c +++ b/drivers/clk/qcom/apcs-msm8916.c @@ -19,7 +19,7 @@ static const u32 gpll0_a53cc_map[] = { 4, 5 }; -static const char * const gpll0_a53cc[] = { +static const char *gpll0_a53cc[] = { "gpll0_vote", "a53pll", }; @@ -50,6 +50,10 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev) struct regmap *regmap; struct clk_init_data init = { }; int ret = -ENODEV; + struct clk_bulk_data pclks[] = { + [0] = { .id = "aux", .clk = NULL }, + [1] = { .id = "pll", .clk = NULL }, + }; regmap = dev_get_regmap(parent, NULL); if (!regmap) { @@ -61,6 +65,25 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev) if (!a53cc) return -ENOMEM; + /* check if the parent names are present in the device tree */ + ret = devm_clk_bulk_get(parent, ARRAY_SIZE(pclks), pclks); + if (ret == -EPROBE_DEFER) + return ret; + + if (!ret) { + gpll0_a53cc[0] = __clk_get_name(pclks[0].clk); + gpll0_a53cc[1] = __clk_get_name(pclks[1].clk); + a53cc->pclk = pclks[1].clk; + } else { + /* support old binding where only pll was explicitily defined */ + a53cc->pclk = devm_clk_get(parent, NULL); + if (IS_ERR(a53cc->pclk)) { + ret = PTR_ERR(a53cc->pclk); + dev_err(dev, "failed to get clk: %d\n", ret); + return ret; + } + } + init.name = "a53mux"; init.parent_names = gpll0_a53cc; init.num_parents = ARRAY_SIZE(gpll0_a53cc); @@ -76,13 +99,6 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev) a53cc->src_shift = 8; a53cc->parent_map = gpll0_a53cc_map; - a53cc->pclk = devm_clk_get(parent, NULL); - if (IS_ERR(a53cc->pclk)) { - ret = PTR_ERR(a53cc->pclk); - dev_err(dev, "failed to get clk: %d\n", ret); - return ret; - } - a53cc->clk_nb.notifier_call = a53cc_notifier_cb; ret = clk_notifier_register(a53cc->pclk, &a53cc->clk_nb); if (ret) { From patchwork Mon Jan 28 18:32:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E3B7591E for ; Mon, 28 Jan 2019 18:34:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1DED2B8B6 for ; Mon, 28 Jan 2019 18:34:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C50982BEF7; Mon, 28 Jan 2019 18:34:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F2FD2B8B6 for ; Mon, 28 Jan 2019 18:34:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727677AbfA1Se1 (ORCPT ); Mon, 28 Jan 2019 13:34:27 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:32982 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727910AbfA1Sd2 (ORCPT ); Mon, 28 Jan 2019 13:33:28 -0500 Received: by mail-wm1-f67.google.com with SMTP id r24so11105109wmh.0 for ; Mon, 28 Jan 2019 10:33:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CrsB9vDQWUxmYDFtafFb8lMIaGmRCz/1Apw6ozfisK4=; b=KhRO5+csN6b8B+mnXc+NAwS26Oh+divVSo7QhSO3rViTZsfX0dTqWyofGc7paL1I+9 YmjqT4gyn4WWHjSJ2KHFD9EVU19issse0zOzuDZq+GpG8ewfA9hfWkLO/h4AOXwezu78 f/9cKm4qgduRmD5A5un53ljNDnpsg2bd+AxT4= 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; bh=CrsB9vDQWUxmYDFtafFb8lMIaGmRCz/1Apw6ozfisK4=; b=OoBQJrJ+gQ+2USy9lq/4ugHDFZa1FzDqX9NVJ+eBA0HhChS/HNm62+jUWzNK59qKeD wgHV2Bz6GZi/uudmA/kM6G2soGz55VRywqZX68b7RQJiGurPLVLRc4AYpO8tFrgkmWPb dV6AjREe/w1JgXfInY2zHUnhcEn8cNidxptemEnV4uiyhGECGapvSzB4O1m1XvyAmfaO 0WALE5SQOlR6GDn/irtpAjlufcUpSH8gx6qVCmeFT/Vzvn1TaO9RATuChWf1E61W5Ayg hDii2pv3/bwS/TN4a2M5rsSdWxy6RWB/HQZq8CDZVW2ItD6Ovj/CGF+ZpDa+YWuWpO1e bdPg== X-Gm-Message-State: AJcUukfNvSvZwb0jF0YIBdALN5yhhO+cx0GAF9CqgILQ76tPxlEvujEX 0zOfMhWcDDqONSi1n1GOPc4b0w== X-Google-Smtp-Source: ALg8bN5e+//cVztkL1BiaB2dZA1ZoazVcMiftOg308Qtn/CxK5rzHIza9kn/nUZIMqAIDiibN6IchQ== X-Received: by 2002:a1c:5dd1:: with SMTP id r200mr18719376wmb.93.1548700407005; Mon, 28 Jan 2019 10:33:27 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:26 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 06/14] clk: qcom: hfpll: get parent clock names from DT Date: Mon, 28 Jan 2019 19:32:53 +0100 Message-Id: <1548700381-22376-7-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allow accessing the parent clock name required for the driver operation using the device tree node. This permits extending the driver to other platforms without having to modify its source code. For backwards compatibility leave the previous value as default. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz --- drivers/clk/qcom/hfpll.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c index a6de7101..87b7f46 100644 --- a/drivers/clk/qcom/hfpll.c +++ b/drivers/clk/qcom/hfpll.c @@ -52,6 +52,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev) void __iomem *base; struct regmap *regmap; struct clk_hfpll *h; + struct clk *pclk; struct clk_init_data init = { .parent_names = (const char *[]){ "xo" }, .num_parents = 1, @@ -75,6 +76,13 @@ static int qcom_hfpll_probe(struct platform_device *pdev) 0, &init.name)) return -ENODEV; + /* get parent clock from device tree (optional) */ + pclk = devm_clk_get(dev, "xo"); + if (!IS_ERR(pclk)) + init.parent_names = (const char *[]){ __clk_get_name(pclk) }; + else if (PTR_ERR(pclk) == -EPROBE_DEFER) + return -EPROBE_DEFER; + h->d = &hdata; h->clkr.hw.init = &init; spin_lock_init(&h->lock); From patchwork Mon Jan 28 18:32:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AAEDB6C2 for ; Mon, 28 Jan 2019 18:34:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C83D2BC43 for ; Mon, 28 Jan 2019 18:34:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8FAA32BF2E; Mon, 28 Jan 2019 18:34:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 325612BC43 for ; Mon, 28 Jan 2019 18:34:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727929AbfA1SeT (ORCPT ); Mon, 28 Jan 2019 13:34:19 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37818 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727924AbfA1Sda (ORCPT ); Mon, 28 Jan 2019 13:33:30 -0500 Received: by mail-wr1-f68.google.com with SMTP id s12so19218070wrt.4 for ; Mon, 28 Jan 2019 10:33:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jVpmDAqKxQ/sn4lpMw47fV7HcMyJcxjw7jbklh3qbPU=; b=AuLKGXTEF/zJmA5NsI2ZU/MrY8PjDijYbEC7ayTof56dDleGQHTG8AdDA26ctjQtFa H9vffH4TsWwAOXxxxd05+mUnTuz6FxQttOEvnrvbsi+ho4z7s4/hiM7CyWgAvuJUThDt o1WXVLwa8xB2zcnkoJhZfw3cjiaNoa1Da+AD0= 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; bh=jVpmDAqKxQ/sn4lpMw47fV7HcMyJcxjw7jbklh3qbPU=; b=FiuDrSARcRHRxxByoz01AaUdvb75N4qVRKGLx8K5O3yUJfsqDjv4oWrhV7ftFMYapz HA52NbUvEr0aPBhUP/hl+lgIN9CKJH7leHUslerknxLUxBgaJHWj1BsL7O18DDDgCUyE nTHBoYYx2Z5Sa+CwR6gN5KuAhyTB4uo/ElOsbtT8+b59w60hy2wQJ5DSzLFxAj3tfQST of7RIrLvs9nFmzMbvfTxgMzZa8I4WXiFHJhepIpgsOdCNQ/PwUb33gQisYyujQla5x5v lhGktxAWdtkYPVIQ8k2MrK92r3eirNsAJ5ihnBCU16LVA93qvxFANVe+n9KrCohHUWlQ HXxw== X-Gm-Message-State: AJcUukeiu9bGii+VDsie5RvBV7O19Xi4dxdDzCqaPEi0XEEbjNVRZnQl WKCA/Yl3noSuuxn0nZ9mgVWwTg== X-Google-Smtp-Source: ALg8bN4DPSWSntfVf4nxRbsKw8kQvIawgC5fRMRsITJxa8keGe+bq96fbP/BtZDbVmU0kxACokb9wA== X-Received: by 2002:adf:9b11:: with SMTP id b17mr23059241wrc.168.1548700408757; Mon, 28 Jan 2019 10:33:28 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:28 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 07/14] clk: qcom: hfpll: register as clock provider Date: Mon, 28 Jan 2019 19:32:54 +0100 Message-Id: <1548700381-22376-8-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make the output of the high frequency pll a clock provider. On the QCS404 this PLL controls cpu frequency scaling. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Acked-by: Stephen Boyd --- drivers/clk/qcom/hfpll.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c index 87b7f46..0ffed0d 100644 --- a/drivers/clk/qcom/hfpll.c +++ b/drivers/clk/qcom/hfpll.c @@ -53,6 +53,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev) struct regmap *regmap; struct clk_hfpll *h; struct clk *pclk; + int ret; struct clk_init_data init = { .parent_names = (const char *[]){ "xo" }, .num_parents = 1, @@ -87,7 +88,14 @@ static int qcom_hfpll_probe(struct platform_device *pdev) h->clkr.hw.init = &init; spin_lock_init(&h->lock); - return devm_clk_register_regmap(&pdev->dev, &h->clkr); + ret = devm_clk_register_regmap(dev, &h->clkr); + if (ret) { + dev_err(dev, "failed to register regmap clock: %d\n", ret); + return ret; + } + + return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, + &h->clkr.hw); } static struct platform_driver qcom_hfpll_driver = { From patchwork Mon Jan 28 18:32:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D7ED6C2 for ; Mon, 28 Jan 2019 18:33:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFE292BF2E for ; Mon, 28 Jan 2019 18:33:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF3F32BFE8; Mon, 28 Jan 2019 18:33:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85A822BF2E for ; Mon, 28 Jan 2019 18:33:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727988AbfA1Sdc (ORCPT ); Mon, 28 Jan 2019 13:33:32 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:46581 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727967AbfA1Sdc (ORCPT ); Mon, 28 Jan 2019 13:33:32 -0500 Received: by mail-wr1-f66.google.com with SMTP id l9so19165054wrt.13 for ; Mon, 28 Jan 2019 10:33:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+HV8Nby8D/Sn6SAvkoxC802zTo0ynRqZ7bbip7gTvlU=; b=jSm1rIGlQyTPja2+ldYbXDr+A1YqBNWmTeaDsPGMl7TadS2uye65vk+lYjGr8Yox3F 80uPZnH1mldfRsnbu+xQwdKYVWUR16/oHBEGlzc1Ck4LcODmicjYbz0BPrPxx7pAYW7i UdjwgF9oGxKzZb573jtPHKtsEE2WYnR1uGpxs= 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; bh=+HV8Nby8D/Sn6SAvkoxC802zTo0ynRqZ7bbip7gTvlU=; b=syjNgBfrNSWq6eV9Z7eIl9bYi/cIJNSOoj7bvIO7nXrUQWyEy14J7AU5oOr1sP8JxV qRKzWM0FRVFDekcVAbi9+jvkiYUpnMfVqzZsrs++MbDAiUAvbfr+1FxeUCZMrJuYGMd0 w/6oyatXto/iRrRBlnCJq4nVQA3inMQ4iC0won3nhCPXWInrqUz58UKOt4IA46GYFAbw E3wTH3FSF7ZWt0seJCGMuwjvOii9KZkJCxiHVjpw8tKjQnENwKEIvELePynOKg1KSeH2 5Aelx7hNuTdX4AX7TQTeW5sGDzM4F8HC/uPyhQxko0xwrsRVNgD9c79kN46Q2DmRLyML 7Myg== X-Gm-Message-State: AJcUukek5GUYF0QMas2F/wdyCbhwZ8l5FgJ0cuViPM1lwgvwl+Ygq6eF /KjnxIkvp/9cz41LgJLEqEy/fw== X-Google-Smtp-Source: ALg8bN56Btc4EmKhRmzfolsJuEPhFqCUgA9Tle2qQgKO/izjpdp9h32ZsM+121WwJEPOwl4jYwVVBQ== X-Received: by 2002:a5d:6808:: with SMTP id w8mr22035898wru.270.1548700410592; Mon, 28 Jan 2019 10:33:30 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:29 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 08/14] clk: qcom: hfpll: CLK_IGNORE_UNUSED Date: Mon, 28 Jan 2019 19:32:55 +0100 Message-Id: <1548700381-22376-9-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When COMMON_CLK_DISABLED_UNUSED is set, in an effort to save power and to keep the software model of the clock in line with reality, the framework transverses the clock tree and disables those clocks that were enabled by the firmware but have not been enabled by any device driver. If CPUFREQ is enabled, early during the system boot, it might attempt to change the CPU frequency ("set_rate"). If the HFPLL is selected as a provider, it will then change the rate for this clock. As boot continues, clk_disable_unused_subtree will run. Since it wont find a valid counter (enable_count) for a clock that is actually enabled it will attempt to disable it which will cause the CPU to stop. Notice that in this driver, calls to check whether the clock is enabled are routed via the is_enabled callback which queries the hardware. The following commit, rather than marking the clock critical and forcing the clock to be always enabled, addresses the above scenario making sure the clock is not disabled but it continues to rely on the firmware to enable the clock. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz --- drivers/clk/qcom/hfpll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c index 0ffed0d..9d92f5d 100644 --- a/drivers/clk/qcom/hfpll.c +++ b/drivers/clk/qcom/hfpll.c @@ -58,6 +58,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev) .parent_names = (const char *[]){ "xo" }, .num_parents = 1, .ops = &clk_ops_hfpll, + .flags = CLK_IGNORE_UNUSED, }; h = devm_kzalloc(dev, sizeof(*h), GFP_KERNEL); From patchwork Mon Jan 28 18:32:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6765C91E for ; Mon, 28 Jan 2019 18:33:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5637C2BF2E for ; Mon, 28 Jan 2019 18:33:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 491F42BFE8; Mon, 28 Jan 2019 18:33:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2CB02BF2E for ; Mon, 28 Jan 2019 18:33:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727909AbfA1Sde (ORCPT ); Mon, 28 Jan 2019 13:33:34 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:38348 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727967AbfA1Sde (ORCPT ); Mon, 28 Jan 2019 13:33:34 -0500 Received: by mail-wr1-f65.google.com with SMTP id v13so19202401wrw.5 for ; Mon, 28 Jan 2019 10:33:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bXD61WOsWcnEz5wNZP2XyoOaf7zm1bNwGyi1ZRGejfM=; b=f5AyREJ63jdfBtSQujWJw4CHJOH9YzluWQ/QaRbKqB+e9lrZDbflqahEW+dvmoShOK Q8Vcvd59ZbiwSqptctIKZPV7OCvlALFFu4kV+rd6fRuh5QErIT7DMEFj+pG0ucZDjCyA oZK2+7CbBhGiSbBza1Jk/fbW8TMDyu4ejnW+M= 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; bh=bXD61WOsWcnEz5wNZP2XyoOaf7zm1bNwGyi1ZRGejfM=; b=MRaRctlCFt3gbttmx1lli9h5E00iiAXeRCd+vgRvJUFgei9XpjmwDfgrc0ead46uen hZSFWsmweBylvlK8fkw5NFq7cXb7ybrDyEddueQzzJCi7zWpwQ8ibhOwvQhzsGLeXWSu JCtZ1Zoqfe+ipYdXcShlgWBAcQHLEZYLqiSOBpAEhFcKOBezm3iLohni0vRYXFtOTZGz EMJlIktZk+/0/RhOsZ6n0dytKOyh4pzSMx0VPrmL36UzyctB3Cb5o/R8K3kNOjlOm7qn Y/OkZG9yPYU8OdFtwsvDOFSZSBhb7EOBAVnQeL3YdsjT6esElnPcv33TdehJDdaDVT9+ 5Q4Q== X-Gm-Message-State: AJcUukeOgFA9vZDdHhaUVI0mEtMHXNXVaTMigWdrOBSed4dGgnEEQwNg HMjDF1YJR60WcOvsEfFzQvY1/A== X-Google-Smtp-Source: ALg8bN7IUUDiO2kIbBZLQO9YLuKtRgNNn4xP5EB+tVQtTQAJGM2141LERPLElq87BAVY0DZKOPMBWQ== X-Received: by 2002:adf:db51:: with SMTP id f17mr21594735wrj.90.1548700412437; Mon, 28 Jan 2019 10:33:32 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:31 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 09/14] arm64: dts: qcom: msm8916: Add the clocks for the APCS mux/divider Date: Mon, 28 Jan 2019 19:32:56 +0100 Message-Id: <1548700381-22376-10-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Specify the cloks that feed the APCS mux/dirivider instead of using default hardcoded values in the source code. The driver still supports the previous bindings; however with this update it we allow the msm8916 to access the parent clock names required by the driver operation using the device tree node. Signed-off-by: Jorge Ramirez-Ortiz --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index c5348c3..729c117 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -425,7 +425,8 @@ compatible = "qcom,msm8916-apcs-kpss-global", "syscon"; reg = <0xb011000 0x1000>; #mbox-cells = <1>; - clocks = <&a53pll>; + clocks = <&gcc GPLL0_VOTE>, <&a53pll>; + clock-names = "aux", "pll"; #clock-cells = <0>; }; From patchwork Mon Jan 28 18:32:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784421 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44D796C2 for ; Mon, 28 Jan 2019 18:34:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35FA52B81A for ; Mon, 28 Jan 2019 18:34:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29FDC2B887; Mon, 28 Jan 2019 18:34:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D21D72B81A for ; Mon, 28 Jan 2019 18:34:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727461AbfA1SeF (ORCPT ); Mon, 28 Jan 2019 13:34:05 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41565 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728005AbfA1Sdg (ORCPT ); Mon, 28 Jan 2019 13:33:36 -0500 Received: by mail-wr1-f65.google.com with SMTP id x10so19198746wrs.8 for ; Mon, 28 Jan 2019 10:33:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xY2V4sBj5Ds3+SQmdTspSIBla6JHASTE6hEmXoXtqtk=; b=SqulDG1htlstay/n1BHzyLU2JQGWF4RcVpu7TJm73i+S5Fwr+HCfyNcMj/gpDjDYK4 gFskLeTNSduRkgrAzr+oYZGbPzCkSuEcRZ0babBtOqcd4KKxZkGbns0m7Wx7mB4L/1Kk r/8EwQt55R5byIizULDYs4GIaxcrrL7l7/Lh0= 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; bh=xY2V4sBj5Ds3+SQmdTspSIBla6JHASTE6hEmXoXtqtk=; b=QjYggyuqMW1CO77YxlTCWT86OjkFPeYdAQOJe/Op05MOJwoLYsyWU3gb9JXHMjwJIJ ydEaiMXDdiaD1K2Li7qHPLM10mXm1MFj0c7wLBiesi+gGytgXRENEBziKsx7Tp9/tR/6 osB05NHMFBG50DMgMbVHENgwcXq5W5kwhpMt0zg9tBKA5qiP3qCCo5uWWIS0lQRDxYHj ylyw8KfogBYRjlyRdr5Bx19I+c13RVTNR+goOIhdwclIQTze7i45ZIRZrZbnpz/Ne6Z6 o7Puey0obs7KcixsXB/T+scDIxGDW9OTIaUJUvrpQbEmDojmhmZHKKdTxcukzcmuh10H TyRg== X-Gm-Message-State: AJcUukfj6VlPrlO1FhyWpoQPTbIDG88GkD6F0mAWxJ3Dsap31ecfve0o ln3/A1pHF80nUxwoUnzW4jsczg== X-Google-Smtp-Source: ALg8bN5DOJIKZG0xMjU6d3Nh9DE1ZaDcgoyjVebiHC2cVRDceHePkKjSLdouz4HUMHLiqUO88F69nA== X-Received: by 2002:adf:e846:: with SMTP id d6mr23424491wrn.72.1548700414206; Mon, 28 Jan 2019 10:33:34 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:33 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 10/14] arm64: dts: qcom: qcs404: Add OPP table Date: Mon, 28 Jan 2019 19:32:57 +0100 Message-Id: <1548700381-22376-11-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a CPU OPP table to qcs404 Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 9b5c165..4594fea7 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -62,6 +62,21 @@ }; }; + cpu_opp_table: cpu_opp_table { + compatible = "operating-points-v2"; + opp-shared; + + opp-1094400000 { + opp-hz = /bits/ 64 <1094400000>; + }; + opp-1248000000 { + opp-hz = /bits/ 64 <1248000000>; + }; + opp-1401600000 { + opp-hz = /bits/ 64 <1401600000>; + }; + }; + firmware { scm: scm { compatible = "qcom,scm-qcs404", "qcom,scm"; From patchwork Mon Jan 28 18:32:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784399 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E0406C2 for ; Mon, 28 Jan 2019 18:33:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B0A12BF2E for ; Mon, 28 Jan 2019 18:33:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E9452BFE8; Mon, 28 Jan 2019 18:33:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 188E22BF2E for ; Mon, 28 Jan 2019 18:33:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728049AbfA1Sdi (ORCPT ); Mon, 28 Jan 2019 13:33:38 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34678 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728021AbfA1Sdi (ORCPT ); Mon, 28 Jan 2019 13:33:38 -0500 Received: by mail-wr1-f68.google.com with SMTP id f7so19308598wrp.1 for ; Mon, 28 Jan 2019 10:33:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OVxxzmEh7O/wpeFAQp3T6SExbMI3Aurwjiqrjgi1z+A=; b=FP7HwM2TSUkrIzNgUgG81sDzpBy1MOMEoPvqCecdfRPpDpVQ5LmCEuFQKYFV9eBd12 /O3Il73uqXfnJ+Y7g4nX3CpLkaCZm2o4JRrFE+4B2Quez8vvqQN1bIdW86sjujlDMt3b riz5HTi3W5KUdadChQakj9B/2+sw+7Hfj6BLg= 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; bh=OVxxzmEh7O/wpeFAQp3T6SExbMI3Aurwjiqrjgi1z+A=; b=tWtozltbMuXFIZ/7973VM80rQqPtbAELd3f8YnACkQdx1W8xO6QefYSsSMVwOrtr5b ZTg+uIgc/1PToJkJtjMc+dr95yY1obGDlyR2gIUBRE9bFxv6Nng31XvWm5EhPhEqPAC7 rSCZ7xD/z35sgdE2i2sc6dP6AqHmtr/XUGsd2hsBMdrRg/RSlERWN/U9DV40WMs4Kzbg hxj1W9b4gzZZ5AubaZOOvFGxnFMShNL9L27PHeYLormSM08RPxTcuEpA4ir9Jbl8EUIh t7V19UaXNxBnW9WaWo8kIUfCXCi+QLonqj8MLsMXOZi4FqUCpZMPuBz+9x1byBXSsucG a2yA== X-Gm-Message-State: AJcUukeX46iW/CKlH7llhWZ1bZiKuwOe9M0kRQ6IfTH7s6PzwvoKiNr5 t+pyNNow/c28vT1CwMe1AMnM1A== X-Google-Smtp-Source: ALg8bN4SXh1T9ga64YDOTO69/f0UDKj9oqz1dD6hdFF1PkvJnEnxBBXmTr4nQlg7jzgMSnBfwyKZVA== X-Received: by 2002:adf:e7d0:: with SMTP id e16mr23945970wrn.142.1548700416145; Mon, 28 Jan 2019 10:33:36 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:35 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 11/14] arm64: dts: qcom: qcs404: Add HFPLL node Date: Mon, 28 Jan 2019 19:32:58 +0100 Message-Id: <1548700381-22376-12-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The high frequency pll functionality is required to enable CPU frequency scaling operation. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 4594fea7..6a4f8a2 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -62,7 +62,7 @@ }; }; - cpu_opp_table: cpu_opp_table { + cpu_opp_table: cpu-opp-table { compatible = "operating-points-v2"; opp-shared; @@ -375,6 +375,15 @@ #mbox-cells = <1>; }; + apcs_hfpll: clock-controller@b016000 { + compatible = "qcom,hfpll"; + reg = <0x0b016000 0x30>; + #clock-cells = <0>; + clock-output-names = "apcs_hfpll"; + clocks = <&xo_board>; + clock-names = "xo"; + }; + timer@b120000 { #address-cells = <1>; #size-cells = <1>; From patchwork Mon Jan 28 18:32:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784415 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 99EC491E for ; Mon, 28 Jan 2019 18:34:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BAA82B887 for ; Mon, 28 Jan 2019 18:34:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F9472B88F; Mon, 28 Jan 2019 18:34:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B46A2B887 for ; Mon, 28 Jan 2019 18:34:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728199AbfA1Sd6 (ORCPT ); Mon, 28 Jan 2019 13:33:58 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:40127 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728021AbfA1Sdj (ORCPT ); Mon, 28 Jan 2019 13:33:39 -0500 Received: by mail-wm1-f67.google.com with SMTP id f188so14974042wmf.5 for ; Mon, 28 Jan 2019 10:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eKEG4PSnkdw0wbmM3EXS4MNpW9S0VVzPeVsDCYH9cC0=; b=SWu1KohVPEDN62e9GI7Pp9rkyz0nPsSFiKPFv5EbE5rqlP7N4qpbH7R2yCb18KZwcx NoRVga7pQsCg6LhBCy/KapUGZIHkw1Qv65vnXLNJvM0I25SbbcFJeTFK3lF4mlW/GTkc XMwIv5ApWAIvUUyhHR1BVNjTEUDdv08dIyDYY= 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; bh=eKEG4PSnkdw0wbmM3EXS4MNpW9S0VVzPeVsDCYH9cC0=; b=dr1qdd0JbPRvCEOAVMSx6/fZjK7iAlXZhNljZ6l1cLlEpUCivTlVOt9tD6gXjxDoHR HXf3L4mzmkppdpL56UzDFrzBhSRU7nl1p8B9HEUg/7zRjcntBNLnOheBeiIa9UkhyPHZ y1an8+DsHZWvCSStC/Tg7VNcAhGkHA3bm0vOSpM+WeWc7+w0wnHGmkR571jI2qNS5CSH DZgeRTAo7nBQTfcjoEiGln4Q6HAbfBfcLlmTO2+KKTsygFVgOoRpKV32wMRv5dpy+oc1 kmD6qaQnVL/lGxBd2SaJlFvY9AUVh1I4B03p/tm3YQ+KNm37Ib/1Ezrict+qK0p2SzBx ld7w== X-Gm-Message-State: AJcUuke1JmsuVg+S8761Wepy3mnDPd930RS5/Mp5O88MFHcijOpEjxxH hg1GlfrWRhI/WeqRoWj3WpZTDA== X-Google-Smtp-Source: ALg8bN5HBg/3AVwE/R6LQ+V2d+N3KCdQA1GJ9B3JemX+Vubhhdq3SbgrKeSRBV9X2irshm3zsM7/1Q== X-Received: by 2002:a1c:6e01:: with SMTP id j1mr17759452wmc.103.1548700418085; Mon, 28 Jan 2019 10:33:38 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:37 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 12/14] arm64: dts: qcom: qcs404: Add the clocks for APCS mux/divider Date: Mon, 28 Jan 2019 19:32:59 +0100 Message-Id: <1548700381-22376-13-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Specify the clocks that feed the APCS mux/divider instead of using default hardcoded values in the source code. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 6a4f8a2..948ba3c 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -373,6 +373,9 @@ compatible = "qcom,qcs404-apcs-apps-global", "syscon"; reg = <0x0b011000 0x1000>; #mbox-cells = <1>; + clocks = <&gcc GCC_GPLL0_AO_OUT_MAIN>, <&apcs_hfpll>; + clock-names = "aux", "pll"; + #clock-cells = <0>; }; apcs_hfpll: clock-controller@b016000 { From patchwork Mon Jan 28 18:33:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03B776C2 for ; Mon, 28 Jan 2019 18:33:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E64BF2B81A for ; Mon, 28 Jan 2019 18:33:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D62F62B7F7; Mon, 28 Jan 2019 18:33:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F8252B7F7 for ; Mon, 28 Jan 2019 18:33:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728018AbfA1Sdz (ORCPT ); Mon, 28 Jan 2019 13:33:55 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37831 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728060AbfA1Sdl (ORCPT ); Mon, 28 Jan 2019 13:33:41 -0500 Received: by mail-wr1-f66.google.com with SMTP id s12so19218703wrt.4 for ; Mon, 28 Jan 2019 10:33:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5jwkKlS341j7fyk95QNvo70XMLCAjNUCF7cHyyXT/yc=; b=I9vc9C123OGGrDPTEKb5TUh/XNiAw4yOfrCyECVMnCLNqO9xZI5rx/Z6EAJpySXVEt xDwDN/UvvPHwcg1qG1Isdt7DytmzEJEQ6U8ew76/GlCl7yThh6ae2lefENgeb8ucGlZt j7YQ1Z3CclpMfyTSM8r8Mj6GPj7DUjfRMOoDk= 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; bh=5jwkKlS341j7fyk95QNvo70XMLCAjNUCF7cHyyXT/yc=; b=qNviHG7C+X90K0J7HQcQV6l1r7oMURZLGUA4xu+d/6ish1LJFLleyzzSK2JGKqOQcE SSSRN0BBgVvDEBO4pSr0pvCOW+UwjzWo6ytlE7TY9TAJqDD3fdVyBNdCodJgVm6wNgBl 6zenOCKTvBU4t784CdpAn7A1IQcwKK9WCixiTpLYXrvGSgdHEjV3dshHYs8GgY08ucnV 47fsxis2oiyh1NyOauDfp46PzeFM5ngar1vlgvYObCt3+2ec00n0QBOzK3E55BAjwP9a 04okBd/PJDduENNGZ5dwtx+ATe9ANJ7wEm+V4zFhH48B1eaA5jGPq5LdVd4C3kRjSyK1 N7sg== X-Gm-Message-State: AJcUukdYBpTdjuImfAdbW7VkZoz/ve0Sh6CKlQTeoGeWPVciN3WBCo98 ur7p+GzjNfL9nGKN/oNLj1EDaQ== X-Google-Smtp-Source: ALg8bN4ANPmpripSYqtVHClOsBGDkEBMMr4PV/AL/gsrTDBadsPwLHr9Ee1OKnOCk6NaYkvg8yFXLQ== X-Received: by 2002:adf:9521:: with SMTP id 30mr21617095wrs.192.1548700419861; Mon, 28 Jan 2019 10:33:39 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:39 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 13/14] arm64: dts: qcom: qcs404: Add cpufreq support Date: Mon, 28 Jan 2019 19:33:00 +0100 Message-Id: <1548700381-22376-14-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Support CPU frequency scaling on qcs404. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 948ba3c..a0f58bf 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -30,6 +30,8 @@ reg = <0x100>; enable-method = "psci"; next-level-cache = <&L2_0>; + clocks = <&apcs_glb>; + operating-points-v2 = <&cpu_opp_table>; }; CPU1: cpu@101 { @@ -38,6 +40,8 @@ reg = <0x101>; enable-method = "psci"; next-level-cache = <&L2_0>; + clocks = <&apcs_glb>; + operating-points-v2 = <&cpu_opp_table>; }; CPU2: cpu@102 { @@ -46,6 +50,8 @@ reg = <0x102>; enable-method = "psci"; next-level-cache = <&L2_0>; + clocks = <&apcs_glb>; + operating-points-v2 = <&cpu_opp_table>; }; CPU3: cpu@103 { @@ -54,6 +60,8 @@ reg = <0x103>; enable-method = "psci"; next-level-cache = <&L2_0>; + clocks = <&apcs_glb>; + operating-points-v2 = <&cpu_opp_table>; }; L2_0: l2-cache { From patchwork Mon Jan 28 18:33:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 10784403 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C5E66C2 for ; Mon, 28 Jan 2019 18:33:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 596062B576 for ; Mon, 28 Jan 2019 18:33:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CB642B81A; Mon, 28 Jan 2019 18:33:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F26B92B576 for ; Mon, 28 Jan 2019 18:33:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728192AbfA1Sdt (ORCPT ); Mon, 28 Jan 2019 13:33:49 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37833 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728126AbfA1Sdn (ORCPT ); Mon, 28 Jan 2019 13:33:43 -0500 Received: by mail-wr1-f66.google.com with SMTP id s12so19218812wrt.4 for ; Mon, 28 Jan 2019 10:33:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nAEdvq5oOukgk1f4NK11o2gbGIkfrBCRV8yGimK9/ag=; b=NgQTujWor9c8VTUEHGHbjOFEgPwu0ve769eQ9xvenDaBYyKgxpegvFKTQxN/s4L62/ Lj1APdMK6Ty1l0V7p70DAqg39xa+A1ji3EU01bGIg1QTzX8XGEhiZbveaMMDjPnnTcl1 w6c4i+C1/6v5X6xcAzuKryU+xNa2qDOPYZopQ= 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; bh=nAEdvq5oOukgk1f4NK11o2gbGIkfrBCRV8yGimK9/ag=; b=bqgciKjmdKWkqhLqgCT9D3vVoxqexgtvuCUr+4tBkpY2culIIzrbkzyo3qWmRB6ORq U5BBFDFdIXJBVjWGA1u6R1dm/6P2Ah5mpN9+s0EyyNoFzBymE3WFkCVIP1bZMAdTIpiF YZn3r82UhMCOLekjRL2kMEkXsfUNnNgevY38BaJ0vfs0vS5EqhyxwMOm8UhjvlJQRAbD NuJfKn++c5FAqxaGwGDRDhHBWG601N9WfoD5cpSER0W0uRHXiZKvZRNCNIqZuZIlInHk koo51RBSTcCrR7T3HZuHkoAC43Fuh6qZ074ZRCepTAQ9oZlVnrPQzdRVeOMpPQU2fazb rLhg== X-Gm-Message-State: AJcUukcnzxvjSmgOc/U1XGU7Zv4BscQ76Qff3PHpCe09/w5gn5Y9TjCf yTEU0DhAqE+T0zoDrALmoUgLuQ== X-Google-Smtp-Source: ALg8bN67yBhogyL4bLztP2bWrzOaIcBWicT0uuQ3HSZzV8dSmLhZb/MFO/i4OXLnhGrIdQFp/JTbDQ== X-Received: by 2002:adf:9205:: with SMTP id 5mr22721276wrj.189.1548700421706; Mon, 28 Jan 2019 10:33:41 -0800 (PST) Received: from localhost.localdomain (233.red-81-47-145.staticip.rima-tde.net. [81.47.145.233]) by smtp.gmail.com with ESMTPSA id l19sm270082wme.21.2019.01.28.10.33.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:33:41 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, david.brown@linaro.org, jassisinghbrar@gmail.com, mark.rutland@arm.com, mturquette@baylibre.com, robh+dt@kernel.org, will.deacon@arm.com, arnd@arndb.de, horms+renesas@verge.net.au, heiko@sntech.de, sibis@codeaurora.org, enric.balletbo@collabora.com, jagan@amarulasolutions.com, olof@lixom.net Cc: vkoul@kernel.org, niklas.cassel@linaro.org, georgi.djakov@linaro.org, amit.kucheria@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, khasim.mohammed@linaro.org Subject: [PATCH v2 14/14] arm64: defconfig: Enable HFPLL Date: Mon, 28 Jan 2019 19:33:01 +0100 Message-Id: <1548700381-22376-15-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1548700381-22376-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The high frequency pll is required on compatible Qualcomm SoCs to support the CPU frequency scaling feature. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index c8432e2..67f0cca 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -628,6 +628,7 @@ CONFIG_MSM_MMCC_8996=y CONFIG_MSM_GCC_8998=y CONFIG_QCS_GCC_404=y CONFIG_SDM_GCC_845=y +CONFIG_QCOM_HFPLL=y CONFIG_HWSPINLOCK=y CONFIG_HWSPINLOCK_QCOM=y CONFIG_ARM_MHU=y