Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2285529rwl; Thu, 30 Mar 2023 08:20:20 -0700 (PDT) X-Google-Smtp-Source: AKy350ZT8EJ75gVzDbcpHGZ7R9+L8NMu64ri5wl9PVX4STXml/Z8VTKwVteqN9tBaWbdcICUYLqo X-Received: by 2002:a17:906:1001:b0:93f:e5e4:8c13 with SMTP id 1-20020a170906100100b0093fe5e48c13mr14935546ejm.5.1680189620212; Thu, 30 Mar 2023 08:20:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680189620; cv=none; d=google.com; s=arc-20160816; b=CrPh/g99dIAD0ylSH790SiTLZP2Zhf5FVUqfs7VJYQRaMccQTku/jmu54oIt11IoXl RT3zR1KJFLDYphU+YDiMNvkpUNCsTLh85ORfgnpupkhwDzaFThtFCHLMWXan2UGQlLli xfzIVww4mDGeyIzCdEDv7NZdWyoXET5l8uEH05mdNLcbN83cztxwA5aci0shVglILdnR hCDGyCzbRv9IqKSBTk+vL+sFyZD+lD6Tf031S6r2R2pmM4um3ULskD7IObiJ1koMGRTW 0QaQpL+qI+Rj11C+WwpKyIgzobpZ6NpbsXhtgE1FKY0YExRLiKCbwLmCK1Opbume/sTW Yu9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=sR1zqIi8c1ZXecu/YNr//ysCupxjt4/002f3+FHNc7Y=; b=F40rCLGFVK80Tg9qhjigDFMmy1gQSfS/s/n6LxLvPxdMXBuPDiZSBpwPizxHJVhOz9 ySZQ6lwArZeAeVKo64/DXKreIS0Vf6Pe+j8fDymmSMjovxDz/LAH4tqUNJQc/HUbNm1A vRcUET9z1tB280se2SI1Kp7MWeZ5KmyJXB8H8gb2elEP+H9go86iPN2OaB/j3h6WCOUf iOk/fujUtbZjluhmf65PmZbOoG2eU53MOO8LxHgGOm6HkffHmuq7IUjrbdemngQQthXs ld8eZyYG0y9D5Ifas/1wYKnAmt126u1V1rKsAbLxmrE8JIpFNvx9VAj8m7iaMIQkKJNg CEvw== 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 n19-20020a170906701300b008e6a5c547cfsi475781ejj.254.2023.03.30.08.19.49; Thu, 30 Mar 2023 08:20:20 -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 S232842AbjC3PTL (ORCPT + 99 others); Thu, 30 Mar 2023 11:19:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232801AbjC3PTK (ORCPT ); Thu, 30 Mar 2023 11:19:10 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75E22CDC8; Thu, 30 Mar 2023 08:18:08 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 9596F24DEAE; Thu, 30 Mar 2023 23:16:09 +0800 (CST) Received: from EXMBX168.cuchost.com (172.16.6.78) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 30 Mar 2023 23:16:09 +0800 Received: from [192.168.125.96] (113.72.144.76) by EXMBX168.cuchost.com (172.16.6.78) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 30 Mar 2023 23:16:08 +0800 Message-ID: <2d5a8dae-73fd-b1f8-089e-041637d66b0d@starfivetech.com> Date: Thu, 30 Mar 2023 23:16:08 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v1 3/3] riscv: dts: starfive: add tdm node and sound card To: Conor Dooley , Krzysztof Kozlowski CC: Jaroslav Kysela , Takashi Iwai , "Rob Herring" , Krzysztof Kozlowski , Emil Renner Berthing , , , , References: <20230329153320.31390-1-walker.chen@starfivetech.com> <20230329153320.31390-4-walker.chen@starfivetech.com> Content-Language: en-US From: Walker Chen In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [113.72.144.76] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX168.cuchost.com (172.16.6.78) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-0.0 required=5.0 tests=NICE_REPLY_A, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 On 2023/3/30 15:58, Conor Dooley wrote: > On Thu, Mar 30, 2023 at 09:43:10AM +0200, Krzysztof Kozlowski wrote: >> On 29/03/2023 17:33, Walker Chen wrote: >> > Add the tdm controller node and sound card for the StarFive JH7110 SoC. > >> > + compatible = "fixed-clock"; >> > + clock-output-names = "wm8960_mclk"; >> > + #clock-cells = <0>; >> > + }; >> > + >> > i2srx_bclk_ext: i2srx-bclk-ext-clock { >> > compatible = "fixed-clock"; >> > clock-output-names = "i2srx_bclk_ext"; >> > @@ -375,6 +381,27 @@ >> > status = "disabled"; >> > }; >> > >> > + tdm: tdm@10090000 { >> > + compatible = "starfive,jh7110-tdm"; >> > + reg = <0x0 0x10090000 0x0 0x1000>; >> > + clocks = <&syscrg JH7110_SYSCLK_TDM_AHB>, >> > + <&syscrg JH7110_SYSCLK_TDM_APB>, >> > + <&syscrg JH7110_SYSCLK_TDM_INTERNAL>, >> > + <&syscrg JH7110_SYSCLK_TDM_TDM>, >> > + <&syscrg JH7110_SYSCLK_MCLK_INNER>, >> > + <&tdm_ext>; >> > + clock-names = "tdm_ahb", "tdm_apb", >> > + "tdm_internal", "tdm", >> > + "mclk_inner", "tdm_ext"; >> > + resets = <&syscrg JH7110_SYSRST_TDM_AHB>, >> > + <&syscrg JH7110_SYSRST_TDM_APB>, >> > + <&syscrg JH7110_SYSRST_TDM_CORE>; >> > + dmas = <&dma 20>, <&dma 21>; >> > + dma-names = "rx","tx"; >> > + #sound-dai-cells = <0>; >> > + status = "disabled"; >> > + }; >> > + >> > stgcrg: clock-controller@10230000 { >> > compatible = "starfive,jh7110-stgcrg"; >> > reg = <0x0 0x10230000 0x0 0x10000>; >> > @@ -601,5 +628,12 @@ >> > #reset-cells = <1>; >> > power-domains = <&pwrc JH7110_PD_VOUT>; >> > }; >> > + >> > + sound0: snd-card0 { >> >> 1. Why card0? >> 2. Where is this node located? In MMIO bus? Run some basic checks on >> your DTS before submitting upstream. >> dtbs_check >> dtbs W=1 >> >> 3. Why this is even in the DTSI? This really looks wrong. > > Excuse me for not following here, but Walker, could you point me at > where in the schematic for the VisionFive 2 that this wm8960 actually > is? > I know ~nothing about audio, but good old Google tells me that this is a > dedicated codec chip and I was looking at [1] and could not easily find > it on the schematic. > > Thanks, > Conor. > > 1 https://doc-en.rvspace.org/VisionFive2/PDF/SCH_RV002_V1.2A_20221216.pdf Hi Conor, The TDM need work together with external codec WM8960 by plugging the raspberry pie audio board into the 40-pin, which is found in sheet 21 of the schematic. Because the 40-pin of VisionFive2 is fully compatible with the pins of Raspberry pie audio board. For more information of the audio board, you can take a look at the following webpage: https://wiki.seeedstudio.com/ReSpeaker_2_Mics_Pi_HAT/ The schematic of audio board: https://files.seeedstudio.com/wiki/MIC_HATv1.0_for_raspberrypi/src/ReSpeaker%202-Mics%20Pi%20HAT_SCH.pdf Best regards, Walker