From patchwork Wed Aug 2 08:42:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 129726 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp333590vqx; Wed, 2 Aug 2023 02:46:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlG0Yvs9lZc1BedbSYctvMZIijF1PT5MR4dEaPztucSW+EczHjYcthX54eFPLbUH4Dhm9Ve/ X-Received: by 2002:a05:6402:2c7:b0:51d:e3d2:f5eb with SMTP id b7-20020a05640202c700b0051de3d2f5ebmr4841847edx.5.1690969583407; Wed, 02 Aug 2023 02:46:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690969583; cv=none; d=google.com; s=arc-20160816; b=hIVU2QgT1mT0kFfFcaxoJt160Rt+T+O1vxBq36jWf5CO+CfcCcYJ/M2iEBBIwOe+Hx YTUiRbGdxZ8kGDEoURNTR1GhZBnlFC+QXgnX7/UoXLDMe1K99TxVMmR71xUBefwqdKlm wa7sf0zt8EIeUJQxfmV2lLKsP8+RQu61OuQrUYLoEdwIhFzcTrUfx086nmEHGoHE1eVp kps9qI5g5NJpVSm+7uRjq3wHwVgYj9trptKSYagctsYoKxV/9ZRs9kCraxHizlAUEDQa ddr1JEAfdxgxv9YYMrSdWI98xJvtjkcVCP6OyUcR1Ql1NHQ+sBcSKzdolaGKH5FDOxia ojVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=fHSpJOvRniEKDQqTbDzbNlIgpJRa6F+o7MZx3Q85B0o=; fh=kc4CjktupVnP7Ak+rnAoZd0RpCE++BBJ+zTWN58huuQ=; b=A8YbLcwYOuWzhnD0UsyllVO9UsdkQKP6ZhYk1BDI2P1LRhjqHN00KGK/Zgv/yhJiIB V3nhYWWosjD9YpmIb7U3E1nDhNNABkvouoceSDdVAY8LESYtwLQF5XbGeTWBEwktd5lT GgGx2TQ+bLzUSSSAquTEOAWxcpRg6CPhpvhfuJ7WdVeHZ4lDxNPD8tuo5YAZdus/skzL NtdrbjivXrbQFUk7jIBs76y1/WOJpEG/xNTU9zdav5isLWQMBdHkGHb5SqAuGSjSUn1w jJMek0XK380pd/K7XynFlvlIc4/MLDpZ9L2Ewepf4J0r3Whax9RgRbziVm5X9xRFZwK+ uF9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t1-20020aa7d4c1000000b00521db0bc984si5955138edr.121.2023.08.02.02.45.59; Wed, 02 Aug 2023 02:46:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233970AbjHBIn0 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 2 Aug 2023 04:43:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233961AbjHBInM (ORCPT ); Wed, 2 Aug 2023 04:43:12 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 250431982; Wed, 2 Aug 2023 01:43:11 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id A3F7582CA; Wed, 2 Aug 2023 16:43:04 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 2 Aug 2023 16:43:04 +0800 Received: from localhost.localdomain (183.27.98.54) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 2 Aug 2023 16:43:03 +0800 From: Xingyu Wu To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , "Maxim Kochetkov" , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Emil Renner Berthing CC: Jose Abreu , Paul Walmsley , Palmer Dabbelt , Albert Ou , Walker Chen , "Xingyu Wu" , , , , Subject: [PATCH v1 2/5] ASoC: dt-bindings: snps,designware-i2s: Add StarFive JH7110 SoC support Date: Wed, 2 Aug 2023 16:42:58 +0800 Message-ID: <20230802084301.134122-3-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230802084301.134122-1-xingyu.wu@starfivetech.com> References: <20230802084301.134122-1-xingyu.wu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [183.27.98.54] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773110122057897278 X-GMAIL-MSGID: 1773110122057897278 Add the StarFive JH7110 (TX0/TX1/RX channel) SoC support in the bindings of Designware I2S controller. The I2S controller needs two reset items to work properly on the JH7110 SoC. And TX0 channel as master mode needs 5 clock items and TX1/RX channels as slave mode need 9 clock items on the JH7110 SoC. The RX channel needs System Register Controller property to enable it and other platforms do not need it. Signed-off-by: Xingyu Wu --- .../bindings/sound/snps,designware-i2s.yaml | 101 +++++++++++++++++- 1 file changed, 98 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml b/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml index a970fd264b21..a5ab7f3e49b2 100644 --- a/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml +++ b/Documentation/devicetree/bindings/sound/snps,designware-i2s.yaml @@ -17,6 +17,9 @@ properties: - const: snps,designware-i2s - enum: - snps,designware-i2s + - starfive,jh7110-i2stx0 + - starfive,jh7110-i2stx1 + - starfive,jh7110-i2srx reg: maxItems: 1 @@ -29,15 +32,36 @@ properties: maxItems: 1 clocks: - description: Sampling rate reference clock - maxItems: 1 + items: + - description: Sampling rate reference clock + - description: APB clock + - description: Audio master clock + - description: Inner audio master clock source + - description: External audio master clock source + - description: Bit clock + - description: Left/right channel clock + - description: External bit clock + - description: External left/right channel clock + minItems: 1 clock-names: - const: i2sclk + items: + - const: i2sclk + - const: apb + - const: mclk + - const: mclk_inner + - const: mclk_ext + - const: bclk + - const: lrck + - const: bclk_ext + - const: lrck_ext + minItems: 1 resets: items: - description: Optional controller resets + - description: controller reset of Sampling rate + minItems: 1 dmas: items: @@ -51,6 +75,17 @@ properties: - const: rx minItems: 1 + starfive,syscon: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle to System Register Controller sys_syscon node. + - description: I2S-rx enabled control offset of SYS_SYSCONSAIF__SYSCFG register. + - description: I2S-rx enabled control mask + description: + The phandle to System Register Controller syscon node and the I2S-rx(ADC) + enabled control offset and mask of SYS_SYSCONSAIF__SYSCFG register. + allOf: - $ref: dai-common.yaml# - if: @@ -66,6 +101,66 @@ allOf: properties: "#sound-dai-cells": const: 0 + - if: + properties: + compatible: + contains: + const: snps,designware-i2s + then: + properties: + clocks: + maxItems: 1 + clock-names: + maxItems: 1 + resets: + maxItems: 1 + else: + properties: + resets: + minItems: 2 + - if: + properties: + compatible: + contains: + const: starfive,jh7110-i2stx0 + then: + properties: + clocks: + minItems: 5 + clock-names: + minItems: 5 + required: + - resets + - if: + properties: + compatible: + contains: + const: starfive,jh7110-i2stx1 + then: + properties: + clocks: + minItems: 9 + clock-names: + minItems: 9 + required: + - resets + - if: + properties: + compatible: + contains: + const: starfive,jh7110-i2srx + then: + properties: + clocks: + minItems: 9 + clock-names: + minItems: 9 + required: + - resets + - starfive,syscon + else: + properties: + starfive,syscon: false required: - compatible