From patchwork Mon Jul 11 21:06:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 589484 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04281CCA482 for ; Mon, 11 Jul 2022 21:06:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231946AbiGKVGp (ORCPT ); Mon, 11 Jul 2022 17:06:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230070AbiGKVGn (ORCPT ); Mon, 11 Jul 2022 17:06:43 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED67F6BC04; Mon, 11 Jul 2022 14:06:40 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id y4so7768233edc.4; Mon, 11 Jul 2022 14:06:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PGbjfMuKxaOhS50lbNgGWMXPU73MU+jgwIU4egsEGPA=; b=VHt3yMJA1FdLEc0vJgKBkKlQoeeICXVviHGUKPmj8vH+6RyCWVLLO5ruBnZCw43LtF bWnJ2mjToqgKLUwmtDOEyL9optbnMiaLGlmB7sMID5MDftwinTzij/zb8jJ8HpGkYllZ diiQfFf8PKvfjHzDIZ5cpgMFep2a6ZFQ8OYWLjGp4ibGr0RnNvSwk0XKLQ4xpUTA8hyz 2aOFcb4UU9rWuUsBmuUp7523NeX3aAZBAeDmmJMX4WXdpyEhgesdJFUF2wFg0tWH6cuO bDU+pg08bBuQ2+CHEWVxpkSyMlhPpjsl0aMTX+8WMffp1/MvMMP5arfjz9oQQ269jT6b E96A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PGbjfMuKxaOhS50lbNgGWMXPU73MU+jgwIU4egsEGPA=; b=ioOF14CmbrSZ+7+KVvm9syZVkKKbWQpUwjm7KCl4+BINe+dxCd9GpclfqrB3zjhjyl sh008cl4QNywbWB0bLpiiI2RHplVn+ImrnvJy093A6QV1ZVNNfzCPoNjBS/Ynil1ry+/ SdVCR9LXuaZ/3qjU2LKOGjB6W4lig651aAazIC/tKggGwQO5bPMuS8MEt8zB/AQLUeBo BrI/f+HMZtXb32JJCC5gPat2sngkbRbUFxx6JwkJX4ggvvOF4K7bLAOLKc08iNmzpzEF KsgYNGGFaudj8cCqBxPIokejzfJ70erwmUS1BfV+n0x8SXDBKyqAEV2e3kNsqmesmDbY 9bsA== X-Gm-Message-State: AJIora9ekgJv5nLaYonbzu7dter+bUpwKoTUmaSBQpd4lnqLK5qwEImD qp7ezqpLcv3TPLaqcNOgJXtkAcNHDXrsGQ== X-Google-Smtp-Source: AGRyM1sowQ6xE6jpQs3VbaWxjP/XD64VFRDPLbXmWlMdfH3EGGURoUzbtW2b/w7SY2k1ZzQ6wj4mWg== X-Received: by 2002:a05:6402:518b:b0:43a:dc65:35f8 with SMTP id q11-20020a056402518b00b0043adc6535f8mr6501856edd.185.1657573599610; Mon, 11 Jul 2022 14:06:39 -0700 (PDT) Received: from fedora.robimarko.hr (cpe-94-253-165-104.zg.cable.xnet.hr. [94.253.165.104]) by smtp.googlemail.com with ESMTPSA id lb17-20020a170907785100b0072a430d2abdsm3052562ejc.91.2022.07.11.14.06.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 14:06:39 -0700 (PDT) From: Robert Marko To: bjorn.andersson@linaro.org, agross@kernel.org, konrad.dybcio@somainline.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Robert Marko , Dmitry Baryshkov Subject: [PATCH v2 3/7] clk: qcom: apss-ipq6018: mark apcs_alias0_core_clk as critical Date: Mon, 11 Jul 2022 23:06:30 +0200 Message-Id: <20220711210634.3042092-3-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220711210634.3042092-1-robimarko@gmail.com> References: <20220711210634.3042092-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org While fixing up the driver I noticed that my IPQ8074 board was hanging after CPUFreq switched the frequency during boot, WDT would eventually reset it. So mark apcs_alias0_core_clk as critical since its the clock feeding the CPU cluster and must never be disabled. Fixes: 5e77b4ef1b19 ("clk: qcom: Add ipq6018 apss clock controller") Signed-off-by: Robert Marko Reviewed-by: Dmitry Baryshkov --- drivers/clk/qcom/apss-ipq6018.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/qcom/apss-ipq6018.c b/drivers/clk/qcom/apss-ipq6018.c index be952d417ded..f2f502e2d5a4 100644 --- a/drivers/clk/qcom/apss-ipq6018.c +++ b/drivers/clk/qcom/apss-ipq6018.c @@ -56,7 +56,7 @@ static struct clk_branch apcs_alias0_core_clk = { .parent_hws = (const struct clk_hw *[]){ &apcs_alias0_clk_src.clkr.hw }, .num_parents = 1, - .flags = CLK_SET_RATE_PARENT, + .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, .ops = &clk_branch2_ops, }, }, From patchwork Mon Jul 11 21:06:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 589483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F82ACCA486 for ; Mon, 11 Jul 2022 21:06:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231614AbiGKVGp (ORCPT ); Mon, 11 Jul 2022 17:06:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231300AbiGKVGn (ORCPT ); Mon, 11 Jul 2022 17:06:43 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DBC75A451; Mon, 11 Jul 2022 14:06:42 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id j22so10928309ejs.2; Mon, 11 Jul 2022 14:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=87rHYw1h7ZiXA3EtL/T15oHp4poCj2yJmQAssY50qpE=; b=OSME6oao5WcH7dcN/CfQilh7jXArC9VmZ1ehPmxsaHWFDgiqhrVWen1yKwit80ZmaX TcmAyX2eSni8R1zQ3BLdj6ufSTreyqnQccI39XA1nNeGG6AeZhCmnbNyE6AiCpuyPX+n ON7UIwY1/I8U6h8LZ/SvkyIFb7GlvYOGSVNP3s818V11FixK9T0AVIF0vMqKPNlpp0lg zHOJ9sqb94iKhU/CDbVBi7XiABWY7cIatbco9BMAWx77R2T/R7RmwNIBs9LNv1JXQHrs FL7YnK9uPfmFDfH7jqMq1XtBq/bLvXNVg3Kd4lhjqx1jhiYJK5RtXrzS3p72dUkfj955 Mx3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=87rHYw1h7ZiXA3EtL/T15oHp4poCj2yJmQAssY50qpE=; b=aDk5pNtxRxk9Tc2SMML9fW+miZj2CPRqRDih0oprkEVGt7OXNRzIujI6VeUWGoO5pc tzyApq2BzfcNSQvfdXVvIQysm+vvNI4n1SBGz0dZfiz3/LX0ivTE4yFFx0f49dZ+IhJy Feynf5qf2ibc4F5F9c3PeF5TvZbJ1cdlB/H5J5e4EBZzLIy9c6WrAtifOmBhvmgB6Hea 03L0Z1ibMJI5ypRM3fwSvxxqlUme9jF0HUD7SspTaH6fgzmvVmbX6WalqB3fZWqGOJrX xB0+dtnosIHWKtE3EXsh/7mnx6mydtb5q884j9ndpQb8TY3Xa4Z5KjOWlURTm5YvyOWH nlrg== X-Gm-Message-State: AJIora8YZvdeV8ZSS4l2XIJX90Z+lzlvNEV3lJwejFicXoqN4ThKXaHX TVlK4ghn1JAivW3ylyx7nIE= X-Google-Smtp-Source: AGRyM1sHCAo2QnOaev3GH6c+tVTUpIWpHUr+ELOY4dVBRNVXhNsLaNc0aimpzzICufwnFVWc2B/jKA== X-Received: by 2002:a17:907:2c57:b0:72b:32a8:7afc with SMTP id hf23-20020a1709072c5700b0072b32a87afcmr16243526ejc.129.1657573600684; Mon, 11 Jul 2022 14:06:40 -0700 (PDT) Received: from fedora.robimarko.hr (cpe-94-253-165-104.zg.cable.xnet.hr. [94.253.165.104]) by smtp.googlemail.com with ESMTPSA id lb17-20020a170907785100b0072a430d2abdsm3052562ejc.91.2022.07.11.14.06.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 14:06:40 -0700 (PDT) From: Robert Marko To: bjorn.andersson@linaro.org, agross@kernel.org, konrad.dybcio@somainline.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Robert Marko , Krzysztof Kozlowski Subject: [PATCH v2 4/7] dt-bindings: clock: qcom,a53pll: add IPQ8074 compatible Date: Mon, 11 Jul 2022 23:06:31 +0200 Message-Id: <20220711210634.3042092-4-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220711210634.3042092-1-robimarko@gmail.com> References: <20220711210634.3042092-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add IPQ8074 compatible to A53 PLL bindings. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/clock/qcom,a53pll.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,a53pll.yaml b/Documentation/devicetree/bindings/clock/qcom,a53pll.yaml index fbd758470b88..76830816982e 100644 --- a/Documentation/devicetree/bindings/clock/qcom,a53pll.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,a53pll.yaml @@ -17,6 +17,7 @@ properties: compatible: enum: - qcom,ipq6018-a53pll + - qcom,ipq8074-a53pll - qcom,msm8916-a53pll - qcom,msm8939-a53pll From patchwork Mon Jul 11 21:06:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 589482 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 043B8CCA482 for ; Mon, 11 Jul 2022 21:06:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232048AbiGKVGy (ORCPT ); Mon, 11 Jul 2022 17:06:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231948AbiGKVGp (ORCPT ); Mon, 11 Jul 2022 17:06:45 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 322DD76EAB; Mon, 11 Jul 2022 14:06:44 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id eq6so7776191edb.6; Mon, 11 Jul 2022 14:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oLBfjcLmD6YsbkjIodLWwt28j3M7ElYSLrVTRWGG6T4=; b=P4O30aAsE0qULmewnkHhs/ve4U4Oc/1NiXNPJ0EdoJdniA+vFSnPsUXf5BQWw11bEf nizX+v3wwbbMNW5qf3v3ADmPyci2GrTEajFpqfhqIslLDRRYZwmcK0e5nRcgrn34fUrZ 7z0xQzbDWMJ9erpFluUQ72tbvzQHWNW9YAckuBQ0pjBI6Y5QC/IrRY8MJyM3/lvObtyr 6A3ioa77Urqr5qmEXdqs/TZOZLJTYjE1Sl6N4ZXpTcl4dZgcgGUBSR17tjgJdQdGROXF mwXslj+On9YSnMKSFoJatEwpLkccra1SZwzXoNC9zVy6NSdgIF2uZgdWgOsvt2JChYtl a3og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oLBfjcLmD6YsbkjIodLWwt28j3M7ElYSLrVTRWGG6T4=; b=QHv9fVJz8IQ6R0UjW622ibeQCan+rXu322kYEc9yodS3gJJoZ9u5NDXi6r1jGQy12O 8Z+DWIYxlC+m5TIzRFk4Fsoy6KVaIPzvWWxZIXpq8frH7jYzRrffEDJqPWchRlRrUsHM o/zGV7trXGGG4L52Hhh7iBBZs5lb2ygDKONCJnn5zkkM6BT2JGKPe/EShie+/Kd4CkYX PntM1kdWRxVUqDLeFk9LOODoN63P3BYqnf9tdA8nOC8E+fAi+GIa8amCvh7/PB5Bb4mX zYfpjt65bERwK9AU37QVL+6oi1sCWqMUibnaOMrvn9cS3LlWwVE7qxmz6aSJLrMzdN+t ynEg== X-Gm-Message-State: AJIora8eLKYDLb9zseCnF/ArL7deVd1qAEkke+hxzFt+vjthuYqWQDQ1 4Ayh8EShyME0xTvfuRf+sWE= X-Google-Smtp-Source: AGRyM1u2WyDYgjKJPz3dB8Wpohf70WV87DHt2v9c88x/RFHihxzbbyPFGOGbBSezs1UcDFmpRAxsqA== X-Received: by 2002:a05:6402:5cb:b0:434:eb48:754f with SMTP id n11-20020a05640205cb00b00434eb48754fmr27774202edx.421.1657573602805; Mon, 11 Jul 2022 14:06:42 -0700 (PDT) Received: from fedora.robimarko.hr (cpe-94-253-165-104.zg.cable.xnet.hr. [94.253.165.104]) by smtp.googlemail.com with ESMTPSA id lb17-20020a170907785100b0072a430d2abdsm3052562ejc.91.2022.07.11.14.06.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 14:06:42 -0700 (PDT) From: Robert Marko To: bjorn.andersson@linaro.org, agross@kernel.org, konrad.dybcio@somainline.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Robert Marko Subject: [PATCH v2 6/7] clk: qcom: apss-ipq-pll: update IPQ6018 Alpha PLL config Date: Mon, 11 Jul 2022 23:06:33 +0200 Message-Id: <20220711210634.3042092-6-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220711210634.3042092-1-robimarko@gmail.com> References: <20220711210634.3042092-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Update the IPQ6018 Alpha PLL config to the latest one from the downstream 5.4 kernel[1]. This one should match the production SoC-s. Tested on IPQ6018 CP01-C1 reference board. [1] https://git.codelinaro.org/clo/qsdk/oss/kernel/linux-ipq-5.4/-/blob/NHSS.QSDK.12.1.r4/drivers/clk/qcom/apss-ipq-pll.c#L41 Signed-off-by: Robert Marko --- drivers/clk/qcom/apss-ipq-pll.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/apss-ipq-pll.c b/drivers/clk/qcom/apss-ipq-pll.c index ba77749b16c4..a4016f3854c2 100644 --- a/drivers/clk/qcom/apss-ipq-pll.c +++ b/drivers/clk/qcom/apss-ipq-pll.c @@ -39,10 +39,14 @@ static struct clk_alpha_pll ipq_pll = { static const struct alpha_pll_config ipq6018_pll_config = { .l = 0x37, - .config_ctl_val = 0x04141200, - .config_ctl_hi_val = 0x0, + .config_ctl_val = 0x240d4828, + .config_ctl_hi_val = 0x6, .early_output_mask = BIT(3), + .aux2_output_mask = BIT(2), + .aux_output_mask = BIT(1), .main_output_mask = BIT(0), + .test_ctl_val = 0x1c0000C0, + .test_ctl_hi_val = 0x4000, }; static const struct regmap_config ipq_pll_regmap_config = {