From patchwork Sat Jan 29 03:27:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 12729375 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 A9ECFC433EF for ; Sat, 29 Jan 2022 03:27:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240890AbiA2D1m (ORCPT ); Fri, 28 Jan 2022 22:27:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351757AbiA2D1l (ORCPT ); Fri, 28 Jan 2022 22:27:41 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 352A7C06174A for ; Fri, 28 Jan 2022 19:27:41 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id w11so14397574wra.4 for ; Fri, 28 Jan 2022 19:27:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=te0K3WpKS1oYJs60/rbk8rBt4gf1geFoDm7ZbwUb5UY=; b=FquCcRMes8tBUm5WPkzS/b92mI6ok7nCYD01c5XsI8cVCaiQwCqf4cRKDJthOkSg40 2NoJr536vaw1/HHn4iKT4+/GZtGt0/sB4jqH1iQKgzGgKmcEDvAUsYyGqhXZvZ9k01Z7 eDZXYR60c/vreBJeSK/4N1yx/D4ZlQ2h5JdQWbjMc9MkSmVfCriuUHOFit0VRxpeb2Ax KNiU3gcEOd7P5HD28zNCoIaMI63QAPV+4rzI9mc7R8DncpSXYqpAMAPL+absrK1U7q/a Zp/l/HoSvCohwILxmRvOIvHk30ITcxaWDYS5X++bPHCLtBz2pdrIPfYohOG5gnJAL7x6 6PTg== 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=te0K3WpKS1oYJs60/rbk8rBt4gf1geFoDm7ZbwUb5UY=; b=V55LVKa0co8PSuay5BogMc0vo6HBUe4UmUtHkNhg/CS0YmuAHkr5c2PF/H/QRFhxTC 7GAKQjpYJZOTPVNMsMFOa3WppmlIz+z4D46KhAhNtuM+81eY7hwtpWZID5pCNPu2v5iq 2TDhQlIdtju9bjxUIB1qHd1domZD9D0ZrbR8/HAfTJ4XpBiZwMZDDB4QPxQD8BASUxby ubHBPWNMJGOXRdkkqPaFjEIPJwAE9Asc/o7IAq+knorpvECckxU7MIQ4A/Ws2Ytdm95Y lnxX17bkoDiOSRyLGNYwZ+GvjMeIQq1Qorf1w4JEkthumLVGeGxCqXJ88DXVBULGvgjo OiJg== X-Gm-Message-State: AOAM532E7HJs/0FoZG6rQfJb/fGL5mjb5BKbjoJVCadyRg0zWH9sGrhf EY6Cl0r76oKHRPnrJLlmPYY2QA== X-Google-Smtp-Source: ABdhPJyITeNrj/XnQlaQLDo+uFI8qtKFu3fddYrQnNz4z/Hv1JEhXSilezCjqCB3E+iy5mpp8xCBxg== X-Received: by 2002:a05:6000:144e:: with SMTP id v14mr2458431wrx.153.1643426859658; Fri, 28 Jan 2022 19:27:39 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id o12sm7365477wry.115.2022.01.28.19.27.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 19:27:39 -0800 (PST) From: Bryan O'Donoghue To: djakov@kernel.org, bjorn.andersson@linaro.org, agross@kernel.org, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org Cc: jun.nie@linaro.org, shawn.guo@linaro.org, benl@squareup.com, dmitry.baryshkov@linaro.org, bryan.odonoghue@linaro.org, Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: interconnect: Convert snoc-mm to a sub-node of snoc Date: Sat, 29 Jan 2022 03:27:34 +0000 Message-Id: <20220129032735.2410936-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220129032735.2410936-1-bryan.odonoghue@linaro.org> References: <20220129032735.2410936-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org snoc and snoc-mm in downstream use the same address space a mistake which we have carried over into upstream. In silicon terms snoc-mm has been tacked on to the original snoc which came from msm8916. Convert to a better description where snoc-mm is a sub-node of snoc, thus avoiding a mmio remap collision when using the RPM interconnect driver. Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Bryan O'Donoghue Reviewed-by: Rob Herring --- .../bindings/interconnect/qcom,rpm.yaml | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml index e4c3c2818119e..89853b4825133 100644 --- a/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml @@ -26,7 +26,6 @@ properties: - qcom,msm8939-bimc - qcom,msm8939-pcnoc - qcom,msm8939-snoc - - qcom,msm8939-snoc-mm - qcom,msm8996-a0noc - qcom,msm8996-a1noc - qcom,msm8996-a2noc @@ -80,7 +79,6 @@ allOf: - qcom,msm8939-bimc - qcom,msm8939-pcnoc - qcom,msm8939-snoc - - qcom,msm8939-snoc-mm - qcom,msm8996-a1noc - qcom,msm8996-a2noc - qcom,msm8996-bimc @@ -107,6 +105,37 @@ allOf: - description: Bus Clock - description: Bus A Clock + # Child node's properties + patternProperties: + '^interconnect-[a-z0-9]+$': + type: object + description: + snoc-mm is a child of snoc, sharing snoc's register address space. + + properties: + compatible: + enum: + - qcom,msm8939-snoc-mm + + '#interconnect-cells': + const: 1 + + clock-names: + items: + - const: bus + - const: bus_a + + clocks: + items: + - description: Bus Clock + - description: Bus A Clock + + required: + - compatible + - '#interconnect-cells' + - clock-names + - clocks + - if: properties: compatible: From patchwork Sat Jan 29 03:27:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 12729376 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 E0950C4167B for ; Sat, 29 Jan 2022 03:27:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343752AbiA2D1n (ORCPT ); Fri, 28 Jan 2022 22:27:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352276AbiA2D1m (ORCPT ); Fri, 28 Jan 2022 22:27:42 -0500 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A6DFC06173B for ; Fri, 28 Jan 2022 19:27:42 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id c190-20020a1c9ac7000000b0035081bc722dso5316706wme.5 for ; Fri, 28 Jan 2022 19:27:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3joy+PQtl9Lgy2hme/XhYmJ/nQbCvBKozvSBN92ggvo=; b=CZ+OPZJfDaPv/tY928Sqt+xqFbihqyFCn/7R4s623V2uZ7nRKs4LRQ5WWSTw43xf66 FVkgY8D/mmxFfC90h227ZjCZQArfgDcaPHQDluFxCI+CGlc5QOmiiios+WQfc5ha1ImE 3UdCczHnIqXC16+BmlJOKrZP3hvI8HADWQzeOEXG0aoniWzLVQMgMfjWB9Cg/TUvXp3z PnhBgMGdq1hDKyXP1SaCFFSFDkiZbUN3odDdblZs0kTpJXDLt5nl6fRmxpZzbPyVU43P kGGJnQjJQaLvW9jD75gr9sfZlgl1ntCxWBb55zWibiv7SykLqZdLEchw0NCFwE2uN13R naPg== 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=3joy+PQtl9Lgy2hme/XhYmJ/nQbCvBKozvSBN92ggvo=; b=C6WJniwRXgoUbCBukx0Scf5K1Hjwr/vK9wimM62aoWZWmXZmBBrfeP5mLR+UllYtAz 6K1O+8x+gTSbghJfBeF1zG2ejjLD+yP8ysUGNwY0O5h2B8r1Mtehv3O0xEOpTWJK13sh B2GWyobxCGVns7MRVUHlUXz1YX3w3zrZjF5c0u8u/SB81MBln5gcXFjHotGyQVdEh2qV NMNDpTU6Rmj6NoDlduBh/RXW7aOFVWB2L7uI2rvOHoaqLPb/6GU2T+hs/JGjIv2xsBO7 F/yESH+q6oC69KrZr8xtUqVB1NSoMQ8wi+9lRZHTCmQYKtmsHwG1Bxp9cczfYN5R008R CBZw== X-Gm-Message-State: AOAM530BaLz+bX+xl8d6WIRFuKhn11atRtxbG1GB4pDPK+iV1pBK6ycK N7c+k3HvRi3KXOnhL9j0ztOT1A== X-Google-Smtp-Source: ABdhPJxNVcN2AtpjQomiqNyzIysYg3jFb/lWrXviuAtv4rBqxjp+Lwap0f2JccDU9ACVZ5U88uUcYQ== X-Received: by 2002:a7b:cf2e:: with SMTP id m14mr9587402wmg.26.1643426860739; Fri, 28 Jan 2022 19:27:40 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id o12sm7365477wry.115.2022.01.28.19.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 19:27:40 -0800 (PST) From: Bryan O'Donoghue To: djakov@kernel.org, bjorn.andersson@linaro.org, agross@kernel.org, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org Cc: jun.nie@linaro.org, shawn.guo@linaro.org, benl@squareup.com, dmitry.baryshkov@linaro.org, bryan.odonoghue@linaro.org Subject: [PATCH v2 2/2] interconnect: qcom: msm8939: Remove snoc_mm specific regmap Date: Sat, 29 Jan 2022 03:27:35 +0000 Message-Id: <20220129032735.2410936-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220129032735.2410936-1-bryan.odonoghue@linaro.org> References: <20220129032735.2410936-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Booting tip-of-tree on msm8939 we find the following error caused by our modelling of snoc and snoc_mm as peer devices with the same address space. [ 1.212340] qnoc-msm8939 580000.interconnect_mm: can't request region for resource [mem 0x00580000-0x0059407f] [ 1.212391] qnoc-msm8939 580000.interconnect_mm: Cannot ioremap interconnect bus resource [ 1.221524] qnoc-msm8939: probe of 580000.interconnect_mm failed with error -16 Declaring snoc_mm as a child device of snoc mitigates the fault and is consistent with a similar extant implementation in qcm2290. Signed-off-by: Bryan O'Donoghue --- drivers/interconnect/qcom/msm8939.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/interconnect/qcom/msm8939.c b/drivers/interconnect/qcom/msm8939.c index d188f3636e4c3..f9c2d7d3100dd 100644 --- a/drivers/interconnect/qcom/msm8939.c +++ b/drivers/interconnect/qcom/msm8939.c @@ -1301,19 +1301,11 @@ static struct qcom_icc_node *msm8939_snoc_mm_nodes[] = { [SNOC_MM_INT_2] = &mm_int_2, }; -static const struct regmap_config msm8939_snoc_mm_regmap_config = { - .reg_bits = 32, - .reg_stride = 4, - .val_bits = 32, - .max_register = 0x14080, - .fast_io = true, -}; - static struct qcom_icc_desc msm8939_snoc_mm = { .type = QCOM_ICC_NOC, .nodes = msm8939_snoc_mm_nodes, .num_nodes = ARRAY_SIZE(msm8939_snoc_mm_nodes), - .regmap_cfg = &msm8939_snoc_mm_regmap_config, + .regmap_cfg = &msm8939_snoc_regmap_config, .qos_offset = 0x7000, };