From patchwork Tue Aug 15 09:27:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 136167 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp2101185vqi; Sat, 19 Aug 2023 09:21:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtFR67VL1qZZBJEmmJfhpttZOfQ++V9ALTSnDvBVbv0nFHgzH+ZChBTIj0V9LkOLtfuBFg X-Received: by 2002:a05:6a20:160b:b0:132:f61e:7d41 with SMTP id l11-20020a056a20160b00b00132f61e7d41mr3892809pzj.5.1692462109980; Sat, 19 Aug 2023 09:21:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692462109; cv=none; d=google.com; s=arc-20160816; b=XA5BA+NBq4jZGMCQs5VqsUOZQTSs2q7Eri0x23flrzUW4y7D6OSxY6/IAsCkpPm8Ps 6kig5fax1p2YrbkqHHaaL36YARJ3e1IoLAH8/348FpUD4hhIHciTclQfz7B/sLQkhmqA l8CHbzCJlB6MGepc6+WWHEXkt9Mot0xOgegTKjb96Qbrj6Dgezbgylczc7RFA1mZMOI6 QTH76G/OJg2gQBOI1TY78KCMjdWt++baoKWTwxtKkDj4wWgKoCiWbdFpOAOKF8q+Q239 s4nrEPi/iYRxHy+kl6bP+ufhu2TbBSB8d9C5r+JG8f036Jnl1ne1dahz6hSb9A9DEtQg 0W/g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xtNqUIeopnCvxTcNi3T2GUEEaoZ28Jy+DFjFFFyT8kY=; fh=MK14MAUxcY9nq6V8JePonjtwBcMy/hYxpglE9xqUt2c=; b=s5u2ky/xz1/OuD5MmnPNVws+OUlTAI2FItXn1FuVogowN75Z630WLAJmirrP76SDpi D5hfUvxyVbzctvWj8ltGYENlhqJIkKCiWa4RtYjfr/jitgOA88vsPojfdUmAWK4Yaj+P KK1tdOByMo90EI/7Xw9ea/K4pUk2WUgOf0pJlb8UfiyZKqcOZhYY7OBQL06iIwP3aUy+ cslqGQ1p9+fpHITXimrmthzNyOeZ5jeJS/GRec52SUUelMslvoCBACBJZZHvAI2kcd1j f5KUxU1T2dwVL+F+wMsoNqSoXPFZy4mkWNMlaV6+xYhmmdzO/NekuukPO4VGasoHPb/6 XqYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=nexZY3hB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n17-20020a170902e55100b001b9e8ebe5a0si3898985plf.613.2023.08.19.09.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 09:21:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=nexZY3hB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5BB2210959E; Sat, 19 Aug 2023 01:50:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236290AbjHOJaB (ORCPT + 99 others); Tue, 15 Aug 2023 05:30:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236286AbjHOJ2i (ORCPT ); Tue, 15 Aug 2023 05:28:38 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D5C210E5; Tue, 15 Aug 2023 02:28:06 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3175f17a7baso4351595f8f.0; Tue, 15 Aug 2023 02:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692091685; x=1692696485; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xtNqUIeopnCvxTcNi3T2GUEEaoZ28Jy+DFjFFFyT8kY=; b=nexZY3hBbqKB0Q9QZ6kXTH9joGExdFXSe3KJ7D1JPU19KhorfVL0IogIxT6aHkfat1 F52EeJe0JgDFTiu54XCoRY6By8x24dfKMsBrRibKmwiyi+sdOJ3D7dOgk/kVg3UW2SDj bL5Z2wSM/LK44wlJDYN2+0zhOdDGhokkTvlL5PLLNKZTei2LGuEkRHaikWsrp72lue/J WNDvjO0bsdlezv2khldCa1LOQqZKVQKlXZSOR/3azq+fkPP36Q9e97O8K8cpptkgRGg7 id0gb9OxRzND2yufuugb8WYGBz2fR8nG+J4QoBa0HksvHJiulNCJfEaOl5vP7JsyaHdD BnzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692091685; x=1692696485; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xtNqUIeopnCvxTcNi3T2GUEEaoZ28Jy+DFjFFFyT8kY=; b=hf5fIDCyLS0EwRyTd+fPXEb/Xp3mc0pI7NzaKnk536+Qf+lEXXz9/KDcBbQVeldGQF w5oPPwzN3ncIrCICu2ZSb4hEDvq50OUUMOcdaY1HZJMXE2klHXN1MzCd4lb7N4Iizi7f +bVczHJqmuFQcY/g83PQsyfN7KCzDT15UvRIL6mAFBoLprq/iqYwG139ANQCFxXtFhj2 93lir0G2ehITRs1/tOxyN6n1Y1gGIvilqev26e7Dk8fCsntS4Q2bKQxGd+li9KN1qr6+ Q344IpK4CAp0iFECnyMfqa0O0A8josKf02j132DavStRMKOsN1eAm/j93XubESPCvyaY VXMQ== X-Gm-Message-State: AOJu0YzbEZmfYcctkkiCnYJgNf1Zs60Nfboo6YuDvLVO5KCPExIGTvgC CqXEPIkH2n5l6HyePo7YAhI= X-Received: by 2002:adf:ee11:0:b0:319:6e6a:66e with SMTP id y17-20020adfee11000000b003196e6a066emr6071786wrn.14.1692091684544; Tue, 15 Aug 2023 02:28:04 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id p1-20020adfcc81000000b003179b3fd837sm17230853wrj.33.2023.08.15.02.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 02:28:03 -0700 (PDT) From: Christian Hewitt To: Rob Herring , Krzysztof Kozlowski , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH 3/3] arm64: dts: meson: add audio playback to u200 Date: Tue, 15 Aug 2023 09:27:51 +0000 Message-Id: <20230815092751.1791195-4-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230815092751.1791195-1-christianshewitt@gmail.com> References: <20230815092751.1791195-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774675149260656430 X-GMAIL-MSGID: 1774675149260656430 Add initial support limited to HDMI i2s and SPDIF (LPCM). Signed-off-by: Christian Hewitt --- .../boot/dts/amlogic/meson-g12a-u200.dts | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts index 4b5d11e56364..2878e3ad7de2 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts @@ -8,6 +8,7 @@ #include "meson-g12a.dtsi" #include #include +#include / { compatible = "amlogic,u200", "amlogic,g12a"; @@ -18,6 +19,13 @@ aliases { ethernet0 = ðmac; }; + spdif_dit: audio-codec-1 { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + status = "okay"; + sound-name-prefix = "DIT"; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -147,6 +155,89 @@ vddcpu: regulator-vddcpu { regulator-boot-on; regulator-always-on; }; + + sound { + compatible = "amlogic,axg-sound-card"; + model = "U200"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", + "TDMOUT_B IN 2", "FRDDR_C OUT 1", + "TDM_B Playback", "TDMOUT_B OUT", + "SPDIFOUT IN 0", "FRDDR_A OUT 3", + "SPDIFOUT IN 1", "FRDDR_B OUT 3", + "SPDIFOUT IN 2", "FRDDR_C OUT 3"; + + assigned-clocks = <&clkc CLKID_MPLL2>, + <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + + dai-link-0 { + sound-dai = <&frddr_a>; + }; + + dai-link-1 { + sound-dai = <&frddr_b>; + }; + + dai-link-2 { + sound-dai = <&frddr_c>; + }; + + /* 8ch hdmi interface */ + dai-link-3 { + sound-dai = <&tdmif_b>; + dai-format = "i2s"; + dai-tdm-slot-tx-mask-0 = <1 1>; + dai-tdm-slot-tx-mask-1 = <1 1>; + dai-tdm-slot-tx-mask-2 = <1 1>; + dai-tdm-slot-tx-mask-3 = <1 1>; + mclk-fs = <256>; + + codec { + sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; + }; + }; + + /* spdif hdmi or toslink interface */ + dai-link-4 { + sound-dai = <&spdifout>; + + codec-0 { + sound-dai = <&spdif_dit>; + }; + + codec-1 { + sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>; + }; + }; + + /* spdif hdmi interface */ + dai-link-5 { + sound-dai = <&spdifout_b>; + + codec { + sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>; + }; + }; + + /* hdmi glue */ + dai-link-6 { + sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; + + codec { + sound-dai = <&hdmi_tx>; + }; + }; + }; +}; + +&arb { + status = "okay"; }; &cec_AO { @@ -163,6 +254,10 @@ &cecb_AO { hdmi-phandle = <&hdmi_tx>; }; +&clkc_audio { + status = "okay"; +}; + &cpu0 { cpu-supply = <&vddcpu>; operating-points-v2 = <&cpu_opp_table>; @@ -203,6 +298,18 @@ ðmac { phy-mode = "rmii"; }; +&frddr_a { + status = "okay"; +}; + +&frddr_b { + status = "okay"; +}; + +&frddr_c { + status = "okay"; +}; + &hdmi_tx { status = "okay"; pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; @@ -288,6 +395,28 @@ &sd_emmc_c { vqmmc-supply = <&flash_1v8>; }; +&spdifout { + pinctrl-0 = <&spdif_out_h_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&spdifout_b { + status = "okay"; +}; + +&tdmif_b { + status = "okay"; +}; + +&tdmout_b { + status = "okay"; +}; + +&tohdmitx { + status = "okay"; +}; + &uart_AO { status = "okay"; pinctrl-0 = <&uart_ao_a_pins>;