From patchwork Fri Jan 13 02:04:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13099654 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 398C3C63797 for ; Fri, 13 Jan 2023 02:04:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231400AbjAMCEP (ORCPT ); Thu, 12 Jan 2023 21:04:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230443AbjAMCEO (ORCPT ); Thu, 12 Jan 2023 21:04:14 -0500 Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2133.outbound.protection.outlook.com [40.107.114.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7497B621B1 for ; Thu, 12 Jan 2023 18:04:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GIFEYbTB1mFtCdeQJjY+1X3BgSMXuYgzHUyv6quOXNJorHJsobt7Jn6aw+gyO5sXBFW5KUJ5lxMZgkRxne5j3eBP/2Y8O+5deu6q2AZSXuhtrEQi3SKumccplPHmtZdlU3Ok6XUTh8+tAv1yFQyotXKu3ecBvqZzn9oAkyySfq8V5NeQWsjm4sQQATRZlqJ7e1xD/fR5VnF0azNSwTjNIuOYO+nmUqclKUm+6eXkA6yLx5YzX7JANwKMyCKSsNC+6ERaQbvWKCDpQ3Lx0RQtcDbXpFF1a1OoFqSEWuBzzmvOewzYQMuat10yjLDWfuaK19NlStZZtYnPQloL/wx0Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uwwXoJozOHEqJ34cJX8nC4JMqnq/p9f5yIABQsABbGY=; b=Mg++hevwwS3AlFDLHa8Jpm6I+6auJ9IiX1OS7lIQP7bthBTuhngt6lGcrvh8C5Bhaid+Z2FgwQWFyyfqZvKWEyzPX/6yHd8eLIN8P4c21L7tjwX2zYCSZpg05PDSVS7jVuaS4PxVEaumBE2moVU/AzXVb4aYF1dFUAxw64aQ1UC4IqvjX3Odx5zFotCi1jOo4xSTjM1OKPT67NtwQKRsvbqd1uS1v+mkpNxvaYINF7tTWFyc7vo99vLfhacKWP99+WL1dX7OGfPornzGlzEKzc1ynJINfsieEQBIskLUIytlqKfiGLDZrSpf3Kw5oX8H3FH5xPd9yW/xtFDzbpFJxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uwwXoJozOHEqJ34cJX8nC4JMqnq/p9f5yIABQsABbGY=; b=a/isMN0gUeN024mk59MUBKkFr5HHE2H3tvddIBXPlO2wR1O4h/KfK+EnZTSQz2rNMoU5p9QMzxfNnrifcDcPxuTlrxzToEsQGQtrVbjRLxe+A3SLXxp6HVhKAlUen+BxvTtHNPezCqsdvNmJbmw6CZeW6fbIvEAYjqoZH8/bqtM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYCPR01MB11239.jpnprd01.prod.outlook.com (2603:1096:400:3c1::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.12; Fri, 13 Jan 2023 02:04:08 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::3cd7:a7b5:ea86:9ae]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::3cd7:a7b5:ea86:9ae%4]) with mapi id 15.20.6002.012; Fri, 13 Jan 2023 02:04:08 +0000 Message-ID: <87bkn3i414.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 3/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Geert Uytterhoeven Cc: Linux-Renesas In-Reply-To: <87fscfi424.wl-kuninori.morimoto.gx@renesas.com> References: <87fscfi424.wl-kuninori.morimoto.gx@renesas.com> Date: Fri, 13 Jan 2023 02:04:08 +0000 X-ClientProxiedBy: TYCP286CA0066.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31a::10) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYCPR01MB11239:EE_ X-MS-Office365-Filtering-Correlation-Id: 12835b97-608c-4337-532a-08daf50a74b9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d/ZxSAJNTBAAqcHXweLKBanPS0YFfOcwd4c4gbxqcM4LxguvucrLb7XNoy7RT2ZS/AR+9fd49ywAaBJyD41Uim1Im0yXOCuYwandTK4L1mQts9/NfkhaUGyB/pS8z7qmOjc5Rg8xnokKxgVbpfSN7eRTLrsZ+MOq4JN3MamTLwezUm0whBCJBoWcpunQh+KffkeNvmZ7ubJjzFwzgbnpMSeInXjRHQFhx/R+adG6RaV6rSu/DWVfwQ4g3cpPh62g54khntVmvJKUomFA2u6oktFUTmX1eciDOovQMfviZHYEIvzGdC0eSX5piCp7SSJeuXh6wATjGWsCuGL+UjcpqLD6xlmabQviD6eCtkKR3yWZRuHzcKYasSqz4FCMkgHleJBsZAOJ+akRIdlsQdEd9Rx+PLyLgay7vqAm/lU/HNFfgH+cgqSN1qAv9Zb/O8F+6h8ZAgpoAldcTS8RO2V1pW/2MklUFpfTXfk8w9xk9FXld29TUFpKOkC8wxMfDnohhuER+Irf73hSHCv78/CSCEKP0jN8CbjF0vb6Z69br2OvmweqORkYV5JVDWO+OwxqXc0RTpN455nzXT/Hsm1DfL+Uckle19CcMZD3Xrts/ZgqXthaB32mJRx1V2WwW1ZUmT5jG+gLjdW8RcKxZzU5rgpRIsXWx7a5f1ZL3enLQoE1yAMEV2jIjh6ZhdyZUSFg6c9p1rcsQkpL6dDaS8iYZJwtGovzDKhpxsAyLz+/2dKYd/PuGJO6cBHtcRZg5ewn X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8426.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(366004)(136003)(346002)(376002)(39860400002)(451199015)(52116002)(6512007)(478600001)(38350700002)(966005)(36756003)(38100700002)(6486002)(86362001)(186003)(6506007)(41300700001)(26005)(8676002)(66556008)(4326008)(6916009)(66946007)(66476007)(8936002)(5660300002)(83380400001)(316002)(2616005)(2906002)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Eg9HQIOUPU1cWXcUqrldDebF3V5BxwWuPLqQX6Tun8bAeblTXj4grNUhjMJVavE/V6stFAVRSN3xzmByYs6MOiSfmB5OGwlvchL6jeevTVGwDve9eoOf/b3TQ1m8E2IazMVMm5Ks2l341Z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bT0mFxnEJZv4supjgiQ6/CKIH81l9WYhKNEoTO51DoCAcYMf2VvMSQtG6JWr4D/bdxXzUeQJTazn7opKqsRX1tERMSIO/pcWt9E9+FeEGgXqH+B0LjiMoNrl/LM360moqq3HssP7UzdGZHdN3spC5OP4OB2+0vP3hj7Pg2uQmjphT/p5UE1hQpP2AmkZ9NGqMaTZ7MOEo3ANtXlgwzjE460Jg7IYxjGjH2e4ftbUOGpr+/yuTTp/OJQKmPeGai0yDoE4+M6RCxN0R+QAlMidUxjxprttnld+JK6hXtDtBKxgIs9YM+VY65WMapbgKm8p0ohdhhXeAbZviNLfgZsupaQYtuVynzORKsqce/OCVU9TEMIB1vedSF1aRuDB+FAI9222jW49QDgenw5C6jAqER2Cc8/KNcQ6sWbwxzEWiQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12835b97-608c-4337-532a-08daf50a74b9 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2023 02:04:08.4064 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jfT1WGJ2EBNcRPfH140zkHWczgmBKbakNdXvOwWp7zeNAN6wW7/RK/KL12cRjykTmw5MPfJ7+4xRDpcV1MJF/g9DtwSOujXPVtgAmff7UHAFQtM7ucaLvXDzyxOwV454 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11239 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org From: Kuninori Morimoto ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these. Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded. Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver. ULCB/KF is good board to test these. Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them. From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed. This patch adds "Audio Graph Card" DT setting file for ULCB/KF. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated. Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay. Link: https://lore.kernel.org/r/87a63qpxge.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven --- .../dts/renesas/ulcb-audio-graph-card.dtsi | 85 ++++++++++++++++++ .../dts/renesas/ulcb-kf-audio-graph-card.dtsi | 88 +++++++++++++++++++ 2 files changed, 173 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi diff --git a/arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi b/arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi new file mode 100644 index 000000000000..3be54df645e6 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree for ULCB + Audio Graph Card + * + * Copyright (C) 2022 Renesas Electronics Corp. + */ + +/* + * (A) CPU0 <-----> ak4613 + * (B) CPU1 -----> HDMI + * + * (A) aplay -D plughw:0,0 xxx.wav + * (B) aplay -D plughw:0,1 xxx.wav + * + * (A) arecord -D plughw:0,0 xxx.wav + */ + +/ { + sound_card: sound { + compatible = "audio-graph-card"; + label = "rcar-sound"; + + dais = <&rsnd_port0 /* (A) CPU0 <-> ak4613 */ + &rsnd_port1 /* (B) CPU1 -> HDMI */ + >; + }; +}; + +&ak4613 { + #sound-dai-cells = <0>; + + port { + /* + * (A) CPU0 <-> ak4613 + */ + ak4613_endpoint: endpoint { + remote-endpoint = <&rsnd_for_ak4613>; + }; + }; +}; + +&hdmi0 { + ports { + port@2 { + /* + * (B) CPU1 -> HDMI + */ + dw_hdmi0_snd_in: endpoint { + remote-endpoint = <&rsnd_for_hdmi>; + }; + }; + }; +}; + +&rcar_sound { + ports { + #address-cells = <1>; + #size-cells = <0>; + rsnd_port0: port@0 { + /* + * (A) CPU0 <-> ak4613 + */ + reg = <0>; + rsnd_for_ak4613: endpoint { + remote-endpoint = <&ak4613_endpoint>; + bitclock-master; + frame-master; + playback = <&ssi0>, <&src0>, <&dvc0>; + capture = <&ssi1>, <&src1>, <&dvc1>; + }; + }; + rsnd_port1: port@1 { + /* + * (B) CPU1 -> HDMI + */ + reg = <1>; + rsnd_for_hdmi: endpoint { + remote-endpoint = <&dw_hdmi0_snd_in>; + bitclock-master; + frame-master; + playback = <&ssi2>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi new file mode 100644 index 000000000000..1db99b7608f0 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree for ULCB + Kingfisher + Audio Graph Card + * + * Copyright (C) 2022 Renesas Electronics Corp. + */ + +/* + * (A) CPU0 <----> ak4613 + * (B) CPU1 ----> HDMI + * (C) CPU2 ----> PCM3168A-p (8ch) + * (D) CPU3 <---- PCM3168A-c (6ch) + * + * (A) aplay -D plughw:0,0 xxx.wav + * (B) aplay -D plughw:0,1 xxx.wav + * (C) aplay -D plughw:0,2 xxx.wav + * + * (A) arecord -D plughw:0,0 xxx.wav + * (D) arecord -D plughw:0,3 xxx.wav + */ + +&sound_card { + dais = <&rsnd_port0 /* (A) CPU0 <-> ak4613 */ + &rsnd_port1 /* (B) CPU1 -> HDMI */ + &rsnd_port2 /* (C) CPU2 -> PCM3168A-p */ + &rsnd_port3 /* (D) CPU3 <- PCM3168A-c */ + >; +}; + +&pcm3168a { + ports { + #address-cells = <1>; + #size-cells = <0>; + mclk-fs = <512>; + /* + * (C) CPU2 -> PCM3168A-p + */ + port@0 { + reg = <0>; + pcm3168a_endpoint_p: endpoint { + remote-endpoint = <&rsnd_for_pcm3168a_play>; + clocks = <&clksndsel>; + }; + }; + /* + * (D) CPU3 <- PCM3168A-c + */ + port@1 { + reg = <1>; + pcm3168a_endpoint_c: endpoint { + remote-endpoint = <&rsnd_for_pcm3168a_capture>; + clocks = <&clksndsel>; + }; + }; + }; +}; + +&rcar_sound { + ports { + /* rsnd_port0/1 are defined in ulcb.dtsi */ + /* + * (C) CPU2 -> PCM3168A-p + */ + rsnd_port2: port@2 { + reg = <2>; + rsnd_for_pcm3168a_play: endpoint { + remote-endpoint = <&pcm3168a_endpoint_p>; + bitclock-master; + frame-master; + dai-tdm-slot-num = <8>; + playback = <&ssi3>; + }; + }; + /* + * (D) CPU3 <- PCM3168A-c + */ + rsnd_port3: port@3 { + reg = <3>; + rsnd_for_pcm3168a_capture: endpoint { + remote-endpoint = <&pcm3168a_endpoint_c>; + bitclock-master; + frame-master; + dai-tdm-slot-num = <6>; + capture = <&ssi4>; + }; + }; + }; +};