From patchwork Wed Dec 6 08:09:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 13481186 X-Patchwork-Delegate: palmer@dabbelt.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6949BC4167B for ; Wed, 6 Dec 2023 08:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kM82fo9/PS9EshiWGcmUOA3DjLIg5qcw8BtqkWe2qJQ=; b=4jBIs7+ExH6b5P bLI+xPFm1z22akHHWsKqmeDF8/5WtegrU3T0MlqWbnjeaEvC+A0msIptXJMAASLMJctbOTGU9svsJ 7+V6eZ/JUh1qlrO3lO1asROmFx7c4WT81Bv3HZ/EFQggIghLObkmKrI1FCnmzlNkrmgRb+qoW0bGw mOyvcjU8NCVlSW3Lvn3nv6wnfbj3mo43fjhrgomgwp4hBUJaoRSeL22dmgP29ku+FZYEpCPs1TIBW gCI3wdCiITmKwO8JqhZOEqZ5keu4vb60XIl5y8YH0Kofavv3GlnuzjF/mSgJnf8xsLn5pM0hnRFJi 2oF1s5hsike0clah6Opg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rAmyc-009M90-1F; Wed, 06 Dec 2023 08:09:50 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAmyY-009M6l-1M for linux-riscv@lists.infradead.org; Wed, 06 Dec 2023 08:09:48 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1d0b2752dc6so24371915ad.3 for ; Wed, 06 Dec 2023 00:09:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1701850185; x=1702454985; darn=lists.infradead.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=zUhuNFsiAvrHYnZLi2Em140Y4QPJessaIPRDZmEdsMw=; b=GwPWj8ITsAyUoAwFNd3MI9AF7qBA+ucoNGoNJ1F+vxX6IuclAMqda6LMT7jorY/GcE mY4irH/hZk9d5XfyaazApWBIoNgU9+DlCN1H2gIgvoszeJdFcgmuT4nbN1eEFtGFzIqh cSsJdgFGbFztCe2MnJ6dtKk7Xkn/RJhHs2uXL8o4IPbKAc/LUMy6DXiTGM3cHhtkselC EvsUHaDZrqvXGBlFsLiwIZE5soSagybSCKq6kb2KV78KCZUnDxqy1yVjnN+fCVUF/XjU E/LjtbFlhbtla2emM1txFJR1sLuRilelqFDzYMLKJznLtXtwO8OkLfyl4QhQ4oMwpwfe SRmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701850185; x=1702454985; 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=zUhuNFsiAvrHYnZLi2Em140Y4QPJessaIPRDZmEdsMw=; b=u7Hs9i+DUoC9qWvGbVZr/apz2djpMXlec9BRweBnDZ6h93kUdfBs1tivcX5Sym2WYD L4fT/o3HoyhoE0ELO+8Y+iu8kJyCmoJu5UF71UuOaCXN/b132B+rvwcSNL/2X1/g8d07 xIkfljPTgW5iaH4+HaRdmx//1RmW5zVRm5c6Xz/AXYYCiGPEydQ8c8g5G9pIZ0TT59/Z eYGyBT3dlT0C0zJbcTqnFtJ5ludNSwhZwZIaVZVJkGdKC5JAiQ7Sq89C0qBwrUSHyjnk thuXwSnCRcIxELQPGPrNWCAHU6ANq1DXZ4wtC/l8VgRfyTqHR5lrD3DYTaU7wHz3Vnc6 qqpw== X-Gm-Message-State: AOJu0YxNY5+lOQQx+njN4mi9Ub3N8dckeWQLhfGfDLTLjA77e4ngKLgw vU2bnuJjvXE8aBOV6LOpXIRDWg== X-Google-Smtp-Source: AGHT+IH3gRYGjosEd0BiJj75NNhlV088XtZ8mMy8bZQeahdEBG8P85BdfI6y2nZrTFPSVoonaAxNwA== X-Received: by 2002:a17:902:b08e:b0:1d0:cd9e:424b with SMTP id p14-20020a170902b08e00b001d0cd9e424bmr475933plr.43.1701850185075; Wed, 06 Dec 2023 00:09:45 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 00:09:44 -0800 (PST) From: Drew Fustini Date: Wed, 06 Dec 2023 00:09:21 -0800 Subject: [PATCH v8 1/4] riscv: defconfig: Enable mmc and dma drivers for T-Head TH1520 MIME-Version: 1.0 Message-Id: <20231206-th1520_mmc_dts-v8-1-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 , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Guo Ren , Fu Wei , Conor Dooley , Rob Herring , Krzysztof Kozlowski Cc: Jason Kridner , Robert Nelson , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Drew Fustini X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701850181; l=951; i=dfustini@baylibre.com; s=20230430; h=from:subject:message-id; bh=4RIHUzQaxou3jWGQo/iOBjqUj+fsmX35ctdJCieIZQA=; b=MY1Zn/vpteELgknAAqVIXREnspLxXc/K9fvkAmxIH0O5NBcwu6+SJNZDx/iNZIPHhcMKHzFZn HlK6cjYNyhFADzUsGzTvSSr8g8A+4qXhyxs+w65zE8Zyoc9DoL/xiiI X-Developer-Key: i=dfustini@baylibre.com; a=ed25519; pk=p3GKE9XFmjhwAayAHG4U108yag7V8xQVd4zJLdW0g7g= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231206_000946_457853_97179870 X-CRM114-Status: UNSURE ( 7.90 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Enable the mmc controller driver and dma controller driver needed for T-Head TH1520 based boards, like the LicheePi 4A and BeagleV-Ahead, to boot from eMMC storage. Reviewed-by: Guo Ren Signed-off-by: Drew Fustini Reviewed-by: Emil Renner Berthing --- arch/riscv/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig index 905881282a7c..e635dc9d1997 100644 --- a/arch/riscv/configs/defconfig +++ b/arch/riscv/configs/defconfig @@ -214,6 +214,7 @@ CONFIG_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y CONFIG_MMC_SDHCI_CADENCE=y +CONFIG_MMC_SDHCI_OF_DWCMSHC=y CONFIG_MMC_SPI=y CONFIG_MMC_DW=y CONFIG_MMC_DW_STARFIVE=y @@ -223,6 +224,7 @@ CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_SUN6I=y CONFIG_DMADEVICES=y CONFIG_DMA_SUN6I=m +CONFIG_DW_AXI_DMAC=y CONFIG_RZ_DMAC=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_BALLOON=y From patchwork Wed Dec 6 08:09:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 13481184 X-Patchwork-Delegate: mail@conchuod.ie Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BB962C10F09 for ; Wed, 6 Dec 2023 08:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=apYSqNR0gCHXdjC6WaBFnzu2kOTJeC0MbyRQViJlpcU=; b=vJg5e4KyRlRElI 9upUegvFeZFppDefyZQZfRHXv3wE51JlusRURBHyxfLS5jSRXyQ55s8W7/WYfeayhVapjDAs/M563 nn2FLdBjBVkkZas2kmbI/Pl/ByPm02F7jY5tSNo0TH+4GazUbUeu28nCcvCrfGuITv1wsix2O8MfD 1V0nygVvzq3XUlZ/eaW7ATwjOojUvB8HT54KnIyx0jR/iHOLtDUJk9xHStXr/TTf3Wgcblu3wETM6 UDL3dY+0OVcZselNw0UgO7GNgm0riO7nguqfuikWw3BLeSPSPBkJKT0qf3whpNhlGtVdpNIqlheud tTowCuGkxJK8YobdS1xw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rAmyf-009MB1-13; Wed, 06 Dec 2023 08:09:53 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAmya-009M7E-0H for linux-riscv@lists.infradead.org; Wed, 06 Dec 2023 08:09:49 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1d045097b4cso31526555ad.0 for ; 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=lists.infradead.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=eAnjXagW4jTXYadhAMSObQIP2qCL9Aj2CaC4c3cWzCEou8ToGtv4ov5qOASpZbtasS UTUlJAmHU38hWD0H4MpSZ98noUO2JoDIK/FNEfsiTa1FtCI8rFl2kaaui4XAnpt6vCZn y7iVr06fNREyE/2QrGjU1UKD0uP6dkqDGN0VIa8gJDzTNTvOkqRxWUd4JURPgDoPvUHP hbFwpuKMJoB2mA/4fH8DAROVzmNk9ZYm7Pw5YSW/rwQJ0GFjhE7G5bmT1uM//++acybE ltq1tRjiXjvkxdq3XN4Zqr53IeZUdz5bQrj+aVUdxm8sVTFJmJHY5tCNF4DxBSFopKgG 2RBg== 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=eYy8IkBgypDT2un65rPrDKR8A87Cx11CC6ITocoFPXQ5/hssnJWXgC2U2os0xEBHL5 KSfIsoZM6KqDbX2ejNLbINKhITS5621IA5jjmglE9ZadXxMaMujJKWZkpY3cksQXfrUG LC9O1OsOfk5mTkWfufzBoPPXgymt5XyGKH8p4/V1bNEnffE4kcw+7Pnz4gtK1lUxb1nw 0W1ronnmS53jjTXX14zXAk0ZZj1bORCXFk8oXnoqHMg8GDJsXm/Y4psj5aOEvhyiPWJE LIdp3K8hw8baSK43UHhnHPTH7jW+xqXfYaN8uCTZSZqJm42stcdgTUxDy3SVIxEsG3Ec wlUQ== X-Gm-Message-State: AOJu0YwJXsW4U7vnKr5E2uhNZcdyPwPVAwEbDOF6dnaDysVmYdEI9eJD chbXyNnvgs9k9YSKiPx+g7oXbA== X-Google-Smtp-Source: AGHT+IGNzyBdiIZfQ4DF4XuOmGyKRZni2mP3PRV/P2h5TceAkWm7j9RgEST9AXGECkznBpWFXNgC3g== 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 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 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 , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Guo Ren , Fu Wei , Conor Dooley , Rob Herring , Krzysztof Kozlowski Cc: Jason Kridner , Robert Nelson , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Drew Fustini 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231206_000948_122308_ABA88995 X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Emil Renner Berthing Reviewed-by: Guo Ren --- 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>; From patchwork Wed Dec 6 08:09:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 13481185 X-Patchwork-Delegate: mail@conchuod.ie Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2F7FAC10DC1 for ; Wed, 6 Dec 2023 08:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cWODlNg5vc8C/gMX1yfWIhs7aGG7gR7+ob/GQ65Z20o=; b=Yzzh0fU5wA+AYI XLEJBLqzF9TElkdYnyJbVtDdE5bUzJPlcFdmaYovQp2bJqLknEQP5xUUDZZR88tICFwUe42YO6mmJ 1d8wlzgytg3ZNoz5T0iBxBPurCdqLi2FLL1OwYC/Y058CrmFfHjSoZPrLKN5u0grtiUGwKVJduWKS iCdru4FP6mF93vojoQhA95qna58/+K3RUL3gDrCLj40qIAlPUQ9EbdIfBUkOSTA6o1wP7Ilvgs8Cp oJ+BdYUbLkawq20XIkbE/4/1NM0LKlPeDwQmv7Kae6jCahcquFvzj4G6kDzY/1Tnmjd/k3Y8Fu0fZ Owl7Gxbqj02Q1k+PnGiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rAmyf-009MBW-34; Wed, 06 Dec 2023 08:09:53 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAmya-009M7h-32 for linux-riscv@lists.infradead.org; Wed, 06 Dec 2023 08:09:50 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1d0ccda19eeso9586715ad.1 for ; Wed, 06 Dec 2023 00:09:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1701850188; x=1702454988; darn=lists.infradead.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=LbmBzwUY0t2HlseySntw7VHVz6E41O0M8Fv31kHjYNc=; b=3XA/GLHJCRnLUnjAt3XkSOjo7dLuddspQTKNOrpyR5ybMC2mouwXEkpICH2kqQh2iy xP/9dm9472j81TmCLUdzKyBOlwIogLlQo5kBHDP3a81Axi288vJWKfrAeXA7FEl5JKib zM7L23UHh2Mwbt2Ao8NU49ECvYH1qx1smK3rfF/b8DqWwGuk7mJ0mfjlDYXSOxRJ4KF5 h14l6IKV8+YsXHo1ap5bjCEVfnYyx4GKCpeZAcVeaEVdGLbIjute39EgixK+Z76qB6Pv RUhxyjH3rP4da5ne/qAUdZUIXipjaZtcBeORaGmhKk5um+hsIu7SdG3Okh7Dg/cf7ejJ q+4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701850188; x=1702454988; 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=LbmBzwUY0t2HlseySntw7VHVz6E41O0M8Fv31kHjYNc=; b=jLsrB1dlvej58Xu9/5vwqC2o+v2CVd2V3kZiVk4x5Y/tf5OTbqCihZy2hbfVfGH1Hp TUku+hg3/+c1yCmXAOFKOzEo6U9Pl+OepPAY7y5fEelxNDp7f8f9IDhrbru9nX80IMRW kHm6zSw2jKcGuXhjxzNL0GOg0WmV9Yz5HF4DIi74vR7mjn6Z82hOsW/M9fPicyWHDVO7 TWBHuVsfgkwSHgUeddSCgwtqBKupu2Hwn/9BT2vni+ELGmCGuDXtuuclytdXDMcT/Htm Lj3GaGCaS4WVrfyFvmGl4qtG6/miMud/0PuwfR1K7LvGXg7e0rxwAVa4B/706RH5XDtR 8sAA== X-Gm-Message-State: AOJu0YwMQkbeos7fwHXpc7vY8/dgEYULr2MKJ8Pzib9Swev3mSkuNaDZ rvFKs1cn8wk1Wnv5FV3TOh0umA== X-Google-Smtp-Source: AGHT+IG+IVNu440mrvRBStKIEhon2ZDqZu9o/4ngZUUVarpEskLvBTGXAYNAbp4uL1sBhOVHpCI+pQ== X-Received: by 2002:a17:903:555:b0:1d0:6ffe:1e85 with SMTP id jo21-20020a170903055500b001d06ffe1e85mr298277plb.104.1701850188352; Wed, 06 Dec 2023 00:09:48 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 00:09:48 -0800 (PST) From: Drew Fustini Date: Wed, 06 Dec 2023 00:09:23 -0800 Subject: [PATCH v8 3/4] riscv: dts: thead: Enable BeagleV Ahead eMMC and microSD MIME-Version: 1.0 Message-Id: <20231206-th1520_mmc_dts-v8-3-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 , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Guo Ren , Fu Wei , Conor Dooley , Rob Herring , Krzysztof Kozlowski Cc: Jason Kridner , Robert Nelson , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Drew Fustini X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701850181; l=1131; i=dfustini@baylibre.com; s=20230430; h=from:subject:message-id; bh=hHAbb4qtRlHdob9grY86/6CrB93uiLQSe6D5Pf4bJ6w=; b=a3RjXkzF5S6RuHE5jVRda77tdw9TE8uVsvTL+GIZkd2GPapFmSTRl6NNWqrVwaVtoNrubatFW CldudAcR7JPAYR6Lyqy0D8NDNk3WsZOzEwuNW+fxyDBbe6NCHsQ8Z6Q X-Developer-Key: i=dfustini@baylibre.com; a=ed25519; pk=p3GKE9XFmjhwAayAHG4U108yag7V8xQVd4zJLdW0g7g= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231206_000948_978778_9AC1DBF1 X-CRM114-Status: UNSURE ( 8.36 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add emmc node properties for the eMMC device and add sdio0 node properties for the microSD slot. Set the frequency for the sdhci reference clock. Signed-off-by: Drew Fustini Reviewed-by: Guo Ren --- arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts index 70e8042c8304..d9b4de9e4757 100644 --- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts @@ -48,6 +48,10 @@ &apb_clk { clock-frequency = <62500000>; }; +&sdhci_clk { + clock-frequency = <198000000>; +}; + &uart_sclk { clock-frequency = <100000000>; }; @@ -56,6 +60,22 @@ &dmac0 { status = "okay"; }; +&emmc { + bus-width = <8>; + max-frequency = <198000000>; + mmc-hs400-1_8v; + non-removable; + no-sdio; + no-sd; + status = "okay"; +}; + +&sdio0 { + bus-width = <4>; + max-frequency = <198000000>; + status = "okay"; +}; + &uart0 { status = "okay"; }; From patchwork Wed Dec 6 08:09:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 13481183 X-Patchwork-Delegate: mail@conchuod.ie Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A4661C10F07 for ; Wed, 6 Dec 2023 08:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8GFDqU2TIay2hQ+3Pc4LkCjCh9eRPsbt2SvwB2I1MtE=; b=MbePm6dG4nq8bv 8OGyGhNeRRsJdaCUytUIvZ+O3tyIat6rnKPosFK59D0aLRODHHb9cpsQ5yDWFmIpXiFmfoIUNPfBA sjcTZ7qIUeyMd4rRsAdMEGzlYe9SNQHk/aEYDMtkWCu1CIulCxVevqu3/kPQYSd4ayV6ywL64adkO DoZ1kKioQaaGDfg8O3mE7o/BUbNtjm5t1F3Swe+nWzd1ZeC7q7fl1abseoRopwmmu/k0GAd0rBSRM 3S7Xc2RekO3bbu1usF6SgFtxwR8cCCJ+Hg9kUeDNIhvXaS37x3MFvjkEdDprRvXYm41kWXNNC5U+m jH+z9bmiHrj75nXUOZBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rAmyh-009MCC-0G; Wed, 06 Dec 2023 08:09:55 +0000 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAmyd-009M93-22 for linux-riscv@lists.infradead.org; Wed, 06 Dec 2023 08:09:52 +0000 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-5c5f0e325a6so2567732a12.1 for ; Wed, 06 Dec 2023 00:09:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1701850190; x=1702454990; darn=lists.infradead.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=1pIpUFLzpCT8QDWNeKsRiOFIfK00T0l+KbsCecbFYJw=; b=whI72HnR9u6S3pX64gK9qrx/T/xUodMJte5jC933kzADx3ZTSR03fmvk6Mwf2I3dA9 pnABypZ1YnBY8f2tbL7VO18Sooa17W5r6er+m74gVSWXgV7Ic6U4h8LEIbSQ7URP/QUh 8jX4pIzzfQ9/jxKHqQVzliDvuYOiqudz5EWPdj50yKsjG+1L9NXql5qGsdN+9Sszfm/l xPBVWvRNu1j/OI+UIR882HZEoFbFGljjfD0eMRygCPFRwlJnO7oN8aXSXPAPPl2aDyhL WdeX5yPrXKWql9V3lG1IYB+fE4sQ9ZQOqGGAkNY3eVFNMFpPhJE9IysrJcb5jjgY+ZWI Er1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701850190; x=1702454990; 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=1pIpUFLzpCT8QDWNeKsRiOFIfK00T0l+KbsCecbFYJw=; b=EO+EPmaTD7Gu5QA+PF9JRgScd4C11sHWhfUq8TbFkQ6o7jRtYiwC5GV3npM33HaBa5 aGBOdR2twLIhOibMqapBJmx/7Ycj8Rxdt8gieK4B6Um/OUw6DoToc6hfAdjvXYxZjKZB uztyRNURiFOIJmdz4JNRzHAo+y7wstM8AnCxj8I+xPO1EZcI4RQjX9fhekiKgB2L7ckG 8LjjdbgeNIcnoBFfRKsn+vLDE9MvRRgBTRyn3bpbKDzPNh3kfskATaba3BAF36MMz80t SF0cSLI2ilNcIHJ4G7pEncDNcPpPYpp8ge12aqD/PQ44sNRBwOxylCxVoJeqYiDh0Gud Gikg== X-Gm-Message-State: AOJu0Yxv2FWEBbYXsP65LuYAK9O0zSirTKD+DF1S2khRyS57gf9oCXr/ HSFSHJlNSptlwNACE39hAlynVw== X-Google-Smtp-Source: AGHT+IEldF6NX4UdDsjXNYhsE6P1JkJbILpm78gIrKcVPLzHcmb7S4JEk4u7SzdUVicpnDM1Ua9f6g== X-Received: by 2002:a05:6a20:a296:b0:18b:556b:6d54 with SMTP id a22-20020a056a20a29600b0018b556b6d54mr173291pzl.55.1701850190073; Wed, 06 Dec 2023 00:09:50 -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.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 00:09:49 -0800 (PST) From: Drew Fustini Date: Wed, 06 Dec 2023 00:09:24 -0800 Subject: [PATCH v8 4/4] riscv: dts: thead: Enable LicheePi 4A eMMC and microSD MIME-Version: 1.0 Message-Id: <20231206-th1520_mmc_dts-v8-4-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 , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Guo Ren , Fu Wei , Conor Dooley , Rob Herring , Krzysztof Kozlowski Cc: Jason Kridner , Robert Nelson , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Drew Fustini X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701850181; l=1125; i=dfustini@baylibre.com; s=20230430; h=from:subject:message-id; bh=yYq9cxJ0lp7+Eh78pcwxzBZNnaFwpVwT9d+26rl94NA=; b=jb8cqdanu6l93Jt+/zm1d32I4d8zOII7x4Qcm78W4yozsuLULYbPulbeM3HeDuy8xujWKAlu1 +CIVjtZVPG4DWogtFtk7DWr68Pb8l0gdFp+jKqI0Ni+kiynhHX+9F9u X-Developer-Key: i=dfustini@baylibre.com; a=ed25519; pk=p3GKE9XFmjhwAayAHG4U108yag7V8xQVd4zJLdW0g7g= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231206_000951_674257_072B2EFC X-CRM114-Status: UNSURE ( 8.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add emmc node properties for the eMMC device and add sdio0 node properties for the microSD slot. Set the frequency for the sdhci reference clock. Signed-off-by: Drew Fustini Reviewed-by: Guo Ren Signed-off-by: Drew Fustini --- .../boot/dts/thead/th1520-lichee-module-4a.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi index a802ab110429..1365d3a512a3 100644 --- a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi +++ b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi @@ -29,6 +29,10 @@ &apb_clk { clock-frequency = <62500000>; }; +&sdhci_clk { + clock-frequency = <198000000>; +}; + &uart_sclk { clock-frequency = <100000000>; }; @@ -36,3 +40,19 @@ &uart_sclk { &dmac0 { status = "okay"; }; + +&emmc { + bus-width = <8>; + max-frequency = <198000000>; + mmc-hs400-1_8v; + non-removable; + no-sdio; + no-sd; + status = "okay"; +}; + +&sdio0 { + bus-width = <4>; + max-frequency = <198000000>; + status = "okay"; +};