From patchwork Sat Dec 10 20:03:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13070426 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 8272EC4167B for ; Sat, 10 Dec 2022 20:04:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229761AbiLJUEJ (ORCPT ); Sat, 10 Dec 2022 15:04:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229723AbiLJUEI (ORCPT ); Sat, 10 Dec 2022 15:04:08 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C693213F8B for ; Sat, 10 Dec 2022 12:04:06 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id cf42so12277842lfb.1 for ; Sat, 10 Dec 2022 12:04:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OBRVlbrqRCLQh/hPYQMZj1j2VXHf/Xbb2WuXE+iQo4s=; b=OVMoskt21DvWG921R245YlH5xYu83EndxKpsNu/6SOS9yo9CCQi3wHGEMVYI5vTed0 puCgJbz0X7tScfYkgR20KfO/Yf0tb6IPESJb0xLtaGV1h92nKfnLMVhZnMoTJn9JScJd QXPvZMXHQbdT0Im2MBVxm7UWsaov7Jg2ehM6yHAt+huRWeQTnBIOYyqaKGh9m5PI6zQ+ kmn/6S5tg/Y/CAcKgkab9HEuM6tdkeBm2ZP+VhshFUwNm+gZj+n3NivgcaJdcqihkLFx ihlptI/KB3kl6Ohr0MEeVUKX7ZRE7+KyI6OHmhK5mr9Ngd6UmjqYonEVx8qgbmJyyYFi RtSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OBRVlbrqRCLQh/hPYQMZj1j2VXHf/Xbb2WuXE+iQo4s=; b=IHj8wH5e0e6HaegnOluabVC7DgcUtKDBpSg2RVA0aTR9Y74eR4LHqJ2FoLytHBo78e MfjA6uUe9x2j/VlPHUgLniq/POYClyd7zQXrhWKn3cmy1vh2gPwdMFdQtgxdmoz1+2V0 GYq1C4vtFEl30dAzmF/MsfcpaTCO5B2vNiNsW+8xC6H2W7ZZHeRbTtk3k6ZE2bwU2pao UMfl4RiCvHesVxzHENVU+w05W9WBSKYIW00zUABa1goHr6855MeoZ6XZh1/5UZJQIBlb 1q+D9/JnHGX0jTGVIOGeAO2yZhSzMyxFwcBLzHryHj4o2crV88rj8zt0MjjrTVUnWKD/ uGQQ== X-Gm-Message-State: ANoB5pm7vOoTO45ZSK9OmOjIPO37zKx0Uvdl9uRQjQrYh7+1IzO29y5L 6w9ds7GcCoqd45rmvr0j/BeKSL60jdMMXHdw X-Google-Smtp-Source: AA0mqf6Ms8jSQh1Mioo+UobLsSKiXCn3pnnxKj/xfyKNT6+AHp7ldUSx1xBzJkF2v+xrCd+Z7OkHpA== X-Received: by 2002:a05:6512:340c:b0:4b6:e22f:51a6 with SMTP id i12-20020a056512340c00b004b6e22f51a6mr529683lfr.53.1670702644949; Sat, 10 Dec 2022 12:04:04 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id h28-20020ac2597c000000b004b4f1ea713csm839628lfp.73.2022.12.10.12.04.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Dec 2022 12:04:04 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Georgi Djakov , Rob Herring , Krzysztof Kozlowski , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] dt-bindings: interconnect: Add UFS clocks to MSM8996 A2NoC Date: Sat, 10 Dec 2022 21:03:49 +0100 Message-Id: <20221210200353.418391-2-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221210200353.418391-1-konrad.dybcio@linaro.org> References: <20221210200353.418391-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org MSM8996 A2NoC contains a UFS master, which means the UFS hardware is accessed every time sync_state is called within the interconnect framework. It's all good on devices where this clock is already enabled (most likely from the bootloader), but devices with eMMC storage are rather unlikely to have it like that. Add the missing 2 clocks to the binding. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski --- .../bindings/interconnect/qcom,rpm.yaml | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml index 4b37aa88a375..5e6be4e79201 100644 --- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml @@ -84,7 +84,6 @@ allOf: - qcom,msm8939-pcnoc - qcom,msm8939-snoc - qcom,msm8996-a1noc - - qcom,msm8996-a2noc - qcom,msm8996-bimc - qcom,msm8996-cnoc - qcom,msm8996-pnoc @@ -186,6 +185,29 @@ allOf: required: - power-domains + - if: + properties: + compatible: + contains: + enum: + - qcom,msm8996-a2noc + + then: + properties: + clock-names: + items: + - const: bus + - const: bus_a + - const: aggre2_ufs_axi + - const: ufs_axi + + clocks: + items: + - description: Bus Clock + - description: Bus A Clock + - description: Aggregate2 NoC UFS AXI Clock + - description: UFS AXI Clock + - if: properties: compatible: From patchwork Sat Dec 10 20:03:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13070428 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 7AB24C10F1B for ; Sat, 10 Dec 2022 20:04:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229892AbiLJUEP (ORCPT ); Sat, 10 Dec 2022 15:04:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229841AbiLJUEM (ORCPT ); Sat, 10 Dec 2022 15:04:12 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19AF513F87 for ; Sat, 10 Dec 2022 12:04:09 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id q6so2170509lfm.10 for ; Sat, 10 Dec 2022 12:04:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xDt+cVjkMFpQCr4WbA0njzIJ8/m0OvNyfOzyjmNYhSc=; b=cbdwYWpTVw/hWlTtSfZCil7N39WfC6Re7YQhOq8oVz4Wgsdfk1RJ+g/mY+MmANfWFM q4tzxHGHwDwr14gOPiMZ871Upc/blWpRVMZtOLHEpeo2h7lbqkl2tUwZepD/OB06f5dV k7cB8jMOMdh5pqEqmplIEYVWKCqTCUHTrOKfa2wwxIbvTKUO5R8TAhGf2shaMiG0wOZg OvybJUYi7HcIZUOE+qA0VVr+VwFf5Up49lY+4QyfSy/sWOet7OmynllwyYwtgSoUg3zx 6xubhTJmuQ7+Pj5OIrM0ar9FBGTMzBPLQtk31sp1HChXFvrM1qRl9pr2QaqXTmry9fuh fc+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xDt+cVjkMFpQCr4WbA0njzIJ8/m0OvNyfOzyjmNYhSc=; b=o9BkWSn1tDFNskCoYT7MTZvK5JENJEAQ+r348wmnryZROIl0vLicJxq9k3dgJmeI/J KsuAHHL2yUe57usJ56faSHCStKSD8HqaKCaFEjkHCWyO9IuJVep0N7a5Px0VzrOTBUlb sbjKqGuiF4fGyIRu+GC4DwhwM2/6AqtGwx9dj1V+2wWTV4XgI/seopv4aagGCF1jDqOe gsZWpes473YxGjoAxj+EB8GlHjdtp43VigaDrWSk9NbV5aAAVr0/9DFLq1L1rnFpyVLM l7w72yysWhvfbSVVGsCfzSY8yYJPhYqMyjz/UsCT6A22UHkFwuB/Okfu87fqYRxe2qeK YE/w== X-Gm-Message-State: ANoB5pnAhRj5Uo1UpuHYKS9+D/V3ceS/pCbO4s2U2mcPIoeN4ycU9Uca pzHnxhnBLwTMIUcENVDWtqHJgEqMK2H+JqDS X-Google-Smtp-Source: AA0mqf5BUQoh8b2MIwiE5BPUaBEMPZLOJBADts9iy8539ZTFXtXwgTMR9dRsdxcdtCSN2rk/z/XGBQ== X-Received: by 2002:ac2:5a1d:0:b0:4a7:9e45:4cd0 with SMTP id q29-20020ac25a1d000000b004a79e454cd0mr2801113lfn.13.1670702647248; Sat, 10 Dec 2022 12:04:07 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id h28-20020ac2597c000000b004b4f1ea713csm839628lfp.73.2022.12.10.12.04.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Dec 2022 12:04:06 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Georgi Djakov , Yassine Oudjana , Dmitry Baryshkov , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] interconnect: qcom: msm8996: Provide UFS clocks to A2NoC Date: Sat, 10 Dec 2022 21:03:50 +0100 Message-Id: <20221210200353.418391-3-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221210200353.418391-1-konrad.dybcio@linaro.org> References: <20221210200353.418391-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On eMMC devices the bootloader has no business enabling UFS clocks. That results in a platform hang and hard reboot when trying to vote on paths including MASTER_UFS and since sync_state guarantees that it's done at boot time, this effectively prevents such devices from booting. Fix that. Fixes: 7add937f5222 ("interconnect: qcom: Add MSM8996 interconnect provider driver") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- drivers/interconnect/qcom/msm8996.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qcom/msm8996.c index c2903ae3b3bc..7ddb1f23fb2a 100644 --- a/drivers/interconnect/qcom/msm8996.c +++ b/drivers/interconnect/qcom/msm8996.c @@ -33,6 +33,13 @@ static const char * const bus_a0noc_clocks[] = { "aggre0_noc_mpu_cfg" }; +static const char * const bus_a2noc_clocks[] = { + "bus", + "bus_a", + "aggre2_ufs_axi", + "ufs_axi" +}; + static const u16 mas_a0noc_common_links[] = { MSM8996_SLAVE_A0NOC_SNOC }; @@ -1859,6 +1866,8 @@ static const struct qcom_icc_desc msm8996_a2noc = { .type = QCOM_ICC_NOC, .nodes = a2noc_nodes, .num_nodes = ARRAY_SIZE(a2noc_nodes), + .clocks = bus_a2noc_clocks, + .num_clocks = ARRAY_SIZE(bus_a2noc_clocks), .regmap_cfg = &msm8996_a2noc_regmap_config }; From patchwork Sat Dec 10 20:03:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13070427 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 16554C4332F for ; Sat, 10 Dec 2022 20:04:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229865AbiLJUEM (ORCPT ); Sat, 10 Dec 2022 15:04:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbiLJUEL (ORCPT ); Sat, 10 Dec 2022 15:04:11 -0500 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79DEE13F7E for ; Sat, 10 Dec 2022 12:04:10 -0800 (PST) Received: by mail-lf1-x12b.google.com with SMTP id b3so12253124lfv.2 for ; Sat, 10 Dec 2022 12:04:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F70X0h1gEhZbNZjzSbofbLgELtxej/JOcL3nmVN4Az4=; b=VnlJ64RRCWzDKIto7yzRZOPNx02NENlNPq+D7IcdtNHcHY6i9XFs003Bpn5i8F/q+0 TBcBTDmPgKBgwHNMs7oZrwj2VWOwecYuinfcarY8ODviqBW/O8NrGC7i96YZ9iUEr0uX DDcSpxRSdoailKGYOr8RckqaPjr52R6BJnk2PL2M2LW7mqTBtusEAHxIRda99LNVMDlk UjOf2eWMxp2RzvGobCtt1Rox78AFINvtPTP3Mj7rb+GOmjXRHR/84b123FWRV0aohhKu qHkRusMEJSHtYRAl57u28hImiZlolPs9ZN6MATKNQLnEHn+mZunLZUTgs7cmv6n5kcPn nbig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F70X0h1gEhZbNZjzSbofbLgELtxej/JOcL3nmVN4Az4=; b=mpyj4nKsjVcqgnLy5A7TLf2Cro+7efsqlqHsNgP2k7+dDCDxkLYwt+12tTL/t8eCAu xNU3Q2SkqXocye/MpkxDmJtmmqJInTkvhgw7zL8HEdyf7h4TJ/clFpWOFt3onZnheAky jX61VZPZrbwPJCtvr0c1qIWwZ3r9A2VfaeOBaCYl41oPekB3P1Y0cYEV2rr5B9349VcO zBtae3RBX/+YUBRK+Uf+i4EEM5uj0h94yQE28MkCXXBnWELVDhRdMqD5CUJKg9xG/VA4 SLtW7SBQ2Pn27FdmxXpxEpe5VTwU0Ks7Nv5gGiOy+0+ml7gl/lhPRH8wU2aRg+Emr/4j 8L7A== X-Gm-Message-State: ANoB5plT690Ea960EgG5QNuDm39HOHhpNxall9ahVyDAP4GDkkIorqVM m2nF3OHdV82xQz7/CZnfVa0E1ZmLodDbdCqK X-Google-Smtp-Source: AA0mqf5mAtCFFr/GyhSpnySoX+FDSDVDj5vpOdKDW367vkMF/OGGYBjTaogxp2x56jTmWRYlFm/r0g== X-Received: by 2002:a05:6512:32ce:b0:4a4:8044:9b8 with SMTP id f14-20020a05651232ce00b004a4804409b8mr3063830lfg.9.1670702649853; Sat, 10 Dec 2022 12:04:09 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id h28-20020ac2597c000000b004b4f1ea713csm839628lfp.73.2022.12.10.12.04.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Dec 2022 12:04:09 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Georgi Djakov , Dmitry Baryshkov , Yassine Oudjana , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] interconnect: qcom: msm8996: Fix regmap max_register values Date: Sat, 10 Dec 2022 21:03:51 +0100 Message-Id: <20221210200353.418391-4-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221210200353.418391-1-konrad.dybcio@linaro.org> References: <20221210200353.418391-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The device tree reg starts at BUS_BASE + QoS_OFFSET, but the regmap configs in the ICC driver had values suggesting the reg started at BUS_BASE. Shrink them down (where they haven't been already, so for providers where QoS_OFFSET = 0) to make sure they stay within their window. Fixes: 7add937f5222 ("interconnect: qcom: Add MSM8996 interconnect provider driver") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- drivers/interconnect/qcom/msm8996.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qcom/msm8996.c index 7ddb1f23fb2a..25a1a32bc611 100644 --- a/drivers/interconnect/qcom/msm8996.c +++ b/drivers/interconnect/qcom/msm8996.c @@ -1813,7 +1813,7 @@ static const struct regmap_config msm8996_a0noc_regmap_config = { .reg_bits = 32, .reg_stride = 4, .val_bits = 32, - .max_register = 0x9000, + .max_register = 0x6000, .fast_io = true }; @@ -1837,7 +1837,7 @@ static const struct regmap_config msm8996_a1noc_regmap_config = { .reg_bits = 32, .reg_stride = 4, .val_bits = 32, - .max_register = 0x7000, + .max_register = 0x5000, .fast_io = true }; @@ -1858,7 +1858,7 @@ static const struct regmap_config msm8996_a2noc_regmap_config = { .reg_bits = 32, .reg_stride = 4, .val_bits = 32, - .max_register = 0xa000, + .max_register = 0x7000, .fast_io = true }; @@ -1886,7 +1886,7 @@ static const struct regmap_config msm8996_bimc_regmap_config = { .reg_bits = 32, .reg_stride = 4, .val_bits = 32, - .max_register = 0x62000, + .max_register = 0x5a000, .fast_io = true }; @@ -1997,7 +1997,7 @@ static const struct regmap_config msm8996_mnoc_regmap_config = { .reg_bits = 32, .reg_stride = 4, .val_bits = 32, - .max_register = 0x20000, + .max_register = 0x1c000, .fast_io = true }; From patchwork Sat Dec 10 20:03:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13070430 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 3736BC4332F for ; Sat, 10 Dec 2022 20:04:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229983AbiLJUEb (ORCPT ); Sat, 10 Dec 2022 15:04:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229938AbiLJUEW (ORCPT ); Sat, 10 Dec 2022 15:04:22 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F35AB17071 for ; Sat, 10 Dec 2022 12:04:19 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id x28so12231560lfn.6 for ; Sat, 10 Dec 2022 12:04:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xj0jB4AhzYQNXspmImuMXL7HzHFtFIdHtKGTYSzQnq0=; b=q3LIslAF2wRgh8DspOIqNEL5gxAzBjGzT1d0OFAjbzlOaSF6aIcUPKMgV6CNdRTYjT BPyhBbUunkkujEuf24tjFN2s0DyYsbiyUuWTIkJPg89nduDRd43gnPE77ozTe1n2AILd nFj4xP3Fqfyc/kK+EpUbBwP8ZPCi3yBZ/NMBMxcJGtSjNDODRSoj6/h+hFobDpnyNkhU iRcPyHpd+nyjT5hyqqplBO5HJd8CJKw+76tvmYgKLlmqZY6KKZLFj91bZYOz7yzxnzQm dhTNd8UUnewDyt8ns8Z8jMVro9FXj/+bcXyTUriQjoSRaTz2XC3Eh10/fU4R6PPLON4o vRYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xj0jB4AhzYQNXspmImuMXL7HzHFtFIdHtKGTYSzQnq0=; b=BHr5hi67zZvGM6yV7CjQ1F7VVvpsWqQ61pb42ozqUNFU13YGrMCAtY8pwtgB88jTND t8dN/VN+M4cwxsG5NA4/eeOEwad2lJ/7WhGFM/JxgXqzMEfhTzZpPBg5IRsmg31UUzdF rpGoQJLRsQ2gYJy/8Mkd5EMbRf0wFpzLmel0FOXpdrXZVRo4SnJQdpr0Fjpnf1uMwVys jVay8hD6ClXqvKvxpy0KL2ks40J8J1zFFL0TuwxuJCBuCf6nE05+e3PqyoHjCe11N4ma 5Wf4q6s6va0eAanht5k0dh0rrwcjpxLT7d7cR+Qh3cRoQN3b5KAP/JsoG4zIBYS8wab8 w54w== X-Gm-Message-State: ANoB5pmPlxa1UBvKGjZxUjqyNzd8YtUNoHCjSEjcmT+2HjDHZ7Z3oCDC Gg3c2+nW61vc1L+qgau5Ru1o5xRfYhC6vTNV X-Google-Smtp-Source: AA0mqf5CwtJnVoK36NyIewNyGgUXoqk+uTWRK6Y9C1vqharCIFeloboLPZDqe2xMfIgQsedQVJ2o+w== X-Received: by 2002:a05:6512:3d0e:b0:4b5:9043:2530 with SMTP id d14-20020a0565123d0e00b004b590432530mr4008272lfv.68.1670702653080; Sat, 10 Dec 2022 12:04:13 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id h28-20020ac2597c000000b004b4f1ea713csm839628lfp.73.2022.12.10.12.04.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Dec 2022 12:04:12 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Georgi Djakov , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] interconnect: qcom: rpm: Use _optional func for provider clocks Date: Sat, 10 Dec 2022 21:03:52 +0100 Message-Id: <20221210200353.418391-5-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221210200353.418391-1-konrad.dybcio@linaro.org> References: <20221210200353.418391-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org It turned out that - very unfortunately - msm8996 needs a binding update, adding 2 more clocks to the A2NoC node. Use the _optional variant of devm_clk_get to make sure old DTs will still probe with newer versions of the driver. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- drivers/interconnect/qcom/icc-rpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c index ba6781f54ab7..df3196f72536 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -488,7 +488,7 @@ int qnoc_probe(struct platform_device *pdev) } regmap_done: - ret = devm_clk_bulk_get(dev, qp->num_clks, qp->bus_clks); + ret = devm_clk_bulk_get_optional(dev, qp->num_clks, qp->bus_clks); if (ret) return ret; From patchwork Sat Dec 10 20:03:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13070429 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 1C899C4167B for ; Sat, 10 Dec 2022 20:04:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229951AbiLJUEX (ORCPT ); Sat, 10 Dec 2022 15:04:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229913AbiLJUET (ORCPT ); Sat, 10 Dec 2022 15:04:19 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B404E1402F for ; Sat, 10 Dec 2022 12:04:17 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id x28so12231529lfn.6 for ; Sat, 10 Dec 2022 12:04:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iI0a0GEkM+OEMminGresAON2Q/s+/NfY86fzKXWDTVw=; b=morpBfXAf66+6TMe3djDbtuV9+H4QQE2nu/zabEQ3yhmBHe+zwSaaq2svVix8I7WTe mEaiiBlObLnTB8VjMFjpWlcI64j2iEdr/03DSgNd7c7gvb4ezZH/jWUOG30jL5BGRuiZ RuLn4acdY3NsnKU2GFFq/dpljzLK9SFkFzfWYgW+7VBRQjOjsaeN4j6oxaC0tdibaHVk w/7y7dN/UHUJIMxxJGsnEmLe9C+y54rqroF5rON0Eze6hnRFXYTzbmnDkNrgRt4qYizX sF4BuxzwlZdYEq/BJFyJpxRgKb/jB8qWOpWpMNb8qBpSoy4Yzys9/smvCQNm1h4teRBh cWlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iI0a0GEkM+OEMminGresAON2Q/s+/NfY86fzKXWDTVw=; b=expNH805m+bI4vf2G2KEpp0gVyiS8ci4Fxwv7DfqVpY0bHsFJPHYbU8lpWxwIX+jj1 bPNcliOZ45HZ+pvSNm9hTcTiIbVuLuq1pUiQHPIoBc0QtryS1kNtqrRA9tfgS9K5+p0m cljqu0H2UrIXe3Co5FUni4DBL0AaV2pJZbXMET90Eos72UsaM6r6LX8i3ZPuvpSmNT8i TaTyfA4xv9qT5xjA0EuNq7T3iaZXPFyeHqne2PVY8I5k3moX7w2KZPtsPZvY+iLlEmt1 dBKysc5wap2W9yVE+XnTKLe5U4bNIOadS8cBOKJUWS/zJ17NinDx7PYkIRQrTJ2kp5dQ 6h0A== X-Gm-Message-State: ANoB5pmSV9qGGMc1S2SwcNUpSmSmw3Yp/lA0ouBGmjrfnn24NCmw81Yj qqY+3WLx9/BfA6AJVxcmvr1MecHuLXKX1YLf X-Google-Smtp-Source: AA0mqf7OsBhvRPVML+WArCnUjkiZQbo4rQEkWkqy4vj/GGNZ9OUyzx0/x4iggr1aSaKiyspbiRnFmA== X-Received: by 2002:a05:6512:261d:b0:4b5:d:efb2 with SMTP id bt29-20020a056512261d00b004b5000defb2mr3978255lfb.14.1670702657093; Sat, 10 Dec 2022 12:04:17 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id h28-20020ac2597c000000b004b4f1ea713csm839628lfp.73.2022.12.10.12.04.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Dec 2022 12:04:16 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] arm64: dts: qcom: msm8996: Add additional A2NoC clocks Date: Sat, 10 Dec 2022 21:03:53 +0100 Message-Id: <20221210200353.418391-6-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221210200353.418391-1-konrad.dybcio@linaro.org> References: <20221210200353.418391-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On eMMC devices, the UFS clocks aren't started in the bootloader (or well, at least it should not be, as that would just leak power..), which results in platform reboots when trying to access the unclocked UFS hardware, which unfortunately happens on each and every boot, as interconnect calls sync_state and goes over each and every path. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 95dc10a1deb2..616b5b1b1fb0 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -826,9 +826,11 @@ a2noc: interconnect@583000 { compatible = "qcom,msm8996-a2noc"; reg = <0x00583000 0x7000>; #interconnect-cells = <1>; - clock-names = "bus", "bus_a"; + clock-names = "bus", "bus_a", "aggre2_ufs_axi", "ufs_axi"; clocks = <&rpmcc RPM_SMD_AGGR2_NOC_CLK>, - <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>; + <&rpmcc RPM_SMD_AGGR2_NOC_A_CLK>, + <&gcc GCC_AGGRE2_UFS_AXI_CLK>, + <&gcc GCC_UFS_AXI_CLK>; }; mnoc: interconnect@5a4000 {