From patchwork Wed Aug 2 08:42:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 12986 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp320194vqx; Wed, 2 Aug 2023 02:15:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlEjKQhi9VJ732dITQUDsiYntB5IAazNvaTMuoj+d78FaOqA/okpaU597MgbprIiucD/k7AK X-Received: by 2002:a05:6358:4298:b0:134:e549:50d6 with SMTP id s24-20020a056358429800b00134e54950d6mr6717186rwc.10.1690967735590; Wed, 02 Aug 2023 02:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690967735; cv=none; d=google.com; s=arc-20160816; b=AkXi3X5JAogimuQ/LHdBfmycnAD3H/0ujZaCOlUEPLE7NpcsJT4YLOXqPINBkuEcqJ zVj5lX4D8yvxbnyKEpGU35o6HEqT6FvftbtYtfbhgwcQ2bsCQzkg4aAhZ87LL4NwFX4C fVpYLXeFsZm5UrJG5M/bKtmn/xFthNYaBkx6nd5+eYsSedLugEwHrqnEQpBZDo2VJlEw /PlvcEQedElFDoEmc9WnZJwxtGAG8OH6p4h28/aL9yJFA9xafgFWB0NmPZKu0b8+3L4D KiNK+oHHmLov4oHPaFjNOJn4ILfFGV6XD2BkX6YUatcRpE6INrsx5XglguAJ5JB84G2w Z9fw== 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 :message-id:date:subject:cc:to:from; bh=1PoYB3AD8Tt5eKN+Vpxf6wpTm5eiyQy3NrXRkDWs6ss=; fh=kc4CjktupVnP7Ak+rnAoZd0RpCE++BBJ+zTWN58huuQ=; b=m+13572c95wdBsCdV/FVrs6/nz4NVzchZJQ4E6m9muIN1hlw4RPctlRYo0nbRnhfWi +ibtsMQPA0YEUqdE3VEBonQ9cFxWi1j+c0436/jKwmct9bHCwiul6siynWGTlmLTRRg3 mcySu8DK4Cxf7XAv3Cmgob+mIFwCcgLVhvZjT/siWHEoNMZ6RFrOaRjRcPs8/1LIkZjf 03GkRSnRvpNm9tPkis2FYAfHmhdhnVlhXolob1EyWWLeKVcHoR9yH3K+Ov5EHkateYcg Yb98P6mQdoYEwk/oxHcacbv2KjggthI2dSeIDdHTvGRa7ZHKj7mlRpou8og+FJM8sAwv 6kNg== 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 m67-20020a633f46000000b005641bbe7841si3030334pga.524.2023.08.02.02.15.18; Wed, 02 Aug 2023 02:15:35 -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 S233971AbjHBInN convert rfc822-to-8bit (ORCPT + 99 others); Wed, 2 Aug 2023 04:43:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233979AbjHBInH (ORCPT ); Wed, 2 Aug 2023 04:43:07 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DAC1194; Wed, 2 Aug 2023 01:43:04 -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 ex01.ufhost.com (Postfix) with ESMTP id E2A9924E199; Wed, 2 Aug 2023 16:43:02 +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:02 +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:01 +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 0/5] Add I2S support for the StarFive JH7110 SoC Date: Wed, 2 Aug 2023 16:42:56 +0800 Message-ID: <20230802084301.134122-1-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 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_NONE,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: 1773108184437165500 X-GMAIL-MSGID: 1773108184437165500 This patch series adds I2S support for the StarFive JH7110 RISC-V SoC based on Designware I2S controller. There has three I2S channels (RX/TX0/TX1) on the JH7110 SoC, one of which is for record(RX) and two for playback(TX). The first patch adds the ops to get data from platform bus in the I2S driver. The second patch adds support for the StarFive JH7110 SoC in the Designware I2S bindings. The third patch adds support for the StarFive JH7110 SoC in the Designware I2S driver. The fourth patch fixes the name of I2STX1 pinmux. The last patch adds device node of I2S RX/TX0/TX1 in JH7110 dts. This patch series is based on Linux-next which is merge clock, syscon and dma nodes for the StarFive JH7110 SoC. And these should be applied after the following patchset: https://lore.kernel.org/all/20230724055440.100947-1-xingyu.wu@starfivetech.com/ The series has been tested and works normally on the VisionFive 2 board by plugging an audio expansion board. Xingyu Wu (5): ASoC: dwc: Use ops to get platform data ASoC: dt-bindings: snps,designware-i2s: Add StarFive JH7110 SoC support ASoC: dwc: i2s: Add StarFive JH7110 SoC support riscv: dts: starfive: pinfunc: Fix the pins name of I2STX1 riscv: dts: starfive: Add the nodes and pins of I2Srx/I2Stx0/I2Stx1 .../bindings/sound/snps,designware-i2s.yaml | 101 +++++- arch/riscv/boot/dts/starfive/jh7110-pinfunc.h | 4 +- .../jh7110-starfive-visionfive-2.dtsi | 58 ++++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 65 ++++ include/sound/designware_i2s.h | 3 + sound/soc/dwc/dwc-i2s.c | 318 ++++++++++++++++-- sound/soc/dwc/local.h | 1 + 7 files changed, 523 insertions(+), 27 deletions(-) base-commit: 0fee53365d051781156b75c6f6e6015757e71fd8 prerequisite-patch-id: 0159f09bb0a1ff711a00ae17ef5b12662c9c7d3d