Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp835006pxb; Fri, 22 Apr 2022 12:11:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3eeHNbpXjJpC2Vkd0VBtdsK2scVyKRKmttsEmOV1EA3fOQL1Fj8rKmC8wnKKIxUH2L+Kb X-Received: by 2002:a17:90a:b78f:b0:1d2:fcc5:c4c1 with SMTP id m15-20020a17090ab78f00b001d2fcc5c4c1mr7054891pjr.15.1650654700490; Fri, 22 Apr 2022 12:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650654700; cv=none; d=google.com; s=arc-20160816; b=N0pJyBcerD+nfhm0Vou0XUH4vCnZehQE55RFauDTvrWb58zPijRsGeIWY8fT6L3UYg N7jVTp24DznpZEGOIOkXZVhGhluckm0mymIXFbn/jLQp50psOnhpUQX1Ml2k6K/UZdeh bvpezz9IRJR0yR64eidLdYjD1BA1+j47JRtsdUlaDLJ5CUalq/P/RQjjG5jmlzKWelTG //ksaZMppePef1xdKagRdLRf+NnL9SPpRMA3uTFxUxjGVN2UgccFnCd5j8GIPnmM/ncf 6NUhv4qfskmxYS45UdqNjYFrV43Jq4M1flM5zFEJxhYQoyhYTlYAwut9YjVNclxaIRX4 qfrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=7LiiS3uaYXi0Ozob531oWVwMnODCebHW1HUAZlAglKY=; b=QbO73hqzU5wG2Q+YtdqQ1dCkOL2nozd5smcpAWfw8z+t4LrJdcO7Xfpqa2s7nph3GS AFNl3a01+V4gvhywA8B4xhaCkdO9tEioJkHwYRaBvnLmOYdVtKsy2tvhCdog1Ujw8Exp FlVmE7nVClik97Ff1YNbmfYuJ7OvWYhrM6DwzgETAXnorrRs4uMraHEZiQ2K5PCZpatU MK863/zhJ6HX/0kPyVw3T7aKt1EYqWCjHteGZIUQwbQXxXUSeYukWN0L2wOP0/o2SOPE ySFVJgJFz+qpCfssSgnsMhhjCjtCxdS73pmrZ9pfvd5bTNU/2l9GRGqInum0e+xliHP6 iauA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=b1Z3L9QT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id qe12-20020a17090b4f8c00b001d27c72d7c9si12703840pjb.17.2022.04.22.12.11.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:11:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=b1Z3L9QT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D935014C3D7; Fri, 22 Apr 2022 11:29:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233404AbiDVGEU (ORCPT + 99 others); Fri, 22 Apr 2022 02:04:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233355AbiDVGEK (ORCPT ); Fri, 22 Apr 2022 02:04:10 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D33C74F9FC; Thu, 21 Apr 2022 23:01:17 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 23M61Ar7059322; Fri, 22 Apr 2022 01:01:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1650607270; bh=7LiiS3uaYXi0Ozob531oWVwMnODCebHW1HUAZlAglKY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=b1Z3L9QTZ9VV8VHEX0cb233ch957Nu45AvUQlP2dREfjRBydQlrwz5mqfwPmlZw3A r1OXr3tiMYSR0qRZqorVF3dvAx4uY+NG9p8HCNtcNubqYWNDXCkC4nct1k4zQuAs2b B5bWtw2tiLFLor2k1LmitHedMm6J4hQgto4JI+eI= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 23M61A2m072439 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 22 Apr 2022 01:01:10 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Fri, 22 Apr 2022 01:01:10 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Fri, 22 Apr 2022 01:01:10 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 23M619Jf109591; Fri, 22 Apr 2022 01:01:10 -0500 From: Jai Luthra To: Nishanth Menon , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski CC: , , , Jayesh Choudhary , Jai Luthra Subject: [PATCH v2 2/2] arm64: dts: ti: am625-sk: Add audio output support Date: Fri, 22 Apr 2022 11:30:52 +0530 Message-ID: <20220422060052.8548-3-j-luthra@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220422060052.8548-1-j-luthra@ti.com> References: <20220422060052.8548-1-j-luthra@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 Add nodes for audio codec and sound card, enable the audio serializer (McASP1) under use and update pinmux. Disable all other McASP nodes. Audio input is currently not working properly, so the RX port on McASP1 is disabled for now, until the issue is debugged. The serializer is shared between HDMI and codec. By default codec is used for output, but it can be toggled to HDMI using a FET switch connected to the MCASP1_FET_SEL (J24) header on the board. Signed-off-by: Jai Luthra --- arch/arm64/boot/dts/ti/k3-am625-sk.dts | 89 ++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts index a0ea2cc66b31..414f27d4a9dd 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -119,6 +119,46 @@ <3300000 0x1>; }; + vcc_1v8: fixedregulator-vcc-1v8 { + /* output of TPS6282518DMQ */ + compatible = "regulator-fixed"; + regulator-name = "vcc_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc_3v3_sys>; + regulator-always-on; + regulator-boot-on; + }; + + tlv320_mclk: tlv320-mclk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <12288000>; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "AM62x-SKEVM"; + simple-audio-card,widgets = + "Headphone", "Headphone Jack"; + simple-audio-card,routing = + "Headphone Jack", "HPLOUT", + "Headphone Jack", "HPROUT"; + simple-audio-card,format = "dsp_b"; + simple-audio-card,bitclock-master = <&sound_master>; + simple-audio-card,frame-master = <&sound_master>; + simple-audio-card,bitclock-inversion; + + simple-audio-card,cpu { + sound-dai = <&mcasp1>; + }; + + sound_master: simple-audio-card,codec { + sound-dai = <&tlv320aic3106>; + clocks = <&tlv320_mclk>; + }; + }; + leds { compatible = "gpio-leds"; pinctrl-names = "default"; @@ -264,6 +304,15 @@ AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */ >; }; + + main_mcasp1_pins_default: main-mcasp1-pins-default { + pinctrl-single,pins = < + AM62X_IOPAD(0x0090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */ + AM62X_IOPAD(0x0098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */ + AM62X_IOPAD(0x008c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */ + AM62X_IOPAD(0x0084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */ + >; + }; }; &wkup_uart0 { @@ -350,6 +399,18 @@ pinctrl-names = "default"; pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>; }; + + tlv320aic3106: tlv320aic3106@1b { + #sound-dai-cells = <0>; + compatible = "ti,tlv320aic3106"; + reg = <0x1b>; + + /* Regulators */ + AVDD-supply = <&vcc_3v3_sys>; + IOVDD-supply = <&vcc_3v3_sys>; + DRVDD-supply = <&vcc_3v3_sys>; + DVDD-supply = <&vcc_1v8>; + }; }; &main_i2c2 { @@ -410,6 +471,34 @@ }; }; +&mcasp0 { + status = "disabled"; +}; + +&mcasp1 { + status = "okay"; + #sound-dai-cells = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&main_mcasp1_pins_default>; + + op-mode = <0>; /* MCASP_IIS_MODE */ + tdm-slots = <2>; + + serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ + 1 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + >; + tx-num-evt = <32>; + rx-num-evt = <32>; +}; + +&mcasp2 { + status = "disabled"; +}; + &mailbox0_cluster0 { mbox_m4_0: mbox-m4-0 { ti,mbox-rx = <0 0 0>; -- 2.17.1