From patchwork Thu Feb 10 06:50:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohan Kumar D X-Patchwork-Id: 12741446 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 1D6CDC433F5 for ; Thu, 10 Feb 2022 06:53:01 +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 6589B16CC; Thu, 10 Feb 2022 07:52:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6589B16CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1644475979; bh=0WZ0eGLc/uEwsiajdSk/VyHydVMH4rihdeDaNWm4e9A=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=c89qQCLqSfEkH9TcR16uU0k9Ce4rxGYm0gCQNqRtyu7v7RGFb1zQ95W1/Nz3kUYux Bk0WuB/osTIWE7BH4vhWPZd55L2y5dLjP3bv086y3SgFxHO+JP3GNFkJtG7hpmbz+f hXY+XjrboBudK4VmKLLRVc3xagvJSvn0E6kIo6rE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D2BB4F80511; Thu, 10 Feb 2022 07:51:26 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 89284F8013D; Thu, 10 Feb 2022 07:51:25 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on20604.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eab::604]) (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 08FE2F8013D for ; Thu, 10 Feb 2022 07:51:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 08FE2F8013D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="h9zSB0JT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h7YUh23djWTAroKEwAXmXxaL+WS1Two442cPTY/GHeLo86cMHqNyW34G7hvZDJQquETWiP4NChH17BLo6x8oE1ldn0zAE3ko33/22XrLA85/1wHCqJopvDdCTzOZH46PbGhFTslfmrRiym0zPZFC8IaTr3qzeT2e4Z384k8xanS11dT5G9FVWZesD/oY3KegnnUr+SGxUPLBeWATU8lSmO1oKpZ5xFQJwMpKxrKyjMamKBf6nVYU8EIGZZ6vwEqOFO/PyXuTpISXdSsHFM5SiS1U3A+6qoubyQg0pJVec4xgXiw3SZQfFD0wbSM6a3OMiyobJDmJwevxJAv5zz3VXg== 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=laRYp0AjzlnOtPI+VIIuhkLI9BFmn9x/QkudqF2FOU4=; b=kVn4Eh81xI1SAkJKZV4inhzFEx3oUr102lw0UXB4Ch18EM859ARAogsqItsB7NJaMGqhuSdOEEYgwjYs6DDgpUPPSAMly/7rd4kxQ3OiGlkcJD2uLpfnJMC7u/otAQFVp9KoBYRmrGeFH1JqujLVJ9Sn8qNddXApM2b7YOQDL0+dHswTdQJNM8gDjVCnFfEAspEafKA4Poq1pL7ctmcU+is+csQbv847CQlAfiBAOpz0V0wFXN9jDfoBlRhoifhde/ukBW8GfCDZJ9sh4lKzOgJ5EPJRHyDrUjC6rLSOclaO3VWEMgYly8D531HNJdqOxwO7uxgPCRgWLd0DYGXPfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=laRYp0AjzlnOtPI+VIIuhkLI9BFmn9x/QkudqF2FOU4=; b=h9zSB0JTUsRARIuKjkFAoOCvSGd2WYkVhWg84+vWd1wtWD5Ni6Xp8I5gdZcrcClCv8GgL9psailB3Ht1P4eBIZiwmfWUooXSzBHXqoR7teFywHdjbWC0h4x8ust1ZB5bModNPHE1OnCNwKzzqpIz6IjLi0+y720WeOLhCgSstXRFB9iDTqERa+wPPfzGoS1v5/pHmXBuFx5EdfVqF3s8XGpQ1W/okysm7zBKtoOffF0R+YcRanEijLec0go7XXSiC4gEBYbP1BGESrKE4d8LFfw6tzf1OTOOC8w8jHeOasks0HwC2VQS8IpxkyO7vIsdp4WNK2ZKRWkMlprqpGrb4Q== Received: from DM5PR19CA0063.namprd19.prod.outlook.com (2603:10b6:3:116::25) by DM4PR12MB5892.namprd12.prod.outlook.com (2603:10b6:8:68::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Thu, 10 Feb 2022 06:51:15 +0000 Received: from DM6NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:3:116:cafe::14) by DM5PR19CA0063.outlook.office365.com (2603:10b6:3:116::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 06:51:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.236) by DM6NAM11FT014.mail.protection.outlook.com (10.13.173.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 06:51:15 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 10 Feb 2022 06:51:08 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Wed, 9 Feb 2022 22:51:07 -0800 Received: from mkumard.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.9 via Frontend Transport; Wed, 9 Feb 2022 22:51:04 -0800 From: Mohan Kumar To: , , , , , , Subject: [PATCH v2 1/6] ALSA: hda/tegra: Add Tegra234 hda driver support Date: Thu, 10 Feb 2022 12:20:52 +0530 Message-ID: <20220210065057.13555-2-mkumard@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220210065057.13555-1-mkumard@nvidia.com> References: <20220210065057.13555-1-mkumard@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b03c9f8c-07bc-4476-4522-08d9ec61bbf8 X-MS-TrafficTypeDiagnostic: DM4PR12MB5892:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 02QskGgAz/XP01gHh8+uAO9aUkBdvgqUGpjGZSGbmijHHl8NsqZvJXJLGTOn3aoROfWCIEDsCdZZxHLgk8wTffdmOC5oVET3uAW0AjzhPAe8e6Y2a7lBV0tEzFK5QLWwib+ZJVLmhzcAu6nGjP+ZqdwuZi6WnWuZCZttL3dhg3KUp0lYnTPDpdl8f01+C4+fAoTyRDY5sCaBpVRYWZNR+lUqe4hW7dn+jva+eqdxyoZ/6O3ZA+XQVLpuRm1xx9FbSWdOY9r8tFk7s94Sv0umndfi4I2O4JDVyAavmtNxzfojL11gw7Xbb0jZYArKtK6b7S23e1C/ZyCvBE1uizva6ba1Beco7/nhWqdvz/5UdrQsVti6Cw6s4RbqLJVsw0PvQoEJVkxXLBVJsfiOroX+tk2y9Vls3XanL48M9Q306HVsVxpB4csB5YPrn3u4ZXPNpyd+neP3mG7vKwUrhUrqgeDlCqUM1d0W9DgDLjcKvojZhvnxjXw0k30Is93Vv2M4+hxo7/IoYlCMhVlyoXZWUMEWXLcbZ8mJbtN9NPE5SjIrM5AbrXNC2bUYHq9VOeCq8V+oUTAehOAT5SS+u8oy4oHXKJ0c5DvvxEwx2aXvhWbkaRoPqxRVBHEvX8gb75C4J6iu9IUs1UbDoQsfYYcIMxAY1Onij6xFQ2xB+44F2JTbfAAzviJsZv33HrwfPiYlkaSdnoplmorltte1PtZDnTWFLWM9IUB/xO6P0hW2dRg= X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(110136005)(36756003)(508600001)(316002)(54906003)(6636002)(7696005)(6666004)(40460700003)(2616005)(47076005)(8936002)(2906002)(336012)(426003)(82310400004)(107886003)(83380400001)(26005)(186003)(8676002)(36860700001)(70206006)(356005)(5660300002)(4326008)(1076003)(70586007)(86362001)(81166007)(36900700001)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 06:51:15.6260 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b03c9f8c-07bc-4476-4522-08d9ec61bbf8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.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: DM4PR12MB5892 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Mohan Kumar 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" Add hda driver support for the Tegra234 chip. The hdacodec on this chip now supports DP MST feature, HDA block contains azalia controller and one hda-codec instance by supporting 4 independent output streams over DP MST mode. There is no input stream support. Signed-off-by: Mohan Kumar --- sound/pci/hda/hda_tegra.c | 21 +++++++++++++-- sound/pci/hda/patch_hdmi.c | 54 +++++++++++++++++++++++++++++++++----- 2 files changed, 67 insertions(+), 8 deletions(-) diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index 773f4903550a..95df52b0505b 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -70,6 +70,7 @@ struct hda_tegra_soc { bool has_hda2codec_2x_reset; + bool has_hda2hdmi; }; struct hda_tegra { @@ -435,15 +436,23 @@ static int hda_tegra_create(struct snd_card *card, static const struct hda_tegra_soc tegra30_data = { .has_hda2codec_2x_reset = true, + .has_hda2hdmi = true, }; static const struct hda_tegra_soc tegra194_data = { .has_hda2codec_2x_reset = false, + .has_hda2hdmi = true, +}; + +static const struct hda_tegra_soc tegra234_data = { + .has_hda2codec_2x_reset = true, + .has_hda2hdmi = false, }; static const struct of_device_id hda_tegra_match[] = { { .compatible = "nvidia,tegra30-hda", .data = &tegra30_data }, { .compatible = "nvidia,tegra194-hda", .data = &tegra194_data }, + { .compatible = "nvidia,tegra234-hda", .data = &tegra234_data }, {}, }; MODULE_DEVICE_TABLE(of, hda_tegra_match); @@ -473,7 +482,14 @@ static int hda_tegra_probe(struct platform_device *pdev) } hda->resets[hda->nresets++].id = "hda"; - hda->resets[hda->nresets++].id = "hda2hdmi"; + + /* + * "hda2hdmi" is not applicable for Tegra234. This is because the + * codec is separate IP and not under display SOR partition now. + */ + if (hda->soc->has_hda2hdmi) + hda->resets[hda->nresets++].id = "hda2hdmi"; + /* * "hda2codec_2x" reset is not present on Tegra194. Though DT would * be updated to reflect this, but to have backward compatibility @@ -488,7 +504,8 @@ static int hda_tegra_probe(struct platform_device *pdev) goto out_free; hda->clocks[hda->nclocks++].id = "hda"; - hda->clocks[hda->nclocks++].id = "hda2hdmi"; + if (hda->soc->has_hda2hdmi) + hda->clocks[hda->nclocks++].id = "hda2hdmi"; hda->clocks[hda->nclocks++].id = "hda2codec_2x"; err = devm_clk_bulk_get(&pdev->dev, hda->nclocks, hda->clocks); diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 92df4f243ec6..879f886d2406 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -3851,17 +3851,29 @@ static int tegra_hdmi_build_pcms(struct hda_codec *codec) return 0; } -static int patch_tegra_hdmi(struct hda_codec *codec) +static int tegra_hdmi_init(struct hda_codec *codec) { - struct hdmi_spec *spec; - int err; + struct hdmi_spec *spec = codec->spec; + int i, err; - err = patch_generic_hdmi(codec); - if (err) + err = hdmi_parse_codec(codec); + if (err < 0) { + generic_spec_free(codec); return err; + } + + for (i = 0; i < spec->num_cvts; i++) + snd_hda_codec_write(codec, spec->cvt_nids[i], 0, + AC_VERB_SET_DIGI_CONVERT_1, + AC_DIG1_ENABLE); + + generic_hdmi_init_per_pins(codec); codec->patch_ops.build_pcms = tegra_hdmi_build_pcms; - spec = codec->spec; + spec->chmap.ops.chmap_cea_alloc_validate_get_type = + nvhdmi_chmap_cea_alloc_validate_get_type; + spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate; + spec->chmap.ops.chmap_cea_alloc_validate_get_type = nvhdmi_chmap_cea_alloc_validate_get_type; spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate; @@ -3869,6 +3881,35 @@ static int patch_tegra_hdmi(struct hda_codec *codec) return 0; } +static int patch_tegra_hdmi(struct hda_codec *codec) +{ + int err; + + err = alloc_generic_hdmi(codec); + if (err < 0) + return err; + + return tegra_hdmi_init(codec); +} + +static int patch_tegra234_hdmi(struct hda_codec *codec) +{ + struct hdmi_spec *spec; + int err; + + err = alloc_generic_hdmi(codec); + if (err < 0) + return err; + + codec->dp_mst = true; + codec->mst_no_extra_pcms = true; + spec = codec->spec; + spec->dyn_pin_out = true; + spec->dyn_pcm_assign = true; + + return tegra_hdmi_init(codec); +} + /* * ATI/AMD-specific implementations */ @@ -4322,6 +4363,7 @@ HDA_CODEC_ENTRY(0x10de002d, "Tegra186 HDMI/DP0", patch_tegra_hdmi), HDA_CODEC_ENTRY(0x10de002e, "Tegra186 HDMI/DP1", patch_tegra_hdmi), HDA_CODEC_ENTRY(0x10de002f, "Tegra194 HDMI/DP2", patch_tegra_hdmi), HDA_CODEC_ENTRY(0x10de0030, "Tegra194 HDMI/DP3", patch_tegra_hdmi), +HDA_CODEC_ENTRY(0x10de0031, "Tegra234 HDMI/DP", patch_tegra234_hdmi), HDA_CODEC_ENTRY(0x10de0040, "GPU 40 HDMI/DP", patch_nvhdmi), HDA_CODEC_ENTRY(0x10de0041, "GPU 41 HDMI/DP", patch_nvhdmi), HDA_CODEC_ENTRY(0x10de0042, "GPU 42 HDMI/DP", patch_nvhdmi), From patchwork Thu Feb 10 06:50:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohan Kumar D X-Patchwork-Id: 12741445 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 41E4DC433FE for ; Thu, 10 Feb 2022 06:52:53 +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 6311F1774; Thu, 10 Feb 2022 07:52:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6311F1774 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1644475971; bh=f4lU9uZWQQImWtpy2Wv0/tEOjOZHTqKZhQ6o1nMmLfw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KLfWWqxODTg8QEulGNK8l2OF3WTyh9wp7Mxa+gGmleoNzC9BhlNp4uTxNhYiPQDcK 7oWsoiZ2q5NjP5P9MS+z3pyIg2aWZiB/28vIr6wydIs46Wfo3NCbF8D5GDzT+uywq8 PjyVfl45S+cQGloMXesv4YJdgNZhVZs65v+ig6Pw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4DE29F80423; Thu, 10 Feb 2022 07:51:26 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A55BBF80423; Thu, 10 Feb 2022 07:51:24 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on20613.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e83::613]) (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 673AAF80423 for ; Thu, 10 Feb 2022 07:51:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 673AAF80423 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="VVRWdu/z" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LYKLRTsXKNmkHeNO3wbRS4Wy2OANj/XdoU1az4NBWpYkbPaz40UMtkJofxRERC8pucG+HHP/CSdgJgUnTN78aTiBpSqbToM3H/kUWENJDOqEBNRreAiffhungRWi5KScQ3KL7giVDoQdwC1x2k/TzNp38I6Se/a1tV0sDkZsCyqbk6WUdx+j8iMTsWZT7qNw5OkOLvtzar1wtAtTtIlGZVYwhUJuRZ1eQCv2WTqX5QMVfDha1ZMuVOs6a3LZPaA0bSZjcSC52FJSps340J9kFDsVcYxq/56QoNeo8SQDhM+xvucK9HHCR/oZZKUE+c824jbdscSrgxuLFZ1J81XZJw== 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=TyzCqJeD1HQ0eLP5+04rVR1LsYSQBNJgx+wbf5BLld8=; b=hgw+TDmj2HBf1AzoNK/CEfUSro8mUmPTCsu4IWBdiZVp2Jh13HgHbV8chbuAT2lSqU30m6yaGybu1Xhynvu83QW0eT3EeFRSghbNET8bpsqQlyci9igVLPfUujRB7VVq7GHP98DGqh3+1Ongir+xr7VYoJVcy4+XU9rohx+NdsYBp/PSN/oSgcmXebdwLvXVddoT29Fyyw0l0SDlayFY3sZJVKTLVG/60jSuPE8FmzYSRE8W0SKeIoF0c5ZEr4l5afpZs+gZsKhUrRLI48kR7K/xc/pVuvC3Xhn8r5qzldukivgvd++VPQhrligEaeRcj4LjZpo7trIkNUwZ5CLuVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TyzCqJeD1HQ0eLP5+04rVR1LsYSQBNJgx+wbf5BLld8=; b=VVRWdu/zbjCl0a/ap2w3P9Y7VIcXnS33zFKBAi19sC3rOjrIk/mA21qRgrcoJNHLq2pN2hItP4zw9hkkaVHmLYukC8mxM9VW5lqkHAWyatuw3mDlJ/W/tbV+f2s0H7LPXAK6q2YXY2XR90sklntO3U+YMBU6Itedw0BNNu+gJquZ53LZGX1VtfUplmAofZu2rd2jmue3HhBuekUewkm0T5sQA8UttoqNgCwcaEWQ8TEn6MMuiqHlQyPkH7KM5vb0YD5I0X9Xzg6V1Y2gspbhbzSzy+mMxVupVYJhD+PpNDJk9XES1A1rnLtFJK773fDeZ/wdi/NYbGplqRwHwalA5A== Received: from DM6PR07CA0105.namprd07.prod.outlook.com (2603:10b6:5:330::8) by SA0PR12MB4446.namprd12.prod.outlook.com (2603:10b6:806:71::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Thu, 10 Feb 2022 06:51:13 +0000 Received: from DM6NAM11FT058.eop-nam11.prod.protection.outlook.com (2603:10b6:5:330:cafe::99) by DM6PR07CA0105.outlook.office365.com (2603:10b6:5:330::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.12 via Frontend Transport; Thu, 10 Feb 2022 06:51:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by DM6NAM11FT058.mail.protection.outlook.com (10.13.172.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 06:51:13 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 10 Feb 2022 06:51:12 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Wed, 9 Feb 2022 22:51:11 -0800 Received: from mkumard.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.9 via Frontend Transport; Wed, 9 Feb 2022 22:51:08 -0800 From: Mohan Kumar To: , , , , , , Subject: [PATCH v2 2/6] ALSA: hda/tegra: Hardcode GCAP ISS value on T234 Date: Thu, 10 Feb 2022 12:20:53 +0530 Message-ID: <20220210065057.13555-3-mkumard@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220210065057.13555-1-mkumard@nvidia.com> References: <20220210065057.13555-1-mkumard@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 72944eea-044b-4a13-26dc-08d9ec61ba57 X-MS-TrafficTypeDiagnostic: SA0PR12MB4446:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +oxbnvQvITJeh+FbQWvA/EMoE4rl7lgKvwowl+Q0EEkwRsVs1BF1cTFHu2EM6ubT9b8PUuG1Ad3Ek5Ix0dv0pAkskE/zbBFoVKA6HjGXI9v4GM/cf0qKO41gBhZ7Dglbl5/tjjuDpg2xAQ8ngzvmelX/ykM01bMOmKzfg4lzf+Sx2ZIMFe6xe1VWSmW2yVaS1oXFk+5s1a6yHJZy8dRGou8m8TSqzE4KHTE3OjM+iQ2TCkFhn/1tCTfO+B5UMzH+A1MNMRy2twuwacUjgReBqYE1veFk/cpwxVoijhu9lXrjNOfsTD99PNyuThwAaCDCAyeDJbVtKt48z2sH4YqvEOldGtJx1JvN+72GhP8viadgqx+S0mp0jonzaubTrjrDfsYH14/F9AblTfb5HIkVuqcSjstYar01NW6luM+BA2iePq/JbthwDj2ko6nlK9x9N1s+8dso/9uhjNFa0CFmMV2n51drGosKDHVGRN2/RLxj6ttKcksFvNTaKkgi2J9JsWOKihsj9VSGewhGS0LX7jp6Pf4POLKNZMu9d7k4FhnAIBeSi9DCtQSNs4P+vXv6vF0FpSGptbfvLSV2iYKQG74ODOtHJh8yvLjNBqWujt2PgshEGbKc9NNTEuybXaD/sNCAbZQE6FC1/UlOfE0ynlBkG9nE5D9nfQS4Z1jC67YCfMIlj7CWCpWApXucxbiInxBmk/UmYd1o88T6AGAqK1TGIF38CH5twh4xJwqkWV4= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(6666004)(2616005)(107886003)(356005)(7696005)(82310400004)(81166007)(5660300002)(316002)(508600001)(36860700001)(110136005)(6636002)(54906003)(2906002)(47076005)(40460700003)(70586007)(36756003)(336012)(70206006)(1076003)(4326008)(8676002)(8936002)(26005)(186003)(426003)(86362001)(36900700001)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 06:51:13.0798 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 72944eea-044b-4a13-26dc-08d9ec61ba57 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT058.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4446 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Mohan Kumar 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" The GCAP register on Tegra234 implies no Input Streams(ISS) supported, but the HW output stream descriptor programming should start with offset 0x20*4 from base stream descriptor address. This will be a problem while calculating the offset for output stream descriptor which will be considering input stream also. So here output stream starts with offset 0 which is wrong as HW register for output stream offset starts with 4. So hardcode the input stream numbers to 4 to avoid the issue in offset calculation. Signed-off-by: Mohan Kumar --- sound/pci/hda/hda_tegra.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index 95df52b0505b..2347d0304f93 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -315,6 +315,18 @@ static int hda_tegra_first_init(struct azx *chip, struct platform_device *pdev) * hardcoded value */ chip->capture_streams = (gcap >> 8) & 0x0f; + + /* The GCAP register on Tegra234 implies no Input Streams(ISS) support, + * but the HW output stream descriptor programming should start with + * offset 0x20*4 from base stream descriptor address. This will be a + * problem while calculating the offset for output stream descriptor + * which will be considering input stream also. So here output stream + * starts with offset 0 which is wrong as HW register for output stream + * offset starts with 4. + */ + if (of_device_is_compatible(np, "nvidia,tegra234-hda")) + chip->capture_streams = 4; + chip->playback_streams = (gcap >> 12) & 0x0f; if (!chip->playback_streams && !chip->capture_streams) { /* gcap didn't give any info, switching to old method */ From patchwork Thu Feb 10 06:50:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohan Kumar D X-Patchwork-Id: 12741447 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 9D947C433EF for ; Thu, 10 Feb 2022 06:53:03 +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 21C91185A; Thu, 10 Feb 2022 07:52:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 21C91185A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1644475981; bh=1RsUUXQsXYarnx0lZf0vyma5a0qDFaOfVPXyqcvoCcI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JS5AHmSjsKxmR0Luep0BoGomzdMAu2Bm/mlS3RSPvU5UBENY+stI363VZ3FLe3DIq NsW1vjAdiVL7gomvZNU+eC/L8tczRxtohgHk2WJ9+q1yQdgZzg6C1ovIM7pMk3TFbP uLgRiGL/FVNkpKu6URtXvTkjl1heGHoyh1u/lWzs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 95715F8051B; Thu, 10 Feb 2022 07:51:30 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F0A65F8051C; Thu, 10 Feb 2022 07:51:28 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on20630.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5b::630]) (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 0F3B5F80519 for ; Thu, 10 Feb 2022 07:51:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0F3B5F80519 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="uVTmwhM8" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nXHHUgeqkRB1BHqJM5od56q6uo+8jWCq2wgzafS+UctvSsJwvRpFUmCJOH16pmh2RwPAEEG3bMB+u9rs/fFwD+CF99ElRvhhuI0KROMX4u08BbHpTW0UDvgttBr2JzAC6TgW374hUUS5qHYc46tFf+V16U+phD52Wzi/bpmmKDCvFt6qxjyijcdvs5XmtFCLEKCqFOF/shcqIw/r9lkU4Uk3x1h8642b/MumrB/srPz0khUKuV6iY8xUI6x7gmA9An3odQo+P9p6WCdInqRI0bnQOXkT8aOEaJT07/tkiCf89L391P1+2+osJBQWiSA45n9DX+YVSpdLs+Rj9WWY4w== 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=4XXBHuuCU2aQXvty1QvSm76FHqWPp9E1FmvmSdPCD3Y=; b=BFhEDJYoIhpK99mv4EUbGp66tpMOCzzekJUxUyXfkWW44zYakHTAZHOjAQi0T+d/GUE7mx3eU8N/l9ubGNmzSCdlstT8fRg5h5Fi0Ug8bMS2BFq2fJGkAQ1q5xdkvIo5u1ZeykCpa32sCsHXCAcXNpCI3xuQsLwnNL5Xu/H8CotQa7NnZUaQSfejDoUyh0CBiXrNygbbP7/jkM1lMFP1laAqpTJOI1Z/RWP332BJtvjnDghobshATEurdMtlx6pSnGAr9UVODnUvG39IchSs/1yvHswqjzBZARUWAH7xElzDKZY+xp+pNbCdMn+Atihpq05Tx39IX0s2hBnyLLTomA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4XXBHuuCU2aQXvty1QvSm76FHqWPp9E1FmvmSdPCD3Y=; b=uVTmwhM8WomuTQhYaXNQcg9Jiivi0RmSkiqrFRWXMPeI4iV2Zm7kwEDkTZ5fCXXX1yyWfatjWe15VCeNMwa6dH7DVMKHHtSgDvatXUejjkHMK0uzSq+2gCaAICC99NpEwW+txvk/pDF/59asi/fzHz0BZDGek7TX1D967oIJUbMeJCUvSSbPXCV7DCStajOtIj3wJwVyNJQwshwPEMRNF7lOBtFImsmqfQiLlqAd3f8VUCr9cHxp25sbYI8wwjU5g40gsS1/8hiAh49U4jzkGWqZgRI32/nnQ+BBxdyvai6oqYhNTUVt84M2qmjyFH8PVyLHiLPiaKNOlLtIcUmrSQ== Received: from MWHPR04CA0065.namprd04.prod.outlook.com (2603:10b6:300:6c::27) by CY4PR12MB1670.namprd12.prod.outlook.com (2603:10b6:910:4::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Thu, 10 Feb 2022 06:51:17 +0000 Received: from CO1NAM11FT042.eop-nam11.prod.protection.outlook.com (2603:10b6:300:6c:cafe::c0) by MWHPR04CA0065.outlook.office365.com (2603:10b6:300:6c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 06:51:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.238) by CO1NAM11FT042.mail.protection.outlook.com (10.13.174.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 06:51:17 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 10 Feb 2022 06:51:16 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Wed, 9 Feb 2022 22:51:15 -0800 Received: from mkumard.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.9 via Frontend Transport; Wed, 9 Feb 2022 22:51:12 -0800 From: Mohan Kumar To: , , , , , , Subject: [PATCH v2 3/6] ALSA: hda/tegra: Update scratch reg. communication Date: Thu, 10 Feb 2022 12:20:54 +0530 Message-ID: <20220210065057.13555-4-mkumard@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220210065057.13555-1-mkumard@nvidia.com> References: <20220210065057.13555-1-mkumard@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 87dd84aa-bb64-4aa9-5731-08d9ec61bcee X-MS-TrafficTypeDiagnostic: CY4PR12MB1670:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2kLK51b4pE/jUKj6otRn3SxuSs3w3DIAAypoxGVvvN90AehiV5BMLXOAhqLZ400akRPdF5XuY15prr/iLcSNexgify4TKyGxXwcdqMMYi3pg6Sxa2AwudmSA6eBTLCO71C3CJRjWK3DLHw7aVw+sVivFyccoDSphaSVY7FvVoN6sTdThbRsrpbD/hBkZuDFVZo4SyF1aj/CWqWkTXEZ8kKUZvCJPggIAtZ8hSVreWFotnEl2jvN2ldLZp83C+dNoriNbAz0U0ulIYMj/yAg8V9DHCWBqbt9uWpFVQ4gGVaK60TH5Wx3ZKVK+03ZsGAVCS101ky3YhAYETdaCo8jDAv+Ms08CCovby9EME7CmExHyZ4Urud8gop6xU4ZKwUBip8fpbEHZ+c0U0u04gsa1E4kuGrpoSFswXLBHE4QkY8ghl9CKSQ4Uz//1capdHLJubjgKsjNLqQhwsyldj+J1Qva0LgYT/KX1HqKMysxtUbuCHt7XhtjXauyonahPRXz7ZGbdYM5nliO2OX0HLScoH/g5O3TA+SEYVs7zTEuoFaGhRg3urL5cMSrOYevTIF/yuT/dppyMKsnbuMQtsKMgP1DFm2Y3twfuu7hbQjm1HNxmXRiYdnKNcm8nPvH+Xmv3bIEmoBqANlakik1Trd1HCUqtICxwJam6zklemyOHd2s0Pbnm/bygsCF7jo/J0Tu6p/nsW5itDG5eaNwHG0K4CHUcoxFqUIR8okUtsOaWz34= X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(186003)(316002)(70206006)(6666004)(54906003)(6636002)(82310400004)(8936002)(36756003)(110136005)(2616005)(107886003)(1076003)(26005)(426003)(4326008)(83380400001)(70586007)(8676002)(336012)(47076005)(40460700003)(15650500001)(7696005)(86362001)(356005)(5660300002)(508600001)(2906002)(81166007)(36860700001)(36900700001)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 06:51:17.4417 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 87dd84aa-bb64-4aa9-5731-08d9ec61bcee X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT042.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1670 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Mohan Kumar 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" Tegra234 chip scratch register communication between audio and hdmi driver differs slightly in the way it triggers the interrupt compared to legacy chips. Interrupt is triggered by writing non-zero values to verb 0xF80 instead of 31st bit of scratch register. DP MST support changed the NID to be used for scratch register read/write from audio function group NID to Converter widget NID. Signed-off-by: Mohan Kumar --- sound/pci/hda/patch_hdmi.c | 64 ++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 16 deletions(-) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 879f886d2406..2eebb302a7bd 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -162,6 +162,8 @@ struct hdmi_spec { bool dyn_pin_out; bool dyn_pcm_assign; bool dyn_pcm_no_legacy; + /* hdmi interrupt trigger control flag for Nvidia codec */ + bool hdmi_intr_trig_ctrl; bool intel_hsw_fixup; /* apply Intel platform-specific fixups */ /* * Non-generic VIA/NVIDIA specific @@ -3721,8 +3723,11 @@ static int patch_nvhdmi_legacy(struct hda_codec *codec) * +-----------------------------------| * * Note that for the trigger bit to take effect it needs to change value - * (i.e. it needs to be toggled). + * (i.e. it needs to be toggled). The trigger bit is not applicable from + * TEGRA234 chip onwards, as new verb id 0xf80 will be used for interrupt + * trigger to hdmi. */ +#define NVIDIA_SET_HOST_INTR 0xf80 #define NVIDIA_GET_SCRATCH0 0xfa6 #define NVIDIA_SET_SCRATCH0_BYTE0 0xfa7 #define NVIDIA_SET_SCRATCH0_BYTE1 0xfa8 @@ -3741,25 +3746,38 @@ static int patch_nvhdmi_legacy(struct hda_codec *codec) * The format parameter is the HDA audio format (see AC_FMT_*). If set to 0, * the format is invalidated so that the HDMI codec can be disabled. */ -static void tegra_hdmi_set_format(struct hda_codec *codec, unsigned int format) +static void tegra_hdmi_set_format(struct hda_codec *codec, + hda_nid_t cvt_nid, + unsigned int format) { unsigned int value; + unsigned int nid = NVIDIA_AFG_NID; + struct hdmi_spec *spec = codec->spec; + + /* + * Tegra HDA codec design from TEGRA234 chip onwards support DP MST. + * This resulted in moving scratch registers from audio function + * group to converter widget context. So CVT NID should be used for + * scratch register read/write for DP MST supported Tegra HDA codec. + */ + if (codec->dp_mst) + nid = cvt_nid; /* bits [31:30] contain the trigger and valid bits */ - value = snd_hda_codec_read(codec, NVIDIA_AFG_NID, 0, + value = snd_hda_codec_read(codec, nid, 0, NVIDIA_GET_SCRATCH0, 0); value = (value >> 24) & 0xff; /* bits [15:0] are used to store the HDA format */ - snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0, + snd_hda_codec_write(codec, nid, 0, NVIDIA_SET_SCRATCH0_BYTE0, (format >> 0) & 0xff); - snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0, + snd_hda_codec_write(codec, nid, 0, NVIDIA_SET_SCRATCH0_BYTE1, (format >> 8) & 0xff); /* bits [16:24] are unused */ - snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0, + snd_hda_codec_write(codec, nid, 0, NVIDIA_SET_SCRATCH0_BYTE2, 0); /* @@ -3771,15 +3789,28 @@ static void tegra_hdmi_set_format(struct hda_codec *codec, unsigned int format) else value |= NVIDIA_SCRATCH_VALID; - /* - * Whenever the trigger bit is toggled, an interrupt is raised in the - * HDMI codec. The HDMI driver will use that as trigger to update its - * configuration. - */ - value ^= NVIDIA_SCRATCH_TRIGGER; + if (spec->hdmi_intr_trig_ctrl) { + /* + * For Tegra HDA Codec design from TEGRA234 onwards, the + * Interrupt to hdmi driver is triggered by writing + * non-zero values to verb 0xF80 instead of 31st bit of + * scratch register. + */ + snd_hda_codec_write(codec, nid, 0, + NVIDIA_SET_SCRATCH0_BYTE3, value); + snd_hda_codec_write(codec, nid, 0, + NVIDIA_SET_HOST_INTR, 0x1); + } else { + /* + * Whenever the 31st trigger bit is toggled, an interrupt is raised + * in the HDMI codec. The HDMI driver will use that as trigger + * to update its configuration. + */ + value ^= NVIDIA_SCRATCH_TRIGGER; - snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0, - NVIDIA_SET_SCRATCH0_BYTE3, value); + snd_hda_codec_write(codec, nid, 0, + NVIDIA_SET_SCRATCH0_BYTE3, value); + } } static int tegra_hdmi_pcm_prepare(struct hda_pcm_stream *hinfo, @@ -3796,7 +3827,7 @@ static int tegra_hdmi_pcm_prepare(struct hda_pcm_stream *hinfo, return err; /* notify the HDMI codec of the format change */ - tegra_hdmi_set_format(codec, format); + tegra_hdmi_set_format(codec, hinfo->nid, format); return 0; } @@ -3806,7 +3837,7 @@ static int tegra_hdmi_pcm_cleanup(struct hda_pcm_stream *hinfo, struct snd_pcm_substream *substream) { /* invalidate the format in the HDMI codec */ - tegra_hdmi_set_format(codec, 0); + tegra_hdmi_set_format(codec, hinfo->nid, 0); return generic_hdmi_playback_pcm_cleanup(hinfo, codec, substream); } @@ -3906,6 +3937,7 @@ static int patch_tegra234_hdmi(struct hda_codec *codec) spec = codec->spec; spec->dyn_pin_out = true; spec->dyn_pcm_assign = true; + spec->hdmi_intr_trig_ctrl = true; return tegra_hdmi_init(codec); } From patchwork Thu Feb 10 06:50:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohan Kumar D X-Patchwork-Id: 12741448 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 A4654C433EF for ; Thu, 10 Feb 2022 06:53:44 +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 B4D8242; Thu, 10 Feb 2022 07:52:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B4D8242 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1644476022; bh=Qwwz21CEqjxLSiXnKtaInT9WwpLEaweSwNkogJp0U+0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=NJISfCylWP/K/s/PMqFm8rXj2yhtu7C9uSW+tc94To0I6dG5bMe6/YEp1Mwl2F3N1 +qEXcMV5yddqpxXRDnSizn2Ib3XZN6aU/aAMpx3V2FVyYT8r7X3v8pWAQUGGPuCDJa saJ+h5TN+Z0gjGeD1+KT0iYpO/aarTGQyDimZY9o= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 16363F80526; Thu, 10 Feb 2022 07:51:39 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 75682F80528; Thu, 10 Feb 2022 07:51:35 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2060f.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eab::60f]) (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 2B84BF80519 for ; Thu, 10 Feb 2022 07:51:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2B84BF80519 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="qqp8Lqhf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y/PwgiS5o2S9W8C86XKfzGuLQHXU0Yy7c4BhlhBsIHvNT9zd34rDLJFXIOEDCLqLTJl1cDWzJuG/OWexWHJ7qeR39LzN9l2JLGqOLyHlHM46X6tcaSGA4yz8Ls75aPS25CDmfS5oHlJ6idAKqx43uRP9emx2Xi9XrKy3r3Gu0fq7ihDfjA2hY0NWZrmtI7hSAx2IfhmXrShAGLk6SnVWiqQDWH/pIc6f7+YK1SR/9OOdQ1zmK2sODmdo9hXFbONT9tUZrXp2SxzWjlPGga/OIu9WGbSmr99bLl7eqC4uOhv7v3F68NJZVt+ksN9Y7w8EwMvGja6Quvvsbvad4ZMnQA== 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=dZ8pWhBYxN4Z8njNSU7NHJbHmRMuwUbMwx09/TIKk9g=; b=l4CvUsE8/+15iZqgvC7XcGukmOSabkToGmwE3KT69XKVTYQ41UXdjnd22jCUfgrr5NfboylNQEWo+B0Kit+rKDnfi1PFpgIjFnciUBK3IlB/aq2Srh/CAIb36ZpY1JM4+6hbGOgXbY5YMmFAQB0ZyCpIhVFZ8++Ng8Zd7SwPjNoUvACQPTeiA5+59vUj83yLBeGu5Av87OwQjXB7HT/WveDDk/F/njbepKC3+WMIW+3MKB7n0Aju4AuaUXFj1ZSsskXyXlzv2yXQQXB2JojZ2dQFT0r8+Y2wAHy2E/sTdkSrCRDZTyNINEDQyaFBp0R1PLbOsDcVFsOGSr9OQozCGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dZ8pWhBYxN4Z8njNSU7NHJbHmRMuwUbMwx09/TIKk9g=; b=qqp8LqhfNj+wHeHvK2B9ffXvqlO4K0Z6wHOxowIWzRlDmW619RwFtnFijk+wwoT6OhTEcWcMB9MBqjHxbB5FIyj9NDhy7SXSSgL4+/GKg8cH6GZeQR/UTNa9wFpSpUI6U9/kH68gRHyjQIonorw9UENjG+j1qI6v8e+qknp3jUiivqXjVPEzrryS2hm7KL5W7jQuRh+ciNVOfEWm3mBERGf6FmfKhpKmzDMYfFGxdexL+TciRd+L/iKjr0uQ/JpDb8XmncPF5VWx8asRQ6dkNhUBHEEI729lGKympLooUCc788kue8MZegWUrBePl1zJbl7skprRV/PVQdiogK13Dg== Received: from DM6PR05CA0041.namprd05.prod.outlook.com (2603:10b6:5:335::10) by MW3PR12MB4409.namprd12.prod.outlook.com (2603:10b6:303:2d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.12; Thu, 10 Feb 2022 06:51:21 +0000 Received: from DM6NAM11FT044.eop-nam11.prod.protection.outlook.com (2603:10b6:5:335:cafe::bf) by DM6PR05CA0041.outlook.office365.com (2603:10b6:5:335::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 06:51:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.234) by DM6NAM11FT044.mail.protection.outlook.com (10.13.173.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 06:51:20 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 10 Feb 2022 06:51:20 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Wed, 9 Feb 2022 22:51:19 -0800 Received: from mkumard.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.9 via Frontend Transport; Wed, 9 Feb 2022 22:51:16 -0800 From: Mohan Kumar To: , , , , , , Subject: [PATCH v2 4/6] dt-bindings: Add HDA support for Tegra234 Date: Thu, 10 Feb 2022 12:20:55 +0530 Message-ID: <20220210065057.13555-5-mkumard@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220210065057.13555-1-mkumard@nvidia.com> References: <20220210065057.13555-1-mkumard@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c6150b75-a42b-49f6-39ac-08d9ec61bef5 X-MS-TrafficTypeDiagnostic: MW3PR12MB4409:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1079; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Uv8bbeCj9my/xAI6L/l0JZSZd4fYS1hX7APN6EQtxSSdeAJkFtxDFX7g8J5q3G/5HgDNh8XuEL7y1T/EJQcsICJIWtLMh+WWxBFN5Zt9igTQSPui/YtAPNIpvahgP/p9ExTKtu+PqVYlNr0ZkM/8dJRY1i+QBKzliuFQAinwb6v6+Cj0R9hMzo3Yi79JLv2icOpOsUB3n2ytIsBSwHUnVZ5rrCyLfevnYJKk5KjJwUqPJ3Frnl1u7RyOmSiVbZ+3HKwkdlpUNVRQFqFzvnXTBrBxeMNgf7F044fHaQvlFblSR3pJZztkgVt/a5oQLa65ibD1iD4ZWcYDmKbZPBZgFnYhdyY1iJ6HoYi3OOigIyjB2mFYxdpuvZ9aMTIdig+o2CmzOSAogY3NExGXXu9azsnyPvQrdqTGUu+VrLm6nF5EswUOkU1pKspMIA+f/hd7RzvO82lrM00QSaGnUppL/adaTKbiU3CljZowwE0L2XTMjOpdRgUL/P3eG82JY8w4or6mweXotFiJSdHEJnJ82MefbqvBXElq4javqhD0jJhsnDslCqbnpLtWlp8dUGo90aShuGbJVQSzYtfT9IdghkhXhEBuTtOYpLVNRI8vPYnfm87duVOwcTa99t5OacDHcyj5a1d8buDU4+vZlm9Gr45vBzDchoXlQR0Y6BqJvONUMTyj4Ef5kWtpbs8Y+QVIpQ8MyK2QxypeCIneFEML+gWnTV4ZWZKz3CXp8sLdxks= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(2616005)(1076003)(426003)(336012)(186003)(26005)(107886003)(36756003)(8936002)(70586007)(4326008)(54906003)(6636002)(316002)(8676002)(70206006)(110136005)(7696005)(2906002)(508600001)(6666004)(82310400004)(40460700003)(5660300002)(356005)(83380400001)(81166007)(36860700001)(47076005)(86362001)(36900700001)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 06:51:20.8267 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c6150b75-a42b-49f6-39ac-08d9ec61bef5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT044.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4409 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Mohan Kumar 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" Add hda clocks, memory ,power and reset binding entries for Tegra234. Signed-off-by: Mohan Kumar --- include/dt-bindings/clock/tegra234-clock.h | 4 ++++ include/dt-bindings/memory/tegra234-mc.h | 6 ++++++ include/dt-bindings/power/tegra234-powergate.h | 9 +++++++++ include/dt-bindings/reset/tegra234-reset.h | 2 ++ 4 files changed, 21 insertions(+) create mode 100644 include/dt-bindings/power/tegra234-powergate.h diff --git a/include/dt-bindings/clock/tegra234-clock.h b/include/dt-bindings/clock/tegra234-clock.h index 8d7e66e1b6ef..c014269b7245 100644 --- a/include/dt-bindings/clock/tegra234-clock.h +++ b/include/dt-bindings/clock/tegra234-clock.h @@ -30,5 +30,9 @@ #define TEGRA234_CLK_PLLC4 237U /** @brief 32K input clock provided by PMIC */ #define TEGRA234_CLK_CLK_32K 289U +/** @brief CLK_RST_CONTROLLER_AZA2XBITCLK_OUT_SWITCH_DIVIDER switch divider output (aza_2xbitclk) */ +#define TEGRA234_CLK_AZA_2XBIT 457U +/** @brief aza_2xbitclk / 2 (aza_bitclk) */ +#define TEGRA234_CLK_AZA_BIT 458U #endif diff --git a/include/dt-bindings/memory/tegra234-mc.h b/include/dt-bindings/memory/tegra234-mc.h index 2662f70c15c6..f538fc442cee 100644 --- a/include/dt-bindings/memory/tegra234-mc.h +++ b/include/dt-bindings/memory/tegra234-mc.h @@ -7,6 +7,8 @@ #define TEGRA234_SID_INVALID 0x00 #define TEGRA234_SID_PASSTHROUGH 0x7f +/* NISO0 SMMU STREAM IDs */ +#define TEGRA234_SID_NISO0_HDA 0x03 /* NISO1 stream IDs */ #define TEGRA234_SID_SDMMC4 0x02 @@ -16,6 +18,10 @@ * memory client IDs */ +/* High-definition audio (HDA) read clients */ +#define TEGRA234_MEMORY_CLIENT_HDAR 0x15 +/* High-definition audio (HDA) write clients */ +#define TEGRA234_MEMORY_CLIENT_HDAW 0x35 /* sdmmcd memory read client */ #define TEGRA234_MEMORY_CLIENT_SDMMCRAB 0x63 /* sdmmcd memory write client */ diff --git a/include/dt-bindings/power/tegra234-powergate.h b/include/dt-bindings/power/tegra234-powergate.h new file mode 100644 index 000000000000..3c5575a51296 --- /dev/null +++ b/include/dt-bindings/power/tegra234-powergate.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. */ + +#ifndef __ABI_MACH_T234_POWERGATE_T234_H_ +#define __ABI_MACH_T234_POWERGATE_T234_H_ + +#define TEGRA234_POWER_DOMAIN_DISP 3U + +#endif diff --git a/include/dt-bindings/reset/tegra234-reset.h b/include/dt-bindings/reset/tegra234-reset.h index 50e13bced642..2ab61c69a3d9 100644 --- a/include/dt-bindings/reset/tegra234-reset.h +++ b/include/dt-bindings/reset/tegra234-reset.h @@ -10,6 +10,8 @@ * @brief Identifiers for Resets controllable by firmware * @{ */ +#define TEGRA234_RESET_HDA 20U +#define TEGRA234_RESET_HDACODEC 21U #define TEGRA234_RESET_SDMMC4 85U #define TEGRA234_RESET_UARTA 100U From patchwork Thu Feb 10 06:50:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohan Kumar D X-Patchwork-Id: 12741450 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 11736C433EF for ; Thu, 10 Feb 2022 06:53:52 +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 381CB189D; Thu, 10 Feb 2022 07:53:00 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 381CB189D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1644476030; bh=VAWq/rWWCFh6qSzDmMfL56wZQirNM6fXpW+/EwhqIi0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=I3pOHGShAdgZixjMKAHKcNReOL0X3ZJ/0Qo8RofMsYZ71CfNDa+1dDOPYscSk7OMi 4xwW+sor3DFITGIjcZ1+ZBQqwzOsEUjLQa463/8arJz6ipXlYEYanhSsI449PziOps TDhXSd1Tr5cXH/LBbzglgG96aif2oMA1DblMxZ6c= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 53A3CF8052F; Thu, 10 Feb 2022 07:51:40 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9B20DF80529; Thu, 10 Feb 2022 07:51:38 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2060c.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5b::60c]) (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 07763F80519 for ; Thu, 10 Feb 2022 07:51:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 07763F80519 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="oDu2yZ6G" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AJM7/mdSzSKJC2pQBSQpu6MLv03XVmXD6qZYlBPYu4J/psW43cc9q6vBWe8wi+PXiuP+gI8wXGtccOpmC522/GZKiRMHKtvdhTd1Tg7Vnqdt+EC+3/Uk45kg1XjRae7no36mANKhXlmPPfiLYyW1lCGONUGQpEgG0oISSFlhy9GnTrAAxu+M8Ta01rXktfafsavyeAeDJqvoiz0sf82YPF/Or/ii5+JwRwTiwqHloevmWUpoqGVDyhWG29re1WqHBbe0uBGS85zbxRZlemBaVvApmtsj1tHKBwvSLD7WKkU6NRv4WPSOEoblukiN5QT4WqgZDf0paPzBNYzSi5RUjQ== 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=PqSv5upnBHfrIMKWFCoWxPoIIXnra5crEdhhW/W4OXo=; b=B1GXsSHglvtgM+idaJm68yDUsAYw5wzVBJRwAiwqh1kPWg2iqezTLssXpmMPmoHPJCT1WshgjckxvrqINdsDJr3iCqZ6J3bX7LXLOn+49px5Uxsi/cK1poVb90idNrUtETgX8uObLMdpI2+PB7uleay14Gnbim++N4aRtwv+p81BORMjOL5tjdbnKQ0vbuuLPVXMV1QDtjxu2SiOEAl7meucpXwwRMlxJEc7++zSNiKDIuyyQFo235Fi3bXIwYsFGqvDLoURzIHgVhFE+7KOt0M1Yu+s/V6TjF1DvPcGHppkuNuf9y9R3bs8yV3/2yADEf1DniQYtYa9etS+mMvLJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PqSv5upnBHfrIMKWFCoWxPoIIXnra5crEdhhW/W4OXo=; b=oDu2yZ6GfzTbUYcQOCtSFaGxTnjwuEePn0evGlrgwUbGwE/vMkHaSTF6minvAR7m3NL6L6KFgjw5YGyiJ8ML/vXlwfnISGfF5lOblfq6YzJ6G0GKpwYKlPc7edgk4qV9BxMeX66SlrNmJ+9uQrf2fvIbFPsbOaGA5p8wznNXPp51Gy4y2r8Cs0w2H+PWSfJprDMqbYrT7TTLXzh8E4trbeu/P8BNwUDoG/UehDC/MAutndLVUSZ2udYw2tr2jEQPoKFX2vzPg8p3iT9liaMgDLPUy+0DAn/giz8Rw0B/j+w2gSN+BwSXbgiWuQrYzN0W45w05OCtJPZtH8hU2Gz5QA== Received: from DM5PR17CA0063.namprd17.prod.outlook.com (2603:10b6:3:13f::25) by BYAPR12MB2711.namprd12.prod.outlook.com (2603:10b6:a03:63::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Thu, 10 Feb 2022 06:51:30 +0000 Received: from DM6NAM11FT026.eop-nam11.prod.protection.outlook.com (2603:10b6:3:13f:cafe::7d) by DM5PR17CA0063.outlook.office365.com (2603:10b6:3:13f::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 06:51:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.236) by DM6NAM11FT026.mail.protection.outlook.com (10.13.172.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 06:51:29 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 10 Feb 2022 06:51:24 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Wed, 9 Feb 2022 22:51:23 -0800 Received: from mkumard.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.9 via Frontend Transport; Wed, 9 Feb 2022 22:51:20 -0800 From: Mohan Kumar To: , , , , , , Subject: [PATCH v2 5/6] dt-bindings: Document Tegra234 HDA support Date: Thu, 10 Feb 2022 12:20:56 +0530 Message-ID: <20220210065057.13555-6-mkumard@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220210065057.13555-1-mkumard@nvidia.com> References: <20220210065057.13555-1-mkumard@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fab4c882-7308-4da4-19bb-08d9ec61c439 X-MS-TrafficTypeDiagnostic: BYAPR12MB2711:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lFN7NlowEG1U7rujNPm9t8SbdlhP5qTCmCofKGr/Gfe5M83zF9D06D0UPJh/R+omPTykzYG/JG7ZL9Ff79FT5tXBICVUbsgXF2aa13su1gNQMRTs1p8AwYD46hhuBt2AiUdzMyCnjd1J16LnRfVpQy1Mj/14ZTYVMJaMZLoKt0auv80u47BO+aT3egA1/1Zfu+ChVk+XrIvq2KJRb7/ylCmql0K5SsMQGxzAXZyMUli7EJc+7sHjUWjyrLIsY467nSs7gCbmqvxITA2uocEQB2JidDf3Syy9JV+CN4pwLH/asZt+MTkfyK10mK8/h7AQW/yDXFBKiHzOEpaC4WMjmiAA6p78gJ/j0dUTbr1biewbws1c+qFPNcyo2Efy0ShHMynYv0qTtc8wXIPJ98F9cgwMpI7X4qyPu5y1ql3DCrk2sGd3SKboo1YBDy8H28h+WOo5AGlfvE0IFDhicn94HjiYN2Rq+wL9Fr5HmBy21U1A7h6r8hXXXoGHOykn2MTvbGnYYiof3JV0vBdLK40/tZzU9vRVWJhYJGzNT+VdmfNsKA2+853gn8TDFoopAF609OLFiN+wUSOnAwr2flsKLjTvd8skpxN3UDwppSJin08i+/bHT4vBYfq9Y942x3chw454GlWR4oS0MNCAlAgJqn7lRylKW0joQoqq76U1k1OgcwIsMA50E6UNIcf2Wc5a7/RaNXLNAHbijoDeByALZJZBPE6z9dveh02pCo5teT8= X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(47076005)(186003)(54906003)(26005)(508600001)(110136005)(316002)(6636002)(8676002)(336012)(70206006)(70586007)(83380400001)(36756003)(4326008)(1076003)(8936002)(2616005)(426003)(107886003)(86362001)(40460700003)(82310400004)(36860700001)(81166007)(2906002)(7696005)(6666004)(5660300002)(356005)(36900700001)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 06:51:29.6601 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fab4c882-7308-4da4-19bb-08d9ec61c439 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT026.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2711 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Mohan Kumar 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" Update binding document for HDA support on Tegra234 chip. Tegra234 has max of 2 clocks and 2 resets which requires to add minItems and maxItems for clocks and resets as Tegra chips can now have minimum of 2 and maximum of 3 clocks and reset support. Signed-off-by: Mohan Kumar --- .../devicetree/bindings/sound/nvidia,tegra30-hda.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml index 2c913aa44fee..12c31b4b99e1 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml @@ -23,6 +23,7 @@ properties: - const: nvidia,tegra30-hda - items: - enum: + - nvidia,tegra234-hda - nvidia,tegra194-hda - nvidia,tegra186-hda - nvidia,tegra210-hda @@ -41,9 +42,11 @@ properties: maxItems: 1 clocks: + minItems: 2 maxItems: 3 clock-names: + minItems: 2 items: - const: hda - const: hda2hdmi From patchwork Thu Feb 10 06:50:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohan Kumar D X-Patchwork-Id: 12741451 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 C9C3EC433F5 for ; Thu, 10 Feb 2022 06:54:01 +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 2150817F5; Thu, 10 Feb 2022 07:53:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2150817F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1644476040; bh=mFmkcaou9XsAd/+XrH9TXxfL4fpvv0DXoE6J7SADlcw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jligPWLCUAah2BYLcosoYEN9u9HjHvCG9vYVI3c2o8l6UIKxK2hlNQLzNvxAT1nGH c2XhHRbBWxaF0o6LdUBaoPSkeh3KYz73hlgh1nGDIGAXspLIy7b/pavGoFSici4aHa NymIFZG0O1H0iYSdcW7bGPLmcfgsFF7wzwFLVAlA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D6B62F80535; Thu, 10 Feb 2022 07:51:44 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0FF5BF80536; Thu, 10 Feb 2022 07:51:43 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on20615.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8b::615]) (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 E2A90F80527 for ; Thu, 10 Feb 2022 07:51:33 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E2A90F80527 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="TrpS6dtu" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cLW3RoaYHbF8i7hwpswasVhagoq6M297280KCYMLeS0lQHCoYoVeqZTPWYUWirMPdzlZOEP9YImycDwsM9noPs7Dfrs164ix9EiNx6IK8ny+tJBmcM8z0mSLf4J9WiqAqZpm/cdtji6Oo4wcCWrk81/+8502AKj28JzhlvgbZ5lRGJspDNnlicKFRASfoGj05//h99xlP9DN4DaoleON5rA4tF3j4QJQvrD9M0xRWfjKG9jnQ1jgn5MYTt8H4GGS9VBW/D6+w4BfivUUEzHJejeJcOOsNdWLIIMcRYtzZnY51PD4XjwLP8jXGvqQOo9LeJUjk1RGmDOfOWNHZB0YPQ== 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=kUUVQhfwConrFnRXbg04vsbA9foJPiCYRG+HjVc343Q=; b=m9xcPw1HYnMgt/XK9ZGM3Mbpklpof+LFLDQPwTWKXFnpETzfzWVkGGyXjIr+JtruV9eN+cE8FxHyoc6LyQE0sK/ZqKUr85fbfwvY8Jgy3E3KQFc/ahKeI/Dq7KLGK7GQ3IgiN98RYRakS68F+JdoAF+qyVAkShEEdR3oeD6ML5U++Z78MO8o2CrruWj667KTWeVt+eSvcD7GW8sjgFQ0A/CbudjWZr97CsWAAl8uiG7BEJpIPcg9+y9szQcZIhU9u5UaJkF5t6+P5KHozOgATkvHdamg66zC+H+h8cO2MCgxA3gHPidxEwg1OyReYXtjFRmbcSuuVFw3+6jeEHTHSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kUUVQhfwConrFnRXbg04vsbA9foJPiCYRG+HjVc343Q=; b=TrpS6dtunzLFzUwhpLnDE1VXdi+gz9lZRu3bEdOl3rrt1RpOtLxcPqEN6ArEDm0DelqOynD+ABTQv7OiYRBegatzv6siKYZRETIqye2rCMB+0T7DBJaEJIQJ8sTeR2hCiTAgWpZdBmmSsYhnnPHCg62fr7NUpaFK/VYzSZWb9MobmMBIdRndYTY8bdMRp/iLbhmd+n175stFpTG9OclgERGpSKsQzBMbOrm0RRCgJNSdXNyyGcQT43nN00cPQXXHFLkEMjwB4nlvs+7Xeo8c/SwS+HJPeODTW33YpVA97Jw5c/zALT7TlBMcB1ApF17AhK6inESqszXFGrMuywhYFg== Received: from DM5PR10CA0008.namprd10.prod.outlook.com (2603:10b6:4:2::18) by CY4PR12MB1734.namprd12.prod.outlook.com (2603:10b6:903:121::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Thu, 10 Feb 2022 06:51:29 +0000 Received: from DM6NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:4:2:cafe::a8) by DM5PR10CA0008.outlook.office365.com (2603:10b6:4:2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12 via Frontend Transport; Thu, 10 Feb 2022 06:51:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by DM6NAM11FT049.mail.protection.outlook.com (10.13.172.188) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Thu, 10 Feb 2022 06:51:28 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 10 Feb 2022 06:51:28 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Wed, 9 Feb 2022 22:51:27 -0800 Received: from mkumard.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.9 via Frontend Transport; Wed, 9 Feb 2022 22:51:24 -0800 From: Mohan Kumar To: , , , , , , Subject: [PATCH v2 6/6] arm64: tegra: Add hda dts node for Tegra234 Date: Thu, 10 Feb 2022 12:20:57 +0530 Message-ID: <20220210065057.13555-7-mkumard@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220210065057.13555-1-mkumard@nvidia.com> References: <20220210065057.13555-1-mkumard@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1b5d74e6-0d01-4e2f-8939-08d9ec61c3bb X-MS-TrafficTypeDiagnostic: CY4PR12MB1734:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1079; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wjT2Rv7+z2hYq9iLnKt1qoqMQwxHbLNt3RUpjuBQkTsMnJ4EC7Pn24wt5VGQCgYQRv8xROWOJ41pO0kL+DxOkSGqzusQ+qXHKaeGuzlHs/xnt3qKyLRSlc4QQov5y/Ggw59RJ3ns/mDvVAcugzA9PVUkjf8JUUv5uvQY6nLeAVm05xnjrAJQY7P7tGUvKaRZPEVmhkw0ctVP4CN7vD+d4fT3/qwP3OwPLliRPGXDEHbA6r8evX6i1xD5RDZ5FGFV1pSyx5VG+9Bkkzyiu7Kn1W6B27RkPlXef5zWjmv11gVU/tYdwcDRhnWxgzhwdclFEEPiRhLC4FEWshvSXTehy7wcayWUVuuWShXwwHU/h+FKLjH7/jf8nJISw7jAEh/q2I1E+n+gBiUOu5YICGXLxmyfz4fTpsQShCSaTlPMgiofXjhTBgZO3MUyn9JeyULohA5QEi9dNhikjZYNmpYPtUFC6bpeO8Xap2HTWY8g7ret7HFj/YxuaVzNawqWDr6ed6bes/fubXlobMD48++hVy7CpKNERP+9AyQ5VAqXmOqv5GtA1OyfeEZQvxa/quRPp9xFctmw7KA8CNstTVbbmd9mIt8PCdlXr1iW071ZhDhAr5NywD7AA9qHp94/Ly0Zi3ClKzq8zNzry+PBfLTpG5NfGWclEZlAbyuIGtTCJqTFz08SJZn6oT9c0wAuyokyvEK66lfsoTFTbAdRKsyY7FG6192W84mRpzks23Ybo+8= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(508600001)(86362001)(26005)(6666004)(47076005)(2906002)(7696005)(5660300002)(107886003)(83380400001)(2616005)(36860700001)(36756003)(186003)(82310400004)(110136005)(356005)(1076003)(426003)(8676002)(8936002)(336012)(70586007)(316002)(70206006)(81166007)(40460700003)(54906003)(6636002)(4326008)(36900700001)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 06:51:28.8060 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1b5d74e6-0d01-4e2f-8939-08d9ec61c3bb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1734 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Mohan Kumar 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" Add HDA dts node for Tegra234 chip and for AGX orin platform. Signed-off-by: Mohan Kumar --- .../nvidia/tegra234-p3737-0000+p3701-0000.dts | 6 ++++++ arch/arm64/boot/dts/nvidia/tegra234.dtsi | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts index efbbb878ba5a..792e4a8b272b 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts @@ -21,4 +21,10 @@ serial { status = "okay"; }; + + bus@0 { + hda@3510000 { + nvidia,model = "NVIDIA Jetson AGX Orin HDA"; + }; + }; }; diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi index 6b6f15804a1a..d39d41968ffb 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi @@ -4,6 +4,7 @@ #include #include #include +#include #include / { @@ -261,6 +262,23 @@ #interrupt-cells = <3>; interrupt-controller; }; + + hda@3510000 { + compatible = "nvidia,tegra234-hda", "nvidia,tegra30-hda"; + reg = <0x3510000 0x10000>; + interrupts = ; + clocks = <&bpmp TEGRA234_CLK_AZA_BIT>, + <&bpmp TEGRA234_CLK_AZA_2XBIT>; + clock-names = "hda", "hda2codec_2x"; + resets = <&bpmp TEGRA234_RESET_HDA>, + <&bpmp TEGRA234_RESET_HDACODEC>; + reset-names = "hda", "hda2codec_2x"; + power-domains = <&bpmp TEGRA234_POWER_DOMAIN_DISP>; + interconnects = <&mc TEGRA234_MEMORY_CLIENT_HDAR &emc>, + <&mc TEGRA234_MEMORY_CLIENT_HDAW &emc>; + interconnect-names = "dma-mem", "write"; + status = "disabled"; + }; }; sram@40000000 {