From patchwork Sun Mar 12 00:44:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 68229 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp516899wrd; Sat, 11 Mar 2023 16:56:53 -0800 (PST) X-Google-Smtp-Source: AK7set9fKxFcxuW1BotuFcNIQ8UdjYHsA3OUP/QDmrCqN8bThDyLD4F5PKiV3DAcQqQh7xti2UWL X-Received: by 2002:a05:6a20:8f27:b0:cc:65c3:c8cb with SMTP id b39-20020a056a208f2700b000cc65c3c8cbmr31600022pzk.42.1678582613471; Sat, 11 Mar 2023 16:56:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678582613; cv=pass; d=google.com; s=arc-20160816; b=KJi28jWjf0tF5NTuu3vY4pYP+jSpf18XrhWgST4AF4GvjeiFHs0uDB/IzHYb9qUPME PQWGCx4a/VpPlisAg8tN2SE7+1MXZeshdB3gAOfRboSbGfHiy1IJCfgLFUQbuVINDSf5 VqVBs1Ldms0FruNsCMH7yK3RvGRkb7RZ7P8Yr70YMQkI5dhpHutbZ02luasl3V1j24nw LasShE7RUNwGzoLKUIp+gxXhWRx/PSDA84YprWcdiYSt6qsDCJ+yoBejYUkyAkf3GNsF bh/WFM5IN/711NNPfmnUdvuEpLmfedoZKpJvQd1X7lIUwF+tTWEFKxJ1rtsumoBfFqRC UQ7g== 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=dy28TcdtatfE39iP7KmaaFwO5+MCnCgUUyAylO9Y+RE=; b=Qw9soBT3u7VHADRsk/f9BIKihnOZ1WD1gy3qQH2/7Svipx3gH0jYy9TgTo/7lIPB14 FOfnC4NkvoEUxi4S7HqjURAwIa5jyWHvKFDNQCf/7aJEV2QhtxS4V07WOFfQLfmcjITL ah2VdHrcpnof9z05GIMQjfQNW4QAJMWKkmO5lsIFE0HQDHqXtoaa/i3RhNmwhUkSDrdv gwJYm7HqbOI07SpUedYASpnsA+g6e8A+C6v58Rgch+CzTCnarEbXQNo4GBAru6QqLWbu ByIVz2ZFfH71rRqugTudD43nMABMS0nxGR+3onuAwbSUvWl+7yeapaXbh2q1cuH1Rd9W oV9w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=dvCjAYyQ; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h3-20020a654043000000b004fb9559b9a4si3020966pgp.741.2023.03.11.16.56.41; Sat, 11 Mar 2023 16:56:53 -0800 (PST) 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=@amd.com header.s=selector1 header.b=dvCjAYyQ; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229604AbjCLApQ (ORCPT + 99 others); Sat, 11 Mar 2023 19:45:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjCLApO (ORCPT ); Sat, 11 Mar 2023 19:45:14 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 805283D089; Sat, 11 Mar 2023 16:45:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WM0vG7vnzjbum6UAVlysVDLKBIJ3SOwZzfBQhtAigXqjd22C7cdbAa203NHgss8cuFZDIsV1uZpD5SteWj8YzpHGzu+cKfbZI2cTBaQeDm6LVpMLhc7W6A8ZX512uXY2j3HwCcduL0DIhdE+oo2OgQTm0l/u4G6UGLRK8q9lXTq0k7wPgBiS24WQi7vdI+4qVs9QUqBUqiIkNczY81IiBzW5QhyYwCrnnNtxcwDw9XNkefvOSjk5Rtjo/QEi3zcGl254nxJ0gZ+oo3m8foPw1pSznr7/4JFwn6i3ia9J6ft5S6JNnxFv0AN8SpnF3sJiXWvNVQgE+hJnDuWfB3r8Qg== 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=dy28TcdtatfE39iP7KmaaFwO5+MCnCgUUyAylO9Y+RE=; b=fzXwHBacNy+eXODEDRXHaSNEC+pJpPhckkDx06Tzbnmze+D3lMJpm2alCSH1pNFzDPFnvO/dlH5PFU8N7EVE8QP13ECVD62pz4uSkA0oH+x+8XqcRohq0y4U/3CGke/GlShREouGfyQ0G4mYprZnyb8GzzTn0+ODhQYgSEvRkyZFLXULG3lMIL/V7rCmD5bUxKP84S78bXs0HXJNjFSnXVkhg1muS5/bEgHCIP3pcoyeF1S56wbt6aylYDluLQ+RkXFoa6y3DR+IwpYubyOsVaGH2p63zho0FgwyiZ5PKX7LKy9mMuH8EGF7X5JPz3NXFIE0qClRd5JIcJ79XnxU2A== 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=dy28TcdtatfE39iP7KmaaFwO5+MCnCgUUyAylO9Y+RE=; b=dvCjAYyQpW//XCEVHmnJCMQPNoKhQukm3kt18Wyjl1nfphyjKc85GgDpCJdFrFPMikVa4gqHu0pdgDRUMfqdHh2A/sAIo+KPwcgyLLGP9KCPHlYKOWk5DDxjYXvxRxX7+stqT3hgk19Ok/nXE6RCfAuAOmycjVpYTf8bZkLYRIk= Received: from DS7PR03CA0313.namprd03.prod.outlook.com (2603:10b6:8:2b::18) by DS7PR12MB6071.namprd12.prod.outlook.com (2603:10b6:8:9d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.20; Sun, 12 Mar 2023 00:45:08 +0000 Received: from DM6NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2b:cafe::6a) by DS7PR03CA0313.outlook.office365.com (2603:10b6:8:2b::18) 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:45:08 +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 DM6NAM11FT053.mail.protection.outlook.com (10.13.173.74) 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: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:45:05 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 01/15] dt-bindings: arm: add AMD Pensando boards Date: Sat, 11 Mar 2023 16:44:31 -0800 Message-ID: <20230312004445.15913-2-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: DM6NAM11FT053:EE_|DS7PR12MB6071:EE_ X-MS-Office365-Filtering-Correlation-Id: 066bc509-0af3-455d-defd-08db229307a0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wyACqOaB3pE6HCDkKR5FKPwFuKCpT5g82WfoiiXpJXID8+QTjHD9Y94pH9qe3CbFj2oKwZAYXRg2Jxai7hTBTUcDxfxbxdUlLnrpf4eK7/RvFN3zN544plV0KAWv5Ac0amWzgX+Orvj81T4kJrjN4BPiVSOu68DF6IqOJKjI7I+dm7hwu1CYeDl3Fy1jFcg14YGsMlM6rDtBDthpeJ1mevjAxpWEEkLEkwDtJhgmNX/sZfeLYaZ2Rh9YbP4Py1xQBXD5QTFfcYQUnOfixGIzZ54DD8gYFrY0o4R0osEKX64ERDz66H8GtDAcKv/7vq9eBg2P2So7U2ipckCij1mjj7oiX2oKz5SxEKR/j1BIJ1hFAaL1h6wZyx31VmzAZYDWSdbGuLuqG35R0/6h8CpJiC/Wy5BMColglhtLalIeYFJpV+oS0447inJRBrNXyve6dhZmiVMBtH+imsioDf/j4/HxP2zX/kTNeeegoMOenthCdTRxLYuZoeZiFqTQJ7w6xNVbFH3bmjXxi47sR5WGTVQrj9fjjpKDlXA4jj11c/2f8VRI9fNJZ7s3oxyfn4FKJ3+Bt3FnHOmMLvekN4/ZjJsTLi3bNEdNNQaNKMBIfXIdY8axaTthsrhgCphO45KUzedcfdkWGcMqvtcb+/5IuRpwUQKz/zU1U3u87MoUm+tbcZlJnbXSCdbSOAaiOxMWtwYsszn5cFP6wz3F0Vd+SyzHyCDSIeolWRIk+bRi2qVPdmpxHLE0/OduRnoO+cCF3f3Di0xFrDrzJwI7ISIY7A== 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)(376002)(136003)(346002)(396003)(451199018)(46966006)(40470700004)(36840700001)(36756003)(426003)(47076005)(36860700001)(6666004)(82740400003)(16526019)(26005)(8936002)(1076003)(186003)(336012)(966005)(40460700003)(356005)(2616005)(70206006)(41300700001)(4326008)(6916009)(7416002)(2906002)(7406005)(5660300002)(70586007)(8676002)(316002)(81166007)(40480700001)(478600001)(54906003)(82310400005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:45:08.5796 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 066bc509-0af3-455d-defd-08db229307a0 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: DM6NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6071 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=ham 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?1760121442268014761?= X-GMAIL-MSGID: =?utf-8?q?1760121442268014761?= Document the compatible for AMD Pensando Elba SoC boards. Signed-off-by: Brad Larson Reviewed-by: Rob Herring --- .../devicetree/bindings/arm/amd,pensando.yaml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/amd,pensando.yaml diff --git a/Documentation/devicetree/bindings/arm/amd,pensando.yaml b/Documentation/devicetree/bindings/arm/amd,pensando.yaml new file mode 100644 index 000000000000..e5c2591834a8 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/amd,pensando.yaml @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/amd,pensando.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AMD Pensando SoC Platforms + +maintainers: + - Brad Larson + +properties: + $nodename: + const: "/" + compatible: + oneOf: + + - description: Boards with Pensando Elba SoC + items: + - enum: + - amd,pensando-elba-ortano + - const: amd,pensando-elba + +additionalProperties: true + +... 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: 68237 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp522407wrd; Sat, 11 Mar 2023 17:15:59 -0800 (PST) X-Google-Smtp-Source: AK7set+gXSdWlUHk7QbxZ2pd8XuR3nC/kMD7Mlj3bd7l+YZzCxP+3pxHTNvwOhsUyKKoU2AaSMUT X-Received: by 2002:a17:902:bd93:b0:19c:be03:d1a3 with SMTP id q19-20020a170902bd9300b0019cbe03d1a3mr25548487pls.40.1678583759619; Sat, 11 Mar 2023 17:15:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678583759; cv=pass; d=google.com; s=arc-20160816; b=y0OzWwnt8Y2771S6d/EkeHcyLxW8C2e3RAP86FuMRxT0kEnn1yeB4tABB4MXljx08a vSRkhudTKivG853WWwXe138thVtF71CbYJvGjB2ekDZd9nBZyBPnpJQgnwfhYV6jscm2 BneFV2xaWiQkzrJ1vxx2IwHsqMoEkmEYyWnVj4N1jrBnn0ubsWoWzWHs6wo+z+3I2uma iMi2coWJRWQSd6rPVUjFS7sNKZQj4v5R3gLlhVVnN7OCUyksC84md+wmUCtEvYXwqBBn LwH47ehmeXZdHu15i44c5c3Y/j6fraye9CN4ejXjZXyBVcBgVu8enEO5KOSM6ZrKPBqT zs6g== 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=xxxkSNpbyALd5CL9TnC1zavQ3gq/W90Nja6dE98DxFs=; b=gPLDhUAoOrIZDyWok72o6C9VJ9Y/9gZGNW6JLIcflu9KLfDNCynMujF/Ac6fQLNOg3 GVYsUiA/OFF8Fsh2zPBjePyTSD3JAkBudlQhvH4VXogZfdCbpvbdFsQBtr2iKCJCvbtf eMeL4oLIEGs/707w5tfYF8oar6ytv4tYHFTd7bynBoWSInhv+E2564fYvY0btuc7wzYR MRp50QjFcUxBypfFZGR5f1iqEflcUFGx3emWEdFsoyFdbynXzG7qjtWQqA4UtRsM6i3t 6Vmg8CAQ07k14yA+dwVbVPLkI37VilC3bU2HObcZ/O1184hhiBiS+BJPnw9zb8Zxf8SI 9pBg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=3DwMdD5S; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lg13-20020a170902fb8d00b0019f243b2dccsi2494457plb.415.2023.03.11.17.15.44; Sat, 11 Mar 2023 17:15:59 -0800 (PST) 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=@amd.com header.s=selector1 header.b=3DwMdD5S; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229562AbjCLApr (ORCPT + 99 others); Sat, 11 Mar 2023 19:45:47 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=ham 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?1760122644451701673?= X-GMAIL-MSGID: =?utf-8?q?1760122644451701673?= 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:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 68234 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp520831wrd; Sat, 11 Mar 2023 17:10:29 -0800 (PST) X-Google-Smtp-Source: AK7set9oKiIOY/QnqtTNhG7lByLXN/kPtF/MLXk4cPBf24T/6qMM631BqGb+lBeO3mFxGLdDbUqB X-Received: by 2002:a17:90a:31c:b0:236:6a28:f781 with SMTP id 28-20020a17090a031c00b002366a28f781mr30501088pje.22.1678583429673; Sat, 11 Mar 2023 17:10:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678583429; cv=pass; d=google.com; s=arc-20160816; b=O5j7mJ3A/aMYPr0ih/6xwNLPCOef2O9OJIjN2iH8ccGrvPm1hujpks8h3nKH09D3eF oWXhaLhT4EdHwK8h6B+CLtAoHrx/5sfWM67HZIpMsqY5HzDMlZJncvgvTPWkRSvZHnOi /FPjI/+NnNz+bTSgP3uYqLdIp/vnHfIYKclREeJrjsFSa+1iVH9FX10YkWRfSUudl54d dOWYC406luyJ/WIGHiLGWQS//IAONamXgKBwvzL3qE/qILD1+RvNAgi1L5LY17WJ54cY dy6KhbGPBAkepc6uKRSZu//yIzFMK5YKx9jx67kTqAsBsxMIYA7E54hhwSTAOmQBRgsV 2GKw== 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=z/28g7A90X4yGafo6uL2pTeN1XvMkrQG1dvwvegdlS0=; b=m9TiHroa8DyY96kX3ETcL5s0EviKUV8OxwfK2hvPAntpoovOWTVyZ3kRnLg7k6w9ce ySZ9DZeA94pcyOpHPVF1lJgRBGF9UUpfYJW8FSAb9alvkhkVKzchtFprAGOSSVvCe23H byyX/3z2GyZBhB3dhTv51zyNZe/MF0Vbc1kouAyNIOOd8Mahxf6W30QWXviTqQiBEhqd Ds95DKOTE29aj52R+EdSGbPyYucGl7Uy0S10C4iTWy1q9/2lf146EEvyLupUbdafGhVU 2hQZ+q2qC0NxVsFm/ozpSV+DAK9mzTfy6w+q3OzQERVHbMPaocNMFpctjEVUPiH9E1d1 fOgg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="T7N6/j+Y"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l63-20020a638842000000b004fbe9c0d3c8si3114111pgd.692.2023.03.11.17.10.17; Sat, 11 Mar 2023 17:10:29 -0800 (PST) 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=@amd.com header.s=selector1 header.b="T7N6/j+Y"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229643AbjCLAqG (ORCPT + 99 others); Sat, 11 Mar 2023 19:46:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbjCLAqD (ORCPT ); Sat, 11 Mar 2023 19:46:03 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2073.outbound.protection.outlook.com [40.107.94.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94F9A43907; Sat, 11 Mar 2023 16:45:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Osj8j5MwYROr0GO68CwlaPd4RDrT1mMo87CO2mrLIkZ19cZuJiXaKWAdLmssxxw60W/gFNU/jN6kAJnczVMTcPdJzqirNUIHiNM44pRbkWYk7DtTFZgTH6hD9iRLcYTk/4jwuVY3FF7fLSPdi9nzhe0XMNmOqUr7xPvxXKL9C/+SC7NHKYVuMQ6cDYT9+VuaDdozCCWz/iszdaekrz9uLS9T5vTOh+A+gt3aCehUL+hH9jqhztI7rVISEOaif75o+bYb3uoAGKUi2XCtsoR8BkWP8P2iUORJR976sFICiP8Qk6vjytySqRQL/CkfH/MYfJp9f0meExydaqizDUg6Vw== 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=z/28g7A90X4yGafo6uL2pTeN1XvMkrQG1dvwvegdlS0=; b=l+IFFf01TersyK8G2v1xBx0WFMy9ir4RqSqIsKdsz6g1QZYXZquRsy5H+dgXwiXRsZFiaqtIi4+vVLec2nfNjSkMk7qUP8R6clQCFRYbBS7rpa8VHPTdpdUUMtBeeDLjgvZ35OoGhhtjePr/IuLvf9foA7j0EZftGzLOedy04+wgd5B+Rs5JINLjhI7yzAHMgH7BhanRqSiakjVdLtmxD3o+bkROzdVruvxu5eKZIKsoR0T35g9gsgNmtbytdqCBGgaWWMsS6LkzSLHLGZ1GSaoujGi6obC2pcN4JkR/fnZjY1qLvsTupFxcrKMuAuoVOf+BKncgH+3NOP4gJsOsqQ== 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=z/28g7A90X4yGafo6uL2pTeN1XvMkrQG1dvwvegdlS0=; b=T7N6/j+YhwUcD/s/WZ9C6xSuyhXRNuPwzX0Hn/izwymLX5XIqQllTQiPxZ7kpXItz66ORLPmypelUZcDNID260cvkUbDUzryzs3rcrvf5M6sNoU9+vyQ/ku3TKInlLj5gs7LiRW2pwBmKuN3RYCoxRA8XUxVu/NiPr6Gx9BopiM= Received: from DM6PR07CA0047.namprd07.prod.outlook.com (2603:10b6:5:74::24) by SA3PR12MB7832.namprd12.prod.outlook.com (2603:10b6:806:31f::10) 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:28 +0000 Received: from DM6NAM11FT030.eop-nam11.prod.protection.outlook.com (2603:10b6:5:74:cafe::e0) by DM6PR07CA0047.outlook.office365.com (2603:10b6:5:74::24) 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:45:28 +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 DM6NAM11FT030.mail.protection.outlook.com (10.13.172.146) 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:27 +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:24 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 03/15] dt-bindings: spi: cdns: Add compatible for AMD Pensando Elba SoC Date: Sat, 11 Mar 2023 16:44:33 -0800 Message-ID: <20230312004445.15913-4-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: DM6NAM11FT030:EE_|SA3PR12MB7832:EE_ X-MS-Office365-Filtering-Correlation-Id: a4fc0ee2-d8a1-4df6-e7dc-08db22931317 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w+Zz0CgyQu/iD4WmftVX0PG9i1mwHQ1/s4IXfy1p/5dctybKFDG9ucQ5zwGEH5yDYfnzCLG8YR1lygNcxTL4XKr3ljvgK7nPheiK89H+X66UOXvqeF6cYEqI6JdUn8Kkzusmp9goJMk0NBVrzFSmFSTzsj9NmhdjXoCxIvsGk/mbeF3Blp7xmJOd4n4ourxsWcVjq6RCOeOGlvpaOwfHmAB1ZjfLMp4mXo/8/2j2rJkruIKmmwc1dk0L9RIV7bVE41um3/bWCaByLT48Ly/I15slc+N2W0uvAi5VPT8KRRjBU8VEgDnDVN6EaofVliT03Af7/4rpOAEmgGQAPXFactZZ0dmTzYf9I+aggfPKI/0/+rpqYGZrj6AW8DBp2M9hQkoKVw9ozOjY+0wNC4gF5uuHkG3EXxh2BZxj67DkUpaM8XepKDxJuBCprhOCuIN/hjz+FpHmK1hHpheOJGI1xzE7M5lzmwpUd/ZoSbEGab8p5vDRp6KYIKITnNnc/xwrNm1e5vLI7kfYk+Cm71ZhglEpm/GvIFDs5mlGgN6YrpgBrPDDYrrESAX7cnjGSwSvjRYTmCIXP5Sq+IgTNse5D5G7q8fh9O+Ri06ohvpxqU2vZH93p+z7eI3of1xLRgdXRot1C9uA90wkPRtESDip1VAA1ai2K3alHgt+NAMegjeh/vboLYFor5m9hkIU+Vg1n/GBxohpaoztUekDOcDlAAc/S/SLvzn/saWyTzXUeRU= 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)(376002)(346002)(39860400002)(136003)(451199018)(36840700001)(40470700004)(46966006)(40460700003)(41300700001)(54906003)(478600001)(8936002)(8676002)(4326008)(6916009)(70586007)(70206006)(40140700001)(356005)(82310400005)(36756003)(40480700001)(36860700001)(81166007)(82740400003)(316002)(1076003)(16526019)(6666004)(186003)(26005)(7416002)(7406005)(2906002)(5660300002)(83380400001)(426003)(336012)(47076005)(2616005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:45:27.8146 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a4fc0ee2-d8a1-4df6-e7dc-08db22931317 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: DM6NAM11FT030.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7832 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=ham 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?1760122298784554505?= X-GMAIL-MSGID: =?utf-8?q?1760122298784554505?= Document the cadence qspi controller compatible for AMD Pensando Elba SoC boards. The Elba qspi fifo size is 1024. Signed-off-by: Brad Larson Reviewed-by: Krzysztof Kozlowski --- v11 changes: - Removed redundant if/then for amd,pensando-elba-qspi v10 changes: - Fix cdns,fifo-depth, only amd,pensando-elba-qspi is 1024 bytes v9 changes: - Add 1024 to cdns,fifo-depth property to resolve dtbs_check error --- .../bindings/spi/cdns,qspi-nor.yaml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml index 5c01db128be0..6e67de9da293 100644 --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml @@ -20,11 +20,28 @@ allOf: required: - power-domains + - if: + properties: + compatible: + contains: + const: amd,pensando-elba-qspi + then: + properties: + cdns,fifo-depth: + enum: [ 128, 256, 1024 ] + default: 1024 + else: + properties: + cdns,fifo-depth: + enum: [ 128, 256 ] + default: 128 + properties: compatible: oneOf: - items: - enum: + - amd,pensando-elba-qspi - ti,k2g-qspi - ti,am654-ospi - intel,lgm-qspi @@ -48,8 +65,6 @@ properties: description: Size of the data FIFO in words. $ref: /schemas/types.yaml#/definitions/uint32 - enum: [ 128, 256 ] - default: 128 cdns,fifo-width: $ref: /schemas/types.yaml#/definitions/uint32 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: 68230 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp517820wrd; Sat, 11 Mar 2023 17:00:36 -0800 (PST) X-Google-Smtp-Source: AK7set8hQA5IiBBWiD3AmrkeYaCov8AVf+Jo3P1AkE8x81AmUMVndqtnnldMEfVYv6Ihs3j8IZEw X-Received: by 2002:a17:90b:3a84:b0:237:161e:33bc with SMTP id om4-20020a17090b3a8400b00237161e33bcmr30880429pjb.16.1678582836525; Sat, 11 Mar 2023 17:00:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678582836; cv=pass; d=google.com; s=arc-20160816; b=hvqBR/qC8KSyYtjKarGZe3HT8O3uzULyc5hrmUBG2PtOXxiItyaKkyjNNRLe8u1l70 Mvl+jA+Ire3muAMpHuhWNZEFWnYGNFKjr1YYlbtyV7yTXzIoddUKW2tZ4hdYcUK07hAA D53J0l0MDntX4SAeqH8axRpj5PtbTc5LKNXxx4Te5WWMT5H/EUHpfxfx52FG4Mzv2QrI D8FYObbeNWYtESK+yptPomFgwJd0QEFsbD6s55Cn6YpG/H30Uq1UJ8Vm2l1i1YTXrlpa /Hmg8SJ2Ag0OzxqBS6f5FLhiaDWwmYmpB5sviIIDhcltd/6jmznaKnmyTz9fvIA3Gqos NLNQ== 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=rJ5Jpf1p3ZxiQc/sni8YZT8EIdM+0r26BcbMOk9WPmk=; b=ed593FLpfvgNiEXcdjyRYr97i+6GdKeOfqdZjMIXBt9xYYzTeNql3XPiKrOVIjHXyW FM21oFrzF6LVMM2PaQG7hxFA9qRwQqSSj6NMGoTxJN/NPRFZXxSrWpNIPCdXjlfN7w1l nA2tXAwo8oQw4W+IS2XV9m6ig9KcHo2YNxWXv5Q0rpWq5iFeE4Smi47yJct5lYtv1SFk CIefJls9UkxXDb1rnnO/vYJwVm021egYyquvPar5oR5gUTKvIFAKwti0OHqSD4rGAgLG ciGsmASd3GZMZETFzjFzEieFMWK3Swcu2LE/eAnQ45erNPZwoYwSChHgjbYZGhfyc5+2 fIpA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=0HcSwOMx; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a12-20020a17090a8c0c00b002376d8568e1si685765pjo.114.2023.03.11.17.00.23; Sat, 11 Mar 2023 17:00:36 -0800 (PST) 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=@amd.com header.s=selector1 header.b=0HcSwOMx; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229722AbjCLAqY (ORCPT + 99 others); Sat, 11 Mar 2023 19:46:24 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=ham 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?1760121676310179366?= X-GMAIL-MSGID: =?utf-8?q?1760121676310179366?= The AMD Pensando Elba SoC has integrated the DW APB SPI Controller Signed-off-by: Brad Larson Reviewed-by: Krzysztof Kozlowski Reviewed-by: Serge Semin --- 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:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 68239 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp523082wrd; Sat, 11 Mar 2023 17:18:33 -0800 (PST) X-Google-Smtp-Source: AK7set8Get8hEZtT8YeA2Bw+/MBPRV+puUc5RD89fTQLMoMYhzFHc7sXbETrN/7QmAz7mv3EWizm X-Received: by 2002:a17:90a:bb8d:b0:23a:6d16:8e55 with SMTP id v13-20020a17090abb8d00b0023a6d168e55mr29713747pjr.25.1678583912798; Sat, 11 Mar 2023 17:18:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678583912; cv=pass; d=google.com; s=arc-20160816; b=sNUQV2oVeg4gxz4R5iARWN99vtkzk7h2RpWmIfjchd75hULQaOKbdosofEcEuGLv9g 6ySYWP0seOXX4CU1UOc7U57ZPKQWYgKw1uAYSg9Ui9064ynVLIVfwXVHMpS9B6Echzqk zMXwayPOqA2XCE3b4VJsCqOv+VN5dvqQ9LUBovHo1wxgCV4aHnNRGSkpSSx/XqxPmhRE wUa6jJ2rX8CFaeaIPpcdoR0M7brnE8DQ+t0MvDxWTh4PCwAs8Yra6cuxZ0TUWuqMULiz GxUiThKK2znb0Fi6KQg1dwf55R6kQGfqQggU6uX6hej47VPJ12ucxnX0xf9h5tlZYV3h kWwQ== 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=Y88ZbnKwrNnX1dSYtP1PBGCpE1AovtC5p4MNU04lszM=; b=wsDHqRTRp/Mq1zUZoG0v/zOAt686H+CLTyTb40og/EkrVVDSxX+8UGlKkWf6ASMStZ Ps1I9y1TV9D3lKN4B6U+lfQEhsN6fqXEwfnSD85mNyFE589czjHW5g903W/y6Hb7a/jC pDUvcmBXKgJ7DzdFCM+aUVK+u4DW9tlNjCfrQFCPWJDZaTc0U9s2I4ZDIXePXWXCVgGq ZI18V2EAtGJSshYlj2YbVbrt19b8dRSDe1kOTAUYTdB4RoC0Wor/d1g5UZ9CR1RZsW97 Pm5j7VupUg03pfJ6W6Y1vPdXPE5k1kUZDpHuzaVCXW+wtLY98lFMRF+C/mOkvoQ6MA+n Pb0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=ogplBjKm; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o71-20020a17090a0a4d00b0023448df0ee9si3124884pjo.3.2023.03.11.17.18.17; Sat, 11 Mar 2023 17:18:32 -0800 (PST) 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=@amd.com header.s=selector1 header.b=ogplBjKm; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbjCLAq1 (ORCPT + 99 others); Sat, 11 Mar 2023 19:46:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbjCLAqX (ORCPT ); Sat, 11 Mar 2023 19:46:23 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 966F36BC17; Sat, 11 Mar 2023 16:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dPB9/x2QLQOWFbl1qh7AzWllk8H6MZwFYV6Fm8qTW61+YenkDgi8DxhxZiQ2yepJMgDa+AyyZdFsX+eA9SNrYCKl0EqI1YJ0grSu5X0k+RgLLtHLEgB8J8qIJFw6auh4e45EyUKNJKkFrrZLwtOPUgP8HlyKGCzv5W+CgAtCBdeYvm0mPUMnLX1MyN9ZoriQJy7sV1IWEWgVP46HEmqX53jBpygi6sg61Vji5WWZBi3ftCiVtKFLAutd24ffWw/SZtYTHpisE5Nex8edA3acIpD6ExfqY7kSPvWi25xSO65FJK4O4WlzGMMzM1sIUEuUmEn2mDeb1ZkRI/25poHKHQ== 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=Y88ZbnKwrNnX1dSYtP1PBGCpE1AovtC5p4MNU04lszM=; b=BTrc7mm/3KIspBM6fm/GVYqyDey/Fpb73o3eUe6FfUrTIoR0oa4SqqbcqZZ6xTVhqhMKfA4c6o3QA7Cw+UaLcWHRyf/zLeH51acqivDzw0yLxFlbMh+JFjNzV05cw0r/Hio8zrWgd1eG9tpmgGtbD4IQ/Uwy8+YB1rRmzwwFCO/CtGf92ql68fHHnMu/yiIUqj8cvqwHMVpc42AIPK3Ixc/TfkEvMMPmQvjj4Oy4/q5751eE+uNm9WLneR+gyc4kt833m1jpmgOdTtTyNsWY7f9YURIFls6iE5W4b2VY02usg1kBAfP2W6zzPA+PjyIXCUoFGhNeZhysefmW1OjW9g== 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=Y88ZbnKwrNnX1dSYtP1PBGCpE1AovtC5p4MNU04lszM=; b=ogplBjKmeKvYoaZTN3WAmP8wTtuN7CEH3mu0+bAC6Q6YFfl5TC0tSW3EEQzvkpjNOpQcilF92mitkzKTOyBl8XKrp0/Hy4jajVuUgkeXeQYDiZK4/+isucIU1KfCSUrU8MzRlrz1COP03h2fdxiy9Wbr3vsPoTRmLnP5JngtCio= Received: from DM6PR03CA0005.namprd03.prod.outlook.com (2603:10b6:5:40::18) by SJ0PR12MB5664.namprd12.prod.outlook.com (2603:10b6:a03:42b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Sun, 12 Mar 2023 00:45:46 +0000 Received: from DM6NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:5:40:cafe::de) by DM6PR03CA0005.outlook.office365.com (2603:10b6:5:40::18) 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:46 +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 DM6NAM11FT014.mail.protection.outlook.com (10.13.173.132) 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:46 +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:42 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 05/15] dt-bindings: soc: amd: amd,pensando-elba-ctrl: Add Pensando SoC Controller Date: Sat, 11 Mar 2023 16:44:35 -0800 Message-ID: <20230312004445.15913-6-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: DM6NAM11FT014:EE_|SJ0PR12MB5664:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b892207-3379-423f-a68c-08db22931e06 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0UXOUyobkiECx7CVndeEvjZqGhC5wnlHNJ8+IdUNBMfbu1Vl/AeaRzgMpeJfc7bbEEhqJGID9nXPHcTmHOw/ygXH+dApGxsQ0s/JWf97V55mvHpzMDtq27FMWZo2yb4NGtHk0Xlhh4SJx1Kqh02Tnl4PX5Nfze9hOdMPzJka8jY2aW7xLztWUxL2yCc1Wg+K1JPwbWQwrYgOLwWHAOpPGSn9JaUHrNy8a78t8qr0xQ8STndvrMp1fZ3+gX74/yPhP/IeMlK2Sz8fPqVPN9OS6pqoehteK5xAxv1DkOZYDXT1ZI72LtUPsm/OvLTdX2e3WTa0AaegUgEH62I3agjXmL9mddeve9jlRwYZmxY0rMPzniGsvA9CC4MVPj8hyYZ3g3vXVpUt1mncD5fBWPR539Uzg58uHTG6sfV3PpM8pMaXNLMwbgtViQFxcD3bwhfrCZUQnmArO5wn0+M/kixDQA3uXg4/E1jhv2M/UHNflX6xI/3kOurqJAGswSjc1d26V8Fm3BtLWDN4ec+GQtj5VBlq9k14QKf4r01TUYlrbS+rtQzettZ27JECN6EBWKVZMHobfHD6FFLopZx7S53fIzJCC7MnzSbnHwRZrBZtdxMD+HMIvj6nmQgAB4pvIO/bsI0bwIzNx98wveKYUiZYVxcxljVsTi1KNI5tXvR1YZF78qOBDVAhHGeIziszClXNopCjGeFRzptp3iggkvpIjQwngTjoNxl20MLKIfsvigqIdSwRkVEay4lbnwPgPhSYO590jMI8ofiFxsIGm75nFQ== 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)(46966006)(40470700004)(36840700001)(82310400005)(82740400003)(83380400001)(36860700001)(47076005)(36756003)(478600001)(40480700001)(426003)(54906003)(81166007)(316002)(356005)(966005)(336012)(186003)(6666004)(2616005)(40460700003)(7416002)(70206006)(26005)(1076003)(16526019)(5660300002)(7406005)(41300700001)(8936002)(8676002)(6916009)(4326008)(70586007)(2906002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:45:46.1408 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1b892207-3379-423f-a68c-08db22931e06 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: DM6NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5664 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=ham 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?1760122804718926257?= X-GMAIL-MSGID: =?utf-8?q?1760122804718926257?= Support the AMD Pensando Elba SoC Controller which is a SPI connected device providing a miscellaneous set of essential board control/status registers. This device is present in all Pensando SoC based designs. Signed-off-by: Brad Larson Reviewed-by: Krzysztof Kozlowski --- v11 changes: - Fixed the compatible which should have stayed as 'amd,pensando-elba-ctrl', the commit message, and the filename - Reference spi-peripheral-props - Delete spi-max-frequency - Remove num-cs from example v10 changes: - Property renamed to amd,pensando-ctrl - Driver is renamed and moved to soc/drivers/amd affecting binding - Delete cs property, driver handles device node creation from parent num-cs fixing schema reg error in a different way v9 changes: - Instead of four nodes, one per chip-select, a single node is used with reset-cells in the parent. - No MFD API is used anymore in the driver so it made sense to move this to drivers/spi. - This driver is common for all Pensando SoC based designs so changed the name to pensando-sr.c to not make it Elba SoC specific. - Added property cs for the chip-select number which is used by the driver to create /dev/pensr0. --- .../soc/amd/amd,pensando-elba-ctrl.yaml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/amd/amd,pensando-elba-ctrl.yaml diff --git a/Documentation/devicetree/bindings/soc/amd/amd,pensando-elba-ctrl.yaml b/Documentation/devicetree/bindings/soc/amd/amd,pensando-elba-ctrl.yaml new file mode 100644 index 000000000000..f1d3ed4f519b --- /dev/null +++ b/Documentation/devicetree/bindings/soc/amd/amd,pensando-elba-ctrl.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/amd/amd,pensando-elba-ctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AMD Pensando Elba SoC Controller + +description: + The AMD Pensando Elba SoC Controller is a SPI connected device with essential + control/status registers accessed on chip select 0. This device is present + in all Pensando SoC based designs. + +maintainers: + - Brad Larson + +properties: + compatible: + enum: + - amd,pensando-elba-ctrl + + reg: + maxItems: 1 + + '#reset-cells': + const: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - '#reset-cells' + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + 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>; + }; + }; + +... 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: 68226 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp514503wrd; Sat, 11 Mar 2023 16:47:30 -0800 (PST) X-Google-Smtp-Source: AK7set/gwJobpokOHWB7IBFj4Q4I0BXhexm4KXUEQnimoHOCowIFgf3SDQwdTvgMNxQ7cmnGDPSd X-Received: by 2002:a05:6a20:4c1f:b0:cd:97f3:25f7 with SMTP id fm31-20020a056a204c1f00b000cd97f325f7mr23158484pzb.42.1678582050370; Sat, 11 Mar 2023 16:47:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678582050; cv=pass; d=google.com; s=arc-20160816; b=sW9xDGMnxmIYQvT2TTKytyXTbvN0y+Wy9/wrkp0e2gx3GCJ2gNOoE4YzwExsysEJVq CFR+gbbSpZFWGgI1Z3WaZl5HoVAezjOeTK8OEPxVtYofcF3s/VEYU+uR9h0TQL/TSGkV r9Tn/sQ0q+YRPUNTy3o4a87mOFGzgm55NF/R4TIeFyeI+1RniYLIinBxFK2A+ReHBAZC bfZQnKzpzKJMfGoz3QbMeXXVgaGVWGFHVXKxm2NxlXy8Hg0Es4WnRaski0q6S0bNrWCo E+T6K5zelM7d2h8YadNrQXvfXyirWnumU9KUwbmsBdDYJgXiCKXHnP+kHFZdA9gOIwfv +k5Q== 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=5d82bpmyF+6P+qy1C97qBN4cXmEmhjcPYdPiNzeQJ4E=; b=k1gBxT0ipCQdSrCMM814HpugDP4JTIKG2kwa55s7u00NlLxYRIevLHiql+WUnjHwVy pprvb2s+C+ieBIvxrFFAuiDKXx5zf0dbNC+FzWqQUvIZrPAqKo+y4l7Vl0yv1s+zX7eX lkLuky5FF5wW7kyN/mixhGROzxB3jkVJ1kdsE9r4Z1QZOIIZfzMxhC757k7MsVM0XNR7 AVkqA8XFEzkDMCDujT+J12XVLHxuWCiC8LiO59ZZ8NPpeoGCc1qZQZejCuiom4v+/+pX QQX4U/zsgsLHDfwW/2GfBCUvsdfnLsJmJYDaQlliGcEjUUVc/N8jpsA94xuW8TxTcgTx dLKw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Qw82+etm; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f1-20020a63e301000000b004fbb6a09b99si3032824pgh.341.2023.03.11.16.47.15; Sat, 11 Mar 2023 16:47:30 -0800 (PST) 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=@amd.com header.s=selector1 header.b=Qw82+etm; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229757AbjCLAqj (ORCPT + 99 others); Sat, 11 Mar 2023 19:46:39 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=ham 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?1760120852318995672?= X-GMAIL-MSGID: =?utf-8?q?1760120852318995672?= 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:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 68231 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp518206wrd; Sat, 11 Mar 2023 17:01:30 -0800 (PST) X-Google-Smtp-Source: AK7set/I1kPYHzlqKAFFZlgo/P53YiTUChp5t0w0V/imKSQpYKTPmRqwGXxvzblh2dgFBmXf5+I/ X-Received: by 2002:a17:902:6b8a:b0:19f:30be:e9fb with SMTP id p10-20020a1709026b8a00b0019f30bee9fbmr1494025plk.19.1678582889759; Sat, 11 Mar 2023 17:01:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678582889; cv=pass; d=google.com; s=arc-20160816; b=bOU5EOu0Cl7cLMJ0JM7n6OrJZKU/RhZEXHHDE1jt2j8UFViXF5jiaDiTEViPpiOjZF ecM+d8dNq13r6xfvNnWVcx2kXcSGFPApDZirpSFqr3DZRrijEH/1JSdPPecjTq4vptdJ bqvvcFfHoPduaU5dINi0CyGkb+4Buoakwf9U2fdjWXPGiPBgqOdfstPqKZpZ60HMyBos O0anj+zT77YVdXMMr7A3R6JqWl1iag4ysOG2ui3tq2nJwXJE3sg7VbzhPDRr5NHAqtiq smfpS/t5lAhq1Ml2aUKeHVYNNlKlfClrtzlnX0Sk3OaPKdTbETqN9rgCD1/f7CixsF3f 3JAw== 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=vYV1MbdPxIkeTt/bPBRd4G8qOex1cDpG402blQSNwO8=; b=JCcNItqQn31zaGQTpBVVy87gtTmUmH8YWdClGgJY6VWbYsLBFbMcx+Zi09Ix9b8DnX 5ONppE33i3P3ATjS7c9EPuAs7rlebmZV+E70gmQuby8pzhtzwWwwogMsjLzqe+uMFWDT c3HeE1ILxAaIMQ8Px+xYBg36KTboMFdsMF72bOScMeBkufY5wAzruxeMJIeSqIxMAvL7 GczPYaARQ08+5Q4v2uJscpJid4755Qdwk1EBfjjPoP6Mr/U9p3rlNSjPclg9rw2O/GZ0 8Rx+rUTBO77adLKUfrwdqNex8RYvxDQrmYpsQGOfYWMGBGhTxZ1eCUMFRKyUj5ZHj4Zn FXHA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=4qMfKQH9; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a170902ce8c00b0019e88c42997si3470295plg.104.2023.03.11.17.01.16; Sat, 11 Mar 2023 17:01:29 -0800 (PST) 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=@amd.com header.s=selector1 header.b=4qMfKQH9; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229801AbjCLAqt (ORCPT + 99 others); Sat, 11 Mar 2023 19:46:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbjCLAqq (ORCPT ); Sat, 11 Mar 2023 19:46:46 -0500 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2059.outbound.protection.outlook.com [40.107.101.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E20A06B5C7; Sat, 11 Mar 2023 16:46:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UaKe3XwEnPsMEKV6PS8hahErPDBlUSLn3jW230jWwvK35KM362XicHxAJxy8IXNcaFkXg6PTQuw3IlD3DxSqxUscELyDdCp61DLc+lu6DcXhDdMADM4sIISHabKjOSh2ZNT4rUz46vAxRBvNHZ/rBy9e9n3ZeKXttGnTHwb1vAL68J2TFVGg5sw7T+ngBn+k3qxTJzFCt5okO5G3pe/EI4+6q7/INuOx/jDJZ4lNrUi9IioRZq9RnvGDG1+gqiyQZpqOSrhxO7Vsh3u5euLdsVoyjQECW8RMxGOxVAhtKVd8ruRQPnSR3PltAZFo/1bgNiXwCSgkIXrCKg6giSWR3w== 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=vYV1MbdPxIkeTt/bPBRd4G8qOex1cDpG402blQSNwO8=; b=A/vIIR+qVmlPV1rE4/KBQ9Pq4deT4DAdjhpoXlKXf1h6ci2sW3vFu4RJiGmCEY6Eo6/9qjYvUhdZExoilBONpwLfD/UAKla9/ngmDKXC/Fa51mPlW9roSM1aWzX+65YYrPpxi71svNuSJofveMQ4jCo7wEUSft2N/bgKRLoRsS4gwEF2a702epOqj9SwvmLG7IPgYelihbuHeYCOwtno4z9PwE93nSRh54rD8G+n8BXO/+iDs82nBcPwpe7dtREvJvQkzcVZlmxnWvJ2begOBsCcg/wEcJerI0RZZm6Or9CXuexd5lwZb8nYF+/Wty6bSTFJkWWnYGzTMbQxdjb/aw== 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=vYV1MbdPxIkeTt/bPBRd4G8qOex1cDpG402blQSNwO8=; b=4qMfKQH92dYooaG4tirXYaa+EuGqMpdMKa87XMjGIOKJ6g0mnMMgB9RyjtdK8j94YIYcxZz0f+fHyXih4OOROMOw3HlLWOuNJnfTZL/PgwLodIklnq023ZRLMdCJ5qH+Zkjimb2lv+0P4ibzCOPZFwx32s8LUx7X+haS/IczaHA= Received: from DS7PR05CA0087.namprd05.prod.outlook.com (2603:10b6:8:56::9) by SN7PR12MB6768.namprd12.prod.outlook.com (2603:10b6:806:268::8) 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:46:01 +0000 Received: from DM6NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:8:56:cafe::30) by DS7PR05CA0087.outlook.office365.com (2603:10b6:8:56::9) 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:00 +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 DM6NAM11FT021.mail.protection.outlook.com (10.13.173.76) 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:46:00 +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:57 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 07/15] arm64: Add config for AMD Pensando SoC platforms Date: Sat, 11 Mar 2023 16:44:37 -0800 Message-ID: <20230312004445.15913-8-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: DM6NAM11FT021:EE_|SN7PR12MB6768:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b7b532b-0554-4ea2-a10f-08db229326c3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dWLTUimUAErUjTcR+Vmtydp4N7JhBwF3b88gSaugZUwbeIDBJLiVgsPLFfoUHY6QrNAPkinSjQ2GbOlGRESnG13hHzu5AHj0OBySxVlVBq63lf1Ts9Sulyx6QwZrG6DV0zKjzKsRYrZWNpPDLH2tnwbsmfvT3cq7mFvv3F72HxxqfaA9j2fik1F4FwZQDDTkKleCXGXWM0vV5RgF3b8svOdz5rhIZQ+0KyjUUOpFacEutSlUXDWGZOJ+rE7m0S+iu8Dng1iX+zYpm86xMOv7Tn0G23VtD7gvUGP665jR7PT8FUVAH4GmrbqBoN5JjEQB8QGkOlSm3Rp5SQJ9d8dROP/0z0RLXm7Uj08NWZuPsxfFkEXW96Y6XMXz/lsf0pPmKpbSL3/swd1JXlwMtXenRIAU8hgf8+M+YQkDDc7ZBiah2rMiGgUQ+5w9KxXysqM9eKEbMJLN/HzLsoen9Urb9r+yMSCs73j4ZR+RRDYUDXpw0Xt3KRr1nFh/XNQix9Bfmg0ccPhmtH8/TKKAWcQ5T8T/M+MX5cWkVeTfPvxaBX7c66yS7rUoYmWSn9deuJMwovGQUElepgIvr32WOoPqJXl+zVz3viw4tJc/jr1Wr4XHDbF3i2y7vwYd29kAu0K58OMepMWGLhgVtolKfSFzCBkPaOAQMXPnyX6JN9Old4JsMXxOVaUVMvKPlrMRZvhY5ycOtvpUif1Cp6RaVYyMrxy9GvCcJxXl2kxE6HP5eKE= 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)(39860400002)(136003)(346002)(376002)(451199018)(36840700001)(46966006)(40470700004)(356005)(36860700001)(81166007)(82740400003)(36756003)(8936002)(5660300002)(41300700001)(7416002)(4744005)(7406005)(2906002)(82310400005)(40460700003)(40480700001)(47076005)(186003)(26005)(16526019)(1076003)(6666004)(336012)(54906003)(426003)(316002)(2616005)(8676002)(6916009)(70206006)(4326008)(478600001)(70586007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:46:00.8167 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1b7b532b-0554-4ea2-a10f-08db229326c3 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: DM6NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6768 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=ham 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?1760121732008533874?= X-GMAIL-MSGID: =?utf-8?q?1760121732008533874?= Add ARCH_PENSANDO configuration option for AMD Pensando SoC based platforms. Signed-off-by: Brad Larson --- arch/arm64/Kconfig.platforms | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 89a0b13b058d..3510daaabe27 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -236,6 +236,18 @@ config ARCH_NPCM General support for NPCM8xx BMC (Arbel). Nuvoton NPCM8xx BMC based on the Cortex A35. +config ARCH_PENSANDO + bool "AMD Pensando Platforms" + help + This enables support for the ARMv8 based AMD Pensando SoC + family to include the Elba SoC. + + AMD Pensando SoCs support a range of Distributed Services + Cards in PCIe format installed into servers. The Elba + SoC includes 16 A-72 CPU cores, 144 programmable P4 + cores for a minimal latency/jitter datapath, and network + interfaces up to 200 Gb/s. + config ARCH_QCOM bool "Qualcomm Platforms" select GPIOLIB 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: 68232 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp518357wrd; Sat, 11 Mar 2023 17:01:56 -0800 (PST) X-Google-Smtp-Source: AK7set+A0AZOabPtvrHQwr2dmItxOC+UzTAADpXe37WBJjjojGbFyBbKdhsXodv1VR+MhrqQ56kC X-Received: by 2002:a17:90b:1c90:b0:233:ee50:d26d with SMTP id oo16-20020a17090b1c9000b00233ee50d26dmr32993609pjb.4.1678582915835; Sat, 11 Mar 2023 17:01:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678582915; cv=pass; d=google.com; s=arc-20160816; b=EoEdKaHDwUjlYsqY/IHs7eVBf9MmUkEyxs1AgjaTLVVnAp210Ga6hh6ww0aT2AVM2D phkM2La2yCj6TbFzrL7iszr4J3elGU/U8Au3vHrSUTTUdYdpWopVYK9ldTjynYm76xT1 u82S0PcjBI9cA1Vmhn6zdFJJZlhOrwxFoONq1CxPEChGN12XvS/FlhB7Hbfh6/bve2Sk K4N1VSkQLcYndGH5vpWh4EPd1oGsLjLV12IhLlYqD5goPxFgXxA4Z5j2RT5sFYMZ6X+U Uav6RmjEPPXENfzUfOX+lP8QF810+VcffVCC1sOkckaTpIkwPZ8L6dn5yetBoyIltzKZ /+zQ== 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=j7imN6SgaVAurHho6Pd+K0ALCxGZP41vTmEWNf+XI7s=; b=aNFXFFrrlEyaoqLnjhiVU3aYX7Ld3QegAYt1xj1BaHxwMWQl6c6fKkAiJIRip+Y8mV VG8dOfdln7wmVwc95Vaf5aFuaJWXI7iYc4CL0tC9siMAW73FL4kWDDoXEMQnxBodbFfK /qjCNSGBosts3L5EgHfV9EWIORfdpjfX3wyIWODJukJf7jM3L3PcJhyXkdkOZzm2dCIK Z99FENWPkFB8FScDAUh37ec75DgxqaXJkvnAvUmlfGM95Pl4yi2FKzi5WhpIlYox0wJq RABQP1AHSQFaK1l3Se6HfisM4MvF3dYqhOKTNPb2fvOAgmllYA2hQCU3ex6GM702ybj0 VTsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="38/TcUL9"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a170902ce8c00b0019e88c42997si3470295plg.104.2023.03.11.17.01.43; Sat, 11 Mar 2023 17:01:55 -0800 (PST) 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=@amd.com header.s=selector1 header.b="38/TcUL9"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229782AbjCLArB (ORCPT + 99 others); Sat, 11 Mar 2023 19:47:01 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=ham 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?1760121759698564866?= X-GMAIL-MSGID: =?utf-8?q?1760121759698564866?= 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:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 68236 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp522004wrd; Sat, 11 Mar 2023 17:14:43 -0800 (PST) X-Google-Smtp-Source: AK7set9vTXcTA6m6dM4uOGuIfxgp++1iaFjhE1KRD29FFyvAeINi/LfY0x51BodsmTYvTidANTVk X-Received: by 2002:a17:90b:4a0c:b0:234:5d3c:b02b with SMTP id kk12-20020a17090b4a0c00b002345d3cb02bmr30648330pjb.42.1678583682895; Sat, 11 Mar 2023 17:14:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678583682; cv=pass; d=google.com; s=arc-20160816; b=DnEVUxwxgaD+ZPnICcCEKj+YrcGPh1ZNmH4f+Z6uB1zzKHoFBUU8nAzYFRWkbUCrHm qmvMHM/iQaVWSQFeVSzYzUaAfudHVp+8EcoKS8WByk2Z6hJlWKpl90NpoqX7ogRCwg9Q eqPIMFR2TmgQhUibuiei9yCoCxKDoTxg1IkBDHBenXL4PhKQJnHHlKbrlXxjHeeYVwA6 ykalAcDsST3ydkCOJ6QeP2COmsqYEVQMeByZp3Q5T6HTXy6HfsKs+8cr2MPUICnlt/z4 ki3zb7J2rFBk5ix4/yltklw1G+pn9V1Vp5+wHS5uk6RYj3kscQyn7EsPfjQKNLo2GK/2 tQbQ== 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=mpnIb1O3iD9+RUSdP9aH5CNIYVv5t5KX4+QyjF/xBm8=; b=V9mcDjG263LwlUbdue5MeBxndRMosFgWSOM62GLrEYCPVomiHwnvwMoGNlQt3z/CSw dF0SkIVZNWJ9wei0XW+Ug2A4xhQ82jkhjZW0atn/WXXQwH1D4l4Ng0rNjXc6X25ZRncJ Rx6oq4xhopobkFMDUOsABqIO6D+Wyq7w9kCMzi3Dxo6T4XTfvOnmYHP1JRZScv5Px78I 2YXRZQF8oArPAQYb2/wTqAfHOsxxcGcmoWZ4qyTwP6sTEeHLm+iHcInTckROzzx/WZFS Aah/ExmM3+UKkNBptop8bg9jlH4rDgCEaM50VxOubZ3Q8MeDbRa9y4UsqPHK0jMpNM1+ m6PA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=cC67+kwZ; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pf18-20020a17090b1d9200b0023b4d01f319si1069786pjb.75.2023.03.11.17.14.30; Sat, 11 Mar 2023 17:14:42 -0800 (PST) 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=@amd.com header.s=selector1 header.b=cC67+kwZ; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229819AbjCLArN (ORCPT + 99 others); Sat, 11 Mar 2023 19:47:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229740AbjCLArL (ORCPT ); Sat, 11 Mar 2023 19:47:11 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2069.outbound.protection.outlook.com [40.107.223.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59461574CE; Sat, 11 Mar 2023 16:46:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BK7/bxF9f4G5lsj5KG3JuFMTi2OIC4DLDbWbWTix8z80YtR8/aAadLkbFJDxIVaTu3fRaWngHFPLQul3MkFYBMO0A4MFntLDFAwyE7oWhqWgCEi29u03zHq5Q3+2SOVOdXxVWYEejB+wrb5QwRR/s93sekQzYuy2Gn/OEMQDwTQuEfFtE4M69eTXc2dRigxYYtysMUsxJyXKO9oXfvMqillbCzxp6WZC2mJuIHLQqEu5SgOXNdOJj1tk5mWhHOOGf5NycdeG7lJYMGiFoeSGj43z4/Cifzvhb6BWkSHHTg1NxCFe5gV8uGFp90RYgUhMF25HS5Pbeln9pLn4jfK62A== 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=mpnIb1O3iD9+RUSdP9aH5CNIYVv5t5KX4+QyjF/xBm8=; b=QA1OR0pr25tWkzdqTvQstcJt2/QNIXxcq47yDT702veXlxPIqMy5sZ5PFlRzhlghiucQfmNTKXs8liU/sTloaooBSemCib9Mgk9ILTgv5bPtUPDRQCOn5UGKH4P53UQb5opbl2a7305B3uS12PakS+sBgI4jTkuHgZjVtGLixWk9JOzerNraAfVrTvHZbpjReeVLZGBJag0JzH6K6LAglTVWUuAkr8pMRWeY1+feR0lIsG0X5eSKblbPYN++7MfjvgWMHyWUUskh+SH8LrFJ/MukU9Gz9MpOckpK0DXGFUmiBta4N2ZuvjaoMQehNEbvzm7PZwvPYlcYft9UpGfWig== 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=mpnIb1O3iD9+RUSdP9aH5CNIYVv5t5KX4+QyjF/xBm8=; b=cC67+kwZ/4FuMXLstTixOIcPtudkMeGNUTpLOWE8MZWGS405yFrIsTQxs9rGbNBpNeEVHX/rz4z12zFuQmszM50hIN2qvDjr3fkM4BSTZdmamBMVF5F1bthBbbgJLIDFiKINALiN0bwq6O+Lof3f8CgQMWydEnLqhMQHigTwjKw= Received: from DM6PR13CA0037.namprd13.prod.outlook.com (2603:10b6:5:134::14) by SA1PR12MB6920.namprd12.prod.outlook.com (2603:10b6:806:258::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Sun, 12 Mar 2023 00:46:18 +0000 Received: from DM6NAM11FT029.eop-nam11.prod.protection.outlook.com (2603:10b6:5:134:cafe::34) by DM6PR13CA0037.outlook.office365.com (2603:10b6:5:134::14) 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:17 +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:17 +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:13 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 09/15] spi: cadence-quadspi: Add compatible for AMD Pensando Elba SoC Date: Sat, 11 Mar 2023 16:44:39 -0800 Message-ID: <20230312004445.15913-10-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_|SA1PR12MB6920:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b2bde4f-5c07-4c96-5fb6-08db229330e5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2mODzHg6Dpnfv/AfKJl+pzOxgmsC+rVDx+IBC49WlfWt5R3X027svt62E3i24OEdU819Zcl8hxWu+892kFjZfOqk81GsKtV2S2MQAmYwvSMPOl6LuN9gA1eqp+0FkQz2zfXk1V7u5mphoOBngl56J/kW+rEbmFiZ4tuwClCOl+aQLNMffZdmzIbIeCcBJp6NI7596tkS58XA+ZCNG+/yFYEae9dDU+L7y9JIBxg/owzwHsGDa9O2tNy6NkVG24SGJzl/0fOdUDvbgUT5AzzppWUSDyhKdp9rZzQmWKpIGfUPovWBKeJJ73W4poWUZ7VqXpjKr/765Q7KAaG0KjfA7KLK+9dqejiuWb+MSWcbb97tcJ0TZDEbF/3z1nVX0R99/d5r29I9fI+8DXWHOVNURYKtfT9/Mf2ssU0YHycXCKK/d7pmBb0oYSkvlQZgvSJSQxA3HV2iD/FR/+UkLP9lSLT/9tErlPz4vVDul3dfjv9Ug5380yAgqa61SKXxPstNhJeBIx5QPX8wEKYUHUlbDkQiOOXlrpP5y7OgVzNoqQpE0+swOuHsLoM4dmXXwda29ZU74ZNfv5dpJXZsCropPGSEuXbZMyCpHXfWr+jsTLAc2QyLOhcPOncHC9mEPZiPLpuxdmvn26A9g4j6JpKRmP0Dofv56vgNEEElgO209HAzAdDANKj+FRr/GA1VaMozDEhyiAKSOUwiVKznv2I+NXFeq+dggqu4SVc28J3IhsQ= 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)(396003)(376002)(346002)(136003)(451199018)(40470700004)(46966006)(36840700001)(16526019)(36756003)(40460700003)(6666004)(54906003)(478600001)(4326008)(5660300002)(7416002)(2906002)(316002)(7406005)(70206006)(8676002)(70586007)(41300700001)(8936002)(81166007)(6916009)(186003)(36860700001)(356005)(40480700001)(2616005)(82740400003)(1076003)(26005)(82310400005)(426003)(47076005)(336012)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:46:17.7995 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b2bde4f-5c07-4c96-5fb6-08db229330e5 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: SA1PR12MB6920 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=ham 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?1760122563945479453?= X-GMAIL-MSGID: =?utf-8?q?1760122563945479453?= The AMD Pensando Elba SoC has the Cadence QSPI controller integrated. The quirk CQSPI_NEEDS_APB_AHB_HAZARD_WAR is added and if enabled a dummy readback from the controller is performed to ensure synchronization. Signed-off-by: Brad Larson --- v9 changes: - Rebase to linux-next 6.2.0-rc1 --- drivers/spi/spi-cadence-quadspi.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 64b6a460d739..ad82d2ab3442 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -40,6 +40,7 @@ #define CQSPI_SUPPORT_EXTERNAL_DMA BIT(2) #define CQSPI_NO_SUPPORT_WR_COMPLETION BIT(3) #define CQSPI_SLOW_SRAM BIT(4) +#define CQSPI_NEEDS_APB_AHB_HAZARD_WAR BIT(5) /* Capabilities */ #define CQSPI_SUPPORTS_OCTAL BIT(0) @@ -90,6 +91,7 @@ struct cqspi_st { u32 pd_dev_id; bool wr_completion; bool slow_sram; + bool apb_ahb_hazard; }; struct cqspi_driver_platdata { @@ -1004,6 +1006,13 @@ static int cqspi_indirect_write_execute(struct cqspi_flash_pdata *f_pdata, if (cqspi->wr_delay) ndelay(cqspi->wr_delay); + /* + * If a hazard exists between the APB and AHB interfaces, perform a + * dummy readback from the controller to ensure synchronization. + */ + if (cqspi->apb_ahb_hazard) + readl(reg_base + CQSPI_REG_INDIRECTWR); + while (remaining > 0) { size_t write_words, mod_bytes; @@ -1734,6 +1743,8 @@ static int cqspi_probe(struct platform_device *pdev) cqspi->wr_completion = false; if (ddata->quirks & CQSPI_SLOW_SRAM) cqspi->slow_sram = true; + if (ddata->quirks & CQSPI_NEEDS_APB_AHB_HAZARD_WAR) + cqspi->apb_ahb_hazard = true; if (of_device_is_compatible(pdev->dev.of_node, "xlnx,versal-ospi-1.0")) @@ -1859,6 +1870,10 @@ static const struct cqspi_driver_platdata versal_ospi = { .get_dma_status = cqspi_get_versal_dma_status, }; +static const struct cqspi_driver_platdata pensando_cdns_qspi = { + .quirks = CQSPI_NEEDS_APB_AHB_HAZARD_WAR | CQSPI_DISABLE_DAC_MODE, +}; + static const struct of_device_id cqspi_dt_ids[] = { { .compatible = "cdns,qspi-nor", @@ -1884,6 +1899,10 @@ static const struct of_device_id cqspi_dt_ids[] = { .compatible = "intel,socfpga-qspi", .data = &socfpga_qspi, }, + { + .compatible = "amd,pensando-elba-qspi", + .data = &pensando_cdns_qspi, + }, { /* end of table */ } }; From patchwork Sun Mar 12 00:44:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 68238 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp522719wrd; Sat, 11 Mar 2023 17:17:01 -0800 (PST) X-Google-Smtp-Source: AK7set/WWjJzJXTbrNp2nUXIwKxwd0nntI6/HqNN6C8HAQAdYaF6YFvm84cE76Krvu2+8IR1UI6F X-Received: by 2002:a17:90b:3ec5:b0:237:8ba5:d368 with SMTP id rm5-20020a17090b3ec500b002378ba5d368mr31939848pjb.39.1678583821336; Sat, 11 Mar 2023 17:17:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678583821; cv=pass; d=google.com; s=arc-20160816; b=013dXAXb/7k9WxuXOi/QU3Ax7EZs9kHQqLLGXwjPxTU1W/M64fEdql1QX1sGqQ32aN BGCuKe1iWBL3v3viAMvYgrff6rAeNXKHuWqhH1QIpK49GFIRTdGmUfZuR03+wXbFO9J4 dbTc8A4dJREACSVjLKnq1aWN4Y5xvdK4YuLGxLQiXkLIv0XiFL7SD8Bo++tFFJBr8BGk hZt205GtnP4+krY3jWtACpamCROToqGX4ruw03/fK/3Qv+qVyt73P38HqRAGzrrn5wj0 MQCkf/6eAzz+/c1bSGAmeDx3TllL5YKiHxWslVmq0Yk607UHnPyfvARSpLr8Zq9hvX2c k0vQ== 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=bk5SH2as85ZqLhTJF5Vp455zKYM3VN7V67ZRGnbutrE=; b=SVMO2waA84a1DfBiu1J9+yPiYBNa/CW5uEhduZGNcEPyf2P/1WC6nFhykJfQ2d/uV+ blwIHAoyhPu8GY7mc7o4Fl94hOkDi1exMpUe24eMfYduimMh1+rVrv/qiP0kL5J5H2iu m2DjY5UM/vD5XcK40OOeD65vt2M+S1WQ1KQlGymImgkDf8G2BngVo2oB1/jwZo0Cl/5v 9VjfxC9eoal14lEQJw/soo/D4Fq82bAaQGTKWyZ0ZIuI7sOw1rXwHT/2M3honI2wziYs 0+YoFgOGR72aVXUwBUYPGN+mKIbscwlYHovMeekzCKd1DYhKwksmIu8tnEh8ujya2kFI Lzng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=UpdNNSI6; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o71-20020a17090a0a4d00b0023448df0ee9si3124884pjo.3.2023.03.11.17.16.46; Sat, 11 Mar 2023 17:17:01 -0800 (PST) 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=@amd.com header.s=selector1 header.b=UpdNNSI6; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbjCLAra (ORCPT + 99 others); Sat, 11 Mar 2023 19:47:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbjCLAr2 (ORCPT ); Sat, 11 Mar 2023 19:47:28 -0500 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2060.outbound.protection.outlook.com [40.107.212.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B29B66BDE3; Sat, 11 Mar 2023 16:47:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AdHD0j9KJfhx7xwcNlMOiLKL4OTN/01U1sICMOFtmTu8jCgKC2avtlYaKwPhL6aD5trnu4U/WfwFZuGGyIqEZiw7pjUuz6fJm5DijD+MZ2aPSc7YSpj+CTT/b7NzOAXTnflVLf3FeBtGykYAPE7jPzhxojoy206yH4v1PWZej4uPk/kz4YLH0pkCi07YXflzmCk2wPZ7DbIzBX4EQR227McBbsJMEJM+77DloPFKbP7MswWFf4I6H/oYJyvQqi97JyBYgUxUcToazR2DAwxg5BwmEdAeIkCTyka2FVcjsYGe0sXZJQAAXug+IKwqSZCYXjzgndr5qrExbb51qnaObg== 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=bk5SH2as85ZqLhTJF5Vp455zKYM3VN7V67ZRGnbutrE=; b=LIzGb7xX7TgUbpAQDz5SdjMTzpFWgKzETFiRZRFaxKYog8bS885hD/WVAc5JClYHQkcJs9anf2PX1zjsSiqBjwA3kMaeaJYBhTBAhSUuQvLeSpIN2g5UIIL3L4gukIK6nkqVDoFvDuGWoJlVdNzx7XfZ6BVaEAC+oXctfTkufOmhFv5gvyH6zxE+HMD8a+iEYHiIujEJTbYWJ+BlaAW801B/0+4b3a9DAwKQZpxULZxxCNCwPQOxGpf5zi6Ak7HjjojSAiIRLVwWnGVcyJXsKdcO3/gnhCTrEwe7JtPNTOJRz9iTeYzLZTsv8pdsyLfJ+sUgLXYWB2ctjxZHy2jdNg== 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=bk5SH2as85ZqLhTJF5Vp455zKYM3VN7V67ZRGnbutrE=; b=UpdNNSI6ItY8a2i5I2MBa7K+2UbAi5c5LU2O5OjXOltYSsEQhIVvZTCu2smjwtDYjcGztIZS3ZHHKeUZufkTfNZlkWRP+QxZ13luivKZOge9iRWi/7mKtbBwIBh77IdEwtaOLC8NQtpKVGm5+RqDA6D1p+ynbaFQ67fsW+Id0fc= Received: from DM6PR12CA0013.namprd12.prod.outlook.com (2603:10b6:5:1c0::26) by IA0PR12MB7628.namprd12.prod.outlook.com (2603:10b6:208:436::6) 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:46:27 +0000 Received: from DM6NAM11FT062.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1c0:cafe::d4) by DM6PR12CA0013.outlook.office365.com (2603:10b6:5:1c0::26) 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:27 +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 DM6NAM11FT062.mail.protection.outlook.com (10.13.173.40) 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:46:26 +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:22 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 10/15] spi: dw: Add support for AMD Pensando Elba SoC Date: Sat, 11 Mar 2023 16:44:40 -0800 Message-ID: <20230312004445.15913-11-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: DM6NAM11FT062:EE_|IA0PR12MB7628:EE_ X-MS-Office365-Filtering-Correlation-Id: 44549a0f-6b68-47a2-0aa7-08db22933643 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d+1Z/dLwKZWGZ21UJFg2plJLnH6rxzQKEqRn58K8Fu/APSJ9eQLGfbFNBbEXwLU4efPHOb/GFgBqTtySxJd2b0+I5caCQwgRthHgRXukojEBLoPC0UnEYLT6+3br2cY7vOOsLNRsqPdGG6Ev741Fg7V0b8gqzbVgShq5yapwDgLWXz9sXyRlaqo5ofxYmTeGbVYc/OObAOyZI3n6jjS8VT0iJcvuZHZgG/Z5UDqMhjFeB5iBZS6mSjHca2jDZEbaYBQUDMaC3wXde0JNcvbWOYOGrRoWIqxoSZBYGM1QuETiKhvAPKWG1UloQzOGzs5qCVKgy/pKJ5ICxop7i/xLT75IYh6cld/EyWLlZBrKq3NQFA6riftPHJPEGmjdrk8zKBVY+EhAWjVZoIxiskbHrsK/ZgCXkTe26KeT99tPtOroL3QfZMzY+XRLnARz9y6R4pesu0/sNX3cdHlP6aidHuNNXWQAnK7nRVRLiV3nZssx6AWT+pZoWsO2E/3PL7j60LR1CjGMzOGWdzCKSSdTzZFQnM26SvUk+7VtyPVEHBPOSOVAsAK1y83MuhJV0gBmWJaOdLe2uV8AELu+lFX7UAaMOq0GIy4bNALW9Sdw+r2xHOHV9NOhEyESURQ9R3A38VuCnSEQGku72ry8/6CHmG/SzrGM0J0RCWKsZONS8rx1wccMGUpSgRDbOO4Yj3OdCLuqm7WxIJKl6N01uSN+YMSmiz+OzcDDhiftbQT+deQ= 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)(136003)(39860400002)(396003)(346002)(451199018)(36840700001)(46966006)(40470700004)(8676002)(4326008)(6916009)(70586007)(70206006)(83380400001)(5660300002)(41300700001)(316002)(36860700001)(54906003)(2616005)(8936002)(47076005)(2906002)(36756003)(478600001)(82740400003)(7406005)(426003)(7416002)(40460700003)(40480700001)(81166007)(82310400005)(336012)(356005)(6666004)(186003)(16526019)(26005)(1076003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:46:26.7863 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 44549a0f-6b68-47a2-0aa7-08db22933643 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: DM6NAM11FT062.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB7628 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=ham 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?1760122709536176974?= X-GMAIL-MSGID: =?utf-8?q?1760122709536176974?= The AMD Pensando Elba SoC includes a DW apb_ssi v4 controller with device specific chip-select control. The Elba SoC provides four chip-selects where the native DW IP supports two chip-selects. The Elba DW_SPI instance has two native CS signals that are always overridden. Signed-off-by: Brad Larson Reviewed-by: Serge Semin --- v11 changes: - Simplify dw_spi_elb_init by using syscon_regmap_lookup_by_phandle() v10 changes: - Delete struct dw_spi_elba, use regmap directly in priv v9 changes: - Add use of macros GENMASK() and BIT() - Change ELBA_SPICS_SHIFT() to ELBA_SPICS_OFFSET() --- drivers/spi/spi-dw-mmio.c | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c index 26c40ea6dd12..5851ecc6e1e9 100644 --- a/drivers/spi/spi-dw-mmio.c +++ b/drivers/spi/spi-dw-mmio.c @@ -53,6 +53,20 @@ struct dw_spi_mscc { void __iomem *spi_mst; /* Not sparx5 */ }; +/* + * Elba SoC does not use ssi, pin override is used for cs 0,1 and + * gpios for cs 2,3 as defined in the device tree. + * + * cs: | 1 0 + * bit: |---3-------2-------1-------0 + * | cs1 cs1_ovr cs0 cs0_ovr + */ +#define ELBA_SPICS_REG 0x2468 +#define ELBA_SPICS_OFFSET(cs) ((cs) << 1) +#define ELBA_SPICS_MASK(cs) (GENMASK(1, 0) << ELBA_SPICS_OFFSET(cs)) +#define ELBA_SPICS_SET(cs, val) \ + ((((val) << 1) | BIT(0)) << ELBA_SPICS_OFFSET(cs)) + /* * The Designware SPI controller (referred to as master in the documentation) * automatically deasserts chip select when the tx fifo is empty. The chip @@ -237,6 +251,48 @@ static int dw_spi_canaan_k210_init(struct platform_device *pdev, return 0; } +static void dw_spi_elba_override_cs(struct regmap *syscon, int cs, int enable) +{ + regmap_update_bits(syscon, ELBA_SPICS_REG, ELBA_SPICS_MASK(cs), + ELBA_SPICS_SET(cs, enable)); +} + +static void dw_spi_elba_set_cs(struct spi_device *spi, bool enable) +{ + struct dw_spi *dws = spi_master_get_devdata(spi->master); + struct dw_spi_mmio *dwsmmio = container_of(dws, struct dw_spi_mmio, dws); + struct regmap *syscon = dwsmmio->priv; + u8 cs; + + cs = spi->chip_select; + if (cs < 2) + dw_spi_elba_override_cs(syscon, spi->chip_select, enable); + + /* + * The DW SPI controller needs a native CS bit selected to start + * the serial engine. + */ + spi->chip_select = 0; + dw_spi_set_cs(spi, enable); + spi->chip_select = cs; +} + +static int dw_spi_elba_init(struct platform_device *pdev, + struct dw_spi_mmio *dwsmmio) +{ + struct regmap *syscon; + + syscon = syscon_regmap_lookup_by_phandle(dev_of_node(&pdev->dev), + "amd,pensando-elba-syscon"); + if (IS_ERR(syscon)) + return dev_err_probe(&pdev->dev, PTR_ERR(syscon), + "syscon regmap lookup failed\n"); + dwsmmio->priv = syscon; + dwsmmio->dws.set_cs = dw_spi_elba_set_cs; + + return 0; +} + static int dw_spi_mmio_probe(struct platform_device *pdev) { int (*init_func)(struct platform_device *pdev, @@ -352,6 +408,7 @@ static const struct of_device_id dw_spi_mmio_of_match[] = { { .compatible = "intel,thunderbay-ssi", .data = dw_spi_intel_init}, { .compatible = "microchip,sparx5-spi", dw_spi_mscc_sparx5_init}, { .compatible = "canaan,k210-spi", dw_spi_canaan_k210_init}, + { .compatible = "amd,pensando-elba-spi", .data = dw_spi_elba_init}, { /* end of table */} }; MODULE_DEVICE_TABLE(of, dw_spi_mmio_of_match); 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: 68228 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp516878wrd; Sat, 11 Mar 2023 16:56:47 -0800 (PST) X-Google-Smtp-Source: AK7set/8QAfcqtAERQMf8eJjKt7vj/k5+ztNkrmm37L3HKypk5d8wJgyY3yCl0PoU95iZu5JjMuo X-Received: by 2002:a05:6a20:af0a:b0:d4:156f:45ad with SMTP id dr10-20020a056a20af0a00b000d4156f45admr14269pzb.58.1678582607551; Sat, 11 Mar 2023 16:56:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678582607; cv=pass; d=google.com; s=arc-20160816; b=R282H2bPSmPm6FSb85UTxydKF3ZA9Z22stmmZ7lSiqtmFe9OA21t47uqmH8P463zor 7lIqLeMrY5TCGIZqftvh6VmnksefhtKGM5wbD1leXEdLYXqkHaCAUTAJ4Iy757qLKqfA We4YV0hsMN0kAbGB5Ysh62NYFdRlIPMQmMD1ROroZgMF+9J0Bnc9t3pMk4FgzCJRuAlD WSq+zT5Ntyei9UZB88nWy4EUc7N76NzTyXF1gc/C64v0U0pI/LlXbLRSXz0DGJ1W/0NG qxmmEiMXeUTDTTrEn8tWfWmndioslMrtPHl6yC1kQ1E2Dtfu9atnm5sMVTQRYW3guOVD +vKQ== 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=ymfACAjSLWbCk+4U3bvrCLTQlZYsf0VDrwtsvVsOjLE=; b=Ci6erbMzslu2RvNe8mtkJBsrbKQN5ckJPq/uIis38G2Egc0QDn5Q2yDxBT+TkXSEGO 2yZ050Qb+1Wp5hDWkTW8FzVaF1E6FXujmsn1L+CO7x2AYUtmEe+cuTFBA8Arc1RISor6 up1zgkKepV5rxdYrOWeJuIgvAjqD8eiz3EZRGpNHCa1TFD6vBm7iSIt2kzdoik7TOyxK TGhC8br24RjbcOsng+cv9ObExRDtCi0Rk1RSjGCl1wyvSkE5AFfnhMwUvWRhAb1tUbtM MU0pFB7p5sEV6MxHNS1iNeZRuSyNcutlKRnYjWdmoaOQn+NEw9PFb0UYIXGaBRYQtjK7 eWxg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Ck9RiXge; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f8-20020a63e308000000b00502d7c858b1si2977562pgh.768.2023.03.11.16.56.33; Sat, 11 Mar 2023 16:56:47 -0800 (PST) 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=@amd.com header.s=selector1 header.b=Ck9RiXge; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229844AbjCLArW (ORCPT + 99 others); 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, SPF_NONE autolearn=ham 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?1760121436323831455?= X-GMAIL-MSGID: =?utf-8?q?1760121436323831455?= 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: 68233 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp518668wrd; Sat, 11 Mar 2023 17:02:51 -0800 (PST) X-Google-Smtp-Source: AK7set+iw1hyZY//f1jOE+4Ts0/0Y6bv+nG/m7I2/os24z/WCqeYz7pJV7QzrEzgrhk2I2dLGrem X-Received: by 2002:a17:902:edc5:b0:19c:a9b8:58eb with SMTP id q5-20020a170902edc500b0019ca9b858ebmr25100667plk.12.1678582971258; Sat, 11 Mar 2023 17:02:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678582971; cv=pass; d=google.com; s=arc-20160816; b=Y0QetlgLSGef0MZfm9WNv4/XHBUO0QOMFfGr1ujDH5PeQFgPHvU9S/X+qXPwRPJXfR dY5mnvuymGMVAP/yMW+6TSH7KLsSohIrLLaXk/ny/xTc2cEO/t5sHyJCbZcF+7Wa/qCR ryV6VAfzySfliluVtxW5bsrpK9d0V+3GHHA2s5MMJUfRU5kj0n3YDL8/UWV2Q8kBxLuq R0ZFrLkoNl2kBvnEBS6U/5ST2DRtv5jkArJR4E2gMhPaBej4szRFKjQ660hJYyAv69Wb 44TvRTfAcHgVCToW0odtyPyN7pGIHgTWqEq1pHtx6Mxko27K5Nu/O1K87i+sE6AkN6lh G6/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=1MDls9ITIFGGKkwfzufckKk9fjZ1Lh0w+zr7TA/z5wc=; b=EjCCePzz3ev+C+ndaEVy4kDOV0bDKbnsIsuk4ZjUgTJcmDxyWuMCaUpxQgjclWU81r 3/KlClD23EhsPNdi6aGazuXD34Q/YOIp7c/kl5RmGbleojCsMB5mXPIZ22ZR18SltXkq ZNrY7CoJYvY4ULMe3zuRAJQ6R5J54q/z4TJBmP8uXip72ydzRnr05YzbuYsj1FTDRE1b T8MBXJ1d5X761mOZBiGKtS/HKRS68V6/XWAas1k3PzwYDZkLLadT1wk5/LTZCaSTe5se 3tgSAvMeByjWsnZjWORLULSsZB+7lBdK5P03XxElaW2/S+tz7gRtOaKF7dhxQEjnDggj SYOw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=SxWraxn3; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a170902ce8c00b0019e88c42997si3470295plg.104.2023.03.11.17.02.38; Sat, 11 Mar 2023 17:02:51 -0800 (PST) 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=@amd.com header.s=selector1 header.b=SxWraxn3; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbjCLAsY (ORCPT + 99 others); Sat, 11 Mar 2023 19:48:24 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=ham 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?1760121817369863659?= X-GMAIL-MSGID: =?utf-8?q?1760121817369863659?= 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:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 68227 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp516877wrd; Sat, 11 Mar 2023 16:56:47 -0800 (PST) X-Google-Smtp-Source: AK7set++Wv6SENOMmH+t7+csAh4fD3t5UQvc3QNs9SV3eGkLQxLy2T9Ritq4LfDKjipLzt9F04gj X-Received: by 2002:a62:30c6:0:b0:5a9:c942:7294 with SMTP id w189-20020a6230c6000000b005a9c9427294mr22093751pfw.34.1678582607504; Sat, 11 Mar 2023 16:56:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678582607; cv=pass; d=google.com; s=arc-20160816; b=P7Xy8QSqVuAaw/FxdB+OQH7TC6O69ASQFfCtXE3bOSt9scRkrG8ipgqymAGlxljWxg nziw9mm2xmcAPg680rUdHYyNZAVZ5UKAWPEgu5lImI4wCaVddBQvjxPxswcBglMBJ2xo b05Ex3EIH+GB4FOZAan0X+1m/tMwAheXb0mQ3gAM+ME4wlTto1ZGIJCrhWBJhxy+yeKn LKQqnnTs/TCmeey6Hvq32GF9qIcNu1uXnp+v1oYbSqBOfcZItzht4x7uEJ7ep1YMweYr 0/eNr1j0J73Lxe1yWuzbLIU0hy+BFvQrFpnkJd9UAewSzxP5zvHI5qCRwN0QXlDSULKO QYhg== 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=w/oYrqJ2MVHAPXs4YEdRHbzeuMzFW5jeOoSN8M0D6iw=; b=MdT1el2fNjtxNry1uZLaIm4qvNB3CrvvIJuEDRKibIsLdOLv4pr/gSTMglQxdSf5vR WippDz4dSuDq5aVKWtdrKErFuX5MzELQYZgcwftZ0GicpAzA3hPVqZVLWsgJXaLXVGU6 F7r5YUba2zWoGsZjZvrEuQtG7CkwD4mdQvlmwgCwdFnOJXpCFL5AD9RwK4ONWCiJdvSW wOkgt7ZtT2H/84KCJ8fXhA+ZJWBlq6m7iowrkNhP9dlwJCrsWiAQhEFVowo92xw1zbov fCcET+Dq2EWQZt4M8cWZKxCVaYATkbL4BTnB4wOuVki8GHqv5ncE51XIVLyAv7la8JdJ 4BQQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=ligK2Xir; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bm18-20020a656e92000000b004fd0907ae7fsi3066641pgb.600.2023.03.11.16.56.33; Sat, 11 Mar 2023 16:56:47 -0800 (PST) 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=@amd.com header.s=selector1 header.b=ligK2Xir; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229922AbjCLAs3 (ORCPT + 99 others); Sat, 11 Mar 2023 19:48:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbjCLAsZ (ORCPT ); Sat, 11 Mar 2023 19:48:25 -0500 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on20615.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eab::615]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB11A6C1BB; Sat, 11 Mar 2023 16:47:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KO6BiT2HZSUxZ6bnGoO41T4uSqzazFal1MXQPGXS7z3SwUf3frh/Ky9BZM1iHRuzML2+uRn3/fCb5pUM6ceEu8gVizH2CQJzIHRo956G+fQsbJZt1JMWeFaiUgkyYO6W/SlX70x2xmb1xaEqg2kTpOKrm76HRdzsqbeaWpLj8Ze8f6eWTbmglf3t6H8byylGyfslIyoOmSPwuN7RJHpBFPx7tap7EGWlANnXXIORn4zgjnjfW8khPn6+8Y/5U+QWKj7zKTVHWNxndTTXHxojEiCqvKKp2gWYGsTXjTITBUBOiEo5EB9hZ3wL58kltTQGI6TF+a87GTu7agwLtEW8Yg== 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=w/oYrqJ2MVHAPXs4YEdRHbzeuMzFW5jeOoSN8M0D6iw=; b=GJHTVXTEKmhMYYnYRUurJfKaqcAFnlOo8jKKnucfyypAC3zVRDaYRTGMxR4wDYVgTPHtWR2qf3HVq6yNVsBumSpSCIZPpMSyb7/YkulG/tUgk1q6sedfXuDrAiCUTVA1rZ1N7SKdflwloDZKeeQKXFEyz15MlN28J7ASBRrcJrp7ZBHVaSXxxCpSGwQlHIcjg6UwAFfpTAa85X2rCXapacSXuXvKfAUy5HLGDocBS+DKAkyO9VKx6SbcXmWcEvuJwx9DjBlM8X2jZyjZ23Jc5cVIBw7awqgrtR278t/Nn7aEvuB1iBflSFfmSPCNQxL4FpU15cTOHRlLB7/Odw1FIg== 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=w/oYrqJ2MVHAPXs4YEdRHbzeuMzFW5jeOoSN8M0D6iw=; b=ligK2XiryWwl98gmWc70I1jFpFRcluF9nLIsAvlXCejI5n+iThCOYHUVdWO/aHVzDIbBEoM++wGMEePIsfIC7IUh20yRmqeAYeUATleaDIQi+I6VB0bmT+qkpMB7kofFwTMor1idCT2Y3eclDYjYyQyaxjIaOqdrbFbhILvRb+c= Received: from DS7PR05CA0003.namprd05.prod.outlook.com (2603:10b6:5:3b9::8) by CH3PR12MB7546.namprd12.prod.outlook.com (2603:10b6:610:149::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:47:08 +0000 Received: from DM6NAM11FT018.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b9:cafe::3) by DS7PR05CA0003.outlook.office365.com (2603:10b6:5:3b9::8) 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:08 +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 DM6NAM11FT018.mail.protection.outlook.com (10.13.172.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.18 via Frontend Transport; Sun, 12 Mar 2023 00:47: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:47:04 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 13/15] mmc: sdhci-cadence: Add AMD Pensando Elba SoC support Date: Sat, 11 Mar 2023 16:44:43 -0800 Message-ID: <20230312004445.15913-14-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: DM6NAM11FT018:EE_|CH3PR12MB7546:EE_ X-MS-Office365-Filtering-Correlation-Id: b3fa9872-e447-4905-d0c9-08db22934eda X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a0x1WnKBYB1up4RJvbRERridSnZoDqWn1YDzD9/2lSB7M5iU7xQ+gRebvU43tXd7Z5GJLGzM6HIqybY+mgnXlezs57RR7tr1H3RUn/mEQDmCZYinTmMGxGUkcouY8zurml1InPNTxX02vbBmJ2XoTTOw/NNh2+jcPnTHCIyt/IAxqVP3cJh+x9JeXclcosKpZYWe8CGOVb8+XTOzotecHLePk5Bb+5ERz0o/ETd+zlgwk6GqvV8VjnJ1WVDz3LsFIVrqwnBxWO8sps47u6qeCiNhCRAvEiA93PcgyfTaCmUVHM2Ka1EkJjkt5kuuD1RcmgzwrQGxmzdWzvbXPCnBBt5Oy7ZJYoTo/fVNOSwZvEe8DCfHs9KAjhfDGqmOKEiHZUnDPlTZCESlPnUsApXukTalq+pD2L/0d93jiQTywVK4H15l5Vctsm2Lb10ojQTPw4LoJepB6MUpjeNUyqTMAFoImsQ4Jd8CD79sVf9+Ktw9AXYlkiH1PSb5Pg4i9LMGgQx1Gc/pXyiirOxmzbkYkjZPM3dpMxJBmwKpR+PzEE7p6PjgGevMFh+RHSe93/YZuxzvcuEgPqWnNQISAbQ2aBfxKwvZ1oICDsu2QVshg/rC41Ot+1ytRjdp8wCUab81TM6kQgpdJgzJxT4BlVl1wiAgGydffnOyNhRqkWc/MFIdTmOmOveQTpyoMqbLkj6glxukDH/DqjRHKpRzJJkOsH83lGXjKkJNwaktI8XQUqM= 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)(346002)(376002)(39860400002)(451199018)(36840700001)(40470700004)(46966006)(336012)(83380400001)(478600001)(186003)(6666004)(16526019)(26005)(1076003)(70586007)(70206006)(316002)(54906003)(2616005)(426003)(47076005)(8676002)(6916009)(4326008)(41300700001)(36860700001)(8936002)(7406005)(5660300002)(7416002)(81166007)(40460700003)(2906002)(82740400003)(356005)(40480700001)(82310400005)(36756003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2023 00:47:08.0776 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b3fa9872-e447-4905-d0c9-08db22934eda 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: DM6NAM11FT018.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7546 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, SPF_NONE autolearn=ham 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?1760121436343869854?= X-GMAIL-MSGID: =?utf-8?q?1760121436343869854?= Add support for AMD Pensando Elba SoC which explicitly controls byte-lane enables on writes. Select MMC_SDHCI_IO_ACCESSORS for MMC_SDHCI_CADENCE which allows Elba SoC sdhci_elba_ops to overwrite the SDHCI IO memory accessors Signed-off-by: Brad Larson Acked-by: Adrian Hunter --- v11 changes: - Remove elba-drv_init() call to platform_get_resource() since that check is done inside devm_platform_ioremap_resource() - Move spin_lock_init() before error check - Remove extra parentheses v10 changes: - Add Elba specific support into this 3rd patch. This builds on the private writel() enabled in patch 1 followed by platform specific init() in patch 2. - Specify when first used the reason for the spinlock use to order byte-enable prior to write data. --- drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/sdhci-cadence.c | 96 ++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 4745fe217ade..9f793892123c 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -255,6 +255,7 @@ config MMC_SDHCI_CADENCE tristate "SDHCI support for the Cadence SD/SDIO/eMMC controller" depends on MMC_SDHCI_PLTFM depends on OF + select MMC_SDHCI_IO_ACCESSORS help This selects the Cadence SD/SDIO/eMMC driver. diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c index c528a25f48b8..c0024d1e69a8 100644 --- a/drivers/mmc/host/sdhci-cadence.c +++ b/drivers/mmc/host/sdhci-cadence.c @@ -66,6 +66,8 @@ struct sdhci_cdns_phy_param { struct sdhci_cdns_priv { void __iomem *hrs_addr; + void __iomem *ctl_addr; /* write control */ + spinlock_t wrlock; /* write lock */ bool enhanced_strobe; void (*priv_writel)(struct sdhci_cdns_priv *priv, u32 val, void __iomem *reg); unsigned int nr_phy_params; @@ -321,6 +323,89 @@ static void sdhci_cdns_set_uhs_signaling(struct sdhci_host *host, sdhci_set_uhs_signaling(host, timing); } +/* Elba control register bits [6:3] are byte-lane enables */ +#define ELBA_BYTE_ENABLE_MASK(x) ((x) << 3) + +/* + * The Pensando Elba SoC explicitly controls byte-lane enabling on writes + * which includes writes to the HRS registers. The write lock (wrlock) + * is used to ensure byte-lane enable, using write control (ctl_addr), + * occurs before the data write. + */ +static void elba_priv_writel(struct sdhci_cdns_priv *priv, u32 val, + void __iomem *reg) +{ + unsigned long flags; + + spin_lock_irqsave(&priv->wrlock, flags); + writel(ELBA_BYTE_ENABLE_MASK(0xf), priv->ctl_addr); + writel(val, reg); + spin_unlock_irqrestore(&priv->wrlock, flags); +} + +static void elba_write_l(struct sdhci_host *host, u32 val, int reg) +{ + elba_priv_writel(sdhci_cdns_priv(host), val, host->ioaddr + reg); +} + +static void elba_write_w(struct sdhci_host *host, u16 val, int reg) +{ + struct sdhci_cdns_priv *priv = sdhci_cdns_priv(host); + u32 byte_enables; + unsigned long flags; + + byte_enables = GENMASK(1, 0) << (reg & 0x3); + spin_lock_irqsave(&priv->wrlock, flags); + writel(ELBA_BYTE_ENABLE_MASK(byte_enables), priv->ctl_addr); + writew(val, host->ioaddr + reg); + spin_unlock_irqrestore(&priv->wrlock, flags); +} + +static void elba_write_b(struct sdhci_host *host, u8 val, int reg) +{ + struct sdhci_cdns_priv *priv = sdhci_cdns_priv(host); + u32 byte_enables; + unsigned long flags; + + byte_enables = BIT(0) << (reg & 0x3); + spin_lock_irqsave(&priv->wrlock, flags); + writel(ELBA_BYTE_ENABLE_MASK(byte_enables), priv->ctl_addr); + writeb(val, host->ioaddr + reg); + spin_unlock_irqrestore(&priv->wrlock, flags); +} + +static const struct sdhci_ops sdhci_elba_ops = { + .write_l = elba_write_l, + .write_w = elba_write_w, + .write_b = elba_write_b, + .set_clock = sdhci_set_clock, + .get_timeout_clock = sdhci_cdns_get_timeout_clock, + .set_bus_width = sdhci_set_bus_width, + .reset = sdhci_reset, + .set_uhs_signaling = sdhci_cdns_set_uhs_signaling, +}; + +static int elba_drv_init(struct platform_device *pdev) +{ + struct sdhci_host *host = platform_get_drvdata(pdev); + struct sdhci_cdns_priv *priv = sdhci_cdns_priv(host); + void __iomem *ioaddr; + + host->mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA; + spin_lock_init(&priv->wrlock); + + /* Byte-lane control register */ + ioaddr = devm_platform_ioremap_resource(pdev, 1); + if (IS_ERR(ioaddr)) + return PTR_ERR(ioaddr); + + priv->ctl_addr = ioaddr; + priv->priv_writel = elba_priv_writel; + writel(ELBA_BYTE_ENABLE_MASK(0xf), priv->ctl_addr); + + return 0; +} + static const struct sdhci_ops sdhci_cdns_ops = { .set_clock = sdhci_set_clock, .get_timeout_clock = sdhci_cdns_get_timeout_clock, @@ -337,6 +422,13 @@ static const struct sdhci_cdns_drv_data sdhci_cdns_uniphier_drv_data = { }, }; +static const struct sdhci_cdns_drv_data sdhci_elba_drv_data = { + .init = elba_drv_init, + .pltfm_data = { + .ops = &sdhci_elba_ops, + }, +}; + static const struct sdhci_cdns_drv_data sdhci_cdns_drv_data = { .pltfm_data = { .ops = &sdhci_cdns_ops, @@ -477,6 +569,10 @@ static const struct of_device_id sdhci_cdns_match[] = { .compatible = "socionext,uniphier-sd4hc", .data = &sdhci_cdns_uniphier_drv_data, }, + { + .compatible = "amd,pensando-elba-sd4hc", + .data = &sdhci_elba_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: 68235 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp521149wrd; Sat, 11 Mar 2023 17:11:40 -0800 (PST) X-Google-Smtp-Source: AK7set8P4lt8jvgUVT4VEh4iuEv52U7JHGsmEeYI8/QwVpMqlLZQZwb8f4h6QaskGI3UuFoeAfRu X-Received: by 2002:a17:90b:3742:b0:23b:3d6e:1cc with SMTP id ne2-20020a17090b374200b0023b3d6e01ccmr2115278pjb.32.1678583500663; Sat, 11 Mar 2023 17:11:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678583500; cv=pass; d=google.com; s=arc-20160816; b=YtiF34qJ9wfe5p7OsjuPrstKO61Xg9gjCRk+LlDAgDAiKd1/iSCMhKNTIo5KE99Ufj HQtkL2KzgLkfKUm3PACI6NrDYc8fIv8Q8s2VhYDjsvpliLiUGlP5Cnq3Wi+iyhCHKLFo xWq1a7NZ5b70FSriLUnh3g71wTrEXwlTmicM7pvc2O35jLGtqUAAJzMxPO2GcCfwEemW rqYkBMedN3WXipbi0girWErutxX8Jx9KS2sWe8Lr0YWcsqjdw8xTpTN9BIbWyq+rEAVj gSHeggXYqJOUv2QFsRcHY61F4P6CIH6liG7o+kbPuFlikf0g1z4m8mBBPylaoBb07T30 Fwiw== 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=ZVI1OZZMPiHNVrQddAKYxgPCAkOIkTxwqmQwe+IEi90=; b=Yw7147WW3uObawMJS8Vo8FBqBJyMwcbLK4nTE0y3E6At71/lJHP3/UAKj73lls/WL9 EKOE3YdQoVsCQwLPPRwCHlVYQNuhb2bxCx8EhKSe6uSuL6jmshyekN+rDgetzWDKbBmM Qh0OLEUH98YYp55lN7JlqsjPAcoq4EIqt9eOQiq55n7D/pdeHfhOq5QOPsxWhbE8A/2m bNqNw7oYGBjVp7Ua9RnIAluziu1ZFQjc44inoeNYUeCIAb3VQcvOXocYZQUUQXR2DW3h 8QrRSVRoei8tL6a1DkfE6XF/9XeRJ4q6jWJ5UHASN3rj0dJb07H+SxBL2Qu4s8RqHzR4 iqnQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=ANi6B1DG; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pf18-20020a17090b1d9200b0023b4d01f319si1069786pjb.75.2023.03.11.17.11.28; Sat, 11 Mar 2023 17:11:40 -0800 (PST) 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=@amd.com header.s=selector1 header.b=ANi6B1DG; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229915AbjCLAsu (ORCPT + 99 others); Sat, 11 Mar 2023 19:48:50 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, SPF_NONE autolearn=ham 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?1760122372880281243?= X-GMAIL-MSGID: =?utf-8?q?1760122372880281243?= 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; From patchwork Sun Mar 12 00:44:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Larson X-Patchwork-Id: 68240 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp524442wrd; Sat, 11 Mar 2023 17:24:17 -0800 (PST) X-Google-Smtp-Source: AK7set+z3AEa5xbxL2K7dNdcmNZj1sVDQqGfD4g/KKVR+Ad0b5+N5FjKJCfK/t0s8+49OvE9RvVW X-Received: by 2002:a17:90b:2245:b0:23a:6deb:adce with SMTP id hk5-20020a17090b224500b0023a6debadcemr6348990pjb.15.1678584257656; Sat, 11 Mar 2023 17:24:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678584257; cv=pass; d=google.com; s=arc-20160816; b=JQsTPjtj33BgYS7yMEXUBoemMtNFZehx1QPWPxOpvCV/JBT/lmQoKeJ6ARMzT03ZMD qdtMoAE7jrtLXsTblQTzYE6t5gmKKx9GLIdIIjsG9VkxYxTJ9FrhF5oGlIY2EJ8n96EF B60ZfidXJzmpzWLctOWLnUImBTqJB/t7mpap52vp8y2ZvZAPKVoAHR6zqSQ+iKChW+1O MdZG98hZGSBDQ1zg6MpHrl9zVHSRJrTHd9xvBkzZClxDiqSSC5llQGFLR46lllDnslye ZrvnVDQ85WhZd1WCr0Nr7hbCFvjMhRWHnB0Qn08d65ud498FkfZ/Mujl0Vk37sJ9nFRZ Wf/Q== 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=UJHwz4Eti0SCc5qDuoCWdPJiUcA36js2d2rTxGM1jmg=; b=MCS2eKlh1oI23h9iCSq3Mb8iqvDURW7wx1fYZVMV3DL2hYjVEO5+CFPUGR8g5dj4jT X4l2BWFjK+ZT7+LtWrToTsXzmINBRkOBZ71Ai3x+MjwGCecWN+zBE89DSiXYSicJpII7 wX9vWVV0riHZLKhlJ37xS8whTTOL28msmkBl8HbUjKr36roprvc6M3wv3d+6MFzg+EVz oIqc5wi7BWWgvkL9bo0NxKbmWis8YziLuMYPb08jhVt0J0Nndou0LEf3ZLKLnKWleqfL +9uU2Ex+KjVIE/2pkSirh+L+51WINBnYhOK3p2595dQI6ioIo0RK3+FM5Hh0pN8nKxRc ywvA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=oFhTY90t; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l63-20020a638842000000b004fbe9c0d3c8si3114111pgd.692.2023.03.11.17.24.04; Sat, 11 Mar 2023 17:24:17 -0800 (PST) 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=@amd.com header.s=selector1 header.b=oFhTY90t; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229950AbjCLAtB (ORCPT + 99 others); Sat, 11 Mar 2023 19:49:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229909AbjCLAs5 (ORCPT ); Sat, 11 Mar 2023 19:48:57 -0500 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2061a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe59::61a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 078A91B57F; Sat, 11 Mar 2023 16:48:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PNwU2JJQ5TL5QscihAgLVCX85WYgm5Og9A3iQ0HlxgEDBHyJTZr0994RdvRzGU6cxS+XYxiDHbI09ObIwqgpu8aAYufmeH1vFQnbCnyn454RSKBqz4Wk3ovOJS71peYI6hBA8ywVCtmo6j+snTzvkrNj4D0i6qoGeqtWnR1Mik+vjDYQw//sYG6Y7QiGhrfLj1k8CX0hlHt3ll+RNglWYHTP/7Fye1AWcz1aFnjLDpPAqGtkboJaKwjDJPzQAjsbACvwXqvrzttlajRQok1nrWLsF4G2eXWBtg5lgZ+Ub/kEUbOWobyRENi/mwgksgZcd6/BBjNo5hpyXeTGD1nIFg== 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=UJHwz4Eti0SCc5qDuoCWdPJiUcA36js2d2rTxGM1jmg=; b=UBjPtdxHzEQKH+UFDj3r6B/3tVGDd2ptxBxUw3Q/D42keKX7FqpK+ZFBmbcy7TZ/xV2F2I6dCUZJHfg0bze50xoltYySPd2jYUDPIkbL1XzMm2S+2wgKLTD/WwkGDJ/qDLNmUrzFnXQhTFBjA0gTmcMqb8vfQ0hkD7wLRgOmlyPf4OVnaXbWeOaNuvdXJ6JUKvpEL5rTVf1u/0SeQeTbaXCp0ArTDCcylk18H4RRCq3KCqW7hlX0AyrXqbBxdxlELFLOrNz4TODlE/bcRS4ZcgNtKjj4tvTqBtPINljjLU6AnBvJlXrSJ26RVLtijBAXS1QOtoWB2B2nT7yNyRTl/w== 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=UJHwz4Eti0SCc5qDuoCWdPJiUcA36js2d2rTxGM1jmg=; b=oFhTY90t18cR7LXr2JisdCVgH7iu27NRZqtAw6u6pICUzjOBfbLfpcUETUBNEIhFEwbbStSJODUENmE/5nnzYGkGvxuAb79j+JsD2sYpFClAbBtpvvBzuI0vS4KZ2HBXIOgf0Dv52PekZIJZJMm/2OEpaVIyP4hrbKlwHCNskq8= Received: from DM6PR21CA0019.namprd21.prod.outlook.com (2603:10b6:5:174::29) by CH0PR12MB5235.namprd12.prod.outlook.com (2603:10b6:610:d2::5) 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:47:25 +0000 Received: from DM6NAM11FT080.eop-nam11.prod.protection.outlook.com (2603:10b6:5:174:cafe::d6) by DM6PR21CA0019.outlook.office365.com (2603:10b6:5:174::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.15 via Frontend Transport; Sun, 12 Mar 2023 00:47:25 +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 DM6NAM11FT080.mail.protection.outlook.com (10.13.173.105) 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:25 +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:21 -0600 From: Brad Larson To: CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v11 15/15] soc: amd: Add support for AMD Pensando SoC Controller Date: Sat, 11 Mar 2023 16:44:45 -0800 Message-ID: <20230312004445.15913-16-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: DM6NAM11FT080:EE_|CH0PR12MB5235:EE_ X-MS-Office365-Filtering-Correlation-Id: 8af844c2-152f-4bde-cb95-08db2293591a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q2Z2Z/D1/fzczcTmSri9KMgHI6wNyLVrxXgfxuiu2aKQTqwvQiJUynOTSwoUx7UQX+6293i4MWNfz2N+47dDeeg4nN28E4+hDSHjI0XBTfV1kQnlrEufJAm1ZnG7KTzrFkGiknwUaJ4Dm2V3Z19gXmJUmovM1F/Bz1CXivJ9A7YVASMlKQKrS1QUw2Q3FSPrqiqaogzcDbf2uTFJyj+HwtqYcP7lPNWrq0tTfLpUvoe+EA276VXF70/Yk2a907Y5hBUSE8W4Pm3mZWp7IbqqMyAKrF23O1WaH6uIUv2Z4c04RilFVnRem4pMAvenjzFE0ndWmjkFp+LeyVUYvJOKpUVfw9W1Whu4CBQL7yOrRihh/9sfHrlBh+JPiY+3DG/LpdvpDWjAynCYTZPfM4uWGHIwxxEMT8otTdSVMGsZLUm5KXkY5QutmCPko4GcfsjhJDrVCDH9wG+ns6H03/Jm7AKDcVUqXGjNbnfRzNht0DhNmEMiKjlOHgBqyY8I3Nn2k+fJVz5xHiSgqgj8B5nl3knsq6Dh3wMHaKUkmTZI7UIh6Sk1ouIwFvrJPWbnhWfOyYCTspn6Egn6jjgbwEXEYEEG8pAihZC3Me2z1jeCspa31VGIaA/ne3Ky2gyFKAC9LYy1AABJNWl/eb3O22zkcTr565oWABXdVbUCM87IKpLIQ4fvG21M/wPAHX8kGensUL3dzTelkLpul9KXCvH+85mfAzZ/EUbRLlv6hoOiKLw= 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)(966005)(83380400001)(6666004)(36756003)(40460700003)(26005)(1076003)(30864003)(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:47:25.2897 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8af844c2-152f-4bde-cb95-08db2293591a 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: DM6NAM11FT080.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5235 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, SPF_NONE autolearn=ham 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?1760123166830837864?= X-GMAIL-MSGID: =?utf-8?q?1760123166830837864?= The Pensando SoC controller is a SPI connected companion device that is present in all Pensando SoC board designs. The essential board management registers are accessed on chip select 0 with board mgmt IO support accessed using additional chip selects. Signed-off-by: Brad Larson --- v11 changes: - Fix the compatible to be specific 'amd,pensando-elba-ctrl' - Cast arguments flagged with a gcc-12.1.0 warning: Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303061526.I8VPcR1M-lkp@intel.com/ v10 changes: - Different driver implementation specific to this Pensando controller device. - Moved to soc/amd directory under new name based on guidance. This driver is of no use to any design other than all Pensando SoC based cards. - Removed use of builtin_driver, can be built as a module. v9 changes: - Previously patch 14/17 - After the change to the device tree node and squashing reset-cells into the parent simplified this to not use any MFD API and move it to drivers/spi/pensando-sr.c. - Change the naming to remove elba since this driver is common for all Pensando SoC designs . - Default yes SPI_PENSANDO_SR for ARCH_PENSANDO --- drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/amd/Kconfig | 16 ++ drivers/soc/amd/Makefile | 2 + drivers/soc/amd/pensando-ctrl.c | 378 +++++++++++++++++++++++++ include/uapi/linux/amd-pensando-ctrl.h | 30 ++ 6 files changed, 428 insertions(+) create mode 100644 drivers/soc/amd/Kconfig create mode 100644 drivers/soc/amd/Makefile create mode 100644 drivers/soc/amd/pensando-ctrl.c create mode 100644 include/uapi/linux/amd-pensando-ctrl.h diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig index 4e176280113a..9e023f74e47c 100644 --- a/drivers/soc/Kconfig +++ b/drivers/soc/Kconfig @@ -2,6 +2,7 @@ menu "SOC (System On Chip) specific Drivers" source "drivers/soc/actions/Kconfig" +source "drivers/soc/amd/Kconfig" source "drivers/soc/amlogic/Kconfig" source "drivers/soc/apple/Kconfig" source "drivers/soc/aspeed/Kconfig" diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile index 3b0f9fb3b5c8..8914530f2721 100644 --- a/drivers/soc/Makefile +++ b/drivers/soc/Makefile @@ -4,6 +4,7 @@ # obj-$(CONFIG_ARCH_ACTIONS) += actions/ +obj-y += amd/ obj-y += apple/ obj-y += aspeed/ obj-$(CONFIG_ARCH_AT91) += atmel/ diff --git a/drivers/soc/amd/Kconfig b/drivers/soc/amd/Kconfig new file mode 100644 index 000000000000..9fc03de49f11 --- /dev/null +++ b/drivers/soc/amd/Kconfig @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0-only +menu "AMD Pensando SoC drivers" + +config AMD_PENSANDO_CTRL + tristate "AMD Pensando SoC Controller" + depends on SPI_MASTER=y + depends on (ARCH_PENSANDO && OF) || COMPILE_TEST + default y if ARCH_PENSANDO + select REGMAP_SPI + select MFD_SYSCON + help + Enables AMD Pensando SoC controller device support. This is a SPI + attached companion device in all Pensando SoC board designs which + provides essential board control/status registers and management IO + support. +endmenu diff --git a/drivers/soc/amd/Makefile b/drivers/soc/amd/Makefile new file mode 100644 index 000000000000..a2de0424f68d --- /dev/null +++ b/drivers/soc/amd/Makefile @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only +obj-$(CONFIG_AMD_PENSANDO_CTRL) += pensando-ctrl.o diff --git a/drivers/soc/amd/pensando-ctrl.c b/drivers/soc/amd/pensando-ctrl.c new file mode 100644 index 000000000000..4f1b2b1f5092 --- /dev/null +++ b/drivers/soc/amd/pensando-ctrl.c @@ -0,0 +1,378 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * AMD Pensando SoC Controller + * + * Userspace interface and reset driver support for SPI connected Pensando SoC + * controller device. This device is present in all Pensando SoC designs and + * contains board control/status regsiters and management IO support. + * + * Copyright 2023 Advanced Micro Devices, Inc. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct penctrl_device { + struct spi_device *spi_dev; + struct reset_controller_dev rcdev; +}; + +static DEFINE_MUTEX(spi_lock); +static dev_t penctrl_devt; +static struct penctrl_device *penctrl; +static struct class *penctrl_class; + +static long +penctrl_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) +{ + struct spi_transfer t[2] = { 0 }; + struct penctrl_device *penctrl; + struct penctrl_spi_xfer *msg; + struct spi_device *spi_dev; + unsigned int num_msgs; + struct spi_message m; + u8 tx_buf[PENCTRL_MAX_MSG_LEN]; + u8 rx_buf[PENCTRL_MAX_MSG_LEN]; + u32 size; + int ret; + + /* Check for a valid command */ + if (_IOC_TYPE(cmd) != PENCTRL_IOC_MAGIC) + return -ENOTTY; + + if (_IOC_NR(cmd) > PENCTRL_IOC_MAXNR) + return -ENOTTY; + + if (_IOC_DIR(cmd) & _IOC_READ) + ret = !access_ok((void __user *)arg, _IOC_SIZE(cmd)); + else if (_IOC_DIR(cmd) & _IOC_WRITE) + ret = !access_ok((void __user *)arg, _IOC_SIZE(cmd)); + + if (ret) + return -EFAULT; + + /* Get a reference to the SPI device */ + penctrl = filp->private_data; + if (!penctrl) + return -ESHUTDOWN; + + spi_dev = spi_dev_get(penctrl->spi_dev); + if (!spi_dev) + return -ESHUTDOWN; + + /* Verify and prepare spi message */ + size = _IOC_SIZE(cmd); + if ((size % sizeof(struct penctrl_spi_xfer)) != 0) { + ret = -EINVAL; + goto done; + } + num_msgs = size / sizeof(struct penctrl_spi_xfer); + if (num_msgs == 0) { + ret = -EINVAL; + goto done; + } + msg = memdup_user((struct penctrl_spi_xfer __user *)arg, size); + if (!msg) { + ret = PTR_ERR(msg); + goto done; + } + if (msg->len > PENCTRL_MAX_MSG_LEN) { + ret = -EINVAL; + goto done; + } + + t[0].tx_buf = tx_buf; + t[0].len = msg->len; + if (copy_from_user((void *)tx_buf, (void __user *)msg->tx_buf, msg->len)) { + ret = -EFAULT; + goto done; + } + if (num_msgs > 1) { + msg++; + if (msg->len > PENCTRL_MAX_MSG_LEN) { + ret = -EINVAL; + goto done; + } + t[1].rx_buf = rx_buf; + t[1].len = msg->len; + } + spi_message_init_with_transfers(&m, t, num_msgs); + + /* Perform the transfer */ + mutex_lock(&spi_lock); + ret = spi_sync(spi_dev, &m); + mutex_unlock(&spi_lock); + + if (ret || (num_msgs == 1)) + goto done; + + if (copy_to_user((void __user *)msg->rx_buf, (void *)rx_buf, msg->len)) + ret = -EFAULT; + +done: + spi_dev_put(spi_dev); + return ret; +} + +static int penctrl_open(struct inode *inode, struct file *filp) +{ + struct spi_device *spi_dev; + u8 current_cs; + + if (!penctrl) + return -ENODEV; + + filp->private_data = penctrl; + current_cs = iminor(inode); + spi_dev = penctrl->spi_dev; + spi_dev->chip_select = current_cs; + spi_dev->cs_gpiod = spi_dev->controller->cs_gpiods[current_cs]; + spi_setup(spi_dev); + stream_open(inode, filp); + + return 0; +} + +static int penctrl_release(struct inode *inode, struct file *filp) +{ + filp->private_data = NULL; + return 0; +} + +static const struct file_operations penctrl_fops = { + .owner = THIS_MODULE, + .unlocked_ioctl = penctrl_ioctl, + .open = penctrl_open, + .release = penctrl_release, + .llseek = no_llseek, +}; + +static int penctrl_regs_read(struct penctrl_device *penctrl, u32 reg, u32 *val) +{ + struct spi_device *spi_dev = penctrl->spi_dev; + struct spi_transfer t[2] = { 0 }; + struct spi_message m; + u8 txbuf[3]; + u8 rxbuf[1]; + int ret; + + txbuf[0] = PENCTRL_SPI_CMD_REGRD; + txbuf[1] = reg; + txbuf[2] = 0x0; + t[0].tx_buf = txbuf; + t[0].len = 3; + + rxbuf[0] = 0x0; + t[1].rx_buf = rxbuf; + t[1].len = 1; + + spi_message_init_with_transfers(&m, t, ARRAY_SIZE(t)); + ret = spi_sync(spi_dev, &m); + if (ret == 0) + *val = rxbuf[0]; + + return ret; +} + +static int penctrl_regs_write(struct penctrl_device *penctrl, u32 reg, u32 val) +{ + struct spi_device *spi_dev = penctrl->spi_dev; + struct spi_transfer t[1] = { 0 }; + struct spi_message m; + u8 txbuf[4]; + int ret; + + txbuf[0] = PENCTRL_SPI_CMD_REGWR; + txbuf[1] = reg; + txbuf[2] = val; + txbuf[3] = 0; + + t[0].tx_buf = txbuf; + t[0].len = 4; + spi_message_init_with_transfers(&m, t, ARRAY_SIZE(t)); + ret = spi_sync(spi_dev, &m); + return ret; +} + +static int penctrl_reset_assert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct penctrl_device *penctrl = + container_of(rcdev, struct penctrl_device, rcdev); + struct spi_device *spi_dev = penctrl->spi_dev; + unsigned int val; + int ret; + + mutex_lock(&spi_lock); + spi_dev->chip_select = 0; + spi_dev->cs_gpiod = spi_dev->controller->cs_gpiods[0]; + spi_setup(spi_dev); + ret = penctrl_regs_read(penctrl, PENCTRL_REG_CTRL0, &val); + if (ret) { + dev_err(&spi_dev->dev, "error reading ctrl0 reg\n"); + goto done; + } + + val |= BIT(6); + ret = penctrl_regs_write(penctrl, PENCTRL_REG_CTRL0, val); + if (ret) + dev_err(&spi_dev->dev, "error writing ctrl0 reg\n"); + +done: + mutex_unlock(&spi_lock); + return ret; +} + +static int penctrl_reset_deassert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct penctrl_device *penctrl = + container_of(rcdev, struct penctrl_device, rcdev); + struct spi_device *spi_dev = penctrl->spi_dev; + unsigned int val; + int ret; + + mutex_lock(&spi_lock); + spi_dev->chip_select = 0; + spi_dev->cs_gpiod = spi_dev->controller->cs_gpiods[0]; + spi_setup(spi_dev); + ret = penctrl_regs_read(penctrl, PENCTRL_REG_CTRL0, &val); + if (ret) { + dev_err(&spi_dev->dev, "error reading ctrl0 reg\n"); + goto done; + } + + val &= ~BIT(6); + ret = penctrl_regs_write(penctrl, PENCTRL_REG_CTRL0, val); + if (ret) + dev_err(&spi_dev->dev, "error writing ctrl0 reg\n"); + +done: + mutex_unlock(&spi_lock); + return ret; +} + +static const struct reset_control_ops penctrl_reset_ops = { + .assert = penctrl_reset_assert, + .deassert = penctrl_reset_deassert, +}; + +static int penctrl_spi_probe(struct spi_device *spi_dev) +{ + struct device_node *np; + struct device *dev; + struct cdev *cdev; + u32 num_cs; + int ret; + u32 cs; + + np = spi_dev->dev.parent->of_node; + ret = of_property_read_u32(np, "num-cs", &num_cs); + if (ret) + return dev_err_probe(&spi_dev->dev, ret, + "number of chip-selects not defined"); + + ret = alloc_chrdev_region(&penctrl_devt, 0, num_cs, "penctrl"); + if (ret) + return dev_err_probe(&spi_dev->dev, ret, + "failed to alloc chrdev region\n"); + + penctrl_class = class_create(THIS_MODULE, "penctrl"); + if (IS_ERR(penctrl_class)) { + unregister_chrdev(MAJOR(penctrl_devt), "penctrl"); + return dev_err_probe(&spi_dev->dev, PTR_ERR(penctrl_class), + "failed to create class\n"); + } + + cdev = cdev_alloc(); + if (!cdev) { + dev_err(&spi_dev->dev, "allocation of cdev failed"); + ret = -ENOMEM; + goto cdev_failed; + } + cdev->owner = THIS_MODULE; + cdev_init(cdev, &penctrl_fops); + + ret = cdev_add(cdev, penctrl_devt, num_cs); + if (ret) { + dev_err(&spi_dev->dev, "register of cdev failed"); + goto cdev_delete; + } + + /* Allocate driver data */ + penctrl = kzalloc(sizeof(*penctrl), GFP_KERNEL); + if (!penctrl) { + ret = -ENOMEM; + dev_err(&spi_dev->dev, "allocate driver data failed"); + goto cdev_delete; + } + + penctrl->spi_dev = spi_dev; + mutex_init(&spi_lock); + + /* Create a device for each chip select */ + for (cs = 0; cs < num_cs; cs++) { + dev = device_create(penctrl_class, + &spi_dev->dev, + MKDEV(MAJOR(penctrl_devt), cs), + penctrl, + "penctrl0.%d", + cs); + if (IS_ERR(dev)) { + ret = IS_ERR(dev); + dev_err(&spi_dev->dev, "error creating device\n"); + goto cdev_delete; + } + dev_dbg(&spi_dev->dev, "created device major %u, minor %d\n", + MAJOR(penctrl_devt), cs); + } + + spi_set_drvdata(spi_dev, penctrl); + + /* Register emmc hardware reset */ + penctrl->rcdev.nr_resets = 1; + penctrl->rcdev.owner = THIS_MODULE; + penctrl->rcdev.dev = &spi_dev->dev; + penctrl->rcdev.ops = &penctrl_reset_ops; + penctrl->rcdev.of_node = spi_dev->dev.of_node; + ret = reset_controller_register(&penctrl->rcdev); + if (ret) + return dev_err_probe(&spi_dev->dev, ret, + "failed to register reset controller\n"); + return ret; + +cdev_delete: + cdev_del(cdev); +cdev_failed: + device_destroy(penctrl_class, penctrl_devt); + return ret; +} + +static const struct of_device_id penctrl_dt_match[] = { + { .compatible = "amd,pensando-elba-ctrl" }, + { /* sentinel */ } +}; + +static struct spi_driver penctrl_spi_driver = { + .probe = penctrl_spi_probe, + .driver = { + .name = "pensando-ctrl", + .of_match_table = penctrl_dt_match, + }, +}; +module_spi_driver(penctrl_spi_driver); + +MODULE_AUTHOR("Brad Larson "); +MODULE_DESCRIPTION("AMD Pensando SoC Controller via SPI"); +MODULE_LICENSE("GPL"); diff --git a/include/uapi/linux/amd-pensando-ctrl.h b/include/uapi/linux/amd-pensando-ctrl.h new file mode 100644 index 000000000000..0a6caf3b764c --- /dev/null +++ b/include/uapi/linux/amd-pensando-ctrl.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * Userspace interface for /dev/penctrl + * + * This file can be used by applications that need to communicate + * with the AMD Pensando SoC controller device via the ioctl interface. + */ +#ifndef _UAPI_LINUX_AMD_PENSANDO_CTRL_H +#define _UAPI_LINUX_AMD_PENSANDO_CTRL_H + +#include +#include + +#define PENCTRL_SPI_CMD_REGRD 0x0b +#define PENCTRL_SPI_CMD_REGWR 0x02 +#define PENCTRL_IOC_MAGIC 'k' +#define PENCTRL_IOC_MAXNR 0 +#define PENCTRL_MAX_MSG_LEN 16 +#define PENCTRL_MAX_REG 0xff +#define PENCTRL_REG_CTRL0 0x10 + +struct penctrl_spi_xfer { + __u64 tx_buf; + __u64 rx_buf; + __u32 len; + __u32 speed_hz; + __u64 compat; +}; + +#endif /* _UAPI_LINUX_AMD_PENSANDO_CTRL_H */