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: 12906981 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:13:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 12906980 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 B5707CCA47B for ; Tue, 5 Jul 2022 19:13:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233466AbiGETNf (ORCPT ); Tue, 5 Jul 2022 15:13:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233353AbiGETNd (ORCPT ); Tue, 5 Jul 2022 15:13:33 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 396C2201AF; Tue, 5 Jul 2022 12:13:32 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id r6so5101531edd.7; Tue, 05 Jul 2022 12:13: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=kTqxGKRaQ+4R4vGFv2ndzSh2OvA6/IVMbt55ouGGu20=; b=BJi4dy++yYkYfw9mIOBT/DKU5/ltwPEfKmIyzz3TDhIc20i15feyhZ6tbpigNzYzCK csTeXuB1g1LesRvuV9eWFO9AVRtluoBTuZKGA4TVH+tFHjTtNY6z3SWo+6WeddtyGBnw 7Fw91iPZEx9aK8Yri4iM6RKPiiLt3fUC0XERT+quHJGtSdOJ/6FS2MCNotRJ3sNvO0H6 9i3AfZpgsJ2a92TdyCQmj8eP8MBcsMmUipfEBlNmDi5eIOjiFJ60TAof6BRHicvwj7KP 2oulxjvxBot3QJ1/am/mGq3dGbqBqnK484GX+OkNDixWbQTRVNhlEBjqskT40saEwBzW PBcg== 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=kTqxGKRaQ+4R4vGFv2ndzSh2OvA6/IVMbt55ouGGu20=; b=uOYS79lMj7kIDEk7hUqaOw7vmjlIh0YL5tGPFEnMvDGtsYtaWtZJf+SWufdN5bLywG G3vyymlrXKmQPvhf/NhewpRqBlBiprA9mdO2Oa/X6Eo+EfSzYJeX5yPx3kY3n896B8K9 /nXa8NDuZPgB2yAvAvE90U0Ui6qC2SXJ5W6exKhK3og3uDzFoQpdzfYQIGchgjdf/hVG vR0LFLvh5zFmfb11PEfZffXa6+1LYuqwASW7L2m8+U+iFKIxDhr4UjOJUCiwz15FtWt2 YLBxqxCVROVPc9ZdjlrONdF//wWMPeG5o52Op+axJdk6tTF2IOgwPjdBSIoFHMDkwpgI C6Lg== X-Gm-Message-State: AJIora+Esj3OuBgrBd35iuX5VLjZ3zttrazOf74D3AHQu2yBkHZaKFaj 24yUxfZ4EaXU5VCuuP6e2k7tofPoK8soFg== X-Google-Smtp-Source: AGRyM1v8rHFh59Aj98gkfcojtUkb7p3z+Paz1dUIu1De2HfL/cqGlTLQisvp3pgFQZGaU+bZbwt7SQ== X-Received: by 2002:a05:6402:26cb:b0:436:2173:3f7 with SMTP id x11-20020a05640226cb00b00436217303f7mr49255730edd.61.1657048410831; Tue, 05 Jul 2022 12:13:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 12:13:30 -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 , Krzysztof Kozlowski Subject: [PATCH v5 2/3] dt-bindings: mailbox: qcom: set correct #clock-cells Date: Tue, 5 Jul 2022 21:13:26 +0200 Message-Id: <20220705191327.1684277-2-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 IPQ6018 and IPQ8074 require #clock-cells to be set to 1 as their APSS clock driver provides multiple clock outputs. So allow setting 1 as #clock-cells and check that its set to 1 for IPQ6018 and IPQ8074, check others for 0 as its currently. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski --- Changes in v3: * Drop not needed blank line Changes in v2: * Correct subject name --- .../bindings/mailbox/qcom,apcs-kpss-global.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml index 3b5ba7ecc19d..95ecb84e3278 100644 --- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml +++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml @@ -50,7 +50,7 @@ properties: const: 1 '#clock-cells': - const: 0 + enum: [0, 1] clock-names: minItems: 2 @@ -96,6 +96,21 @@ allOf: properties: clocks: maxItems: 3 + - if: + properties: + compatible: + enum: + - qcom,ipq6018-apcs-apps-global + - qcom,ipq8074-apcs-apps-global + then: + properties: + '#clock-cells': + const: 1 + else: + properties: + '#clock-cells': + const: 0 + examples: # Example apcs with msm8996 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: 12906982 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>; + }; }; };