Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp154312pxb; Wed, 18 Nov 2020 00:31:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+r4abVuRMun++X59wixyPddrtb5OiqO2CZEg1IR/JpxdTqTIZf0Ap26VU9LUkga+jO7K1 X-Received: by 2002:a05:6402:17b4:: with SMTP id j20mr26150952edy.24.1605688262121; Wed, 18 Nov 2020 00:31:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605688262; cv=none; d=google.com; s=arc-20160816; b=rCxGyrWo5BOrPI/NPqhYEBQgJEhEIhot/NpG1UNVCuQA8zI+xKNDtbjTR4DFc5JXEi /b1YGHpz4I32w0xvlLQZRoZgp+fYKmSxJOuNbf7Sb2mBbl8Fd1Yq8KCYRWbD9dDWzPlg 8kE6r+1pti1x8phhRcuiqMAOfEJM0SsyVZWuoE26xWC8QQQLY3rD72bCw8q/q8zXlSZn jSbHc8dVE4khDqS1e9aiHy8nW4LsWKBLFNh06xMFbD2kl7PivU+WM7dt0Lo6Uf/yk1Ft 3DVtg5manarJcUlTZJN3f7hSsGCMu9H9qu1wHawgjc3ZY8APNorNCsC+iACvzguCYIa3 F2ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:autocrypt:from :references:cc:to:subject:dkim-signature; bh=wipFy4goU0+9jVvy+SRIoM9QzZ2mMpIZb7D9n8ByuHg=; b=pPvqPN8PoIfEwBOveCkGF8hTvfFhbJI2SV4ni+OwUNyfB4KagisRhejsL9R5HERnzg MtF1JcA8rYTzn5mmlZZGIPadW6HX6uQCy8XHqfp2frbb+OKS2PS/rIX8TSgDHPE2Svcf EzIFABwKgxNEwlXnp0cPC6fuJl3DAKY4LaVuXo9bzQKAmrkWcytIgakGBJ8Lb+mivI3X 9SFUVHkW9X2UYIJb5rhd4Zm4pje3Cuh38nddozXFsA5rAKIv0n9jjzpw9+7278oaIwgo VJnDj4Ows49ZW6vh+GVdQ7lM/fk6NOUXPvNoekBjTiEpQZvwsUmPYvt083PFLLZP55jk NHjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=QKFWeFEy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s17si13808649edt.578.2020.11.18.00.30.38; Wed, 18 Nov 2020 00:31:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=QKFWeFEy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727138AbgKRI2Z (ORCPT + 99 others); Wed, 18 Nov 2020 03:28:25 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:43998 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726641AbgKRI2Y (ORCPT ); Wed, 18 Nov 2020 03:28:24 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0AI8SAfd109946; Wed, 18 Nov 2020 02:28:10 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1605688090; bh=wipFy4goU0+9jVvy+SRIoM9QzZ2mMpIZb7D9n8ByuHg=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=QKFWeFEyDH8QioKBqDwzYVhMuyhh9nc9M+Kez8avBXzae3JwT2O/lNZhRKlexBYEZ GXqToKplZMJd/eGxCoJEhOOg8NRBwCZex7iyaeolzMgLA3N/3Wtd8I0+HTuli2GaGv YSoEjYRjFGLw9da9cbBzSEain8TrKlGbT3kvwfbE= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0AI8SAwA076303 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 18 Nov 2020 02:28:10 -0600 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 18 Nov 2020 02:28:09 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Wed, 18 Nov 2020 02:28:09 -0600 Received: from [10.1.3.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0AI8S8wE064671; Wed, 18 Nov 2020 02:28:08 -0600 Subject: Re: [PATCH] ARM: dts: keystone-k2g-evm: add HDMI and analog audio data To: Peter Ujfalusi , CC: , , , , References: <20201117101749.26187-1-peter.ujfalusi@ti.com> From: Jyri Sarha Autocrypt: addr=jsarha@ti.com; prefer-encrypt=mutual; keydata= xsFNBFbdWt8BEADnCIkQrHIvAmuDcDzp1h2pO9s22nacEffl0ZyzIS//ruiwjMfSnuzhhB33 fNEWzMjm7eqoUBi1BUAQIReS6won0cXIEXFg9nDYQ3wNTPyh+VRjBvlb/g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uIWkgtuuLQ7ZwqgxGP3dMA5z3Iv/N+VNRGbaw oxf+ZkTbJHEE/dWclj1TDtpET/t6BJNLaldLtJ1PborQH+0jTmGbsquemKPgaHeSU8vYLCdc GV/Rz+3FN0/fRdmoq2+bIHght4T6KZJ6jsrnBhm7y6gzjMOiftH6M5GXPjU0/FsU09qsk/af jbwLETaea0mlWMrLd9FC2KfVITA/f/YG2gqtUUF9WlizidyctWJqSTZn08MdzaoPItIkRUTv 6Bv6rmFn0daWkHt23BLd0ZP7e7pON1rqNVljWjWQ/b/E/SzeETrehgiyDr8pP+CLlC+vSQxi XtjhWjt1ItFLXxb4/HLZbb/L4gYX7zbZ3NwkON6Ifn3VU7UwqxGLmKfUwu/mFV+DXif1cKSS v6vWkVQ6Go9jPsSMFxMXPA5317sZZk/v18TAkIiwFqda3/SSjwc3e8Y76/DwPvUQd36lEbva uBrUXDDhCoiZnjQaNz/J+o9iYjuMTpY1Wp+igjIretYr9+kLvGsoPo/kTPWyiuh/WiFU2d6J PMCGFGhodTS5qmQA6IOuazek1qSZIl475u3E2uG98AEX/kRhSzgpsbvADPEUPaz75uvlmOCX tv+Sye9QT4Z1QCh3lV/Zh4GlY5lt4MwYnqFCxroK/1LpkLgdyQ4rRVw= Message-ID: <97da4017-f161-5e16-8133-8541d030fc62@ti.com> Date: Wed, 18 Nov 2020 10:28:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-GB Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/11/2020 09:39, Peter Ujfalusi wrote: > Hi, > Hi, I certainly agree with your point, but you missed one place that needs changing. sii9022-node also refers to the renamed clock node, and that should be changed too (see bellow). > On 17/11/2020 12.17, Peter Ujfalusi wrote: >> The board is using McASP2 for both analog (tlv320aic3106) and >> HDMI (SiI9022) audio. >> >> Signed-off-by: Peter Ujfalusi >> --- >> arch/arm/boot/dts/keystone-k2g-evm.dts | 112 +++++++++++++++++++++++++ >> 1 file changed, 112 insertions(+) >> >> diff --git a/arch/arm/boot/dts/keystone-k2g-evm.dts b/arch/arm/boot/dts/keystone-k2g-evm.dts >> index 8b3d64c913d8..4d7e3514a3a7 100644 >> --- a/arch/arm/boot/dts/keystone-k2g-evm.dts >> +++ b/arch/arm/boot/dts/keystone-k2g-evm.dts >> @@ -46,6 +46,14 @@ vcc1v8_ldo1_reg: fixedregulator-vcc1v8-ldo1 { >> regulator-always-on; >> }; >> >> + vcc1v8_ldo2_reg: fixedregulator-vcc1v8-ldo2 { >> + compatible = "regulator-fixed"; >> + regulator-name = "ldo2"; >> + regulator-min-microvolt = <1800000>; >> + regulator-max-microvolt = <1800000>; >> + regulator-always-on; >> + }; >> + >> hdmi: connector { >> compatible = "hdmi-connector"; >> label = "hdmi"; >> @@ -58,6 +66,57 @@ hdmi_connector_in: endpoint { >> }; >> }; >> }; >> + >> + sound0: sound@0 { >> + compatible = "simple-audio-card"; >> + simple-audio-card,name = "K2G-EVM"; >> + simple-audio-card,widgets = >> + "Headphone", "Headphone Jack", >> + "Line", "Line In"; >> + simple-audio-card,routing = >> + "Headphone Jack", "HPLOUT", >> + "Headphone Jack", "HPROUT", >> + "LINE1L", "Line In", >> + "LINE1R", "Line In"; >> + >> + simple-audio-card,dai-link@0 { >> + format = "i2s"; >> + bitclock-master = <&sound0_0_master>; >> + frame-master = <&sound0_0_master>; >> + sound0_0_master: cpu { >> + sound-dai = <&mcasp2>; >> + clocks = <&k2g_clks 0x6 1>; >> + system-clock-direction-out; >> + }; >> + >> + codec { >> + sound-dai = <&tlv320aic3106>; >> + system-clock-frequency = <12288000>; > > I think it would be better to use: > clocks = <&aud_mclk>; > > >> + }; >> + }; >> + >> + simple-audio-card,dai-link@1 { >> + format = "i2s"; >> + bitclock-master = <&sound0_1_master>; >> + frame-master = <&sound0_1_master>; >> + sound0_1_master: cpu { >> + sound-dai = <&mcasp2>; >> + clocks = <&k2g_clks 0x6 1>; >> + system-clock-direction-out; >> + }; >> + >> + codec { >> + sound-dai = <&sii9022>; >> + system-clock-frequency = <12288000>; > > and here as well: > clocks = <&aud_mclk>; > > >> + }; >> + }; >> + }; >> + >> + sii9022_mclk: sii9022_mclk { > > and rename the fixed clock to aud_mclk as the same clock is connected to > both aic3106 and SiI9022 > >> + compatible = "fixed-clock"; >> + #clock-cells = <0>; >> + clock-frequency = <12288000>; >> + }; >> }; >> >> &k2g_pinctrl { >> @@ -214,6 +273,15 @@ K2G_CORE_IOPAD(0x10e4) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE0) /* dssde.dssd >> K2G_CORE_IOPAD(0x10e8) (BUFFER_CLASS_B | PULL_DISABLE | MUX_MODE0) /* dssfid.dssfid */ >> >; >> }; >> + >> + mcasp2_pins: pinmux_mcasp2_pins { >> + pinctrl-single,pins = < >> + K2G_CORE_IOPAD(0x1234) (BUFFER_CLASS_B | PIN_PULLDOWN | MUX_MODE4) /* pr0_pru_gpo2.mcasp2_axr2 */ >> + K2G_CORE_IOPAD(0x1238) (BUFFER_CLASS_B | PIN_PULLDOWN | MUX_MODE4) /* pr0_pru_gpo3.mcasp2_axr3 */ >> + K2G_CORE_IOPAD(0x1254) (BUFFER_CLASS_B | PIN_PULLDOWN | MUX_MODE4) /* pr0_pru_gpo10.mcasp2_afsx */ >> + K2G_CORE_IOPAD(0x125c) (BUFFER_CLASS_B | PIN_PULLDOWN | MUX_MODE4) /* pr0_pru_gpo12.mcasp2_aclkx */ >> + >; >> + }; >> }; >> >> &uart0 { >> @@ -423,6 +491,10 @@ sii9022: sii9022@3b { >> compatible = "sil,sii9022"; >> reg = <0x3b>; >> >> + sil,i2s-data-lanes = < 0 >; >> + clocks = <&sii9022_mclk>; ... and here: clocks = <&aud_mclk>; >> + clock-names = "mclk"; >> + >> ports { >> #address-cells = <1>; >> #size-cells = <0>; >> @@ -444,6 +516,19 @@ sii9022_out: endpoint { >> }; >> }; >> }; >> + >> + tlv320aic3106: tlv320aic3106@1b { >> + #sound-dai-cells = <0>; >> + compatible = "ti,tlv320aic3106"; >> + reg = <0x1b>; >> + status = "okay"; >> + >> + /* Regulators */ >> + AVDD-supply = <&vcc3v3_dcin_reg>; >> + IOVDD-supply = <&vcc3v3_dcin_reg>; >> + DRVDD-supply = <&vcc3v3_dcin_reg>; >> + DVDD-supply = <&vcc1v8_ldo2_reg>; >> + }; >> }; >> >> &dss { >> @@ -458,3 +543,30 @@ dpi_out: endpoint { >> }; >> }; >> }; >> + >> +&k2g_clks { >> + /* on the board 22.5792MHz is connected to AUDOSC_IN */ >> + assigned-clocks = <&k2g_clks 0x4c 2>; >> + assigned-clock-rates = <22579200>; >> +}; >> + >> +&mcasp2 { >> + #sound-dai-cells = <0>; >> + >> + pinctrl-names = "default"; >> + pinctrl-0 = <&mcasp2_pins>; >> + >> + assigned-clocks = <&k2g_clks 0x6 1>; >> + assigned-clock-parents = <&k2g_clks 0x6 2>; >> + >> + status = "okay"; >> + >> + op-mode = <0>; /* MCASP_IIS_MODE */ >> + tdm-slots = <2>; >> + /* 6 serializer */ >> + serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ >> + 0 0 1 2 0 0 // AXR2: TX, AXR3: rx >> + >; >> + tx-num-evt = <32>; >> + rx-num-evt = <32>; >> +}; >> > > - Péter > > Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. > Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki > Best regards, Jyri -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki