Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp377317rdb; Tue, 5 Dec 2023 07:52:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGiUUTE5Zn9bvmfmFRdajKEtOgQ1UmayKPe8g7OW3prbPVHyoisFPPC9D0ibA4ZOId1eQh3 X-Received: by 2002:a05:6e02:1be4:b0:35d:59b3:2f81 with SMTP id y4-20020a056e021be400b0035d59b32f81mr1451298ilv.22.1701791546942; Tue, 05 Dec 2023 07:52:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701791546; cv=none; d=google.com; s=arc-20160816; b=WIlPZV/IYjZ6dvkcJG3BTzEvk5DteugKU73I4duPSDeYmijPxKUthIHeb+svn5Lagj JAQgsKluUXW7He+cldG1zbAfQsEghxoqzDsytGEpvX39IUsRTDlQRpe1oeO3EdAiuA6C CirD8nspVNsGVHkgwpSGM+4YdHCDxU0p+djI6CLjMkhPWReS5Q8bfPBGzZ9SVD9tbiFn TtNJSpuX5dCpfwqcki0bW1bRsLpbDOIO+C/J/STxmBG6VAHj34FHKTf1Lep55VbzzDk9 lw1Cb8VDVAQX16VOpZ8UogA4OXZafy818ZDi0ah98XoqXipUK6r1763LDqBlBZ89oUAw 2kJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=lVTdq6t/OSB6FE4R91UbvG7HbrsvSrimG/gzvVG23BM=; fh=0MZ+TlRJDDoVTxHvhRYGr2QeMpd2LSlWVOR+FCJ8g/g=; b=mTqIlknwwoOykfeVxUnibAQWlyCZ9ksvtR7QVXLZ0Mo0VOp2gSIeHSiPM/gt+9xW6F teJgydsqLI/3x7ydL1qBkx3KKD5MYDrtnNtHBDgNjMIX3KLdbZHF4MMMLFj+AzEb7sPH trL56J4iwVZI3SiBwJHko7HgWvODtCRfORWztocm7mJLPUEp8/yybBTSSHtpiYHYWVXY rgdb+BlrQZxNgp75bwnbUZ843Ex6qVERAQLIMMIkqE7VyTJ1cWriXVHDFquYj39LIyJV TKdKxuLIfrT5k6sj0gRtNB8FqANWPM81pcc74QTck4MzQU2H4pAaVeo0U0JrQt8HcBJ/ NZiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@riscv-rocks.de header.s=google header.b=d7LYvaVy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id f7-20020a02a807000000b00469253c89bbsi302871jaj.153.2023.12.05.07.52.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 07:52:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@riscv-rocks.de header.s=google header.b=d7LYvaVy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id BFBC58038B69; Tue, 5 Dec 2023 07:52:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346378AbjLEPwH (ORCPT + 99 others); Tue, 5 Dec 2023 10:52:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346320AbjLEPwG (ORCPT ); Tue, 5 Dec 2023 10:52:06 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62DE4C3 for ; Tue, 5 Dec 2023 07:52:10 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-33348e711e0so1955592f8f.1 for ; Tue, 05 Dec 2023 07:52:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscv-rocks.de; s=google; t=1701791529; x=1702396329; darn=vger.kernel.org; h=organization:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=lVTdq6t/OSB6FE4R91UbvG7HbrsvSrimG/gzvVG23BM=; b=d7LYvaVyAKeJ5LgT3KPvovxqsmkBOCySMB/kGudYfq9WQLBreCixXL/CwXNeeOPT+S sx9Suz7uR5lMBJyO5CKXBGzZZ3y5KWv0RmIy3tfPO8v0G6DbbHBN1YAKzcD2vdTqWfXd rTsVHguH/GFQWshhCSIv5cLvXBfjJBSp3wbPDBc7sKj/MCgAO9ytEcu1lBteCU08hlFY Nay6iFi/jbw/gudz9qI++2RPLsBUZ0k/cbiaYtH9YtMRcztkXWgHQZWvZ6Cr1dJoPady ax72eu0ugB2jZXi5tzyGd42CHNGVqloOlyBFop/gTwOLONPhDjUqd9bHo/5yc/zTEHnM gUzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701791529; x=1702396329; h=organization:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=lVTdq6t/OSB6FE4R91UbvG7HbrsvSrimG/gzvVG23BM=; b=oz8nEd+3SA9MEc1mLuhoj0ZFqI0a1vrg5YKhcGd9KfNul9orS/pTrJoGzvYlMkuCoc faC88Ow4t3c0CxpqyKi4wga9To/4xz28eMP7wWciaWlylO+f9KbIci+ZJsBWEqhTEQLN vc54sCaLfjI4IXEAl+Pf5qZxVVUcddy59IlaOKO8WKbo2mx1MQYqDDtpMFUkw0su2sJn x0Z2ClZ1oX7jZvEBEPzJhCJGNmMDkJJdff4WRV/ZlU8PHsuzEUGSdtAmkfDJ51Jyue4f CLCee1eJ/AbJUQMinCaeUlAZpkD3auBBbL2hjtWhlm7zXz2EeU10eqMFKAmbskzhdeQh LJgg== X-Gm-Message-State: AOJu0YzhzR3fY9aTiENmhx73kidkCToCQlaXDRVnNUjLOxZrC9Lez3F7 cujtPEG7t0scyy83x+3NsdnUBA== X-Received: by 2002:adf:f74c:0:b0:333:2fd2:51fc with SMTP id z12-20020adff74c000000b003332fd251fcmr4361255wrp.117.1701791528135; Tue, 05 Dec 2023 07:52:08 -0800 (PST) Received: from fedora (p549451d5.dip0.t-ipconnect.de. [84.148.81.213]) by smtp.gmail.com with ESMTPSA id f20-20020a1709067f9400b009fd7bcd9054sm6963138ejr.147.2023.12.05.07.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 07:52:07 -0800 (PST) Date: Tue, 5 Dec 2023 16:52:05 +0100 From: Damian Tometzki To: Emil Renner Berthing Cc: Jisheng Zhang , 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: Reply-To: Damian Tometzki Mail-Followup-To: Emil Renner Berthing , Jisheng Zhang , 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 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=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt X-Operating-System: Linux Fedora release 39 (Thirty Nine) (Kernel 6.7.0-rc4) Organization: Linux hacker X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 05 Dec 2023 07:52:24 -0800 (PST) On Tue, 05. Dec 06:48, Emil Renner Berthing wrote: > Jisheng Zhang wrote: > > 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. > > No it certainly isn't necessary. Those labels are purely for us humans to read > and are not present in the dtb. But that's exactly why I think it'd be a good > idea match the labels with the documentation, so it will easier for us humans > to match up the device tree source to documentation. Hello together, yes i agree to this too. It is easier for troubleshooting etc. Damian > > > And IIRC, the host for sd and sdio can support both, IOW, below > > sdio0/sdio1 may be used for sdcard. > > Yes, all of the EMMC, SDIO0 and SDIO1 seem to be instances of the same IP. > > /Emil