Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2727329iog; Mon, 20 Jun 2022 03:30:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vxDrRXWlVyy+G4YpydJQgoLlXo7yXx4jUfgwu9L0g1qB42ze8HvnrM2ErgeUxOy2QpO8i8 X-Received: by 2002:a17:907:72c9:b0:722:d5ef:6dea with SMTP id du9-20020a17090772c900b00722d5ef6deamr481162ejc.551.1655721029008; Mon, 20 Jun 2022 03:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655721029; cv=none; d=google.com; s=arc-20160816; b=a09im+o8a7SAaBRgvw6rdnl0rvcDOyDv1bDoosUxbEr1YmOwhkPXNkLE9oLk1MRuIG GSIpNBAEaKyWmRp++5GenfMcYPnGYarTvvgP5WZABxfmEFEOQB1Ifhk7+lOQSbwtgkQt d11OCgtSvDtcBBbCjLAiPa2cS2VWwB4ECjXYpUZr9CfV1MbtyLHYORJ20JqvpMmKZbY7 y9UQszPH2m02F/aQ4Rsp9a6YiqMNN3x6wYP7a3DRXFFzvJ2kC8PyDsRlYRPWBrQ07MQD /ezTybZClpFXOYT1h90hHauyO8Og3x5VjG/0kJxFz5S3KG4PWStHZSefO3dcVLh4iHCJ 27kQ== 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=rjNEY+fb0FLAlDCmgbjFcgdwmo6fWi+NdwjkkRfj88U=; b=aMv1dYWhLSqNffRrq8TRbY6d1wowCh3zHrBPMq6RJB+E9k383pifehSuu0EKEr48O5 H9UnmEoe6xnzaCvzRufoH650AXYg5WZlQ05UeVdmVShHVkoNaJUm66puxxMuyXYe1PJc sKRQmgBwGb+0+djWgoqX3AM5DWTm9+hH0G0qje0dVAO28a7JNbPqAd3FXALVGT9MEfzS O7m1Jf0s+BLkGtPbcrrSeow8XCVyyiF+hmN3KlXdcCr8scrn/YKHhuFBrmrda7fLPbvl 5MPRc+tsKuomwQhSdEMsgxF1HyPd/QhghCJk5d3tswM+NZK4Kz+sFGw2lToBWKIWGpaL uV3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=nZF4ri46; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e19-20020a056402191300b004316c7b2879si7914201edz.237.2022.06.20.03.30.03; Mon, 20 Jun 2022 03:30:28 -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=nZF4ri46; 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 S241040AbiFTK2r (ORCPT + 99 others); Mon, 20 Jun 2022 06:28:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237979AbiFTK2U (ORCPT ); Mon, 20 Jun 2022 06:28:20 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FA1E25CF; Mon, 20 Jun 2022 03:28:18 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 25KASBqo035526; Mon, 20 Jun 2022 05:28:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1655720891; bh=rjNEY+fb0FLAlDCmgbjFcgdwmo6fWi+NdwjkkRfj88U=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=nZF4ri46ZsnCP2f6o+6uiiOmUS/8lfA4OWa8HHhhDEaCYX5Av+NIqxEek0ufNT62R Of75SdUqm1FZ0NcBTXbXIuUdEeTZgqX2iR1XhxQpt/y16g39H1DFOzuwbyPTjG9QUR U7wauxIrM2f0vym1wO0/IuwNqyAvObCd158MOlw4= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 25KASANN049483 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 20 Jun 2022 05:28:10 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Mon, 20 Jun 2022 05:28:10 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE109.ent.ti.com (157.170.170.41) 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; Mon, 20 Jun 2022 05:28:10 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 25KAS9rY018438; Mon, 20 Jun 2022 05:28:10 -0500 From: Jai Luthra To: Nishanth Menon , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski CC: , , , Jayesh Choudhary , Jai Luthra Subject: [PATCH v4 2/2] arm64: dts: ti: am625-sk: Add audio output support Date: Mon, 20 Jun 2022 15:57:49 +0530 Message-ID: <20220620102750.32718-3-j-luthra@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220620102750.32718-1-j-luthra@ti.com> References: <20220620102750.32718-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=-5.0 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_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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 39fb1d763037..a502b7ac48d4 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -121,6 +121,46 @@ <3300000 0x1>; }; + vcc_1v8: regulator-5 { + /* 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: clk-0 { + #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"; @@ -266,6 +306,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 { @@ -352,6 +401,18 @@ pinctrl-names = "default"; pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>; }; + + tlv320aic3106: audio-codec@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 { @@ -412,6 +473,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