Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp328018rdb; Tue, 5 Dec 2023 06:39:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHsxc/KaifvA11BCrUalu/tFHVUZRhV8oB1Lawv8vS9Q42IpB7pKei+7DGr0nBduV21oxOZ X-Received: by 2002:a05:6a20:6a22:b0:18c:346c:d59f with SMTP id p34-20020a056a206a2200b0018c346cd59fmr3835399pzk.62.1701787180526; Tue, 05 Dec 2023 06:39:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701787180; cv=none; d=google.com; s=arc-20160816; b=k0wi7iPFfv36eTkV3HF37Arlh09vYOPZ/J3j6+ek5xlFGq2wa4OoH+3iz4uPqEnJTg HU4t0DDp/cO9FQPPf7UE/mecWd7udRSJxfJ0whPrS6Ql5QfbbG1NN/YAan/kKL96YtCR 5F/dm++6liLfeAiHLfaa7MFLyMhwcU1pURTOw/8ZFj9WTmTc/BYOCd1OZ4CJJiy6I0nv Cn0J37jgGwyKhYoRxuvfoejMEr0FC/5OpBj/CcGW0CYfOSnaTkDKbeApYiT+FIa556w6 l67rH+1uDg7bjgrSgrdesiRixmrf7ehVD7GevFDuKksHKCS2JYChCc8Rx0VKpGA0BP6Q 2CDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fLE8dzf+OFeZGnYG6g1F5Dq26rxeNToyaqXdKnkOpVM=; fh=CatLDCJpbD2kv1XfI4yAxgjt1x3YwdjHzf5fa1/KKpw=; b=00yccM4mp0SjCiQk5ulrAL2I/99BMiTNU/aQ2XzswXgXenUY8m+GoDde3sbST7phgU yHxFcVzu09j6bS89XOYINJDqPeDo8qzn6TDEOOz0wqYg+rSxnYqqp5F8McCcml7UFanp OX7sCYOaTwCjGTtBPpNBtCt2TY+IGwaTkX4oDzqeUf9IOiNBNygYyOXmDKCiySiSr4q4 UlTHtpsUxCRwc3r6M57o7Lj8gXkjYg6HmRP/0mxxpDUmfMkxrIzqj48uQwUpcj/Lx6KJ GiF55XPi2yL+agPtfhdSBk0dtbnwtFlScn+o6I/O5xs2uqBBimxroNgs1QV03VCmqsPM ZPZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TJJZZkoH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id bh10-20020a056a02020a00b005c2122e482csi9979842pgb.700.2023.12.05.06.39.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:39:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TJJZZkoH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 109A2801C882; Tue, 5 Dec 2023 06:39:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442299AbjLEOjK (ORCPT + 99 others); Tue, 5 Dec 2023 09:39:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346834AbjLEOjE (ORCPT ); Tue, 5 Dec 2023 09:39:04 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A57B1BF for ; Tue, 5 Dec 2023 06:39:10 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 555E2C433C9; Tue, 5 Dec 2023 14:39:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701787150; bh=1+TU9RElFwgbEqSXLhGK9BZkBQKzExzi8AfeA+6CsRQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TJJZZkoHJrfrsoY2cWZVCyleDrJkdf2yphi6zHuaA9YOSG7ScuAb7NG0hEn2ebngi vV9yPmAlHn8qDGq4tUWn7qa8l6zp4msIaVwGZPkjc+PrAOHpxNyAxMQCafqUaO9hw+ tMtZw/HpTwPjetJFULgPN2H+GeryOs1KnZabuFSOz9wc5H37SqQ327FIhqKvGhz1P9 rSz7lS0ZfmDSb93O7URQSa4LZoZyMggJZ57MauFMuk6tLlI5EiUvcdU9Sa3hN/YXep KDQXnBwlnmY2CKsQCcez9IWq53iFM+2g8zL4za7OCC5SYtP1+o7uuNnveHx81ekHNI VHIDfRjsq4cFg== Date: Tue, 5 Dec 2023 22:26:38 +0800 From: Jisheng Zhang To: Emil Renner Berthing Cc: Drew Fustini , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Fu Wei , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Jason Kridner , Robert Nelson , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v7 2/4] riscv: dts: thead: Add TH1520 mmc controllers and sdhci clock Message-ID: References: <20231129-th1520_mmc_dts-v7-0-c77fc19caa6f@baylibre.com> <20231129-th1520_mmc_dts-v7-2-c77fc19caa6f@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 05 Dec 2023 06:39:38 -0800 (PST) On Mon, Dec 04, 2023 at 01:47:45AM -0800, Emil Renner Berthing wrote: > Drew Fustini wrote: > > Add node for the SDHCI fixed clock. Add mmc0 node for the first mmc > > controller instance which is typically connected to the eMMC device. > > Add mmc1 node for the second mmc controller instance which is typically > > connected to microSD slot. > > > > Signed-off-by: Drew Fustini > > --- > > arch/riscv/boot/dts/thead/th1520.dtsi | 25 +++++++++++++++++++++++++ > > 1 file changed, 25 insertions(+) > > > > diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi > > index ba4d2c673ac8..af4fdcd82e0b 100644 > > --- a/arch/riscv/boot/dts/thead/th1520.dtsi > > +++ b/arch/riscv/boot/dts/thead/th1520.dtsi > > @@ -146,6 +146,13 @@ uart_sclk: uart-sclk-clock { > > #clock-cells = <0>; > > }; > > > > + sdhci_clk: sdhci-clock { > > + compatible = "fixed-clock"; > > + clock-frequency = <198000000>; > > + clock-output-names = "sdhci_clk"; > > + #clock-cells = <0>; > > + }; > > + > > soc { > > compatible = "simple-bus"; > > interrupt-parent = <&plic>; > > @@ -304,6 +311,24 @@ dmac0: dma-controller@ffefc00000 { > > status = "disabled"; > > }; > > > > + mmc0: mmc@ffe7080000 { > > + compatible = "thead,th1520-dwcmshc"; > > + reg = <0xff 0xe7080000 0x0 0x10000>; > > + interrupts = <62 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&sdhci_clk>; > > + clock-names = "core"; > > + status = "disabled"; > > + }; > > + > > + mmc1: mmc@ffe7090000 { > > + compatible = "thead,th1520-dwcmshc"; > > + reg = <0xff 0xe7090000 0x0 0x10000>; > > + interrupts = <64 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&sdhci_clk>; > > + clock-names = "core"; > > + status = "disabled"; > > + }; > > + > > Hi Drew, > > This doesn't seem to match the documentation shared here: > https://lore.kernel.org/linux-riscv/5f437109d2be2b8843f549a661054a2e3ec0d66e.camel@xry111.site/ > From the TH1520 System User Manual.pdf in there, I'd expect something like > > emmc: mmc@ffe7080000 { > compatible = "thead,th1520-dwcmshc"; > reg = <0xff 0xe7080000 0x0 0x10000>; > ... > }; Hi Emil, I think this isn't necessary. From other soc dts files, I see such naming, but lots socs just use mmc0, mmc1, and so on. And IIRC, the host for sd and sdio can support both, IOW, below sdio0/sdio1 may be used for sdcard. Thanks > > sdio0: mmc@ffe7090000 { > compatible = "thead,th1520-dwcmshc"; > reg = <0xff 0xe7090000 0x0 0x10000>; > ... > }; > > sdio1: mmc@ffe70a0000 { > compatible = "thead,th1520-dwcmshc"; > reg = <0xff 0xe70a0000 0x0 0x10000>; > ... > }; > > /Emil