Message ID | 20231206-th1520_mmc_dts-v8-2-69220e373e8f@baylibre.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3954568vqy; Wed, 6 Dec 2023 00:10:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzu19VMKbgKcisDbFJx8c9RhJF5V6pbo0ExksqmSiFpbWX4OECxWj/ftox4OIHXINMvriN X-Received: by 2002:a05:6a00:2a08:b0:6ce:2731:d5c8 with SMTP id ce8-20020a056a002a0800b006ce2731d5c8mr335876pfb.57.1701850204934; Wed, 06 Dec 2023 00:10:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701850204; cv=none; d=google.com; s=arc-20160816; b=lu9JP2WSJXHy+BX4aP7QZsK5owCqSHVJQbSXtE9zdBqjy34cPqSqOvKUuSelZEad8q SUaMGyU4/Q/Ir+9J1bB3eoww8+Dd3snTnJDpv79Tz2T+AjjoVOu15GBx+w+YUKs1eeio S+Fpmwp6aUPF49BxFMQkr+9sEGaBDvlQ4N1YSwFqwyNBToDhqtUYaYb/singDGyLySxE DG6INNkHuOSUjo5E5JslVoog6/SUwiczhfouFEhvaqKT+KTwYVIRNWvGC83lb3O6SwKj XBh3ePldcEbbU5LP42CpLKjvdQWmIUafXqABpYTrLChuaMJSFoKtolqHUKAVsyQ9haby txSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=B7G3OQPwJDFWry8x0QoTwA6RQDLqZhXzSJItslkCCzc=; fh=f/GFMFDCP1LtY5RyflnsOStyQqzzlZL8eT1hdCDMPzM=; b=kjAFBJO6DHctrSmaDvuXpcjg9AHOfSzSi0/4tlmvKmJ4o0qDLHwRqXjNH2gbe22NLV Ryv8+TYjdWoHQpBVLxocWtKcQHLkfatUkv3Tn4xXRrcVCkOHI2TrW7eTxUlHUA5nYmSX QYQWB7hTso/LGR0zzidPobQWIWnAabRd23htWeQH6oKGy+0ch7x3Y8TJ8Cu9WXhWEjLK da02Zg1/RKLZpd5WlwLsArhwvh4a/bNOabKmxYeP7PoaLyIRb3cdLaGa3atdJShD+wvq gxZRApTFozE65Pww2obgG16SjEIQHsvt+UG2+jEc+Yzj6k1dZS3VcRI4DRO5yD8OPd6s VeHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=rHlqdmRc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id s1-20020a056a00178100b006c4d1f0308bsi11162308pfg.262.2023.12.06.00.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 00:10:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=rHlqdmRc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 283AF8221128; Wed, 6 Dec 2023 00:10:01 -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 S1377059AbjLFIJq (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Wed, 6 Dec 2023 03:09:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376928AbjLFIJk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 6 Dec 2023 03:09:40 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3898E1BD for <linux-kernel@vger.kernel.org>; Wed, 6 Dec 2023 00:09:47 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1d048d38881so31431045ad.2 for <linux-kernel@vger.kernel.org>; Wed, 06 Dec 2023 00:09:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1701850186; x=1702454986; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=B7G3OQPwJDFWry8x0QoTwA6RQDLqZhXzSJItslkCCzc=; b=rHlqdmRcSVxfVggjeL6peeF5BQ42oaci5R5+lmlfBZt2HYmrjfX47v0oOVs4lKtsRj 6HVEnN/sfmkrNo6D3Xq6gjj9uZfWjTqd89T5dqmPJtKN5tYuai3De6eUl53kYXNB07Sp UYo3fLuOZqSyqGZNBTJ6whZsnyzGXLevy0hwINRffyvsdoNjc87H3TglPQSBOBn+kzRb j2c4D0MAGCqLo9szd4e0OODhSn3h6FBln9F7doqzJ2U9vlcxqvxhU0FNhCT9ZcVkTE5L h53+HKTbGo1e1HCb+50T2o/ZR57dRVfs3U0TlY1F4Siaf+h/BEvWLRv5RBt/qhU7+KMa IrGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701850186; x=1702454986; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B7G3OQPwJDFWry8x0QoTwA6RQDLqZhXzSJItslkCCzc=; b=CoQ6cRyteTVhfWRxpPDw4lnrS/bxC1n979l7+m+gjebdJddd44luZxC21zpiDAEI5r Oo94aHs+yuqRqJF612SRV/hl5xt368rVQrZqNXTIt2Xvt+4xS4aFyfTPUUzgXT4zzFuC 0xDiFDnDE/0NbImebLsX7uzi/4Wq88acSIIiP7dgYE+t3ikKMgyCcxMElKq3E7POHxja u57jgUs0BlJ5OKxwieJ3d4Srj5gaKJUkrR25bSpUwbPmMUxlR/abqjx+oAiE/x9Gk88w 0lxujjtTLnhJcrgoXMPNqOdb6RTIaqGDm59Zj03oh7yGL/6RjaKX3beGvbWJFVSQfnNe 8+LA== X-Gm-Message-State: AOJu0YxJ0n/hmIHF4xYLOEaYXt37yZO4mtTDgRWLmlMf9K9Z2YDGMKtq ivk0RLIzmVnva76zDrgXmLDyKw== X-Received: by 2002:a17:902:d4ca:b0:1d0:92a0:492a with SMTP id o10-20020a170902d4ca00b001d092a0492amr315004plg.85.1701850186736; Wed, 06 Dec 2023 00:09:46 -0800 (PST) Received: from [127.0.1.1] ([2601:1c2:1800:f680:92e9:8fb4:700:680]) by smtp.gmail.com with ESMTPSA id bd11-20020a170902830b00b001d0d312bc2asm1208668plb.193.2023.12.06.00.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 00:09:46 -0800 (PST) From: Drew Fustini <dfustini@baylibre.com> Date: Wed, 06 Dec 2023 00:09:22 -0800 Subject: [PATCH v8 2/4] riscv: dts: thead: Add TH1520 mmc controllers and sdhci clock MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231206-th1520_mmc_dts-v8-2-69220e373e8f@baylibre.com> References: <20231206-th1520_mmc_dts-v8-0-69220e373e8f@baylibre.com> In-Reply-To: <20231206-th1520_mmc_dts-v8-0-69220e373e8f@baylibre.com> To: Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Jisheng Zhang <jszhang@kernel.org>, Guo Ren <guoren@kernel.org>, Fu Wei <wefu@redhat.com>, Conor Dooley <conor@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> Cc: Jason Kridner <jkridner@beagleboard.org>, Robert Nelson <robertcnelson@beagleboard.org>, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Drew Fustini <dfustini@baylibre.com> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701850181; l=2206; i=dfustini@baylibre.com; s=20230430; h=from:subject:message-id; bh=WX/M7HdAU0IZKfaH27b7K6yGIPbBsFWLjtWUShpbf98=; b=mJSGrl+9jRd9jMRsr/5TkqPWw2MdzW4BN4WPzOcL1xcccZm3RhHte5T6gK5aHQvgLcgqwjv/d YG1vZhx3H+lAtaW1goqwPpaUUEAu6PXgQ4dQSHJZEGqF4PbwttfdQS7 X-Developer-Key: i=dfustini@baylibre.com; a=ed25519; pk=p3GKE9XFmjhwAayAHG4U108yag7V8xQVd4zJLdW0g7g= X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> 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]); Wed, 06 Dec 2023 00:10:01 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784519280575392345 X-GMAIL-MSGID: 1784519280575392345 |
Series |
RISC-V: Add MMC support for TH1520 boards
|
|
Commit Message
Drew Fustini
Dec. 6, 2023, 8:09 a.m. UTC
Add node for the fixed reference clock used for emmc and sdio nodes.
Add emmc node for the 1st dwcmshc instance which is typically connected
to an eMMC device. Add sdio0 node for the 2nd dwcmshc instance which is
typically connected to microSD slot. Add sdio1 node for the 3rd dwcmshc
instance which is typically connected to an SDIO WiFi module. The node
names are based on Table 1-2 C910/C906 memory map in the TH1520 System
User Manual.
Link: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
---
arch/riscv/boot/dts/thead/th1520.dtsi | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
Comments
Drew Fustini wrote: > Add node for the fixed reference clock used for emmc and sdio nodes. > Add emmc node for the 1st dwcmshc instance which is typically connected > to an eMMC device. Add sdio0 node for the 2nd dwcmshc instance which is > typically connected to microSD slot. Add sdio1 node for the 3rd dwcmshc > instance which is typically connected to an SDIO WiFi module. The node > names are based on Table 1-2 C910/C906 memory map in the TH1520 System > User Manual. > > Link: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs > Signed-off-by: Drew Fustini <dfustini@baylibre.com> Thanks! The rest of the patches look good too, but I don't really have a schematic to do proper review. Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> > --- > arch/riscv/boot/dts/thead/th1520.dtsi | 34 ++++++++++++++++++++++++++++++++++ > 1 file changed, 34 insertions(+) > > diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi > index ba4d2c673ac8..8b915e206f3a 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,33 @@ dmac0: dma-controller@ffefc00000 { > status = "disabled"; > }; > > + emmc: 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"; > + }; > + > + sdio0: 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"; > + }; > + > + sdio1: mmc@ffe70a0000 { > + compatible = "thead,th1520-dwcmshc"; > + reg = <0xff 0xe70a0000 0x0 0x10000>; > + interrupts = <71 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&sdhci_clk>; > + clock-names = "core"; > + status = "disabled"; > + }; > + > timer0: timer@ffefc32000 { > compatible = "snps,dw-apb-timer"; > reg = <0xff 0xefc32000 0x0 0x14>; > > -- > 2.34.1 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv
On Wed, Dec 06, 2023 at 04:10:28AM -0600, Emil Renner Berthing wrote: > Drew Fustini wrote: > > Add node for the fixed reference clock used for emmc and sdio nodes. > > Add emmc node for the 1st dwcmshc instance which is typically connected > > to an eMMC device. Add sdio0 node for the 2nd dwcmshc instance which is > > typically connected to microSD slot. Add sdio1 node for the 3rd dwcmshc > > instance which is typically connected to an SDIO WiFi module. The node > > names are based on Table 1-2 C910/C906 memory map in the TH1520 System > > User Manual. > > > > Link: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs > > Signed-off-by: Drew Fustini <dfustini@baylibre.com> > > Thanks! The rest of the patches look good too, but I don't really have > a schematic > to do proper review. > > Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Thanks for reviewing. The BeagleV-Ahead board is open source hardware so there is the full schematic and PCB layout in: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead Drew
On Wed, Dec 6, 2023 at 4:09 PM Drew Fustini <dfustini@baylibre.com> wrote: > > Add node for the fixed reference clock used for emmc and sdio nodes. > Add emmc node for the 1st dwcmshc instance which is typically connected > to an eMMC device. Add sdio0 node for the 2nd dwcmshc instance which is > typically connected to microSD slot. Add sdio1 node for the 3rd dwcmshc > instance which is typically connected to an SDIO WiFi module. The node > names are based on Table 1-2 C910/C906 memory map in the TH1520 System > User Manual. > > Link: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs > Signed-off-by: Drew Fustini <dfustini@baylibre.com> > --- > arch/riscv/boot/dts/thead/th1520.dtsi | 34 ++++++++++++++++++++++++++++++++++ > 1 file changed, 34 insertions(+) > > diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi > index ba4d2c673ac8..8b915e206f3a 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,33 @@ dmac0: dma-controller@ffefc00000 { > status = "disabled"; > }; > > + emmc: 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"; > + }; > + > + sdio0: 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"; > + }; > + > + sdio1: mmc@ffe70a0000 { > + compatible = "thead,th1520-dwcmshc"; > + reg = <0xff 0xe70a0000 0x0 0x10000>; > + interrupts = <71 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&sdhci_clk>; > + clock-names = "core"; > + status = "disabled"; > + }; > + > timer0: timer@ffefc32000 { > compatible = "snps,dw-apb-timer"; > reg = <0xff 0xefc32000 0x0 0x14>; > > -- > 2.34.1 > Reviewed-by: Guo Ren <guoren@kernel.org>
diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi index ba4d2c673ac8..8b915e206f3a 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,33 @@ dmac0: dma-controller@ffefc00000 { status = "disabled"; }; + emmc: 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"; + }; + + sdio0: 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"; + }; + + sdio1: mmc@ffe70a0000 { + compatible = "thead,th1520-dwcmshc"; + reg = <0xff 0xe70a0000 0x0 0x10000>; + interrupts = <71 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sdhci_clk>; + clock-names = "core"; + status = "disabled"; + }; + timer0: timer@ffefc32000 { compatible = "snps,dw-apb-timer"; reg = <0xff 0xefc32000 0x0 0x14>;