From patchwork Mon Jan 20 09:01:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Charkov X-Patchwork-Id: 13944884 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB51EC02185 for ; Mon, 20 Jan 2025 09:04:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7S7Pn182/x6T31hBnOHcuun8qn3EEQWDkSmc868NzyY=; b=AKh1fMQFXupKPw L8kgrOazhfGQ/7DXXeOSU7KHoThiLkTVrmu5MX7N8GcimVGGWLqnu079w05/ZtffmmpwUW0HyhNwd uGbodaOeudAK0BZcGDb20bCnk7iL899SENROiDc2DzKmx8VWtC6Gu2Ox2KGbXexg3hT9VyWQz6dp4 mQDLuLrp6gjNasQIOrXE2qnrH2xz/NKNj7RfDk0tdTbamOiYKA/YyZmKCk33O+zDS6IBzOPNQXve2 H0Qc+APy1y9J/Z2bx5PeY14VovjBKyfoVxviHk/vvN8v1eHP5sfX0NXLML7vnCh8zei9QkufowsGj Oe29qmAkjD8FhU/ehquA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tZnhu-000000055nX-3pCD; Mon, 20 Jan 2025 09:04:30 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tZnfP-0000000557R-1IbR; Mon, 20 Jan 2025 09:01:56 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-53ff1f7caaeso4590698e87.0; Mon, 20 Jan 2025 01:01:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737363713; x=1737968513; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=kemYtUEz1zvjOhFDJKfAsLfEWEsWSV34vtPdI9CAeRs=; b=TjHx+vQE2SR321vSt95+7U7xPeX9v7ZVWfKkxhlurWS8cQnU3RbV6+hyJ2xMihNa8m 4ZjnxU9IJgr1T90g+WaL+soAQtHP/f/FPMokvtcp0l2z6ByV8CK0j0/wxSMTK5Qzu1Dy C9swClUWxbrIk6e7bNoEu6ajSKLSigzvlLM9LJGmBEvV15lzqXuRtVHHDBKzXIkVOBJR rGw/ZaPkGrpJfwxp2WS83QM/nRmXQMvNSSnwv12Db3YDgSRPf7QuYIrDE+WSSnbj3aQz Omt+wo6eRaRAvXRU8RUeGNPlNTyitupsyAUjDHxz+JaSYg2q0j+UeXUdJNh7cs96uiP1 CpMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737363713; x=1737968513; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kemYtUEz1zvjOhFDJKfAsLfEWEsWSV34vtPdI9CAeRs=; b=uwSvnrA2w6WxZo7XsVSFmqQe35LHYK5PgZGX2EtHRnvGgnQEDNip2pxMnm0XRxNiay ufGhhO6T6V1NNCZB1mBo12FzJIft+e4WHgLyTMt3yUERCbWE+eeLmFrg4jH4RtECeejs J05zZo9Up5cVdGCfPBuXKxErF9Ih0oqVJDLMSsYv2WzmxzAdK5m7xxsL+SUteFYsyS/8 R7kb2oZDd28rmtLQMbP0NhaBXH5qcpm5rYo5GQNgNqFLYXQaZiFUPsnzQMo/ptHUvIYf Hg0ek6WBPNaNtSj9TwlZB5toaaAh7Dx979BQjHJNrtmrv75jpww+G1CcTgWSr9y4Z4up SA0g== X-Forwarded-Encrypted: i=1; AJvYcCVBxCvgF/u7+Po9tbEE4o8koILK4VIJ8OrC5fK3jxpRcOuxT1l0OkgQlpyCTk0yvbqNdLAU4KDr0M/+mncd+Z0=@lists.infradead.org, AJvYcCVycEM57iADikSg9UffFRx2u9RjyMQGJSLf3HHPha7l2mluF7YI1BC+mnhXUjtRa1MJlOMzVvKl2Dmie4YY2/jQ@lists.infradead.org X-Gm-Message-State: AOJu0YzeugY1v/rU7G2wK5f3c2l4b81XtmzSPpeBTYomvjbzQDG1QMmE 4PqdgDbA88V0oJlcMeirVULxWVApVkmtz8V38LAYATjzO2Gt9orcJJ4joQfKjZsRYg== X-Gm-Gg: ASbGncusrw49mX6ryXdmT++npUZ/ca8xH+JUO8xmhCcjFU5rzm43eri/FXAdE9jp+ok AMtwyn596/wI9hmKs9y/E/lman39vJIPk0PHJZcP3OGEGEyc3TJfwURTHbnkmoA32GhX6r84JPu 32mRQG1GSC3b0a8Kw5NB+lCkFb+VfE+GbTSPSPdBIlGD7Q6YlYew3mK4Nu7EFFTuMz8k0W2/evw JH967Rg/1I6q4i7js7b5x8xFQIR5tCKu7dQpHA2vQOxVv8Bi7Y/Ljxi1lRVc0S+984tdz0= X-Google-Smtp-Source: AGHT+IEx9f6MEs2aC51GCXj2Q1K64ptJHmYy+Hdi/JLLomjH/N/gqY/c0ZG8Kw+1i2PuSCCfvwdWcg== X-Received: by 2002:ac2:4f8c:0:b0:542:21ec:ff02 with SMTP id 2adb3069b0e04-5439c281fbbmr3440206e87.32.1737363713091; Mon, 20 Jan 2025 01:01:53 -0800 (PST) Received: from [172.30.32.150] ([185.204.1.212]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5439af0e90asm1224768e87.76.2025.01.20.01.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2025 01:01:51 -0800 (PST) From: Alexey Charkov Date: Mon, 20 Jan 2025 13:01:27 +0400 Subject: [PATCH 1/3] dt-bindings: ASoC: rockchip: Add compatible for RK3588 SPDIF MIME-Version: 1.0 Message-Id: <20250120-rk3588-spdif-v1-1-1415f5871dc7@gmail.com> References: <20250120-rk3588-spdif-v1-0-1415f5871dc7@gmail.com> In-Reply-To: <20250120-rk3588-spdif-v1-0-1415f5871dc7@gmail.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Alexey Charkov X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737363699; l=938; i=alchark@gmail.com; s=20240125; h=from:subject:message-id; bh=n0u1NUx3/2UHHzCicOPQE9GqysOtTemnhrpVN1uAmqo=; b=iOT8mfJebuaPxft5/slu2bZvjmAlbN8O5ZJoNP6fn6QS6SeeJeEnugY+DXOnUfshXSK/96d7m kGJMVQz76eYBd7mC7FBE5UzvhfFLd2uZaV8z1itL8wAbE2e0t9pertJ X-Developer-Key: i=alchark@gmail.com; a=ed25519; pk=xRO8VeD3J5jhwe0za0aHt2LDumQr8cm0Ls7Jz3YGimk= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250120_010155_359623_30E5EEDF X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Add a compatible string for SPDIF on RK3588, which is similar to the one on RK3568. Signed-off-by: Alexey Charkov --- Documentation/devicetree/bindings/sound/rockchip-spdif.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/rockchip-spdif.yaml b/Documentation/devicetree/bindings/sound/rockchip-spdif.yaml index c3c989ef2a2c81eba73fae3d1ee4bfd18a8e5d29..32dea7392e8d49fc6402a64fc9f7115a47a8b8ad 100644 --- a/Documentation/devicetree/bindings/sound/rockchip-spdif.yaml +++ b/Documentation/devicetree/bindings/sound/rockchip-spdif.yaml @@ -31,6 +31,10 @@ properties: - rockchip,rk3288-spdif - rockchip,rk3308-spdif - const: rockchip,rk3066-spdif + - items: + - enum: + - rockchip,rk3588-spdif + - const: rockchip,rk3568-spdif reg: maxItems: 1 From patchwork Mon Jan 20 09:01:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Charkov X-Patchwork-Id: 13944885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8B54C02185 for ; Mon, 20 Jan 2025 09:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d7P5c4IiyCQiJs+uRpaxSeIxnmA7OdorM01bGi11o78=; b=kD0jBJCLzWYKYC ZIVsX8ujZuLtJlHHlpfxyc07nkCsMyHqufzVbmmaIme5GiM/8TqqjYm0ehkrTMGXSeoRw1AIj2C4p 2GisP7hjpzsx7b+4L4Ww+JEFX/6CmIsK1xHX1vnyfeof+xCSwhwiFGqdcy/yn82FGOW/hQcu9jE+9 w7W1IR1PQhJrBpVhD11zmT8o/JQAsKt3nLSgIhIXMlx2O2ssRgCvKImMcHHlRO1W3aIIBUcH52VWw DtMMVg2t0u8M7Fj1a8x/zxbhQwxCUR7+Obr3VJxlVSy2SPYRNoyNFGTREBAmtBhCI200Z7R3dScFA EcXsMdCyTfZ9i1Kfi2aA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tZnjE-000000056BZ-1tAl; Mon, 20 Jan 2025 09:05:52 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tZnfW-0000000558d-0eEt; Mon, 20 Jan 2025 09:02:03 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-54287a3ba3cso4862448e87.0; Mon, 20 Jan 2025 01:02:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737363720; x=1737968520; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7SkrNC4OKrwBslXKn2lY94InL2WdhCv1RHq6pIDaZsc=; b=lsJOOlQxMxg6zEUROrVESE7VQukcyxy05rbTbVZtfRM9oyfHGj3PktCgRq1SykqPqO 0eDXAD8HEjAaf/Xri3FlnxagzmJsrKCeQrDzupKI+lMXPXjkd+bJ7Eh3knbagvraM9V1 BM+iH6HfGwaU5URprQBAzYy+vPCqJQEuqWhdn4E6Qvm3XSwZmntb4iJbd26lXVcvILgD FxaNYlBFAvyBPS+k6DX+i9/zjmw7HlqOmopNZ/QwG1rcb2UErIgMm+yniw2Rh7mmdMms MfgaBUCE4QTDmo7CTlMm8Fkrvx23IhmTYB89X/w+neoF62z4dZVcts9mzmf6Qo+sJ1me C5ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737363720; x=1737968520; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7SkrNC4OKrwBslXKn2lY94InL2WdhCv1RHq6pIDaZsc=; b=Kv+bAZ4Sd28WtKKFN6IPurTsUncbp9+uVCs4dvKxQ4zOZjt4gNT38PCP/FbQMwkjLd zjvxcQyprkpo03YSNAl9wDllaBOAwL9qTugN+yKBTPjVRTxvGLyg0DV2A+wuvu7GCqU2 uIa68KPAK/zAaZ1W7yMMzqaQpgjrTeEhsWWecy477xNd8aqmPcTc2A631WIxv5VrR+5w ZFhtffmPT0LauSSUDZYcS6ZArm/7MCccLGtfmF6xxMRFqMGG6mPz8TOHXIYo7kQ6goUN JCTvt6MEEyLTTOWxfF3/d5EK+Lm2esrs5EPe4K17Pus4sNX6Rq/YbjVht7xaNqKqSjAf 5ntg== X-Forwarded-Encrypted: i=1; AJvYcCVS72J7ws81I74orXhhG1Epu+49G9XJU8d6jStcHwSi4gMvch7OwH10LTE2/Tjh1NQR5QiWAg3EndaVDh8b+8s=@lists.infradead.org, AJvYcCWqJdqK/mH2X6jho4NaUEZGJGw5ohAogpd8PxXVCibDIVl9ZQis79eZdtL1LWf4HciQ2Z0mbXNy3nYmd0nXVxBG@lists.infradead.org X-Gm-Message-State: AOJu0YwiwR/BMjWyKSlatJqOs+hVc25/iOcc6xusAbd4BVlrt5IJknea 9JXtVr8WSGFtBbcOsw14xzx3/S53f2p/StiPOQIa44Pq4DHUaYp4YWvtycXCaaW6hA== X-Gm-Gg: ASbGncsg4KTFfhZY9zd/XLtKdU3STnTM9Rfcf5FhZq2ZRX6pNQKj5qwi0poIzRRrMup H/sId1wKe3JD8PqaFr1WifwdE/7W8ImJMMrOVJUEvuQdbHWrGmx47RPBApovOYAlknDTeEFfgRd oaa0abzM1cHFEdW5DsWALkas1n5p1Y1tSR+HnmRk3TkHbCHFcYwK5EzIH/HXian7ikHtuEOQy3h 7mkaZ79W/oZoI3VhruA9EhJCjbqOywVpn5+WHwoEjdV+4DyDc55osAPexaLoePu2qisrHs= X-Google-Smtp-Source: AGHT+IGC7FCazsrX10UnVTI4JyBQvROZIT3aDBV34LerB5P0S0R4EmhZ2kEAeo8emEvzObroak2BsQ== X-Received: by 2002:a05:6512:1250:b0:542:215f:e615 with SMTP id 2adb3069b0e04-5439bfad838mr4216453e87.16.1737363719979; Mon, 20 Jan 2025 01:01:59 -0800 (PST) Received: from [172.30.32.150] ([185.204.1.212]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5439af0e90asm1224768e87.76.2025.01.20.01.01.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2025 01:01:58 -0800 (PST) From: Alexey Charkov Date: Mon, 20 Jan 2025 13:01:28 +0400 Subject: [PATCH 2/3] arm64: dts: rockchip: Add SPDIF nodes to RK3588(s) device trees MIME-Version: 1.0 Message-Id: <20250120-rk3588-spdif-v1-2-1415f5871dc7@gmail.com> References: <20250120-rk3588-spdif-v1-0-1415f5871dc7@gmail.com> In-Reply-To: <20250120-rk3588-spdif-v1-0-1415f5871dc7@gmail.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Alexey Charkov X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737363699; l=5537; i=alchark@gmail.com; s=20240125; h=from:subject:message-id; bh=YP/asl0ktuAJ+7lkx9uBG8Zp8T+WKtOvDkKSxE7Zxj8=; b=tTVe1SaVvi1gG1B2uuR2l3PrPdSsc6F5m8rEBlrbsDtsHLd5lFHOeLy577Pd8XyAZL4oLM/6G CMTJV5jt9FFAJsCTf87cT3AnlWpO+PkVU+pxwKRJpYrfGs/iNw6Mh1R X-Developer-Key: i=alchark@gmail.com; a=ed25519; pk=xRO8VeD3J5jhwe0za0aHt2LDumQr8cm0Ls7Jz3YGimk= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250120_010202_202243_2402FB4D X-CRM114-Status: GOOD ( 10.26 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org RK3588s has four SPDIF transmitters, and the full RK3588 has six. They are software compatible to RK3568 ones. Add respective nodes to .dtsi files. Adapted from vendor sources at [1] and [2], respectively [1] https://github.com/rockchip-linux/kernel/blob/develop-5.10/arch/arm64/boot/dts/rockchip/rk3588s.dtsi [2] https://github.com/rockchip-linux/kernel/blob/develop-5.10/arch/arm64/boot/dts/rockchip/rk3588.dtsi Signed-off-by: Alexey Charkov --- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 64 ++++++++++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi | 30 ++++++++++++ 2 files changed, 94 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi index 8cfa30837ce72581d0b513a8274ab0177eb5ae15..07e8c5aeb45b22db71ac5bc27f812a2d3347a463 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi @@ -1318,6 +1318,21 @@ vop_mmu: iommu@fdd97e00 { status = "disabled"; }; + spdif_tx2: spdif-tx@fddb0000 { + compatible = "rockchip,rk3588-spdif", "rockchip,rk3568-spdif"; + reg = <0x0 0xfddb0000 0x0 0x1000>; + assigned-clock-parents = <&cru PLL_AUPLL>; + assigned-clocks = <&cru CLK_SPDIF2_DP0_SRC>; + clock-names = "mclk", "hclk"; + clocks = <&cru MCLK_SPDIF2>, <&cru HCLK_SPDIF2_DP0>; + dma-names = "tx"; + dmas = <&dmac1 6>; + interrupts = ; + power-domains = <&power RK3588_PD_VO0>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + i2s4_8ch: i2s@fddc0000 { compatible = "rockchip,rk3588-i2s-tdm"; reg = <0x0 0xfddc0000 0x0 0x1000>; @@ -1335,6 +1350,21 @@ i2s4_8ch: i2s@fddc0000 { status = "disabled"; }; + spdif_tx3: spdif-tx@fdde0000 { + compatible = "rockchip,rk3588-spdif", "rockchip,rk3568-spdif"; + reg = <0x0 0xfdde0000 0x0 0x1000>; + assigned-clock-parents = <&cru PLL_AUPLL>; + assigned-clocks = <&cru CLK_SPDIF3_SRC>; + clock-names = "mclk", "hclk"; + clocks = <&cru MCLK_SPDIF3>, <&cru HCLK_SPDIF3>; + dma-names = "tx"; + dmas = <&dmac1 7>; + interrupts = ; + power-domains = <&power RK3588_PD_VO1>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + i2s5_8ch: i2s@fddf0000 { compatible = "rockchip,rk3588-i2s-tdm"; reg = <0x0 0xfddf0000 0x0 0x1000>; @@ -2016,6 +2046,40 @@ &i2s3_sdi status = "disabled"; }; + spdif_tx0: spdif-tx@fe4e0000 { + compatible = "rockchip,rk3588-spdif", "rockchip,rk3568-spdif"; + reg = <0x0 0xfe4e0000 0x0 0x1000>; + assigned-clock-parents = <&cru PLL_AUPLL>; + assigned-clocks = <&cru CLK_SPDIF0_SRC>; + clock-names = "mclk", "hclk"; + clocks = <&cru MCLK_SPDIF0>, <&cru HCLK_SPDIF0>; + dma-names = "tx"; + dmas = <&dmac0 5>; + interrupts = ; + pinctrl-0 = <&spdif0m0_tx>; + pinctrl-names = "default"; + power-domains = <&power RK3588_PD_AUDIO>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + + spdif_tx1: spdif-tx@fe4f0000 { + compatible = "rockchip,rk3588-spdif", "rockchip,rk3568-spdif"; + reg = <0x0 0xfe4f0000 0x0 0x1000>; + assigned-clock-parents = <&cru PLL_AUPLL>; + assigned-clocks = <&cru CLK_SPDIF1_SRC>; + clock-names = "mclk", "hclk"; + clocks = <&cru MCLK_SPDIF1>, <&cru HCLK_SPDIF1>; + dma-names = "tx"; + dmas = <&dmac1 5>; + interrupts = ; + pinctrl-0 = <&spdif1m0_tx>; + pinctrl-names = "default"; + power-domains = <&power RK3588_PD_AUDIO>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + gic: interrupt-controller@fe600000 { compatible = "arm,gic-v3"; reg = <0x0 0xfe600000 0 0x10000>, /* GICD */ diff --git a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi index 4a950907ea6f51c1d4123d52b73b726226db37bc..505cdd7b518ed687865deebcad553fe92b111fd8 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi @@ -67,6 +67,21 @@ u2phy1_otg: otg-port { }; }; + spdif_tx5: spdif-tx@fddb8000 { + compatible = "rockchip,rk3588-spdif", "rockchip,rk3568-spdif"; + reg = <0x0 0xfddb8000 0x0 0x1000>; + assigned-clock-parents = <&cru PLL_AUPLL>; + assigned-clocks = <&cru CLK_SPDIF5_DP1_SRC>; + clock-names = "mclk", "hclk"; + clocks = <&cru MCLK_SPDIF5>, <&cru HCLK_SPDIF5_DP1>; + dma-names = "tx"; + dmas = <&dmac1 22>; + interrupts = ; + power-domains = <&power RK3588_PD_VO0>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + i2s8_8ch: i2s@fddc8000 { compatible = "rockchip,rk3588-i2s-tdm"; reg = <0x0 0xfddc8000 0x0 0x1000>; @@ -84,6 +99,21 @@ i2s8_8ch: i2s@fddc8000 { status = "disabled"; }; + spdif_tx4: spdif-tx@fdde8000 { + compatible = "rockchip,rk3588-spdif", "rockchip,rk3568-spdif"; + reg = <0x0 0xfdde8000 0x0 0x1000>; + assigned-clock-parents = <&cru PLL_AUPLL>; + assigned-clocks = <&cru CLK_SPDIF4_SRC>; + clock-names = "mclk", "hclk"; + clocks = <&cru MCLK_SPDIF4>, <&cru HCLK_SPDIF4>; + dma-names = "tx"; + dmas = <&dmac1 8>; + interrupts = ; + power-domains = <&power RK3588_PD_VO1>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + i2s6_8ch: i2s@fddf4000 { compatible = "rockchip,rk3588-i2s-tdm"; reg = <0x0 0xfddf4000 0x0 0x1000>; From patchwork Mon Jan 20 09:01:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Charkov X-Patchwork-Id: 13944886 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 208B3C02185 for ; Mon, 20 Jan 2025 09:07:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DAB4jn6WWWgK946R7lLs9x19X6HRjj+ZmjgT4yTxMmc=; b=N9ngDHwKF5en5a S//mxd4TWIgRunB11ylhXP4OkuhtxNHnPX64xIi7QzYEDnVlVyuKvWeji1Uf0nEHMV5rXFr41/F4t NvGzNee578te+aZ2hOyQy8rs1/MP2oQhRg8938OfckHRv2kJIeT7FrdaQkCFbLxrsBnnbe+sW6ybM XxeF6vIxw5o60T/FJHWqKFZle/gGOUDCI2UKzgIZNIN3jkJLwYgffl+0O2rQmkx3x63X+VjWpsxkx BlG/rxWUqA+1TRp7ojtbFjb2MhP6bX6t7EtrAxeJrn8ISSMqg0lTB/UROqWkRp42oFmmHqmdP7DN4 vTRPX4FzCZx5wdCxMo7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tZnkS-000000056Wl-3sTG; Mon, 20 Jan 2025 09:07:08 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tZnfd-000000055A9-0UKQ; Mon, 20 Jan 2025 09:02:10 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5401c52000dso4500671e87.3; Mon, 20 Jan 2025 01:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737363727; x=1737968527; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ObQ7GdDi1GptsOmZqtnr/i0ThLMDmvsqiFg1PNnocMQ=; b=Y7J+uSdak95JCdnbgcwWtQYs618s9KERcvMDDcJwJCa6xNyF1poZ2fegyT5ZiCov5r c1lCP+vnhlALCa9HtshsKBmNhcG2sUwCmIWNJYoOud7EIOMO8F2vjSYtrQKIpzWDV8kF q5veaLcp5CngnzxLRO7jEprqtBjsZnijNGfvmxt3I15gw7yCKJCyeN/5yFwOnW7O1bg6 GhjxdlAobc0JkbWIUtCMEFXoIhNxQ3Dn1txA67x++11ST4xsLAODUDbS+UPFPoutR9WE KTeOKKt05IEqYabng4PO3Q7pUhwBskzeKKJozN4gwqwzYqcwRj2CWJDKbzRRc49x9vz0 dcNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737363727; x=1737968527; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ObQ7GdDi1GptsOmZqtnr/i0ThLMDmvsqiFg1PNnocMQ=; b=wud0/2cETWehK9ljFmM0Z2d3oUursjcmreYafVEy71mBZCNXvM5DJy6SCtOSpq441F MHMItkp8o2MeNlCRHof0f9Q1qmyQsXHRnqPOrQwQM6HlnZbtINCsQ0vWOWUTVGRon2Wc 1a9f6IR+JtUtJP7HKRnzSGC7DXuKWaIQoek4ppM35z261//ftgbZy5x8zRXUMCjg9J9T YQgple2XnSfLFMPEb1xYgR42Bd3us6+Z6hgr30srL45Zot+PM06JfPTMsAMbzo9TX9Qi JSgoN4GVHOKEuE+t5vzIpmF05K33ApsK043oXOSbJlVfrmURsj4QV2fZ+8448VGgPDqZ OgRw== X-Forwarded-Encrypted: i=1; AJvYcCVdvlJiXDrYFYNS7MEyRfN/8LbzAFrbqwyE8GnyGtOeXKKMHmzPtYd1BJDvh1JUmJQwgPAEYlMvgfyfAdowijo=@lists.infradead.org, AJvYcCXe4AKSRtMGG/oPjVg9QKnsVAo0oAfrM9RpC83PVmIAvCuWcFiCjITEt2nrnZzoA32CLafTn2koM5NAopMVqHAv@lists.infradead.org X-Gm-Message-State: AOJu0YzppOWBoen6IcNUXD5A1zUir/HnM9dgLNIz7AdrP6bgQJRTHBE3 xo84WBKYCTvqTgxmmxDLBSX4UH6kxti3P13hVSiPzIOfVdMswqIanz6jP2XpOKb3uw== X-Gm-Gg: ASbGncsjIKklvU3LnMwtKNdMq6PVFwz7OA7IKAt53cwKABxaVsG8FMItDSQa7SEybtW 0Y0uez90dKy+NdWuZPwVfzdKcY0eanBBohmdYdNLTe56gkqnKnUxBO+volFFRGt15Ys3+qQThGw Kns3xQ84o+oOBb9PYMjiaZlc4RVWvjDuGT+FP/CJuLmCDW7XHHACwI2li2VfZ8+m/AN0KbsA1Cp CBj/v0q0FkQbNfhPyGS06F3mT9NJXTgQPoqWe+YvcpivIUg/CVDZG0ARNmxDac3fbemcko= X-Google-Smtp-Source: AGHT+IG+uLtQwIY7ysUBBPpzDpbxHyy+W/cd6hfRub2H22c4oda2HhPrd0zg5OQqcxaq2LdygE+qDA== X-Received: by 2002:ac2:561b:0:b0:540:353a:5b1f with SMTP id 2adb3069b0e04-5439c1ba039mr3725344e87.0.1737363726847; Mon, 20 Jan 2025 01:02:06 -0800 (PST) Received: from [172.30.32.150] ([185.204.1.212]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5439af0e90asm1224768e87.76.2025.01.20.01.02.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2025 01:02:05 -0800 (PST) From: Alexey Charkov Date: Mon, 20 Jan 2025 13:01:29 +0400 Subject: [PATCH 3/3] arm64: dts: rockchip: Enable SPDIF output on H96 Max V58 MIME-Version: 1.0 Message-Id: <20250120-rk3588-spdif-v1-3-1415f5871dc7@gmail.com> References: <20250120-rk3588-spdif-v1-0-1415f5871dc7@gmail.com> In-Reply-To: <20250120-rk3588-spdif-v1-0-1415f5871dc7@gmail.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Alexey Charkov X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737363699; l=1420; i=alchark@gmail.com; s=20240125; h=from:subject:message-id; bh=mhZBI52cSFUW4zmM+Wjfy5nZUWjEd1lQ47cgj8nn2a0=; b=3k0A0++kluCdKMCJzs9uffAyMkB9nN6XP5utWRzFrHkWnhbpcAKF4sZs6ezzWG8blnODh5R+g LPjSW5xBvA9BxjjtuEIwF1rkSlrUmbTqApiJoooeSrxu/HMNIP1fWfy X-Developer-Key: i=alchark@gmail.com; a=ed25519; pk=xRO8VeD3J5jhwe0za0aHt2LDumQr8cm0Ls7Jz3YGimk= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250120_010209_162175_8303821C X-CRM114-Status: GOOD ( 10.42 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org H96 Max V58 has its spdif_tx0 controller wired to a dedicated optical Toslink SPDIF socket, enable it in the device tree Signed-off-by: Alexey Charkov --- .../arm64/boot/dts/rockchip/rk3588-h96-max-v58.dts | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-h96-max-v58.dts b/arch/arm64/boot/dts/rockchip/rk3588-h96-max-v58.dts index 4791b77f3571db3a888c015596b4cc1863fdc3f7..68dd7329de15d873f2a0df85fb84810f9c2907d8 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-h96-max-v58.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-h96-max-v58.dts @@ -140,6 +140,24 @@ vcc5v0_sys: regulator-5v0-sys { regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; }; + + spdif_dit: spdif-dit { + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + }; + + spdif_sound: spdif-sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "SPDIF"; + + simple-audio-card,cpu { + sound-dai = <&spdif_tx0>; + }; + + simple-audio-card,codec { + sound-dai = <&spdif_dit>; + }; + }; }; &combphy0_ps { @@ -400,6 +418,12 @@ &sdhci { status = "okay"; }; +&spdif_tx0 { + pinctrl-names = "default"; + pinctrl-0 = <&spdif0m1_tx>; + status = "okay"; +}; + &spi2 { assigned-clocks = <&cru CLK_SPI2>; assigned-clock-rates = <200000000>;