From patchwork Mon Oct 5 14:03:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Katsuhiro Suzuki X-Patchwork-Id: 11816685 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D6B7618 for ; Mon, 5 Oct 2020 14:03:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 224AC2085B for ; Mon, 5 Oct 2020 14:03:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ks6VZbeI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 224AC2085B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=katsuster.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=D+JjZ6vE6CC8imGP0kEw2ouNhxCAM4ll54gzZa8MZY8=; b=ks6VZbeIGbxPmXGo9qavfxQgUA 2MT/1yVcMVvt1B1RSt9jRhp94ZNNdYTCgi3QMTITOAcfXbL5mYS/rIkIGfi4AQI6D1W7usplbjyvK ae5wLDU+4PJ8pnieJXqWiDyQbiqE/Z0IXophe5MiCgDv671Kby+VCeojkgUg6+lAukDDSCEQhyW/U rfhzeb1LDSVNy2pS0rWU2/28TGPdiLHYkEeBT2qNIY4bDJTWuTQRI8LXnFyfkBLi26hJyAk4nNNzQ 1nJAMy+BwVfLZWm8e0BhwgRS/PDTpPtDb6z4UuFky97YJI6vKyc78jH+nf3vOWY1+VfBkC3+Z3uD5 iTkeuFbA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPR5Q-0006rL-Vt; Mon, 05 Oct 2020 14:03:33 +0000 Received: from www1102.sakura.ne.jp ([219.94.129.142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPR5M-0006pA-Am; Mon, 05 Oct 2020 14:03:30 +0000 Received: from fsav405.sakura.ne.jp (fsav405.sakura.ne.jp [133.242.250.104]) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 095E3Kbe031802; Mon, 5 Oct 2020 23:03:20 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Received: from www1102.sakura.ne.jp (219.94.129.142) by fsav405.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav405.sakura.ne.jp); Mon, 05 Oct 2020 23:03:20 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav405.sakura.ne.jp) Received: from localhost.localdomain (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 095E3Dnx031782 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Oct 2020 23:03:20 +0900 (JST) (envelope-from katsuhiro@katsuster.net) From: Katsuhiro Suzuki To: Heiko Stuebner , linux-rockchip@lists.infradead.org Subject: [PATCH v3] arm64: dts: rockchip: add SPDIF node for rk3399-rockpro64 Date: Mon, 5 Oct 2020 23:03:11 +0900 Message-Id: <20201005140311.2507530-1-katsuhiro@katsuster.net> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201005_100328_701146_E12BA88A X-CRM114-Status: GOOD ( 15.15 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Katsuhiro Suzuki , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds 'disabled' SPDIF sound node and related settings of SPDIF for rk3399-rockpro64. RockPro64 has output pins for SPDIF Tx. But RK3399 does not have enough DMA channel for enabling SPDIF tx. Current settings are: - I2S0 (Req num 0, 1): Enabled : Output to 40pins header CON40 - I2S1 (Req num 2, 3): Enabled : Output to ES8316 on board - I2S2 (Req num 4, 5): Enabled : Output to internal HDMI core - SPDIF Tx (Req num 7) : Disabled: Output to connector J10 If users want to enable ALL sound I/Os, we need 7 DMA channels for it. But unfortunately, RK3399 has only 6 DMA channels. So users 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 Signed-off-by: Katsuhiro Suzuki --- Changes in v3: - Refine commit description why adding disabled node 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";