From patchwork Mon Jul 11 10:47:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 589438 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 81E74CCA47B for ; Mon, 11 Jul 2022 11:22:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231216AbiGKLWj (ORCPT ); Mon, 11 Jul 2022 07:22:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbiGKLWN (ORCPT ); Mon, 11 Jul 2022 07:22:13 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77047292; Mon, 11 Jul 2022 03:47:26 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id bi22-20020a05600c3d9600b003a04de22ab6so2781920wmb.1; Mon, 11 Jul 2022 03:47:26 -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:mime-version :content-transfer-encoding; bh=+HVJW7F1K6wwajjNiFtroQgNImhSLi34xU+wa1Cgw+Q=; b=Y9GEdopa3o8OdYGhlwPne4NRX97Pjgrb17XEryWJrkZrDb+1vrRA+lsV6YRdNPInRI LSr/l2WKjp/vWEEB5MHPVMxOGRaAxMFA29T76iZYTJPftiVHQOcl5NrRIlwwRAmJCfUu BclJZ9SuLD09Mv6Jv/EBFUOcZ7RJIGYyIHqN2s7uHvdA5V4pok1gCLEBSCe6VGo1tVgW w3HNyBIHnFYiYtgLEyykkpmKsTYpSELhu/fegA2mROBoKjqFxL4+r6x72Kt1cJNJQScz X08ZdIqxzob3KG9kGrGnEbUcacmbesYycFHgMsJQDY8Cc8jCSSEz5zTRHtyeDDgyOl50 qnQg== 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:mime-version :content-transfer-encoding; bh=+HVJW7F1K6wwajjNiFtroQgNImhSLi34xU+wa1Cgw+Q=; b=Zeds8xhabg2RI/V7SpSSlRaOk0xUoQ1gHQbEdELFSvvdVLXeFUtJmR3ofZwbm/oOgx s/dCqu6geCKsg7jOqDwsOuQuBb7iviyDzgsorgiN+AMYTx30xTKtjOU8WCX6BmugliYL 5rPiGQT10mnm3VZvlkxCTf+nAC0187d0bAdr6An6OvhJjes9wllFrGaQWuMTqoMj7ixS ZHOWxk+EOvRW0+YYq/P3b/0EI2P06m15vYAijL9CJcXuVpTHXC6h3nZ8aX7VnT0vuFab G441tXQqsWthgT5dUv2ljkVvEFBNz4Ogdwf5V3T5bcKIstmDDU0+km9P5p2tI462tfHh jmZg== X-Gm-Message-State: AJIora/YFkU402Wqhtrc4x4L6iKjk9hiXM4UwxY9FfPnh+vY30hX2GA9 ACNFFqkKrKg5qal8Xdniyz8= X-Google-Smtp-Source: AGRyM1sLFtigAlMz6p6003Ctun0EzJ4efrh/28U35kZN9NLZUjilcNWAJOQpLy2KnVXLIhPc+xW1pQ== X-Received: by 2002:a05:600c:3594:b0:3a2:b918:fc99 with SMTP id p20-20020a05600c359400b003a2b918fc99mr15305330wmq.46.1657536444932; Mon, 11 Jul 2022 03:47:24 -0700 (PDT) Received: from fedora.robimarko.hr (cpezg-94-253-144-242-cbl.xnet.hr. [94.253.144.242]) by smtp.googlemail.com with ESMTPSA id n3-20020a7bcbc3000000b003a05621dc53sm6338716wmi.29.2022.07.11.03.47.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 03:47:24 -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, sivaprak@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christian Marangi , Robert Marko Subject: [PATCH 1/6] clk: qcom: clk-rcg2: add rcg2 mux ops Date: Mon, 11 Jul 2022 12:47:14 +0200 Message-Id: <20220711104719.40939-1-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Christian Marangi An RCG may act as a mux that switch between 2 parents. This is the case on IPQ6018 and IPQ8074 where the APCS core clk that feeds the CPU cluster clock just switches between XO and the PLL that feeds it. Add the required ops to add support for this special configuration and use the generic mux function to determine the rate. This way we dont have to keep a essentially dummy frequency table to use RCG2 as a mux. Signed-off-by: Christian Marangi Signed-off-by: Robert Marko Reviewed-by: Dmitry Baryshkov --- drivers/clk/qcom/clk-rcg.h | 1 + drivers/clk/qcom/clk-rcg2.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/drivers/clk/qcom/clk-rcg.h b/drivers/clk/qcom/clk-rcg.h index 012e745794fd..01581f4d2c39 100644 --- a/drivers/clk/qcom/clk-rcg.h +++ b/drivers/clk/qcom/clk-rcg.h @@ -167,6 +167,7 @@ struct clk_rcg2_gfx3d { extern const struct clk_ops clk_rcg2_ops; extern const struct clk_ops clk_rcg2_floor_ops; +extern const struct clk_ops clk_rcg2_mux_closest_ops; extern const struct clk_ops clk_edp_pixel_ops; extern const struct clk_ops clk_byte_ops; extern const struct clk_ops clk_byte2_ops; diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c index 28019edd2a50..609c10f8d0d9 100644 --- a/drivers/clk/qcom/clk-rcg2.c +++ b/drivers/clk/qcom/clk-rcg2.c @@ -509,6 +509,13 @@ const struct clk_ops clk_rcg2_floor_ops = { }; EXPORT_SYMBOL_GPL(clk_rcg2_floor_ops); +const struct clk_ops clk_rcg2_mux_closest_ops = { + .determine_rate = __clk_mux_determine_rate_closest, + .get_parent = clk_rcg2_get_parent, + .set_parent = clk_rcg2_set_parent, +}; +EXPORT_SYMBOL_GPL(clk_rcg2_mux_closest_ops); + struct frac_entry { int num; int den; From patchwork Mon Jul 11 10:47:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 590532 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 1895EC433EF for ; Mon, 11 Jul 2022 11:22:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231327AbiGKLWm (ORCPT ); Mon, 11 Jul 2022 07:22:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230525AbiGKLWN (ORCPT ); Mon, 11 Jul 2022 07:22:13 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F8BC296; Mon, 11 Jul 2022 03:47:27 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id v16so6413262wrd.13; Mon, 11 Jul 2022 03:47:27 -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=UP31sMO9ev0YI1wu9H4pD9/GKwcBABggRKQQahs3BhI=; b=DoWFecGol1OUhOEfouROsGiN2gcYd41iWsx0RHh5C9D4L7hMKk9bztfyX2fGRflx2r t9Xrr3Q7AnnK2PbOD4QMmxz8dVM3pS66gGlpUoBPDFyiYry0Y9z/oidKkpL2prNsyflU MUZRZJeiyrxEvNMY8CiASaqu9svlbECeJC0QVaE/vknjzTmf4cZgE7uv3KLGzLManUkv GxM77gS/py2ZNtiF1/xBD18Tv0lZrP0NaR1XgQ2Hd3aswDIEsgRb9LDUG1YUiM/ejyCM ug1m05uOl9Vsw0lx3HiTjU0RuSqbXFYUdu1yC8hwCrx5t+kptUtZKPcJWQ9rJCSI/kVQ cVkw== 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=UP31sMO9ev0YI1wu9H4pD9/GKwcBABggRKQQahs3BhI=; b=r+llqCUniD9CdRR/NMwCvFxbb1djjBegKlOYhAgoLtkmuBOwcAvwchK1RIzc08N853 WpXLshnWYMujv499QI+f5TU7YYJn1fNQQjJqgUZ1wG6Y3RH6/wO+OLq8mbgqHeqjr4a7 6xNZ7Pf9Wtav8IC0qwb6ab6sU0xUKIbHm+RxwmH0PIOT8Bnfq68qMMOzupXclNViTiSt RpdHYcTxQSxU4501EK5Bcuqpr3IPzb0LHBjG0iEwRnUbP8Rm8cWDZ3PXRshu4TUnaEy9 u4C2oHH+71JHa8IQbT5YYZMmfdHYbz4BoqyIcISlXFLwgQU8Q6ZvOxYfQ9P0aL2IAoAR jNUA== X-Gm-Message-State: AJIora+3v2bhkAa5wVwxju9q7Sk3Q5jXD1ZAuZNCzWObaUngv/K8fNBs pBQ09iNInLmnDKNEbgDM/Ws= X-Google-Smtp-Source: AGRyM1vQHPKrDAjCiX+pf+69oiSKb4f4bNkB/VrKO0yLsbXfEAeX6V09s9j0r+8M0+ZpqGwBc3fnrQ== X-Received: by 2002:a5d:64a3:0:b0:21d:ad9e:afd7 with SMTP id m3-20020a5d64a3000000b0021dad9eafd7mr20320wrp.524.1657536445957; Mon, 11 Jul 2022 03:47:25 -0700 (PDT) Received: from fedora.robimarko.hr (cpezg-94-253-144-242-cbl.xnet.hr. [94.253.144.242]) by smtp.googlemail.com with ESMTPSA id n3-20020a7bcbc3000000b003a05621dc53sm6338716wmi.29.2022.07.11.03.47.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 03:47:25 -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, sivaprak@codeaurora.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 2/6] clk: qcom: apss-ipq6018: fix apcs_alias0_clk_src Date: Mon, 11 Jul 2022 12:47:15 +0200 Message-Id: <20220711104719.40939-2-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220711104719.40939-1-robimarko@gmail.com> References: <20220711104719.40939-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org While working on IPQ8074 APSS driver it was discovered that IPQ6018 and IPQ8074 use almost the same PLL and APSS clocks, however APSS driver is currently broken. More precisely apcs_alias0_clk_src is broken, it was added as regmap_mux clock. However after debugging why it was always stuck at 800Mhz, it was figured out that its not regmap_mux compatible at all. It is a simple mux but it uses RCG2 register layout and control bits, so utilize the new clk_rcg2_mux_closest_ops to correctly drive it while not having to provide a dummy frequency table. While we are here, use ARRAY_SIZE for number of parents. Tested on IPQ6018-CP01-C1 reference board and multiple IPQ8074 boards. Fixes: 5e77b4ef1b19 ("clk: qcom: Add ipq6018 apss clock controller") Signed-off-by: Robert Marko --- drivers/clk/qcom/apss-ipq6018.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/clk/qcom/apss-ipq6018.c b/drivers/clk/qcom/apss-ipq6018.c index d78ff2f310bf..be952d417ded 100644 --- a/drivers/clk/qcom/apss-ipq6018.c +++ b/drivers/clk/qcom/apss-ipq6018.c @@ -16,7 +16,7 @@ #include "clk-regmap.h" #include "clk-branch.h" #include "clk-alpha-pll.h" -#include "clk-regmap-mux.h" +#include "clk-rcg.h" enum { P_XO, @@ -33,16 +33,15 @@ static const struct parent_map parents_apcs_alias0_clk_src_map[] = { { P_APSS_PLL_EARLY, 5 }, }; -static struct clk_regmap_mux apcs_alias0_clk_src = { - .reg = 0x0050, - .width = 3, - .shift = 7, +static struct clk_rcg2 apcs_alias0_clk_src = { + .cmd_rcgr = 0x0050, + .hid_width = 5, .parent_map = parents_apcs_alias0_clk_src_map, .clkr.hw.init = &(struct clk_init_data){ .name = "apcs_alias0_clk_src", .parent_data = parents_apcs_alias0_clk_src, - .num_parents = 2, - .ops = &clk_regmap_mux_closest_ops, + .num_parents = ARRAY_SIZE(parents_apcs_alias0_clk_src), + .ops = &clk_rcg2_mux_closest_ops, .flags = CLK_SET_RATE_PARENT, }, }; From patchwork Mon Jul 11 10:47:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 589437 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 D605ECCA486 for ; Mon, 11 Jul 2022 11:22:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231320AbiGKLWl (ORCPT ); Mon, 11 Jul 2022 07:22:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230515AbiGKLWN (ORCPT ); Mon, 11 Jul 2022 07:22:13 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 790D729D; Mon, 11 Jul 2022 03:47:28 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id be14-20020a05600c1e8e00b003a04a458c54so2769184wmb.3; Mon, 11 Jul 2022 03:47:28 -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=EmmKDO3uSNG8KEjBRQCwO0eqGFCI/Gc3kxhTePWS+oA=; b=lu88mRBppIIfqRSXhSLApFkduMzkcU/MYd++hUvqpSneCZKuVtSxI7gZYLDnTK8YuE XR99aShIOhDWOthEWCDDjZ0nbtQO/AjbLBWoM1FqNC4x3LStMszrYm79RQK9zs2mTr23 ahGWJe/WXL+f6jp+SAc+L/G4NcGyevKVz/K1Lvj6GgL1K4DrifYLv5UBkQY2QuF77Tdr /xUFATGR+srl9tufBfrB8so/IbBOXAGunt7ufqK0I9Qd0gVb0JL7QPrtnE6wczjoQv5Z Xl8yWW06qeHqUa3N7ZyrDB0UW8p1YMPSCeBS4WDe92pFeKqYMEDoVN7emXEjsplymimX 7BLg== 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=EmmKDO3uSNG8KEjBRQCwO0eqGFCI/Gc3kxhTePWS+oA=; b=yMfrgnShWVf54QxE9Lfxt2QGm1CgVWYeBf0DiYtjO04ler7ocKaoYrIlO1HvF2TUbb 9RMySnCsGCE9ifJjt+B1Nn4GnikgN2Uc9GElV8A3+YpQFVd36RpO3i34tnAV3EYX5KHD I1HIEE5JNS6q495B2h4orC0WuC/ckj1ef33CzRSiXDJwsNV6FHEx0v3DBwPs2AYkNjGU Nidl48GFjtmH7iR5r1gyak9ZOOga7KuPjwwOuBv+yMZGJdom4YUfdjhqu9DHcl5OdgjW T72VFzvzCpe7PWtAp+u0a70X9CgCfh1vjwZWx79McLeTTeEbNw2hhkLfOHeBT0qWxPWT 4qPA== X-Gm-Message-State: AJIora96XhrVTOc6ihw0QxLiYWar5WMpMIiPvVxseamjOnYNfHi8FMuk Mq3F96/YhnaMDk8qknWG7e0= X-Google-Smtp-Source: AGRyM1saqJy8yDxoRKR0T3TrtOTforlsoeAZeizzqapkU7iORZzdTpxt1HeudfqsZIpl3xs/wB1hrw== X-Received: by 2002:a1c:43c5:0:b0:3a2:e4f5:4b17 with SMTP id q188-20020a1c43c5000000b003a2e4f54b17mr8400927wma.26.1657536447072; Mon, 11 Jul 2022 03:47:27 -0700 (PDT) Received: from fedora.robimarko.hr (cpezg-94-253-144-242-cbl.xnet.hr. [94.253.144.242]) by smtp.googlemail.com with ESMTPSA id n3-20020a7bcbc3000000b003a05621dc53sm6338716wmi.29.2022.07.11.03.47.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 03:47:26 -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, sivaprak@codeaurora.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 3/6] clk: qcom: apss-ipq6018: mark apcs_alias0_core_clk as critical Date: Mon, 11 Jul 2022 12:47:16 +0200 Message-Id: <20220711104719.40939-3-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220711104719.40939-1-robimarko@gmail.com> References: <20220711104719.40939-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 --- 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 10:47:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 590533 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 38406CCA483 for ; Mon, 11 Jul 2022 11:22:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231297AbiGKLWk (ORCPT ); Mon, 11 Jul 2022 07:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbiGKLWN (ORCPT ); Mon, 11 Jul 2022 07:22:13 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A537E2C6; Mon, 11 Jul 2022 03:47:29 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id c131-20020a1c3589000000b003a2cc290135so3227523wma.2; Mon, 11 Jul 2022 03:47:29 -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=h5sGBWR3FcOu4ndXXLV8wh7OA3cFA3qO4dsqfXS0h5I=; b=VnYosmynBfWs9+TJPlHzLVo72GL81mwWTvIHpkPGK3PuW5FAGZmSZNt23w93R4VlTC 75yGRWWB1tGI5SXEHh5wpX3Hd4gFI57qAjCg5lPdl0bWcYCAkrlPQDu3DcsJ6lftmedE PgA7rZnqnZ7r33a1fHZ9IquVzgPgNs2allHECbsMSjv9FYSYFrPvot8jY6rdDx8oK5xg AmwgOvcYrW9iM2iwFg1YdcBUbvrQJg5ymwY3AD/zzd9b1cz6HgjVnVjdoOVpiwQ0dQCl MWAfvYqIdllSlaphVYgDS0ly9WNgCKneMnj9sboAoBnvzFeH2FJYuTM+/qlN719BKCLV qntg== 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=h5sGBWR3FcOu4ndXXLV8wh7OA3cFA3qO4dsqfXS0h5I=; b=eCq1l8LnMcmkTcROtACTnVd6hqhV8GR7JiBI5bbd/bSQFjKBR4Kv6Uxj61dtLIhfjc 1/wAYEKmaVoqxXzjFKw8D2wcO/Dh4Pm1peAvmkUfHT/8aYVBlV2CdhIlDTKkssNyLind DrEgoM3sd6E8V/g9OzWU91Snla8hpW9e3HhINUpBzxzphu2tfDKN9HiFFtLvUeKJqTDc 4yESrZyvp93CmHM27cjaaOF0CsPhbZhqLbcfSS8kJZjXYWhdceEPlKgucE7sFeyXgSvc sXUr45J3AgF/cFYDeTWG8bdwwkKWHzvwqIf5VTJH7XSKVVhNXmtfsibz5EeLdkkb6ePM iYaQ== X-Gm-Message-State: AJIora8XlpOsol1EcH2wFA9K8DE2lm5Im/Q3PK7xiGOJFuo5atKgT2MX DaWMQIC0qQFb55MKV/NUfx4= X-Google-Smtp-Source: AGRyM1uNSae1ihMNFCVWStempFNQyfK+UljgmR1EQz26ytx0ZKRpwy9lhteRL/+81izNWyEwztoRTw== X-Received: by 2002:a05:600c:40d5:b0:3a1:8d0f:db47 with SMTP id m21-20020a05600c40d500b003a18d0fdb47mr15314533wmh.138.1657536448283; Mon, 11 Jul 2022 03:47:28 -0700 (PDT) Received: from fedora.robimarko.hr (cpezg-94-253-144-242-cbl.xnet.hr. [94.253.144.242]) by smtp.googlemail.com with ESMTPSA id n3-20020a7bcbc3000000b003a05621dc53sm6338716wmi.29.2022.07.11.03.47.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 03:47:28 -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, sivaprak@codeaurora.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 4/6] clk: qcom: apss-ipq6018: add MODULE_ALIAS Date: Mon, 11 Jul 2022 12:47:17 +0200 Message-Id: <20220711104719.40939-4-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220711104719.40939-1-robimarko@gmail.com> References: <20220711104719.40939-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add MODULE_ALIAS so that driver will be autoloaded if built as a module. Signed-off-by: Robert Marko --- drivers/clk/qcom/apss-ipq6018.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/qcom/apss-ipq6018.c b/drivers/clk/qcom/apss-ipq6018.c index f2f502e2d5a4..963c69f2c0c2 100644 --- a/drivers/clk/qcom/apss-ipq6018.c +++ b/drivers/clk/qcom/apss-ipq6018.c @@ -101,5 +101,6 @@ static struct platform_driver apss_ipq6018_driver = { module_platform_driver(apss_ipq6018_driver); +MODULE_ALIAS("platform:qcom,apss-ipq6018-clk"); MODULE_DESCRIPTION("QCOM APSS IPQ 6018 CLK Driver"); MODULE_LICENSE("GPL v2"); From patchwork Mon Jul 11 10:47:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 589436 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 9F121CCA480 for ; Mon, 11 Jul 2022 11:22:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231156AbiGKLWn (ORCPT ); Mon, 11 Jul 2022 07:22:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231250AbiGKLWN (ORCPT ); Mon, 11 Jul 2022 07:22:13 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5600B1F; Mon, 11 Jul 2022 03:47:30 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id v10-20020a05600c15ca00b003a2db8aa2c4so2776878wmf.2; Mon, 11 Jul 2022 03:47:30 -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=yIboIxQuAfrUWzSoLEOVgFtmcLKnX85uUb2His2TGbY=; b=dOJyfD9l6amfDM3zplFOXRyFmKj5AwfAxqo+vWqeLJtBapQVPT1lWvTCnpEAmlhwwm nUx4/i/bkomrny7/7NIM8PcnU3WLhI7/y4MFmIP8ZOIW4fwRHrRzbijn78phwZuVX1BC 7qmkreHu+04MuaLE804IhOJ1cr/C8dWdFZQdDk/Rz5m+p6IOXwbjc+37EVn1EXlPMlxm bmRQ/r7I35EQC2X9k0bNpZSEOZWlZRk328dsRXyWKkExDl2c+yPOQiEnJpIFu7KYS3vJ VObY1gj8ta1miFAG+/u4ev8pip0mRWHJ30EtkQg2QwNFL45IXl/3486ECA5SaUnqw1pq ZNQg== 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=yIboIxQuAfrUWzSoLEOVgFtmcLKnX85uUb2His2TGbY=; b=bBqn6Qh0fOJ8xt9mW3BHsnTh6pgcYumCinOjmWvsWk07d5ExZ8sGOaz1xIlf3C7BO7 ICd1lhASpv+9Sr2Ke9qp6zNijqqok1bgRmXOkOLEh7sCZHyO4S6RsozS8JS39FtkStKN VbskwlTsWSFBXVqU4mqyjr3fzFqK/oXRD4OSiwjFhMgZUKlPbcNpxwyFY1XQdIUqSTEU 5p3q7lHq/3l7f7XdLkwotge5ATQbwHWfWexh9ySafxeSjByeafYJeJOiq8epF/FmQdwt 6jcNOxDM82xeel4hLRPTMaCN4WaoA6MqohKL1lgigvkwQ7/xnTNfwXphueeBUVqj0B9Q u67g== X-Gm-Message-State: AJIora8bQhR+kl24BjFmmbG71CnPU8cnk8Y5ZrrbGMHUVBTqsZacohy6 3++3sJj9LgjZB+8QSWoY3vU= X-Google-Smtp-Source: AGRyM1vU/SdEQIabKWNF5X4Uup1rp0Z87VjUhlm5s8YuiLECN1N+WHPmrhd6HkVn4oJ/V4uUBh3IiA== X-Received: by 2002:a05:600c:5007:b0:3a1:7c44:44f5 with SMTP id n7-20020a05600c500700b003a17c4444f5mr14911653wmr.106.1657536449360; Mon, 11 Jul 2022 03:47:29 -0700 (PDT) Received: from fedora.robimarko.hr (cpezg-94-253-144-242-cbl.xnet.hr. [94.253.144.242]) by smtp.googlemail.com with ESMTPSA id n3-20020a7bcbc3000000b003a05621dc53sm6338716wmi.29.2022.07.11.03.47.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 03:47:29 -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, sivaprak@codeaurora.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 5/6] dt-bindings: clock: qcom,a53pll: add IPQ8074 compatible Date: Mon, 11 Jul 2022 12:47:18 +0200 Message-Id: <20220711104719.40939-5-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220711104719.40939-1-robimarko@gmail.com> References: <20220711104719.40939-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add IPQ8074 compatible to A53 PLL bindings. Signed-off-by: Robert Marko --- 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 10:47:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 590531 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 32EECCCA486 for ; Mon, 11 Jul 2022 11:22:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231138AbiGKLWp (ORCPT ); Mon, 11 Jul 2022 07:22:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230518AbiGKLWN (ORCPT ); Mon, 11 Jul 2022 07:22:13 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CA96C63; Mon, 11 Jul 2022 03:47:32 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id i128-20020a1c3b86000000b003a2ce31b4f8so4766550wma.1; Mon, 11 Jul 2022 03:47:32 -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=p9Xxii6Uq6u9N4X9oYLMMJTBOBPZ/anZfpBCj5Ubmss=; b=LTujsVZix7h6BZ9Fu6GkqRc7KU/djhhG8DEQFwsjI8G0et0Su0qzUI4NqppjrL7mbR +xQCdUcK+OVS4g6k/Xy2OKnbFEIsWppVfcxpe/Ych5OrE1QIP7Zjm6Z5zN4G35mh0c3L aI7FImD7Q4BkCX4FiXUXiMwlAgs9sqi6kVStPj1bA+oTKsMQqLpK0/AtEBTYHn+1fpjG TF9ioYH/k7jM9EQGX2Xnwh5j9fwBHgwgDCHtADDoANb+eyBTu7mIeubNxRjtNMSoUht0 f4x1Z5LDmSm9NPcboilp8YIlhHl64Di1pnGjuV+Q4+86nAJvLiIUFl6RHGyV47urNpH+ 6TGw== 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=p9Xxii6Uq6u9N4X9oYLMMJTBOBPZ/anZfpBCj5Ubmss=; b=jJhw7OGslzRHvh7hcpz3WaGK3tterWWOTuWNjlVhpkgpk+uzCU6BbyY4EldF3NCPdG InyUQcwo31uXjsNKHSvYx3mqmQiO265R4OwgIrSStXZQRj/KVTvSozV5lad1/Tb6vHuA APMCFomQRSKycYMTmTWC5bSOX/9qWcCRxEzjkMaOmBX9/j51tP8ACzSnQ6BgAFpWiXLq ZVD/XerdYR84nlNl4e29Il53Xaaj5r1BA2QrioHHhWHVObvZSy9LtVVL9pjzen1xR9aj tlCB4IMTwliC277pNet+Kf8YQs6kKdkIGaKTPCKuFl29M3GaJ/iKjS5MND7Q3coTpoIW QXCA== X-Gm-Message-State: AJIora9I1/kYx4JHc9/rLZNWZghQqoyurjc2TeivT4r4IGV2OBMjTBLp jp1kaq8b9IDwCFmvkZzKm04= X-Google-Smtp-Source: AGRyM1ubXzhdRxrqkXB7Mv+HHP19cm7y/4ukC8Ipx3ZqQ2G/C9rnnt24ptNZa1snJ2I+jVys8wY2AA== X-Received: by 2002:a05:600c:19cd:b0:3a1:77b6:cf1d with SMTP id u13-20020a05600c19cd00b003a177b6cf1dmr14765791wmq.141.1657536450823; Mon, 11 Jul 2022 03:47:30 -0700 (PDT) Received: from fedora.robimarko.hr (cpezg-94-253-144-242-cbl.xnet.hr. [94.253.144.242]) by smtp.googlemail.com with ESMTPSA id n3-20020a7bcbc3000000b003a05621dc53sm6338716wmi.29.2022.07.11.03.47.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 03:47:30 -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, sivaprak@codeaurora.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 6/6] clk: qcom: apss-ipq-pll: add support for IPQ8074 Date: Mon, 11 Jul 2022 12:47:19 +0200 Message-Id: <20220711104719.40939-6-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220711104719.40939-1-robimarko@gmail.com> References: <20220711104719.40939-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for IPQ8074 since it uses the same PLL setup, however it does not require the Alpha PLL to be reconfigured. Signed-off-by: Robert Marko --- drivers/clk/qcom/apss-ipq-pll.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/apss-ipq-pll.c b/drivers/clk/qcom/apss-ipq-pll.c index bef7899ad0d6..acfb3ec4f142 100644 --- a/drivers/clk/qcom/apss-ipq-pll.c +++ b/drivers/clk/qcom/apss-ipq-pll.c @@ -55,6 +55,7 @@ static const struct regmap_config ipq_pll_regmap_config = { static int apss_ipq_pll_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; + struct device_node *node = dev->of_node; struct regmap *regmap; void __iomem *base; int ret; @@ -67,7 +68,8 @@ static int apss_ipq_pll_probe(struct platform_device *pdev) if (IS_ERR(regmap)) return PTR_ERR(regmap); - clk_alpha_pll_configure(&ipq_pll, regmap, &ipq_pll_config); + if (of_device_is_compatible(node, "qcom,ipq6018-a53pll")) + clk_alpha_pll_configure(&ipq_pll, regmap, &ipq_pll_config); ret = devm_clk_register_regmap(dev, &ipq_pll.clkr); if (ret) @@ -79,6 +81,7 @@ static int apss_ipq_pll_probe(struct platform_device *pdev) static const struct of_device_id apss_ipq_pll_match_table[] = { { .compatible = "qcom,ipq6018-a53pll" }, + { .compatible = "qcom,ipq8074-a53pll" }, { } }; MODULE_DEVICE_TABLE(of, apss_ipq_pll_match_table);