From patchwork Tue Oct 3 12:12:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 147858 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2038939vqb; Tue, 3 Oct 2023 05:12:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlvdtbNAsD4o5lr0GXHWOYlVlW5mBd9Z1RBXxK6YMgsq2aYDkkOkLNgINWxpknbpZPRbOT X-Received: by 2002:a17:90b:358c:b0:278:fb87:43e3 with SMTP id mm12-20020a17090b358c00b00278fb8743e3mr14022334pjb.12.1696335155605; Tue, 03 Oct 2023 05:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696335155; cv=none; d=google.com; s=arc-20160816; b=sq5cLO4NgWjyh1r+W23tnNfLUQ/dZDKzMUj3J2J0S1MGl1H+6ayW9RzSx/1NOnpWC5 XWQpYims7oUyfYVDyrMpeEWxP5wmCsmWBDH8dsATfGd7TD5n1P59J9wnzJdpsZBNwKjO Qvn2XAwaC/mwYscnwaF6O+Nb93WgS7ySvPWnFX8g78FBmVIzVt513pOHJV6UAsfKd3L3 yd05gvI4++uIZgc8aexwF2D/qwWBYKFakE7So7Y17Uxax+rVxPKZi7Rr/JUMNTeywLU1 5qTQLKNybEcDWQVsTtHjBCcHLzbaB2t/CVoG8+PAzLF2UgQYkRS9W/ki3XK175cNFShv xxRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ndmM4JbR+kmn5XX/WNfIjfT5Y4Gu1IiD0B/toAwyHcg=; fh=BdoWshtIblK2GXqnam+BYbM5jqNF+x6q1MbdFittGpM=; b=TWiEZ6Lss9lf78P0K1/g+zuDsNevSkXl7fjSfIxRv8vp1a/tLUueKxuMy7wgdMuuwN +xnJicut+R9vfmU9PYTKTKk/jUSmBcPEaQW/Vbi7nL4DKkY3oqTU31/tlvhzualWf6op 3S01TnUoz4BI0198szhnKjk9nWKpTaVu77TWrL9c9jn7yiHmr7tgDzox/TEE0tJFkp4R dPNafj2ITGgHOzDAfQzCoxD4dFs5iqOOqF0bCRgugbi5JKom7hpqNA9VpBqw+hxuBG5+ 6qVHKdto75zM3FC8dYvsmF3vLEmweI028TShgd1fzRkt+bE5I7VRuEfbLi87mPWCY8pX N9CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=xObIzQhT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id x5-20020a654145000000b00584ac935a98si1232548pgp.828.2023.10.03.05.12.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 05:12:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=xObIzQhT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id BE243807BED9; Tue, 3 Oct 2023 05:12:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232016AbjJCMMU (ORCPT + 18 others); Tue, 3 Oct 2023 08:12:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231127AbjJCMMT (ORCPT ); Tue, 3 Oct 2023 08:12:19 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A004A6 for ; Tue, 3 Oct 2023 05:12:16 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32157c8e4c7so895624f8f.1 for ; Tue, 03 Oct 2023 05:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1696335134; x=1696939934; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ndmM4JbR+kmn5XX/WNfIjfT5Y4Gu1IiD0B/toAwyHcg=; b=xObIzQhTXlIe4EE/ixIfSmE6P2LVWz/8+Fn00lBJVtLn46m+50bqywm3ShWx6Y0HJ0 SK2GVDP9AryB0e48G3FRBj/kXWBrPHIzuiiY0aC9OXFNeEDYSeN9lmrK5WqCuug6icpZ n8Ut39vr6jzTj6unxSraUwH6UqxcHaBwZOFPhsJPqvV4ET7qw932SgcuDo06J2yhTW/U mOd8QFGxvSlhx5AnDzDE0V4+o+Bmo5bQAnFMz9W2MQrNw3pc/wRKmOXuaFtrVCm5zh0U Ky13XJY8VdxUXbw6eHO5CORmxKbIeIm0YlTiAtkNwpuUJYh9APtQd3kNAnEL/XAFBgRa 3Imw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696335134; x=1696939934; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ndmM4JbR+kmn5XX/WNfIjfT5Y4Gu1IiD0B/toAwyHcg=; b=N1k3HiPAvVnPdKzQKLXAZbAfwSZETuaewl4hGxxDgnQUM1FNU7vxgpOwU17xwABBwN M7DCMIFY1kFTiTAsTMVVPVGPon9EAIGi1dCjFwg0uG4eIb64oLWSwUD1PFjBPMiRlUee +gNahVnXYs/qaShH5U3P0Xy0A+5O2hdsk5+7LVMjUeU4mltMoI6nJ5M612UyabU5s3zb ItbuM1hxHtVP3cB0HyOqUDQhyVHHlL4P75j9+8KR9I1wGu0vA7RfzmbTTBU2zqpZUliX gQw5gk0nRyB3bFPOqLMgkX+MNQPGR8x4T5mbmkozGcxNaqPZDk6qmhI/wso1Bee8WewP g7Dg== X-Gm-Message-State: AOJu0YxUOie+oXFnp/DnFC3d1oF1n5U/JJXwmn+RzlhOSn+AD/42hlVF 2X5NpGpD1f2KAVTn4t1OIqRiuQ== X-Received: by 2002:a5d:4385:0:b0:321:677d:98b0 with SMTP id i5-20020a5d4385000000b00321677d98b0mr12588341wrq.11.1696335134390; Tue, 03 Oct 2023 05:12:14 -0700 (PDT) Received: from toaster.lan ([2a01:e0a:3c5:5fb1:15bf:5b59:3e24:71fe]) by smtp.googlemail.com with ESMTPSA id p3-20020a05600c204300b0040648217f4fsm9269649wmg.39.2023.10.03.05.12.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 05:12:13 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Jerome Brunet , Kevin Hilman , Da Xue , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH] arm64: dts: amlogic: add spdifout on libretech potatoes Date: Tue, 3 Oct 2023 14:12:04 +0200 Message-Id: <20231003121205.2870923-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Patchwork-Bot: notify X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 03 Oct 2023 05:12:33 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778736331871296854 X-GMAIL-MSGID: 1778736331871296854 SPDIF output is available libretech's Potato v1 and v2, on a dedicated header. Add the codec, pinmux and dai link to enable it on the sound card. Signed-off-by: Jerome Brunet --- .../amlogic/meson-gxl-s905x-libretech-cc-v2.dts | 17 +++++++++++++++++ .../amlogic/meson-gxl-s905x-libretech-cc.dts | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts index 2825db91e462..ca6f922d162d 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts @@ -23,6 +23,13 @@ aliases { spi0 = &spifc; }; + spdif_dit: audio-codec { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + status = "okay"; + sound-name-prefix = "9J2"; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -189,11 +196,21 @@ codec-0 { sound-dai = <&hdmi_tx>; }; }; + + dai-link-3 { + sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; + + codec-0 { + sound-dai = <&spdif_dit>; + }; + }; }; }; &aiu { status = "okay"; + pinctrl-0 = <&spdif_out_h_pins>; + pinctrl-names = "default"; }; &cec_AO { diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts index 27093e6ac9e2..8b3234a9cb45 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts @@ -29,6 +29,13 @@ dio2133: analog-amplifier { enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; }; + spdif_dit: audio-codec { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + status = "okay"; + sound-name-prefix = "9J1"; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -183,6 +190,14 @@ codec-0 { sound-dai = <&acodec>; }; }; + + dai-link-4 { + sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; + + codec-0 { + sound-dai = <&spdif_dit>; + }; + }; }; }; @@ -193,6 +208,8 @@ &acodec { &aiu { status = "okay"; + pinctrl-0 = <&spdif_out_h_pins>; + pinctrl-names = "default"; }; &cec_AO {