Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp651180pxk; Sun, 30 Aug 2020 18:12:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmIFUXU7oGptnSET6rgLzB8lF/6DJs/u/1HpduLdIDIdqBSY9Sof6PIuaJnK5Gi6dojkxs X-Received: by 2002:a17:906:9ad3:: with SMTP id ah19mr9559570ejc.372.1598836324752; Sun, 30 Aug 2020 18:12:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598836324; cv=none; d=google.com; s=arc-20160816; b=SZYRTCqQCTd9CbTsGz+CdPYes9+Z7u79bHcj2j6ZI2YsmOotjM5Rjib7/k1hxSvomv iQJJu/n0ELlH6ap94UsdE/ZLjcMSC5gCKUjTJnpg7WycGBSo0ta8oU5tzrUD4mfyWTW0 PKZIa/kQju7SxsNQ09rzIsNp7G6Hmwc0fHYsAgZ/dihLtWiaEmB/VgqMpB+Zgdu3wP0K 2gvHQSweYqlUTKRoXLyruppmjX6GR6ED6G0Ag/u7cbI4KIscIJqSjOKYcRN7DyCh6SFp +E6QTvXXqBvmtUiWpcV/sOxjMTDJk7T58cFQMhpm6oLItYHziEP1/FM5XXxDGAP0w+C6 a/xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=c1LrA07lx6PlZSYQqxO5whqb2bFx5EqAkgYaQih5190=; b=PrfggAkrO9nVfoh1y44JEeZB9KNIQoHjK+pfMoimQ53p4uFPsigc1F6Z2sAUlfUXNm iB6VS2qCAgyiSUK+RBODan6sNhwpcjSp20Qu7IBHkdtr/crZABmvru+gd6wAh/Pawhy1 jZrSKJUTo32xGqSaeZ1+z9oOn5Yg4jaTT7yREYABg/23HPY+/ngZ5/LpgUnfCOgHfqlN 6+8QTeiEzfZRJXbR9bR8mYrQC182yozd6yOKiwsVHKRow5VdM2aPh1mWBqaEp3z29a73 hmxlBmFTOhdUL+M48gekbKXveASq3le4R1lhaS2fYii1IEVryUAJGytgTHM5WJNFhFq+ ierw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mf26si4261139ejb.665.2020.08.30.18.11.38; Sun, 30 Aug 2020 18:12:04 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726571AbgHaBKv (ORCPT + 99 others); Sun, 30 Aug 2020 21:10:51 -0400 Received: from www1102.sakura.ne.jp ([219.94.129.142]:52616 "EHLO www1102.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726508AbgHaBKu (ORCPT ); Sun, 30 Aug 2020 21:10:50 -0400 Received: from fsav107.sakura.ne.jp (fsav107.sakura.ne.jp [27.133.134.234]) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 07V1AU7J008966; Mon, 31 Aug 2020 10:10:30 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Received: from www1102.sakura.ne.jp (219.94.129.142) by fsav107.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav107.sakura.ne.jp); Mon, 31 Aug 2020 10:10:30 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav107.sakura.ne.jp) Received: from [192.168.1.2] (80.57.232.153.ap.dti.ne.jp [153.232.57.80]) (authenticated bits=0) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 07V1ATDa008961 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 31 Aug 2020 10:10:30 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Subject: Re: [PATCH v2] arm64: dts: rockchip: add SPDIF node for rk3399-rockpro64 To: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20200810091619.3170534-1-katsuhiro@katsuster.net> <9694178.H46bfk3Hth@phil> From: Katsuhiro Suzuki Message-ID: <6aea0d8d-00a7-6697-4085-bd2cdcd98f26@katsuster.net> Date: Mon, 31 Aug 2020 10:10:29 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <9694178.H46bfk3Hth@phil> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Heiko, On 2020/08/31 4:08, Heiko Stuebner wrote: > Hi, > > Am Montag, 10. August 2020, 11:16:19 CEST schrieb Katsuhiro Suzuki: >> This patch adds 'disabled' SPDIF sound node and related settings >> for rk3399-rockpro64. >> >> There are 2 reasons: >> - All RK3399 dma-bus channels have been already used by I2S0/1/2 >> - RockPro64 does not have SPDIF optical nor coaxial connector, >> just have 3pins > > I don't really understand what you mean here. > > Like is there spdif on the board or not? Because you call it "disabled" > and also indicate that no i2s is available anymore, yet you mention 3 pins. > What do they do then? > RockPro64 has output pins for SPDIF Tx. But RK3399 does not have enough DMA channel for enabling SPDIF tx. Current settings are: - I2S0 (Req number 0, 1): Enabled : Output to 40pin headers (CON40) - I2S1 (Req number 2, 3): Enabled : Output to ES8316 on board - I2S2 (Req number 4, 5): Enabled : Output to internal HDMI core - SPDIF Tx (Req number 7) : Disabled : Output to other connector (J10) If we want to enable ALL sound I/Os, we need 7 DMA channels for it. But... Unfortunately, RK3399 has only 6 DMA channels for sounds, PWM and SPIs. So users of RockPro64 have to choose from the following: - Disable one of I2S (Ex. I2S0) and enable SPDIF tx - Keep enable I2S0/1/2 and disable SPDIF tx > Thanks > Heiko > > Best Regards, Katsuhiro Suzuki >> Signed-off-by: Katsuhiro Suzuki >> >> --- >> >> Changes in v2: >> - Remove redundant status property >> --- >> .../boot/dts/rockchip/rk3399-rockpro64.dtsi | 27 +++++++++++++++++++ >> 1 file changed, 27 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi >> index 6e553ff47534..58097245994a 100644 >> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi >> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi >> @@ -76,6 +76,23 @@ sound { >> dais = <&i2s1_p0>; >> }; >> >> + sound-dit { >> + compatible = "audio-graph-card"; >> + label = "rockchip,rk3399"; >> + dais = <&spdif_p0>; >> + }; >> + >> + spdif-dit { >> + compatible = "linux,spdif-dit"; >> + #sound-dai-cells = <0>; >> + >> + port { >> + dit_p0_0: endpoint { >> + remote-endpoint = <&spdif_p0_0>; >> + }; >> + }; >> + }; >> + >> vcc12v_dcin: vcc12v-dcin { >> compatible = "regulator-fixed"; >> regulator-name = "vcc12v_dcin"; >> @@ -698,6 +715,16 @@ &sdhci { >> status = "okay"; >> }; >> >> +&spdif { >> + pinctrl-0 = <&spdif_bus_1>; >> + >> + spdif_p0: port { >> + spdif_p0_0: endpoint { >> + remote-endpoint = <&dit_p0_0>; >> + }; >> + }; >> +}; >> + >> &spi1 { >> status = "okay"; >> >> > > > >