From patchwork Mon Mar 27 16:14:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 75545 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3404:b0:112:7285:5352 with SMTP id h4csp1535055rwd; Mon, 27 Mar 2023 09:18:55 -0700 (PDT) X-Google-Smtp-Source: AKy350aK638YNj1TDhFYEUvKTJf2L3r0l8QNq7/shoYZ2N9c0DCHE+Ez+w14+jv4kK4Ykvprp6b6 X-Received: by 2002:a17:906:3611:b0:930:d30a:6c20 with SMTP id q17-20020a170906361100b00930d30a6c20mr12838123ejb.17.1679933935164; Mon, 27 Mar 2023 09:18:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679933935; cv=pass; d=google.com; s=arc-20160816; b=XKuWNG2U0b00OhqhPOrQkPUWlOyBNUG2lbWNflDkSU9z21UpCDRE/pBn9DKaDH7Y1m nH0/f4JEjIMuf8CoCDtZMmXAj0s+mPWupJIDN3Kbx5ac3R+AiEk4wSMYjTMJHp+NeOCm TZZ4a6R2OBIlaFmqOsggnqonr1cttQsS9IQHSXS1a8yRLwy99bzXpFpLL9c+6fCjdbnE bckx87oJPGMSqVYoBAeHTzn9zs3y3fbGt3DHJwN1IMIHVizVPnh8eQhmk26dYDAsFdV6 kdIq0aVuv3MEgYgU8WBjOGd7KddtZtQnDHF13CjTnNZ9CPDMcj6G0+sbVPcp0ydx42V9 Xj6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=8kCK6BGvJPhQTmZQ3JOKLSN9nwtRh23WxH5PPHqq81Q=; b=RVQPbAmY0Ly6pGLSfe1fMC7AIP3KvjrlN9cUHyJe0PBYDn8oNNhhgnfdIi1XjHCTaZ F4YpwxtdbiPZ07+cg6RJh2OZGPo+oL46l3twvKWkvV53A8Bg+mZPJIYaLSEsBodkW/ev zvkZUuVPXxdFPRyiXbKff3oXDhC23JhNyOgTtGvZDBj2ms4zpnnJNCwdic+16d9uX7LL XuUhURwspAQyl2PY663goYupkLsCnlUi49WkPZoNCWCTmz8j5PKc6ery6aFlIp/gz9mG eJ9Iyb+2rX9POWHh7m+ajCfggpIwtu+4dQ80FEXaeaY3vk78kWafZR1DFWz7yWkbZ3hT DpqA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=f2FFYSz1; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa12-20020a170906edac00b00920e94e35cdsi26282417ejb.901.2023.03.27.09.18.29; Mon, 27 Mar 2023 09:18:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=f2FFYSz1; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229705AbjC0QO5 (ORCPT + 99 others); Mon, 27 Mar 2023 12:14:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232989AbjC0QOy (ORCPT ); Mon, 27 Mar 2023 12:14:54 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2087.outbound.protection.outlook.com [40.107.243.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A682524B; Mon, 27 Mar 2023 09:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZwwKRFJ3SxWIxBwjdYwghyrVGqN+/Njwgfh3pkuoI4XgJwh+deMdYMxdrRJshV1CtsetDqjDBGUQOq9YSASUkJoaCp51knnaE7aviq710dPDiTwI08lrK9RScFcztfxxweirLHlSqUuGzLX+XU/mChJV+onYuQ+594uZlYpTJsN+cHdCmWdTvgsnYKSPEx7bxKJkcZWsh8FjdBKUI4lQMEW5/Op/IouaXm/Cxx0gSZm00AT1mAJu1Uoe8GarRWLBWY9a7QHa0EV+2zm9K6sdxRGUtQNjtChnLz9y4AZIkeO00SQ1yB/UCxswgq1ZVpbYjg8GWMzpxmVow393PmZ/qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8kCK6BGvJPhQTmZQ3JOKLSN9nwtRh23WxH5PPHqq81Q=; b=foXcIB5tTn+9GdhPZtPHPDpYl1oS4be7iym1b/A50fBxPjk+HDeGRBL1YDeYmsZLCUri23v/DQWsNupD49T+30f5YcSBzUtFAfv9D8U/ZMOCD4mG+O6aWhp3IeWI671C35fRN/BC5gFeFunOwpgwSHUCbn9JZKTw/4T/EVkax9qiM4O6aVo9FCr4hQxFchw4BDzjVfL4IgVDVJMxjTnA9iu0U8qULAstWboDA2otmvP9Qp7fh2G1M6kw6VkFg6EILvKXDWkJ7htgET+On51npKbK9ghQZFUYAB8Fw+uxMxY3TNYk6iLh0pLGZXBwBhQyI1ctEL4iyYRfP26ioZPMrA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8kCK6BGvJPhQTmZQ3JOKLSN9nwtRh23WxH5PPHqq81Q=; b=f2FFYSz1wvqNo/+YqyBR+KDSOvotRLXv74Xzk/Oe95b4PJSKfajtWAG+/lgNbPxXl7I/vaRSHBL5Irdjfv490Qx9iWYV+h6naeR5bhKG0Oz4yIgP7UxkF+oyjnIdne9bYgkm7IgA0Rc6gBJ4jNDIEKel2zYUM+tgW2YGbF9WAwoWyj2Af7fanvdvq5dIvCwGeENkUEQReOSJqK9sMK6Wrkga4JcO5LgZBcnSw5OnIDBJv6Gg8jMV0D2HVh1YR0/rLUATtMtDtUm4/we8hpiBoKY1CJMaIl70wXPxhJONBZq9RV4LbO27Qnfc0hXu40oNNWF2HOR2XncuVDkSkwY9Ew== Received: from CYZPR05CA0044.namprd05.prod.outlook.com (2603:10b6:930:a3::23) by MW4PR12MB7029.namprd12.prod.outlook.com (2603:10b6:303:1ef::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.30; Mon, 27 Mar 2023 16:14:51 +0000 Received: from CY4PEPF0000C97D.namprd02.prod.outlook.com (2603:10b6:930:a3:cafe::f0) by CYZPR05CA0044.outlook.office365.com (2603:10b6:930:a3::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.17 via Frontend Transport; Mon, 27 Mar 2023 16:14:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by CY4PEPF0000C97D.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.30 via Frontend Transport; Mon, 27 Mar 2023 16:14:50 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 27 Mar 2023 09:14:46 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 27 Mar 2023 09:14:46 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 27 Mar 2023 09:14:41 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v4 01/10] dt-bindings: memory: tegra: add bpmp ref in tegra234-mc node Date: Mon, 27 Mar 2023 21:44:17 +0530 Message-ID: <20230327161426.32639-2-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230327161426.32639-1-sumitg@nvidia.com> References: <20230327161426.32639-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C97D:EE_|MW4PR12MB7029:EE_ X-MS-Office365-Filtering-Correlation-Id: a032bbb1-b936-4fa6-f8db-08db2ede64b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dDQnUqo0ZNzHZvVb7WzcOxv65X2Cn8v480GcVEQVJMcKIPW3+4cAFp583AF8/KUcg+RfERBzUQXleQk4njRGD55agpTqk2BjlmR22ePtKkG8+TwLhmVr27Z8xL+fHB2x7DMq/klICUAEeL3nuyowczHBHc/zs8+ufmVe2Hqc3IehvdQO3VSKuQuZzP/autODDqinsZabav51Fnj1zsaQqK5LH1xDZHuFPgLC2BgT+TQvfTyHR9Iomz3V5Fmym7C52CJlRuWqSMNM3tr4TSERG5Bz77K86em75vQo9cvZn3BoBBIKzrqUo17gGdDdc1d9EqzCgAvpPJMLp3ZY7kB93cJCyBoFrksAmql1ejzDXeOpKWzttDpFfKmMeTYw43/WCPlgAsRmkC5/MQRA9fTmwhyRe9IqTloTWEfQt8eO+imI5lnibnJK5W41JZV2tVbMgTayOHX/MhR3mPdAl/gmxEcyB+1zsxSzaGnTGVvrP6dHFZ5IZuw3Nhcg0p77X+iqDM8H6zvdn/sYA71hjYSbMImRDt2ki4bN6YaypGne+3pogMeCCBzoUy9M/LtbfMFD1GThAAijx1jiFiBAW22SB2vNlIvTG9nx3hOsmnLWfJrfatKBwCRaOwmUntXNG+0oqDwTXE9ki52UT2Wj0EHnnZ7DVhmdM8MV23l2IVcbu13MdEEV/DCQrYdW0koKj3PhDoAguGOnDIKsuJDTruGt+QR/68S/+P/kJxs8L8Ly/ru4ouXkXtcmG7dk2n2j3LQr X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(346002)(396003)(136003)(451199021)(36840700001)(46966006)(40470700004)(316002)(110136005)(40460700003)(36860700001)(54906003)(478600001)(356005)(7636003)(82740400003)(8936002)(5660300002)(36756003)(82310400005)(86362001)(7416002)(2906002)(4326008)(8676002)(70206006)(70586007)(41300700001)(40480700001)(107886003)(6666004)(186003)(1076003)(26005)(426003)(2616005)(336012)(47076005)(7696005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2023 16:14:50.9252 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a032bbb1-b936-4fa6-f8db-08db2ede64b3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000C97D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7029 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761538406402768183?= X-GMAIL-MSGID: =?utf-8?q?1761538406402768183?= For Tegra234, add the "nvidia,bpmp" property within the Memory Controller (MC) node to reference BPMP node. This is needed in the MC driver to pass the client info to the BPMP-FW when memory interconnect support is available. Signed-off-by: Sumit Gupta --- .../bindings/memory-controllers/nvidia,tegra186-mc.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-mc.yaml b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-mc.yaml index 935d63d181d9..398d27bb2373 100644 --- a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-mc.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-mc.yaml @@ -58,6 +58,10 @@ properties: "#interconnect-cells": const: 1 + nvidia,bpmp: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle of the node representing the BPMP + patternProperties: "^external-memory-controller@[0-9a-f]+$": description: @@ -220,6 +224,9 @@ allOf: - const: ch14 - const: ch15 + nvidia,bpmp: + description: phandle of the node representing the BPMP + additionalProperties: false required: From patchwork Mon Mar 27 16:14:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 75555 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3404:b0:112:7285:5352 with SMTP id h4csp1544563rwd; Mon, 27 Mar 2023 09:34:14 -0700 (PDT) X-Google-Smtp-Source: AKy350YbWs4McE5Xna/lRMjZTbNsUmTzy7qhBSNkLAuZT1z60108vUr1BIEaA4MtLqsQVoMApYsB X-Received: by 2002:a17:90b:38cc:b0:23f:ed7:4774 with SMTP id nn12-20020a17090b38cc00b0023f0ed74774mr11940107pjb.7.1679934854523; Mon, 27 Mar 2023 09:34:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679934854; cv=pass; d=google.com; s=arc-20160816; b=tvMApgXoQTSQZcVGMJMfWn+tdpM2CDh5v8N/EeLXS6W5smwU98gEVC7yltIV0afkXC x5LQflctHvnLnGg7yhoU1d/kEFZdvzASUonOvwYYfOZQraGdhfzYcE3Bw5RQvQjtG9Gn 0DFBGJG6VcEIENSMi4OZNiMns04oNHwSPltXY5ppYFN8fJiviOMHhZgN+cA/VNw3nNEJ Xtk24IHdq8nF1cB507t9BEvHOj2FGpYXO8hibGsuuBItra4ZuY+Cv0eKpqc6E/nrddA6 +2tMVXl4B5tqVYZns6upriI/u5GIN8LZvnCS1rOmcvhlh4M20voQCVP+1R9LtmL6oWpT iD/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=BfsEk2TaRAD1qyB52N5Pqj8vvIEZIISIOqnJhAvh7J0=; b=OUoiPxAUxNqgdUJ9+Hc+HSSQIaoOJv0ow14K3FzpmiROnJaw0bdwpsaoaF997vOcQr r7+q4rul4erHgn/ZPLkEFHWlaK2iFeVNlkeJb4JGMaszrMKOq2KeQp3vHwR54D+1UeHt fR4Qmyxq29X9S5Wr/63bA6sZj8XM973+PjlNGY0OD3uzGuJoPV4BNgDA0pyGLFEmjZvk PwJjfeaZjFlwsbLxUfS9Y3Yvbl8g6XLxdKM8Gne69FMn0j8Quiyxyu/145LS/R6+qoTX Z4ZX0jWxbYvnkOx4CIoOF5RJsCxAb4lGapQ4fX4Uc/D8Lj0R0hLBo0n8DzUxgfYcwhz1 N0Ng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=fjfz1YrP; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a17090a110800b00230ca3efcf3si10501100pja.158.2023.03.27.09.34.01; Mon, 27 Mar 2023 09:34:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=fjfz1YrP; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230014AbjC0QPI (ORCPT + 99 others); Mon, 27 Mar 2023 12:15:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232544AbjC0QPG (ORCPT ); Mon, 27 Mar 2023 12:15:06 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2062c.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe59::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13AC4558F; Mon, 27 Mar 2023 09:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=krZTSR2WaiH0gAu/GPaCIOQOEe1RpO0mbUwQ0dzM7ejwGa5/QOV+3PZFg4kTXFY3Ktk1MkzaBOxdG5c+WgkN7OIcKJw5dthqymX/4pHgdkEC4q1JbgGDunoTP0bnSuVhDfmwO7pOS44kPFDsHokl/yHUO8QIXq/k4RYEt30jxaIRvjJSnSz0cYZ6TaSFgTsUGCDXXEqI7pEmuyxFEf7RsAbRTq2mRrImX7B0XRbiNLAQCBdmLrbTDumVb2e0AWdAD4WpIRA4k8cRdSkuhWk3ElLcKdOPPnzPCWrM9HgYwfp2MzNX1bcxYmFEon66UGwslJZ0gWW1fNBgRmY31xXRGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BfsEk2TaRAD1qyB52N5Pqj8vvIEZIISIOqnJhAvh7J0=; b=RqCmQ9B/mUWTPHIwnDkCFLUUMTzVgGnuO3Q6LgMAhl0p4j5WVdNL62UIrk+nMZ5QRxIlBu7Pypp97pnPO9md3eUBK50Y+LQEbxg6SvIhwGJ14WD8jO5J1TSckrGeSnwNx5hbp3ffGtJ00MnCXvO23rEbozazLIdCx2zmfqHzWcyTBmOawQL0wabeSyM3i/TFpn8hzWINx9S2atnMEaLTNdcDlwOKuniHoUjVRYJO2j5slkuKOMnsn+uZTA6nMn6icm0HiQUmcuLn27TPnfct+Ft9dXg69hSiH2QLdzOFRgoDPfbz412mxSMY2P3tZOTiPhebmvUJ+KWKAXMfiHDu2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BfsEk2TaRAD1qyB52N5Pqj8vvIEZIISIOqnJhAvh7J0=; b=fjfz1YrPhXmskERQoimBXfFA3FR6RrbWuIG4knE2gRTTZkke9Qs1etTS7j8J9YZlTxXVq+Vlhty1QB6AZmrArzzzaGBhcvHa/bbXlIrjFtDf8OKH1tLqPvepcZGlS0MQ96Lkqp4bpPIICoJsZ10S1Bc2jejL9aiNmARVg1NArjMhAsiU4szbT7tXUZLgSyyfGuwMiVpdAUnupe4oS9vqCGIIzy0VzZ3jYuzErkflZeITLf5GCnlHS52dCst3nBBdXB57o/CGY8fIIG6HoxTfnwzv05nLtcX0H3qKwg93oZLNIxKmeflS5apkqPDutG0Uq5F5InPV7B4YH1BqnXSreA== Received: from DM6PR04CA0024.namprd04.prod.outlook.com (2603:10b6:5:334::29) by DM6PR12MB4235.namprd12.prod.outlook.com (2603:10b6:5:220::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.30; Mon, 27 Mar 2023 16:14:59 +0000 Received: from DM6NAM11FT011.eop-nam11.prod.protection.outlook.com (2603:10b6:5:334:cafe::3f) by DM6PR04CA0024.outlook.office365.com (2603:10b6:5:334::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.42 via Frontend Transport; Mon, 27 Mar 2023 16:14:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT011.mail.protection.outlook.com (10.13.172.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.22 via Frontend Transport; Mon, 27 Mar 2023 16:14:59 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 27 Mar 2023 09:14:58 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 27 Mar 2023 09:14:58 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 27 Mar 2023 09:14:53 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v4 02/10] arm64: tegra: add bpmp ref in tegra234-mc node Date: Mon, 27 Mar 2023 21:44:18 +0530 Message-ID: <20230327161426.32639-3-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230327161426.32639-1-sumitg@nvidia.com> References: <20230327161426.32639-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT011:EE_|DM6PR12MB4235:EE_ X-MS-Office365-Filtering-Correlation-Id: 276d1b58-2c30-441d-08d9-08db2ede69b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mMOaEMa935v6fLRMcY7irzdDUfZasAWDef53No+fdbPRW/bzrkJtsINTz7cnbOKSMggcnUSGH0lW/xwJB5h9WXJaHP3+7mA3x8cqhoveu/CAUMfIl0Za9iqvbTKI7u03/3/KQmVAe7rI98Ksd7ultt5l5Sge/nLvOQh+pX2sHqwqMkNxFRRJ2XR2oFdhvlxXA7zx+X8NyXCTuPDhMfoeqUhQZSj/54yXgB4CuLJvMuetSymgGDsLY1oq3cankiLaVni7mU+o15IJ7s255QVxc6MJiKgmHJPJNmIRB53OJ27yh1cmiG83J+MiA1jvi5CvJzXbWTbu569jRR3D6582lKr6n4n70eXIjdzSqNLn3ZA7nWWz5l28mdp3kx/vIR273L9ymNRRQRdm4jJ3VT13Iv/UN5BcQc9XxjTV8njit2pzl1h/wQiCtxAK0xjlU51ERt32T8M7sKDOSDlyukPD7nXQ0auWFQyDIGKSXNfxFAg/ulIVvcmd1jvwd5Dkg3MI5sTzwb+QwG/MXXPhNvI7ejRq2Kof+OY/yuVqvue75k11Kmtr7y+AgQqQ1FxeoRcNZvGxLWOD1ErquuLWXi2K4ahT9Up4NXNo1O70r6Yn49gybgCHFhSl1ClAuC9yw4cmWAYhChPrpVbyHjhiJ1epc5aKI7yWT3NQnba8WGuON6V5v+1gpGNNjrK0mtoZNtny64q0OYnrR8EmLeMCivDh3E+JMzmVtvIcTBOytaOAYEWkwZbX1UCfTYy9Nc0veaVL6Vv6oi0/NjjRiajKd/etpzYTYIhv4rlInogG7Ba09Ak= X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(346002)(396003)(136003)(451199021)(36840700001)(46966006)(40470700004)(34020700004)(316002)(110136005)(40460700003)(36860700001)(54906003)(478600001)(356005)(7636003)(82740400003)(8936002)(5660300002)(36756003)(82310400005)(86362001)(4744005)(7416002)(2906002)(4326008)(8676002)(70206006)(70586007)(41300700001)(40480700001)(107886003)(6666004)(186003)(1076003)(26005)(426003)(2616005)(336012)(47076005)(7696005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2023 16:14:59.2831 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 276d1b58-2c30-441d-08d9-08db2ede69b4 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT011.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4235 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761539369840329693?= X-GMAIL-MSGID: =?utf-8?q?1761539369840329693?= Add the "nvidia,bpmp" property within the "memory-controller" node to reference BPMP node. This is needed by the MC driver to pass the client info to the BPMP-FW when memory interconnect support is available. Signed-off-by: Sumit Gupta --- arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi index 959d659dd5cd..348113b4928a 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi @@ -656,6 +656,8 @@ */ dma-ranges = <0x0 0x0 0x0 0x0 0x80 0x0>; + nvidia,bpmp = <&bpmp>; + emc: external-memory-controller@2c60000 { compatible = "nvidia,tegra234-emc"; reg = <0x0 0x02c60000 0x0 0x90000>, From patchwork Mon Mar 27 16:14:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 75551 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3404:b0:112:7285:5352 with SMTP id h4csp1542933rwd; Mon, 27 Mar 2023 09:31:47 -0700 (PDT) X-Google-Smtp-Source: AKy350b53rfEQRxW+5ogSL6HczJGnGQbRkqy3ix1c7KiElPlumk8sZzSBbwfnffvQz6dKMm2fb/E X-Received: by 2002:a17:906:bcdb:b0:92b:5c67:c660 with SMTP id lw27-20020a170906bcdb00b0092b5c67c660mr12982477ejb.69.1679934707082; Mon, 27 Mar 2023 09:31:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679934707; cv=pass; d=google.com; s=arc-20160816; b=A3xaT/YCaIAsOIEygM+YRWprihkUzR8zzmpa2sy7ir1v4ECvVzCgaLFMFK1eNKfZtY dyB15WhX5dwDj3TLeMkf30VwB3/a/GdYIBrvh/tIh8QkRduGGreOjbgc9OrVi6EUyq4/ luSLM2MptTGtO4Kmz+00ThobyjDBVvbIEoKeQ4l+QL2i3uWI2vJ49iGRysOURRzSOeI5 SZKX0QYnum8GH8dDYeJ2nMvEQt/Oi1yZwn+J43Y/WH9ysycAQwOyYuu9629Oee2K23SW X5M+y+bVvfqef4EaF4MZ+w3mLlr12smbZQQtZPElYSwGWhk6v3xs56j9sjfBWz4D93A9 j72g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=esUeuPs57IWZoInA3oDujj7lRJGwAMPyvnlyKavKTMw=; b=seD816fBTwUS9DZyuVEsQ07yH5Esp87sGJIK6JediegzsDJDw9ALZpwCLzEedtEwlo bVuWGjNNWdNXsxGNrPzwJNFhAe73waSAyP2Ad+GJJiT7mnELLGLn3s6YEuRM7wGEf7Hm sJkjnJwFfDkqoIO/Lco9vsmExxIIxjacE0W4t2+4O3WTk5gSUoNomy97BSvhaiI7D5UI kJ6ls3UBSz9SNmg/9vyxeNAK2L9euMTC9HpvcXlcL/HDiEkH4EbfCBYp1ZFzU16SAfgR HEy2j9VKQQgAjjKEhUd50ZVXig7Q1fZEytzDsVtrrr/M1NRvqu6p6y0MPFBVWzkvRWJn NeEQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="m/JRVDvr"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa5-20020a170906eda500b00930a3df8e79si29316744ejb.558.2023.03.27.09.31.21; Mon, 27 Mar 2023 09:31:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="m/JRVDvr"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231987AbjC0QPu (ORCPT + 99 others); Mon, 27 Mar 2023 12:15:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbjC0QPr (ORCPT ); Mon, 27 Mar 2023 12:15:47 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2061.outbound.protection.outlook.com [40.107.237.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A292A55B2; Mon, 27 Mar 2023 09:15:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MzjcBjIpfsoaFukarPyTOIt1VzJ+62KAXkmR6rZbLUBS0GCmjAUfjM1xPhxOTeweWu1YISv9qUasZn27YGElahpaWX/T2EwHHF2AZpVIFxMRYjJVoCFxRyNJyewF52rur2Ow68aWFqCSx79nbTUcwRpYYSaCqCo1A5DzqmUTa8ebprrN8jce9v7/1ikFaRRWBfWl16bIHUbRNr05lU1AZTMvAkyzBYtvJgicuf7Q+DIKBKRB5lsvkM+RFVOuyVcmyolmbZaXtPV+h2lBSQYB1KCskG8FP/JR8lyp8q3m+I3DdgvDkavH6QrFUTUrrjHluP4ouknJ4SeDkJr4H2VlSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=esUeuPs57IWZoInA3oDujj7lRJGwAMPyvnlyKavKTMw=; b=UfEnnkEK95gmi0CyCZm30lsijekAKFj8FZ0mzwpYAgSfolnFQVVESnQ8yDYvorJnuQXKGP4yE/Og+vXrmQ/0P6Yu98WxeZnh98EPkJa1+oxXuRoR9hvEa04h1NUr5SfBL2t/cm7jyANy7xoJGjfVoeKbyS+Rrx+mCCvo/P4svmsuKn3JHe9mR+NplEghvChRA3RvnO+r6ay02phc67AyOHGYUnRsI24qHS7GGu4bB9M5cSEIjc4G9IfqxpOsOhe12Tii29KCrWTH8BkQNYndN9/ASP1DwYPpBiEpWzRkSrxP5ET64y+T1iWPma5tn9cZd1F4Y0P1L8ryRk8uqBmLZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=esUeuPs57IWZoInA3oDujj7lRJGwAMPyvnlyKavKTMw=; b=m/JRVDvr7QAPobUteGcYf5Wytg7UwZNwma/ikqTs7dtQ3DaW6tFitcIlGV8n7SXhbqRSUqb+XXkQV8wxNVMCO13DOXnTSS0vJjxFvApZQI7SsGumVogpqfgg4JnR3T+9zn+ytlUEvSORSAmGrEJIb6hl8L+gyd+eTtKvjwJSkU8WMbUqs5UfiAHIpj3uFTnIDht+WZHBuXSTBoX/lcLuE0OEadrO2Dq/Iu68k9QUlm9srAmo84D9+tqhBz0TtRiHOgWj2nv5pfOiC8XkrWcDJDWJqg37Eyc3g/w446huORn3WVJV1rLpnT/fkyqm3kJblmtSco3HswyJPO8/d2OCFw== Received: from CYZPR05CA0018.namprd05.prod.outlook.com (2603:10b6:930:89::16) by IA1PR12MB6114.namprd12.prod.outlook.com (2603:10b6:208:3ea::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.28; Mon, 27 Mar 2023 16:15:25 +0000 Received: from CY4PEPF0000C978.namprd02.prod.outlook.com (2603:10b6:930:89:cafe::a1) by CYZPR05CA0018.outlook.office365.com (2603:10b6:930:89::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.17 via Frontend Transport; Mon, 27 Mar 2023 16:15:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by CY4PEPF0000C978.mail.protection.outlook.com (10.167.241.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.30 via Frontend Transport; Mon, 27 Mar 2023 16:15:24 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 27 Mar 2023 09:15:08 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 27 Mar 2023 09:15:08 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 27 Mar 2023 09:15:03 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v4 03/10] memory: tegra: add interconnect support for DRAM scaling in Tegra234 Date: Mon, 27 Mar 2023 21:44:19 +0530 Message-ID: <20230327161426.32639-4-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230327161426.32639-1-sumitg@nvidia.com> References: <20230327161426.32639-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C978:EE_|IA1PR12MB6114:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f58cc62-6437-447c-08f1-08db2ede78c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ejQrPzG2bLLirFJwTLwBwtfU7FKnZvdiaiKjOLW230uMqnVbKj7bkak/rucUY9IO0zqEwLUZgY55RG9vWzyS9VXU7blKMXCZAvms5oTIaTSCHOCZXTZmzyfENm3btbLCvfzzBCkwkQMvvz23ToXjhO1VsHKe6/QuSgPm7S4++jSN6Fb2OTypH8L+Frt+8sVFrUlD8UuZS+NAOLg5LIOw7obF1PBbm+AHf/PvlW3vjoFWJWlSkJTYQKsUkK4NS0tfDiyAmEK5f+QHlFNLVzAw4DaUciN4e5lKVDSLBglkiG4c6orgaH5jnyryD5fG6sh4qnkTjNIoVp0X03GvYzWRyxz0pEvJawpRbU4GECMUR3HyDeuf988E4MQpiKsXztTC/RBjfKzGYlVZvwPA1F91Jv8U+YAl1BN6wNNdCWHjyx8fVb4iqg7NzNhyCfJZwA+eDIAegHtjZkvzOvBfoT+Pukr4c60IEiqSV5oZufn2B+Cqw5IM8OVpn8aIcrAYX8AiVXNygFIQkDG9mdnLxQbllpZSff+y6Ox4wxXk30r22Asi2fIfMZYV87nBtWoa56SbsV6/+4SuAAx4YgPHucWbIVT/kDT4OuGRGa0wBpzKYAP2A5EsisKGHiy9934OxPBYv75W1RCHnH3LpvZ4goZnMa2Pi4p9ZcQDLf8AuKTOExtGPKN7ysvLgIMymHqSkPB9vj3LUHX/zy4Jl0zxTAQHRIXRvbzjjngcCnlvWGS5+334sIRCIPLaJ1y1Vbhkin69 X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(396003)(39860400002)(346002)(451199021)(46966006)(36840700001)(40470700004)(2616005)(83380400001)(47076005)(426003)(336012)(8676002)(2906002)(70586007)(70206006)(4326008)(54906003)(7696005)(478600001)(1076003)(316002)(186003)(26005)(110136005)(6666004)(82310400005)(7416002)(107886003)(40480700001)(30864003)(40460700003)(86362001)(36756003)(36860700001)(41300700001)(8936002)(356005)(5660300002)(82740400003)(7636003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2023 16:15:24.5825 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f58cc62-6437-447c-08f1-08db2ede78c6 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000C978.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6114 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761539215040051995?= X-GMAIL-MSGID: =?utf-8?q?1761539215040051995?= Add Interconnect framework support to dynamically set the DRAM bandwidth from different clients. Both the MC and EMC drivers are added as ICC providers. The path for any request is: MC-Client[1-n] -> MC -> EMC -> EMEM/DRAM MC client's request for bandwidth will go to the MC driver which passes the client request info like BPMP Client ID, Client type and the Bandwidth to the BPMP-FW. The final DRAM freq to achieve the requested bandwidth is set by the BPMP-FW based on the passed parameters. Signed-off-by: Sumit Gupta --- drivers/memory/tegra/mc.c | 5 + drivers/memory/tegra/tegra186-emc.c | 125 ++++++++++++++++++++++++ drivers/memory/tegra/tegra186.c | 3 + drivers/memory/tegra/tegra234.c | 143 +++++++++++++++++++++++++++- include/linux/tegra-icc.h | 65 +++++++++++++ include/soc/tegra/mc.h | 7 ++ 6 files changed, 347 insertions(+), 1 deletion(-) create mode 100644 include/linux/tegra-icc.h diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c index 9082b6c3763d..983455b1f98d 100644 --- a/drivers/memory/tegra/mc.c +++ b/drivers/memory/tegra/mc.c @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -792,6 +793,8 @@ static int tegra_mc_interconnect_setup(struct tegra_mc *mc) mc->provider.data = &mc->provider; mc->provider.set = mc->soc->icc_ops->set; mc->provider.aggregate = mc->soc->icc_ops->aggregate; + mc->provider.get_bw = mc->soc->icc_ops->get_bw; + mc->provider.xlate = mc->soc->icc_ops->xlate; mc->provider.xlate_extended = mc->soc->icc_ops->xlate_extended; icc_provider_init(&mc->provider); @@ -824,6 +827,8 @@ static int tegra_mc_interconnect_setup(struct tegra_mc *mc) err = icc_link_create(node, TEGRA_ICC_MC); if (err) goto remove_nodes; + + node->data = (struct tegra_mc_client *)&(mc->soc->clients[i]); } err = icc_provider_register(&mc->provider); diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c index e935ad4e95b6..1eefcf2ac0c7 100644 --- a/drivers/memory/tegra/tegra186-emc.c +++ b/drivers/memory/tegra/tegra186-emc.c @@ -7,9 +7,11 @@ #include #include #include +#include #include #include +#include "mc.h" struct tegra186_emc_dvfs { unsigned long latency; @@ -29,8 +31,15 @@ struct tegra186_emc { unsigned long min_rate; unsigned long max_rate; } debugfs; + + struct icc_provider provider; }; +static inline struct tegra186_emc *to_tegra186_emc(struct icc_provider *provider) +{ + return container_of(provider, struct tegra186_emc, provider); +} + /* * debugfs interface * @@ -146,11 +155,104 @@ DEFINE_DEBUGFS_ATTRIBUTE(tegra186_emc_debug_max_rate_fops, tegra186_emc_debug_max_rate_get, tegra186_emc_debug_max_rate_set, "%llu\n"); +/* + * tegra_emc_icc_set_bw() - Set BW api for EMC provider + * @src: ICC node for External Memory Controller (EMC) + * @dst: ICC node for External Memory (DRAM) + * + * Do nothing here as info to BPMP-FW is now passed in the BW set function + * of the MC driver. BPMP-FW sets the final Freq based on the passed values. + */ +static int tegra_emc_icc_set_bw(struct icc_node *src, struct icc_node *dst) +{ + return 0; +} + +static struct icc_node * +tegra_emc_of_icc_xlate(struct of_phandle_args *spec, void *data) +{ + struct icc_provider *provider = data; + struct icc_node *node; + + /* External Memory is the only possible ICC route */ + list_for_each_entry(node, &provider->nodes, node_list) { + if (node->id != TEGRA_ICC_EMEM) + continue; + + return node; + } + + return ERR_PTR(-EPROBE_DEFER); +} + +static int tegra_emc_icc_get_init_bw(struct icc_node *node, u32 *avg, u32 *peak) +{ + *avg = 0; + *peak = 0; + + return 0; +} + +static int tegra_emc_interconnect_init(struct tegra186_emc *emc) +{ + struct tegra_mc *mc = dev_get_drvdata(emc->dev->parent); + const struct tegra_mc_soc *soc = mc->soc; + struct icc_node *node; + int err; + + emc->provider.dev = emc->dev; + emc->provider.set = tegra_emc_icc_set_bw; + emc->provider.data = &emc->provider; + emc->provider.aggregate = soc->icc_ops->aggregate; + emc->provider.xlate = tegra_emc_of_icc_xlate; + emc->provider.get_bw = tegra_emc_icc_get_init_bw; + + icc_provider_init(&emc->provider); + + /* create External Memory Controller node */ + node = icc_node_create(TEGRA_ICC_EMC); + if (IS_ERR(node)) { + err = PTR_ERR(node); + goto err_msg; + } + + node->name = "External Memory Controller"; + icc_node_add(node, &emc->provider); + + /* link External Memory Controller to External Memory (DRAM) */ + err = icc_link_create(node, TEGRA_ICC_EMEM); + if (err) + goto remove_nodes; + + /* create External Memory node */ + node = icc_node_create(TEGRA_ICC_EMEM); + if (IS_ERR(node)) { + err = PTR_ERR(node); + goto remove_nodes; + } + + node->name = "External Memory (DRAM)"; + icc_node_add(node, &emc->provider); + + err = icc_provider_register(&emc->provider); + if (err) + goto remove_nodes; + + return 0; +remove_nodes: + icc_nodes_remove(&emc->provider); +err_msg: + dev_err(emc->dev, "failed to initialize ICC: %d\n", err); + + return err; +} + static int tegra186_emc_probe(struct platform_device *pdev) { struct mrq_emc_dvfs_latency_response response; struct tegra_bpmp_message msg; struct tegra186_emc *emc; + struct tegra_mc *mc; unsigned int i; int err; @@ -158,6 +260,9 @@ static int tegra186_emc_probe(struct platform_device *pdev) if (!emc) return -ENOMEM; + platform_set_drvdata(pdev, emc); + emc->dev = &pdev->dev; + emc->bpmp = tegra_bpmp_get(&pdev->dev); if (IS_ERR(emc->bpmp)) return dev_err_probe(&pdev->dev, PTR_ERR(emc->bpmp), "failed to get BPMP\n"); @@ -236,6 +341,25 @@ static int tegra186_emc_probe(struct platform_device *pdev) debugfs_create_file("max_rate", S_IRUGO | S_IWUSR, emc->debugfs.root, emc, &tegra186_emc_debug_max_rate_fops); + mc = dev_get_drvdata(emc->dev->parent); + if (mc && mc->soc->icc_ops) { + /* + * Initialize the ICC even if BPMP-FW doesn't support 'MRQ_BWMGR_INT'. + * Use the flag 'mc->bwmgr_mrq_supported' within MC driver and return + * EINVAL instead of passing the request to BPMP-FW later when the BW + * request is made by client with 'icc_set_bw()' call. + */ + err = tegra_emc_interconnect_init(emc); + if (err) + goto put_bpmp; + + if (tegra_bpmp_mrq_is_supported(emc->bpmp, MRQ_BWMGR_INT)) + mc->bwmgr_mrq_supported = true; + else + + dev_info(&pdev->dev, "MRQ_BWMGR_INT not present\n"); + } + return 0; put_bpmp: @@ -272,6 +396,7 @@ static struct platform_driver tegra186_emc_driver = { .name = "tegra186-emc", .of_match_table = tegra186_emc_of_match, .suppress_bind_attrs = true, + .sync_state = icc_sync_state, }, .probe = tegra186_emc_probe, .remove = tegra186_emc_remove, diff --git a/drivers/memory/tegra/tegra186.c b/drivers/memory/tegra/tegra186.c index 7bb73f06fad3..386e029e41bb 100644 --- a/drivers/memory/tegra/tegra186.c +++ b/drivers/memory/tegra/tegra186.c @@ -10,6 +10,7 @@ #include #include +#include #include #if defined(CONFIG_ARCH_TEGRA_186_SOC) @@ -65,6 +66,8 @@ static int tegra186_mc_probe(struct tegra_mc *mc) static void tegra186_mc_remove(struct tegra_mc *mc) { of_platform_depopulate(mc->dev); + + tegra_bpmp_put(mc->bpmp); } #if IS_ENABLED(CONFIG_IOMMU_API) diff --git a/drivers/memory/tegra/tegra234.c b/drivers/memory/tegra/tegra234.c index 02dcc5748bba..4f34247c9bda 100644 --- a/drivers/memory/tegra/tegra234.c +++ b/drivers/memory/tegra/tegra234.c @@ -1,18 +1,24 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (C) 2021-2022, NVIDIA CORPORATION. All rights reserved. + * Copyright (C) 20212-2023, NVIDIA CORPORATION. All rights reserved. */ #include #include +#include +#include +#include +#include #include "mc.h" static const struct tegra_mc_client tegra234_mc_clients[] = { { .id = TEGRA234_MEMORY_CLIENT_MGBEARD, .name = "mgbeard", + .bpmp_id = TEGRA_ICC_BPMP_EQOS, + .type = TEGRA_ICC_NISO, .sid = TEGRA234_SID_MGBE, .regs = { .sid = { @@ -23,6 +29,8 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, { .id = TEGRA234_MEMORY_CLIENT_MGBEBRD, .name = "mgbebrd", + .bpmp_id = TEGRA_ICC_BPMP_EQOS, + .type = TEGRA_ICC_NISO, .sid = TEGRA234_SID_MGBE_VF1, .regs = { .sid = { @@ -33,6 +41,8 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, { .id = TEGRA234_MEMORY_CLIENT_MGBECRD, .name = "mgbecrd", + .bpmp_id = TEGRA_ICC_BPMP_EQOS, + .type = TEGRA_ICC_NISO, .sid = TEGRA234_SID_MGBE_VF2, .regs = { .sid = { @@ -43,6 +53,8 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, { .id = TEGRA234_MEMORY_CLIENT_MGBEDRD, .name = "mgbedrd", + .bpmp_id = TEGRA_ICC_BPMP_EQOS, + .type = TEGRA_ICC_NISO, .sid = TEGRA234_SID_MGBE_VF3, .regs = { .sid = { @@ -52,6 +64,8 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, }, { .id = TEGRA234_MEMORY_CLIENT_MGBEAWR, + .bpmp_id = TEGRA_ICC_BPMP_EQOS, + .type = TEGRA_ICC_NISO, .name = "mgbeawr", .sid = TEGRA234_SID_MGBE, .regs = { @@ -63,6 +77,8 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, { .id = TEGRA234_MEMORY_CLIENT_MGBEBWR, .name = "mgbebwr", + .bpmp_id = TEGRA_ICC_BPMP_EQOS, + .type = TEGRA_ICC_NISO, .sid = TEGRA234_SID_MGBE_VF1, .regs = { .sid = { @@ -73,6 +89,8 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, { .id = TEGRA234_MEMORY_CLIENT_MGBECWR, .name = "mgbecwr", + .bpmp_id = TEGRA_ICC_BPMP_EQOS, + .type = TEGRA_ICC_NISO, .sid = TEGRA234_SID_MGBE_VF2, .regs = { .sid = { @@ -83,6 +101,8 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, { .id = TEGRA234_MEMORY_CLIENT_SDMMCRAB, .name = "sdmmcrab", + .bpmp_id = TEGRA_ICC_BPMP_SDMMC_4, + .type = TEGRA_ICC_NISO, .sid = TEGRA234_SID_SDMMC4, .regs = { .sid = { @@ -93,6 +113,8 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, { .id = TEGRA234_MEMORY_CLIENT_MGBEDWR, .name = "mgbedwr", + .bpmp_id = TEGRA_ICC_BPMP_EQOS, + .type = TEGRA_ICC_NISO, .sid = TEGRA234_SID_MGBE_VF3, .regs = { .sid = { @@ -103,6 +125,8 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, { .id = TEGRA234_MEMORY_CLIENT_SDMMCWAB, .name = "sdmmcwab", + .bpmp_id = TEGRA_ICC_BPMP_SDMMC_4, + .type = TEGRA_ICC_NISO, .sid = TEGRA234_SID_SDMMC4, .regs = { .sid = { @@ -153,6 +177,8 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, { .id = TEGRA234_MEMORY_CLIENT_APEDMAR, .name = "apedmar", + .bpmp_id = TEGRA_ICC_BPMP_APEDMA, + .type = TEGRA_ICC_ISO_AUDIO, .sid = TEGRA234_SID_APE, .regs = { .sid = { @@ -163,6 +189,8 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, { .id = TEGRA234_MEMORY_CLIENT_APEDMAW, .name = "apedmaw", + .bpmp_id = TEGRA_ICC_BPMP_APEDMA, + .type = TEGRA_ICC_ISO_AUDIO, .sid = TEGRA234_SID_APE, .regs = { .sid = { @@ -333,6 +361,118 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { }, }; +/* + * tegra234_mc_icc_set() - Pass MC client info to the BPMP-FW + * @src: ICC node for Memory Controller's (MC) Client + * @dst: ICC node for Memory Controller (MC) + * + * Passing the current request info from the MC to the BPMP-FW where + * LA and PTSA registers are accessed and the final EMC freq is set + * based on client_id, type, latency and bandwidth. + * icc_set_bw() makes set_bw calls for both MC and EMC providers in + * sequence. Both the calls are protected by 'mutex_lock(&icc_lock)'. + * So, the data passed won't be updated by concurrent set calls from + * other clients. + */ +static int tegra234_mc_icc_set(struct icc_node *src, struct icc_node *dst) +{ + struct tegra_mc *mc = icc_provider_to_tegra_mc(dst->provider); + struct mrq_bwmgr_int_request bwmgr_req = { 0 }; + struct mrq_bwmgr_int_response bwmgr_resp = { 0 }; + const struct tegra_mc_client *pclient = src->data; + struct tegra_bpmp_message msg; + int ret; + + /* + * Same Src and Dst node will happen during boot from icc_node_add(). + * This can be used to pre-initialize and set bandwidth for all clients + * before their drivers are loaded. We are skipping this case as for us, + * the pre-initialization already happened in Bootloader(MB2) and BPMP-FW. + */ + if (src->id == dst->id) + return 0; + + if (!mc->bwmgr_mrq_supported) + return -EINVAL; + + if (!mc->bpmp) { + mc->bpmp = tegra_bpmp_get(mc->dev); + if (IS_ERR(mc->bpmp)) { + ret = PTR_ERR(mc->bpmp); + dev_err(mc->dev, "failed to get BPMP: %d\n", ret); + return ret; + } + } + + if (pclient->type == TEGRA_ICC_NISO) + bwmgr_req.bwmgr_calc_set_req.niso_bw = src->avg_bw; + else + bwmgr_req.bwmgr_calc_set_req.iso_bw = src->avg_bw; + + bwmgr_req.bwmgr_calc_set_req.client_id = pclient->bpmp_id; + + bwmgr_req.cmd = CMD_BWMGR_INT_CALC_AND_SET; + bwmgr_req.bwmgr_calc_set_req.mc_floor = src->peak_bw; + bwmgr_req.bwmgr_calc_set_req.floor_unit = BWMGR_INT_UNIT_KBPS; + + memset(&msg, 0, sizeof(msg)); + msg.mrq = MRQ_BWMGR_INT; + msg.tx.data = &bwmgr_req; + msg.tx.size = sizeof(bwmgr_req); + msg.rx.data = &bwmgr_resp; + msg.rx.size = sizeof(bwmgr_resp); + + ret = tegra_bpmp_transfer(mc->bpmp, &msg); + if (ret < 0) { + dev_err(mc->dev, "BPMP transfer failed: %d\n", ret); + goto error; + } + if (msg.rx.ret < 0) { + pr_err("failed to set bandwidth for %u: %d\n", + bwmgr_req.bwmgr_calc_set_req.client_id, msg.rx.ret); + ret = -EINVAL; + } + +error: + return ret; +} + +static struct icc_node* +tegra234_mc_of_icc_xlate(struct of_phandle_args *spec, void *data) +{ + struct tegra_mc *mc = icc_provider_to_tegra_mc(data); + unsigned int cl_id = spec->args[0]; + struct icc_node *node; + + list_for_each_entry(node, &mc->provider.nodes, node_list) { + if (node->id != cl_id) + continue; + + return node; + } + + /* + * If a client driver calls devm_of_icc_get() before the MC driver + * is probed, then return EPROBE_DEFER to the client driver. + */ + return ERR_PTR(-EPROBE_DEFER); +} + +static int tegra234_mc_icc_get_init_bw(struct icc_node *node, u32 *avg, u32 *peak) +{ + *avg = 0; + *peak = 0; + + return 0; +} + +static const struct tegra_mc_icc_ops tegra234_mc_icc_ops = { + .xlate = tegra234_mc_of_icc_xlate, + .aggregate = icc_std_aggregate, + .get_bw = tegra234_mc_icc_get_init_bw, + .set = tegra234_mc_icc_set, +}; + const struct tegra_mc_soc tegra234_mc_soc = { .num_clients = ARRAY_SIZE(tegra234_mc_clients), .clients = tegra234_mc_clients, @@ -345,6 +485,7 @@ const struct tegra_mc_soc tegra234_mc_soc = { MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM, .has_addr_hi_reg = true, .ops = &tegra186_mc_ops, + .icc_ops = &tegra234_mc_icc_ops, .ch_intmask = 0x0000ff00, .global_intstatus_channel_shift = 8, /* diff --git a/include/linux/tegra-icc.h b/include/linux/tegra-icc.h new file mode 100644 index 000000000000..4b4d4bee290c --- /dev/null +++ b/include/linux/tegra-icc.h @@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2022-2023 NVIDIA CORPORATION. All rights reserved. + */ + +#ifndef LINUX_TEGRA_ICC_H +#define LINUX_TEGRA_ICC_H + +enum tegra_icc_client_type { + TEGRA_ICC_NONE, + TEGRA_ICC_NISO, + TEGRA_ICC_ISO_DISPLAY, + TEGRA_ICC_ISO_VI, + TEGRA_ICC_ISO_AUDIO, + TEGRA_ICC_ISO_VIFAL, +}; + +/* ICC ID's for MC client's used in BPMP */ +#define TEGRA_ICC_BPMP_DEBUG 1 +#define TEGRA_ICC_BPMP_CPU_CLUSTER0 2 +#define TEGRA_ICC_BPMP_CPU_CLUSTER1 3 +#define TEGRA_ICC_BPMP_CPU_CLUSTER2 4 +#define TEGRA_ICC_BPMP_GPU 5 +#define TEGRA_ICC_BPMP_CACTMON 6 +#define TEGRA_ICC_BPMP_DISPLAY 7 +#define TEGRA_ICC_BPMP_VI 8 +#define TEGRA_ICC_BPMP_EQOS 9 +#define TEGRA_ICC_BPMP_PCIE_0 10 +#define TEGRA_ICC_BPMP_PCIE_1 11 +#define TEGRA_ICC_BPMP_PCIE_2 12 +#define TEGRA_ICC_BPMP_PCIE_3 13 +#define TEGRA_ICC_BPMP_PCIE_4 14 +#define TEGRA_ICC_BPMP_PCIE_5 15 +#define TEGRA_ICC_BPMP_PCIE_6 16 +#define TEGRA_ICC_BPMP_PCIE_7 17 +#define TEGRA_ICC_BPMP_PCIE_8 18 +#define TEGRA_ICC_BPMP_PCIE_9 19 +#define TEGRA_ICC_BPMP_PCIE_10 20 +#define TEGRA_ICC_BPMP_DLA_0 21 +#define TEGRA_ICC_BPMP_DLA_1 22 +#define TEGRA_ICC_BPMP_SDMMC_1 23 +#define TEGRA_ICC_BPMP_SDMMC_2 24 +#define TEGRA_ICC_BPMP_SDMMC_3 25 +#define TEGRA_ICC_BPMP_SDMMC_4 26 +#define TEGRA_ICC_BPMP_NVDEC 27 +#define TEGRA_ICC_BPMP_NVENC 28 +#define TEGRA_ICC_BPMP_NVJPG_0 29 +#define TEGRA_ICC_BPMP_NVJPG_1 30 +#define TEGRA_ICC_BPMP_OFAA 31 +#define TEGRA_ICC_BPMP_XUSB_HOST 32 +#define TEGRA_ICC_BPMP_XUSB_DEV 33 +#define TEGRA_ICC_BPMP_TSEC 34 +#define TEGRA_ICC_BPMP_VIC 35 +#define TEGRA_ICC_BPMP_APE 36 +#define TEGRA_ICC_BPMP_APEDMA 37 +#define TEGRA_ICC_BPMP_SE 38 +#define TEGRA_ICC_BPMP_ISP 39 +#define TEGRA_ICC_BPMP_HDA 40 +#define TEGRA_ICC_BPMP_VIFAL 41 +#define TEGRA_ICC_BPMP_VI2FAL 42 +#define TEGRA_ICC_BPMP_VI2 43 +#define TEGRA_ICC_BPMP_RCE 44 +#define TEGRA_ICC_BPMP_PVA 45 + +#endif /* LINUX_TEGRA_ICC_H */ diff --git a/include/soc/tegra/mc.h b/include/soc/tegra/mc.h index 51a2263e1bc5..900d88b26fae 100644 --- a/include/soc/tegra/mc.h +++ b/include/soc/tegra/mc.h @@ -13,6 +13,7 @@ #include #include #include +#include struct clk; struct device; @@ -26,6 +27,8 @@ struct tegra_mc_timing { struct tegra_mc_client { unsigned int id; + unsigned int bpmp_id; + enum tegra_icc_client_type type; const char *name; /* * For Tegra210 and earlier, this is the SWGROUP ID used for IOVA translations in the @@ -166,8 +169,10 @@ struct tegra_mc_icc_ops { int (*set)(struct icc_node *src, struct icc_node *dst); int (*aggregate)(struct icc_node *node, u32 tag, u32 avg_bw, u32 peak_bw, u32 *agg_avg, u32 *agg_peak); + struct icc_node* (*xlate)(struct of_phandle_args *spec, void *data); struct icc_node_data *(*xlate_extended)(struct of_phandle_args *spec, void *data); + int (*get_bw)(struct icc_node *node, u32 *avg, u32 *peak); }; struct tegra_mc_ops { @@ -214,6 +219,7 @@ struct tegra_mc_soc { }; struct tegra_mc { + struct tegra_bpmp *bpmp; struct device *dev; struct tegra_smmu *smmu; struct gart_device *gart; @@ -229,6 +235,7 @@ struct tegra_mc { struct tegra_mc_timing *timings; unsigned int num_timings; + bool bwmgr_mrq_supported; struct reset_controller_dev reset; struct icc_provider provider; From patchwork Mon Mar 27 16:14:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 75550 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3404:b0:112:7285:5352 with SMTP id h4csp1542035rwd; Mon, 27 Mar 2023 09:30:34 -0700 (PDT) X-Google-Smtp-Source: AKy350Zv6HLVpR/5no7Ei3eSch6lOsL9aW8pgM1HZ1PgcelIoeKj/fiEryQZV+DH1Hm4viLCN3Tu X-Received: by 2002:a05:6402:1a48:b0:501:d3a1:9a4a with SMTP id bf8-20020a0564021a4800b00501d3a19a4amr13031913edb.19.1679934633842; Mon, 27 Mar 2023 09:30:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679934633; cv=pass; d=google.com; s=arc-20160816; b=PjEtvNz7YJI/KhfOguM1EiJ4P6bRnMPHC6RD76SoQr+lFlttEvLZhvVwGM8Cxrw8Om aTgjTYCL5gOpoB5T7gPZWV9D+V359NgPv/GYBtl9kU8PXvwoldunE+w+ZfY4qdePZG8W zqzfI2et8cRapWy+2wNGkVBu8PHgYZkmcbzQbAZ4PhKJ4e9aXibLoqtzGYWWCXWgh8W+ anQu4y2T2U5J7ytOTPLfXsfGwIX9NA6/NgjmkGWFy+Q4jAaEz5PWMVV62RacXiPZ9kra HDobKzYGI/F3dA5ugQX1VKlb+8VwE3LScZbICnFAfvNFydynv5dzDGX4WQY/w/Y3za18 X/mA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=tzpPMboCaCyASWeoE+1hEmbxoe1b30Ggk931nsVeTTI=; b=vMsFO0rO9MnQUqnOSJlbsVAemMEO0mSVu9UsB6KIv49gLrvFf9aojYqhNF6sMFGlYn aYyioKpSP6hy6r+hRG2H41eTJZDvMfzEHWkEa/21wFUpUlKN/OqbXdvYuyFEqZ4DIWpM fLw+wSEfqnVIw415lI+k/eUVy6ZaFsw7mthu3094qg0euBZ9xubFubCK7Y9pf/Dp2GqK tJ9K5ZvcUIdH29ztlZjvyKV62wd5qjbQgZncn53ED0/UZu5EIJv+/UBjAbcJW/4YnBI3 T9EbEDo66mirPtw9m7Ns/bGszzb9/o66Ki1D4I+tq0tatB5fpc6++tciPaBCg/XQ2/cp msoA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=Gd4MXOLl; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r7-20020a056402034700b004acdca46ec2si29369210edw.440.2023.03.27.09.30.09; Mon, 27 Mar 2023 09:30:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=Gd4MXOLl; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232538AbjC0QQK (ORCPT + 99 others); Mon, 27 Mar 2023 12:16:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbjC0QQI (ORCPT ); Mon, 27 Mar 2023 12:16:08 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DAA159D6; Mon, 27 Mar 2023 09:15:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mqW26Zx+vYElpOV5KBz6i8LJeyjcun9RK3iYJtY5STFJZs7aYEoXoNA4zLZSZ78J/5hktZ2LhaEZx67j4Y5cVAClazhBstshXDaqAM4KKcXYkbVw7e6YXAbNAkSCTD5z1lgZolJB5tRHvOdQ5/gl6rNeR8Qy1JZ+Xq4J5/tr6GX2sVG/WSjzvUaxtB3DwRGJclQU7uGPODH7YHf4oDfzG46vSxDYYPeFCYfkTbiPoKn8abLQwm0/tVop3UC/JdqtQRncQovBtpm/d58R3SDtso3gDyVvte+1LEGM98CfD52CqyvXCs/0rIFbQp/MP3lHJcmztRIKF/W1sBIhd7M9+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tzpPMboCaCyASWeoE+1hEmbxoe1b30Ggk931nsVeTTI=; b=NJj1ZrnSJewAanJuHTlek0AYJyTvdqBWMM2wNgZwsWAFD6eJ6gGBkerJE1pWOSCSz6wGAUIllDz0cUaasy6mLL5b/47Qjfa2eyiSoUBZ6ZBCS01pEglQCEtE6lnJmSAW+qF1VAtuvLhELqR4KRw0Gi7WOeUW2edSq846lGJ7m5WfNo2QEdJZpk0RZPcWeXZRPYmn/mdprYkGZkBJEBcVOENkobvwafgcdzKzeqI2KuTnhzVVb7W/X/+2khQ+QJPLjmD+AXDlopEeL5fIESAYfsFdMbTh9/Lx+wTr+gzzGXwbnO7dWZh9rUS1OsAfV3j8M7vBZr4S93mJP4msNRJVSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tzpPMboCaCyASWeoE+1hEmbxoe1b30Ggk931nsVeTTI=; b=Gd4MXOLlafyy6aUx1FHgCmxJPmqnOti5Ly0wda81kfjzsHzq4AmZJs5UHHUUoaYvpD5FG4x8/0gmRnywLXNPTHp2oiXuaz2g2IZn25qMF+O3PYR9aqUDaMPUqVPwzDJlVS9Y2uxhGpUiI6vd4rqjFkjjbSAbEnxVI57owfCy2puQCWyWT6osV4EtRtpCh55OjlL5ktoai5i3TP0HsQonnCHK89xs+HCGI8HwYBcWn+ESz1Ay1l5Ad9PsRFNZDOIdQZKFIrHrDtkvWVdgxpl4tqgmhYEQ1HWcZ7nRWvQwTowgyRhcLw2WSzFUIvB+7ESgnoD+942Pfjji4ZEfxR39JQ== Received: from CYZPR05CA0028.namprd05.prod.outlook.com (2603:10b6:930:a3::12) by DM6PR12MB4106.namprd12.prod.outlook.com (2603:10b6:5:221::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.41; Mon, 27 Mar 2023 16:15:42 +0000 Received: from CY4PEPF0000C97D.namprd02.prod.outlook.com (2603:10b6:930:a3:cafe::9c) by CYZPR05CA0028.outlook.office365.com (2603:10b6:930:a3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.17 via Frontend Transport; Mon, 27 Mar 2023 16:15:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by CY4PEPF0000C97D.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.30 via Frontend Transport; Mon, 27 Mar 2023 16:15:42 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 27 Mar 2023 09:15:28 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 27 Mar 2023 09:15:27 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 27 Mar 2023 09:15:22 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v4 04/10] memory: tegra: add mc clients for Tegra234 Date: Mon, 27 Mar 2023 21:44:20 +0530 Message-ID: <20230327161426.32639-5-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230327161426.32639-1-sumitg@nvidia.com> References: <20230327161426.32639-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C97D:EE_|DM6PR12MB4106:EE_ X-MS-Office365-Filtering-Correlation-Id: a5ad10a6-61c8-4714-255f-08db2ede8385 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sRUOblvRwjo8RHSeJQPsG09cyV45aTpnSSrXjwkMwBB8ksCXAoQ5dKqikgvKxf2r099eKxyUQLwlC7EjoJfEnoN4rz6nnURHEZMp46eIvuuhs+D/AfomTeEWOmfadchYl+HqpPnku1uu4XHgZuG0qGKcremljeHGGu758N3SM7ft3Gu5IiqPHxlO83TF03dOPzkLzGz9l12S8QSl+G4CnFG4hwN+afr9ITo5hlydRG50AC1LV6g62EE/QGuJF21iBIu7y6T9wUeGocGEYmoZrXwXE3H4W0KEYPIibkZRbOk4osgK/N2H5Vp7QAaXj9n1a2KzRYl5PthjegQCdTOf3puvvsjsU6+F7svya44RqxSEsR6baDmY1DGDuZVBclGKngq7vOEqrFeYYeYS8hPwaLR9mJtDWZIi9bfLKtd3aIt4I48ZiT8FpaI0T2Fu/U0C8uLaEfNEgvrIVYqOUi7jq++169utQ6MSfNVZjlIc0j52KouNl0+zPO7MwBq1z7kW6F3Ux3cNYC4ez8KhajWYWJX1O/XaaJBlrxfCb4PfI2GpWtOOmdXktOCpco5u3fHIohi5PKlPY4bC/OU0GWhhHC8iGSk7EiMUKLw0H4XqfVYtGaXnQofpb4loVrxrH3xnqog6M8ewf19BAr5sMr2hcDg9bh75/lpPXgHxhuOWqbNPT8dsLZT9B3Locgvpgl01soOYvyaStARu8WHCHCUXN2xWv67t5D28AccSJcCqy5Cn7sy1bwnd/0qd3EcCnVA7 X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(39860400002)(396003)(346002)(451199021)(40470700004)(46966006)(36840700001)(7696005)(41300700001)(186003)(107886003)(7416002)(5660300002)(8936002)(478600001)(26005)(1076003)(4326008)(2616005)(336012)(8676002)(54906003)(47076005)(70206006)(70586007)(426003)(83380400001)(316002)(110136005)(82740400003)(36860700001)(7636003)(82310400005)(2906002)(356005)(36756003)(40480700001)(40460700003)(86362001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2023 16:15:42.6122 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a5ad10a6-61c8-4714-255f-08db2ede8385 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000C97D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4106 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761539138577810424?= X-GMAIL-MSGID: =?utf-8?q?1761539138577810424?= Add few Isochronous (ISO) and Non-ISO MC clients. ISO clients have guaranteed bandwidth requirement. PCIE clients added to the mc_clients table represent each controller in Tegra234. Signed-off-by: Sumit Gupta Acked-by: Krzysztof Kozlowski --- drivers/memory/tegra/tegra234.c | 420 ++++++++++++++++++++++++++++++++ 1 file changed, 420 insertions(+) diff --git a/drivers/memory/tegra/tegra234.c b/drivers/memory/tegra/tegra234.c index 4f34247c9bda..353f5ef688b2 100644 --- a/drivers/memory/tegra/tegra234.c +++ b/drivers/memory/tegra/tegra234.c @@ -15,6 +15,30 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { { + .id = TEGRA234_MEMORY_CLIENT_HDAR, + .name = "hdar", + .bpmp_id = TEGRA_ICC_BPMP_HDA, + .type = TEGRA_ICC_ISO_AUDIO, + .sid = TEGRA234_SID_HDA, + .regs = { + .sid = { + .override = 0xa8, + .security = 0xac, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_HDAW, + .name = "hdaw", + .bpmp_id = TEGRA_ICC_BPMP_HDA, + .type = TEGRA_ICC_ISO_AUDIO, + .sid = TEGRA234_SID_HDA, + .regs = { + .sid = { + .override = 0x1a8, + .security = 0x1ac, + }, + }, + }, { .id = TEGRA234_MEMORY_CLIENT_MGBEARD, .name = "mgbeard", .bpmp_id = TEGRA_ICC_BPMP_EQOS, @@ -134,6 +158,90 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x33c, }, }, + }, { + .id = TEGRA234_MEMORY_CLIENT_VI2W, + .name = "vi2w", + .bpmp_id = TEGRA_ICC_BPMP_VI2, + .type = TEGRA_ICC_ISO_VI, + .sid = TEGRA234_SID_ISO_VI2, + .regs = { + .sid = { + .override = 0x380, + .security = 0x384, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_VI2FALR, + .name = "vi2falr", + .bpmp_id = TEGRA_ICC_BPMP_VI2FAL, + .type = TEGRA_ICC_ISO_VIFAL, + .sid = TEGRA234_SID_ISO_VI2FALC, + .regs = { + .sid = { + .override = 0x388, + .security = 0x38c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_VI2FALW, + .name = "vi2falw", + .bpmp_id = TEGRA_ICC_BPMP_VI2FAL, + .type = TEGRA_ICC_ISO_VIFAL, + .sid = TEGRA234_SID_ISO_VI2FALC, + .regs = { + .sid = { + .override = 0x3e0, + .security = 0x3e4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_APER, + .name = "aper", + .bpmp_id = TEGRA_ICC_BPMP_APE, + .type = TEGRA_ICC_ISO_AUDIO, + .sid = TEGRA234_SID_APE, + .regs = { + .sid = { + .override = 0x3d0, + .security = 0x3d4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_APEW, + .name = "apew", + .bpmp_id = TEGRA_ICC_BPMP_APE, + .type = TEGRA_ICC_ISO_AUDIO, + .sid = TEGRA234_SID_APE, + .regs = { + .sid = { + .override = 0x3d8, + .security = 0x3dc, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_NVDISPLAYR, + .name = "nvdisplayr", + .bpmp_id = TEGRA_ICC_BPMP_DISPLAY, + .type = TEGRA_ICC_ISO_DISPLAY, + .sid = TEGRA234_SID_ISO_NVDISPLAY, + .regs = { + .sid = { + .override = 0x490, + .security = 0x494, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_NVDISPLAYR1, + .name = "nvdisplayr1", + .bpmp_id = TEGRA_ICC_BPMP_DISPLAY, + .type = TEGRA_ICC_ISO_DISPLAY, + .sid = TEGRA234_SID_ISO_NVDISPLAY, + .regs = { + .sid = { + .override = 0x508, + .security = 0x50c, + }, + }, }, { .id = TEGRA234_MEMORY_CLIENT_BPMPR, .name = "bpmpr", @@ -358,6 +466,318 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x37c, }, }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE0R, + .name = "pcie0r", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_0, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE0, + .regs = { + .sid = { + .override = 0x6c0, + .security = 0x6c4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE0W, + .name = "pcie0w", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_0, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE0, + .regs = { + .sid = { + .override = 0x6c8, + .security = 0x6cc, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE1R, + .name = "pcie1r", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_1, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE1, + .regs = { + .sid = { + .override = 0x6d0, + .security = 0x6d4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE1W, + .name = "pcie1w", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_1, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE1, + .regs = { + .sid = { + .override = 0x6d8, + .security = 0x6dc, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE2AR, + .name = "pcie2ar", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_2, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE2, + .regs = { + .sid = { + .override = 0x6e0, + .security = 0x6e4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE2AW, + .name = "pcie2aw", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_2, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE2, + .regs = { + .sid = { + .override = 0x6e8, + .security = 0x6ec, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE3R, + .name = "pcie3r", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_3, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE3, + .regs = { + .sid = { + .override = 0x6f0, + .security = 0x6f4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE3W, + .name = "pcie3w", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_3, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE3, + .regs = { + .sid = { + .override = 0x6f8, + .security = 0x6fc, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE4R, + .name = "pcie4r", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_4, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE4, + .regs = { + .sid = { + .override = 0x700, + .security = 0x704, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE4W, + .name = "pcie4w", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_4, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE4, + .regs = { + .sid = { + .override = 0x708, + .security = 0x70c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE5R, + .name = "pcie5r", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_5, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE5, + .regs = { + .sid = { + .override = 0x710, + .security = 0x714, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE5W, + .name = "pcie5w", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_5, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE5, + .regs = { + .sid = { + .override = 0x718, + .security = 0x71c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE5R1, + .name = "pcie5r1", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_5, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE5, + .regs = { + .sid = { + .override = 0x778, + .security = 0x77c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE6AR, + .name = "pcie6ar", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_6, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE6, + .regs = { + .sid = { + .override = 0x140, + .security = 0x144, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE6AW, + .name = "pcie6aw", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_6, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE6, + .regs = { + .sid = { + .override = 0x148, + .security = 0x14c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE6AR1, + .name = "pcie6ar1", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_6, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE6, + .regs = { + .sid = { + .override = 0x1e8, + .security = 0x1ec, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE7AR, + .name = "pcie7ar", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_7, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE7, + .regs = { + .sid = { + .override = 0x150, + .security = 0x154, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE7AW, + .name = "pcie7aw", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_7, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE7, + .regs = { + .sid = { + .override = 0x180, + .security = 0x184, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE7AR1, + .name = "pcie7ar1", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_7, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE7, + .regs = { + .sid = { + .override = 0x248, + .security = 0x24c, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE8AR, + .name = "pcie8ar", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_8, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE8, + .regs = { + .sid = { + .override = 0x190, + .security = 0x194, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE8AW, + .name = "pcie8aw", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_8, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE8, + .regs = { + .sid = { + .override = 0x1d8, + .security = 0x1dc, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE9AR, + .name = "pcie9ar", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_9, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE9, + .regs = { + .sid = { + .override = 0x1e0, + .security = 0x1e4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE9AW, + .name = "pcie9aw", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_9, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE9, + .regs = { + .sid = { + .override = 0x1f0, + .security = 0x1f4, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE10AR, + .name = "pcie10ar", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_10, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE10, + .regs = { + .sid = { + .override = 0x1f8, + .security = 0x1fc, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE10AW, + .name = "pcie10aw", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_10, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE10, + .regs = { + .sid = { + .override = 0x200, + .security = 0x204, + }, + }, + }, { + .id = TEGRA234_MEMORY_CLIENT_PCIE10AR1, + .name = "pcie10ar1", + .bpmp_id = TEGRA_ICC_BPMP_PCIE_10, + .type = TEGRA_ICC_NISO, + .sid = TEGRA234_SID_PCIE10, + .regs = { + .sid = { + .override = 0x240, + .security = 0x244, + }, + }, }, }; From patchwork Mon Mar 27 16:14:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 75546 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3404:b0:112:7285:5352 with SMTP id h4csp1535453rwd; Mon, 27 Mar 2023 09:19:30 -0700 (PDT) X-Google-Smtp-Source: AK7set8H0qo/6KQKf3X/RWKUzZkuTAlap/QLDNWMZMam3/q5slDR3fp87Ss9mAhBEdoDu8McapLT X-Received: by 2002:a05:6402:17da:b0:4fc:97d9:18ec with SMTP id s26-20020a05640217da00b004fc97d918ecmr17086810edy.21.1679933970044; Mon, 27 Mar 2023 09:19:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679933970; cv=pass; d=google.com; s=arc-20160816; b=kSupbaN9OmpENga1JvJvX+svMmhqTp7ObZbxVg5wD1hqFPBEB8rcqUK5qBkYDH8n19 zzbyAsAUhanbwCqpK3M5wYxWKdA2pqTgv2s01AOKdxkqWLQEMqjFvmONrq3bW3Q98/IJ XO4Lfmv2fyzHCG0VJEcOZqgJInHpoaQNdmSedz6oUwMH3rmOXVC3I1LuuBuzPEGxeWE8 d4uo49Csa9XWOkd7BuvQMzvRqKN6KtcAOLTYXmBDa186JN6Q1mHxlNBtpzT2RQ7bRkzo +ZvMieB5jluunGQx0RJnOGPVPBsxSDkJSi517Y34S+5Crws9eSPoznCNTHdkqmSf2mKs wmnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=zK1/rGgZRQEz33770HYZfksNwVrQ+jTSrI/RTeIWVxM=; b=UB/LFH2wj3e3lLjqnzQviKh4S0+vgPJbtjTtxbwGndXkuxxd2WWgBedMYpM2B/Hf3g d0t+bnRgDg8PHva/1MmJK/PbZWmOyBN5Q4VxLxuEzF+DYQP0iaY4z80oH5tIF1GIMn2F uGIy78biWqjY+lzZoHSGc5KLGcRa7NeoQUAgSrdRHTA0HhsUivk/KKCCWCXh/zvPBcGo lUWO753f+4oJS9YktWHgzvjJSLruMZHSoGYP2SL+bcW7IzjUUOVxQCz/E/3yBYv1t7xK WEbMXdTs9BcWoKQAbhXVhf30XOHG99JzHlndmTJlGZCIQy5ph5Oxr7RdhownLLGDa50z fDMQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=F+qRGaB2; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13-20020a056402074d00b00502238a3d23si8463960edy.513.2023.03.27.09.19.05; Mon, 27 Mar 2023 09:19:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=F+qRGaB2; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233134AbjC0QQY (ORCPT + 99 others); Mon, 27 Mar 2023 12:16:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233076AbjC0QQS (ORCPT ); Mon, 27 Mar 2023 12:16:18 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2078.outbound.protection.outlook.com [40.107.92.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA95019BF; Mon, 27 Mar 2023 09:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i+EWTG3iY3kI5lssKWIUJzhiiuO6d6mxrbmyl7DB/Ou2T93Is8qO+K7t8yH2HkEpIWtychL+GPOr+nXQYWPQVERoz9WeEhC20J0pXoo8nq37Jk0gLZroCSNpQetH30+IW3nDvzU7EctKRGIi/0O/A8bGjRzN9PQxaE5N8TpufBwMeRikVWgh9rDXKeqF4rvV/uu6U4XmW+PtnHWQYOUcDpkZ7PhvEZw2NKLGlmB1u56i2ckLoyTVSzcxbF5kmpEEXHByJ/ASBEZPtIZjb9vfkUx7XNLm//NZDf99nw4Rssm/oUDmmZeOohecoBX7rjm1wikyULrx6fScgE8+OUuRDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zK1/rGgZRQEz33770HYZfksNwVrQ+jTSrI/RTeIWVxM=; b=bQ3f/QQ54RYXjendqWgXZXzG4wfqmE6ijPXRqMyyrW0/3CRA5MUV8JUM0q5cfFaVLm5QzytICUioYct5OJs3p5vkkw8WTl/S82QXa7QU1v/zBHdmpe5f7ex+bjfqhK7+1cBY8Ju/4As+ODxrbkHFfyLYqsDIodjvZtJtOEJykp8Pbhgpgm6CO2862kpvu7brP6ySxbghgcb1KZSGFzJw5p8wWRrh0pLUiAZ+fT8NMwI4fpBoXpAXnRZ4wBe0NobOWVqTpNZVmAaePtpfg8og0+3IfiU/Du2P2vZAShS35ImAHmZlhvnbLLTrOQK33zYNDcyhd2LZJk7hQ610R1NXWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zK1/rGgZRQEz33770HYZfksNwVrQ+jTSrI/RTeIWVxM=; b=F+qRGaB2z5QfDV08upGRXwPdl1jEN36nfANUoZ/bhsSUg6BicLBM/lHalHgS83DgtNXPXFjwVijdU51fdlEQdG21Zmc8/JIjqIrl93KhBBetkL4egLiKqv47sndH+tBM6jmWQ1/rt1sGkLMLCCT/k0X7cLHiJ6HBis6vP3xHzmJ7s32ctpgcp7IACPh0vBS5vl6L3aB1SOq3zTw38hIb9AOmLataY6jp1loqskVsYPkYIQLXb7t/ddUR3c0l+cuh6abS/cwEqDPcQdf/J4svJsETReJHdYsLFeCnSm7q8mE/cvWQbjFe9hQxDYGXqb8wOFBCms7AqB8Eb5Er+nHMeQ== Received: from DM6PR08CA0034.namprd08.prod.outlook.com (2603:10b6:5:80::47) by LV2PR12MB5845.namprd12.prod.outlook.com (2603:10b6:408:176::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.41; Mon, 27 Mar 2023 16:15:58 +0000 Received: from DM6NAM11FT017.eop-nam11.prod.protection.outlook.com (2603:10b6:5:80:cafe::14) by DM6PR08CA0034.outlook.office365.com (2603:10b6:5:80::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.41 via Frontend Transport; Mon, 27 Mar 2023 16:15:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT017.mail.protection.outlook.com (10.13.172.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.22 via Frontend Transport; Mon, 27 Mar 2023 16:15:58 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 27 Mar 2023 09:15:49 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 27 Mar 2023 09:15:49 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 27 Mar 2023 09:15:44 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v4 05/10] memory: tegra: add software mc clients in Tegra234 Date: Mon, 27 Mar 2023 21:44:21 +0530 Message-ID: <20230327161426.32639-6-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230327161426.32639-1-sumitg@nvidia.com> References: <20230327161426.32639-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT017:EE_|LV2PR12MB5845:EE_ X-MS-Office365-Filtering-Correlation-Id: 352d1ef7-b3ba-4daf-773c-08db2ede8ccd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6C4JJTfDKdNjkt5zaeb+JsY/guiE551j/KFTJOhmElPv/fa4/uti17nhMddzARW7jqzRtui1fl3DkfU/HL4Py2jYrEc7WNL0REsAK8mXUGDVyuL4Fe7mJmY/IAxuFrCXVbCcVDSsO4RpVkIsuR8eGbGjfcyPHHonoDlIds+3+s2Th4y488XK08YJVExVfp2eABeR/LkH9ylcVxQayz/qWAbXAKZewqPc/V1ceNK2InWPpuHq/9P1sxRXoMpn7SAJ92v52yLVMysRs+ZhOH8p0UUDNf5Trh+vv3PTcK/hEodkpDhaeTmK2A/341xqR6klGxwNEV0uYHRE455Q5mV+llpIWhgZFl0M98PCWxE5NUzufSJTGkD3SrQGkwrFZIfdisneCGzBQJZF8d4sgdRLOTYoXw33M3lFa/SYnzfBpRMuFLOs7lWmLpMaumg9wgxexgok9yrCBt7zw2yjbr6O0Ks+wnRhCnY1SUAtkZlWTLSAmtcx0raT4FowVV6IUAhq9HubkjdnGVyEOdY/RgvMEPMxx0dg0r0sum/BWE4FnKRNlooRZP+MJxlj+D6HD8qNnS5fyeSnRf/ZWWainDui+bTaiNnImlBudE0JYEMiFwz96uPvPeqU3ChIZv9nZSChaHbZIqiCczwk0SCho32eTF7jdqrNKUewUvCkclLEOfz98TN2SlS1q5UoIXIRfqw1JaWkoaZY90T7mmUqA0wa1J8rstNZflZ/UFKaCYmsGn9mvBE+tKQFiMWnDhR/gj7cxDiTo6F8XGH5HjW9EQJ7i8yTHLk3k6INRsi8t7j32tk= X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(346002)(376002)(136003)(39860400002)(396003)(451199021)(40470700004)(36840700001)(46966006)(47076005)(426003)(36756003)(2616005)(478600001)(336012)(7696005)(83380400001)(34020700004)(316002)(36860700001)(110136005)(54906003)(6666004)(107886003)(26005)(186003)(2906002)(1076003)(5660300002)(7416002)(82310400005)(8936002)(86362001)(82740400003)(356005)(41300700001)(40480700001)(7636003)(70586007)(70206006)(8676002)(4326008)(40460700003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2023 16:15:58.1544 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 352d1ef7-b3ba-4daf-773c-08db2ede8ccd X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT017.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5845 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761538442531975858?= X-GMAIL-MSGID: =?utf-8?q?1761538442531975858?= Add dummy Memory Controller clients to represent CPU clusters. They will be used by the CPUFREQ driver to scale DRAM FREQ with the CPU FREQ. Signed-off-by: Sumit Gupta Acked-by: Krzysztof Kozlowski --- drivers/memory/tegra/tegra234.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/memory/tegra/tegra234.c b/drivers/memory/tegra/tegra234.c index 353f5ef688b2..4c8929a88778 100644 --- a/drivers/memory/tegra/tegra234.c +++ b/drivers/memory/tegra/tegra234.c @@ -778,6 +778,21 @@ static const struct tegra_mc_client tegra234_mc_clients[] = { .security = 0x244, }, }, + }, { + .id = TEGRA_ICC_MC_CPU_CLUSTER0, + .name = "sw_cluster0", + .bpmp_id = TEGRA_ICC_BPMP_CPU_CLUSTER0, + .type = TEGRA_ICC_NISO, + }, { + .id = TEGRA_ICC_MC_CPU_CLUSTER1, + .name = "sw_cluster1", + .bpmp_id = TEGRA_ICC_BPMP_CPU_CLUSTER1, + .type = TEGRA_ICC_NISO, + }, { + .id = TEGRA_ICC_MC_CPU_CLUSTER2, + .name = "sw_cluster2", + .bpmp_id = TEGRA_ICC_BPMP_CPU_CLUSTER2, + .type = TEGRA_ICC_NISO, }, }; From patchwork Mon Mar 27 16:14:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 75547 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3404:b0:112:7285:5352 with SMTP id h4csp1535625rwd; Mon, 27 Mar 2023 09:19:47 -0700 (PDT) X-Google-Smtp-Source: AKy350YhAaIMqXjPxj7H3z1x/D0RhJZ+5L81G/f83ZcOpdXPoOkRtqDVXRKMqCMe54jxvpci0kKl X-Received: by 2002:a17:907:c25:b0:895:58be:957 with SMTP id ga37-20020a1709070c2500b0089558be0957mr16482273ejc.2.1679933986850; Mon, 27 Mar 2023 09:19:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679933986; cv=pass; d=google.com; s=arc-20160816; b=vyg7BENsXneIvt+7koG6UTHBYhLYnNCbPJ805GG7F58Jn1W43p8UGJC4DgTS+ClXdR Q6N0kjo0LKvLH+hfxo18wEAPfQVz68vOkD9+PfVV4BiDBliSZuoxZgL8fnxj9jNeCS6V Eh7fPIyeg507AV3zAh7cq3N9aOMO59fo3gLgeW8DUIFjYglLgjU9Uxb3s5eNv0Icyu4T nMZmZ6o+3L0rLGj/pX3w+2QwNACwnzDgqtT/LAZvGrhL+mR+j0eqffgXoLOsI5Ye8tLA uQkkb9APX88N0cEXkL0KczoUI3fRQltgjmDEurImg5BBa1D2LpjyJ1wnYS/Qzvvd2+XY 7pQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=8EOLSj2IMC6AmgQP+x8WnAbrOd38Fq0L406q4vninRQ=; b=U10dlBXKOQTddd4he0PVidis3oXB4oA1I9BQQTgvBgH1REViZ9bOTy2F8icmwQScZ5 gf5OVlgX5XRyr9kBTTCR773sxh5vikxTNskPbIENjKOcaLZo4ggtj5PjEFC9/PmZfVkK HhrzUIuzITwVzRs3TPzNqBwKo8Bl8AJvASUMo1SXqQsNi741BTqrGgdc5u7hAx02luap zw+y5XI1+4GZWoUA5PyM9ucoCkEcvFQm+L1j4SFUGM35wJRmLD8uB17a97cAgE3KEXHR MsHWykyZ3GDdODKiLoaIUS78x4ydpGnT1U90j5ccZzz2P0blig0DxFWtBKUHDYHLR8R5 UozQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=B9Y0hLsT; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fy39-20020a1709069f2700b0093472dbf64asi18984089ejc.557.2023.03.27.09.19.22; Mon, 27 Mar 2023 09:19:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=B9Y0hLsT; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230380AbjC0QQl (ORCPT + 99 others); Mon, 27 Mar 2023 12:16:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232071AbjC0QQe (ORCPT ); Mon, 27 Mar 2023 12:16:34 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2082.outbound.protection.outlook.com [40.107.223.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98F875BAD; Mon, 27 Mar 2023 09:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KMXyUav1xBnAc2SOZcxDsGsyPzhIesznSQkqSdZmFDMw55DHLMtTerHjZhmWhLpfcUm1mf74m/8XW2ioD93wL7e3hE0BQeQA7Qh3G4VwG3TFyGPpuYDdC19tsnf45yL8uuHV9RzXHzfMo4EzBDP0PBNPr6ZKun5BJBKRCGOwZbROeVeUA+Qio4MrhpDGed/1cVlPUFSAf3RFidkWW3uCcAdbB8TWOjbSoOd+r2uV2pYPR1UUxgZCtVgrBaPmUmApBOv1t9h7RKRsZOR3F3HeTEfo3emH3Zh76hmyxnQ7nWLvxybf3uJu+EzQZh5fL57yOfJ9smfzQg3CXrK50pPqzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8EOLSj2IMC6AmgQP+x8WnAbrOd38Fq0L406q4vninRQ=; b=kwQMxOD6O6Y7ki+2pdcvuHL2HjTysYWF3GcgcCaVGVQS9Hko9a0eBQk5vEsTtNnkn/cCBERS3gBYonassZoQ1TJg/dRVkfTftiFvlOGem6krfxmB2sV6hrrKLwtzmsrXhccgIzUkDYnuISS2NB1TLyHlNLjO0cizitiQp2JhjqaP0miRWN2ufhyF9nE44ZK3Y/yfnNJ+iPbKNRUMp5OZL+D/umrqiEzYdi5bNcZK7Yrk0AqwsIFrpi95tiqhgxVK0/OM5Nczc/LAFP5K2EH6eJ59QKT9h38KxqeLqsL3c/03yqNBtfTB3cXQG8c4OEnsV+cdE+dIIQPBTMiYuUhJBg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8EOLSj2IMC6AmgQP+x8WnAbrOd38Fq0L406q4vninRQ=; b=B9Y0hLsTZLtrtCc8dYnrW6c75kLlC0fQpk1I9pPMCjOTxz7FZim3NOpt5ugAmMMioHulpRGTF/F+WzuAfmEjhrv0EVwSKXzQEqGdv3q4Ujkuvp4/k6pmI/Pbr4OACc/eIHe+y9PDnZY6HV3z3EJONIADzXGVXrsNjyr+IfoVvYeV7Y3gJlaWTfwbXxJ+z7527FzDyco043SKwSDGWJWB4cZ49Of7drg2H6ALUTiZo+i++Cr3SXqvhHnqhp9/Tw23o1f7/1JmpKazg8jCZYydYw6cM8YgF3hB5IP9S4seQTnFLv9EsgJS8EuqTaKvytd39/lXo9hAHR1X+l8tQ8+dig== Received: from CY5P221CA0129.NAMP221.PROD.OUTLOOK.COM (2603:10b6:930:1f::14) by CH0PR12MB5266.namprd12.prod.outlook.com (2603:10b6:610:d1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.30; Mon, 27 Mar 2023 16:16:08 +0000 Received: from CY4PEPF0000C97C.namprd02.prod.outlook.com (2603:10b6:930:1f:cafe::dc) by CY5P221CA0129.outlook.office365.com (2603:10b6:930:1f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.42 via Frontend Transport; Mon, 27 Mar 2023 16:16:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by CY4PEPF0000C97C.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.30 via Frontend Transport; Mon, 27 Mar 2023 16:16:08 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 27 Mar 2023 09:16:01 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 27 Mar 2023 09:16:01 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 27 Mar 2023 09:15:56 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v4 06/10] dt-bindings: tegra: add icc ids for dummy MC clients Date: Mon, 27 Mar 2023 21:44:22 +0530 Message-ID: <20230327161426.32639-7-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230327161426.32639-1-sumitg@nvidia.com> References: <20230327161426.32639-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C97C:EE_|CH0PR12MB5266:EE_ X-MS-Office365-Filtering-Correlation-Id: a78fae38-a8c5-43c4-4f98-08db2ede92eb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sOMoIdQLj18BjcEL/6IGAM2etvuaBlCeyezlGXvpJUS3qLbfPb8Wujn+lwS7fS+9bLsvE/Tk5a8gQ6tpfaQiu1r5SWLbmsnKeO57RYHlA4nXR7vy01mA0Y/AhIDmiHlhMvh9bmWnRyZwIUV8pZ4dTj9eh/LoGOgM+wVUhWx81mniIDGsJkh/O8+FhXIPYbKxTblNfkxg8pZw60YHn3hV6v0gWOBLHaOiEQgUA7J5wrwiII4OH39SQg5RI98gEwJd+/u6Gxsu0Q14nOGa3G6luZngPkQQftvGN+5TbgUMPkQcJ5Vt6gfG42ngh+vPC6XzDfhoTLhtAHQBUDWmlH4c2ltpuBMMyN2d2Cfd3pJXNzzpIbK4dsFke65sLLLpq9SZIK/tW55UjGdzBMcKofhkXsp3V8BM3+VAr4krlsYuursEpXdUFcvucWL/BUGYP+iXPFgjGZ2deozNqRSPwhN3Vsb0Fm5D2nOjoKAE9yGnk8Mdch9/LwQKrlf49Gi7L3sPwkN7Jqb4V3IRsqzZkfg5PHViboJyLPRA8FwzH9eQDeGmdw2zAcb191UxbtljoD29h78/BYkObVP0+l7sGjyxlHIRvUIluPqMcskqpyel+lBE3vsgXiVy3dHwr3h9JPQdB5+I0fNtbd1kv7tZGuz20NjpPrKbZHNbyXTKrI9287iDamhV85haulDm68IxTPt5tdof83BLwLRxwEEVtMZMTGAgRed2J5l9ndFh1ssVYUh05HG0QdpNof//RZ0stqeP X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(346002)(396003)(136003)(451199021)(36840700001)(46966006)(40470700004)(316002)(110136005)(40460700003)(36860700001)(54906003)(478600001)(356005)(7636003)(82740400003)(8936002)(5660300002)(36756003)(82310400005)(86362001)(4744005)(7416002)(2906002)(4326008)(8676002)(70206006)(70586007)(41300700001)(40480700001)(107886003)(6666004)(186003)(1076003)(26005)(426003)(2616005)(336012)(47076005)(7696005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2023 16:16:08.4476 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a78fae38-a8c5-43c4-4f98-08db2ede92eb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000C97C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5266 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761538460466933245?= X-GMAIL-MSGID: =?utf-8?q?1761538460466933245?= Add ICC id's for dummy software clients representing CCPLEX clusters. Signed-off-by: Sumit Gupta Acked-by: Krzysztof Kozlowski --- include/dt-bindings/memory/tegra234-mc.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/dt-bindings/memory/tegra234-mc.h b/include/dt-bindings/memory/tegra234-mc.h index 347e55e89a2a..6e60d55491b3 100644 --- a/include/dt-bindings/memory/tegra234-mc.h +++ b/include/dt-bindings/memory/tegra234-mc.h @@ -536,4 +536,9 @@ #define TEGRA234_MEMORY_CLIENT_NVJPG1SRD 0x123 #define TEGRA234_MEMORY_CLIENT_NVJPG1SWR 0x124 +/* ICC ID's for dummy MC clients used to represent CPU Clusters */ +#define TEGRA_ICC_MC_CPU_CLUSTER0 1003 +#define TEGRA_ICC_MC_CPU_CLUSTER1 1004 +#define TEGRA_ICC_MC_CPU_CLUSTER2 1005 + #endif From patchwork Mon Mar 27 16:14:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 75548 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3404:b0:112:7285:5352 with SMTP id h4csp1535716rwd; Mon, 27 Mar 2023 09:19:54 -0700 (PDT) X-Google-Smtp-Source: AKy350YRB6NSHosa3DTQ/PYwFdd0H4e3QsPTO2Whf8Ew6jgKr5Y5sjGC0G9/i2xMPyn4yQoPyO64 X-Received: by 2002:a05:6402:187:b0:501:d3a1:9a3a with SMTP id r7-20020a056402018700b00501d3a19a3amr10953643edv.25.1679933994763; Mon, 27 Mar 2023 09:19:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679933994; cv=pass; d=google.com; s=arc-20160816; b=X+7dT7vbA1LDvBfLExAYY9p8WOYujCO812CO3Pj0x0qHkGlx42J6iJnSyFHQrn1Zr/ dELNBjPStQnwjC4G9Z7y4bekbHvSC8X+KZqzBH+wlOVj4s6kuF5M+sJY+hce2tn2qUd5 GYEA/3Wo5mHus10zEFIqfoEakBl/KFoo6YZIKkqQjlr4fIv+kZIhRuvwo+uCcKme2lR5 gkexeXSI7bXph9v8dJId4VheP4qaazvqEU6n0geKoA39gmnfZUSiyn5jCL6MJJjctRLC 7AGPeAVIdh7bJhKrVQ+QByoiAWPh0fU9SK6+tLBVXKCVoLL3YaKrSLrbPFolR4RW5WOG jeXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5LQKRlWl1VYSQUkJE8rTJJTE02gkh3X7VyMjYgQZn6Q=; b=WEdAXHSH06Q9eoJQOZNay0YKK8RVvBqvgxGGyq8EPLpDprhfij2AvOIsBwVXRgMfTt YHu9HhtLAgxC1yMrSWFyyNqfqV5T7CcUTK+ThRoneSpGTUiH91TxvBYFlMFVXdZphjhi kS+AWjoqbMstSz5iyMWlSd2fHaYaHheiRx+H5Q/0k87l6lRjgvczvdCi2+OUKDwFmm6R iZ57wbk6l0+1u1HTgqNpu8xkWg6YFHSeBf65dXnwN8rY6ijjnShUJywH328WPJMN2NkY QbM+VjVqUx2y10jiM2uk/rCJ2i0Y4T4fO9B2EVd+uijWi17lUIHgmtTXUkdlfqAHqFab M6Qg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=DlwhNaJN; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j12-20020aa7c40c000000b004bcedde1496si28436185edq.287.2023.03.27.09.19.30; Mon, 27 Mar 2023 09:19:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=DlwhNaJN; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229525AbjC0QRH (ORCPT + 99 others); Mon, 27 Mar 2023 12:17:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbjC0QRD (ORCPT ); Mon, 27 Mar 2023 12:17:03 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2073.outbound.protection.outlook.com [40.107.93.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 502C55FC4; Mon, 27 Mar 2023 09:16:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZeLRiDKujfbGySFTCAoTMii+s5wtgcY2XQOIvA0Mw/XHkXnTaScIBJpFoFKYbCkgccmK3Th/V8ZQ9Bc3ybhAmS9pjj93ztU+GXzay1v+hdYHpIXPzRnX73UcTuVFHRmsMda0BBUqQu659zHvN0L+DDdHBzPxg7Gs81y+BETTtF+hdaQKv+ZfEqeGPyCVQMlksB52pOr6U9ORVIRoU42H4bkNTKYLU4VzO0Gsu7WrWUJBFPOiiI4jbPtJ7+V5srh5hbl0WD6vCRgVfdZrJhjJqlAJ5tVz7u/QtcQKSoIOnbqirPxLHOMGQEq8KlecDZaHmpMV9CagT80tw4Gbn32vmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5LQKRlWl1VYSQUkJE8rTJJTE02gkh3X7VyMjYgQZn6Q=; b=Ckw8BpRdRFn7XO7NK9aQ97OOpSslef4la1fnVD+u8AfllSY6M3WbXj5z5ESZ2QOdfR5i1DRh28bTDKez/U3gNQxgd1wNXYuJ9pOSI1Qsi99jo30SCb4FGiO0ojAZWvMaSBJUuYyQkt3u9KjAvt1VM0hrZhzL+qrgXalLW1mHbMFF4nQRh3pdG+S0XLxrFj5yvHdMPfzM2B0YCMWKkXv6bJfu6UxHx08UBa9tIWKRxU91ksm2Vz7vyDpabgqp3S80Z4tzdl1JvlteE8iQLe1JixkFqN3ePfWDAYoz5T7m/P7Km0uEEwikKPU9TT9obpslFQhBCIMI+80BLGRkRbrD3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5LQKRlWl1VYSQUkJE8rTJJTE02gkh3X7VyMjYgQZn6Q=; b=DlwhNaJNgMmpDu3XT4feOaI1Z8yUNFiYYwm17roqIKTinH7jP+HahA2XKUI2Orjhce06ICZBkwYYgAdP/y0BfNQOAfuwGvmIyQl993bzN8Vu8l9FEviRLr5QUHw06RlyEwMwAohiNv1tGUTo5qtJ66bJVWMZpXsz9xpiNScZHUOZKN+Lq275cbcd8dV5m3z0eipmxtKrbHv3mSYtBH0q2nNvV/d9eK/1RjbpnElAIubwLiLiY14Ui8oTWqVYYOhUTquobHTRqzeecXK1sz9NH1Z6h3RaUo+gSoYhWpw16Yq4qxFbSLO0Hql5/LBVd71AUQGMu8lRu7kCCTc/t/WL2Q== Received: from DM6PR21CA0013.namprd21.prod.outlook.com (2603:10b6:5:174::23) by PH7PR12MB5784.namprd12.prod.outlook.com (2603:10b6:510:1d3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.41; Mon, 27 Mar 2023 16:16:30 +0000 Received: from DM6NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:5:174:cafe::4f) by DM6PR21CA0013.outlook.office365.com (2603:10b6:5:174::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.5 via Frontend Transport; Mon, 27 Mar 2023 16:16:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT050.mail.protection.outlook.com (10.13.173.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.22 via Frontend Transport; Mon, 27 Mar 2023 16:16:30 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 27 Mar 2023 09:16:20 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 27 Mar 2023 09:16:19 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 27 Mar 2023 09:16:14 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v4 07/10] arm64: tegra: Add cpu OPP tables and interconnects property Date: Mon, 27 Mar 2023 21:44:23 +0530 Message-ID: <20230327161426.32639-8-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230327161426.32639-1-sumitg@nvidia.com> References: <20230327161426.32639-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT050:EE_|PH7PR12MB5784:EE_ X-MS-Office365-Filtering-Correlation-Id: 111dc350-f3ee-4b75-d372-08db2ede9fd0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: joda81liPdmAwq8CBLK9/DqPrD/fHGT8aR4lscz+z7Lp0sLLV+lX9bthYQfjLJYTovuKPyFUE6N7lW2MGFnSECSjPzBcdHwLvxVMQz9EDenznK2ZIarAR97266Pi71tjnS8Y+NztceMHqRv0e7256RCPN1dgHu3H+jpn1KKplVfbHebubxIA2p3DE6d/VpGO5UTp5Lqfq80LoBr0RkbzoCF9N12LtzhnB8cyL9bXtZNMsnuiqRwPRWTALp7AK0YJeFpTQEcVZx6os9yt7d+p8lZ4+bablbcDaUoFnyU++MQ0mzIt1sEZnGm3Y7CFMog0wQ7rkiYZlTIiOt8ShD7YF93WYbonHZXpADRjiXEN4vJZt79A4fLiduWqi9M8CL6BOosOkLZ7QuX/0U8zBe6qC1lX4ZbA0j+j9M62tWqlBjOStV8B6rom73gELCtM3AJjmuyGYrfByk7rQoTVuIPPez4RGNVzVeQqLKdq0VfJoMhINOOtmA7I9V7aSfmrGzF0Q0Wlmk1ztClK1eOWrPd4n5A9RipyuE90YnQDceyy9pXQaOvsU8ly5k4Hq4PHR+EIy5F9Y7oV4P3DtZ3co0H4JPPj6Pz9GgJnaOLOJU2JuMx7GHUSr+dbBNjuyUPs250X46OK9FzYT/ZBrWRkRTnJoS6/FvJYLYr3CeDY37XL6DDpHSf7qu0yCyjMhPZDCHev4dZXAbm7WwflJWlUEogY+DASvVRt2x02xwKJjAjQ7HdArNW3zU4w/1AwId2/D6PotQpNcHmVBYkUmpeCcMphb1+uOfXVR34+R9B3RzOyvnA= X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(39860400002)(136003)(346002)(451199021)(36840700001)(46966006)(40470700004)(26005)(186003)(7696005)(1076003)(316002)(8676002)(4326008)(70206006)(70586007)(54906003)(110136005)(2616005)(6666004)(478600001)(107886003)(41300700001)(8936002)(336012)(5660300002)(7416002)(2906002)(83380400001)(47076005)(426003)(7636003)(40460700003)(36860700001)(34020700004)(82740400003)(36756003)(86362001)(82310400005)(40480700001)(356005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2023 16:16:30.0375 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 111dc350-f3ee-4b75-d372-08db2ede9fd0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5784 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761538468352259605?= X-GMAIL-MSGID: =?utf-8?q?1761538468352259605?= Add OPP table and interconnects property to scale DDR frequency with CPU frequency for better performance. Each operating point entry of the OPP table has CPU freq to per MC channel bandwidth mapping. One table is added for each cluster even though the table data is same because the bandwidth request is per cluster. This is done because OPP framework creates a single icc path and hence single bandwidth request if the table is marked as 'opp-shared' and shared among all clusters. For us, the OPP table data is same but the MC Client ID argument to interconnects property is different for each cluster. So, having per cluster table makes different icc path for each cluster and helps to make per cluster BW requests. Signed-off-by: Sumit Gupta --- arch/arm64/boot/dts/nvidia/tegra234.dtsi | 276 +++++++++++++++++++++++ 1 file changed, 276 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi index 348113b4928a..6f4aa1a93688 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi @@ -3013,6 +3013,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl0_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER0 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3029,6 +3032,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl0_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER0 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3045,6 +3051,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl0_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER0 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3061,6 +3070,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl0_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER0 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3077,6 +3089,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl1_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER1 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3093,6 +3108,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl1_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER1 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3109,6 +3127,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl1_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER1 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3125,6 +3146,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl1_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER1 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3141,6 +3165,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl2_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER2 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3157,6 +3184,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl2_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER2 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3173,6 +3203,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl2_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER2 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3189,6 +3222,9 @@ enable-method = "psci"; + operating-points-v2 = <&cl2_opp_tbl>; + interconnects = <&mc TEGRA_ICC_MC_CPU_CLUSTER2 &emc>; + i-cache-size = <65536>; i-cache-line-size = <64>; i-cache-sets = <256>; @@ -3445,4 +3481,244 @@ interrupt-parent = <&gic>; always-on; }; + + cl0_opp_tbl: opp-table-cluster0 { + compatible = "operating-points-v2"; + opp-shared; + + cl0_ch1_opp1: opp-115200000 { + opp-hz = /bits/ 64 <115200000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp2: opp-268800000 { + opp-hz = /bits/ 64 <268800000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp3: opp-422400000 { + opp-hz = /bits/ 64 <422400000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp4: opp-576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp5: opp-729600000 { + opp-hz = /bits/ 64 <729600000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp6: opp-883200000 { + opp-hz = /bits/ 64 <883200000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp7: opp-1036800000 { + opp-hz = /bits/ 64 <1036800000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp8: opp-1190400000 { + opp-hz = /bits/ 64 <1190400000>; + opp-peak-kBps = <816000>; + }; + + cl0_ch1_opp9: opp-1344000000 { + opp-hz = /bits/ 64 <1344000000>; + opp-peak-kBps = <1632000>; + }; + + cl0_ch1_opp10: opp-1497600000 { + opp-hz = /bits/ 64 <1497600000>; + opp-peak-kBps = <1632000>; + }; + + cl0_ch1_opp11: opp-1651200000 { + opp-hz = /bits/ 64 <1651200000>; + opp-peak-kBps = <2660000>; + }; + + cl0_ch1_opp12: opp-1804800000 { + opp-hz = /bits/ 64 <1804800000>; + opp-peak-kBps = <2660000>; + }; + + cl0_ch1_opp13: opp-1958400000 { + opp-hz = /bits/ 64 <1958400000>; + opp-peak-kBps = <3200000>; + }; + + cl0_ch1_opp14: opp-2112000000 { + opp-hz = /bits/ 64 <2112000000>; + opp-peak-kBps = <6400000>; + }; + + cl0_ch1_opp15: opp-2201600000 { + opp-hz = /bits/ 64 <2201600000>; + opp-peak-kBps = <6400000>; + }; + }; + + cl1_opp_tbl: opp-table-cluster1 { + compatible = "operating-points-v2"; + opp-shared; + + cl1_ch1_opp1: opp-115200000 { + opp-hz = /bits/ 64 <115200000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp2: opp-268800000 { + opp-hz = /bits/ 64 <268800000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp3: opp-422400000 { + opp-hz = /bits/ 64 <422400000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp4: opp-576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp5: opp-729600000 { + opp-hz = /bits/ 64 <729600000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp6: opp-883200000 { + opp-hz = /bits/ 64 <883200000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp7: opp-1036800000 { + opp-hz = /bits/ 64 <1036800000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp8: opp-1190400000 { + opp-hz = /bits/ 64 <1190400000>; + opp-peak-kBps = <816000>; + }; + + cl1_ch1_opp9: opp-1344000000 { + opp-hz = /bits/ 64 <1344000000>; + opp-peak-kBps = <1632000>; + }; + + cl1_ch1_opp10: opp-1497600000 { + opp-hz = /bits/ 64 <1497600000>; + opp-peak-kBps = <1632000>; + }; + + cl1_ch1_opp11: opp-1651200000 { + opp-hz = /bits/ 64 <1651200000>; + opp-peak-kBps = <2660000>; + }; + + cl1_ch1_opp12: opp-1804800000 { + opp-hz = /bits/ 64 <1804800000>; + opp-peak-kBps = <2660000>; + }; + + cl1_ch1_opp13: opp-1958400000 { + opp-hz = /bits/ 64 <1958400000>; + opp-peak-kBps = <3200000>; + }; + + cl1_ch1_opp14: opp-2112000000 { + opp-hz = /bits/ 64 <2112000000>; + opp-peak-kBps = <6400000>; + }; + + cl1_ch1_opp15: opp-2201600000 { + opp-hz = /bits/ 64 <2201600000>; + opp-peak-kBps = <6400000>; + }; + }; + + cl2_opp_tbl: opp-table-cluster2 { + compatible = "operating-points-v2"; + opp-shared; + + cl2_ch1_opp1: opp-115200000 { + opp-hz = /bits/ 64 <115200000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp2: opp-268800000 { + opp-hz = /bits/ 64 <268800000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp3: opp-422400000 { + opp-hz = /bits/ 64 <422400000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp4: opp-576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp5: opp-729600000 { + opp-hz = /bits/ 64 <729600000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp6: opp-883200000 { + opp-hz = /bits/ 64 <883200000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp7: opp-1036800000 { + opp-hz = /bits/ 64 <1036800000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp8: opp-1190400000 { + opp-hz = /bits/ 64 <1190400000>; + opp-peak-kBps = <816000>; + }; + + cl2_ch1_opp9: opp-1344000000 { + opp-hz = /bits/ 64 <1344000000>; + opp-peak-kBps = <1632000>; + }; + + cl2_ch1_opp10: opp-1497600000 { + opp-hz = /bits/ 64 <1497600000>; + opp-peak-kBps = <1632000>; + }; + + cl2_ch1_opp11: opp-1651200000 { + opp-hz = /bits/ 64 <1651200000>; + opp-peak-kBps = <2660000>; + }; + + cl2_ch1_opp12: opp-1804800000 { + opp-hz = /bits/ 64 <1804800000>; + opp-peak-kBps = <2660000>; + }; + + cl2_ch1_opp13: opp-1958400000 { + opp-hz = /bits/ 64 <1958400000>; + opp-peak-kBps = <3200000>; + }; + + cl2_ch1_opp14: opp-2112000000 { + opp-hz = /bits/ 64 <2112000000>; + opp-peak-kBps = <6400000>; + }; + + cl2_ch1_opp15: opp-2201600000 { + opp-hz = /bits/ 64 <2201600000>; + opp-peak-kBps = <6400000>; + }; + }; }; From patchwork Mon Mar 27 16:14:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 75557 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3404:b0:112:7285:5352 with SMTP id h4csp1544867rwd; Mon, 27 Mar 2023 09:34:42 -0700 (PDT) X-Google-Smtp-Source: AKy350anvKRdCqymoi3HA8Mvrqx8aMyWWzbOJLM+zJOyQEF8Jo06Rbu4kbvOeYdFiVgsMqJzfou6 X-Received: by 2002:a05:6a20:6daa:b0:de:8f7d:dc09 with SMTP id gl42-20020a056a206daa00b000de8f7ddc09mr9173938pzb.8.1679934882196; Mon, 27 Mar 2023 09:34:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679934882; cv=pass; d=google.com; s=arc-20160816; b=hvQkvmlSD/ghNkBlpGApibMZriPuk27EskdowbjNAnTLvd8Uh0V85fTQBOFkG1niRB rXVqdFMvjRZ33PGeoGiwZ2AkdzObCidhQn0Q5MG4X7BUHQyPRANN4ps8KOdvq5qXD+Cd NjjZr3tqC0G7VH2FwYYzYWu9MEimcXVfHgdoFcy3WYLg88lvm/jZPvEZ/ZUX+5ggVHX3 FjAyd0af+A9FiXQv0DmpgSRDtE5gIbjfRmKSXJp/AJ6blGHrHHdBMhDXMdSLaIeagcXM Ix0sQvYwu1EcmRqUXmt8BWExA57WFBElQQsjYa6td5pSViy5x6EvHnjqY0hS/gPxFIrv p8ug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=oSL0tSeKRavrPoWu4zSxlgLh06KAImtspwJWfUPGZSM=; b=I4WR8hEo2e4u8xjp8caQuE76sMZ1y51zv6emKY5KSG2gV25T/miPAHSMPH33lQ4vNX p/KZ365XjbXAelR/QQPEmxTg9wArClqULl5/JWkwjQ9bGgvYdA1CVBfZxA+ieaCvOFS7 1Qu7pzEmWS4d3gHsQ/2bCVgmPhj3kstBK/4rbOC+zfkksYJNe9VuL8Ndk5g0U5SPyL3V 1HM3PluwphXb2f8G1oatqnxAX0BCJg+HXzAnEl4eEXaVcXl1zBMT7mNWNj8gblt+qM0M MK1R10UCxkmwH4vfcymhWyhsmPUnY3p49gbrOmGr23kOO9Ax27d4LsbatUJMUe5lg6QZ DCtw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=GO8vYRmw; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a63db10000000b0050308cba870si27642436pgg.137.2023.03.27.09.34.29; Mon, 27 Mar 2023 09:34:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=GO8vYRmw; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230107AbjC0QRz (ORCPT + 99 others); Mon, 27 Mar 2023 12:17:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230287AbjC0QRq (ORCPT ); Mon, 27 Mar 2023 12:17:46 -0400 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2045.outbound.protection.outlook.com [40.107.101.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F31B59FF; Mon, 27 Mar 2023 09:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GgKogzMkukzKWSX7l11C1VLjzFtx7jhPF5/bDoSee+l3RFYdYpt3sd4m/yMcuUNJ/RCmwhT+zH0stlQpvoenzEy2DjpFd7jqorLxyOpXNBVi42LffpTHlHwyQzB5X1589aMk/UEbgCjcL9PTYWvWShlFCjWxRQkOy16GJUWE6V9pm4sq/9nwSvnixcONy3CVrlHSwIp9fwJO18Mv72RYKUPscAZGbZA4HJqDjVS/lNPrUrbYHksDVBZgFSoC4LXWXWHvYdhv7NUw815GaGL9CIvn6siynJscqHicUGY6X53NI/ZtYSXCPLWsdfgJdrdL5rn16vXRuRmzwUC2RfM2Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oSL0tSeKRavrPoWu4zSxlgLh06KAImtspwJWfUPGZSM=; b=ibCrg+osVM08jLYyIa0diisgLH7eYRt3ujxREDhugdAW9AxQmmdJy08eniLyTVrTTrAv/U6uAHjQm/z4kQno36XxibZa/Ul59/Z5h6rhooOW1FP72yU0JnIqBUDtITSctAUDVoHcoFOksklK/cpp/aqhIr0m5TsNdNnEd77qYPONv1vUUxMudNmWtf5OObsFQigL/+DYRq8eDrZWoWCONgNxuS0xkGY0lOMFLBnREmRM9nYKsLdkBw4mypayozJJSDmwFqKy/+Awvd51TLNS8ihRUAU/VkIBKU656E8XjpHdd69QGMppc0VmKUFEy5ZkTqQRnRCIBOPn7D8uZLTtwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oSL0tSeKRavrPoWu4zSxlgLh06KAImtspwJWfUPGZSM=; b=GO8vYRmw2n4UHq5zDw1HMlPYFOezmhB2PnFakx5AZzeG/QJZMWQoVzlJntCr9Wa0c3Q9XJabX61qsvh01MIPjmHsn+Z+ySYPEKvKhokbXl7KWHPUYqSjJOz72iCHwS/dO30ZEgwn1jTisvVZ+6zVmVUVwsxqtQsNmt/Kz2/dm7t3DjuX6Agc9tOKUhKi5Nqaa/CPOxTHLdR1FTh5dLHvOUWtX94fWYS/NQNA9FrAFVztV616rHGfINguUOyvglZFZ+FpLWUF35s96RZ+Fxd9/KPt8LlFM3UpFdPcLhFtrutjXPquMwlR5U/gNv6uoV8ZhCHWZ2HA70CB4xb4dTTA5Q== Received: from DS7PR03CA0121.namprd03.prod.outlook.com (2603:10b6:5:3b4::6) by SA0PR12MB4349.namprd12.prod.outlook.com (2603:10b6:806:98::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.30; Mon, 27 Mar 2023 16:16:54 +0000 Received: from DM6NAM11FT027.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b4:cafe::1e) by DS7PR03CA0121.outlook.office365.com (2603:10b6:5:3b4::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.41 via Frontend Transport; Mon, 27 Mar 2023 16:16:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT027.mail.protection.outlook.com (10.13.172.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.21 via Frontend Transport; Mon, 27 Mar 2023 16:16:54 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 27 Mar 2023 09:16:48 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 27 Mar 2023 09:16:47 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 27 Mar 2023 09:16:42 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v4 08/10] cpufreq: tegra194: add OPP support and set bandwidth Date: Mon, 27 Mar 2023 21:44:24 +0530 Message-ID: <20230327161426.32639-9-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230327161426.32639-1-sumitg@nvidia.com> References: <20230327161426.32639-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT027:EE_|SA0PR12MB4349:EE_ X-MS-Office365-Filtering-Correlation-Id: f0b7c06c-64a3-4f6a-de95-08db2edeae80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8cQB5s1Sxp1nMj1cD9i5XYP+P0ePmuAxq7iLPIs8aoxXpZCLe0mKMXxL/SQXInCncDwpqwlwe4EfNGpysRUyQiBOn1A5SkQZWdQoY9nmR6WAtHHQkoXCCL52uSfZGSEWIh1BgaGrsqaS/iUzk6Ov5uPGDTbtYACfpUQsVUp4b6zaQ6Bs+A2JKwIsdq8HafCXPmYqsqG59+NXFE10vB7dfmP/ZtSwmWuswoAmHHqx9J3HXsWNu0KRUq9T6p6ohx2v5ptejDj9qtBskpoCTTYJTI4cnCSOk3KOp0z22GBNVrm3rKAxWQlWBFwywed1JSKKeKy0Sd6jTomEP3xjsU4eAa9c5Boy7b/kYg+rAIkw2l6KZ66kGQKZXVpxqMiiWJb81spbRorfValn6Q+8ufqwo9DDPtx/3w1PomTVMPzWem6mZE6CjZwbjfJTuVe/UpqtLtJ2HLVXydvtAj1n0jQovceSkLNDkS2zEXAhu7/5yOsoUrpdVPLM07RtMvrGo41LqXFq9ZdND7nQbJkEpKoAoZRelLI6WN/Tflk8JDdzNOEALgCU29G0tTzAO6sgx8RTWKLJGRt/FFO0BkJwSj++mmgh7ruCm/eI8J/Ndbd45igrRkq0B74oEh4/Q4oyeZie5uFEE/Mys0qBXNgbM7R2MinwuXntXnSKkJ0w+/NLXMeuYKq8QxvOs/j60ZzN3QUcqsiH6QKWKMsNnEPR3jBTpWPdJy9jPAOOCrwghyc6PiNIFk6yquN22Wf+5YM16rjJhDIjbsOlxLRfdwdz6a2nXoyoda8/DN8hKtt5JEX3cHo= X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(346002)(396003)(136003)(451199021)(36840700001)(46966006)(40470700004)(34020700004)(316002)(110136005)(40460700003)(36860700001)(54906003)(478600001)(356005)(7636003)(82740400003)(8936002)(5660300002)(36756003)(82310400005)(86362001)(7416002)(2906002)(4326008)(8676002)(70206006)(70586007)(41300700001)(40480700001)(107886003)(6666004)(186003)(1076003)(26005)(426003)(2616005)(336012)(83380400001)(47076005)(7696005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2023 16:16:54.6793 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f0b7c06c-64a3-4f6a-de95-08db2edeae80 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4349 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761539399143878004?= X-GMAIL-MSGID: =?utf-8?q?1761539399143878004?= Add support to use OPP table from DT in Tegra194 cpufreq driver. Tegra SoC's receive the frequency lookup table (LUT) from BPMP-FW. Cross check the OPP's present in DT against the LUT from BPMP-FW and enable only those DT OPP's which are present in LUT also. The OPP table in DT has CPU Frequency to bandwidth mapping where the bandwidth value is per MC channel. DRAM bandwidth depends on the number of MC channels which can vary as per the boot configuration. This per channel bandwidth from OPP table will be later converted by MC driver to final bandwidth value by multiplying with number of channels before sending the request to BPMP-FW. If OPP table is not present in DT, then use the LUT from BPMP-FW directy as the CPU frequency table and not do the DRAM frequency scaling which is same as the current behavior. Now, as the CPU Frequency table is being controlling through OPP table in DT. Keeping fewer entries in the table will create less frequency steps and can help to scale fast to high frequencies when required. Signed-off-by: Sumit Gupta --- drivers/cpufreq/tegra194-cpufreq.c | 156 ++++++++++++++++++++++++++--- 1 file changed, 143 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/tegra194-cpufreq.c b/drivers/cpufreq/tegra194-cpufreq.c index 5890e25d7f77..c8d03346068a 100644 --- a/drivers/cpufreq/tegra194-cpufreq.c +++ b/drivers/cpufreq/tegra194-cpufreq.c @@ -12,6 +12,7 @@ #include #include #include +#include #include @@ -65,12 +66,36 @@ struct tegra_cpufreq_soc { struct tegra194_cpufreq_data { void __iomem *regs; - struct cpufreq_frequency_table **tables; + struct cpufreq_frequency_table **bpmp_luts; const struct tegra_cpufreq_soc *soc; + bool icc_dram_bw_scaling; }; static struct workqueue_struct *read_counters_wq; +static int tegra_cpufreq_set_bw(struct cpufreq_policy *policy, unsigned long freq_khz) +{ + struct tegra194_cpufreq_data *data = cpufreq_get_driver_data(); + struct dev_pm_opp *opp; + struct device *dev; + int ret; + + dev = get_cpu_device(policy->cpu); + if (!dev) + return -ENODEV; + + opp = dev_pm_opp_find_freq_exact(dev, freq_khz * KHZ, true); + if (IS_ERR(opp)) + return PTR_ERR(opp); + + ret = dev_pm_opp_set_opp(dev, opp); + if (ret) + data->icc_dram_bw_scaling = false; + + dev_pm_opp_put(opp); + return ret; +} + static void tegra_get_cpu_mpidr(void *mpidr) { *((u64 *)mpidr) = read_cpuid_mpidr() & MPIDR_HWID_BITMASK; @@ -354,7 +379,7 @@ static unsigned int tegra194_get_speed(u32 cpu) * to the last written ndiv value from freq_table. This is * done to return consistent value. */ - cpufreq_for_each_valid_entry(pos, data->tables[clusterid]) { + cpufreq_for_each_valid_entry(pos, data->bpmp_luts[clusterid]) { if (pos->driver_data != ndiv) continue; @@ -369,16 +394,93 @@ static unsigned int tegra194_get_speed(u32 cpu) return rate; } +static int tegra_cpufreq_init_cpufreq_table(struct cpufreq_policy *policy, + struct cpufreq_frequency_table *bpmp_lut, + struct cpufreq_frequency_table **opp_table) +{ + struct tegra194_cpufreq_data *data = cpufreq_get_driver_data(); + struct cpufreq_frequency_table *freq_table = NULL; + struct cpufreq_frequency_table *pos; + struct device *cpu_dev; + struct dev_pm_opp *opp; + unsigned long rate; + int ret, max_opps; + int j = 0; + + cpu_dev = get_cpu_device(policy->cpu); + if (!cpu_dev) { + pr_err("%s: failed to get cpu%d device\n", __func__, policy->cpu); + return -ENODEV; + } + + /* Initialize OPP table mentioned in operating-points-v2 property in DT */ + ret = dev_pm_opp_of_add_table_indexed(cpu_dev, 0); + if (!ret) { + max_opps = dev_pm_opp_get_opp_count(cpu_dev); + if (max_opps <= 0) { + dev_err(cpu_dev, "Failed to add OPPs\n"); + return max_opps; + } + + /* Disable all opps and cross-validate against LUT later */ + for (rate = 0; ; rate++) { + opp = dev_pm_opp_find_freq_ceil(cpu_dev, &rate); + if (IS_ERR(opp)) + break; + + dev_pm_opp_put(opp); + dev_pm_opp_disable(cpu_dev, rate); + } + } else { + dev_err(cpu_dev, "Invalid or empty opp table in device tree\n"); + data->icc_dram_bw_scaling = false; + return ret; + } + + freq_table = kcalloc((max_opps + 1), sizeof(*freq_table), GFP_KERNEL); + if (!freq_table) + return -ENOMEM; + + /* + * Cross check the frequencies from BPMP-FW LUT against the OPP's present in DT. + * Enable only those DT OPP's which are present in LUT also. + */ + cpufreq_for_each_valid_entry(pos, bpmp_lut) { + opp = dev_pm_opp_find_freq_exact(cpu_dev, pos->frequency * KHZ, false); + if (IS_ERR(opp)) + continue; + + ret = dev_pm_opp_enable(cpu_dev, pos->frequency * KHZ); + if (ret < 0) + return ret; + + freq_table[j].driver_data = pos->driver_data; + freq_table[j].frequency = pos->frequency; + j++; + } + + freq_table[j].driver_data = pos->driver_data; + freq_table[j].frequency = CPUFREQ_TABLE_END; + + *opp_table = &freq_table[0]; + + dev_pm_opp_set_sharing_cpus(cpu_dev, policy->cpus); + + return ret; +} + static int tegra194_cpufreq_init(struct cpufreq_policy *policy) { struct tegra194_cpufreq_data *data = cpufreq_get_driver_data(); int maxcpus_per_cluster = data->soc->maxcpus_per_cluster; + struct cpufreq_frequency_table *freq_table; + struct cpufreq_frequency_table *bpmp_lut; u32 start_cpu, cpu; u32 clusterid; + int ret; data->soc->ops->get_cpu_cluster_id(policy->cpu, NULL, &clusterid); - - if (clusterid >= data->soc->num_clusters || !data->tables[clusterid]) + if (clusterid >= data->soc->num_clusters || !data->bpmp_luts[clusterid]) return -EINVAL; start_cpu = rounddown(policy->cpu, maxcpus_per_cluster); @@ -387,9 +489,22 @@ static int tegra194_cpufreq_init(struct cpufreq_policy *policy) if (cpu_possible(cpu)) cpumask_set_cpu(cpu, policy->cpus); } - policy->freq_table = data->tables[clusterid]; policy->cpuinfo.transition_latency = TEGRA_CPUFREQ_TRANSITION_LATENCY; + bpmp_lut = data->bpmp_luts[clusterid]; + + if (data->icc_dram_bw_scaling) { + ret = tegra_cpufreq_init_cpufreq_table(policy, bpmp_lut, &freq_table); + if (!ret) { + policy->freq_table = freq_table; + return 0; + } + } + + data->icc_dram_bw_scaling = false; + policy->freq_table = bpmp_lut; + pr_info("OPP tables missing from DT, EMC frequency scaling disabled\n"); + return 0; } @@ -406,6 +521,9 @@ static int tegra194_cpufreq_set_target(struct cpufreq_policy *policy, */ data->soc->ops->set_cpu_ndiv(policy, (u64)tbl->driver_data); + if (data->icc_dram_bw_scaling) + tegra_cpufreq_set_bw(policy, tbl->frequency); + return 0; } @@ -439,8 +557,8 @@ static void tegra194_cpufreq_free_resources(void) } static struct cpufreq_frequency_table * -init_freq_table(struct platform_device *pdev, struct tegra_bpmp *bpmp, - unsigned int cluster_id) +tegra_cpufreq_bpmp_read_lut(struct platform_device *pdev, struct tegra_bpmp *bpmp, + unsigned int cluster_id) { struct cpufreq_frequency_table *freq_table; struct mrq_cpu_ndiv_limits_response resp; @@ -515,6 +633,7 @@ static int tegra194_cpufreq_probe(struct platform_device *pdev) const struct tegra_cpufreq_soc *soc; struct tegra194_cpufreq_data *data; struct tegra_bpmp *bpmp; + struct device *cpu_dev; int err, i; data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); @@ -530,9 +649,9 @@ static int tegra194_cpufreq_probe(struct platform_device *pdev) return -EINVAL; } - data->tables = devm_kcalloc(&pdev->dev, data->soc->num_clusters, - sizeof(*data->tables), GFP_KERNEL); - if (!data->tables) + data->bpmp_luts = devm_kcalloc(&pdev->dev, data->soc->num_clusters, + sizeof(*data->bpmp_luts), GFP_KERNEL); + if (!data->bpmp_luts) return -ENOMEM; if (soc->actmon_cntr_base) { @@ -556,15 +675,26 @@ static int tegra194_cpufreq_probe(struct platform_device *pdev) } for (i = 0; i < data->soc->num_clusters; i++) { - data->tables[i] = init_freq_table(pdev, bpmp, i); - if (IS_ERR(data->tables[i])) { - err = PTR_ERR(data->tables[i]); + data->bpmp_luts[i] = tegra_cpufreq_bpmp_read_lut(pdev, bpmp, i); + if (IS_ERR(data->bpmp_luts[i])) { + err = PTR_ERR(data->bpmp_luts[i]); goto err_free_res; } } tegra194_cpufreq_driver.driver_data = data; + /* Check for optional OPPv2 and interconnect paths on CPU0 to enable ICC scaling */ + cpu_dev = get_cpu_device(0); + if (!cpu_dev) + return -EPROBE_DEFER; + + if (dev_pm_opp_of_get_opp_desc_node(cpu_dev)) { + err = dev_pm_opp_of_find_icc_paths(cpu_dev, NULL); + if (!err) + data->icc_dram_bw_scaling = true; + } + err = cpufreq_register_driver(&tegra194_cpufreq_driver); if (!err) goto put_bpmp; From patchwork Mon Mar 27 16:14:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 75556 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3404:b0:112:7285:5352 with SMTP id h4csp1544869rwd; Mon, 27 Mar 2023 09:34:42 -0700 (PDT) X-Google-Smtp-Source: AKy350ZE3AGfcP1YfDR967qeImiGqI+Hi4ZxC+0Dj3SwqixYC78tUBtgLifRT/IGy61kbalqsHbE X-Received: by 2002:a17:90b:4f48:b0:23a:87cf:de93 with SMTP id pj8-20020a17090b4f4800b0023a87cfde93mr13937597pjb.15.1679934882390; Mon, 27 Mar 2023 09:34:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679934882; cv=pass; d=google.com; s=arc-20160816; b=zVk3/UmPjEGu8CHGtluWLwCuRjiz3fHv8312vp6lPaz4yRXVbp/1b38klUUJhdLoIV 8vYB0lI2mURZDZ85TrefRRJX+ICXACG77W5/6ibx5iojC3alQ3L5wHKjvokFz2L2ANJ8 U83Jhl3dswa0CU65iOjb2umRAY1DVlTU6wW2jlr+XrSYhgxfsBumj5p/j0tuhwrY7kN7 M6X+8F2VaTtXouJXazOSn8fgIm0HHIRDF35qQflF7r3zRobrURaPLTPC6vIoZGBqSn/K NZSWprmaVSapfCfAnZfT9ziACYFdDKumptAlJj2iIi8J7TPNObDUvOL7CnzpX76tc5Ou Vh4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=QaD6PkZdMnITpuNZew2Idq2D7r94KCfbJmxzawpB/GI=; b=bDThbTCXqaO9BTBMHLwi2w3T+gf3nkg0jbC0UneSZbPKonRBcp6XGsgxtUw4su/3IW kjDMviLI5E1th8nJ0JkUCF0HrbUbffiI1d5BJrEhIz/TPuAYGSJWl7LiFcURFn0KtBiI bRS2HmBpIaBl3deFPjmmE4bBBgo/miKL9aB3xX+n0TMTlZ9eXZNsQSA/lkEEQ3N82cI9 /MZMZeqk42mRs/8sfyj2hHrpLQVcQ9/qUKv1A5/TyyiCBAB6d0GYzyFEsssjlyAg8On1 jtqdZmeZRnKspBJ6RK4zQ3yK0i4cv6ReTIIatPxJk6QLEPokVCMffww3UwsNzrrLSUS3 xzaw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=j6e0DjjD; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v5-20020a17090abb8500b002239c987051si10567947pjr.128.2023.03.27.09.34.29; Mon, 27 Mar 2023 09:34:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=j6e0DjjD; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232810AbjC0QS0 (ORCPT + 99 others); Mon, 27 Mar 2023 12:18:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232754AbjC0QSI (ORCPT ); Mon, 27 Mar 2023 12:18:08 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2055.outbound.protection.outlook.com [40.107.223.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 492AC5FCD; Mon, 27 Mar 2023 09:17:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JpQHDvFD+UWtTPszq0n7r6PZYWEjCLA4/ZNyz4jToCUlJ9VLjZZ2HEVdLBAlDKs96UHHTXGu27XiKudodlWPxsf41SkF1LFrksKO5hphtX+e6sV8Gq6bKZs+oe0D7Q37HweEUniAs6MvSXHAqjmh4KNOTcxXi4vDCgnZ8zbRBgFFeNdDS2S/f8IAGZOPLEDqLNloZOPATJQhL81uGI389yF64oklaYM/HCQ9Vj0lT+CQ630cGpzFgMESYgPpGsVMcnhQ3JG5LngH202icOHEJmtC90CkHfSmogj5GEG0Ndy7EpGzNPmpB5LJcJVB0QTWpG4RgzhFSS1JP8H+9ee4fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QaD6PkZdMnITpuNZew2Idq2D7r94KCfbJmxzawpB/GI=; b=B7EnLszQZZ3UNxTK4hEuTeFLg6K3l9N0pwx3rhBE0PzNY7Ph+4DyIrrQ8lJ1tx/TnQ1MnyPaz3Av6heA0pbBeh1zhyE+ix80+5tcqsJa/UA/6Ls50D+uc0ZQPXcDAKJvWCjjiR+VXWC6AiKnj7O7tlKIV43MIbn1PUDeMwSfeEOVgBGrli1pIgG187Tb5r8OhEhHplHCjAnXjQyO3BoQWioAASvzRsEqT13yn1lhCVh7lBJXWlW6j+2zY1n+ZFmq7k4QlWGH8wEfsrC2x+fLDmYO+klFP0MeH1yzjfxVaflKtoX9i1ZYyZC7GPxMxtuwea1qu7nrigem7Gms8zlsDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QaD6PkZdMnITpuNZew2Idq2D7r94KCfbJmxzawpB/GI=; b=j6e0DjjDRdC30HlNJB1u4pK9/+0BapHNqR/15uL/lf5T8MsAD7VMmJxBdTLVITzMa+B9I67fVXHX1DQcAvjkFw+MBtoStFVLdVfO80kzbXVkqp9Op9kgsa1rja2WUVQg0DLPbckbmIbhJ63qpDEYkq7avQbTkaO4Pf56A8g1AQ62cgTveubkYxyz4wI3PQd6YJNYB3bsBfcNduZvUDDn07yXLGR6KTO6L+nbu13jfhYksR8DKeGEhkfhespEpawmL1mVTsdnAXZgqke+BVSEh1TcruDsaB2ViKn1SGjBR8oHORUTKJZwssVS9jmn0xz3L6PzlPMSnd073HvykOt0ag== Received: from DM6PR18CA0024.namprd18.prod.outlook.com (2603:10b6:5:15b::37) by SA1PR12MB8920.namprd12.prod.outlook.com (2603:10b6:806:38e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.42; Mon, 27 Mar 2023 16:17:18 +0000 Received: from DM6NAM11FT012.eop-nam11.prod.protection.outlook.com (2603:10b6:5:15b:cafe::55) by DM6PR18CA0024.outlook.office365.com (2603:10b6:5:15b::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.42 via Frontend Transport; Mon, 27 Mar 2023 16:17:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT012.mail.protection.outlook.com (10.13.173.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.22 via Frontend Transport; Mon, 27 Mar 2023 16:17:17 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 27 Mar 2023 09:17:09 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 27 Mar 2023 09:17:08 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 27 Mar 2023 09:17:03 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v4 09/10] memory: tegra: make cpu cluster bw request a multiple of mc channels Date: Mon, 27 Mar 2023 21:44:25 +0530 Message-ID: <20230327161426.32639-10-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230327161426.32639-1-sumitg@nvidia.com> References: <20230327161426.32639-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT012:EE_|SA1PR12MB8920:EE_ X-MS-Office365-Filtering-Correlation-Id: 615a8500-7e90-41fb-290a-08db2edebc55 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +eMb+izclqrAwRzGrdBf670U9Tv/RryrCiRnO95Aj1IsxKcnAQsE4vH5HBpDbzWWmODO8LtEJiPTZvQ6m2tM6SaKimpKwHUuN0s8Wgd5in5aXgL13FpuKXoD5O5o/XsbLnNQSNLVi2hCoDZ0wEJzFzt31B3GCOfVydKd6XzbL6T0JEGfQ8sv18CXFMOpLbEzfblIWM0mm1wSdWwy+G5l/kMco0Rqc7qd6CT3TPw8y56TxSoZHml22Nx2eAvZ1o+xjVhS0vA4ymw3UgW4pNAqhiRMPzUJCODgAz7zChPSM3EBkoZUq4S97ehzouhslyGPG80maxOeA/QepcUqjAbvt6RpxHuEQgM0vUJBToVXxGlADCWES4ZnukL8jSUhJ113Z6VZFrHQA8RL4JxnH49wDp93W9ZLwo2yohG4Rs6WH7b5sYgjcdudIusR71tJ2+a+a+Eu8uMHJ0F5lGQxxTy+x3i1O0mv989mqnEQZ/g8kIK+TWk578sZt/bVsCSQjp+MBBTgf7YrFiAKzzXXoKLz5MrwxTtlA9nDxBQCREhIP3zbWPtzOkV7nVgfFq5RpkZP0NPrTWtSuJRufrwFNClroOZF4keqk/SSSSy7v/DyLKPVy1tHmNC4kDbzDxKqqRcXXENQU0oTR2TR6P/ijf/frCuVXru5Aeo52JlDGK7gy3mmvyC6gduRiWRfjvVOTQmspfTlRhtLHiXC5BwsUFlVLRdzdzs2jAYOAGn1EyAVdQsxMCR9bVlOLcLGv/J3GsIv/92KeMH56ulRqoXr1uGAAPEbzp5mB5YRD8AQMmo9VQ8= X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(346002)(39860400002)(396003)(451199021)(40470700004)(36840700001)(46966006)(40460700003)(41300700001)(8676002)(70206006)(70586007)(4326008)(186003)(83380400001)(36756003)(34020700004)(5660300002)(2906002)(36860700001)(336012)(7416002)(47076005)(356005)(82310400005)(86362001)(426003)(82740400003)(7636003)(2616005)(8936002)(40480700001)(54906003)(316002)(7696005)(110136005)(6666004)(478600001)(107886003)(26005)(1076003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2023 16:17:17.8809 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 615a8500-7e90-41fb-290a-08db2edebc55 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT012.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8920 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761539399415447259?= X-GMAIL-MSGID: =?utf-8?q?1761539399415447259?= Make CPU cluster's bandwidth (BW) request a multiple of MC channels. CPU OPP tables have BW info per MC channel. But, the actual BW depends on the number of MC channels which can change as per the boot config. Get the number of MC channels which are actually enabled in current boot configuration and multiply the BW request from a CPU cluster with the number of enabled MC channels. This is not required to be done for other MC clients. Signed-off-by: Sumit Gupta Acked-by: Krzysztof Kozlowski --- drivers/memory/tegra/mc.c | 19 +++++++++++++++++++ drivers/memory/tegra/mc.h | 1 + drivers/memory/tegra/tegra234.c | 24 +++++++++++++++++++++++- include/soc/tegra/mc.h | 1 + 4 files changed, 44 insertions(+), 1 deletion(-) diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c index 983455b1f98d..4a750da1c12a 100644 --- a/drivers/memory/tegra/mc.c +++ b/drivers/memory/tegra/mc.c @@ -843,6 +843,23 @@ static int tegra_mc_interconnect_setup(struct tegra_mc *mc) return err; } +static void tegra_mc_num_channel_enabled(struct tegra_mc *mc) +{ + unsigned int i; + u32 value; + + value = mc_ch_readl(mc, 0, MC_EMEM_ADR_CFG_CHANNEL_ENABLE); + if (value <= 0) { + mc->num_channels = mc->soc->num_channels; + return; + } + + for (i = 0; i < 32; i++) { + if (value & BIT(i)) + mc->num_channels++; + } +} + static int tegra_mc_probe(struct platform_device *pdev) { struct tegra_mc *mc; @@ -881,6 +898,8 @@ static int tegra_mc_probe(struct platform_device *pdev) return err; } + tegra_mc_num_channel_enabled(mc); + if (mc->soc->ops && mc->soc->ops->handle_irq) { mc->irq = platform_get_irq(pdev, 0); if (mc->irq < 0) diff --git a/drivers/memory/tegra/mc.h b/drivers/memory/tegra/mc.h index bc01586b6560..c3f6655bec60 100644 --- a/drivers/memory/tegra/mc.h +++ b/drivers/memory/tegra/mc.h @@ -53,6 +53,7 @@ #define MC_ERR_ROUTE_SANITY_ADR 0x9c4 #define MC_ERR_GENERALIZED_CARVEOUT_STATUS 0xc00 #define MC_ERR_GENERALIZED_CARVEOUT_ADR 0xc04 +#define MC_EMEM_ADR_CFG_CHANNEL_ENABLE 0xdf8 #define MC_GLOBAL_INTSTATUS 0xf24 #define MC_ERR_ADR_HI 0x11fc diff --git a/drivers/memory/tegra/tegra234.c b/drivers/memory/tegra/tegra234.c index 4c8929a88778..23597e3c2d28 100644 --- a/drivers/memory/tegra/tegra234.c +++ b/drivers/memory/tegra/tegra234.c @@ -872,6 +872,28 @@ static int tegra234_mc_icc_set(struct icc_node *src, struct icc_node *dst) return ret; } +static int tegra234_mc_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw, + u32 peak_bw, u32 *agg_avg, u32 *agg_peak) +{ + struct icc_provider *p = node->provider; + struct tegra_mc *mc = icc_provider_to_tegra_mc(p); + + if (!mc->bwmgr_mrq_supported) + return -EINVAL; + + if (node->id == TEGRA_ICC_MC_CPU_CLUSTER0 || + node->id == TEGRA_ICC_MC_CPU_CLUSTER1 || + node->id == TEGRA_ICC_MC_CPU_CLUSTER2) { + if (mc) + peak_bw = peak_bw * mc->num_channels; + } + + *agg_avg += avg_bw; + *agg_peak = max(*agg_peak, peak_bw); + + return 0; +} + static struct icc_node* tegra234_mc_of_icc_xlate(struct of_phandle_args *spec, void *data) { @@ -903,7 +925,7 @@ static int tegra234_mc_icc_get_init_bw(struct icc_node *node, u32 *avg, u32 *pea static const struct tegra_mc_icc_ops tegra234_mc_icc_ops = { .xlate = tegra234_mc_of_icc_xlate, - .aggregate = icc_std_aggregate, + .aggregate = tegra234_mc_icc_aggregate, .get_bw = tegra234_mc_icc_get_init_bw, .set = tegra234_mc_icc_set, }; diff --git a/include/soc/tegra/mc.h b/include/soc/tegra/mc.h index 900d88b26fae..fc3001483e62 100644 --- a/include/soc/tegra/mc.h +++ b/include/soc/tegra/mc.h @@ -234,6 +234,7 @@ struct tegra_mc { struct tegra_mc_timing *timings; unsigned int num_timings; + unsigned int num_channels; bool bwmgr_mrq_supported; struct reset_controller_dev reset; From patchwork Mon Mar 27 16:14:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Gupta X-Patchwork-Id: 75554 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3404:b0:112:7285:5352 with SMTP id h4csp1544481rwd; Mon, 27 Mar 2023 09:34:04 -0700 (PDT) X-Google-Smtp-Source: AK7set///mbhrNw0aPSGPOs9dD+TsUFV88dIkcZZijO3ZcyyCsfyk1ZGAmivkZHnGx9qEyuZAeyf X-Received: by 2002:a05:6a20:4b16:b0:d7:4339:fad9 with SMTP id fp22-20020a056a204b1600b000d74339fad9mr9386395pzb.7.1679934844147; Mon, 27 Mar 2023 09:34:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679934844; cv=pass; d=google.com; s=arc-20160816; b=iYFqN9nEat5YUR0MVYcdqRxvy+3iwaVOqDgIURgnV94qlQJhHa036oYrGIxw0fAHaL uWtlOh0MgbpiDnG+f+XGyw2wFIgwF6/kQAnE4SOVwFjMt7WWa13kWNtsJw59IA3w8KPQ MudTWAB1h0UVf9xfvVBSKT/8lRwLRV4LaKP13ruIEqKqPHcPThSo8BRXz56uCcBJQ4VN nJSivoL6e/M2fspD4liDfIEhgNZyEuZPTtg1zugYrdqzO5B0OY22AIi702c1JY2W6JxX Z4YNrX3MA+krVs0cKh/R09QJYbiKbmDyWCCx2p+Q9sEKcX3T2wuHyqBF7yothWNgjmSH zttw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Zl/Zq3udnXoPPmPhp/uzEpbABsNB15gy+KqjcHFYdzA=; b=dLaz/AIuvMfGtkN+ZS1kv03PUegp/FLz/eMnnDw84ZUg6xfk47JW+38j97HctSJXWj 7UlX3MU8y8LpnHFaRXxQRZsPHWRSNuUH6XekhKTIjiiQuHkdAmfqznnzB2e0JKKlDoaB JipQzgcIWMjJ70GYb9XlEtzLRGoj2vz5eHUk4AHGfxcMDrHpv2pX1BErOc4Gq7qj5T0S kUz13iC6dMF4M4Azk0K4uMwv7XeYUAX2TD6QKm+2ptMvJeX7fmrbM6NGsP6waSKIMYQf Svoq9NJ6QQa71Y1aiwcwXfxpZLCLm1ZqSujD8/d+usV5ANG4LtNPpvK2okfU1EfDJUSL lCOw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=ZAm6vD3B; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t13-20020a056a0021cd00b00625dc9792a6si29383160pfj.300.2023.03.27.09.33.51; Mon, 27 Mar 2023 09:34:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=ZAm6vD3B; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232606AbjC0QSp (ORCPT + 99 others); Mon, 27 Mar 2023 12:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232542AbjC0QSV (ORCPT ); Mon, 27 Mar 2023 12:18:21 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on20611.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5b::611]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEF465B92; Mon, 27 Mar 2023 09:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZtfLfdd3EXlG7N86sXVr9c6eeDOoxQ25kNEM+usj1tRy+yQpSx5afhUdBR05KL8qyvohqptsdbGcUqWtxZpZv2GVPYZNKI/AvpZhRqMVM/T1IJdElNGYlHH3geuebkS+cqC4PKpBNA1WsZ2S913c1SRJczFMPLBXoZrQp8yP5iCKC0cFBnxjZCVDIEEvh08FoJSfNlIv91VDYPcZtUJNnuzOJxmp8EkBTX0Zk7A0ehyt5RjqlRtIkWrBeQkq3ilLtIB3HeL4cOKuZX7e9hCjJkxC32/tNPud28fs+2ZJvqD961tIRYqmYU3cMn2HI6kqSaRO/oP1Hc2UplyeLh4svg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Zl/Zq3udnXoPPmPhp/uzEpbABsNB15gy+KqjcHFYdzA=; b=fKg40JnsXwEB3oWZ0+4ZU0wLu4CcP0KU4wK0buDzlou9GReDVt0nEdmtJrv4dQDxYeJ5WmbMn0lBQuuwCFGnxJosKW+Yzl955Bp6xkKduNxhnpMOBmwH2smmCy2gTisl2wrMfj8uxe0NvlH8enurvAtBQds61m3E9qUH/XYWTFCHt3ftxlvxZk26OYzMikpmQORZgCr5kFewZBpjvxx5on6PaUI4hJSMN5mjHJyO4PdEVDoRkkhu9nd7lm/rMGEDJaiPm3y1jYZVucbm54I1IHpc6liieFSFwgUhqDfHgByVThPfPyagvnYxbaKWhj/V+AsOP+5TV6Ee8jaFu1uY4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zl/Zq3udnXoPPmPhp/uzEpbABsNB15gy+KqjcHFYdzA=; b=ZAm6vD3Ba1MkAaShsA23ItfI9YmkKEeJmLO82awVH4Cy6WiSSWiDFpz5RR426hw3luLLJbZVpwg0FNsFjo5Em+X2y0j2EaaKzKqDHVXqzy7RroM/0Y7BMbttcvMfuYxZ3ZAoWiranbhxEfau4ZUF9y+TktRQjUtiFHBTsG6I6o+Acx7EZ0+T6dD73y0DQKQDaxzMT8+e8d64tNTZmj+knkdfCcaHvo+Go9cjIrV4nRBOJChqokQwx9YyBXVdt+aUNM5YvFMzllIiWy3nPycUhj4q8nuCRfzFx/bnK2U8mCDxL7MR39wvPkC2EGF1O1GXtWt1EkGtaPl/v7PL4/C7fg== Received: from DM6PR01CA0006.prod.exchangelabs.com (2603:10b6:5:296::11) by DM4PR12MB6110.namprd12.prod.outlook.com (2603:10b6:8:ad::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.41; Mon, 27 Mar 2023 16:17:27 +0000 Received: from DM6NAM11FT079.eop-nam11.prod.protection.outlook.com (2603:10b6:5:296:cafe::ec) by DM6PR01CA0006.outlook.office365.com (2603:10b6:5:296::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.42 via Frontend Transport; Mon, 27 Mar 2023 16:17:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by DM6NAM11FT079.mail.protection.outlook.com (10.13.173.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6199.32 via Frontend Transport; Mon, 27 Mar 2023 16:17:27 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 27 Mar 2023 09:17:18 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 27 Mar 2023 09:17:18 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Mon, 27 Mar 2023 09:17:13 -0700 From: Sumit Gupta To: , , , , , , , CC: , , , , , , , , , , , , , Subject: [Patch v4 10/10] PCI: tegra194: add interconnect support in Tegra234 Date: Mon, 27 Mar 2023 21:44:26 +0530 Message-ID: <20230327161426.32639-11-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230327161426.32639-1-sumitg@nvidia.com> References: <20230327161426.32639-1-sumitg@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT079:EE_|DM4PR12MB6110:EE_ X-MS-Office365-Filtering-Correlation-Id: b22c18ba-3fcf-4736-c8e2-08db2edec1f0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZHFWV5B8RQh9XV3iMEU+2+I+DpgzwO3rNxu+ngscb1A6aMfBXlnh+8H0gwaB+N4W+DLJecB5b8se0Q/hf+I+4mLQ1ykA7Wj2Fp4jFDE5qngiBJzogD5DL4dJNdC/DMzko//jsMN1F382qbZ06LWCPcSzHF52l7GVdIOmAsgNnIDYV+BtQlvLbNwUCpHzx531huk74n68/z3R/W21CLvNR0ikuE9SsIWHMmeEMMosu/ZkDo4Us95RmreTogpu2tluSH0pDj3fs2FGqEOAAa1OMB2lxpqjXJwwphpS9fhm5Q02DZqzNmUABfBkDQM8DZ30FXS/A8aN4g+Vugv6RzMM7e1nBkKGUuCdPHCN5PgBYTfWeDRgfIbnUu9MNtN84yE68Y6dvC0zMoWZmz/qffma27LO90D8CyugAKEGmekHP6i1y7BUHn+xw2r6UYoRNkaYd/hhcI5REIn5t3qSAmLDcTMt0Y23Y09Oto2N1Ui13b/jbhjW3aL21Jd+TgiXY6rE29izZAfZWnU6eTv/7ZLXE8KDJHOIOsx9EQDI6EawLuNFoV+xxl5aN/ag2yHiUVLKb5zcpCLoYj1a2gvpqAFxdJXTumwgDkJ0RFfV5SS0n2VVCqd+1/uCyz+THAhFHokiq2kg+e3VSVEwd9JJJb9baT5XGdkN4FeBXvOMyyGdgEUxeMdvltkiid3NNYZt8zdxBVegnAkkdaLdP1+mA+yRO+zqh8qSrFDEsZCzTH59HyPjcR2eYDUsT8m+ASEDYvcc6q+TfMOLC2N2lLVAJgVqzsLQT3x5kPVcm7xGS4B+FQI= X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(346002)(376002)(136003)(396003)(39860400002)(451199021)(46966006)(40470700004)(36840700001)(86362001)(40480700001)(82310400005)(36756003)(2906002)(356005)(40460700003)(26005)(6666004)(83380400001)(107886003)(336012)(1076003)(426003)(2616005)(7696005)(47076005)(478600001)(4326008)(70586007)(316002)(34020700004)(36860700001)(110136005)(8676002)(70206006)(82740400003)(186003)(7636003)(54906003)(5660300002)(41300700001)(7416002)(8936002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2023 16:17:27.3051 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b22c18ba-3fcf-4736-c8e2-08db2edec1f0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT079.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6110 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761539358954276511?= X-GMAIL-MSGID: =?utf-8?q?1761539358954276511?= Add support to request DRAM bandwidth with Memory Interconnect in Tegra234 SoC. The DRAM BW required for different modes depends on speed (Gen-1/2/3/4) and width/lanes (x1/x2/x4/x8). Suggested-by: Manikanta Maddireddy Signed-off-by: Sumit Gupta --- drivers/pci/controller/dwc/pcie-tegra194.c | 40 +++++++++++++++++----- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c index 09825b4a075e..d2513c9d3feb 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -287,6 +288,7 @@ struct tegra_pcie_dw { unsigned int pex_rst_irq; int ep_state; long link_status; + struct icc_path *icc_path; }; static inline struct tegra_pcie_dw *to_tegra_pcie(struct dw_pcie *pci) @@ -309,6 +311,24 @@ struct tegra_pcie_soc { enum dw_pcie_device_mode mode; }; +static void tegra_pcie_icc_set(struct tegra_pcie_dw *pcie) +{ + struct dw_pcie *pci = &pcie->pci; + u32 val, speed, width; + + val = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base + PCI_EXP_LNKSTA); + + speed = FIELD_GET(PCI_EXP_LNKSTA_CLS, val); + width = FIELD_GET(PCI_EXP_LNKSTA_NLW, val); + + val = width * (PCIE_SPEED2MBS_ENC(pcie_link_speed[speed]) / BITS_PER_BYTE); + + if (icc_set_bw(pcie->icc_path, MBps_to_icc(val), 0)) + dev_err(pcie->dev, "can't set bw[%u]\n", val); + + clk_set_rate(pcie->core_clk, pcie_gen_freq[speed - 1]); +} + static void apply_bad_link_workaround(struct dw_pcie_rp *pp) { struct dw_pcie *pci = to_dw_pcie_from_pp(pp); @@ -452,14 +472,12 @@ static irqreturn_t tegra_pcie_ep_irq_thread(int irq, void *arg) struct tegra_pcie_dw *pcie = arg; struct dw_pcie_ep *ep = &pcie->pci.ep; struct dw_pcie *pci = &pcie->pci; - u32 val, speed; + u32 val; if (test_and_clear_bit(0, &pcie->link_status)) dw_pcie_ep_linkup(ep); - speed = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base + PCI_EXP_LNKSTA) & - PCI_EXP_LNKSTA_CLS; - clk_set_rate(pcie->core_clk, pcie_gen_freq[speed - 1]); + tegra_pcie_icc_set(pcie); if (pcie->of_data->has_ltr_req_fix) return IRQ_HANDLED; @@ -945,9 +963,9 @@ static int tegra_pcie_dw_host_init(struct dw_pcie_rp *pp) static int tegra_pcie_dw_start_link(struct dw_pcie *pci) { - u32 val, offset, speed, tmp; struct tegra_pcie_dw *pcie = to_tegra_pcie(pci); struct dw_pcie_rp *pp = &pci->pp; + u32 val, offset, tmp; bool retry = true; if (pcie->of_data->mode == DW_PCIE_EP_TYPE) { @@ -1018,9 +1036,7 @@ static int tegra_pcie_dw_start_link(struct dw_pcie *pci) goto retry_link; } - speed = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base + PCI_EXP_LNKSTA) & - PCI_EXP_LNKSTA_CLS; - clk_set_rate(pcie->core_clk, pcie_gen_freq[speed - 1]); + tegra_pcie_icc_set(pcie); tegra_pcie_enable_interrupts(pp); @@ -2224,6 +2240,14 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev) platform_set_drvdata(pdev, pcie); + pcie->icc_path = devm_of_icc_get(&pdev->dev, "write"); + ret = PTR_ERR_OR_ZERO(pcie->icc_path); + if (ret) { + tegra_bpmp_put(pcie->bpmp); + dev_err_probe(&pdev->dev, ret, "failed to get write interconnect\n"); + return ret; + } + switch (pcie->of_data->mode) { case DW_PCIE_RC_TYPE: ret = devm_request_irq(dev, pp->irq, tegra_pcie_rp_irq_handler,