From patchwork Thu Mar 7 03:37:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 780088 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 C2D59C54798 for ; Sat, 9 Mar 2024 10:18:07 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 071C7193B; Sat, 9 Mar 2024 11:17:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 071C7193B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1709979486; bh=0TmxaoFrOUwESujiuNXOQeTB7hf91kOhWAXK8/ggd74=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=LC6Ss4Rzz8VFux0pm7v7FgKkk4G2vukO636sDmTDAK5iIBtfs1Posa9UGE6s3Q5pz nJc8J0nt2C/1v+JzLaEx2vddVCxcCVTLAlIdZAiJEgML/drX3RJmk94tDJUsiixUXS 5IVd0gZ3aVRSITsTGSE2pVc/V6EsfLwn7V2ZSGJ4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 53451F80C8D; Sat, 9 Mar 2024 11:13:32 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3C518F80C8C; Sat, 9 Mar 2024 11:13:32 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B06B1F8024E; Thu, 7 Mar 2024 04:37:38 +0100 (CET) Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on20724.outbound.protection.partner.outlook.cn [IPv6:2406:e500:4440:2::724]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0E7CEF80087 for ; Thu, 7 Mar 2024 04:37:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0E7CEF80087 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M1vP+YoF06kREx7WA6At6K/sIkcs74hp6rTSv1n+I8ReGkC9k2KHZA6HswxzV/EUL8u6p2UOLrLIeuV19MQWpW85rp+R3oweebvCdMvgsPtN38hWmcGUJyk44ai+TCCuBzfaC4c8WBSynNeHyHbMHxZBrDstB0P0AFfgv6sGCK/9prR5op8D7ApE4rdyfHNVp1j5ibUyzG548StTXdmhCiYn4n7cwRdptK4fY1tjKHsLWpsxms4LOoQEWQ1+OTESDodnLtwwh5pj33My/PMRHn+x3r81kNPu+JHsaBG9+7ictz2b8+TvM2bvHQe1irX52czWuOcrzsKKHHaWIMhSwA== 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=2fjdkcP/9ZVpN3OxoIzHr4U6YgfZEhR9yeTz1PhIvWc=; b=ApuKnXIUi9zZv5E6E52BIBOmaWEEjvxpIai+WaKzWw3zQHW76es8NK/eC3/W4w0tpHP3PwMjUkG7k8AnJ+vGM6OXMJon+SFCypa1z9UddFPbEPmV5rXzXZF8KqV2RLDCFIB/jjUO+M3e1WMjlhXY8HHwiMjDB6FUxEa6ltPStifvwOLRdtrsL4+uAv4pyUULqzhL4m3LCP+brEmhA+X5Fg1E0HTL+DlXJvSLBCz2afQ7wN/YwTRN8UP7nc2Od4GpI6D/JE+j/oKomabVC90mHWT9tuUvQVg5i257sdkQrMweijxb2JbgWYXmigXkzyBQDdf5ykx8PtThcnzw74haIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:8::10) by NTZPR01MB0969.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.41; Thu, 7 Mar 2024 03:37:17 +0000 Received: from NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn ([fe80::20e3:6cc0:b982:ae95]) by NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn ([fe80::20e3:6cc0:b982:ae95%3]) with mapi id 15.20.7316.039; Thu, 7 Mar 2024 03:37:17 +0000 From: Xingyu Wu To: Liam Girdwood , Mark Brown , Takashi Iwai , Jaroslav Kysela , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Walker Chen , Xingyu Wu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-sound@vger.kernel.org Subject: [PATCH v1 1/2] dt-bindings: ASoC: Add PDM controller for the StarFive JH8100 SoC Date: Thu, 7 Mar 2024 11:37:07 +0800 Message-Id: <20240307033708.139535-2-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240307033708.139535-1-xingyu.wu@starfivetech.com> References: <20240307033708.139535-1-xingyu.wu@starfivetech.com> X-ClientProxiedBy: NT0PR01CA0019.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:c::22) To NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:8::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: NTZPR01MB0956:EE_|NTZPR01MB0969:EE_ X-MS-Office365-Filtering-Correlation-Id: 8878b222-d2b2-47e5-cb98-08dc3e57e2fe X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EkwvPKjKGck1hVBBO2FekHVfiZpNDQAARADZ3HC9kQ/ekdNGjrjwfaQirWXpWo9JtaQdan/wTCzXeFbchA73T35FKZ0fTIMF+ajeoaurr27bvqdvYU4ur1MlrmjW003FQM6I4GqEum3AiK66F+qZKUOW5vmlcGnwDSiPEcklRKR35fMetZThtomc+Hz9JBd28gFxnD2RMkw1vGnxITQYXBR7uDuH/QpmPAJjbR56GyGsg9MXnYD9mfJdT9jvkjpHeXltEQ7KIbVJ+brdv8RZCPeejYVi3V+MT7RcZ3uuYF3gs5NrgEJQPPH2AzEgTsC2H0j9FJPuSE/cx1yyubX38JlolXGWLjPFa2ZxcqFp/rakPsVcid9AUmb+/g+VXeigFg01txqp7z8S21odpb9tT+hFbic7+higxvlaRuglkZoPcmaFfQlBo/5JWzcNeSnvlMH+4xb+aOZ1cApiO+eHIj1+uJJ8k9hdmYrUcO8NiP44KfgW517MD3QvtmdWaMiLagb8vjHXG6BF0XF3ARtjL7T9aC3jsz8fnuldj5zOHAXmF2iSI3w4uGaMBeN5UpFrNRpiKQpe6ckgn3IVvaO8m++j2rRecswVGNibtUx1Mf2ZQQYysHSKfEvEkN5Wlufx X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn; PTR:; CAT:NONE; SFS:(13230031)(41320700004)(38350700005); DIR:O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DV+PerxUVAfp5ZBmURp4935dUcd96VP3Wlb1iWt7VF7LpoEahlf3IYB1+PoJfck4ZEgWMM0V2zzBDaHI+Nos6VF32Kchy1JRrhSlJBJS79EbtOO7CL0HOMX2G22z99kgyczSJ8MHkkuo6yJFajjDvQWvDIZNMh8WQTq/NQ7ftfZWnRi+59dDWjcl7i8FKLuCg/CXwDtfyiCtpQynE5olvByrk8AgjUqEs58SlkoN1n7SRCdqifTBQXK3PbZ8SiKxReZR2Jb1kz9+m/gbO6JU57S7xz5LIsrfANpq4aGQvgfkdCzdc2/1jZcwzLF1o67R81YExGYQuNvaQq1+voj3sdkecC+cBxkiz/d88TMYngQxhRXSVZ447D3xFJKl4i/LPw4AMh0c9oHFOrc1Y86oOgsTeT5yfo1kjDL51GFNIm78b6uiHhR43l7N4b/4yvTyp8PYXb11LxGcakGoq2Xt6uQ6KVKKBBIkuxmUMWgO96buE9pzT3sQTMoIZht0spelczU9bP0BJsmakG8QzXpRYkMx/d4nXB3AWn4wko3v8MKfszs4aHkY1TjMNSiW7VLuI4aWUaqUucLJrW6abqtRgvpTVVOvbg== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8878b222-d2b2-47e5-cb98-08dc3e57e2fe X-MS-Exchange-CrossTenant-AuthSource: NTZPR01MB0956.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 03:37:17.2936 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Qi+uxF+FJo4Ed2w68poVnUK9W1rtaKe0m27dQVK8UcGsB96gwMlhCgHyaZgrq1PRd4xdTn7rN1dw3WzSWw5hycEDOzBUqWZCBE7o4MxdZKk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: NTZPR01MB0969 X-MailFrom: xingyu.wu@starfivetech.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 2OERMSZMLNSY4VML2SLPJJ6X3LDFNWSB X-Message-ID-Hash: 2OERMSZMLNSY4VML2SLPJJ6X3LDFNWSB X-Mailman-Approved-At: Sat, 09 Mar 2024 10:11:37 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add bindings for the PDM controller for the StarFive JH8100 SoC. Signed-off-by: Xingyu Wu --- .../bindings/sound/starfive,jh8100-pdm.yaml | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/starfive,jh8100-pdm.yaml diff --git a/Documentation/devicetree/bindings/sound/starfive,jh8100-pdm.yaml b/Documentation/devicetree/bindings/sound/starfive,jh8100-pdm.yaml new file mode 100644 index 000000000000..a91b47d39ad3 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/starfive,jh8100-pdm.yaml @@ -0,0 +1,84 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/starfive,jh8100-pdm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JH8100 PDM controller + +description: | + The Pulse Density Modulation (PDM) controller is a digital PDM out + microphone interface controller and decoder that supports both + mono/stereo PDM format, and an Inter-IC Sound (I2S) transmitter that + outputs standard stereo audio data to another device. The I2S transmitter + can be configured to operate either a master or a slave (default mode). + The PDM controller includes two PDM modules, each PDM module can drive + one bitstream sampling clock and two bitstream coming data with sampling + clock rising and falling edge. + +maintainers: + - Xingyu Wu + - Walker Chen + +properties: + compatible: + const: starfive,jh8100-pdm + + reg: + maxItems: 1 + + clocks: + items: + - description: DMIC output clock + - description: Main ICG clock + + clock-names: + items: + - const: dmic + - const: icg + + resets: + maxItems: 1 + + starfive,syscon: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle to System Register Controller sys_syscon_ne node. + - description: PDM source enabled control offset of SYS_SYSCON_NE register. + - description: PDM source enabled control mask + description: + The phandle to System Register Controller syscon node and the PDM source + from I2S enabled control offset and mask of SYS_SYSCON_NE register. + + starfive,pdm-modulex: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + description: + The module x will be using in PDM controller. Default use module 0. + + "#sound-dai-cells": + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - starfive,syscon + +unevaluatedProperties: false + +examples: + - | + pdm@12250000 { + compatible = "starfive,jh8100-pdm"; + reg = <0x12250000 0x1000>; + clocks = <&syscrg_ne 142>, + <&syscrg_ne 171>; + clock-names = "dmic", "icg"; + resets = <&syscrg_ne 44>; + starfive,syscon = <&sys_syscon_ne 0xC 0xFF>; + #sound-dai-cells = <0>; + };