Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp8523289rwr; Thu, 11 May 2023 02:26:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5iY8dxi7289gFveQ0F43AuLDm8gifNFrEztSjV8DYtX+VR/6OvuK427iaYjgh3nh1jl+Uc X-Received: by 2002:a17:903:1206:b0:19c:be57:9c82 with SMTP id l6-20020a170903120600b0019cbe579c82mr24208230plh.65.1683797186806; Thu, 11 May 2023 02:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683797186; cv=none; d=google.com; s=arc-20160816; b=bIzrzuoDHb2oMHZ7BOHX5+XVvwsVG5M2QY+KPl1KtMSJxc0NwS4KnEtKTYCPN0PxAw +MiAyEMpYtusEOffYyfjO9ecIEUbhw1bMx8Btxw6+XRdf/Xlxuz/ewaFhE5tydRjWvCr Mae9fLCcMmDcaH9NArz9Y1lUxplDK7ZgLEt/Gbzb0t59CY5gGdSBLh9zL56eDxeV5n0D udAWcDFXNH8IJTCA3Ugijg37ltTm+Qc9+SBi5AkfNxlArh5oggu512y3kRuDalfe69PV TuIH186qDCyrhWnA0TJl5V6Si30Zk9h3B4xKscolK3Tfew3VEjrM3+ucixVbDviwxMy6 jUog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=1jp7tJsdKeo1YhR/s5BAVg9eDc9J/8YTPG+jJX0ZbKs=; b=J2OpYYehYjI2qBpJZL1564EhNqAbNcfl/sDGE6z/kyZiKV0GidZvi7u5KfnL73NMq2 XfyRiv04+GtFSW9SdiAzgzt5DjBWeZKwwjjY/IHIW3FmEeLrf6Fwqnbqmj/KVzTzqvSY VH3A9SVJbHOfqnnjeWgEzam755HBh8dMsGymnSf0n3gqb6SCQ5cghkYPi2YoedR0MFvL FHyIpToIY+GNewYFrUBzNoLqHGhh6hqX58MkQfGoKQwcYZaAyxpm8oc1mqtNIPSNYi6h easpb3pGqSswBpTYwHyrDX+1+ma2DMPnmvwdBxnZrxytyvHSaO8o02SkiC0dXGgt0vtz +F4g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a17090311d100b001aadba392c1si6568121plh.464.2023.05.11.02.26.12; Thu, 11 May 2023 02:26:26 -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 S237161AbjEKJQB (ORCPT + 99 others); Thu, 11 May 2023 05:16:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbjEKJP5 (ORCPT ); Thu, 11 May 2023 05:15:57 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AA5A2735; Thu, 11 May 2023 02:15:53 -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 00222828D; Thu, 11 May 2023 17:15:50 +0800 (CST) Received: from EXMBX168.cuchost.com (172.16.6.78) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 11 May 2023 17:15:51 +0800 Received: from SD-Server.starfivetech.com (113.72.146.187) by EXMBX168.cuchost.com (172.16.6.78) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 11 May 2023 17:15:50 +0800 From: Walker Chen To: Mark Brown , Liam Girdwood , Claudiu Beznea , Jaroslav Kysela , Takashi Iwai , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Walker Chen CC: , , , Subject: [PATCH v4 0/3] Add TDM audio on StarFive JH7110 Date: Thu, 11 May 2023 17:15:46 +0800 Message-ID: <20230511091549.28003-1-walker.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [113.72.146.187] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX168.cuchost.com (172.16.6.78) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 This patchset adds TDM audio driver for the StarFive JH7110 SoC. The first patch adds device tree binding for TDM module. The second patch adds tdm driver support for JH7110 SoC. The last patch adds device tree node and pins configuration of tdm to JH7110 dts. The series has been tested on the VisionFive 2 board by plugging an audio expansion board. For more information of audio expansion board, you can take a look at the following webpage: https://wiki.seeedstudio.com/ReSpeaker_2_Mics_Pi_HAT/ Changes since v3: - Modified the subject of patch [1/3] to reflect which subsystem it is. - Use the set of functions with 'clk_bulk_' to get/enable/disable clocks. - Dropped the overlay from patch [3/3]. - Dropped the redundant macro 'CONFIG_PM' and 'CONFIG_PM_SLEEP' around suspend() and resume(). Changes since v2: - Use dt-overlay to describe sound card because need to plug the audio expansion board into the VisionFive2 board. - Modified the coding style for driver. - Moved assignment of stop_dma_first to startup function of dai_driver. - Dropped some useless macro definition. - Use loops to get/enable/disable clocks. Changes since v1: - Rebased on Linux 6.3-rc4. - Added the dts file dedicated to describe audio card. - Added the item for JH7110 audio board to the dt-binding of StarFive SoC-based boards. --- v3: https://lore.kernel.org/all/20230506090116.9206-1-walker.chen@starfivetech.com/ v2: https://lore.kernel.org/all/20230420024118.22677-1-walker.chen@starfivetech.com/ v1: https://lore.kernel.org/all/20230329153320.31390-1-walker.chen@starfivetech.com/ Walker Chen (3): ASoC: dt-bindings: Add TDM controller bindings for StarFive JH7110 ASoC: starfive: Add JH7110 TDM driver riscv: dts: starfive: add the node and pins configuration for tdm .../bindings/sound/starfive,jh7110-tdm.yaml | 98 ++++ MAINTAINERS | 6 + .../jh7110-starfive-visionfive-2.dtsi | 40 ++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 21 + sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/starfive/Kconfig | 15 + sound/soc/starfive/Makefile | 2 + sound/soc/starfive/jh7110_tdm.c | 554 ++++++++++++++++++ sound/soc/starfive/jh7110_tdm.h | 138 +++++ 10 files changed, 876 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/starfive,jh7110-tdm.yaml create mode 100644 sound/soc/starfive/Kconfig create mode 100644 sound/soc/starfive/Makefile create mode 100644 sound/soc/starfive/jh7110_tdm.c create mode 100644 sound/soc/starfive/jh7110_tdm.h base-commit: 197b6b60ae7bc51dd0814953c562833143b292aa prerequisite-patch-id: 30bec4dba6f250a6edd0c2cbab2ce09442e50e8a prerequisite-patch-id: bb939c0c7c26b08addfccd890f9d3974b6eaec53 prerequisite-patch-id: 8a6f135bcabdad4a4bfb21f0c6a0ffd2bb57efe7 prerequisite-patch-id: c2366f993a9d85e28c06d8d09f064dd5e8b29a61 prerequisite-patch-id: 50d53a21f91f4087fc80b6f1f72864adfb0002b9 prerequisite-patch-id: 0df3703af91c30f1ca2c47f5609012f2d7200028 prerequisite-patch-id: 89f049f951e5acf75aab92541992f816fd0acc0d prerequisite-patch-id: 551fae54377090044c3612fca9740a9b359abdd2 prerequisite-patch-id: c7fdf904f398d478f0ed6d57eb878982bc73329d prerequisite-patch-id: 1b2d0982b18da060c82134f05bf3ce16425bac8d prerequisite-patch-id: 090ba4b78d47bc19204916e76fdbc70021785388 prerequisite-patch-id: a5d9e0f7d4f8163f566678894cf693015119f2d9 prerequisite-patch-id: 4637a8fa2334a45fa6b64351f4e9e28d3e2d60d3 prerequisite-patch-id: 32647ec60a3b614e1c59ec8e54cb511ae832c22f prerequisite-patch-id: aa06658ecf89c92d0dfdd6a4ba6d9e6e67532971 prerequisite-patch-id: 1387a7e87b446329dfc21f3e575ceae7ebcf954c prerequisite-patch-id: 258ea5f9b8bf41b6981345dcc81795f25865d38f prerequisite-patch-id: 8b6f2c9660c0ac0ee4e73e4c21aca8e6b75e81b9 prerequisite-patch-id: dbb0c0151b8bdf093e6ce79fd2fe3f60791a6e0b prerequisite-patch-id: 9007c8610fdcd387592475949864edde874c20a2 prerequisite-patch-id: d57e95d31686772abc4c4d5aa1cadc344dc293cd prerequisite-patch-id: 9f911969d0a550648493952c99096d26e05d4d83 prerequisite-patch-id: 2ddada18ab6ea5cd1da14212aaf59632f5203d40 prerequisite-patch-id: 80042661ff6156ce577a72e9eb8c0b218b624829 prerequisite-patch-id: 398744c61913c76a35754de867c4f820ca7a8d99 prerequisite-patch-id: f59269382164b5d642a5e10443ca447f5caa595c prerequisite-patch-id: 1babe83d6bf999bad17584dc595480f9070a5369 prerequisite-patch-id: 77be3d122d66df813f13088141ce27b21107a341 prerequisite-patch-id: 9fbb7ad1dd258bb8ff5946c4a0e59de4bfd82a04 prerequisite-patch-id: 6f6984916dffd0cc66aa733c9b6bd3a55495a50c prerequisite-patch-id: 39e1be2a3d1593577ab997f55f59367cba665aa7 prerequisite-patch-id: 584c256c9acb52ee2773d0c81c3f4977fc18155a prerequisite-patch-id: b37ac15032973e1fcd918f157c82a0606775c9e9 prerequisite-patch-id: 32deea16304859842af5c2151bc41d91cf6dfc9b prerequisite-patch-id: 20ac2450fb93b3f69f83fc720fd4800a95e618a6 prerequisite-patch-id: 6abf359fa445f4104432ddee27044dfbfb128417 -- 2.17.1