From patchwork Wed Aug 1 13:40:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10552345 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 49F1215E9 for ; Wed, 1 Aug 2018 13:41:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38E9C2B44E for ; Wed, 1 Aug 2018 13:41:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CF532B4AC; Wed, 1 Aug 2018 13:41:51 +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 BDABA2B44E for ; Wed, 1 Aug 2018 13:41:50 +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=O2LPGIsVlwE5eRDfd388cQmhTuTKKufij6BiDWMvPU0=; b=curLp/mQhDOXWQLxnaXgiwej0i ZcVgB70kkElE/hETMae8huX/pCniepQhuxvOBTw535J/Wf/rTRLeG/L0mzmp6SVma2szWlGRVrK0n leXXSMmG9hnyPH0MvF8EqPLwYiwwLzifKg2iYy2DsnaOdFSumFAY+G9TkT5GqgFL8OvvjqbISlftj JERUcmdXOx9AIxuiI3p+QuQG7ueTi8fz8qGcO7FDhDxDBwdaNv50LvQatUC7S8Bn7NC7MeLcovDiq BoscL+xKqhSffK8BqX1eERZuwV/WdmspDOOCvJJHIQ3gxooQm5CLqRvqwliz2B8uOB3zNHtgecG4a RjxJal2A==; 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 1fkrNo-0001L6-PT; Wed, 01 Aug 2018 13:41:44 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkrNC-0000Qt-17 for linux-arm-kernel@lists.infradead.org; Wed, 01 Aug 2018 13:41:08 +0000 Received: by mail-wm0-x243.google.com with SMTP id r24-v6so13859154wmh.0 for ; Wed, 01 Aug 2018 06:40:56 -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=UYEBmVAVpj2krPvDto31OgUp5hzgNQb2z8iA1oiV9yE=; b=gYMD+bDEmM6kCggp0w+/7IgreRUpyMDbHWOVyg1zGC6+Sne/SC7BQ29HS3wnd+a+K4 EXpLz25q9Jt5ZZkuKoMIWeBw4gyHEKXZ9k45t2dFSHJ7XH+RcGYsRhLSN5/WlM7bSdr+ KwvY/xN79gzr3tjU4lfHw0TjREuzCJJbPvTGC0A9PUynwkvQmoiKBSbmvs8mcWtnrL8W LZWOdoNkuNgUuabtIaoCjoWIwh5rr4+e4dbwqz4v/hqtJe5S4vZplySKFYMl9WYMo1Qz bVE/WLTNtSJ9s5jddy7FuIFtmMejXTyTEQhUKtjX9t7GSPuEdAcG0sR5seyI4fzpxESH 513Q== 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=UYEBmVAVpj2krPvDto31OgUp5hzgNQb2z8iA1oiV9yE=; b=Tu1ln44/99l/G9kaGPd11ZgH/CnYP7xYFttgOw5XqZ0gG8C7bbcBcKdniM1Nioju9f KGt1zsDPhqUMHkhK02FMNq3oSTnTiWe5AsBuql2cV1V63tX+xTxPDH6V2u/RAN2TiAA+ LTreU14EVNdSBzgpwHmOe6mnogFBuWVFaLjxxWAMubdwiZ4Y5D3bNSKbQrXdLqpuekIh rxrHWW9l0Q+tuwkLGc2DtKkr6NBll81aCKmZ3plVO2Bwj70meRGgE/QCdnmUlxCnd49/ uSurrRQvZ3fMn7bhf2fFCovLFW5Lat9W6RtLa8RsfCY+UANvYNQoR+ETGHegp9qqokJV nPgg== X-Gm-Message-State: AOUpUlHp95+4PUKfxO2mpAFUxwPnpu4zFmpfiR8+yQU+lbaI2doD1k/H Nq7gpYYOpZYaq4moGlgAxTc/8A== X-Google-Smtp-Source: AAOMgpeEgT1tgCq/krNltf8ExF1ziiL3vrChVo4t1P0+/Tz0/e6thEsdhh5gmGPPLUCaNQev6v/mNg== X-Received: by 2002:a1c:13ca:: with SMTP id 193-v6mr2712344wmt.127.1533130855505; Wed, 01 Aug 2018 06:40:55 -0700 (PDT) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id f8-v6sm24347080wrj.9.2018.08.01.06.40.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Aug 2018 06:40:54 -0700 (PDT) From: Jerome Brunet To: Kevin Hilman , Carlo Caione Subject: [PATCH v2 3/3] arm64: dts: meson-axg: s400: add sound card Date: Wed, 1 Aug 2018 15:40:33 +0200 Message-Id: <20180801134033.21739-4-jbrunet@baylibre.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180801134033.21739-1-jbrunet@baylibre.com> References: <20180801134033.21739-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180801_064106_076500_AA4879B5 X-CRM114-Status: GOOD ( 12.06 ) 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 --- .../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..d399078d1f0c 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"; + model = "AXG-S400"; + audio-aux-devs = <&tdmin_a>, <&tdmin_b>, <&tdmin_c>, + <&tdmin_lb>, <&tdmout_c>; + audio-widgets = "Line", "Lineout", + "Line", "Linein", + "Speaker", "Speaker1 Left", + "Speaker", "Speaker1 Right"; + audio-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"; + + dai-link@0 { + sound-dai = <&frddr_a>; + }; + + dai-link@1 { + sound-dai = <&frddr_b>; + }; + + dai-link@2 { + sound-dai = <&frddr_c>; + }; + + dai-link@3 { + sound-dai = <&toddr_a>; + }; + + dai-link@4 { + sound-dai = <&toddr_b>; + }; + + dai-link@5 { + sound-dai = <&toddr_c>; + }; + + 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>; + }; + + }; + + 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"; }; };