From patchwork Tue Jul 24 12:52:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10542121 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3EB9690E3 for ; Tue, 24 Jul 2018 12:55:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D10E287FF for ; Tue, 24 Jul 2018 12:55:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21343287CE; Tue, 24 Jul 2018 12:55:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A9D3C287C5 for ; Tue, 24 Jul 2018 12:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.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=qzFjP//tYSPlOhF97BW+bsq05az3p02Gf5R4DvIZKgo=; b=twBTq8LV15fT/7CfoPnvnlOLOt ADOuao0Dzb9FSbqibgYCfBttfVcNJXJFuN24ybqn1VP3E54p3MeI24Crhu6DbF60sX1+NdnVlVTg/ uBHHHN6kQyYX495c8VMeqN23u87E2VwP/9rjQgKWsk5dGgH9CNTMNSvRc5RlXnVBQaVUaUgtukW+V CfnySammfXifbBOfWQavQ61eMVzGQrhOoQ+2c5ya1bdXSRPIijmHEoQBfGeNKFpMVRBNN2oF5Ow7L P4DV+yVqWdctUrNnYzVdIq9NI220I2jYTGn7S/Yan+igcPvk9HrTvReg0OBQz1r1tMJjKhFtinkVw 1WGP7omw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhwqr-0008Je-SC; Tue, 24 Jul 2018 12:55:41 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhwoW-0005LM-Ul for linux-arm-kernel@lists.infradead.org; Tue, 24 Jul 2018 12:53:21 +0000 Received: by mail-wm0-x242.google.com with SMTP id y2-v6so1806277wma.1 for ; Tue, 24 Jul 2018 05:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=njyBULs9PWdQsY4lJgbDOmtKYIvdlYmmdmZvKuVltz0=; b=fuH8dCAK5dL4DEvbRZ5B/31dsANpfszp+xtD4biMJrnlEEZRSJu9nU4xbWWZtqV9NC mDAFkg/bJhouqSWOxlozENSPswvaTA/r/gxfbKs1mdPXpQhhmarI/NkbkxaGHolFXgou YCUM0NiiVPQZLokGV9n6xv69Rzsq1REHNjlogOCb/E1Yn4x6+dAcv43WpjzU69QUHv7M gFYohocDFGz0QPj0jJN3Rpy6PmdCRHgPB642R8GeOYw0XmZVACAGV/Oz6TAxUMG6cx0H jUolWLUC1FYSgfACdfZuH3Af59TKgVBzL+xbBuOqJp17wfcKbtr6b4O/N/6/J6JvgdFI golg== 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=njyBULs9PWdQsY4lJgbDOmtKYIvdlYmmdmZvKuVltz0=; b=IOO7+C07Qe75gNU4JXc5a1IKDWE6YU/9x5IxZz7Zkr3irFLUH3Ty/TcRKhVV8IDIhP BirFmAuNjpGqzU9r+CvnLSwE2r8fBYLvUsJUyq7VajnRkv5o/aWhM9bD9JYoTY0zc7o/ fVaxDga3qw9vOcuGPJxP6lSKLQ+N8JTvLNNjMbmT0GMIlB1PUpGHrYpz4OZFZh+IJ9cY vs+E18oBPHmKLxsbx1lSI6rslu2qaxMCBElJPveODgzCsfuwxIhqgAj1WpXTZOm9Sy69 UjcW2hELhHnOzQAYX1sW/MctK61Zont0efeAkH6Y+cUSxHmrsdspt2GNQfxgTYs88VQR 6KIQ== X-Gm-Message-State: AOUpUlGF5oPy9owgzCIQH7/BssDKGwvqINlAhOaSCFcN9qKLjm+mfSrA fSoymvyoppsHkr4oSQIC8xr2TA== X-Google-Smtp-Source: AAOMgpc+v8Ky9ij1yBrHiITaTzlGJQSHFky+JAwFsVsDNKEUtrqSYcz5aGeQOnuqtV2/G35OX/vWag== X-Received: by 2002:a1c:1802:: with SMTP id 2-v6mr1824985wmy.81.1532436786436; Tue, 24 Jul 2018 05:53:06 -0700 (PDT) Received: from boomer.lan (cag06-3-82-243-161-21.fbx.proxad.net. [82.243.161.21]) by smtp.googlemail.com with ESMTPSA id e7-v6sm20834235wrm.14.2018.07.24.05.53.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Jul 2018 05:53:05 -0700 (PDT) From: Jerome Brunet To: Kevin Hilman , Carlo Caione Subject: [PATCH 14/14] arm64: dts: meson-axg: add s400 sound card Date: Tue, 24 Jul 2018 14:52:38 +0200 Message-Id: <20180724125238.14567-15-jbrunet@baylibre.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180724125238.14567-1-jbrunet@baylibre.com> References: <20180724125238.14567-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180724_055317_540114_94514997 X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add the sound card of the s400. With it the following interface should be working: * Lineout * Daugther card speaker 1 (same output as lineout) * Linein * SPDIF output Signed-off-by: Jerome Brunet --- Compared to what is actually available on the platform, the following is not provided ATM: * SPDIF input: WIP. * PDM DMICs: WIP. * TDM A - BT Codec: missing BT codec. * TDM B - Speaker analog loopback: missing tlv320adc codec. .../arm64/boot/dts/amlogic/meson-axg-s400.dts | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts index 9f5d81c3ee29..1b89c2cc5414 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts @@ -204,6 +204,113 @@ status = "okay"; sound-name-prefix = "DIT"; }; + + sound { + compatible = "amlogic,axg-sound-card"; + amlogic,name = "AXG-S400"; + amlogic,aux-devs = <&tdmin_a>, <&tdmin_b>, <&tdmin_c>, + <&tdmin_lb>, <&tdmout_c>; + amlogic,widgets = "Line", "Lineout", + "Line", "Linein", + "Speaker", "Speaker1 Left", + "Speaker", "Speaker1 Right"; + amlogic,routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2", + "SPDIFOUT IN 0", "FRDDR_A OUT 3", + "TDMOUT_C IN 1", "FRDDR_B OUT 2", + "SPDIFOUT IN 1", "FRDDR_B OUT 3", + "TDMOUT_C IN 2", "FRDDR_C OUT 2", + "SPDIFOUT IN 2", "FRDDR_C OUT 3", + "TDM_C Playback", "TDMOUT_C OUT", + "TDMIN_A IN 2", "TDM_C Capture", + "TDMIN_A IN 5", "TDM_C Loopback", + "TDMIN_B IN 2", "TDM_C Capture", + "TDMIN_B IN 5", "TDM_C Loopback", + "TDMIN_C IN 2", "TDM_C Capture", + "TDMIN_C IN 5", "TDM_C Loopback", + "TDMIN_LB IN 2", "TDM_C Loopback", + "TDMIN_LB IN 5", "TDM_C Capture", + "TODDR_A IN 0", "TDMIN_A OUT", + "TODDR_B IN 0", "TDMIN_A OUT", + "TODDR_C IN 0", "TDMIN_A OUT", + "TODDR_A IN 1", "TDMIN_B OUT", + "TODDR_B IN 1", "TDMIN_B OUT", + "TODDR_C IN 1", "TDMIN_B OUT", + "TODDR_A IN 2", "TDMIN_C OUT", + "TODDR_B IN 2", "TDMIN_C OUT", + "TODDR_C IN 2", "TDMIN_C OUT", + "TODDR_A IN 6", "TDMIN_LB OUT", + "TODDR_B IN 6", "TDMIN_LB OUT", + "TODDR_C IN 6", "TDMIN_LB OUT", + "Lineout", "Lineout AOUTL", + "Lineout", "Lineout AOUTR", + "Speaker1 Left", "SPK1 OUT_A", + "Speaker1 Left", "SPK1 OUT_B", + "Speaker1 Right", "SPK1 OUT_C", + "Speaker1 Right", "SPK1 OUT_D", + "Linein AINL", "Linein", + "Linein AINR", "Linein"; + assigned-clocks = <&clkc CLKID_HIFI_PLL>, + <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <589824000>, + <270950400>, + <393216000>; + status = "okay"; + + amlogic,dai-link@0 { + sound-dai = <&frddr_a>; + }; + + amlogic,dai-link@1 { + sound-dai = <&frddr_b>; + }; + + amlogic,dai-link@2 { + sound-dai = <&frddr_c>; + }; + + amlogic,dai-link@3 { + sound-dai = <&toddr_a>; + }; + + amlogic,dai-link@4 { + sound-dai = <&toddr_b>; + }; + + amlogic,dai-link@5 { + sound-dai = <&toddr_c>; + }; + + amlogic,dai-link@6 { + sound-dai = <&tdmif_c>; + dai-format = "i2s"; + dai-tdm-slot-tx-mask-2 = <1 1>; + dai-tdm-slot-rx-mask-1 = <1 1>; + mclk-fs = <256>; + + codec@0 { + sound-dai = <&lineout>; + }; + + codec@1 { + sound-dai = <&speaker_amp1>; + }; + + codec@2 { + sound-dai = <&linein>; + }; + + }; + + amlogic,dai-link@7 { + sound-dai = <&spdifout>; + + codec { + sound-dai = <&spdif_dit>; + }; + }; + }; }; ðmac { @@ -272,6 +379,7 @@ PVDD_B-supply = <&main_12v>; PVDD_C-supply = <&main_12v>; PVDD_D-supply = <&main_12v>; + sound-name-prefix = "SPK1"; }; };