From patchwork Thu Jul 21 06:09:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Saba Kareem, Syed" X-Patchwork-Id: 12925505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12D1BC43334 for ; Thu, 21 Jul 2022 16:02:25 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4718C181A; Thu, 21 Jul 2022 18:01:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4718C181A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658419343; bh=C+2m0lvUPmxDt/OqOAv9wGwjp66pnVDm0izFADlIPdE=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Zwd3hTBq1ZAwUuHds8DgWOQAbcIk0+DNAS9E6+tBr3uK0CfhHURT7vtRKeT5432my UjNkw9lVUrEu8/22citZdzIgWMpHNY5v/FLE0qoI0h+zBpxxkhL1r+qOcw7dolwdG2 65TcMsx6949GnRhOyUTJTRqXEr+iT47URX35i8C4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2E3B3F805AE; Thu, 21 Jul 2022 17:58:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 47026F8016D; Thu, 21 Jul 2022 08:12:21 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2088.outbound.protection.outlook.com [40.107.95.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CC14FF80166 for ; Thu, 21 Jul 2022 08:12:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CC14FF80166 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="jpYMnvll" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O3z3njbO7p5GsB8MbgghfSi80X5NmHMH8bsu8MSvK+b8+//aO7lsP4o9iAtMNqgyEfAftZyY6uIfa1lIeyk5g5TpuIK/T54FQpCh4c8CRC8Q0sRNLeCrLLW76fmagOvEXdgzguh/jCO+yMX30iaCzl1jhHCWejWnL2sTC8oA1DyLqvZByu5uDh8/tL2LbKRPVHjDdXeMyttlt8IlUHdaQlQHOrAJdnOfwgCmUnZuxTBtj/86ZCOle1hTls4JZiPwnB8vB70ZxiXYRWBX+0ZegTn4QXRilpgx4fNy3vRTNF0ItNCyOTp4NW+DfQrBFZMPCbXhYGIet4BVubYW2PUFKQ== 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=Lu7WtA8VLq4PLBGahhMcFZEooeKZAuO8ByqFi67DHjI=; b=KZiw3Pgq2d9Eu7AuO1tNYaTo1jdrm+ty2VmIB2Y3hHZOmIGem6q35VaPGSu8tzEat2wmy4PvmZSlDm7OuUl+i3H8Ixb6qzjnmJCyf/wnsbQ0q4OsJPJsYIbS7oVAkXfGat46UERpDFS9vrEZKGM7DUC+F9w5lHLlmkkXT5+B1u5bEDpld1vA7A/RQN+zWY5UAoBHXFZZvgo1lzKtp+07jmjSrFwbbqCFdJltu37SlkMTvLHs70PwHqYQ7Q06Yv5ARn1LhA9EmfjcuMtHh2galPxyRlTmENteHJZFYG2vyg32MabWKhfapnWbGmpBlQWmUB6wMXVgc050S5ei8GoR1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.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=Lu7WtA8VLq4PLBGahhMcFZEooeKZAuO8ByqFi67DHjI=; b=jpYMnvllZwcmOk9ikHfpIn3ke/KpvJUFm1eV0LvjRxMxNaMLmAF7KeJGVggbdJb5UVGeGjPruaJ+1jssFY2LFzMx5oFBbxl9f9ZTDomWMNLcVbv+71ZtI8+GpJhDTOYc0yT7rwMUlwdthaCNVZSrAeD/TiCNDSj1sNNSwWtY8E4= Received: from BN9PR03CA0353.namprd03.prod.outlook.com (2603:10b6:408:f6::28) by BL1PR12MB5192.namprd12.prod.outlook.com (2603:10b6:208:311::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Thu, 21 Jul 2022 06:12:06 +0000 Received: from BN8NAM11FT044.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f6:cafe::c) by BN9PR03CA0353.outlook.office365.com (2603:10b6:408:f6::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23 via Frontend Transport; Thu, 21 Jul 2022 06:12:06 +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 BN8NAM11FT044.mail.protection.outlook.com (10.13.177.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5458.17 via Frontend Transport; Thu, 21 Jul 2022 06:12:05 +0000 Received: from SATLEXMB08.amd.com (10.181.40.132) 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.28; Thu, 21 Jul 2022 01:12:05 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB08.amd.com (10.181.40.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 20 Jul 2022 23:12:04 -0700 Received: from amd-Z97X-UD7-TH.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Thu, 21 Jul 2022 01:11:56 -0500 From: syed sabakareem To: , Subject: [PATCH 1/5] ASoC: amd: add RPL Platform acp header file Date: Thu, 21 Jul 2022 11:39:58 +0530 Message-ID: <20220721061035.91139-1-Syed.SabaKareem@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2258de3e-2e35-41d9-7f81-08da6adfefc5 X-MS-TrafficTypeDiagnostic: BL1PR12MB5192:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dkbMXHek0t3oayC0sD9J0LVxvBKbnp4Dpfa9JIi9+49BwWpD836rdrzky5uc7ec7reE8iQHllDHyvIbpVLlVaSDTYc8h4gBslP++TsK9eR9jkgBBnXVE0dh2JM+PCo9xllQfI6OV4dbnfOov4XgeG/fAWST8sJxwpCPGtHx1nvH/EH3KRnFGvMgQRNL4uriEqk91T68/AXHEUZ0BufzgYwD9sbVa8l6fj/nPDS7P2sHQYQOY5PC5D8BZuQjBPUhu6msIsUwUWYgXkJF6+MlwpwWlbBcUarAniy4uH1dRZMdiT4+MVKv42M/f3Mz5f6wiiHNs6yQWhFpSFs6pK9623k6LszT7Tf+l4n48vAvkulc5cHBXqYG5eCfV9ZWU7vlHUg6wfpeRW3Cfy4mkm72EPIz/OMISvCaNYCWwc0W4gsvlPy8nbUhtSW2XpzivUGBMscISIArX8MuDHJYuVbEYtu0Anj6Z+nO00Q+yxYt6y5KvYa5JWO02Uwm49eZbFBbTPgNGEKUk38ERUBTS5Kt0PbgNMZr65H9Jp4LLsYzAcazSvq7VeaS9++iivf848UdsB8VmNpdwJ9FIFVn7KpijvYPEtZX1qDYr52Q6q5+jYofFdvLkZAknMM9YXe6zPAG/siuH7wyg+YUmdNOOpJ4G47j4T1xjRnoccKF0hgWN/4JgwBlC4DuZEI+5BvyHS4ZjqUuW+MaZ2FGMB4fdMV8HOLodRg+gP7pMrGFHg8mVK1xTqqzlCMPwBDkg/UFEQ1AgLpTPWhNE3r8QU7OrtXXUf+rwfAoXS59Hxrgtbg5Fa+4ccHwwYTfeNNPXqMQ0LfUskEe48AwoYcKKxxKe9/uzdA== 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:(13230016)(4636009)(39860400002)(346002)(396003)(136003)(376002)(36840700001)(40470700004)(46966006)(26005)(7696005)(2906002)(41300700001)(86362001)(40460700003)(70586007)(478600001)(82310400005)(5660300002)(8936002)(2616005)(1076003)(186003)(83380400001)(336012)(47076005)(426003)(82740400003)(356005)(36860700001)(40480700001)(81166007)(4326008)(8676002)(36756003)(316002)(70206006)(110136005)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2022 06:12:05.8670 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2258de3e-2e35-41d9-7f81-08da6adfefc5 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: BN8NAM11FT044.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5192 X-Mailman-Approved-At: Thu, 21 Jul 2022 17:58:02 +0200 Cc: Sunil-kumar.Dommati@amd.com, open list , Basavaraj.Hiregoudar@amd.com, Takashi Iwai , Liam Girdwood , Syed Saba Kareem , Vijendar Mukunda , Alexander.Deucher@amd.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Syed Saba Kareem Add ACP register header file for RPL platform. Signed-off-by: Syed Saba Kareem Reviewed-by: Vijendar Mukunda --- .../soc/amd/rpl/rpl_acp6x_chip_offset_byte.h | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sound/soc/amd/rpl/rpl_acp6x_chip_offset_byte.h diff --git a/sound/soc/amd/rpl/rpl_acp6x_chip_offset_byte.h b/sound/soc/amd/rpl/rpl_acp6x_chip_offset_byte.h new file mode 100644 index 000000000000..456498f5396d --- /dev/null +++ b/sound/soc/amd/rpl/rpl_acp6x_chip_offset_byte.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * AMD ACP 6.2 Register Documentation + * + * Copyright 2022 Advanced Micro Devices, Inc. + */ + +#ifndef _rpl_acp6x_OFFSET_HEADER +#define _rpl_acp6x_OFFSET_HEADER + +/* Registers from ACP_CLKRST block */ +#define ACP_SOFT_RESET 0x1241000 +#define ACP_CONTROL 0x1241004 +#define ACP_STATUS 0x1241008 +#define ACP_DYNAMIC_CG_MASTER_CONTROL 0x1241010 +#define ACP_PGFSM_CONTROL 0x124101C +#define ACP_PGFSM_STATUS 0x1241020 +#define ACP_CLKMUX_SEL 0x1241024 + +/* Registers from ACP_AON block */ +#define ACP_PME_EN 0x1241400 +#define ACP_DEVICE_STATE 0x1241404 +#define AZ_DEVICE_STATE 0x1241408 +#define ACP_PIN_CONFIG 0x1241440 +#define ACP_PAD_PULLUP_CTRL 0x1241444 +#define ACP_PAD_PULLDOWN_CTRL 0x1241448 +#define ACP_PAD_DRIVE_STRENGTH_CTRL 0x124144C +#define ACP_PAD_SCHMEN_CTRL 0x1241450 + +#endif From patchwork Thu Jul 21 06:09:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Saba Kareem, Syed" X-Patchwork-Id: 12925506 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9636DC433EF for ; Thu, 21 Jul 2022 16:02:39 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BCB751883; Thu, 21 Jul 2022 18:01:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BCB751883 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658419357; bh=hHB51t451K7zLgSRHMUqFck0oFyKBf61aMmb74b1h2E=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PqBJh+f+E/teZzi14G25xPagm+oiaeBts9X+COYoAEKrt2bvrVi5HBNAr/BT2Xacl 7J/rJXubjCRaX+/0a1zTKeS0YCbJ7JIfgGAsXRtrBWaIRlET6Opbia1usmbTmAWbGw MuCDIMDIZQtDU1FZ/3gMUc8buEh9vIVjQ1/REbNY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C7089F805B0; Thu, 21 Jul 2022 17:58:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F2A9DF800BA; Thu, 21 Jul 2022 08:12:36 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2042.outbound.protection.outlook.com [40.107.220.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 98C03F800BA for ; Thu, 21 Jul 2022 08:12:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 98C03F800BA Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="GKQzyVPY" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mpzMyf0mJQsMBWNml383oXi95mrubanbPCKzI4Qmo31kw7FFu/botFKG+FH/pYeI0/vVPpys2ERg+2/XYkq+UDlb4waj/1TqlYAgf0cDWY5kqIViOpdUTs+HpDZJYmeXTRIIt1oKSNDh7YhCdpQWA2oLC5Omn4OlNTkn24wy7KhJLQyqgx+tMzTbqH0+eX2iO2hdY0RLSEvFpw7cMNMWK9zl5klDeeotLCpf2lGef4LUzcwvaKdz9HGGNwaMh5dMkoH2fX7lfR/M03llWCmgGnCM1b8Qf0ctIL3YSJPk5p3dsFeGbRNsMMpO98k7h7ukYdzO3PUrWi5vS25JLNCo7Q== 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=4rTEUPV/2gLD5QzgU2hYcduG5fsy8OER+SeUVUSxNY8=; b=Yv+fXbnlRGbAAh2psDuTRWmjuxauV7dluSC1yXhHhVSFLGG0/m4dSHa8mRv/lS5JJuvRdsVyAW4wttuOaNSl2hiCcRtiWF+G/dob2qsqqkUraAYG7bBr99mzkj52NQ7MslaChBnXrCLSzij5w/Ym/wAbqdrx7pf9dVa8xNk5dfLG1zrGsGgZMQHXxhywJuwZmRviTkVawilUsPg/TCodwyZvkxDGfibKp97DBjR1Es2bcGhZbqh4dXMSbYctH6778ZMV++0KDhdEVOd2rHwlGvBTj0QeMYF2nF9NfvPT5zJozwT4kjqO9FwZWr8k1gYba2OYTamZaHY6GJQY/PXMCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.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=4rTEUPV/2gLD5QzgU2hYcduG5fsy8OER+SeUVUSxNY8=; b=GKQzyVPYGBw1gme7fR3JmfmRHhuhdaKTPmg3LNVQUisZInRnAWipo4Cm2Motj9I2Al8b+4P/eGVbdgvskPI65/RHrkXyq0C1LuuaaNDHeLKnM8z5iNwa9jxrGybB+yEwjVMlpEG4peNQNpsXx17OIiyge49QxovUmBWd8+CTWLA= Received: from MW4PR03CA0331.namprd03.prod.outlook.com (2603:10b6:303:dc::6) by MN2PR12MB4253.namprd12.prod.outlook.com (2603:10b6:208:1de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Thu, 21 Jul 2022 06:12:20 +0000 Received: from CO1NAM11FT036.eop-nam11.prod.protection.outlook.com (2603:10b6:303:dc:cafe::9b) by MW4PR03CA0331.outlook.office365.com (2603:10b6:303:dc::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23 via Frontend Transport; Thu, 21 Jul 2022 06:12:20 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CO1NAM11FT036.mail.protection.outlook.com (10.13.174.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5458.17 via Frontend Transport; Thu, 21 Jul 2022 06:12:19 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 21 Jul 2022 01:12:19 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 21 Jul 2022 01:12:18 -0500 Received: from amd-Z97X-UD7-TH.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Thu, 21 Jul 2022 01:12:10 -0500 From: syed sabakareem To: , Subject: [PATCH 2/5] ASoC: amd: add ACP PCI driver for RPL platform Date: Thu, 21 Jul 2022 11:39:59 +0530 Message-ID: <20220721061035.91139-2-Syed.SabaKareem@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220721061035.91139-1-Syed.SabaKareem@amd.com> References: <20220721061035.91139-1-Syed.SabaKareem@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bf4a2b86-5ca0-4f67-c63d-08da6adff829 X-MS-TrafficTypeDiagnostic: MN2PR12MB4253:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U9hrSXjJsSkV+OrDCyaOzAa+Kd4SlSP+FbCQO08cWJ+S5DxDUYd6Pg1FqvZMif14RsoKYL6tZJhQDp35QxBjYQw9a/YPBD/DMrf3Ey6X+VT2TdunMOIwtbgemVVrD0N0jiEBU24uccL0++KoLC7UEvpyIwiKz/eolw9bMI453UNP7WSNh2YnCOyv1JRu0Ang+dI7PSKKHWlnUQIzGgUEpfzm2BpVaiiJ6AMCwym1r6dt+q6n6Mr5Ftkh0FlaOSADRqWPlg9FKbkzRrZ+9mJhmjd/QUVCInjtL830YFKHIxONj5PB89RaJUYltCjVijuLvkl7xB6rKOzcbMGZw4T5tcsUqYJLgxudLAtIr6heOK145DpshswJvmE0D54fRJOix/6JOuIq7ZU/Aw4omOIGV7Peygg2i0uSBr3IiqXMkfFP1KQDnR6LAHsZgaWxTbHsFevSgnXf+a6gFbKh8pxurWqN07Nth/Hhl8LmVlcDTyM7obXhgWuyyMX4T8KgSs843gUdvfa9WLXdaNWFiPgvR+qHj6vlyzNgnv+EKDJd4s0HsqRZUgfkIlWzlazchlb5loNF7XzDG9/aVJKmUQG0oBvQb/RkKHe0WXj1slTkrgb8SYdBGBFySbXs14kFJ1ljXv2ugrZU4pZgQFNAsxQz8aHK2hi9whHRJY0RDR08n9V43Vnzj1R6o1aEebFsH4Fj3L8qF24ZR9OskwW5MYWgjoeLDqIRVomg0cEgaaSihSTaEd5IsV7pWO46iMfrVy5dBX6LFNuKZLC9eEpQWkiTeUHKVzhS0L66pK5ljG3QATS6ULkN/ZN7fxzGSCjVISGpiW632496ndQwyixOPzTK+Q== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(136003)(376002)(346002)(396003)(36840700001)(46966006)(40470700004)(356005)(70206006)(82740400003)(8676002)(83380400001)(426003)(186003)(2616005)(47076005)(1076003)(336012)(70586007)(5660300002)(2906002)(4326008)(36756003)(8936002)(7696005)(316002)(40460700003)(82310400005)(6666004)(26005)(41300700001)(36860700001)(81166007)(478600001)(40480700001)(86362001)(54906003)(110136005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2022 06:12:19.8210 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf4a2b86-5ca0-4f67-c63d-08da6adff829 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT036.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4253 X-Mailman-Approved-At: Thu, 21 Jul 2022 17:58:02 +0200 Cc: Sunil-kumar.Dommati@amd.com, open list , Basavaraj.Hiregoudar@amd.com, Takashi Iwai , Liam Girdwood , Syed Saba Kareem , Vijendar Mukunda , Alexander.Deucher@amd.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Syed Saba Kareem ACP is a PCI audio device. This patch adds PCI driver to bind to this device and get PCI resources. Signed-off-by: Syed Saba Kareem Reviewed-by: Vijendar Mukunda --- sound/soc/amd/rpl/rpl-pci-acp6x.c | 95 +++++++++++++++++++++++++++++++ sound/soc/amd/rpl/rpl_acp6x.h | 21 +++++++ 2 files changed, 116 insertions(+) create mode 100644 sound/soc/amd/rpl/rpl-pci-acp6x.c create mode 100644 sound/soc/amd/rpl/rpl_acp6x.h diff --git a/sound/soc/amd/rpl/rpl-pci-acp6x.c b/sound/soc/amd/rpl/rpl-pci-acp6x.c new file mode 100644 index 000000000000..7a82a978cf24 --- /dev/null +++ b/sound/soc/amd/rpl/rpl-pci-acp6x.c @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * AMD RPL ACP PCI Driver + * + * Copyright 2022 Advanced Micro Devices, Inc. + */ + +#include +#include +#include +#include +#include + +#include "rpl_acp6x.h" + +struct rpl_dev_data { + void __iomem *acp6x_base; +}; + +static int snd_rpl_probe(struct pci_dev *pci, + const struct pci_device_id *pci_id) +{ + struct rpl_dev_data *adata; + u32 addr; + int ret; + + /* RPL device check */ + switch (pci->revision) { + case 0x62: + break; + default: + dev_dbg(&pci->dev, "acp6x pci device not found\n"); + return -ENODEV; + } + if (pci_enable_device(pci)) { + dev_err(&pci->dev, "pci_enable_device failed\n"); + return -ENODEV; + } + + ret = pci_request_regions(pci, "AMD ACP6x audio"); + if (ret < 0) { + dev_err(&pci->dev, "pci_request_regions failed\n"); + goto disable_pci; + } + + adata = devm_kzalloc(&pci->dev, sizeof(struct rpl_dev_data), + GFP_KERNEL); + if (!adata) { + ret = -ENOMEM; + goto release_regions; + } + + addr = pci_resource_start(pci, 0); + adata->acp6x_base = devm_ioremap(&pci->dev, addr, + pci_resource_len(pci, 0)); + if (!adata->acp6x_base) { + ret = -ENOMEM; + goto release_regions; + } + pci_set_master(pci); + pci_set_drvdata(pci, adata); + return 0; +release_regions: + pci_release_regions(pci); +disable_pci: + pci_disable_device(pci); + + return ret; +} + +static void snd_rpl_remove(struct pci_dev *pci) +{ + pci_release_regions(pci); + pci_disable_device(pci); +} + +static const struct pci_device_id snd_rpl_ids[] = { + { PCI_DEVICE(PCI_VENDOR_ID_AMD, ACP_DEVICE_ID), + .class = PCI_CLASS_MULTIMEDIA_OTHER << 8, + .class_mask = 0xffffff }, + { 0, }, +}; +MODULE_DEVICE_TABLE(pci, snd_rpl_ids); + +static struct pci_driver rpl_acp6x_driver = { + .name = KBUILD_MODNAME, + .id_table = snd_rpl_ids, + .probe = snd_rpl_probe, + .remove = snd_rpl_remove, +}; + +module_pci_driver(rpl_acp6x_driver); + +MODULE_DESCRIPTION("AMD ACP RPL PCI driver"); +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/amd/rpl/rpl_acp6x.h b/sound/soc/amd/rpl/rpl_acp6x.h new file mode 100644 index 000000000000..5de19d5c892e --- /dev/null +++ b/sound/soc/amd/rpl/rpl_acp6x.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * AMD ACP Driver + * + * Copyright (C) 2021 Advanced Micro Devices, Inc. All rights reserved. + */ + +#include "rpl_acp6x_chip_offset_byte.h" + +#define ACP_DEVICE_ID 0x15E2 +#define ACP6x_PHY_BASE_ADDRESS 0x1240000 + +static inline u32 rpl_acp_readl(void __iomem *base_addr) +{ + return readl(base_addr - ACP6x_PHY_BASE_ADDRESS); +} + +static inline void rpl_acp_writel(u32 val, void __iomem *base_addr) +{ + writel(val, base_addr - ACP6x_PHY_BASE_ADDRESS); +} From patchwork Thu Jul 21 06:10:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Saba Kareem, Syed" X-Patchwork-Id: 12925507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 77221C433EF for ; Thu, 21 Jul 2022 16:02:55 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9A079189F; Thu, 21 Jul 2022 18:02:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9A079189F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658419373; bh=Vlz7Xy1J6GNxFfeQcxnZk/GlN3zE4sTYX55S5djmPno=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=F3r6Aq16dBkRAfZUqEjnj05TYY2nMgplZtKo7wOk+C37qbjmpXith5Q+WlRyAbDg9 9TTchbGyy3cLX4I5VPqBSmGPnjkiLc+IHyWki/bWzuwhnVxtGZSYA14ERCzEJ2YcKF +9ze77/Ev3/3y1WlfykoNbxxJe+1YTG1CYqbhweM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5042CF805B6; Thu, 21 Jul 2022 17:58:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1DD32F8016D; Thu, 21 Jul 2022 08:12:51 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2050.outbound.protection.outlook.com [40.107.101.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3D721F80166 for ; Thu, 21 Jul 2022 08:12:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3D721F80166 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="jYMiF+7x" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qr7oKWhmeYPmyM//W5Em35SMG2f3WHdymHVbjjayLH3sqL8NtbfT3aLo0B94yNCxGNMerWxicmZ4QSFndp5FdXGiZTBJ/XTj1burnZGhRk7CRKZuz6lJX1Cn7oCgcKVIDSljbxW4M9ypSZZKwKgpqNxhXY45YhxU0k6SN5dYGISmW+GrScIF2/9F7qfqLIrzaWRXy8RtyKmUbwNlP3bgirU4IYv30VxkQ5EBWgPD7RuB2nLkrcJG/PQe8UZ3BzST4t/3j16Mb/aLSPb/BUjmGxhAIPZjRQpjJ2Ihf4Du5Wki9xm017ghjip622r42qPgJjqxL1iCzAthfj/9zqBdcQ== 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=I26mgX95nboKQprXCEu0ow4pktR9sdk2HQm/H+dhv8U=; b=V/HqOSZ+A99zcSS4IWF9+S6h6La0KH5OFjesB+Fnx+pRjaYjY01JzDBfl96MSZItnwaFTWx+5RyeySGj1Tb7oIOlibgl2ugC7DTwXh9SVHIdbENkMnL7ObgPgEitb71mcrOeP268FT/2/cisoF1Lz3fuBIVXE9w/yEA1B2eTMtj3hvtyMJY0dW1og6OfMMXbzjlIVCcqQYrFIBqfZECirZAmG3UbRJv8mt4OlRNl1oHuncJtlSyO/DovjhebemOyOBzshJuzJLQvQnfOI7mTAxj6PD+VGCvBXY0XEIz9/vZxtjaBuzOqifwAXjaX6PP3XkzA6js0i2mHEwRIsbgiHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.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=I26mgX95nboKQprXCEu0ow4pktR9sdk2HQm/H+dhv8U=; b=jYMiF+7xf59hJUoYUizFrnU3eFq8pgTTVdQdxINF0rrhYmMBYH98P6bsRWyd7DrZAH0TWMymZWFyF8edqnNaoJ34sCzbI3EPfwnXWNyCUJt+/M5CN1M/rr5YPrQWjYWiX5ocA+el+2Ty19qyWiPSe4vHk77JoDU7786hfYgN9ls= Received: from BN9PR03CA0633.namprd03.prod.outlook.com (2603:10b6:408:13b::8) by BN6PR12MB1538.namprd12.prod.outlook.com (2603:10b6:405:4::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Thu, 21 Jul 2022 06:12:41 +0000 Received: from BN8NAM11FT023.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13b:cafe::b2) by BN9PR03CA0633.outlook.office365.com (2603:10b6:408:13b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.14 via Frontend Transport; Thu, 21 Jul 2022 06:12:41 +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 BN8NAM11FT023.mail.protection.outlook.com (10.13.177.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5458.17 via Frontend Transport; Thu, 21 Jul 2022 06:12:41 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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.28; Thu, 21 Jul 2022 01:12:29 -0500 Received: from amd-Z97X-UD7-TH.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Thu, 21 Jul 2022 01:12:21 -0500 From: syed sabakareem To: , Subject: [PATCH 3/5] ASoC: amd: add RPL Platform init/de-init functions Date: Thu, 21 Jul 2022 11:40:00 +0530 Message-ID: <20220721061035.91139-3-Syed.SabaKareem@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220721061035.91139-1-Syed.SabaKareem@amd.com> References: <20220721061035.91139-1-Syed.SabaKareem@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3bb87649-a779-4949-2528-08da6ae004fc X-MS-TrafficTypeDiagnostic: BN6PR12MB1538:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CyctmtJmteEoqz0eJ2rhe25xSNBCYMpIa4OOagZt51wyTDdncdJ03i4pqjeGvkoxNTkQWpFKqG+oyCBeWnhRZON83t8LDloYIeFAW7OuqXa/+HGCT2LY0++U0pfEtdT3RFXC7/pUd2vMb37AyWlVsefYqv7hE/VvO1UacvcoIYmSfnrl1t6YqLatqq7OCywsK8GpiZR4rPagHn0YDUEGMPq94PPufTwr6s7FABhYXRiYY85PU37N386qrPdsf/rhDsmiFWHAYFY6qfoL8KJVVH9e31RYgCpriImuI6D2BSRZx9eJKrgA/Ds0chSmRlp2qifhaTWrUEd/vxtHzkSOduH2Q9tYbn1fiRpd0IHZfw7TQ8QpTOT/gVNE01Iq5xBoPhXyDtEm4MKVSwYDh+cXXvPQNBaZEwOOxhEOpRWSBPtCUFg/mtixOVMn7k5Fr5wTEvy65hwoMWul8sA7WP4uq1ojdCUkuaiBHWtrMi+73MOsecL6/bDQJ4+3ZuGWSXMd3UWuiGFnq1M5rlAMilpHvHOpA230qn9ZXal6gjUFkrdRJQlY+kBr1PLBtiKLAtExu6qb8OjpY4ncVojbOrIJlXbGQFAZhIn4XXO+1TedRew/WGTaRgCnFxix7iXDdcm4sjapj45gUNxDnJ1jb8CmNEIBloCA86MRV7n9lZbY2S3UeQ+kiG3FBogR4KvFM8lmYI87JfX1Il+99FKMqyca+omvYR8WVp+cgOonyS503TmZ5yktBiuav5ePn4dPevd1cyDKLBrkT4dzyNo7Tx7BSMJEagx2yypdwSgyA3gEcuj1Gzf20FAkbjwgw4rlZi0o1Bza5xnYmpRGAJMfQorQoA== 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:(13230016)(4636009)(396003)(136003)(39860400002)(376002)(346002)(40470700004)(46966006)(36840700001)(41300700001)(6666004)(5660300002)(7696005)(26005)(8936002)(81166007)(356005)(82740400003)(47076005)(426003)(186003)(336012)(478600001)(70586007)(8676002)(4326008)(1076003)(316002)(70206006)(36860700001)(110136005)(54906003)(40460700003)(2906002)(86362001)(2616005)(36756003)(40480700001)(82310400005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2022 06:12:41.4573 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3bb87649-a779-4949-2528-08da6ae004fc 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: BN8NAM11FT023.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1538 X-Mailman-Approved-At: Thu, 21 Jul 2022 17:58:02 +0200 Cc: Sunil-kumar.Dommati@amd.com, open list , Basavaraj.Hiregoudar@amd.com, Takashi Iwai , Liam Girdwood , Syed Saba Kareem , Vijendar Mukunda , Alexander.Deucher@amd.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Syed Saba Kareem Add RPL Platform ACP init/de-init functions. Signed-off-by: Syed Saba Kareem Reviewed-by: Vijendar Mukunda --- sound/soc/amd/rpl/rpl-pci-acp6x.c | 92 +++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/sound/soc/amd/rpl/rpl-pci-acp6x.c b/sound/soc/amd/rpl/rpl-pci-acp6x.c index 7a82a978cf24..71ae90a00f36 100644 --- a/sound/soc/amd/rpl/rpl-pci-acp6x.c +++ b/sound/soc/amd/rpl/rpl-pci-acp6x.c @@ -17,6 +17,88 @@ struct rpl_dev_data { void __iomem *acp6x_base; }; +static int rpl_power_on(void __iomem *acp_base) +{ + u32 val; + int timeout; + + val = rpl_acp_readl(acp_base + ACP_PGFSM_STATUS); + + if (!val) + return val; + + if ((val & ACP_PGFSM_STATUS_MASK) != ACP_POWER_ON_IN_PROGRESS) + rpl_acp_writel(ACP_PGFSM_CNTL_POWER_ON_MASK, acp_base + ACP_PGFSM_CONTROL); + timeout = 0; + while (++timeout < 500) { + val = rpl_acp_readl(acp_base + ACP_PGFSM_STATUS); + if (!val) + return 0; + udelay(1); + } + return -ETIMEDOUT; +} + +static int rpl_reset(void __iomem *acp_base) +{ + u32 val; + int timeout; + + rpl_acp_writel(1, acp_base + ACP_SOFT_RESET); + timeout = 0; + while (++timeout < 500) { + val = rpl_acp_readl(acp_base + ACP_SOFT_RESET); + if (val & ACP_SOFT_RESET_SOFTRESET_AUDDONE_MASK) + break; + cpu_relax(); + } + rpl_acp_writel(0, acp_base + ACP_SOFT_RESET); + timeout = 0; + while (++timeout < 500) { + val = rpl_acp_readl(acp_base + ACP_SOFT_RESET); + if (!val) + return 0; + cpu_relax(); + } + return -ETIMEDOUT; +} + +static int rpl_init(void __iomem *acp_base) +{ + int ret; + + /* power on */ + ret = rpl_power_on(acp_base); + if (ret) { + pr_err("ACP power on failed\n"); + return ret; + } + rpl_acp_writel(0x01, acp_base + ACP_CONTROL); + /* Reset */ + ret = rpl_reset(acp_base); + if (ret) { + pr_err("ACP reset failed\n"); + return ret; + } + rpl_acp_writel(0x03, acp_base + ACP_CLKMUX_SEL); + return 0; +} + +static int rpl_deinit(void __iomem *acp_base) +{ + int ret; + + /* Reset */ + ret = rpl_reset(acp_base); + if (ret) { + pr_err("ACP reset failed\n"); + return ret; + } + rpl_acp_writel(0x00, acp_base + ACP_CLKMUX_SEL); + rpl_acp_writel(0x00, acp_base + ACP_CONTROL); + return 0; +} + static int snd_rpl_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { @@ -59,6 +141,9 @@ static int snd_rpl_probe(struct pci_dev *pci, } pci_set_master(pci); pci_set_drvdata(pci, adata); + ret = rpl_init(adata->acp6x_base); + if (ret) + goto release_regions; return 0; release_regions: pci_release_regions(pci); @@ -70,6 +155,13 @@ static int snd_rpl_probe(struct pci_dev *pci, static void snd_rpl_remove(struct pci_dev *pci) { + struct rpl_dev_data *adata; + int ret; + + adata = pci_get_drvdata(pci); + ret = rpl_deinit(adata->acp6x_base); + if (ret) + dev_err(&pci->dev, "ACP de-init failed\n"); pci_release_regions(pci); pci_disable_device(pci); } From patchwork Thu Jul 21 06:10:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Saba Kareem, Syed" X-Patchwork-Id: 12925508 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC309CCA489 for ; Thu, 21 Jul 2022 16:03:12 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 13B941891; Thu, 21 Jul 2022 18:02:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 13B941891 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658419389; bh=z7ZciXQ4NQEV3Qs5DA9KMUR2j/IxVAohXJ+9neNh+sI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=CTbJ14UHXMoe5ue4rxb21STbVkqi2b8i+MezjGGLIt9l8xYBMnjENpgKCCxMhYJH1 EvZeYF9EGJCLnIKsPdntXP0et5fQdJInRgHBpTsD8DmMU9R4i0jM0LJLAgGSPifTpm tYDFWScsUEYE/3Iv7CA4aq636yuCBQ1YfwdOCSOo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id ECD36F805BE; Thu, 21 Jul 2022 17:58:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0DA37F8016D; Thu, 21 Jul 2022 08:13:07 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2071.outbound.protection.outlook.com [40.107.223.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 09E45F80166 for ; Thu, 21 Jul 2022 08:12:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 09E45F80166 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="SpIc64ZR" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oU0ODAGZtgNn/dUOxYUXD5HM7xMcpX0LL8Tg8C7Jr5gBH/+uA7pzSmxYVyJ8GwDEEsAcsEYFCGhty8DN6rb/lkmqK6cXLBbsrP06d9yBzE8JTP5nWHYnREdQsvAsyjLndgTMz+haaonFbSvtINuIl/BG8fzDAlbMMUJdsLCOEboPcPT9pY6NC9FbnHPTrUhficVWRX8amIh86MfDZIZUcvteEnn09YbajbgYjFQaHLw0NLKtGBUIMBeOVy3d0B/g04vocr+L40bSPy0Q+pV6Q+qSccwq803+JHrEuBdvw+VmIjJa4hHIPTN/dXypPshcSOz4IyCcUd3GM89FdlkU7w== 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=vxJ95R0gtb6wG7CRuUumvgM3vBK/Ab/DY0A5D7mg8tk=; b=bsb/LEUE4/Tmtm8mg/gD8r0PhUl/3mc3KfmaKZaAkLc99LWGbVk7I10w2MuW85Cm1AvhBKLLQRVw8PERe3ouoJaLHBHBjFETLmoCimvRw6M7cbrQsuRxUr6u7pTJXM8s37tbqvuYgDHHzI4BKKBr+5DRWzNpcsZg7RzYvJ0P0i+7heriVJLCdV0xYwEEkpsjKHEmXFN/XrQb3cY6gl6qa9uby2iJOZHT3RtzDza/YBSRpjY7jQ0OcGVthQuAnB1aocZANIyhKiZqkBe//LPaR/etUynBugBePPc79vLsngAr1NMRHYihnW84udAr4TBSjn1rx7m4nfCk8F95uuDzWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.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=vxJ95R0gtb6wG7CRuUumvgM3vBK/Ab/DY0A5D7mg8tk=; b=SpIc64ZROzCAH/9HzDS4YWkPil+aaK0UCzFR/BO8n5htwJIm5EXeJ4lsvjq7/Z2fuVdrdvmxgkxF9ww4TeesP5pGSj25GlsGA+8fiy7Fhhd+5ZawGtIs1sDF5SDdPAsC9fNYsl/Uwj/IrWNBq2JmIOrbThbDVC5xYMxvIDljlbI= Received: from MW4PR04CA0357.namprd04.prod.outlook.com (2603:10b6:303:8a::32) by BYAPR12MB2837.namprd12.prod.outlook.com (2603:10b6:a03:68::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.21; Thu, 21 Jul 2022 06:12:55 +0000 Received: from CO1NAM11FT061.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8a:cafe::c8) by MW4PR04CA0357.outlook.office365.com (2603:10b6:303:8a::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18 via Frontend Transport; Thu, 21 Jul 2022 06:12: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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CO1NAM11FT061.mail.protection.outlook.com (10.13.175.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5458.17 via Frontend Transport; Thu, 21 Jul 2022 06:12:54 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 21 Jul 2022 01:12:53 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 21 Jul 2022 01:12:53 -0500 Received: from amd-Z97X-UD7-TH.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Thu, 21 Jul 2022 01:12:44 -0500 From: syed sabakareem To: , Subject: [PATCH 4/5] ASoC: amd: add RPL Platform pci driver pm-ops Date: Thu, 21 Jul 2022 11:40:01 +0530 Message-ID: <20220721061035.91139-4-Syed.SabaKareem@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220721061035.91139-1-Syed.SabaKareem@amd.com> References: <20220721061035.91139-1-Syed.SabaKareem@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a5409a17-2f51-43b2-d5d9-08da6ae00d0a X-MS-TrafficTypeDiagnostic: BYAPR12MB2837:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NA3m9DoxIXL8W0dFHbnAXikDs8y344cd5iyt+Mi9vk8+Lha9YBGjdyncimV5fl+Jncaxzq6VUk8S84Ovk6wogUYfDYrkfCIPDImS7ejHaUhV4BQ9NbQr9haYWnAijNlPugyJy88pTDm2f5/rujd9HRAMDNXLc9BmFXb1s3T66cLS4+T57ZGrICdarjwp7AgUiBakb47neRCaZMHzUIKPw+Zu0bt9K3pZeF0+F2QbfpQmkQsT39Ygki4ftnUZshYcO/0uwYsyg487UM4LmwzZbL0iRT0f+gCVkx/K5Q27SwEtCd7opOgkbVdltKvENS4QN4+HJt732ElkvRMOVBMyEioNmGt3R7SdAA4zditm8ExrZcLLJswluGkO+vADOTGaYgHNt0c6WI4JvI+Jz5xLQAMTy+HuX5chon0y/rFRK8vbBOiYgHIInhjSwX95mWenxpd8iGvu64yKayHYpXuLJBxikJGXZQDqa3n+KHNAWiuTJ36Ib38NXaRoT+lJzLYHKDxfugRGSDalpyB/T3lHy45hu9BFRZf7N71nwbTZbK0WHpuSqhmZuv80IU9+NagZtvAxH5073l4sTHEYeSy7sXkvrkggi8QQ3MNn/3jtuEW4imGmcsqRDGOsVe50/tI1at6rs4GbRPAGxHifp3hijqAw5hLqgn9SxbImmvXsJCW2/25hP0MMhuDBVhHYHx5Q9TG4V+kKnocN+ipAi9dFn5nRtWE+RN/qXbVNYMBAUDXsZJ8OZlvbqlH8XJPJUF5/pGlbmOc3DJ/ntjhbEWOnd/b65DefuFZonD0hR5smkcYOlEqjgA3pAb2Yuh1vZ7w6w6956AohXKOlyKRJnLX19w== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(136003)(346002)(39860400002)(396003)(376002)(36840700001)(46966006)(40470700004)(6666004)(83380400001)(70586007)(86362001)(70206006)(4326008)(82310400005)(40460700003)(36860700001)(2906002)(356005)(81166007)(82740400003)(5660300002)(36756003)(7696005)(478600001)(26005)(8936002)(1076003)(8676002)(2616005)(316002)(40480700001)(110136005)(41300700001)(47076005)(336012)(426003)(54906003)(186003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2022 06:12:54.8660 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a5409a17-2f51-43b2-d5d9-08da6ae00d0a 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT061.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2837 X-Mailman-Approved-At: Thu, 21 Jul 2022 17:58:02 +0200 Cc: Sunil-kumar.Dommati@amd.com, open list , Basavaraj.Hiregoudar@amd.com, Takashi Iwai , Liam Girdwood , Syed Saba Kareem , Vijendar Mukunda , Alexander.Deucher@amd.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Syed Saba Kareem Add RPL Platform ACP PCI driver pm ops. Signed-off-by: Syed Saba Kareem Reviewed-by: Vijendar Mukunda --- sound/soc/amd/rpl/rpl-pci-acp6x.c | 40 +++++++++++++++++++++++++++++++ sound/soc/amd/rpl/rpl_acp6x.h | 15 ++++++++++++ 2 files changed, 55 insertions(+) diff --git a/sound/soc/amd/rpl/rpl-pci-acp6x.c b/sound/soc/amd/rpl/rpl-pci-acp6x.c index 71ae90a00f36..a8e548ed991b 100644 --- a/sound/soc/amd/rpl/rpl-pci-acp6x.c +++ b/sound/soc/amd/rpl/rpl-pci-acp6x.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "rpl_acp6x.h" @@ -144,6 +145,11 @@ static int snd_rpl_probe(struct pci_dev *pci, ret = rpl_init(adata->acp6x_base); if (ret) goto release_regions; + pm_runtime_set_autosuspend_delay(&pci->dev, ACP_SUSPEND_DELAY_MS); + pm_runtime_use_autosuspend(&pci->dev); + pm_runtime_put_noidle(&pci->dev); + pm_runtime_allow(&pci->dev); + return 0; release_regions: pci_release_regions(pci); @@ -153,6 +159,35 @@ static int snd_rpl_probe(struct pci_dev *pci, return ret; } +static int __maybe_unused snd_rpl_suspend(struct device *dev) +{ + struct rpl_dev_data *adata; + int ret; + + adata = dev_get_drvdata(dev); + ret = rpl_deinit(adata->acp6x_base); + if (ret) + dev_err(dev, "ACP de-init failed\n"); + return ret; +} + +static int __maybe_unused snd_rpl_resume(struct device *dev) +{ + struct rpl_dev_data *adata; + int ret; + + adata = dev_get_drvdata(dev); + ret = rpl_init(adata->acp6x_base); + if (ret) + dev_err(dev, "ACP init failed\n"); + return ret; +} + +static const struct dev_pm_ops rpl_pm = { + SET_RUNTIME_PM_OPS(snd_rpl_suspend, snd_rpl_resume, NULL) + SET_SYSTEM_SLEEP_PM_OPS(snd_rpl_suspend, snd_rpl_resume) +}; + static void snd_rpl_remove(struct pci_dev *pci) { struct rpl_dev_data *adata; @@ -162,6 +197,8 @@ static void snd_rpl_remove(struct pci_dev *pci) ret = rpl_deinit(adata->acp6x_base); if (ret) dev_err(&pci->dev, "ACP de-init failed\n"); + pm_runtime_forbid(&pci->dev); + pm_runtime_get_noresume(&pci->dev); pci_release_regions(pci); pci_disable_device(pci); } @@ -179,6 +216,9 @@ static struct pci_driver rpl_acp6x_driver = { .id_table = snd_rpl_ids, .probe = snd_rpl_probe, .remove = snd_rpl_remove, + .driver = { + .pm = &rpl_pm, + } }; module_pci_driver(rpl_acp6x_driver); diff --git a/sound/soc/amd/rpl/rpl_acp6x.h b/sound/soc/amd/rpl/rpl_acp6x.h index 5de19d5c892e..f5816a33632e 100644 --- a/sound/soc/amd/rpl/rpl_acp6x.h +++ b/sound/soc/amd/rpl/rpl_acp6x.h @@ -10,6 +10,21 @@ #define ACP_DEVICE_ID 0x15E2 #define ACP6x_PHY_BASE_ADDRESS 0x1240000 +#define ACP_SOFT_RESET_SOFTRESET_AUDDONE_MASK 0x00010001 +#define ACP_PGFSM_CNTL_POWER_ON_MASK 1 +#define ACP_PGFSM_CNTL_POWER_OFF_MASK 0 +#define ACP_PGFSM_STATUS_MASK 3 +#define ACP_POWERED_ON 0 +#define ACP_POWER_ON_IN_PROGRESS 1 +#define ACP_POWERED_OFF 2 +#define ACP_POWER_OFF_IN_PROGRESS 3 + +#define DELAY_US 5 +#define ACP_COUNTER 20000 + +/* time in ms for runtime suspend delay */ +#define ACP_SUSPEND_DELAY_MS 2000 + static inline u32 rpl_acp_readl(void __iomem *base_addr) { return readl(base_addr - ACP6x_PHY_BASE_ADDRESS); From patchwork Thu Jul 21 06:10:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Saba Kareem, Syed" X-Patchwork-Id: 12925509 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CE312C433EF for ; Thu, 21 Jul 2022 16:03:27 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 28A2918AE; Thu, 21 Jul 2022 18:02:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 28A2918AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658419406; bh=xLgX+dFkZuTbaFjtHR515YWNWFlsaeYsVdUtRfv4mwU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=guhJiL2lzSgupIL4crb3Yu8Uy9LJckfiRGoaJ+5IoAJ3p1PLRQJshHCr0XPMqHyC0 S+mR3WN+fEaaBSnBD2HalethpJ9YsGhKIAOIy42ZPpuksTJD0VlzlUHCNIcFytZorm yRzQzWJhEVLgUIjilYlHrCQ+hufQwwjko3pipWAs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8CB70F805BF; Thu, 21 Jul 2022 17:58:14 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DE5C6F8016D; Thu, 21 Jul 2022 08:13:21 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DC802F80166 for ; Thu, 21 Jul 2022 08:13:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DC802F80166 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="KSKl4Nni" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M2t0jHNNFAz0K8eUjX2fuw2dZ5+RM64n+CrytLeZStxEqdssm4SGTt8Qcrg4f1zA0d+xSrkaTn0eilgNX4Au86lXFQlCubxHpNiQJkQyqvXI64t8RX5akAQ2+qFRPLAfTandog/mMaW5+/7lfBGsy5hbYAX16EqoS1l2t5XKIwyqdtgqlppRTzzGW0q34TJAyF1YgVBjObH6eoVzb2geWiuYa6OlpTtyfFzudF5OugcmZNkFBuU9DxW0co8ghr1+mvVfRJF/VkibzvYk52aQ9sBpYmypg7jCyRPgFqPWgYsnod6X1X/rMWjuPIym7THXKYnYF6MBCNSi6PNiKoU+0g== 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=I0D4igSH7BZLvBKhq9qPOhpohSGkdXgBNNRu0eLmGCQ=; b=O0A8OzxxOb08GNzCALQR5P126JUGGH2iU+5dQDB53Qn7K1+XCr38DsxvBnp1XJxRStbmPVgIW1zaIa8zURZmVGwIB+KdbRVOsbiS/QdYh2E4/edIoJJ5wMsr+Gdrudtlg2XXTQMdMYLd8shnFFjaf3kzTFsnXfH3xHEmFfrEzLYP1x/SzgUZZHgMs7oJLPwI+Fg10WN/O8YftmPUhyLh3LhE+qThOL0Vuu9u5CFt0uJ7yRZ6lkYAdNiBwkKXNninOdvCWUhCrUqV/4oE5nHUGE3aJ+/CgA5b6O4n9v37UJmxCbRkXABUg//IeWBxTFuO/gMLHnEuPzjM1h+gJsSLzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.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=I0D4igSH7BZLvBKhq9qPOhpohSGkdXgBNNRu0eLmGCQ=; b=KSKl4Nni6Ye9Be6Td3zfQCuTbWgkmbefc7CKdIDSTnxirTP6jjDeRPkmJAPIrBA0KdIRghN06ynlSalScBsC6jKbbmHiZFndpWmTFOS6SeRJjLdwcvKXGfMLVkSgSrlapAbu+5fH4t2IEdGmWzidVOzQeLF11EdY/nohI0OrM9Q= Received: from BN9P222CA0012.NAMP222.PROD.OUTLOOK.COM (2603:10b6:408:10c::17) by SA0PR12MB4384.namprd12.prod.outlook.com (2603:10b6:806:9f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Thu, 21 Jul 2022 06:13:11 +0000 Received: from BN8NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10c:cafe::63) by BN9P222CA0012.outlook.office365.com (2603:10b6:408:10c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18 via Frontend Transport; Thu, 21 Jul 2022 06:13:11 +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 BN8NAM11FT021.mail.protection.outlook.com (10.13.177.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5458.17 via Frontend Transport; Thu, 21 Jul 2022 06:13:11 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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.28; Thu, 21 Jul 2022 01:13:08 -0500 Received: from amd-Z97X-UD7-TH.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Thu, 21 Jul 2022 01:12:58 -0500 From: syed sabakareem To: , Subject: [PATCH 5/5] ASoC: amd: enable RPL Platform acp drivers build Date: Thu, 21 Jul 2022 11:40:02 +0530 Message-ID: <20220721061035.91139-5-Syed.SabaKareem@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220721061035.91139-1-Syed.SabaKareem@amd.com> References: <20220721061035.91139-1-Syed.SabaKareem@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f000a1d5-e8f1-4d5b-ad38-08da6ae016f5 X-MS-TrafficTypeDiagnostic: SA0PR12MB4384:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S1EOC2ZAnEpkfZMNsWp1nBKpK7OBmdsltmHW8YFwyAyQLDrT4sOXPl804nvgcFBchcLXGZ1B5Yw5XRQ82QlvmLP6bNgi60fPRBb7KqPDhzLSugPG5N/5u6udTriB6mYUBo/nrQ1vl9naqtmE099XVUQ6iNfv7gW+9DsxTDYV0D24d/4qfeFYFeVNfQC3imhgV4Nsqw13CUQM8DJNhgIkRqHHQLZqZHksGWutnrqt5iVNyOmptKAPvxUpR5Rb5XoFWbwE0XXv+6nN8FaNGophl2bL0+M9Vf5vBNDGL3Qu8PawWzJDOeWU2BwL70ub/JjtOUmJzZXL+45CYS3G+AdgKuXOVjRAeQRdN7L0W3PbMUsxB7jceb58/G1Uj5LsCyoIlpl83bZ+7QMowNGviJeViVG+x9X8YohPSv3VQmZT7zdccbYJ4kMWMTiDW3y7bGiTdVZEi1PtJhTLG8RyErNXGXDE98PABUkCkqiqGlrQPnNKk8+Z+iC+daxpVa1nAB91Gy2nL51irO8Cmr/7rzJ5IXRkPF8oglICk6DW8len/Y3PK/M3XdQ5by1tXeS+9o1RNlDYgZFdCT9H1gfSCakKXq7RFgHamcWzeRF86Hk7jy7i0it6tr86Zrxm9AaQl/gYDAzVMdy0wVqaoCIMcdNhULrEhZEwmDDW53i6UJpeVtUgcWCyv2GnpFYPv7E0USaLgQ1wWeJE2cKgffLSW3+MiNyLsU968H0ksbNEg+UhyvVINdsR48K7qNrGn7rzhMSJCbUPIX8bpoE80pBRbwFrDIEvna08/4QsjPWBQtmBWsbp9i73w7aM565OTgnEBuicesDBcLJKWoapdFdLzDKr7A== 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:(13230016)(4636009)(136003)(376002)(39860400002)(346002)(396003)(36840700001)(40470700004)(46966006)(8676002)(4326008)(70586007)(70206006)(82310400005)(110136005)(478600001)(316002)(54906003)(8936002)(40480700001)(2906002)(5660300002)(7416002)(40460700003)(36860700001)(86362001)(36756003)(336012)(426003)(82740400003)(186003)(81166007)(41300700001)(1076003)(26005)(83380400001)(2616005)(356005)(6666004)(47076005)(7696005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2022 06:13:11.5983 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f000a1d5-e8f1-4d5b-ad38-08da6ae016f5 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: BN8NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4384 X-Mailman-Approved-At: Thu, 21 Jul 2022 17:58:03 +0200 Cc: Pierre-Louis Bossart , Sunil-kumar.Dommati@amd.com, Lucas Tanure , Ajit Kumar Pandey , open list , Basavaraj.Hiregoudar@amd.com, Takashi Iwai , Liam Girdwood , Randy Dunlap , Syed Saba Kareem , Vijendar Mukunda , Alexander.Deucher@amd.com, Julian Braha , Daniel Baluta , Bard Liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Syed Saba Kareem RPL Platform drivers can be built by selecting necessary kernel config option. The patch enables build support of the same. Signed-off-by: Syed Saba Kareem Reviewed-by: Vijendar Mukunda --- sound/soc/amd/Kconfig | 10 ++++++++++ sound/soc/amd/Makefile | 1 + sound/soc/amd/rpl/Makefile | 5 +++++ 3 files changed, 16 insertions(+) create mode 100644 sound/soc/amd/rpl/Makefile diff --git a/sound/soc/amd/Kconfig b/sound/soc/amd/Kconfig index 9c2fef2ce89f..08f5289dac54 100644 --- a/sound/soc/amd/Kconfig +++ b/sound/soc/amd/Kconfig @@ -117,3 +117,13 @@ config SND_AMD_ACP_CONFIG driver modules to use source "sound/soc/amd/acp/Kconfig" + +config SND_SOC_AMD_RPL_ACP6x + tristate "AMD Audio Coprocessor-v6.2 RPL support" + depends on X86 && PCI + help + This option enables Audio Coprocessor i.e ACP v6.2 support on + AMD RPL platform. By enabling this flag build will be + triggered for ACP PCI driver. + Say m if you have such a device. + If unsure select "N". diff --git a/sound/soc/amd/Makefile b/sound/soc/amd/Makefile index 8823f6f28611..0592e7c5c407 100644 --- a/sound/soc/amd/Makefile +++ b/sound/soc/amd/Makefile @@ -17,3 +17,4 @@ obj-$(CONFIG_SND_SOC_AMD_ACP5x) += vangogh/ obj-$(CONFIG_SND_SOC_AMD_ACP6x) += yc/ obj-$(CONFIG_SND_SOC_AMD_ACP_COMMON) += acp/ obj-$(CONFIG_SND_AMD_ACP_CONFIG) += snd-acp-config.o +obj-$(CONFIG_SND_SOC_AMD_RPL_ACP6x) += rpl/ diff --git a/sound/soc/amd/rpl/Makefile b/sound/soc/amd/rpl/Makefile new file mode 100644 index 000000000000..11a33a05e94b --- /dev/null +++ b/sound/soc/amd/rpl/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# RPL platform Support +snd-rpl-pci-acp6x-objs := rpl-pci-acp6x.o + +obj-$(CONFIG_SND_SOC_AMD_RPL_ACP6x) += snd-rpl-pci-acp6x.o