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: 13353696 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 0315DC001E0 for ; Tue, 15 Aug 2023 09:28:47 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PABf6uY30HwBjklhcqS1RlWOa/QTOeMkupp0jI3KwDA=; b=QLAOs3VMLombzw 9oibn1fHAb+UtqqQEVZvHBs1u7qxwfSthHgoTVtjz9SGZ7XrAetgMvpdXgfE5lWfLxc8FohAZB52P O74r0CNqnEstef9Pzkc75HGQpp06OufFkY6LXtNwj1jEWItQr0af73Qs6HX2PncnGabtI10osgtnC aM89hl1z5qnLH/27ZGc1o56UiTXLexcCD8i5RayiggtmvS+IV3povVxCKU98Na1vrBHmox0MZ+DYW XdQKZcuK4WO+seTEPpeVpEfUqd0RU0iuFy8qaN9m6gmXCRq46gogH/qdyq7LCvST5MzCw7A2uPMei eS+v8G/BRc5GBMiN8zug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVqLb-001Cyy-2G; Tue, 15 Aug 2023 09:28:19 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVqLQ-001CuT-1M; Tue, 15 Aug 2023 09:28:09 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3197b461bb5so1260583f8f.3; Tue, 15 Aug 2023 02:28:05 -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=dZMuLYHailxXCnVK772geW/8W7pYlQfQyVQ6XDqtDAQ7Yelp8DVZyLjsaBxJDGWYqZ 4A/xhL73E/orBxdn4WCMB/W8z7JyTgrsG4vrIUn02gX+S0K96FUIF+ET+RHI+/urTJ4y qv+eNIEA3SpwOo9Hi3FHv/wwCPlDRxWvvduvRujJ7qM8h6VDEJVanlrVPnFgSECSMJyU w00BoGMzQ/6688D4Y48Nyk0PnNy0DcVrmXtgHELGqFpi5Yw3soL3WyEWpbyNBf0w4RaI OMYNunEK85rqEeTCNPb5WcYlbrE92i+AmdaBxna3wXzYsotzwOMDxeINaVrO0mqRU37r V/aA== X-Gm-Message-State: AOJu0YxJyW/Ut5X9/XrZcAUVclODD86gnwW9u8PN/OoOJJk61LioSSA3 s8rhlp+nFb8jmD1d9v57Unw= X-Google-Smtp-Source: AGHT+IGgJ1hXfXH8IdLfVcudHzzrTaQA/LZPdPXhWhwFfOnj9AXnrEffCEAUM0KBjbQKJ3lmT9K8mw== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230815_022808_465258_964457D7 X-CRM114-Status: GOOD ( 11.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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>;