From patchwork Sun Jul 19 02:45:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 11672133 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 A6E821510 for ; Sun, 19 Jul 2020 02:47:55 +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 7FB8720738 for ; Sun, 19 Jul 2020 02:47:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IfCvTIug"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LyELbglL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FB8720738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To: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:List-Owner; bh=TQ/RpzuOrkarx0EQ9c7u85cQNwzN+IlUESc2zRT1BEI=; b=IfCvTIug10rqpgbAbtFQw0eMqy 6m38++71a2+t7k9lHUJYTrbdJKE3C3+Xl0RPUWVN3nZROrmUYazgDWVobzPUBvakyGbQixbORMy+k Cf6w+Ncq3YYzgUjetRKG4BK8g4Thmk7yYs50GPep6zMjDkxHNDaGj+fmbJmVuu9m1EErVufoXpexk sEcgOjjXqkZK+lgC/4dm0JGWEnSvwqnqVSdre8iUb5G9h+3teLvFo/Oh5zgmcsy/5KNyUJ3wXrcWQ sK+lDM0LN1VKeHXKRAEfeMXC16LPaLS6vrln9zW3iZjQ2IWiOiRiHRGmcZcEDrgKmSNr5rJ3w+h5p Y3iXZxgw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwzL0-000394-Ac; Sun, 19 Jul 2020 02:46:02 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwzKu-00037D-4B; Sun, 19 Jul 2020 02:45:58 +0000 Received: by mail-wr1-x442.google.com with SMTP id f18so14694415wrs.0; Sat, 18 Jul 2020 19:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=a0raR8kuawAw4Zwd1EY7iQ1XE5SS8HIOS1kFKtesceU=; b=LyELbglLP8QhhXUc6DClCstA2/Gl4Fw2P+jtTbqaZKiEZBK2V/sBjXTjXgqqmDw2S0 7iX9qAjlBro9G3o6MV3gWDPj2WEvXyoPPIlpHH0SKZl9cNvZpxqbtjM8ao9+lt77Cszy 2VbVwsIyhu96SgQaaIyzUCCXoo+VFdlztCNYJOTNgNppApub2UqTRARsJwavqz7ridkx 7T/OdlGwO6RZfRhJ1uQDrN/szSdbsTcANu5pp7JyVadRXgAyv7y4FhMpXWdUot7HgYWh /WMrZNce6YG6XRl++1HsnQrd6IDmvA5W+MyVYEFE+yJ1+1LgGD77aJCgMChSN3mJtzPK CDfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=a0raR8kuawAw4Zwd1EY7iQ1XE5SS8HIOS1kFKtesceU=; b=i+Y8v+ueUrl/7cj5ba40l/axrsdiNuZOi510qDg1QdLsp+ZQ1YrhM0CXfGPFauy51K rNcsbYNgMq+Nvf5n1FG9/cyKZH6K7F2uIGsAubLBu82YhsjvKDqgaeu0eB3oEHFqZNQq Gr+DOlHLMScN8DMVUND7kRfih2M+NYgn7458iS/sKYSrot764hqhjhnjNoQ1N/Dtbm4/ 1NBNNEd2lb37lcXbeibGtMDLsWmvPauo6vMA3KcNboq3/83iVcSj0sLZ3hQ/L4oz8sge qMZ8VMhNVwxG31sJybWLpXdA7Kd43Bj0LsFhpy3fRop6bU8Hzucf74BW+QaSecQRUdP2 ZReA== X-Gm-Message-State: AOAM533M6CxXqUjg6wqKKi5yUT2fBRjPhrkyC/6eo62ty04Up7n/vjvR ekGmxhAEzUiigXzuxdePITU= X-Google-Smtp-Source: ABdhPJyEGk/A6JStVM7UM5LerwPOyjrqVVF/olwEii2vfNdRomVwi2MB5UhM1cUhy6QYIirt0TAaLw== X-Received: by 2002:adf:ab46:: with SMTP id r6mr16648219wrc.260.1595126755054; Sat, 18 Jul 2020 19:45:55 -0700 (PDT) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id e5sm5176242wrc.37.2020.07.18.19.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 19:45:54 -0700 (PDT) From: Christian Hewitt To: Rob Herring , Mark Rutland , Kevin Hilman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] arm64: dts: meson: add audio playback to odroid-c4 Date: Sun, 19 Jul 2020 02:45:46 +0000 Message-Id: <20200719024548.8940-2-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200719024548.8940-1-christianshewitt@gmail.com> References: <20200719024548.8940-1-christianshewitt@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200718_224557_071483_293F5F8A X-CRM114-Status: GOOD ( 12.73 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:442 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [christianshewitt[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 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: Christian Hewitt MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add initial audio support limited to HDMI i2s. Signed-off-by: Christian Hewitt --- .../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts index 00d90b30f8b4..cf5a98f0e47c 100644 --- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts @@ -8,6 +8,7 @@ #include "meson-sm1.dtsi" #include #include +#include / { compatible = "hardkernel,odroid-c4", "amlogic,sm1"; @@ -186,6 +187,69 @@ }; }; }; + + sound { + compatible = "amlogic,axg-sound-card"; + model = "SM1-ODROID-C4"; + 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"; + + assigned-clocks = <&clkc CLKID_MPLL2>, + <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + status = "okay"; + + 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>; + }; + }; + + /* hdmi glue */ + dai-link-4 { + sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; + + codec { + sound-dai = <&hdmi_tx>; + }; + }; + }; +}; + +&arb { + status = "okay"; +}; + +&clkc_audio { + status = "okay"; }; &cpu0 { @@ -237,6 +301,18 @@ amlogic,tx-delay-ns = <2>; }; +&frddr_a { + status = "okay"; +}; + +&frddr_b { + status = "okay"; +}; + +&frddr_c { + status = "okay"; +}; + &gpio { gpio-line-names = /* GPIOZ */ @@ -381,6 +457,18 @@ vqmmc-supply = <&flash_1v8>; }; +&tdmif_b { + status = "okay"; +}; + +&tdmout_b { + status = "okay"; +}; + +&tohdmitx { + status = "okay"; +}; + &uart_AO { status = "okay"; pinctrl-0 = <&uart_ao_a_pins>; From patchwork Sun Jul 19 02:45:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 11672129 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 47800161F for ; Sun, 19 Jul 2020 02:47:50 +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 2022320738 for ; Sun, 19 Jul 2020 02:47:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="y6G9mGqN"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GB/p6r90" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2022320738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To: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:List-Owner; bh=XlotDmZ4krdIX0kKkL2q5S3gYo3sGt7GwO7fYE+Jp+4=; b=y6G9mGqNB0n/fmAlKABIv+RVK2 y1I8maBDtmP/HvShbeKJjl/UC6Sxo0zQ84silDkncoWC0/NpORJAWIE7/g4vapLO1BjkKVTNznmUZ U4pZPC4OGkLO82HbaDQZLoSa6J8/+P9X7BdZPXt6Qw6ow5yNGNLfB76wIXqG+gLiyIue8rHELBshL 1YzlzT5uL9u1Cj9/3ZZq3wKC0xefiEDVLNQNEWPmR39ko+FXyDeqZq4QfOdDuS1g7QZFW6Mnp4zZn ILNutoiFiUk65bcWtuKqw5avO4IxpQ39g5ZJrf2O8QU1Cah9l3qMHL7DtYMw6iZTUCHFTiLpv/2c0 4KHDeTZQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwzL7-0003AD-JI; Sun, 19 Jul 2020 02:46:09 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwzKw-00037k-Fk; Sun, 19 Jul 2020 02:45:59 +0000 Received: by mail-wr1-x441.google.com with SMTP id z2so14686199wrp.2; Sat, 18 Jul 2020 19:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=keAVpGfsQcEDqnbHUMyN/ynnpJsp1LvUpjA6RoHC1Co=; b=GB/p6r90sAJgHXEEV7QpiFlvwmXSlJw0OtYyzSJPZyId1OjKBkqkcuPl3AbyVGLoyW EXsP2Tk+VC/iF9bMG2rZUpYN/90XpHhDelJwE+sM4i+zGpnQwP9SqpiOZuphXNHoXOAP OQS5VY1Kvw6xCaeGBFWPzBN0v3cONA30DLx14y5qkQOuCTnMvTrYwv9F7mjm952WDLUX kfXCm+7xaIzHVJO8t3lI2vnn+PwkZGxCGSWAasQvvo8gtd7ToEY3OPvVSAT+zPPNUsXw O+yrRHVsAUKFBvz0ExVv56wEHfOiJ6KMyL51vkfonxXqC35hMdghD91eO8N0xB0/sE/S oYMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=keAVpGfsQcEDqnbHUMyN/ynnpJsp1LvUpjA6RoHC1Co=; b=ksTEmnhcMxTy/bgW+67DNPHx23vEA0nN+flYvDR0U0POEF/HdmPtX1VO/H61JIH8kF Hg9B5HZs5DdcwbW6JYLonrwYzu9DyrvU/MTeZDc95tQJRku8UP8A6fS9DMJ1QN2yGqVb 6I5EO/W11dW5/pGQkFTTNoHDp4BsFWrwPOAK5Suvf5L/96f4vhxpJ3Vpc48L7qc5kp+P wNepmHQJkFVwXf3Po0ZwAzQfPPhpRU5emX3lOOIxn+j2gPRGIBB9Gm5Ezp45OrfeUjvV c4ke29E9F6z0v64m+HtNz/mbr8SssYC71VydhIh04NsnO6cVfVd4QH+lORLeu3eh8zzG 1fDg== X-Gm-Message-State: AOAM530tk1X1g7Rg0aI/Za0W7wUrWQawYHaZP/RIwJRKBOl6tMVVq9Kv hsuVKiD6YSyeIR8O4VMBEXrOrSO8 X-Google-Smtp-Source: ABdhPJyaMEwSnwK/6OKFvL9g3D3y1T1zk4zp3fsUqT9d20r+5NvIMPQk1HfZLkXziE0Qtwmm/ttVdw== X-Received: by 2002:a5d:5647:: with SMTP id j7mr16036425wrw.242.1595126757149; Sat, 18 Jul 2020 19:45:57 -0700 (PDT) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id e5sm5176242wrc.37.2020.07.18.19.45.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 19:45:56 -0700 (PDT) From: Christian Hewitt To: Rob Herring , Mark Rutland , Kevin Hilman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] arm64: dts: meson: add audio playback to khadas-vim3l Date: Sun, 19 Jul 2020 02:45:47 +0000 Message-Id: <20200719024548.8940-3-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200719024548.8940-1-christianshewitt@gmail.com> References: <20200719024548.8940-1-christianshewitt@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200718_224558_627187_809A39DF X-CRM114-Status: GOOD ( 12.76 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [christianshewitt[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 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: Christian Hewitt MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add initial audio support limited to HDMI i2s, copying the config from the existing VIM3 device-tree. Signed-off-by: Christian Hewitt --- .../dts/amlogic/meson-sm1-khadas-vim3l.dts | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts index dbbf29a0dbf6..b104967dbef1 100644 --- a/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts @@ -8,6 +8,7 @@ #include "meson-sm1.dtsi" #include "meson-khadas-vim3.dtsi" +#include / { compatible = "khadas,vim3l", "amlogic,sm1"; @@ -31,6 +32,69 @@ regulator-boot-on; regulator-always-on; }; + + sound { + compatible = "amlogic,axg-sound-card"; + model = "SM1-KHADAS-VIM3L"; + audio-aux-devs = <&tdmout_a>; + audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0", + "TDMOUT_A IN 1", "FRDDR_B OUT 0", + "TDMOUT_A IN 2", "FRDDR_C OUT 0", + "TDM_A Playback", "TDMOUT_A OUT"; + + assigned-clocks = <&clkc CLKID_MPLL2>, + <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + status = "okay"; + + 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_a>; + 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_A>; + }; + }; + + /* hdmi glue */ + dai-link-4 { + sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; + + codec { + sound-dai = <&hdmi_tx>; + }; + }; + }; +}; + +&arb { + status = "okay"; +}; + +&clkc_audio { + status = "okay"; }; &cpu0 { @@ -61,6 +125,18 @@ clock-latency = <50000>; }; +&frddr_a { + status = "okay"; +}; + +&frddr_b { + status = "okay"; +}; + +&frddr_c { + status = "okay"; +}; + &pwm_AO_cd { pinctrl-0 = <&pwm_ao_d_e_pins>; pinctrl-names = "default"; @@ -93,3 +169,15 @@ phy-names = "usb2-phy0", "usb2-phy1"; }; */ + +&tdmif_a { + status = "okay"; +}; + +&tdmout_a { + status = "okay"; +}; + +&tohdmitx { + status = "okay"; +}; From patchwork Sun Jul 19 02:45:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 11672127 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 3E6461510 for ; Sun, 19 Jul 2020 02:47:49 +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 15F4020738 for ; Sun, 19 Jul 2020 02:47:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OVcVQAUl"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OBkm5yZB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15F4020738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To: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:List-Owner; bh=y8UB+Zq4uhHaNEEnXXTWyoWibQ+faDTSmQakwN76Opo=; b=OVcVQAUlguntfF0hK+HyNzsRG6 nnkr/3dTltjS07irgMP3WPUjmG06IRipuWCboOf8elp9/NfvGazKjk8VGMyY93n2ltMRi8IN+7nLO SR+bMMBvksmZ149xLUoVNeCBGty/jfIFl4rPv6Tak86NNxQnnKAqIrREvcCXJaEaqY/m4hjbYGDD9 cTGgb14rMUtLhzQW1XJcqI5it6pcfZSXAgZprVPwlBk33/9QV/PKYfYudn6iPGZ72pNjN/UwUT3JD +b5x1QJhhjaVNXAF8+S4a5GKCrxsfs9CpTz8H/hqpyJZdScwKaOzpxX6jabPVwaeN/doWqooMW5Ak 9Bi4y+sw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwzLF-0003CE-M0; Sun, 19 Jul 2020 02:46:17 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwzKy-00038Y-4r; Sun, 19 Jul 2020 02:46:01 +0000 Received: by mail-wm1-x341.google.com with SMTP id l2so21975813wmf.0; Sat, 18 Jul 2020 19:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aDlMbyjXbF67HGTAUvI4dBM3JFAclGFOXiFtjc3PP5g=; b=OBkm5yZBxqZNX3JWP/0xtIJqilNQ+sQ2OdaYW+DSf3sWEl0Z7wRdxDy7MnGyTaECup yrHW041kNMOsICMTd1OcBvFNlW7L8osiYeRd3DTObPZE2Yl7tVYa9+FQKwT6BrMxVGxZ tcKiPwtGFIHZmTyhvgZIoUqRUHTbV2cEgEMfP+u1oyzCHvI+wWbL+FlOe++xqZibPMnX OooeApTErxNeJ3o5jrlxIs8vi/rlRkONnu+IN/gTBe4uWXD12SMF+3A9w/LKTk7dbqcQ 3GJaJdlbE31wcBclN3C2e9JLsGmSOMzf+qKmxjldli7bxG/NDeXCJKLuMH5cWXyx1tVl S9CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aDlMbyjXbF67HGTAUvI4dBM3JFAclGFOXiFtjc3PP5g=; b=TtmQG3V3pTjW7o5gTIT9wCK0zECYZU47tTdJmdzIPjYFOgmZ2xbw1y7IxW4/CD5BJ7 jONmy4qMTiMXEIfrHICZDHLEhH24nTaEs6W8tq0ZkwcRoMUskWNtbhXktA2uJF9wBjg/ EYpU6RNfHMdXjVXzq4DLxD3EmRebyyPDUCKW4f8DAppVVd73/KClSrOT7o53fBSsDztg X2DYdIlppHJw8HoMzyTwKT7wkbOvtAXLFHpJesPWCMt90e24ct2kvLEpbPw4x0YuehGE D1TGrRdXgWnDQnNSH218icah3VftYSemKqQKa9fSo4o6a4jd4lZcmPpFDX0SU5pIkb4g fyPQ== X-Gm-Message-State: AOAM533tFG+FwvExKephdpfo4R0/Jfrt6hqsOzpL/SNEIuyIOWzjoRds zHZPtFN2cz0Pgwgcc5/kjvI= X-Google-Smtp-Source: ABdhPJyYLXrdLbPXFHWT/nFJ2Ld9X7eWl9Ks4YZeNZaMwCthZKPlmXCGnUBHku/1InWBePW4oDCUTg== X-Received: by 2002:a1c:7402:: with SMTP id p2mr15953197wmc.117.1595126759292; Sat, 18 Jul 2020 19:45:59 -0700 (PDT) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id e5sm5176242wrc.37.2020.07.18.19.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 19:45:58 -0700 (PDT) From: Christian Hewitt To: Rob Herring , Mark Rutland , Kevin Hilman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] arm64: dts: meson: add audio playback to u200 Date: Sun, 19 Jul 2020 02:45:48 +0000 Message-Id: <20200719024548.8940-4-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200719024548.8940-1-christianshewitt@gmail.com> References: <20200719024548.8940-1-christianshewitt@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200718_224600_327297_2A013E3E X-CRM114-Status: GOOD ( 12.70 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:341 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [christianshewitt[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 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: Christian Hewitt MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add initial support limited to HDMI i2s and S/PDIF (LPCM). Signed-off-by: Christian Hewitt --- .../boot/dts/amlogic/meson-g12a-u200.dts | 131 ++++++++++++++++++ 1 file changed, 131 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts index a26bfe72550f..dde7e258a184 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 @@ 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,91 @@ regulator-boot-on; regulator-always-on; }; + + + sound { + compatible = "amlogic,axg-sound-card"; + model = "G12A-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>; + status = "okay"; + + 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 +256,10 @@ hdmi-phandle = <&hdmi_tx>; }; +&clkc_audio { + status = "okay"; +}; + &cpu0 { cpu-supply = <&vddcpu>; operating-points-v2 = <&cpu_opp_table>; @@ -203,6 +300,18 @@ 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 +397,28 @@ 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>;