From patchwork Wed Feb 9 04:23:21 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: 541160 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 5A34CC433F5 for ; Wed, 9 Feb 2022 04:25:28 +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 2262717F7; Wed, 9 Feb 2022 05:24:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2262717F7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1644380726; 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=SrI40Q+LFiFa5AFylEm/gpCUTjgUovKsBOP9LLKZc74ytRYrkvXjQZWTe3CoX26lx vUkqok0H6aXKloS3NEtD+HLhBxEbUy+4UwuNCmNaVzrcgOzWveE96p6CrG4lFhpon1 WslO+yFaPMnSPnNfw7VXO9+3HlyrxfKEhf2P/JoU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B6135F8047B; Wed, 9 Feb 2022 05:24:07 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CA6A0F804AA; Wed, 9 Feb 2022 05:24:06 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2058.outbound.protection.outlook.com [40.107.93.58]) (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 5882BF800ED for ; Wed, 9 Feb 2022 05:24:00 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5882BF800ED Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="XVHSwH64" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NQVQw/X94Jn5tph5CeKj6z8URZVXuwCkfKydGLXcN8wvehF4ppjg7pObepSEBvp+7ULZNCMm5SbmJYiiEvUkfcYllRdXHdqEq2rXrhwbC4B1uGelWAUBQ8BIMRge9ej0SqnjV7FZlDbFngsEB2pvGuUAkA0mD3QNrQmY2p6Qa0EUsRhvMvH3AVLD2AF98n7nLZjvjkQ6DWExiby16LI/1HjttUgOX8TGAuIRiE2U5lcDIZExlzHVShfkpt007pbOTD/ZGvyRksYmhMmJLxHx0deEro1xw+IdgyRKye7JuXiQh/A/NJZRpPrBJc3x6k0hv93ORm12WLGhQAeB1lxytA== 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=YI/CGuyLZQC2sKDt5tsJfjQOj+Lf3U82/xYSax8IIgQgnIoYhxIgjUhaNmBGrIIn8ZzibIXmLHRY5SOookF23NIV6xVbkpAwlWBOA3Xd8xrOo56SHMI3tNmS0qOJVkihDj5diLNiN34mVLcu6NQJIuvTYyAzM60sjRV7L89HSmbE4oEN+JmgO0xR88mMG5PjaulxxqNL5YlhnQoLoY6RWX6cVFe0H7t5UFREARvlx693qaW8pvocSY55MjPywIaMnBQVoLExraGbNuGTGQ3p4494/DpDJZ3qXrlo0aDzY1/Qh0dcgDdXRfhWxZWQNmNLtPXlOzCKkb3oIXfoInrBLg== 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=XVHSwH64WKyfRjnWbMWurJ037HM5sQGOsyS+7W+eYeRwB9lSm2U1ZE4p5mdhuWdRtBU6TlG98YPZ2R5j8RQY2rsrglghOaCMs1Re3MquaKD7XyWb9bsKpAvMdeEHY1hhEIqBYbC88SWua7AjbGRmdso1LenGwpJ3F2jKBgGCdWIjwjGx1XtCy764XxV1iJSc3CVTGtLUQ1wB+l2lg9IHrCRUkMehgSKmn7WeqitRf0u/AxIai8UvIweb6yuyOWsLYtYib30lR1NBY8s+uecFVzwWs1Oj4kzKvI0NyjPF7N3Wq2+weW8qbqS5Hpe98HtLKYcWleHA96kutZC3rfy2LA== Received: from MWHPR17CA0050.namprd17.prod.outlook.com (2603:10b6:300:93::12) by CH2PR12MB4859.namprd12.prod.outlook.com (2603:10b6:610:62::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Wed, 9 Feb 2022 04:23:56 +0000 Received: from CO1NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:300:93:cafe::e8) by MWHPR17CA0050.outlook.office365.com (2603:10b6:300:93::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.19 via Frontend Transport; Wed, 9 Feb 2022 04:23:55 +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 CO1NAM11FT014.mail.protection.outlook.com (10.13.175.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Wed, 9 Feb 2022 04:23:55 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 9 Feb 2022 04:23:55 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Tue, 8 Feb 2022 20:23:54 -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; Tue, 8 Feb 2022 20:23:50 -0800 From: Mohan Kumar To: , , , , , , Subject: [PATCH v1 1/6] ALSA: hda/tegra: Add Tegra234 hda driver support Date: Wed, 9 Feb 2022 09:53:21 +0530 Message-ID: <20220209042326.15764-2-mkumard@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220209042326.15764-1-mkumard@nvidia.com> References: <20220209042326.15764-1-mkumard@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f8cf64c5-303a-4327-a611-08d9eb83fc5f X-MS-TrafficTypeDiagnostic: CH2PR12MB4859: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: cSMpMCVH+FOZhHnKqvpueLpTp0BKgsoFcycTJwEJB9gOVO+KLcDFU+atBx0dL4nqBRKBCxvLbq4dvAls/HQwhw7+/t4ePZnhpBFf7/KvUDZ1MkXfN/iMMKHFem23ZbPaVpxfIiiM6oCbcTdXLP9eAn/hiCXLP+KBP+L9yYmaaawNFtgMCgSpUvBh1qc3mSCg2oLyCu1KNqEVJxBKQrkVM2NM7iiF7xHAVfxOlxaJCnvRGqX8q6Rk5FJ3+kyi1CVEygnk6VO2KeMU8kfbEdf8G242N1mtRakT6+0K6Th34ael9vI2ES978U3I28LrV8h/hPFlgb8ZYPfWTzJB4oK0tQqsm6sWy+8brI+LysfDE27WPepyoJBX2cvItTPr+65+rA1w9cCtxzzlI2pBZBSNLwkgHXGwL/UYDyzoijtC0h3SfOFGA19UtSIiiZy6NemTrkbKNI431VAEmAHzJ43ZoNNq17EGW7TFEu9nni8CtSdKxaycApE9UHOdd5XkhzOsmlj+m2ce3S1EcEh9alqGdC37O50F4ptMIoGZwPUnkW37t0AqZ9lpZIuXrwmwDxpWuC8lWQimcHzTMA64Uyjjvs2ThK87QpKz0rnYDj91Zd1Id8Mzqe19AskRJHNyK1LsOMFDDuprqthAdgjjfkELb11Bk/4mzv53UzhNuIYFHTiw3ulv829ov9a+kMgNRorswRkO4QPZT1Dhu1ALcSuwSsVRB/zAzauUPlZTCq9e9vU= 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)(40470700004)(46966006)(36840700001)(82310400004)(8676002)(5660300002)(356005)(81166007)(6636002)(316002)(4326008)(70586007)(54906003)(70206006)(110136005)(40460700003)(7696005)(508600001)(83380400001)(107886003)(6666004)(186003)(36756003)(426003)(336012)(26005)(2616005)(1076003)(47076005)(8936002)(86362001)(2906002)(36860700001)(36900700001)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 04:23:55.5912 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f8cf64c5-303a-4327-a611-08d9eb83fc5f 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: CO1NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4859 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 Wed Feb 9 04:23:22 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: 541840 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 CE8A8C433F5 for ; Wed, 9 Feb 2022 04:25: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 16233182D; Wed, 9 Feb 2022 05:24:53 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 16233182D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1644380743; 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=CU58lbUjaGY9n+SischXBDlgq+MskuFoxCqLQAo9uJ+UNLIpXMK3TjfxneFSD8Fh+ fRTjc0gJcQpLJuHKBWUnJ8SBhk6FPt6QFr5XI6mAvMzVgoLUUuapxwCQla0gg1JpqD RP5OA3NEtH4/qQDr+9BLkoJ/0x4nPktGGl+vN8V8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6CB15F80511; Wed, 9 Feb 2022 05:24:14 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9BEBCF80508; Wed, 9 Feb 2022 05:24:10 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2077.outbound.protection.outlook.com [40.107.92.77]) (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 2B3F1F8016B for ; Wed, 9 Feb 2022 05:24:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2B3F1F8016B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="QSxnRp/g" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UzbemRME3wJKKb8USKhjVQHVxtip7Xq3lNgrrI3GALgLTd0GCBPsKzmFNw1BF3ovbKIOOaPaoWok6xm/lpAF6gl1VOFqgpDYyYCRyVdNQCBSa1k+M5YgKcGwbfe+yaVvjg0Niu5/Lmr4zUjEWI4S70FnVQTG9Mjvg36hN3Jp7262oXk/Cv9M26iO6MBDvM5GgZYS2g6Ne64KSIddhWKxLWp/EVutHJXRWD1n2abPd033AvEafD8kDTd4PU8RSyiMdWHDDgF8K6EH3K/l0CMwVPenUQ1IMTMtZLaybsDWN+dPe/ocFA5ZW9muMKQkoY2Z/ZD1sxH42TNQxpb2r1Yusw== 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=Cr6IY3SMtGGtxoyFoo0sjLrdfuY4/AEaxBciwXfsmoth95PDUwl8VINWEvBq5CPSIwjr3bnk8g9Hija1n9GBIwXbW8Q6TtVT4D+ZoMi/l0lMEKROSkTDikd/h9jN9ha4515Jy5mbqD3MHXMhjc7N8Yh/oa69mGsvzNKin7JNIxYPxWkowIem1EKtiPQMqA3TdtdAPd1EMXgTf69TuJ1YFVawxsP8QFFUQ/SrsiV+sD5uRCJ/BrUzd8LZn3ZTrdfCUM+jDqJaqleWF1wZrrM79h7nwbNc9m4/cDUQMvH2nvcK2fk/xsXud9UzSllR1F+CBgk0aX2FN1825as9BardpA== 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=QSxnRp/grxlPDIFgaT0fLf1ieb+Ha/JgN7L+H+kksrku6AwwrN7Eewzdzv5owhUZU+KulwxA4/7zkS5rBalwNp3HO2CWhYULwXIlOlYkGLP3Gn+NcZmu9hvmIezhAFA0Jiew9/ez6ylZ1y3uo1kGDcAkLfLfx141rk7l7xv413exJysVokaGkpxuBcWF/WGUWVdA43fICi37QZWy/7pK0y/QGX9hWQLuYnoxTBIs7QitzQSOsVSR+EOPsP6AxzAhjnjf+FPbTf7Ug26delNBuNrhQk9lqQYZy0xWwCdiHLYmWpJdxnQvkHxue46Dg16MxhSlFuSlY9sco2bbMu9aOg== Received: from BN8PR04CA0006.namprd04.prod.outlook.com (2603:10b6:408:70::19) by BYAPR12MB3125.namprd12.prod.outlook.com (2603:10b6:a03:dc::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Wed, 9 Feb 2022 04:24:00 +0000 Received: from BN8NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:408:70:cafe::9d) by BN8PR04CA0006.outlook.office365.com (2603:10b6:408:70::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12 via Frontend Transport; Wed, 9 Feb 2022 04:24:00 +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 BN8NAM11FT060.mail.protection.outlook.com (10.13.177.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Wed, 9 Feb 2022 04:23:59 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 9 Feb 2022 04:23:59 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Tue, 8 Feb 2022 20:23:58 -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; Tue, 8 Feb 2022 20:23:54 -0800 From: Mohan Kumar To: , , , , , , Subject: [PATCH v1 2/6] ALSA: hda/tegra: Hardcode GCAP ISS value on T234 Date: Wed, 9 Feb 2022 09:53:22 +0530 Message-ID: <20220209042326.15764-3-mkumard@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220209042326.15764-1-mkumard@nvidia.com> References: <20220209042326.15764-1-mkumard@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 78464057-eff9-4674-7edf-08d9eb83fee3 X-MS-TrafficTypeDiagnostic: BYAPR12MB3125: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: m3IDJW90CLB2W0iYuE3axv7V+PvPcXclKOIV7Sws865O05/+/46S/PC8PCgwfrUx0RDH+z+cJEkyo7vSd8Qd5H/p+TaS2iPaywQ4F23SDiWhEriHCwsVuK9wMUfOax5o/HtGmboLj0p+iJZo/qL/4Bdbef7pYFRfL/NApVwvuQ5GG760bqOAy2/yZbN5ZrpY4G4VOmFXFBBetsO8DS60598vU47SL9K4ZngLA118MBuNAwW/lTcM4zvQJcaoJfceZNHSxp+UDiSFiIV+NK/Caw+Gqb0b9hi6DUWhrNw5MWeQJ0wUkYLO+qIIfMpg12S2UVHS0qy8z62fQhvtmYpz8Pfkj2RomBcrptOEq9qkrQss5uHrBsYjjys828o4gw3+vrjcgN8zRaOPWmeEEyl8ofTrH4BxoAglSKgXaQB3peogyKvVByj9yCp5U58Rx1GpUclq1JO/P/2qyHgR0DpEv5aJF3tCJbeaXJJ8CCZNGZKpr+juW0DOZrXRgu3f22mwBrSsW/Vsl5TgJAQ4jgsQv3Rr2wPBcA1hRsFV/NYBlpXa+a5vSjRPoAeF2VlstyTVTyB63a2ybRjZKXNqBhcsMFaSNWPU2QoCu7a8ZBf+34GRn4ONaIEr8lkL7IuLZPsC7E7zjNFiJRmopANagigeyU6HcwpYDsIbgEILhd74y3bkNwlI86MPlE2JIyPEX/BPiNjXGPyR4OdrwemEVuZTMhwr70lJO5LzoFMcj48g1N0= 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)(36860700001)(70586007)(4326008)(6666004)(8936002)(70206006)(8676002)(86362001)(7696005)(508600001)(82310400004)(316002)(6636002)(54906003)(110136005)(2616005)(336012)(186003)(426003)(36756003)(107886003)(1076003)(47076005)(2906002)(40460700003)(356005)(5660300002)(26005)(81166007)(2101003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 04:23:59.7326 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 78464057-eff9-4674-7edf-08d9eb83fee3 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: BN8NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3125 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 Wed Feb 9 04:23:23 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: 541839 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 55982C433F5 for ; Wed, 9 Feb 2022 04:26:18 +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 9036317A0; Wed, 9 Feb 2022 05:25:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9036317A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1644380776; bh=H5tIbiSePrrnHEquHPle3Kouy5UbxpBodF4xybMyu24=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BvQpK5llTNdRGe5OxxR1NU02Ej849oS+7JF7qUW1kUmSMER5Mnuu+EPnLEo7s1r/f fK4uECU9nuhuInHEuAztvyUHRpu9n6/k4PLFSBnZ191zmLx3Ds6rWmAks81kP6FHbD Q++MNDp5DAF9KPF9Wgaugnts9+/+AuwaG3GC2GeY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 512CCF80520; Wed, 9 Feb 2022 05:24:20 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F315AF8051D; Wed, 9 Feb 2022 05:24:17 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2062.outbound.protection.outlook.com [40.107.223.62]) (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 C1018F8016B for ; Wed, 9 Feb 2022 05:24:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C1018F8016B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="MsBux3tV" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JzT8U6014ZPPIHFNms+GrFO2W4mPLbfv/KN+UmKVYMg3EyMGaZtDm7hqhQl9xOaQYAM897+q6Iq10ddc8Jt+fMGkJGEJ9hMEtYbZ49fkCzq2M0r8ImL7QWRT6JSn1GuU1+HjpqlyaECttkflNbfXQgOqq2P6CJQgtRNjERS3aixo4yQPeER4hhKwNZCnRM7QREbi//e4ZCuXxHsnGFu0hQRBCzEhcSGi2XhXL/sRzfP/l8+bZZH4ESrXdo3Ydn5oYgdQEVabNgls/B+QfgkEBko1wdmmkea03sF3dvGv2nA9L03qJIQhaBTt0wNf1NrUH8fPdGnB6zd1L6ExopHNhg== 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=ii7EdkTSEf4L9/vhdjfXV7XMODifvwEHdNeewlWZVZ4=; b=FkM1tslY+0DzRDPC7zpFocPMTAQJ/QXlWogKg6U5w/VKsRl1TGRg4L6h4ICc9A+MuQ2rbk9fA5UQ0NbPkGNitVnZk6WujzKI87b87FRvu0n+7tNo3W5ZBHNsMEWHRdSi9VDA+aSnTkd0aDW+4lXvHbsPdDoxTmxNSbN/vg4X6OVZPRDzhut6getiX19RBKpIqjIDIeWUKNH2RzMqmfTr0vXXYXre9FBL8f9CkXX8YzH+G/q/OY+VA9RJS0GkQT13stbAuUWslhbMDHoRzvEbTymPjJInRX0HbtwlBzhWOFMnmKZMaH/S5taYGQgMd8flvYifESQenR/veiERWljUOg== 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=ii7EdkTSEf4L9/vhdjfXV7XMODifvwEHdNeewlWZVZ4=; b=MsBux3tV0x/VNyj0+NAAtdRxkevoeumTP+gAeWamlF7zdQenQihXkhNa+4eTZAXmWi3XztLzibYdbqHmF/qT6buxy0xX84KqVy3IhdV7KVNAkRvjVjwo1ztEbDpBBGraWP+Hhrb3ydFLtQQXUXE4SC/fShLQQT6rW1B3yOqo9oAOf9Ar/FzPN5D7xNY9MybPuIU0eP8Z9RR7Og+60F9VUAR5Y7IqhnDp8r1Zl84Gv3oMaZDljjcN9cMdtjE4vouep6pDiMrU282+4BQCSezzQkOpg5UlpHTDF6YojVTgjHw4ex/U7nW6O+nbSN40zBimwF7VLohKZcIiP6VOdzvZ5g== Received: from MWHPR17CA0065.namprd17.prod.outlook.com (2603:10b6:300:93::27) by BL1PR12MB5240.namprd12.prod.outlook.com (2603:10b6:208:319::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Wed, 9 Feb 2022 04:24:04 +0000 Received: from CO1NAM11FT029.eop-nam11.prod.protection.outlook.com (2603:10b6:300:93:cafe::34) by MWHPR17CA0065.outlook.office365.com (2603:10b6:300:93::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; Wed, 9 Feb 2022 04:24:03 +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 CO1NAM11FT029.mail.protection.outlook.com (10.13.174.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Wed, 9 Feb 2022 04:24:03 +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; Wed, 9 Feb 2022 04:24:02 +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; Tue, 8 Feb 2022 20:24:02 -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; Tue, 8 Feb 2022 20:23:58 -0800 From: Mohan Kumar To: , , , , , , Subject: [PATCH v1 3/6] ALSA: hda/tegra: Update scratch reg. communication Date: Wed, 9 Feb 2022 09:53:23 +0530 Message-ID: <20220209042326.15764-4-mkumard@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220209042326.15764-1-mkumard@nvidia.com> References: <20220209042326.15764-1-mkumard@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c53c494f-caee-4a55-64bf-08d9eb840109 X-MS-TrafficTypeDiagnostic: BL1PR12MB5240:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2276; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OfyR2YtuUfO9LOK25CxSnnuGshSmUG3BlzG4vKq2tk0F9EfWF0shGjZqfZqih2C+2iolXODP6nVfJ0VXUpI6PIK/E9r87lciTh5tS2/kzeonrR37ohmb4Hyp8k/G3rFTcGwGxQ3MKVve4NehEoJldrZ0RnlG60HAc47OU001223M+z0rMLHeeHNTSKlG3CxIA/ZEPI0WaE+yckISpZ6NtEXYv9tgUTSRsWjy/ZwlzghSKweNRGgbIKuTZsUynUliOZDiY7Yv9IqKSVR7sE3hAVHHFHsbXxkR7HoT6Z2r2CdZuBFSQOPgIlpAZ0qWEy3OIcIQQXOk4Utd1SnwU1BwtP4yy4JYWBMOhoEWXA3pcPV7/+9CZ9Ie1M1FiWeofReq3MXpUp06+c79utlkKxW3xR/YMfq+ZqsLbQm4kkipAARzlOc4J7zur5U3P/yiz31ttHFEQz5yZobvQzw695qB0Edv6UYMBsBngE6wE5PoeH2Ct8D/9ndAfbGbui0piDGemnzDss0NLHDrNC066MLM6Dc/973zZ9luaJCFSRFU+SJyQqkF2/duyT2DbzUoSiO9xlH7WgLF/yeaPPZwF+5tVGo4Ice2fHb8LJ+ULnMM6n9XOCuqaYepltup3h5nsrfXlAI7W2k6OKBh/Y1dXPmB9aw4j9FCcVL5PZyCtTFhQXbfSyx3BPCq5nBZgFz0lKx9NwedVTbkNWJe9uZAWaTV1+HKKqnvgS5SAlPuzrlvWVI= 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)(8676002)(4326008)(356005)(8936002)(81166007)(36860700001)(2616005)(70586007)(7696005)(5660300002)(15650500001)(107886003)(1076003)(47076005)(26005)(186003)(70206006)(6666004)(508600001)(2906002)(36756003)(54906003)(110136005)(6636002)(316002)(40460700003)(336012)(426003)(83380400001)(86362001)(82310400004)(36900700001)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 04:24:03.4145 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c53c494f-caee-4a55-64bf-08d9eb840109 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: CO1NAM11FT029.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5240 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 --- include/sound/hda_codec.h | 4 +++ sound/pci/hda/patch_hdmi.c | 61 ++++++++++++++++++++++++++++---------- 2 files changed, 49 insertions(+), 16 deletions(-) diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h index 82d9daa17851..c1c19dd4c423 100644 --- a/include/sound/hda_codec.h +++ b/include/sound/hda_codec.h @@ -240,6 +240,10 @@ struct hda_codec { unsigned int single_adc_amp:1; /* adc in-amp takes no index * (e.g. CX20549 codec) */ + unsigned int hdmi_intr_trig_ctrl:1; /* hdmi interrupt trigger + * control flag + * (e.g. Nvidia codecs) + */ unsigned int no_sticky_stream:1; /* no sticky-PCM stream assignment */ unsigned int pins_shutup:1; /* pins are shut up */ unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 879f886d2406..f0e87e39c53e 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -3721,8 +3721,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 +3744,37 @@ 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; + + /* + * 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 +3786,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 (codec->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 +3824,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 +3834,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); } @@ -3903,6 +3931,7 @@ static int patch_tegra234_hdmi(struct hda_codec *codec) codec->dp_mst = true; codec->mst_no_extra_pcms = true; + codec->hdmi_intr_trig_ctrl = true; spec = codec->spec; spec->dyn_pin_out = true; spec->dyn_pcm_assign = true; From patchwork Wed Feb 9 04:23:24 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: 541159 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 D64B4C433EF for ; Wed, 9 Feb 2022 04:26:02 +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 0F5CA1853; Wed, 9 Feb 2022 05:25:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0F5CA1853 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1644380761; 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=oyuRYEDEcRRiFxNUWFZlue+ql89Gtibyi470t3r7wZ97WvUb+ZAW2beCZAq0PQDcJ C4d57SFkFnonspxDHgDuTjveYZP3FD6lJMrXZC+NSoO0OTWmeKFp3eE20mtQLt3Scq s/wOA/oqT9Z9ZE4Ol81UR5boOQglm5QF7DoYogBY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 77AC1F8016B; Wed, 9 Feb 2022 05:24:19 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 89D41F8051E; Wed, 9 Feb 2022 05:24:17 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2079.outbound.protection.outlook.com [40.107.92.79]) (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 4FC4AF804AA for ; Wed, 9 Feb 2022 05:24:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4FC4AF804AA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="CQJeakIJ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UhPsm8T3wEIpOM+t7r02wP6jcCjcTxv1JvGb0ua7ZfBk3FiqArC5tBKq5JT+gIfS8gvqF9yOZjYTqygmykUqCsthjarxqB6hY0WWpET2h+KUvn3bkp31TW9Yq95aFH18+eThf5AXjDhxGvVCzaxs/6DO2kgv2qvIqLH4PJYcafUGUmWO29hNzN3jyMMstcfmMVTfIr0SIx3dY5jKE3nLZDIQBo7iP9I99CwfVTO1f0nTWNPqT0GlvdZeM0ijdJzkORn+1vjekB9tgenSrLiOpBf0agD4MiQ7NlQNDe7mJ8FrntIu6z6cTyhH1hfI/nIiwjnfQtNf1yYCk33dbl52Cw== 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=VkMwn7IpIBpwbQLMi2CVAZCDU+jPzGDbIoSCaJT+Eu400BO/4gP5HIJhOKEr6JLdhtulOXs8k4RYlQhV2nTj81fFwkAfzk26TJt7xS35i0TVj9327Phf4pzWK4MAMZ6cJgaIIthUL/ciRYY4refPKWfYDQE9MBVeShyIq7VMLmN/2OlBCFYC/PPn8hUQBeRXO+/Pj96hDcygl07Qb5EyJr3IfwV4QfDL6qb9P/xwtSKJKXvoYYzaRgXJ+AaddXdVJV2OgMV6faugyUyAnq4luVEYF0pJSfBH9KSpZDJSiRFnP5kA/PxIkC+tVyrm3QLNkeGCsG3Q+tWpgLHgYwKG8A== 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=CQJeakIJW73YX1Q28abiYsebgYySCLgVQvCU6Buq8POK16ivzF2HMdH3o5V9wGZMRyckxrkBc5sVmHarCPjAWI4IVXXTthGCWWrOP0tKqyvF9hxM+p2YnElQ+9jKcKe6jRAQTImDSXIPTnbJPgFS94pgA/oXzu9695jIK/Fxr2vkn20FLu4j2ppLTNM98FY5xsYR8xG2hc02DrgozPWTmhoMGOJkD527ReM0vPLsNrZpuBtnlQQ7gKHlaenbvE1uoKhrxp2Q59ULfvCoaE8Bq1xQfOo/Cwvb413YMqwXCdk0yd6Ibt6TFhiPxb+8bKg9l7jGTsUhA76av0MzHBuiIw== Received: from BN9P223CA0013.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:10b::18) by BN7PR12MB2673.namprd12.prod.outlook.com (2603:10b6:408:27::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Wed, 9 Feb 2022 04:24:07 +0000 Received: from BN8NAM11FT036.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10b:cafe::54) by BN9P223CA0013.outlook.office365.com (2603:10b6:408:10b::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; Wed, 9 Feb 2022 04:24:07 +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 BN8NAM11FT036.mail.protection.outlook.com (10.13.177.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Wed, 9 Feb 2022 04:24:07 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 9 Feb 2022 04:24:06 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Tue, 8 Feb 2022 20:24:06 -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; Tue, 8 Feb 2022 20:24:02 -0800 From: Mohan Kumar To: , , , , , , Subject: [PATCH v1 4/6] dt-bindings: Add HDA support for Tegra234 Date: Wed, 9 Feb 2022 09:53:24 +0530 Message-ID: <20220209042326.15764-5-mkumard@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220209042326.15764-1-mkumard@nvidia.com> References: <20220209042326.15764-1-mkumard@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d7570e2-0d5e-4ea0-ad6b-08d9eb840391 X-MS-TrafficTypeDiagnostic: BN7PR12MB2673: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: UDVIwO8Kj/1eRpWOBkIzKhcL6XBaNrAMatsRdoHpy7kWLrFYyjdJqJhhVdTD0LtmB1QXeQJOkFOits6SMb69Y2ZmGEJx3VZQqrW7iyf+kvPBvUSYlmQZl8gVkIWrmr+TW4gph3TW58Ek4+N7cBk2zpARMPg3X8gfUQZOvlwa89ur73hIKQk6VGIEhOXJnFBr4kX2B6zGlLFv/Xo2sHTikE4Yq2189SZoN/j5GpgNs6ISS2Or0EYdasFpXRNmWvzcqi2230ocleqveMwSFAsxmcEKgR08c6khPVWsZnH1IyLxwvSX0Y4z9OYDdsA8+OdtdCClovVrI227a8AVQF+chDT6g6ARvQUma0S2Zh5obQFwqEyJdilz8tEtRDPOqLNKZs4EciXK9bUrrdOluSDuBnv4NsTSaDwzKmIL92LIhQkimpR2e7IURX5lumG71AcRrSgO61Gb9zpeNxlrAlHcAU3IVo1PnbO20tfFhVxtE4m3cLl08+67Mcvnjy49rf6il6UOcKifz0DGZAWnCUnK45dzJA37P9LfzKGWOs8INsv8vpuudhZcXbkXR4/RjRsadAV+B4H+8XtDIGzVARIejajxjDdceeAPp40O941IPyBBDT90rFx+0Ml7IFoPrWyg1iqkwtSBhZ4SqcOWHtf97ecWHO9V8nowGb7S7WYkembEHpQpv8gXQEIJu5e4cMEbDZnnL83tiwfSkm11kaLXr5CVHdDKyA2Yekd2/0jAghA= 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)(36840700001)(46966006)(40470700004)(4326008)(8676002)(70586007)(508600001)(356005)(7696005)(70206006)(6636002)(110136005)(316002)(54906003)(81166007)(36756003)(2616005)(1076003)(107886003)(426003)(336012)(83380400001)(2906002)(186003)(26005)(47076005)(82310400004)(40460700003)(86362001)(36860700001)(8936002)(6666004)(5660300002)(36900700001)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 04:24:07.6006 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5d7570e2-0d5e-4ea0-ad6b-08d9eb840391 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: BN8NAM11FT036.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR12MB2673 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 Wed Feb 9 04:23:25 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: 541158 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 603E5C433F5 for ; Wed, 9 Feb 2022 04:26:35 +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 AB1C71860; Wed, 9 Feb 2022 05:25:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AB1C71860 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1644380793; 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=KY1Bew7H2B1g4VBf3cfLIBAPiSApw9ZGJpCInWeP2XNLsLE9NjfFMJJinSmNYB/cY aBWfM63McZQS2TjwhX8k26Uk6A30kNANmMKVXBVCLZBWTPzwPXUCA4dJIlJkMkXlA/ yVT+vwKpwzcnhFKeePzz9Y2RbaFqSbBUrXSmPeoc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0297CF80526; Wed, 9 Feb 2022 05:24:24 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 75923F80527; Wed, 9 Feb 2022 05:24:22 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2043.outbound.protection.outlook.com [40.107.93.43]) (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 16FCCF8051C for ; Wed, 9 Feb 2022 05:24:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 16FCCF8051C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="t9HaUZ6Z" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T81n3NxqKy4Z1hNGDQ1axfSjBr9UyfLI3e8Ryzx3k1Q/tvezXTHiv/ur/CKvch2L0Bk1vIU0ZO77O1rtJh/S28PhPjxZklFPd9PayJ/Ncbdj2g8+WI8QFzPHW+XMReX5cnih2nf+ttkIyMPh7PqKCMLLlJlIr/FAQ3kC6NAe4Rm1gzxezs0cBF8LhVovYtGyAwAcUA7OEYoblz+vtv0yqqQG49h+ecWd5xE7c2zMryXi2JJaiHHNE2CZ80Ktp7SaDIDXT1G3Sdo8GRc41DL55swLnvReWgy38mCTi+0hyxnk3UT6fPSkvNnJnHAfRArvX9uwJJF2Z62LnWii/8Y3LA== 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=ahGextFFtN5qFzI2Q7P8s1mCyoqRD8wFWLdRP7Xx42m9ARHkNMJ0hsWMyh405678O9xgBhjTKPJU/8Nuu5XNuYPrDceWGKq+nE1pFHYQ7naqJvsvX6DIOFJyRvQ40kVGkZxiZG9YkT7Q0OXM5cWaJMNF72SflHG/QSIeKfYnePWTAzUzJDeuvMJkb+MEjI8FMKbPvQNjH+kU1UC5ylJSt4tyrg10sbbMyk8weRa2xWFxdE2JSEh/7kPWvhsJvb2Bv49T6W2ZW3dI9TFKLntZpdqmoI2tC2kO29WZJAaFIH+JfN/aBjzZGtpMF6aSpoW8g/8s2ExaXgB/l4j4k2l7jQ== 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=t9HaUZ6ZS4IYrcuwZWZE7agOpcYXvaytiJHjXuz3pAFy3/n/GktTBGEGYGqyR5oUhPTjB0Yv9Swlfi2d17YNX73kFR9xKPybsFGUlmRW92Yh/IMPUzElFlMmVpR2yTwEhHb7g8ElQe1MRzMEo1xrYEvgkxr7ESW4aN+Xr82rz+HAP+6R52OWnW3NkjI3e9bTXXWCcdzrbJctFmJkZWxgctDqZM/qbitTuB+e7Mc5xEwRglQESU0bteOardSfLSJsQq0sDq11OZ21431qGsY1P/oBPKe5pZQ0NfS+P+5mDjW0W4cvzNOT+dhUKnmNwPL4VyCYvu6hAX0oFL3wVWwHcw== Received: from CO1PR15CA0064.namprd15.prod.outlook.com (2603:10b6:101:1f::32) by LV2PR12MB5775.namprd12.prod.outlook.com (2603:10b6:408:179::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.18; Wed, 9 Feb 2022 04:24:12 +0000 Received: from CO1NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:101:1f:cafe::1e) by CO1PR15CA0064.outlook.office365.com (2603:10b6:101:1f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.19 via Frontend Transport; Wed, 9 Feb 2022 04:24:11 +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 CO1NAM11FT034.mail.protection.outlook.com (10.13.174.248) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Wed, 9 Feb 2022 04:24:11 +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; Wed, 9 Feb 2022 04:24:10 +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; Tue, 8 Feb 2022 20:24:10 -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; Tue, 8 Feb 2022 20:24:06 -0800 From: Mohan Kumar To: , , , , , , Subject: [PATCH v1 5/6] dt-bindings: Document Tegra234 HDA support Date: Wed, 9 Feb 2022 09:53:25 +0530 Message-ID: <20220209042326.15764-6-mkumard@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220209042326.15764-1-mkumard@nvidia.com> References: <20220209042326.15764-1-mkumard@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 10f50571-da0f-493a-2a78-08d9eb8405ac X-MS-TrafficTypeDiagnostic: LV2PR12MB5775: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: qqGO0NZoop5eHo3G5xjQ+JwRsHg15G2uqvjpuyrs6o0mx/5t7HySYPD1/FL8KGGHI2Pk//+vUohVFHQXXuyM5va9Ao51HWnsXm+rVeFVvqQCBMmqLytO7ug5pwf//ciuvuL3Lpg8UOXGIVxbkZWNM4Mc2ueh/xkMWR7YOU5qooC81ANADYlH2ypM/A3+x4mpqUlWTCilZqMZsMGhPtOAVG2SfvYAKae3X+wkkDK3aoNvUtSk9r7v3c0ZPcR7597jFdglF+BZmFjrNFdffZZylISlYAbdJB14tx5kYLv+4XigUrYMgju5CYyu4f+zrTIpOILDY0odGfscNHC1e2itDU4goOBUaeUJ5pNvKPEuQjLb4XdzG5WDAA8FLpIxbGADS3hgwFhSoF/b+G0OyiLU6q8REctNYiEdAQHoIesbc1p6BXc4aXhjDxKAfecysv422swECMGeHB8xnsalzEuwvHLBJuVTrClCG892R9eP+iYC40G6SJAGr84fsjckyJPUGTHtzRMXrb8OCr9aTQiADBAkpiL4hBtcMo2tQ2eXatQ4RrGjlFBYXEavSSpIeagvO752wxJU9Pp7/htAy9+Kl3g3PAm6l0BkD25HpVbLZOJLnVkDoha27UK8hbBLYJHzXJUN5qzuyFtfrzD1M3JZnsr7PV2k1S24BkGHo1QjZOWIZw9A5LARKmGp3T6GlpEm6gAAd8YleoL/c0LjxltGoeJSgHi/2gDuiPzYy/3hYoTPsB8kjzRbbRooGwvipazif/FlC9JcWbIxWIJjf4853eEylhKb91ekCOiHJTUrq1Q= 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)(40470700004)(36840700001)(46966006)(186003)(26005)(2906002)(336012)(426003)(47076005)(4326008)(8676002)(2616005)(8936002)(1076003)(107886003)(82310400004)(86362001)(70206006)(70586007)(83380400001)(81166007)(36860700001)(356005)(5660300002)(110136005)(6636002)(36756003)(316002)(40460700003)(7696005)(6666004)(508600001)(54906003)(2101003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 04:24:11.2077 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 10f50571-da0f-493a-2a78-08d9eb8405ac 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: CO1NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5775 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 Wed Feb 9 04:23:26 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: 541838 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 159A0C433EF for ; Wed, 9 Feb 2022 04:26:59 +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 57CAC188B; Wed, 9 Feb 2022 05:26:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 57CAC188B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1644380817; 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=SvGfBCbF2KG9akSBz+/dwPwHIF/aSdBEZ1eIa894uSul2OVEDnpivgbZUv17Fm0Mu lgVQUSLAvoOABEnSVU2upvRntsz5FZPWhdNCMGhSNpAvz8UJFs6v8WtQAlXcF+e2EF pCKc6zNT16WRspNQTI2Wh1YMJLFKDUlpiy0G/vK0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0FC5AF80535; Wed, 9 Feb 2022 05:24:30 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4AAAEF80536; Wed, 9 Feb 2022 05:24:28 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2060.outbound.protection.outlook.com [40.107.220.60]) (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 229C7F80524 for ; Wed, 9 Feb 2022 05:24:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 229C7F80524 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="mzsC69WU" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hRkWsuN4j04brji8cr5dAoovCJMNcvuEP1+qm+sGyOZFvM1AWmwMGrkDaRk5KWd0OGkmAN3iYeaEwvifgWFWE9h4cQntHRnPKsl1SRvtJmQIXcbuedRBrAriRX9dh1HpqXtbnJQP4inFgBQRk2oRJwIu05hx3hrG4s5UJ0BiTIyntNPO5NcXtDyPXq7ARyeR3CJESdyGgp1G9hR+yzhLuwi82oKrDWtgHxUx9JyJQXZrLHSJgs5EbUXtSPVE8Ne2L/AlU7gX8iwHSPRZR8SLuRnqZLAQ6YCi9zpsrI6FbU8qRwzpvrs8KriUqo3IOa9hitzsH3t1ZYYjUu0X9mI8zA== 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=GMrw26siN7mYv5moUbS3eA3m61zLZP5l8xWHRqo4JNXdARG3WT8vtOWIYZYMl8TUHMTMqyb+R4KdaWmrZ6rqGD9Yfgcw1bnX3wdthgN7TAcN83MC89VixjRzMOkS8+Pg1HudZPUAmmZmmfoNCva9Ni+c1y9ttwVWZhLkltl5yb1zgB5w5zSPGdS+fWBc4cItWgo88fpXaWMnXiCHSs0sX2zl7MAIul1oqd9vKEZWkdY7Ndeq1cQnTMn5WrjdQL7frnd+2op4lAvFkkaowZ+Hs+hzYrof3cV8JeFYG4E+w2ccX/qgZEL56bMgn9ndz8d++Wq+Gv5SGK0zFXJmhsF5kw== 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=kUUVQhfwConrFnRXbg04vsbA9foJPiCYRG+HjVc343Q=; b=mzsC69WUjMtdE/t1ePs53UlSkmkPE1m0WO8jx8yyEatuqEFwVZE6V5Q97pQVrw1+v1h8csPI9OItnO7oR9TF0jCMZ5BtvBtutu73Z3simYTpv4pcY8dgdrHgUS3kBbDA+/HnWH9wsocbM7YWmrtTGkJ3VjI9vsrpFSHPHCoNPYlyH2OYAXcKvSIXqfiP0yUI/oq4ooMjzaKrJ0wH7tPic4BsGCUym4sV4QNZf58quwYBd1LUy1H5k7+x+3zgVauGamgle1D8x88yToL7TQihWW1KK1VGap5sKG3ueRgtEHiSdRLiBH+Iyi9btdyz0jov+gXp2IcTlooYozppKA1Nng== Received: from MWHPR13CA0005.namprd13.prod.outlook.com (2603:10b6:300:16::15) by CY4PR1201MB0021.namprd12.prod.outlook.com (2603:10b6:910:1a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Wed, 9 Feb 2022 04:24:15 +0000 Received: from CO1NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:300:16:cafe::bc) by MWHPR13CA0005.outlook.office365.com (2603:10b6:300:16::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.5 via Frontend Transport; Wed, 9 Feb 2022 04:24: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 CO1NAM11FT060.mail.protection.outlook.com (10.13.175.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; Wed, 9 Feb 2022 04:24:14 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 9 Feb 2022 04:24:14 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Tue, 8 Feb 2022 20:24:13 -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; Tue, 8 Feb 2022 20:24:10 -0800 From: Mohan Kumar To: , , , , , , Subject: [PATCH v1 6/6] arm64: tegra: Add hda dts node for Tegra234 Date: Wed, 9 Feb 2022 09:53:26 +0530 Message-ID: <20220209042326.15764-7-mkumard@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220209042326.15764-1-mkumard@nvidia.com> References: <20220209042326.15764-1-mkumard@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 90f50707-80de-4f58-f694-08d9eb8407f4 X-MS-TrafficTypeDiagnostic: CY4PR1201MB0021: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: oo3LRPLmxb/5OYr5WocwwkFTyCjh8ZNaGRU/ixrnGM4GnEXZ0KhTmnikQRIOZyvVk2HdztW/jweCNM2lYfzdwtTvdIkqCN2/sxwvL80iVSiACtRWfDT3I0x0ndlMrwR1aYfhMO9yrmOlLkzzmIEUNnfSXl9pwDtTvxLg4AZrcrcbzep53mgGNtNGuCzN2Dp7Xmslg2TMJQyvfWGGqLgU9sSlkc05+FQUMlSHQ3GoTFHAGL61nfXDoZ7gPTokaaagOJ+PP0xtZWdhuaibU7I3d0Gz+SlEHtMxPYUIUv1t5QIBddg1es+7k9wCAAdHojv5t3yeK9c4scF+0C7pWwHAQGgmmWCgB87pYJPavz4eMRjcDyaXywvMPSDa2kSbl5stMMMrdC0Plyi+RuFBSC2dfC+MU8gSAbqNaPgNIoy3oYKvOLih4drimlXm3uQgNFuXoriIbOhKalVFabNAcW+n/dfrf2HcB9zaUoEo+a4zJGpiMcFWGxv2KqcuN6ziu1VeK9RvI28nC+er8fyfe+AUuKkXERgM2OR3vdafq2WtSEhGjXHHO1OV2BMhAqkuMpXROeid2E7JgFrLs3ZDIpafBMZT4SltdVCDemEiTlawRMxq3k56i6mrydE7FpZ97qhAQ3W/hlpRrCrZNC8J70+2EoPGlP6K7RMsTYdSX8mLEAEbm+Th9e6X1fiJxdw2wyj+HAUZWftu2yt0FmmMW1s6nSWQWXtT/15q0C+R51sI8YA= 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)(40470700004)(46966006)(36840700001)(54906003)(110136005)(6636002)(8676002)(4326008)(70586007)(107886003)(70206006)(2906002)(508600001)(8936002)(316002)(36756003)(40460700003)(7696005)(6666004)(336012)(186003)(36860700001)(86362001)(26005)(83380400001)(47076005)(356005)(1076003)(2616005)(5660300002)(82310400004)(426003)(81166007)(2101003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 04:24:14.9465 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 90f50707-80de-4f58-f694-08d9eb8407f4 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: CO1NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0021 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 {