From patchwork Tue Jul 5 19:13:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587457 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 4907ECCA47C for ; Tue, 5 Jul 2022 19:13:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233453AbiGETNe (ORCPT ); Tue, 5 Jul 2022 15:13:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233410AbiGETNd (ORCPT ); Tue, 5 Jul 2022 15:13:33 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 259F31D0D0; Tue, 5 Jul 2022 12:13:31 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id g1so8889289edb.12; Tue, 05 Jul 2022 12:13:31 -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=1DHr3dlbu11ZSPjOSWP4Cb4EOGiEz88WTyi5xy5SNpg=; b=PSTYZ66iuhVFhKZWCuqj5jrqrBH9TGzrmfApPdEz9wuOGH5/arvzREI7P2DABXF3Sn OuNmt4hkVTlODCIxe7hl+55vEteCjKFB6HpGsagrnzG/FmtVrgbg0qdz84FecenHnfiY +Gi0e3nBZ0x5kiNP4lPme8Oqj/no5S/+hPkoy42yNafI5r1WkOlWKXX5TTar/zHl5vTC aIb9DE+TavZy7b0t+FUDcoFhtOgvE/ZOs8v4kkD/vay5kKNK67Cw9+WgYUJ4te1vI8mN xmlBQEhkS8xhAjETplJrgNBA4RPpNlexYjFQn+9zLN3HZP50za2GmF76J4Nr9rbOGhRY 1CHw== 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=1DHr3dlbu11ZSPjOSWP4Cb4EOGiEz88WTyi5xy5SNpg=; b=yBWsvheKAqS2Shj5rUpiWAxVhKWX85tYrXywfg6cWdjRDi0D5KikJOF4+zxsluNqgn Rk8JHQ2y3v6ifyvbwqfxkBCo/8N+0NlPyaxVisR8TomW95xuKtyePgJ53m8GETS+1JMM ncgZ5nXTA7OKVUVlT8TTgyGI5EIUdZ4eJKXHkooZ8BJkU/MvWMQTvMOB3wwglmDIQJwu 6/lLlJZ5rZk7k/HBQV7TzFeaf7qMfPKKBHkARtWcbV79CMDyxIXg62tsGaCBJkfISVSx ii3CkhJ2vOfwPBxzB9lLB/OdQNTL+D+f7BnwDddA4hUBk6yIv55CytlqDcvyJbwpsI5L rgPw== X-Gm-Message-State: AJIora/WqOZfQ5ySmrE9VkjO6CDdXxlUgg2kKEsQchTPnfoep4yFPRnW wxOoaieHFq0EpeA7gy0On0rVnoIfsNMqDQ== X-Google-Smtp-Source: AGRyM1ulAHmR54VJt5wjmRJ1Ef1tX9p+B88XgkrxSiFFzChKYLHWxB+bNmhxvy+EtraFHUwPBiCR3w== X-Received: by 2002:a05:6402:538d:b0:435:7ca6:a136 with SMTP id ew13-20020a056402538d00b004357ca6a136mr49978401edb.268.1657048409696; Tue, 05 Jul 2022 12:13:29 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-13.xnet.hr. [88.207.99.13]) by smtp.googlemail.com with ESMTPSA id o19-20020aa7c7d3000000b0043a75f62155sm2480365eds.86.2022.07.05.12.13.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 12:13:29 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, jassisinghbrar@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Robert Marko Subject: [PATCH v5 1/3] mailbox: qcom-apcs-ipc: add IPQ8074 APSS clock controller support Date: Tue, 5 Jul 2022 21:13:25 +0200 Message-Id: <20220705191327.1684277-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 IPQ8074 has the APSS clock controller utilizing the same register space as the APCS, so provide access to the APSS utilizing a child device like IPQ6018 does as well, but just by utilizing the IPQ8074 specific APSS clock driver. Also, APCS register space in IPQ8074 is 0x6000 so max_register needs to be updated to 0x5ffc. Signed-off-by: Robert Marko --- Changes in v5: * Use lower case hex for max_register * Update the APSS clock name to match the new one without commas --- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c index 80a54d81412e..4ef7e917a911 100644 --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c @@ -33,6 +33,10 @@ static const struct qcom_apcs_ipc_data ipq6018_apcs_data = { .offset = 8, .clk_name = "qcom,apss-ipq6018-clk" }; +static const struct qcom_apcs_ipc_data ipq8074_apcs_data = { + .offset = 8, .clk_name = "qcom-apss-ipq8074-clk" +}; + static const struct qcom_apcs_ipc_data msm8916_apcs_data = { .offset = 8, .clk_name = "qcom-apcs-msm8916-clk" }; @@ -57,7 +61,7 @@ static const struct regmap_config apcs_regmap_config = { .reg_bits = 32, .reg_stride = 4, .val_bits = 32, - .max_register = 0x1008, + .max_register = 0x5ffc, .fast_io = true, }; @@ -142,7 +146,7 @@ static int qcom_apcs_ipc_remove(struct platform_device *pdev) /* .data is the offset of the ipc register within the global block */ static const struct of_device_id qcom_apcs_ipc_of_match[] = { { .compatible = "qcom,ipq6018-apcs-apps-global", .data = &ipq6018_apcs_data }, - { .compatible = "qcom,ipq8074-apcs-apps-global", .data = &msm8994_apcs_data }, + { .compatible = "qcom,ipq8074-apcs-apps-global", .data = &ipq8074_apcs_data }, { .compatible = "qcom,msm8916-apcs-kpss-global", .data = &msm8916_apcs_data }, { .compatible = "qcom,msm8939-apcs-kpss-global", .data = &msm8916_apcs_data }, { .compatible = "qcom,msm8953-apcs-kpss-global", .data = &msm8994_apcs_data }, From patchwork Tue Jul 5 19:10: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: 587458 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 16554CCA481 for ; Tue, 5 Jul 2022 19:10:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232943AbiGETKY (ORCPT ); Tue, 5 Jul 2022 15:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232545AbiGETKW (ORCPT ); Tue, 5 Jul 2022 15:10:22 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0E0517596; Tue, 5 Jul 2022 12:10:21 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id n4so3994899ejz.10; Tue, 05 Jul 2022 12:10:21 -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=CVJmMjKSGPsdpVl5B7dwM8pbpVk/e6e/YzA6OtxjZig=; b=CjUSUKMCkTvMMEh/JZQo3huViXUt834Jy9D5OT6Nu/jzsf2ZG0KD4a+5YkVmMFSnDP itlzIVqtCdEvp28x4oYuksS6sknZbsjLWu+sqaXJQk2DcFjLMIeO/rfVA3fxenBHir3C 8PzntEnBB4pWS1kpi3xyIob5UYKoq94yAC2bJpDGRUICgyTvpGENgNC4DqARgmY7j3hw 0fX9BLO19x2lNWeIWJTvVj507a5favV4IA/hr0gbbRupflDIhhDlki6YJLnFJ9fiNtsn JUEjm3D6S5iTpVoo8lmrncz6yuMEcFBitKl4HTsi9Z+Qwl+Fi9kneNsiWRHXR0MGhJ0t AG5g== 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=CVJmMjKSGPsdpVl5B7dwM8pbpVk/e6e/YzA6OtxjZig=; b=NkMFTJaxbY8qn5qb7FRSBJTfVUSwxIyihDwNml525AKnpKHSD6U1X3uTo0xVr9qIrT Dscc2mLTwKeh8lGIxIdo/1rkj1OuAp4cGuxqR4Fb0jTzXVUswmLobeq/JkDcUICjMD9f mSO5RTKCZ/GU0WFwEzJbHfUWieruBmVa+pyyWOyljLj3Pl7OzbKD2HbgSuv1yHUEVlcb usEql/guL5mERzo7nryqjfj64asG6LZjJ6F7KtR2SS904YjD8lMdC4HY+z+PaapG5l+i VAD4Uz5QdW16cAILdfzeXwpg+6aWe3hbqDAq7Cg8anuz/3eAk7xqQBF1MN4GvHbpwe5j hcfA== X-Gm-Message-State: AJIora/TudzRr+owd73njU7oNHg2w0uwYVN9/EDO+wLb6MXPB/BVB4CB 1GFShX9FV8rspb/PlcI0WP0= X-Google-Smtp-Source: AGRyM1sL8YKIDJu6QR1k8rIEqDz9/5ygGkxtzS0/IVZmek0EulNtJ7RbEyeMEij5XFEWhRi1bxLb8g== X-Received: by 2002:a17:906:4f:b0:712:af2:29d9 with SMTP id 15-20020a170906004f00b007120af229d9mr36201984ejg.751.1657048220335; Tue, 05 Jul 2022 12:10:20 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-13.xnet.hr. [88.207.99.13]) by smtp.googlemail.com with ESMTPSA id es25-20020a056402381900b0043a6b86f024sm4519342edb.67.2022.07.05.12.10.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 12:10:20 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org Cc: Robert Marko , Krzysztof Kozlowski Subject: [PATCH v5 2/3] dt-bindings: clock: Add support for IPQ8074 APSS clock controller Date: Tue, 5 Jul 2022 21:10:16 +0200 Message-Id: <20220705191017.1683716-2-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220705191017.1683716-1-robimarko@gmail.com> References: <20220705191017.1683716-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add dt-binding for the IPQ8074 APSS clock controller which provides clocks to the CPU cores. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski --- Changes in v4: * Dual license the bindings * Update the copyright year Changes in v2: * Correct subject --- include/dt-bindings/clock/qcom,apss-ipq8074.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 include/dt-bindings/clock/qcom,apss-ipq8074.h diff --git a/include/dt-bindings/clock/qcom,apss-ipq8074.h b/include/dt-bindings/clock/qcom,apss-ipq8074.h new file mode 100644 index 000000000000..32538c9311ff --- /dev/null +++ b/include/dt-bindings/clock/qcom,apss-ipq8074.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2022, The Linux Foundation. All rights reserved. + */ + +#ifndef _DT_BINDINGS_CLOCK_QCA_APSS_IPQ8074_H +#define _DT_BINDINGS_CLOCK_QCA_APSS_IPQ8074_H + +#define APSS_PLL_EARLY 0 +#define APSS_PLL 1 +#define APCS_ALIAS0_CLK_SRC 2 +#define APCS_ALIAS0_CORE_CLK 3 + +#endif From patchwork Tue Jul 5 19:13:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587805 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 3F6E4CCA481 for ; Tue, 5 Jul 2022 19:13:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233477AbiGETNg (ORCPT ); Tue, 5 Jul 2022 15:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233426AbiGETNe (ORCPT ); Tue, 5 Jul 2022 15:13:34 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A6A21C92A; Tue, 5 Jul 2022 12:13:33 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id fi2so23276469ejb.9; Tue, 05 Jul 2022 12:13:33 -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=URUNgyykm+FYXGtKi3BEFInGhuSrvdoaZojpppShAEI=; b=DvZiUoAZIXVYK1lYDINksnqMthpHlDZ+s60K8rIA8ci9iwtTGTxeIsmM3FzHjxnOqR brp9yjgM8GVwIeVdY5zr30DWgJFLWONC7qKEUYbotb6e3N7fRcDcWHM73KgTxoqJRr9y k8byO9pGpV8XQPr+lkFvS9L6wayjc1+cPk5WALNnAUFINmNNkE89fjwLwDqoJgICkXye NlwYbpsaEafKWHmakdF85bNNQiNgIFV1DVovSrea9PDTjCeRnDGhTe9UegS6nemGsgmr U9cgXYPSgnWtnU3DY+4xqs/L9kOtSfmQLTMjXeZba+hvF4ge1Hez/dVRcV3qr9IosTNL oRFw== 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=URUNgyykm+FYXGtKi3BEFInGhuSrvdoaZojpppShAEI=; b=PIKk44YSvvANTqlRuPmPDDR9iXGWk0oWnbc6S6UJpvXCmgrWUZJKIWSEOtq0obT20h aAS1A3UpEuCaMAC19Wx1UaEnkVGSfwx2xAsI3VlLYS2dVpYJf/dmvgcJQ5WvstVBDUq4 TdRjIwbqUk+i1B1WugJDT7VhWMqGFoPkayzG/bJop2OosuHBSCLMKs4jUxOox2UQKAHG rObbbRl/jTgrF367aEroBhYmwkixWtDDzI24rnWeFV3wm4w9M4qDrubPXrNz8eeCm/sr UID/nbhUktEVaYESnKLEehw8AHjcK4ZonbN95AhomtSJZtsgCCJHEMDGmx8g9/9pyonX mPMQ== X-Gm-Message-State: AJIora8oyI4ttDyvWfKoey07z3JuvPfEPdHL1BN+PXpMhMs0UE5aLQZA fU2iIRSxOYYPpCkRJss+9to= X-Google-Smtp-Source: AGRyM1tG8ZQMhZx97EC3KCT0ulWN8e1JUVGlJemzWyxj27J1Via61Dmgli9PwCCxVxmb8EDBZRtwhg== X-Received: by 2002:a17:907:217b:b0:722:fc5e:326e with SMTP id rl27-20020a170907217b00b00722fc5e326emr36697662ejb.478.1657048412027; Tue, 05 Jul 2022 12:13:32 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-13.xnet.hr. [88.207.99.13]) by smtp.googlemail.com with ESMTPSA id o19-20020aa7c7d3000000b0043a75f62155sm2480365eds.86.2022.07.05.12.13.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 12:13:31 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, jassisinghbrar@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Robert Marko Subject: [PATCH v5 3/3] arm64: dts: ipq8074: add APCS node Date: Tue, 5 Jul 2022 21:13:27 +0200 Message-Id: <20220705191327.1684277-3-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220705191327.1684277-1-robimarko@gmail.com> References: <20220705191327.1684277-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org APCS now has support for providing the APSS clocks as the child device for IPQ8074. So, add the required DT node for it as it will later be used as the CPU clocksource. Signed-off-by: Robert Marko Reviewed-by: Dmitry Baryshkov --- Changes in v3: * Node does not currently exist in the upstream kernel, so add it instead of modifying. --- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi index b4ae13f16398..76707b9f9845 100644 --- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi @@ -886,5 +886,13 @@ IRQ_TYPE_LEVEL_HIGH>, /* int_c */ "axi_m_sticky"; status = "disabled"; }; + + apcs_glb: mailbox@b111000 { + compatible = "qcom,ipq8074-apcs-apps-global"; + reg = <0x0b111000 0x6000>; + + #clock-cells = <1>; + #mbox-cells = <1>; + }; }; };