From patchwork Sun Mar 12 00:44:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 662534 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9B1DC74A4B for ; Sun, 12 Mar 2023 00:45:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229621AbjCLApq (ORCPT ); Sat, 11 Mar 2023 19:45:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbjCLApp (ORCPT ); Sat, 11 Mar 2023 19:45:45 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2089.outbound.protection.outlook.com [40.107.237.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EADAF3D0B0; Sat, 11 Mar 2023 16:45:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bEAm5tXbXefwqjpyckbJ40K7aniueEGMvIVUhMYMA/bPB4Az5z4KpIF5Ezs8OEwAcX/ssw1cduhUmC54hfSJGNHfbmB28IhDOdZD/LRorZ0QA+t8eJzqWtDpnHGEbwx2ZSgDve1Wo+qvpoq+BeFmcif57cloaRMaynszZqFyRCaNSIHJ6ekXHOPHDmWUjcmzrTYg1Wi5Rot6r9MkVeMDfU/chC58E225v22W3LAQqpA3WBCYFjOstSfHpJPiaH6kmy7YfY45sTH8x0JHq0im2tblHhlzYgeTOmB6+TERboj+rbQxT2bE3t3eS/8Mjn10zrvsbRJgPws3uelBkRtmhw== 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=xxxkSNpbyALd5CL9TnC1zavQ3gq/W90Nja6dE98DxFs=; b=Y46h52TYw882FoEHQmL/ZjFccp+euSY9UFCqickU4RByfLkR9XXlO3ziJGeD7M1o6ambrzNzHqkN8GJWGII12rr/h4WU7ZXzWpwwfhWIOoRighsOumSvquHtjnAZld2uXoQ2TJ+HWaHYswAvRtEeCDihndwEe5CxPVkctJjGD/tDqtUlLTWDtk8rJhuBbBITpDixmLDoL1z7DZNEVM5ancxsUf2xd1QfQ3O1/fqxkJeKdgHC9g7rj2C+UxF4KilZQ5FJ2Cd51gnF5xOoipWslNNUS5J0NawxWRMGSCvLPY4EwzAmdjmN35t6s8CXqEhQfO/DGKjVEKbxjNeC99HutA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xxxkSNpbyALd5CL9TnC1zavQ3gq/W90Nja6dE98DxFs=; b=3DwMdD5Sa+qQ53hgtv6fiBwQfaVzkTDlS07R65MFcjuzoDeAd6aXabPAwws7XGy75hCwSY5KclaR96YH7tmARuBsrBqsmptUpooowA2KmwJvLoRmBQBoLy7bZgDsAScOlqJGiSrV5/uOPsjBv8ENPsges0yMD/t7dIcci7wmBFs= Received: from DM6PR10CA0035.namprd10.prod.outlook.com (2603:10b6:5:60::48) by MN0PR12MB6199.namprd12.prod.outlook.com (2603:10b6:208:3c4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.23; Sun, 12 Mar 2023 00:45:19 +0000 Received: from DM6NAM11FT054.eop-nam11.prod.protection.outlook.com (2603:10b6:5:60:cafe::8b) by DM6PR10CA0035.outlook.office365.com (2603:10b6:5:60::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.23 via Frontend Transport; Sun, 12 Mar 2023 00:45:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT054.mail.protection.outlook.com (10.13.173.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.24 via Frontend Transport; Sun, 12 Mar 2023 00:45:18 +0000 Received: from platform-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sat, 11 Mar 2023 18:45:15 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 02/15] dt-bindings: mmc: cdns: Add AMD Pensando Elba SoC Date: Sat, 11 Mar 2023 16:44:32 -0800 Message-ID: <20230312004445.15913-3-blarson@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230312004445.15913-1-blarson@amd.com> References: <20230312004445.15913-1-blarson@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT054:EE_|MN0PR12MB6199:EE_ X-MS-Office365-Filtering-Correlation-Id: fa615764-cb66-4861-d3ca-08db22930db1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pvH4SNvYttqPtBILcZXyXfw0mk+j9MHrdkGVmkF+fpPrExzilNRt9OleNyaqnPn0q2qiI+YJT6ADn/FmJ+uZaXclLZmHYVQg7UZmNBCmcUOC4uqeaAII0ISliWZopRQNaDArgH+yukqyvzm8bHCO9uK1DcLDL69ihcaUJwrJuRX3ooOzeNO9EGMFiEwyL0yygqDs4JprO99M/zuaMm+suByvvDEZKtplNkPyRAKR9scKrcSVbZi2RB0abdOImfSg3d4OP/alB1D+/n3uS3Letyq2sb4tgATF4ObjMMxYIz3SALsG+14ikIl3dp/WQNAtYaxySNfreYpYJZxW67BhkB6xfFRE51iEqjz1t6RCh+bWaHaUQ0x71DOwlO1r+75p5jBKiFZe1h/IlIiLApZv2KLwxA6rouRQWnIOtwpGZ9DIPYitk+AY5k5mlCsTKL5f7VEnrYpIRteoe1Q14cdskGUb3wWXnBXeAfAwa8B+xYZ2Z3LewhH2AI0vwxQMl8f656W3o5K7f37DUT9HlLmfaH223R5RmJXLKHxdSHT8lLIxF83m2Azb2zPZdlsWNBZuiOCrVJCNqolw4Stjv8ub73TQeC+YLXMmhcdbngUnWv9uG4y1f/lgYN1pzVwKYAk01K8evLvdcGxYZHRYs/Wi5arG81L4Pstsf9Zvy5qzcLlFklBjLcIykT409BKXUhyOgjrNafATOKcX75SRHiz3EHlL7kejSFAvOR0YV1fCtSc= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(376002)(396003)(136003)(39860400002)(346002)(451199018)(36840700001)(46966006)(40470700004)(2906002)(81166007)(82740400003)(83380400001)(40460700003)(36756003)(7416002)(7406005)(5660300002)(40480700001)(70586007)(70206006)(8676002)(8936002)(41300700001)(6916009)(356005)(4326008)(54906003)(36860700001)(316002)(16526019)(82310400005)(478600001)(47076005)(426003)(336012)(2616005)(186003)(26005)(1076003)(6666004)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:45:18.7414 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fa615764-cb66-4861-d3ca-08db22930db1 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT054.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6199 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org AMD Pensando Elba ARM 64-bit SoC is integrated with this IP and explicitly controls byte-lane enables. Signed-off-by: Brad Larson --- v11 changes: - Remove resets description and reset-names - Add descriptions for amd,pensando-elba-sd4hc reg items v10 changes: - Move reset-names property definition next to existing resets prop - Move allOf to the bottom and set resets/reset-names required only for pensando - Fix reg maxItems for existing, must be 1 v9 changes: - Add reset-names and resets properties - Add if/then on property amd,pensando-elba-sd4hc to set reg property values for minItems and maxItems --- .../devicetree/bindings/mmc/cdns,sdhci.yaml | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml index adacd0535c14..3c511c02e8a6 100644 --- a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml +++ b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml @@ -9,19 +9,18 @@ title: Cadence SD/SDIO/eMMC Host Controller (SD4HC) maintainers: - Masahiro Yamada -allOf: - - $ref: mmc-controller.yaml - properties: compatible: items: - enum: + - amd,pensando-elba-sd4hc - microchip,mpfs-sd4hc - socionext,uniphier-sd4hc - const: cdns,sd4hc reg: - maxItems: 1 + minItems: 1 + maxItems: 2 interrupts: maxItems: 1 @@ -120,6 +119,27 @@ required: - interrupts - clocks +allOf: + - $ref: mmc-controller.yaml + - if: + properties: + compatible: + contains: + const: amd,pensando-elba-sd4hc + then: + properties: + reg: + items: + - description: Host controller registers + - description: Elba byte-lane enable register for writes + required: + - resets + else: + properties: + resets: false + reg: + maxItems: 1 + unevaluatedProperties: false examples: From patchwork Sun Mar 12 00:44:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 662533 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C476BC74A44 for ; Sun, 12 Mar 2023 00:46:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229712AbjCLAqX (ORCPT ); Sat, 11 Mar 2023 19:46:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbjCLAqU (ORCPT ); Sat, 11 Mar 2023 19:46:20 -0500 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2080.outbound.protection.outlook.com [40.107.95.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 490703E0B9; Sat, 11 Mar 2023 16:45:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kf8vaw5zk5r57pF+YyUcPplYeZV3bmdXDZByijTs4N0IW2nKx0xvRz54tRrWda2F5ju4cZdXS3w+8GJeedI9qBUOQ/lfAXsyMtJqlIhsIdSfKe/8aPFb2m4L3azuSwI6ARn54eohpAjSPVuUP5YOxM7CoGdNYRo2xrjj7YnAUQEB1xOjeUtuwh7uwqT668qjqy/43QTh4NWOaUuH0WAxn1E2fwEGbbNw649cWv/42j7e9uTqqOklJWJlRiU1JAJd6HE3Z+KKjh0PWOZm6/f2nPaaE2PTUgpu7QnDbSO0Kb7Hz7mIV4C+F4aB0f9uwqY0/MhtfSQeDkBbmyA1RKdgzw== 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=rJ5Jpf1p3ZxiQc/sni8YZT8EIdM+0r26BcbMOk9WPmk=; b=ELoUBF626AmGTBC7SkE9Wfx2cQWGHkSiEZ5UrvXu1yow73hN/MGuajK0CviuZ58+WvoOk+5E1m6ae8ObUPPRY61BrO5h9z1dNFcw9FEAL3K+4/3G8bAA3NpUsBs68c/B+AsdYY1ONRJMhF3IP8X6MI2j4OLGNG2Gd0NZpinzrCjsVLh48H9lgF+XBl4cQSg1L6cfq0SFIgfaKPUL/plV8Wf0ZyQUARoWojSchTviUeJvb3eTEEJ+k8DdNauSkYB02mCE6pnVIECx+IkVaVQyCrGMQGG8XDcZ0Yj7RORMXWjtMxrLtwBY8bbshMUjtDVOwnkPkI1pOjgK40y1qMp6SQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rJ5Jpf1p3ZxiQc/sni8YZT8EIdM+0r26BcbMOk9WPmk=; b=0HcSwOMxjExULaWVDab4llTn9MO39SpAocSBnXD1U/64VBHhp3HxwaRLLw1VOtqQFnX7+tOnFcE6KLfsitHG1xsAkQhA3bhDefZ8IXnMHZG1VAT8mj2s3dsp0+ZYBIS1p9QjfapE/bwCjkbqEzs9T/d1ILPJOLbIdttbjgD0XTs= Received: from DS7PR05CA0083.namprd05.prod.outlook.com (2603:10b6:8:57::29) by CY8PR12MB7196.namprd12.prod.outlook.com (2603:10b6:930:58::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.23; Sun, 12 Mar 2023 00:45:35 +0000 Received: from DM6NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:8:57:cafe::d7) by DS7PR05CA0083.outlook.office365.com (2603:10b6:8:57::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.23 via Frontend Transport; Sun, 12 Mar 2023 00:45:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT022.mail.protection.outlook.com (10.13.172.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.20 via Frontend Transport; Sun, 12 Mar 2023 00:45:35 +0000 Received: from platform-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sat, 11 Mar 2023 18:45:32 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 04/15] dt-bindings: spi: dw: Add AMD Pensando Elba SoC SPI Controller Date: Sat, 11 Mar 2023 16:44:34 -0800 Message-ID: <20230312004445.15913-5-blarson@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230312004445.15913-1-blarson@amd.com> References: <20230312004445.15913-1-blarson@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT022:EE_|CY8PR12MB7196:EE_ X-MS-Office365-Filtering-Correlation-Id: 4eef2146-42f8-443d-cfb7-08db229317b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ERligMsoxTiOBB2MNX2O2/LieS87IiMwcvZu0lVBuu2Dre0lAFkMkxG/YfIfSLJus3TA43hr7bUB0TrLdI57agH6XXobfmympReZYe3aKUqmnCFcl+hHsh4YdFkDTBgb4sMxC+WBXvErEdTz9KYIv8b6gBz7yUEdSxctpO6uJy0IoK3lcNjuzqKXWZ8JGuVy4G+RbrqB34T3Fcqq6AOnzq+77kR8wefPVD0FdvhnTaqvcMpo21gL4qY7IEWCkAETFHmYwyV/by3BoWi/CKLOgCec7L8I49hf0CWPS+Ssa4tMA2bOCQ2N4lB7rou1K7xWSIQ6mDbMbJSx60z6iHcPFRKA06T6PbZQp++aDzEY/R3PYP8i2/vDL39d40YTP7+hrsXRZ1Ag3uz2Uf2NOjZkZMHE9A/9Xjp62gpd3MrOB0nxdC0hGLiftrP0DWzx+dHgD2YtW6MrkmY3Yhhz8iNJA7sALg/LbWLTL0+Hy4/dqqdmLwwDEHP/mICzbaDGhOXW0lzLJEUsNp5e+TtDr5voa1PNa9vSXtEBhEudp6wFOidQKEU50gxXNMvLISsx4gWyV6513Nn5ljt/NBVP9UxXg/CH8NpAABVlhABFIJrYmBFrBvYX106l2JINK/01vSyMnWp3+v86zAUg9lz18KuJ1Hhf5wo4iV685N608ABk/W6RUIXAxvUHA0XiTwyx8aOrcGOqJQlpd4kkiPIBiyHVwD8OzAbXN5Bt8i6/pBU22Q8= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(396003)(136003)(39860400002)(346002)(376002)(451199018)(46966006)(40470700004)(36840700001)(36756003)(7416002)(7406005)(5660300002)(8936002)(2906002)(36860700001)(356005)(82740400003)(81166007)(70586007)(8676002)(70206006)(478600001)(4326008)(6916009)(82310400005)(40460700003)(41300700001)(40480700001)(426003)(47076005)(336012)(54906003)(316002)(2616005)(186003)(1076003)(16526019)(26005)(83380400001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:45:35.5538 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4eef2146-42f8-443d-cfb7-08db229317b4 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7196 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The AMD Pensando Elba SoC has integrated the DW APB SPI Controller Signed-off-by: Brad Larson Reviewed-by: Krzysztof Kozlowski --- v10 changes: - Move definition of amd,pensando-elba-syscon into properties with a better description - Add amd,pensando-elba-syscon: false for non elba designs v9 changes: - Define property amd,pensando-elba-syscon - Move compatible amd,pensando-elba-spi ahead of baikal,bt1-ssi --- .../bindings/spi/snps,dw-apb-ssi.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml index a132b5fc56e0..2383d6497b1e 100644 --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml @@ -37,6 +37,17 @@ allOf: else: required: - interrupts + - if: + properties: + compatible: + contains: + const: amd,pensando-elba-spi + then: + required: + - amd,pensando-elba-syscon + else: + properties: + amd,pensando-elba-syscon: false properties: compatible: @@ -63,6 +74,8 @@ properties: const: intel,keembay-ssi - description: Intel Thunder Bay SPI Controller const: intel,thunderbay-ssi + - description: AMD Pensando Elba SoC SPI Controller + const: amd,pensando-elba-spi - description: Baikal-T1 SPI Controller const: baikal,bt1-ssi - description: Baikal-T1 System Boot SPI Controller @@ -136,6 +149,12 @@ properties: of the designware controller, and the upper limit is also subject to controller configuration. + amd,pensando-elba-syscon: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: | + Block address to control SPI chip-selects. The Elba SoC + does not use ssi. + patternProperties: "^.*@[0-9a-f]+$": type: object From patchwork Sun Mar 12 00:44:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 662532 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8FB5C61DA4 for ; Sun, 12 Mar 2023 00:46:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229737AbjCLAqi (ORCPT ); Sat, 11 Mar 2023 19:46:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbjCLAqh (ORCPT ); Sat, 11 Mar 2023 19:46:37 -0500 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2042.outbound.protection.outlook.com [40.107.101.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B05C3CE3C; Sat, 11 Mar 2023 16:46:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G6fq5ESwVTG/N6V8hSNQSD1O2OGiITjpDOch9GH9xf3mKfEQujgHnDTOfch1jOQ11eX6wW7FQxl5lSdZPdzQkfEiv4LU+ZSCBq/Cg+cw6/BTKqN4EgtSOgPKZAkstAkdxIXPIr/QUplP8uVbkbTXLk36s3puL/m6MIyPNkC7ZAIT7qBMwHKFGMyuMkf2fMwd6wAJT6axvcmkFMGVWXEi/L1XVIhv4Wifk0wnzqvbkrMuQaicmfzkGf4CrWCdFwA0Dz3/cL3RTvLgR4MN9qzEtm0ipzdPQRYdPPOWBrqg6suVLi2bQjc6qyFKE/KFeKxubfOdPZz2F7RWD38VgrcWQQ== 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=5d82bpmyF+6P+qy1C97qBN4cXmEmhjcPYdPiNzeQJ4E=; b=iup4Z7wOWsf42sBIDWz2fF/njTzHYKdJdZDy0oKtz0SSd59xIzktx+WcjNs6B5ZjCOsGiPSH4+rRAmL7r1aQaP2W2HLdOZIQyW6EaFXCJi+yiN+Ib7RkFr1niOXGW9FvIKTUcKChfT3j3ygmO+c54lsIcpLBOw9uzJpB5B/13kwy/TG+WpWjQ68WdxMegi3tjj02gRyjHBV7Agt4bw6r9iil8ZQNV0dImn7YEBKn30ts4I0kNRUx2g09lyURtt5VT7VcymNQJWtr/19bYjuML6j4DTx4VKJs6VQZb7t/fikXh2w/Cq+tI5xQ7HUp50j3pTF6d5uCtCqbWwaSbX3XOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5d82bpmyF+6P+qy1C97qBN4cXmEmhjcPYdPiNzeQJ4E=; b=Qw82+etmP5yLMw+6642tt2svlovFf8iQPJ1XSzR18I0ynL283xlYACora+TlDGuD+qN7Ne/CaJ0yNB7UeXzPXqmtPvPU1FjlADCNWJPJhUwCI9Gu9rL59INTcJ09JDC+L9WD2xqOlKKMlbzwfAM/jsH6auLULnnOSQ5o7nBPEBA= Received: from DM6PR11CA0032.namprd11.prod.outlook.com (2603:10b6:5:190::45) by SA1PR12MB8698.namprd12.prod.outlook.com (2603:10b6:806:38b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.24; Sun, 12 Mar 2023 00:45:55 +0000 Received: from DM6NAM11FT110.eop-nam11.prod.protection.outlook.com (2603:10b6:5:190:cafe::36) by DM6PR11CA0032.outlook.office365.com (2603:10b6:5:190::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.23 via Frontend Transport; Sun, 12 Mar 2023 00:45:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT110.mail.protection.outlook.com (10.13.173.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.22 via Frontend Transport; Sun, 12 Mar 2023 00:45:55 +0000 Received: from platform-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sat, 11 Mar 2023 18:45:51 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 06/15] MAINTAINERS: Add entry for AMD PENSANDO Date: Sat, 11 Mar 2023 16:44:36 -0800 Message-ID: <20230312004445.15913-7-blarson@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230312004445.15913-1-blarson@amd.com> References: <20230312004445.15913-1-blarson@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT110:EE_|SA1PR12MB8698:EE_ X-MS-Office365-Filtering-Correlation-Id: 83cd7601-2a07-4a1a-cd64-08db22932359 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Drfx8opMQvb1iH/iumRDoo00YUJjG4M4G1W0gRpyCyhGI6OIfAfjiq2dv4yrC/0338TiEyVGAaaus9dcVVy8sJxeYif+jCXrWmhbP89rj4O1HPTeMaljeiN5H0nkL7ToDwwnCsUrOxgSQT4AF0NUdeEuwMBtDHaMbgdNajIjUdBP1h8xfgY9L14WI2NS38wJVqzbYeJjUjjIRFyTgxBcPBZZj+EYIxGNYCa+gb0hspjDBqmi07DAjOxGqSm6esWsBBL+NIs4mvBKtV38NYKc2bICfEvGkxkpRzJcLrdTYU8roIedTOSLphkAkXLqBvc5p/G+v9HMPk9vCZ6HCiYJH8LD5R0EUdzWODTrtbTkbNh2ciQJnvA6v7W9OUljxuuW+Vvikkkeh/1c/9y2JJrk1UTFsfuJpNLtaKxyUTmoEgqXrksdFVmDMhHURfPPETmPuCG+/uR953nv0ZJgusrTQXQJ1ejYNUDOusdEYdGASPVhY2pxcgGWELsvKWzvPryX5z6yKGWv1MRAG3e137EGE+BCMQUNajsdops9WiTBtd7dFaoqBb/62YlDWoxhnxs4QbE64A2ATeuwb399NszUBBU2iRgg7xXqF/Zi1hAsCEyCSZRUFTuklZRqjOzkNuakXf9dQKzJLDhlHpzlGRjV6rdSu1S+r8EFM4ilsM1LbSNw6QW2CNIEr/1tihv8FPp3kTqNpYIjQnqLFmg1ZAzz/39d3PGuND/jLeGoqXJEEqw= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(376002)(396003)(39860400002)(136003)(346002)(451199018)(36840700001)(40470700004)(46966006)(2906002)(83380400001)(6666004)(36756003)(40460700003)(4744005)(26005)(1076003)(7406005)(5660300002)(8936002)(16526019)(40480700001)(186003)(41300700001)(2616005)(356005)(6916009)(8676002)(4326008)(7416002)(47076005)(426003)(70206006)(70586007)(336012)(81166007)(478600001)(82740400003)(316002)(54906003)(36860700001)(82310400005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:45:55.0900 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83cd7601-2a07-4a1a-cd64-08db22932359 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT110.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8698 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add entry for AMD PENSANDO maintainer and files Signed-off-by: Brad Larson --- MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8d5bc223f305..5e39def215c9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1875,6 +1875,15 @@ N: allwinner N: sun[x456789]i N: sun[25]0i +ARM/AMD PENSANDO ARM64 ARCHITECTURE +M: Brad Larson +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) +S: Supported +F: Documentation/devicetree/bindings/*/amd,pensando* +F: Documentation/devicetree/bindings/soc/amd/amd,pensando* +F: arch/arm64/boot/dts/amd/elba* +F: drivers/soc/amd/ + ARM/Amlogic Meson SoC CLOCK FRAMEWORK M: Neil Armstrong M: Jerome Brunet From patchwork Sun Mar 12 00:44:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 662531 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C12D1C74A44 for ; Sun, 12 Mar 2023 00:47:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229494AbjCLArA (ORCPT ); Sat, 11 Mar 2023 19:47:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbjCLAq7 (ORCPT ); Sat, 11 Mar 2023 19:46:59 -0500 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2080.outbound.protection.outlook.com [40.107.220.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9ED663CE02; Sat, 11 Mar 2023 16:46:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z2GjgjUmi2d28RSGFhuY37fMS/RwG9XooO7wDbN5CmFv0Qxc7MjgMj3PcknRtHZvwuVYH6EgeCasugcOksQVizkIG60KRS8zVOJVkKc/PtvFVi/bh4qrq7vC5xesncVJY97tiQIIJ9pGgo/ZzxbllkOsNPrvcLMbJDSOYrhSMlg9Lkg/rjQnbuvtXETAQzajGvtMXfhf1N+pzC5s0ztVBDe13ytfQHXpD3XEK4yk1bW1YhLqyDAexX3VJuT2Kk2oViJunjL6HVTO8KpvmMz5UNO6GVp6mgy8inSMID7qF8O9mkqs6Fhoj51YPenIFOHGWeGiWWOFWp42eiepwYA14A== 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=j7imN6SgaVAurHho6Pd+K0ALCxGZP41vTmEWNf+XI7s=; b=M6K73/z7mbQoa5EH24ZKgkfF2PyiQvcel9kYVvU2Lzg3uU+56B+ROIaAgvGL8Pn9hiMor8UKXPbCosP9ad8zjHzKAk/+1IkZG7yvrOLAEG0+eHSzVb2QjgaSHmytqa+ZWGIluz5Qp/uY5abxeKWVV7mKSsK731rR/V2cXO2fi09h1FCy3HTcPzVqdtsyzKbZQQRFJoNsUuAzCzKZYiVZtIDWx7nbLOFmZheZH+aWt44/gekk9856P6+Pw4gkdv+LEaA5O3SYHj6vJeVX1n73bc+3qNoVYfuqWl+0pA8JcfNxSzP6i0Hrclgd/dY2R4XEHWSG5qw+K67AVUKFgdRH1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j7imN6SgaVAurHho6Pd+K0ALCxGZP41vTmEWNf+XI7s=; b=38/TcUL9nxgD1rNYJo1qY2Fq4iUEbgPWmeEvLQfDTfS1zOxLlhGqHzxTc7MV8kwcgoZy6qbXAEzQAFRzbqRk0OoMkhlzydt7vQBT9+G6tPgF4mNr4dtPefyeDgS2KyMzzeBdp+i2obPOC1JWc0QYaBMRK8VwlKRZFkb8041gZ84= Received: from DM6PR13CA0046.namprd13.prod.outlook.com (2603:10b6:5:134::23) by IA1PR12MB8261.namprd12.prod.outlook.com (2603:10b6:208:3f7::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.23; Sun, 12 Mar 2023 00:46:09 +0000 Received: from DM6NAM11FT029.eop-nam11.prod.protection.outlook.com (2603:10b6:5:134:cafe::e5) by DM6PR13CA0046.outlook.office365.com (2603:10b6:5:134::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.24 via Frontend Transport; Sun, 12 Mar 2023 00:46:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT029.mail.protection.outlook.com (10.13.173.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.22 via Frontend Transport; Sun, 12 Mar 2023 00:46:08 +0000 Received: from platform-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sat, 11 Mar 2023 18:46:05 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 08/15] arm64: dts: Add AMD Pensando Elba SoC support Date: Sat, 11 Mar 2023 16:44:38 -0800 Message-ID: <20230312004445.15913-9-blarson@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230312004445.15913-1-blarson@amd.com> References: <20230312004445.15913-1-blarson@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT029:EE_|IA1PR12MB8261:EE_ X-MS-Office365-Filtering-Correlation-Id: c08f16d6-b926-4acc-551a-08db22932b8f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jB05pc4FV/xEGJ+0UnXRY9lU9x39AHnv7k/lflQAOQ9tOQrzxQzYLIUcvSGwlOmmUj8+0F1R8N5f6/zCFM/n9P6R7Ow051TeI1t5vC+jg5qQRd8api78EUmxG4eRQI2qy9PdlCUXN4g3LL6VhelohC3zqksz1YJobQYJhZvp5kkhUdAgjUyq00z6+PAhGRB6d3r5vdrpSQA766RX3wpiIiJpGVNJlR7DY3JYdX5gdlGQzyB6WCNRyGioPsTbjnVLrVoUCRNmFb7R9SlU/8Mz79LKJ+CQfQrRir3GD+yBUsXGN0BB54uzjl1jPH7I5/yFFdwPY4KC86XgxLnS3v058U8h1SCHxzT2fc2QXamQcwhiA0qaLK9WSS/WQ3m9IQdpnn6QX9CCCP5jIRPuZ0D/EQj6i3E8GbNBza4FBif3ARtt/9kuAS7cPB3kCf1H/4k9IqIgi1266qIZ68JIFRX2gNIoFjq6XVCndpD8c90Ov28uS9ph+iqTL7wJ/B4pBJSg/29yHQitwWUp2UwVHYn1wlv1WTzlV0MLSyZ2d6pfS1Wz5dG77bJIKCm6LN3Wi0mL9vxZyLcxS1bO3chzURz6eUgcuuCdFwXd9vU1hi/PCQGkK2iZ1sN29f5QmZP6mjW9nD1U1zApRO+BR4qbw5Hsmi+h7w1+nuWft5Vs3dVvtLzxd6JMBG+XYR9/0ai/qh9zHQuRFSk7nmNHNQaeYNuH3xyWVMPBv1YCXT4HmaZ17eM= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(346002)(39860400002)(396003)(136003)(376002)(451199018)(40470700004)(46966006)(36840700001)(336012)(2616005)(16526019)(7416002)(7406005)(186003)(30864003)(1076003)(26005)(83380400001)(8936002)(6666004)(82310400005)(36860700001)(356005)(82740400003)(81166007)(5660300002)(426003)(47076005)(40480700001)(8676002)(40460700003)(4326008)(70586007)(2906002)(6916009)(70206006)(41300700001)(478600001)(316002)(36756003)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:46:08.8626 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c08f16d6-b926-4acc-551a-08db22932b8f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT029.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8261 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add AMD Pensando common and Elba SoC specific device nodes Signed-off-by: Brad Larson --- v11 changes: - Delete reset-names - Fix spi0 compatible to be specific 'amd,pensando-elba-ctrl' v9 changes: - Single node for spi0 system-controller and squash the reset-controller child into parent --- arch/arm64/boot/dts/amd/Makefile | 1 + arch/arm64/boot/dts/amd/elba-16core.dtsi | 189 +++++++++++++++++ arch/arm64/boot/dts/amd/elba-asic-common.dtsi | 80 ++++++++ arch/arm64/boot/dts/amd/elba-asic.dts | 28 +++ arch/arm64/boot/dts/amd/elba-flash-parts.dtsi | 106 ++++++++++ arch/arm64/boot/dts/amd/elba.dtsi | 192 ++++++++++++++++++ 6 files changed, 596 insertions(+) create mode 100644 arch/arm64/boot/dts/amd/elba-16core.dtsi create mode 100644 arch/arm64/boot/dts/amd/elba-asic-common.dtsi create mode 100644 arch/arm64/boot/dts/amd/elba-asic.dts create mode 100644 arch/arm64/boot/dts/amd/elba-flash-parts.dtsi create mode 100644 arch/arm64/boot/dts/amd/elba.dtsi diff --git a/arch/arm64/boot/dts/amd/Makefile b/arch/arm64/boot/dts/amd/Makefile index 68103a8b0ef5..8502cc2afbc5 100644 --- a/arch/arm64/boot/dts/amd/Makefile +++ b/arch/arm64/boot/dts/amd/Makefile @@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_PENSANDO) += elba-asic.dtb dtb-$(CONFIG_ARCH_SEATTLE) += amd-overdrive-rev-b0.dtb amd-overdrive-rev-b1.dtb diff --git a/arch/arm64/boot/dts/amd/elba-16core.dtsi b/arch/arm64/boot/dts/amd/elba-16core.dtsi new file mode 100644 index 000000000000..37aadd442db8 --- /dev/null +++ b/arch/arm64/boot/dts/amd/elba-16core.dtsi @@ -0,0 +1,189 @@ +// SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) +/* + * Copyright 2020-2022 Advanced Micro Devices, Inc. + */ + +/ { + cpus { + #address-cells = <2>; + #size-cells = <0>; + + cpu-map { + cluster0 { + core0 { cpu = <&cpu0>; }; + core1 { cpu = <&cpu1>; }; + core2 { cpu = <&cpu2>; }; + core3 { cpu = <&cpu3>; }; + }; + + cluster1 { + core0 { cpu = <&cpu4>; }; + core1 { cpu = <&cpu5>; }; + core2 { cpu = <&cpu6>; }; + core3 { cpu = <&cpu7>; }; + }; + + cluster2 { + core0 { cpu = <&cpu8>; }; + core1 { cpu = <&cpu9>; }; + core2 { cpu = <&cpu10>; }; + core3 { cpu = <&cpu11>; }; + }; + + cluster3 { + core0 { cpu = <&cpu12>; }; + core1 { cpu = <&cpu13>; }; + core2 { cpu = <&cpu14>; }; + core3 { cpu = <&cpu15>; }; + }; + }; + + /* CLUSTER 0 */ + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x0>; + next-level-cache = <&l2_0>; + enable-method = "psci"; + }; + + cpu1: cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x1>; + next-level-cache = <&l2_0>; + enable-method = "psci"; + }; + + cpu2: cpu@2 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x2>; + next-level-cache = <&l2_0>; + enable-method = "psci"; + }; + + cpu3: cpu@3 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x3>; + next-level-cache = <&l2_0>; + enable-method = "psci"; + }; + + l2_0: l2-cache0 { + compatible = "cache"; + }; + + /* CLUSTER 1 */ + cpu4: cpu@100 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x100>; + next-level-cache = <&l2_1>; + enable-method = "psci"; + }; + + cpu5: cpu@101 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x101>; + next-level-cache = <&l2_1>; + enable-method = "psci"; + }; + + cpu6: cpu@102 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x102>; + next-level-cache = <&l2_1>; + enable-method = "psci"; + }; + + cpu7: cpu@103 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x103>; + next-level-cache = <&l2_1>; + enable-method = "psci"; + }; + + l2_1: l2-cache1 { + compatible = "cache"; + }; + + /* CLUSTER 2 */ + cpu8: cpu@200 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x200>; + next-level-cache = <&l2_2>; + enable-method = "psci"; + }; + + cpu9: cpu@201 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x201>; + next-level-cache = <&l2_2>; + enable-method = "psci"; + }; + + cpu10: cpu@202 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x202>; + next-level-cache = <&l2_2>; + enable-method = "psci"; + }; + + cpu11: cpu@203 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x203>; + next-level-cache = <&l2_2>; + enable-method = "psci"; + }; + + l2_2: l2-cache2 { + compatible = "cache"; + }; + + /* CLUSTER 3 */ + cpu12: cpu@300 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x300>; + next-level-cache = <&l2_3>; + enable-method = "psci"; + }; + + cpu13: cpu@301 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x301>; + next-level-cache = <&l2_3>; + enable-method = "psci"; + }; + + cpu14: cpu@302 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x302>; + next-level-cache = <&l2_3>; + enable-method = "psci"; + }; + + cpu15: cpu@303 { + device_type = "cpu"; + compatible = "arm,cortex-a72"; + reg = <0 0x303>; + next-level-cache = <&l2_3>; + enable-method = "psci"; + }; + + l2_3: l2-cache3 { + compatible = "cache"; + }; + }; +}; diff --git a/arch/arm64/boot/dts/amd/elba-asic-common.dtsi b/arch/arm64/boot/dts/amd/elba-asic-common.dtsi new file mode 100644 index 000000000000..1a615788f54e --- /dev/null +++ b/arch/arm64/boot/dts/amd/elba-asic-common.dtsi @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) +/* + * Copyright 2020-2022 Advanced Micro Devices, Inc. + */ + +&ahb_clk { + clock-frequency = <400000000>; +}; + +&emmc_clk { + clock-frequency = <200000000>; +}; + +&flash_clk { + clock-frequency = <400000000>; +}; + +&ref_clk { + clock-frequency = <156250000>; +}; + +&qspi { + status = "okay"; + + flash0: flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + spi-rx-bus-width = <2>; + m25p,fast-read; + cdns,read-delay = <0>; + cdns,tshsl-ns = <0>; + cdns,tsd2d-ns = <0>; + cdns,tchsh-ns = <0>; + cdns,tslch-ns = <0>; + }; +}; + +&gpio0 { + status = "okay"; +}; + +&emmc { + bus-width = <8>; + cap-mmc-hw-reset; + resets = <&rstc 0>; + status = "okay"; +}; + +&wdt0 { + status = "okay"; +}; + +&i2c0 { + clock-frequency = <100000>; + status = "okay"; + + rtc@51 { + compatible = "nxp,pcf85263"; + reg = <0x51>; + }; +}; + +&spi0 { + #address-cells = <1>; + #size-cells = <0>; + num-cs = <4>; + cs-gpios = <0>, <0>, <&porta 1 GPIO_ACTIVE_LOW>, + <&porta 7 GPIO_ACTIVE_LOW>; + status = "okay"; + + rstc: system-controller@0 { + compatible = "amd,pensando-elba-ctrl"; + reg = <0>; + spi-max-frequency = <12000000>; + interrupt-parent = <&porta>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + #reset-cells = <1>; + }; +}; diff --git a/arch/arm64/boot/dts/amd/elba-asic.dts b/arch/arm64/boot/dts/amd/elba-asic.dts new file mode 100644 index 000000000000..c3f4da2f7449 --- /dev/null +++ b/arch/arm64/boot/dts/amd/elba-asic.dts @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) +/* + * Device Tree file for AMD Pensando Elba Board. + * + * Copyright 2020-2022 Advanced Micro Devices, Inc. + */ + +/dts-v1/; + +#include "elba.dtsi" +#include "elba-16core.dtsi" +#include "elba-asic-common.dtsi" +#include "elba-flash-parts.dtsi" + +/ { + model = "AMD Pensando Elba Board"; + compatible = "amd,pensando-elba-ortano", "amd,pensando-elba"; + + aliases { + serial0 = &uart0; + spi0 = &spi0; + spi1 = &qspi; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; diff --git a/arch/arm64/boot/dts/amd/elba-flash-parts.dtsi b/arch/arm64/boot/dts/amd/elba-flash-parts.dtsi new file mode 100644 index 000000000000..734893fef2c3 --- /dev/null +++ b/arch/arm64/boot/dts/amd/elba-flash-parts.dtsi @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) +/* + * Copyright 2020-2022 Advanced Micro Devices, Inc. + */ + +&flash0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + partition@0 { + label = "flash"; + reg = <0x10000 0xfff0000>; + }; + + partition@f0000 { + label = "golduenv"; + reg = <0xf0000 0x10000>; + }; + + partition@100000 { + label = "boot0"; + reg = <0x100000 0x80000>; + }; + + partition@180000 { + label = "golduboot"; + reg = <0x180000 0x200000>; + }; + + partition@380000 { + label = "brdcfg0"; + reg = <0x380000 0x10000>; + }; + + partition@390000 { + label = "brdcfg1"; + reg = <0x390000 0x10000>; + }; + + partition@400000 { + label = "goldfw"; + reg = <0x400000 0x3c00000>; + }; + + partition@4010000 { + label = "fwmap"; + reg = <0x4010000 0x20000>; + }; + + partition@4030000 { + label = "fwsel"; + reg = <0x4030000 0x20000>; + }; + + partition@4090000 { + label = "bootlog"; + reg = <0x4090000 0x20000>; + }; + + partition@40b0000 { + label = "panicbuf"; + reg = <0x40b0000 0x20000>; + }; + + partition@40d0000 { + label = "uservars"; + reg = <0x40d0000 0x20000>; + }; + + partition@4200000 { + label = "uboota"; + reg = <0x4200000 0x400000>; + }; + + partition@4600000 { + label = "ubootb"; + reg = <0x4600000 0x400000>; + }; + + partition@4a00000 { + label = "mainfwa"; + reg = <0x4a00000 0x1000000>; + }; + + partition@5a00000 { + label = "mainfwb"; + reg = <0x5a00000 0x1000000>; + }; + + partition@6a00000 { + label = "diaguboot"; + reg = <0x6a00000 0x400000>; + }; + + partition@8000000 { + label = "diagfw"; + reg = <0x8000000 0x7fe0000>; + }; + + partition@ffe0000 { + label = "ubootenv"; + reg = <0xffe0000 0x10000>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/amd/elba.dtsi b/arch/arm64/boot/dts/amd/elba.dtsi new file mode 100644 index 000000000000..285d776aa67b --- /dev/null +++ b/arch/arm64/boot/dts/amd/elba.dtsi @@ -0,0 +1,192 @@ +// SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) +/* + * Copyright 2020-2022 Advanced Micro Devices, Inc. + */ + +#include +#include "dt-bindings/interrupt-controller/arm-gic.h" + +/ { + model = "Elba ASIC Board"; + compatible = "amd,pensando-elba"; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + dma-coherent; + + ahb_clk: oscillator0 { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + emmc_clk: oscillator2 { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + flash_clk: oscillator3 { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + ref_clk: oscillator4 { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + psci { + compatible = "arm,psci-0.2"; + method = "smc"; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = , + , + , + ; + }; + + pmu { + compatible = "arm,cortex-a72-pmu"; + interrupts = ; + }; + + soc: soc { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + i2c0: i2c@400 { + compatible = "snps,designware-i2c"; + reg = <0x0 0x400 0x0 0x100>; + clocks = <&ahb_clk>; + #address-cells = <1>; + #size-cells = <0>; + i2c-sda-hold-time-ns = <480>; + snps,sda-timeout-ms = <750>; + interrupts = ; + status = "disabled"; + }; + + wdt0: watchdog@1400 { + compatible = "snps,dw-wdt"; + reg = <0x0 0x1400 0x0 0x100>; + clocks = <&ahb_clk>; + interrupts = ; + status = "disabled"; + }; + + qspi: spi@2400 { + compatible = "amd,pensando-elba-qspi", "cdns,qspi-nor"; + reg = <0x0 0x2400 0x0 0x400>, + <0x0 0x7fff0000 0x0 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = ; + clocks = <&flash_clk>; + cdns,fifo-depth = <1024>; + cdns,fifo-width = <4>; + cdns,trigger-address = <0x7fff0000>; + status = "disabled"; + }; + + spi0: spi@2800 { + compatible = "amd,pensando-elba-spi"; + reg = <0x0 0x2800 0x0 0x100>; + #address-cells = <1>; + #size-cells = <0>; + amd,pensando-elba-syscon = <&syscon>; + clocks = <&ahb_clk>; + interrupts = ; + num-cs = <2>; + status = "disabled"; + }; + + gpio0: gpio@4000 { + compatible = "snps,dw-apb-gpio"; + reg = <0x0 0x4000 0x0 0x78>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + porta: gpio-port@0 { + compatible = "snps,dw-apb-gpio-port"; + reg = <0>; + gpio-controller; + #gpio-cells = <2>; + ngpios = <8>; + interrupts = ; + interrupt-controller; + interrupt-parent = <&gic>; + #interrupt-cells = <2>; + }; + + portb: gpio-port@1 { + compatible = "snps,dw-apb-gpio-port"; + reg = <1>; + gpio-controller; + #gpio-cells = <2>; + ngpios = <8>; + }; + }; + + uart0: serial@4800 { + compatible = "ns16550a"; + reg = <0x0 0x4800 0x0 0x100>; + clocks = <&ref_clk>; + interrupts = ; + reg-shift = <2>; + reg-io-width = <4>; + }; + + gic: interrupt-controller@800000 { + compatible = "arm,gic-v3"; + reg = <0x0 0x800000 0x0 0x200000>, /* GICD */ + <0x0 0xa00000 0x0 0x200000>, /* GICR */ + <0x0 0x60000000 0x0 0x2000>, /* GICC */ + <0x0 0x60010000 0x0 0x1000>, /* GICH */ + <0x0 0x60020000 0x0 0x2000>; /* GICV */ + #address-cells = <2>; + #size-cells = <2>; + #interrupt-cells = <3>; + ranges; + interrupt-controller; + interrupts = ; + + /* + * Elba specific pre-ITS is enabled using the + * existing property socionext,synquacer-pre-its + */ + gic_its: msi-controller@820000 { + compatible = "arm,gic-v3-its"; + reg = <0x0 0x820000 0x0 0x10000>; + msi-controller; + #msi-cells = <1>; + socionext,synquacer-pre-its = + <0xc00000 0x1000000>; + }; + }; + + emmc: mmc@30440000 { + compatible = "amd,pensando-elba-sd4hc", "cdns,sd4hc"; + reg = <0x0 0x30440000 0x0 0x10000>, + <0x0 0x30480044 0x0 0x4>; /* byte-lane ctrl */ + clocks = <&emmc_clk>; + interrupts = ; + cdns,phy-input-delay-sd-highspeed = <0x4>; + cdns,phy-input-delay-legacy = <0x4>; + cdns,phy-input-delay-sd-uhs-sdr50 = <0x6>; + cdns,phy-input-delay-sd-uhs-ddr50 = <0x16>; + mmc-ddr-1_8v; + status = "disabled"; + }; + + syscon: syscon@307c0000 { + compatible = "amd,pensando-elba-syscon", "syscon"; + reg = <0x0 0x307c0000 0x0 0x3000>; + }; + }; +}; From patchwork Sun Mar 12 00:44:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 662530 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63851C74A5B for ; Sun, 12 Mar 2023 00:47:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229863AbjCLArW (ORCPT ); Sat, 11 Mar 2023 19:47:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229876AbjCLArT (ORCPT ); Sat, 11 Mar 2023 19:47:19 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on20615.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e88::615]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39B6B6BC38; Sat, 11 Mar 2023 16:46:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SA26QM+oMX2mjVA4Qzm5c1x5qqvE2sty/5W0YHqfjOPjIx5QDmd2HWm9i9axzB/TXcmUZicP4xTLR7d8lcQhGwLh6Jjpt3opM2P1ea0JHWVzqLqzUhrT/YhY47M/lUq4ELqeWcMBZsopj9QGEFpx/KCrmhmGKHigPgkxrERaZ7KZQfk7L5SPUGvPp1nOzMQpy3oGOwJoAmlSvHqYo/pT9cSvfBNMhWMfkv3e73H9S6BJveOPgTVXJrOg8EPqKdjzhFKaVMahVGh0zdZGnbDBHK3Vzz1yvmx7uqBIsJcwNgZSI7tiPX+KHPk9ITyEBzCkHxDIeryWQfUvuDdjpRbbWg== 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=ymfACAjSLWbCk+4U3bvrCLTQlZYsf0VDrwtsvVsOjLE=; b=IUswKfbSVsAasqWNN3+QNgE01dr4qsJ8HlaZFPMsc1a2jTUBhCU0hhfRkCw1sUz3cJo6yIQJR95InktanOmaf5uWY7579z8Pp010Gw6zPpX/ZCmwbYHtxvJKVQvewHAbDouHl1pAL2XDQiUhKVkQuwwYB4X74D9rhmtIysx0sN+lA7T5FG/pPN+OZqvKF4DLCNBskylu6gN9nH/h8kD4OB09uT4w6XgYYlbmgaF5CnCSCzXk5Ta3BB7qWgo5ALE5AGxhvfrcmAfIus5aGdTGx5Bqer6gaIo8WUiUIiU5KaWtcYWilIPlQtylfX0ujkzWaZ1rcWB4758FjpEHXzOuJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ymfACAjSLWbCk+4U3bvrCLTQlZYsf0VDrwtsvVsOjLE=; b=Ck9RiXge0QexozE5FqsPZ9SjY2/EVWR2vFGkXTJjv0O8b0azeAhCvb+k+LuVjieX7l38w61KkxdSE/86RtVieu4OdG4qPjlwuSv2pZNuMBzL8QmdAklQSXrOkQRnWZD22IAy1A3RfkBJ+O5mBfIE0J/Ue9c6yA6cpfcyy8vp3tA= Received: from DM6PR07CA0040.namprd07.prod.outlook.com (2603:10b6:5:74::17) by DM4PR12MB5747.namprd12.prod.outlook.com (2603:10b6:8:5e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.23; Sun, 12 Mar 2023 00:46:32 +0000 Received: from DM6NAM11FT070.eop-nam11.prod.protection.outlook.com (2603:10b6:5:74:cafe::2a) by DM6PR07CA0040.outlook.office365.com (2603:10b6:5:74::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.23 via Frontend Transport; Sun, 12 Mar 2023 00:46:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT070.mail.protection.outlook.com (10.13.173.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.23 via Frontend Transport; Sun, 12 Mar 2023 00:46:32 +0000 Received: from platform-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sat, 11 Mar 2023 18:46:27 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 11/15] mmc: sdhci-cadence: Enable device specific override of writel() Date: Sat, 11 Mar 2023 16:44:41 -0800 Message-ID: <20230312004445.15913-12-blarson@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230312004445.15913-1-blarson@amd.com> References: <20230312004445.15913-1-blarson@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT070:EE_|DM4PR12MB5747:EE_ X-MS-Office365-Filtering-Correlation-Id: 69d53063-4179-4c28-cf97-08db2293399a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +tHfSsIu0501wbm/WxSVNReo2go6anzwi5A8CRydHOkxqqt6bR8sfGs+rN/Ce4owqLU35oeU0cW4w59lvdsroZKnrOOAgb9YxiCTc4Vp+N8cfiQIkISqpyA4JZkTVrUU4tyfZdflHLSX4875pZX4LjlOzHW5vU4U2Bmmj49syQWCVput2OdD//U8bukIRWBdFw8XDOKXu9HOPfd9qLkiEMk923NrmYAzAPR0ASRSwH6qDAw8/Ky86QXvyJ6QPr09YPjxbr7MZAhkUyKeRsnuVha8lXvqIFhE2ALuEI6Ott9h00MEGfzxOrB4+bAHoouIh9M9gEY23RG9kAiyKBwyF6RIwej0jICOLMHbK0OGCIQA4bG1Ohb8lNln1X4Ozgv5nkatNnjteYUYOE4tDNp8tWr0WrMQoP9d03tA/WhkAtdyvraMP7cWx+VS0OJ9MBkOf3iYVK9a0UMlB9IheeYAXfWls+1yJpBXemuMx86GUkJjti+jWE1EbbLTgI45Qhv+BQNd2R5Z1cPoZKKM7bNhtqsS0QXaUEUbo9ct+deNjF187g8xbeZOkE8xG/kVsGPuuRPN7wz1d2X4K2MaEdeJgTDKxgc3cfphPQpDPavcqQ1MV5rVmflBgHAkbR6wEm8hPAYZAYAziIemaxqFOShZcNzCT0aYkdadddr4k5f+vbBwmBNyNcLrAcClI7UbAYkMaedAWvg1Iy2Jjp/fUc5WeaUk6jak7EStb+s4F3U/NXo= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(136003)(39860400002)(376002)(346002)(396003)(451199018)(40470700004)(46966006)(36840700001)(2906002)(6666004)(478600001)(356005)(36756003)(186003)(26005)(1076003)(16526019)(40460700003)(2616005)(8936002)(336012)(40480700001)(426003)(47076005)(83380400001)(41300700001)(82310400005)(70206006)(70586007)(4326008)(6916009)(8676002)(5660300002)(7406005)(7416002)(54906003)(316002)(36860700001)(82740400003)(81166007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:46:32.4259 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 69d53063-4179-4c28-cf97-08db2293399a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT070.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5747 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org SoCs with device specific Cadence implementation, such as setting byte-enables before the write, need to override writel(). Add a callback where the default is writel() for all existing chips. Signed-off-by: Brad Larson Acked-by: Adrian Hunter --- v10 changes: - The 1st patch adding private writel() is unchanged. The 2nd patch is split into two patches to provide for device specific init in one patch with no effect on existing designs. Then add the pensando support into the next patch. Then the 4th patch is mmc hardware reset support which is unchanged. v9 changes: - No change to this patch but as some patches are deleted and this is a respin the three successive patches to sdhci-cadence.c are patches 12, 13, and 14 which do the following: 1. Add ability for Cadence specific design to have priv writel(). 2. Add Elba SoC support that requires its own priv writel() for byte-lane control . 3. Add support for mmc hardware reset. --- drivers/mmc/host/sdhci-cadence.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c index 6f2de54a5987..708d4297f241 100644 --- a/drivers/mmc/host/sdhci-cadence.c +++ b/drivers/mmc/host/sdhci-cadence.c @@ -67,6 +67,7 @@ struct sdhci_cdns_phy_param { struct sdhci_cdns_priv { void __iomem *hrs_addr; bool enhanced_strobe; + void (*priv_writel)(struct sdhci_cdns_priv *priv, u32 val, void __iomem *reg); unsigned int nr_phy_params; struct sdhci_cdns_phy_param phy_params[]; }; @@ -90,6 +91,12 @@ static const struct sdhci_cdns_phy_cfg sdhci_cdns_phy_cfgs[] = { { "cdns,phy-dll-delay-strobe", SDHCI_CDNS_PHY_DLY_STROBE, }, }; +static inline void cdns_writel(struct sdhci_cdns_priv *priv, u32 val, + void __iomem *reg) +{ + writel(val, reg); +} + static int sdhci_cdns_write_phy_reg(struct sdhci_cdns_priv *priv, u8 addr, u8 data) { @@ -104,17 +111,17 @@ static int sdhci_cdns_write_phy_reg(struct sdhci_cdns_priv *priv, tmp = FIELD_PREP(SDHCI_CDNS_HRS04_WDATA, data) | FIELD_PREP(SDHCI_CDNS_HRS04_ADDR, addr); - writel(tmp, reg); + priv->priv_writel(priv, tmp, reg); tmp |= SDHCI_CDNS_HRS04_WR; - writel(tmp, reg); + priv->priv_writel(priv, tmp, reg); ret = readl_poll_timeout(reg, tmp, tmp & SDHCI_CDNS_HRS04_ACK, 0, 10); if (ret) return ret; tmp &= ~SDHCI_CDNS_HRS04_WR; - writel(tmp, reg); + priv->priv_writel(priv, tmp, reg); ret = readl_poll_timeout(reg, tmp, !(tmp & SDHCI_CDNS_HRS04_ACK), 0, 10); @@ -191,7 +198,7 @@ static void sdhci_cdns_set_emmc_mode(struct sdhci_cdns_priv *priv, u32 mode) tmp = readl(priv->hrs_addr + SDHCI_CDNS_HRS06); tmp &= ~SDHCI_CDNS_HRS06_MODE; tmp |= FIELD_PREP(SDHCI_CDNS_HRS06_MODE, mode); - writel(tmp, priv->hrs_addr + SDHCI_CDNS_HRS06); + priv->priv_writel(priv, tmp, priv->hrs_addr + SDHCI_CDNS_HRS06); } static u32 sdhci_cdns_get_emmc_mode(struct sdhci_cdns_priv *priv) @@ -223,7 +230,7 @@ static int sdhci_cdns_set_tune_val(struct sdhci_host *host, unsigned int val) */ for (i = 0; i < 2; i++) { tmp |= SDHCI_CDNS_HRS06_TUNE_UP; - writel(tmp, reg); + priv->priv_writel(priv, tmp, reg); ret = readl_poll_timeout(reg, tmp, !(tmp & SDHCI_CDNS_HRS06_TUNE_UP), @@ -386,6 +393,7 @@ static int sdhci_cdns_probe(struct platform_device *pdev) priv->nr_phy_params = nr_phy_params; priv->hrs_addr = host->ioaddr; priv->enhanced_strobe = false; + priv->priv_writel = cdns_writel; host->ioaddr += SDHCI_CDNS_SRS_BASE; host->mmc_host_ops.hs400_enhanced_strobe = sdhci_cdns_hs400_enhanced_strobe; From patchwork Sun Mar 12 00:44:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 662529 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C8DDC74A4B for ; Sun, 12 Mar 2023 00:48:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229800AbjCLAsX (ORCPT ); Sat, 11 Mar 2023 19:48:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229712AbjCLAsV (ORCPT ); Sat, 11 Mar 2023 19:48:21 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2085.outbound.protection.outlook.com [40.107.93.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 598E56BC35; Sat, 11 Mar 2023 16:47:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rs0u4iAvc3JFG1FZcwuOG1fWwfQsruY/e6ChpKSnqgrr3it0QqOQ6nrsqGscOboVmEAXmZ6i7wJcV/Yc7OAjycTNsEwyEDzPpX6dJqkbuva5MxDR59YxB3N8x+qy3tfnNiJf3NQAffJ6RyQYcQeQAjJ+YP3VO9U7X+fkIzSGLGEzsfe7LR6m+NOFv1bUBHD/b16LRucQwZCz2og7QPfawDJtGfCuyZawgEe53hDbIbm1Q6NsY1nYtRbgkoWv7FeI1xWwnzk6ZjqrKPUEnegoHTFgQ1Qj6s9kp6hFSNjHQY8cmbuQjh37O8XtfoyVE+/Z+BebQoeOppzF45rzvTstYw== 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=1MDls9ITIFGGKkwfzufckKk9fjZ1Lh0w+zr7TA/z5wc=; b=LxXrn25eDSOnhNMoibqJ+257WP8YWrWU0PRoc2CsKUW8fKP/nANKZbSv4pkokKXOJfo6cZs48q8uc/JSHmQ8FRi9f8yLJNpO9Qwt4Oua4gkMCeYP9+K0QevTKjjiajC7m+Ft6nGVmOtbayJD6rjqxbhlj3oHKAtB3jID/KNCSh5F6neIvIqxE2lOqtNSSHFiil8iwmq1LSY7k2gqWl+TBvgQCi8EvCh8LD4YOQN5yWtWxAmL6VmqgRtG7pxTZgC39OU/Rxj2qB1EmyjAJ84ZM+1A6hRCF5rPBLPiNhRaw2n+6KWrkV/IEtDRxmx+jsYJTzLWUmCntvclYj3rwraVqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1MDls9ITIFGGKkwfzufckKk9fjZ1Lh0w+zr7TA/z5wc=; b=SxWraxn3mpzS2DzNj4TKmXsM25ADrQoWaTCdiJOg8TIs+qhON1lCralK83eD3M8/KZgU0L79KI7dw/6yJiRbGCBroLn/sPK4OkUP9BW7K/ynzI5qXd/JonHcztOFvOt7LyJDcnHNRXjsUhTPJLDP/IA9msNg8GE2wBVBwlvimqE= Received: from DM6PR03CA0028.namprd03.prod.outlook.com (2603:10b6:5:40::41) by MN2PR12MB4407.namprd12.prod.outlook.com (2603:10b6:208:260::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.24; Sun, 12 Mar 2023 00:46:44 +0000 Received: from DM6NAM11FT072.eop-nam11.prod.protection.outlook.com (2603:10b6:5:40:cafe::ed) by DM6PR03CA0028.outlook.office365.com (2603:10b6:5:40::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.24 via Frontend Transport; Sun, 12 Mar 2023 00:46:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT072.mail.protection.outlook.com (10.13.173.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.23 via Frontend Transport; Sun, 12 Mar 2023 00:46:43 +0000 Received: from platform-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sat, 11 Mar 2023 18:46:40 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 12/15] mmc: sdhci-cadence: Support device specific init during probe Date: Sat, 11 Mar 2023 16:44:42 -0800 Message-ID: <20230312004445.15913-13-blarson@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230312004445.15913-1-blarson@amd.com> References: <20230312004445.15913-1-blarson@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT072:EE_|MN2PR12MB4407:EE_ X-MS-Office365-Filtering-Correlation-Id: d0b8c91b-7d22-4020-61ee-08db22934052 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hbssGhvUc5vU4hzozr49hgNmhKxcw9/JcgoHCstWwlck1aUutjYhOQjG/YQfXvI+hxSUDifJN3xPm2Upk9xqW33wYAx2U0dBSsT4t1rVaoGeWivaM92KLYo/OuCSxGrb5v6Ih86jXRX0c2N1AtoorDsCNd8+tJpRPKanQtb1IpCY7C4FZ6Lzi4sz0UdLA2K+be86ZjzB85tIq0MgPmnDVetLCnIO7ruEIm4TGLvYABdjAU07z0PSmX7aH7yioJkwCYgO1+5vvPxxvNVfFrShgecbFyY14EIaxVCQkMj+HCIj6SYnL0cOKjXfmrC9te+IJGJ8FdkHPk8aZdqnNU9L/0W7USAGIhw+EHWcOHO3FSLXA7c/NhphfMgwojfMiFfkmnZsC6td/3a1XwJ0DYcvHjUkiE070v0ZnOxE+YXHWOnp9RJdfuD49iIBhXA0KZ5dU+xFpZreoLGsOF6lniKOl5yuHySZe3f2WuyCqWcM2nNYiHzFs+LRG5NxCNtqX7uNxWRNe220xDrXHGWMr+sqYrH11kkGpML5QgnHyICJciR9tgpfUCH9QDIsW2Rzd6YiTqq0cuwcNJ4RbRcYoBSRNMrB92d1wPJcSOvVXyh9YjJcXG1+aTzUoehC2gy44TSot4EhN/1f7s6VFgg2h2I/fhiKb3J+sO9iQ8/33InAAh2+T58BpRIpYS8+lDz/Bbi0h0UPOjSzFPwWyBPELFQXDdvnSo91dGLKK/byv4HQQCU= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(136003)(376002)(346002)(396003)(451199018)(46966006)(36840700001)(40470700004)(356005)(82310400005)(36756003)(36860700001)(81166007)(82740400003)(40480700001)(40460700003)(4326008)(6916009)(70586007)(70206006)(8676002)(41300700001)(54906003)(478600001)(8936002)(316002)(7416002)(7406005)(2906002)(5660300002)(47076005)(336012)(2616005)(426003)(83380400001)(26005)(16526019)(186003)(1076003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:46:43.6953 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d0b8c91b-7d22-4020-61ee-08db22934052 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT072.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4407 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Move struct sdhci_pltfm_data under new struct sdhci_cdns_drv_data. Add an init() into sdhci_cdns_drv_data for platform specific device initialization in the device probe which is not used for existing devices. Signed-off-by: Brad Larson Acked-by: Adrian Hunter --- v10 changes: - New patch to provide for platform specific init() with no change to existing designs. --- drivers/mmc/host/sdhci-cadence.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c index 708d4297f241..c528a25f48b8 100644 --- a/drivers/mmc/host/sdhci-cadence.c +++ b/drivers/mmc/host/sdhci-cadence.c @@ -77,6 +77,11 @@ struct sdhci_cdns_phy_cfg { u8 addr; }; +struct sdhci_cdns_drv_data { + int (*init)(struct platform_device *pdev); + const struct sdhci_pltfm_data pltfm_data; +}; + static const struct sdhci_cdns_phy_cfg sdhci_cdns_phy_cfgs[] = { { "cdns,phy-input-delay-sd-highspeed", SDHCI_CDNS_PHY_DLY_SD_HS, }, { "cdns,phy-input-delay-legacy", SDHCI_CDNS_PHY_DLY_SD_DEFAULT, }, @@ -325,13 +330,17 @@ static const struct sdhci_ops sdhci_cdns_ops = { .set_uhs_signaling = sdhci_cdns_set_uhs_signaling, }; -static const struct sdhci_pltfm_data sdhci_cdns_uniphier_pltfm_data = { - .ops = &sdhci_cdns_ops, - .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, +static const struct sdhci_cdns_drv_data sdhci_cdns_uniphier_drv_data = { + .pltfm_data = { + .ops = &sdhci_cdns_ops, + .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, + }, }; -static const struct sdhci_pltfm_data sdhci_cdns_pltfm_data = { - .ops = &sdhci_cdns_ops, +static const struct sdhci_cdns_drv_data sdhci_cdns_drv_data = { + .pltfm_data = { + .ops = &sdhci_cdns_ops, + }, }; static void sdhci_cdns_hs400_enhanced_strobe(struct mmc_host *mmc, @@ -357,7 +366,7 @@ static void sdhci_cdns_hs400_enhanced_strobe(struct mmc_host *mmc, static int sdhci_cdns_probe(struct platform_device *pdev) { struct sdhci_host *host; - const struct sdhci_pltfm_data *data; + const struct sdhci_cdns_drv_data *data; struct sdhci_pltfm_host *pltfm_host; struct sdhci_cdns_priv *priv; struct clk *clk; @@ -376,10 +385,10 @@ static int sdhci_cdns_probe(struct platform_device *pdev) data = of_device_get_match_data(dev); if (!data) - data = &sdhci_cdns_pltfm_data; + data = &sdhci_cdns_drv_data; nr_phy_params = sdhci_cdns_phy_param_count(dev->of_node); - host = sdhci_pltfm_init(pdev, data, + host = sdhci_pltfm_init(pdev, &data->pltfm_data, struct_size(priv, phy_params, nr_phy_params)); if (IS_ERR(host)) { ret = PTR_ERR(host); @@ -397,6 +406,11 @@ static int sdhci_cdns_probe(struct platform_device *pdev) host->ioaddr += SDHCI_CDNS_SRS_BASE; host->mmc_host_ops.hs400_enhanced_strobe = sdhci_cdns_hs400_enhanced_strobe; + if (data->init) { + ret = data->init(pdev); + if (ret) + goto free; + } sdhci_enable_v4_mode(host); __sdhci_read_caps(host, &version, NULL, NULL); @@ -461,7 +475,7 @@ static const struct dev_pm_ops sdhci_cdns_pm_ops = { static const struct of_device_id sdhci_cdns_match[] = { { .compatible = "socionext,uniphier-sd4hc", - .data = &sdhci_cdns_uniphier_pltfm_data, + .data = &sdhci_cdns_uniphier_drv_data, }, { .compatible = "cdns,sd4hc" }, { /* sentinel */ } From patchwork Sun Mar 12 00:44:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 662528 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C80CC74A44 for ; Sun, 12 Mar 2023 00:48:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229912AbjCLAst (ORCPT ); Sat, 11 Mar 2023 19:48:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229909AbjCLAss (ORCPT ); Sat, 11 Mar 2023 19:48:48 -0500 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2060e.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eb2::60e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE2E8196A1; Sat, 11 Mar 2023 16:48:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DeWdoOR0K/FrEe5rBmcdsDbIhghpqJ8QjYJMqhsBCHeS6H1RxmFY5x+0qK/H53pvNMDdbk8VkL5oqdiuZe4ShshyhMBu7darrbIJmvxBKhu11mcj2r7oGLoETKc5DHWULoOowMVmVpcCh3GErWq8ARzbjKL0X/5m4gBWCjdV3McF0icRjD/HqBFQLsPcABjIrxaEyF6uKMsiWZvuqUKpaRCUyDp7B/yW9c9kMfItdnHwS7UH/UxjSYEo1J3bSm6v4Ws6KHclwlcFbyp170AHeMqe/OcLxZNvmYeYMTr8eCs+/gyxc5AIpAg1kaH5dSr0Ue3ef6lzCiKCUmyFrKtOIA== 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=ZVI1OZZMPiHNVrQddAKYxgPCAkOIkTxwqmQwe+IEi90=; b=WpwwkPLNRWwNk2d6QAV2RH1X2JTkdUwHeSXVadf+jgR2eOtX+h+GkEFvx6/LyuYMvJL64vHo6200j1D7bNXEdtxfmkDTeR5LKplbBqptkWUpd01ua8D1cUStS2C6G74dNu2aCO1Fc2qIDPrZhj0+LZM8vqCHbB6GNN3billkmiyHaDS+/rBels7sordmUS/5GD/ImogmugLEkmt1dVv+VVZc3AKLaSyB9PV5OFY6q7Jq4Bpn4CVEvW/tD2mCVhoyJQquNyhUsBzRpwo/Ds/N9wSPfYZxw4dRLxmt/3iiy0LAyNSJFOBw6pEaNCNV94DPymuCO8viBEs/kEnFtHKEaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZVI1OZZMPiHNVrQddAKYxgPCAkOIkTxwqmQwe+IEi90=; b=ANi6B1DGUqhOD1ldVjrXsy4vxllsCqsrk78yVysEvPgo6FwCFh6CYflxIkMoUXFuItK5S0nLLnAnkfCRqksnaOynyxxph5B5Kigtey1NWdFWNTUPCuxr3KvCTltsvFoGZ9xnYWwbRLXCdfOXmdxwD+RDAt0ZPtgeCCFKBYoCwwg= Received: from DS7PR06CA0025.namprd06.prod.outlook.com (2603:10b6:8:54::31) by DM6PR12MB4332.namprd12.prod.outlook.com (2603:10b6:5:21e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.22; Sun, 12 Mar 2023 00:47:16 +0000 Received: from DM6NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:8:54:cafe::b9) by DS7PR06CA0025.outlook.office365.com (2603:10b6:8:54::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.23 via Frontend Transport; Sun, 12 Mar 2023 00:47:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT060.mail.protection.outlook.com (10.13.173.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.24 via Frontend Transport; Sun, 12 Mar 2023 00:47:16 +0000 Received: from platform-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sat, 11 Mar 2023 18:47:12 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 14/15] mmc: sdhci-cadence: Support mmc hardware reset Date: Sat, 11 Mar 2023 16:44:44 -0800 Message-ID: <20230312004445.15913-15-blarson@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230312004445.15913-1-blarson@amd.com> References: <20230312004445.15913-1-blarson@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT060:EE_|DM6PR12MB4332:EE_ X-MS-Office365-Filtering-Correlation-Id: e984df04-d42f-4443-bc58-08db229353d1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IyE9HPV2A3HKt1nx+zo5k5cZI51NKBsrGYsauZjja3a6RJ5cxco4RsELsBwNtRsPEGZQSo7vFQXYF+/kny4hNoutJfH4pVW6fIV7E5Do6BO/Uf3ocNg9wXkcQD2pdMDB9CZLAv6wZJvp4MOYvpi2q7cYqSfXa64T+7jIuDQallbDsx5jzLcNtXvszq+lu2UntHQMywj89gg/bvZo8tTVjnbIEL2XeAQnn54Dtnv/vAvxBnwOpj0KRmTF+H/8qRW4j4Y993ti08/J8hroS6DOU73aEYWuXN0hqnj8dYId0GUrz28yNjyjkeA97rqx8sOxKBnni4TXambGp4SRD282JNHaQ6YScUnHUq8gW4eV/2imqn2nl2qGYMDqif3jCVkTcBZSBwDhJmIdtHWa0b4QvRABLs8Ws2AVdtLOMFRMe8J1oOh6vK40sY+DsxSD1fcaX7VopWfh1WEjWUej4MZN0A44uyvW1bttA74BrjXOy5ipeOnujWygGVcpoystNZ2WbPbra6V5PtgkEW/s3JtEGnG6osBaXeKk29jJ3ZdpJdUdBydmjLw6Uk/zgZ/RC4i878ltL/2WrchtdcjTQBT7cy8Krz9Xncv2h+VobMIAZi7POXbrbdXOtDL9maLSs20SW27+gKTG78CelEHIxUv+9uOreirdHNMlmD8JHJSHd84sNSbAfGNyi1VyQNGkGWP2IcGEzDM9sMFoS/f1z1boNrwWLvop7+6Hop1t1M1nUe0= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(136003)(39860400002)(346002)(396003)(376002)(451199018)(46966006)(36840700001)(40470700004)(186003)(356005)(2906002)(16526019)(82740400003)(26005)(1076003)(2616005)(81166007)(8936002)(5660300002)(36860700001)(7406005)(6666004)(7416002)(6916009)(336012)(426003)(47076005)(40460700003)(41300700001)(4326008)(8676002)(82310400005)(40480700001)(70586007)(70206006)(36756003)(478600001)(316002)(83380400001)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:47:16.4067 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e984df04-d42f-4443-bc58-08db229353d1 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4332 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add support for mmc hardware reset using a reset-controller that would need to be enabled in the device tree with a supporting driver. The default is disabled for all existing designs. Signed-off-by: Brad Larson Acked-by: Adrian Hunter --- v9 changes: - Previously patch 17/17 - Changed delay after reset_control_assert() from 9 to 3 usec - Renamed sdhci_mmc_hw_reset() to sdhci_cdns_mmc_hw_reset() --- drivers/mmc/host/sdhci-cadence.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c index c0024d1e69a8..0d8db1a54729 100644 --- a/drivers/mmc/host/sdhci-cadence.c +++ b/drivers/mmc/host/sdhci-cadence.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "sdhci-pltfm.h" @@ -70,6 +71,7 @@ struct sdhci_cdns_priv { spinlock_t wrlock; /* write lock */ bool enhanced_strobe; void (*priv_writel)(struct sdhci_cdns_priv *priv, u32 val, void __iomem *reg); + struct reset_control *rst_hw; unsigned int nr_phy_params; struct sdhci_cdns_phy_param phy_params[]; }; @@ -455,6 +457,22 @@ static void sdhci_cdns_hs400_enhanced_strobe(struct mmc_host *mmc, SDHCI_CDNS_HRS06_MODE_MMC_HS400); } +static void sdhci_cdns_mmc_hw_reset(struct mmc_host *mmc) +{ + struct sdhci_host *host = mmc_priv(mmc); + struct sdhci_cdns_priv *priv = sdhci_cdns_priv(host); + + dev_dbg(mmc_dev(host->mmc), "emmc hardware reset\n"); + + reset_control_assert(priv->rst_hw); + /* For eMMC, minimum is 1us but give it 3us for good measure */ + udelay(3); + + reset_control_deassert(priv->rst_hw); + /* For eMMC, minimum is 200us but give it 300us for good measure */ + usleep_range(300, 1000); +} + static int sdhci_cdns_probe(struct platform_device *pdev) { struct sdhci_host *host; @@ -518,6 +536,15 @@ static int sdhci_cdns_probe(struct platform_device *pdev) if (ret) goto free; + if (host->mmc->caps & MMC_CAP_HW_RESET) { + priv->rst_hw = devm_reset_control_get_optional_exclusive(dev, NULL); + if (IS_ERR(priv->rst_hw)) + return dev_err_probe(mmc_dev(host->mmc), PTR_ERR(priv->rst_hw), + "reset controller error\n"); + if (priv->rst_hw) + host->mmc_host_ops.card_hw_reset = sdhci_cdns_mmc_hw_reset; + } + ret = sdhci_add_host(host); if (ret) goto free;