From patchwork Wed Aug 9 08:45:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aradhya Bhatia X-Patchwork-Id: 133128 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2658188vqr; Wed, 9 Aug 2023 01:59:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHFRRkE+QdeoSVqMT8SDLq53iWtQT5D8ksg55Rx5dTbXE9a4HNzLQr/IOmG17woqX82Fgcj X-Received: by 2002:a17:906:8472:b0:99c:5056:4e31 with SMTP id hx18-20020a170906847200b0099c50564e31mr2412408ejc.15.1691571570837; Wed, 09 Aug 2023 01:59:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691571570; cv=none; d=google.com; s=arc-20160816; b=Jh71VBtTihKM7rg4bNK/F4WD6PIANNjN2ttMH/Q3bGu4yfix4qEOFTjCJYbAJCgd79 JWk1nkNL81Zr9nBeBGyjGe8x8k3GHEuj2Lxo9P6JbTd7YjqEhggHsHw0+FgiAaA1WoyK T2oU2+WlDz8+HYNFRbk7wwfgm8vK6ljYsoAmH+xAoS6ON+OrxmL4c20ac6XD1DoVq7yT BS5dvtSAXSn4yi5w/ePNrlk1GUEEmN5PFli3i/qE2op5s6GLBE6nY41Js9YFhEeHsWk7 JBdLeI0b2ZWe2RmVACVGOk+zePa5Re0hQSDGtq7nyozdJtOALRoTVlTilCEQ6+S97g1s M4Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PHdwIjd19EToE+SqKgKZGmkPpNgd8gvipOkXIPTlebI=; fh=Il8YZM5/F0G6fW6jRGwTBh/PJehaB9uye1IIJCssVD8=; b=o0vzBh9CEdFC8ooaAyMgJiHK2rxTy1kwu/FP+V6L9m2MXc0cZtp4x0u35wA03ue7uw 8swg8OthlM4fKLGHJnN5SIgDbIu1wHUe5Gj/okrdWo395KGVgucnj0AZWbtYGzd7eycp uAJrGNVKnLonZmMdsSyYahXtvOLmyLZxV/cm7TNXlLP/yxuUiUJqQjuyy9OeG6hn8Vz7 lf1CIyYKgWUL57MHN8WyT7ATRV9xh4m5LhpPlN/EpEnm372JjPtSKos6m+kdyvhmJMaf tp2O2PXqBT/UoSxoWy0irtCtNoezg3qsUxwZl67AC8rp6DdZVJvkJOHDk1GcVNYGTjki QdmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=UcPusVGJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qp28-20020a170907207c00b00993b3881ecbsi8551238ejb.682.2023.08.09.01.59.07; Wed, 09 Aug 2023 01:59:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=UcPusVGJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231972AbjHIIqd (ORCPT + 99 others); Wed, 9 Aug 2023 04:46:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230450AbjHIIq1 (ORCPT ); Wed, 9 Aug 2023 04:46:27 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B253E1FCD; Wed, 9 Aug 2023 01:46:26 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3798k6Zs069906; Wed, 9 Aug 2023 03:46:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691570766; bh=PHdwIjd19EToE+SqKgKZGmkPpNgd8gvipOkXIPTlebI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=UcPusVGJxM5/TEexS4n8C+VHAHRHzIvIpN5ej/521UYXwleOtceLDJ0QB5mx0QWEC vGncXGkDhOWpJYyskmKjlGLlJOTNYJ3ILiosFRywrjXzaW0c20Id4hZ6FCygzjwz/p 4U160A2kXzH5wqPmUYRCRAi2cQGXJ01MApFOP96k= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3798k67c004764 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 9 Aug 2023 03:46:06 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 9 Aug 2023 03:46:06 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 9 Aug 2023 03:46:06 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3798k5Rf112716; Wed, 9 Aug 2023 03:46:06 -0500 From: Aradhya Bhatia To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Conor Dooley , Will Deacon , Francesco Dolcini CC: Devicetree List , Linux Kernel List , Linux ARM Kernel List , Tomi Valkeinen , Rahul T R , Devarsh Thakkar , Jai Luthra , Jayesh Choudhary , Aradhya Bhatia Subject: [PATCH v5 4/6] arm64: dts: ti: am62x-sk: Add overlay for HDMI audio Date: Wed, 9 Aug 2023 14:15:57 +0530 Message-ID: <20230809084559.17322-5-a-bhatia1@ti.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230809084559.17322-1-a-bhatia1@ti.com> References: <20230809084559.17322-1-a-bhatia1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773741351587603264 X-GMAIL-MSGID: 1773741351587603264 From: Jai Luthra Enable audio output over HDMI instead of the 3.5mm jack. A FET switch (U65) on the EVM muxes serial audio lines coming from McASP between the codec (tlv320aic3106) and the HDMI bridge (sii9022). By default it uses the codec, but it can be toggled to use the HDMI bridge by shorting a (J24) header on the board. Signed-off-by: Jai Luthra [a-bhatia1: Cosmetic changes] Signed-off-by: Aradhya Bhatia --- arch/arm64/boot/dts/ti/Makefile | 3 ++ .../boot/dts/ti/k3-am62x-sk-hdmi-audio.dtso | 40 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-am62x-sk-hdmi-audio.dtso diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index 437a3d7e8e3a..e3eadf69d43b 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -19,6 +19,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-dahlia.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-dev.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-yavia.dtb dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-hdmi-audio.dtbo # Boards with AM62Ax SoC dtb-$(CONFIG_ARCH_K3) += k3-am62a7-sk.dtb @@ -68,6 +69,8 @@ dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm.dtb # Enable support for device-tree overlays +DTC_FLAGS_k3-am625-sk += -@ +DTC_FLAGS_k3-am62-lp-sk += -@ DTC_FLAGS_k3-am6548-iot2050-advanced-m2 += -@ DTC_FLAGS_k3-j721e-common-proc-board += -@ DTC_FLAGS_k3-j721s2-common-proc-board += -@ diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-hdmi-audio.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-hdmi-audio.dtso new file mode 100644 index 000000000000..43a0ddc123e5 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-hdmi-audio.dtso @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0 +/** + * Audio playback via HDMI for AM625-SK and AM62-LP SK. + * + * Links: + * AM625 SK: https://www.ti.com/tool/SK-AM62 + * AM62-LP SK: https://www.ti.com/tool/SK-AM62-LP + * + * Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +&{/} { + hdmi_audio: sound-sii9022 { + compatible = "simple-audio-card"; + simple-audio-card,name = "AM62x-Sil9022-HDMI"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&hdmi_dailink_master>; + simple-audio-card,frame-master = <&hdmi_dailink_master>; + + hdmi_dailink_master: simple-audio-card,cpu { + sound-dai = <&mcasp1>; + system-clock-direction-out; + }; + + simple-audio-card,codec { + sound-dai = <&sii9022>; + }; + }; +}; + +&mcasp1 { + auxclk-fs-ratio = <2177>; +}; + +&codec_audio { + status = "disabled"; +};