* [PATCH 1/2] riscv: dts: unleashed: Add gpio card detect to mmc-spi-slot
@ 2021-06-16 7:46 Bin Meng
2021-06-16 7:46 ` [PATCH 2/2] riscv: dts: unmatched: " Bin Meng
2021-07-08 13:40 ` [PATCH 1/2] riscv: dts: unleashed: " Bin Meng
0 siblings, 2 replies; 5+ messages in thread
From: Bin Meng @ 2021-06-16 7:46 UTC (permalink / raw)
To: Palmer Dabbelt, Paul Walmsley, David Abdurachmanov, linux-kernel,
linux-riscv
Cc: Bin Meng
From: Bin Meng <bin.meng@windriver.com>
Per HiFive Unleashed schematics, the card detect signal of the
micro SD card is connected to gpio pin #11, which should be
reflected in the DT via the <gpios> property, as described in
Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt.
[1] https://sifive.cdn.prismic.io/sifive/c52a8e32-05ce-4aaf-95c8-7bf8453f8698_hifive-unleashed-a00-schematics-1.pdf
Signed-off-by: Bin Meng <bin.meng@windriver.com>
---
arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
index 60846e88ae4b..22f971e97161 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
@@ -80,6 +80,7 @@ mmc@0 {
spi-max-frequency = <20000000>;
voltage-ranges = <3300 3300>;
disable-wp;
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
};
--
2.25.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] riscv: dts: unmatched: Add gpio card detect to mmc-spi-slot
2021-06-16 7:46 [PATCH 1/2] riscv: dts: unleashed: Add gpio card detect to mmc-spi-slot Bin Meng
@ 2021-06-16 7:46 ` Bin Meng
2021-07-08 13:40 ` [PATCH 1/2] riscv: dts: unleashed: " Bin Meng
1 sibling, 0 replies; 5+ messages in thread
From: Bin Meng @ 2021-06-16 7:46 UTC (permalink / raw)
To: Palmer Dabbelt, Paul Walmsley, David Abdurachmanov, linux-kernel,
linux-riscv
Cc: Bin Meng
From: Bin Meng <bin.meng@windriver.com>
Per HiFive Unmatched schematics, the card detect signal of the
micro SD card is connected to gpio pin #15, which should be
reflected in the DT via the <gpios> property, as described in
Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt.
[1] https://sifive.cdn.prismic.io/sifive/6a06d6c0-6e66-49b5-8e9e-e68ce76f4192_hifive-unmatched-schematics-v3.pdf
Signed-off-by: Bin Meng <bin.meng@windriver.com>
---
arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
index b1c3c596578f..214794363c6a 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
@@ -2,6 +2,7 @@
/* Copyright (c) 2020 SiFive, Inc */
#include "fu740-c000.dtsi"
+#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
/* Clock frequency (in Hz) of the PCB crystal for rtcclk */
@@ -228,6 +229,7 @@ mmc@0 {
spi-max-frequency = <20000000>;
voltage-ranges = <3300 3300>;
disable-wp;
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
};
--
2.25.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] riscv: dts: unleashed: Add gpio card detect to mmc-spi-slot
2021-06-16 7:46 [PATCH 1/2] riscv: dts: unleashed: Add gpio card detect to mmc-spi-slot Bin Meng
2021-06-16 7:46 ` [PATCH 2/2] riscv: dts: unmatched: " Bin Meng
@ 2021-07-08 13:40 ` Bin Meng
2021-11-24 16:58 ` Palmer Dabbelt
1 sibling, 1 reply; 5+ messages in thread
From: Bin Meng @ 2021-07-08 13:40 UTC (permalink / raw)
To: Palmer Dabbelt, Paul Walmsley, David Abdurachmanov, linux-kernel,
linux-riscv
Cc: Bin Meng
On Wed, Jun 16, 2021 at 3:46 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> From: Bin Meng <bin.meng@windriver.com>
>
> Per HiFive Unleashed schematics, the card detect signal of the
> micro SD card is connected to gpio pin #11, which should be
> reflected in the DT via the <gpios> property, as described in
> Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt.
>
> [1] https://sifive.cdn.prismic.io/sifive/c52a8e32-05ce-4aaf-95c8-7bf8453f8698_hifive-unleashed-a00-schematics-1.pdf
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---
>
> arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts | 1 +
> 1 file changed, 1 insertion(+)
>
Ping?
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] riscv: dts: unleashed: Add gpio card detect to mmc-spi-slot
2021-07-08 13:40 ` [PATCH 1/2] riscv: dts: unleashed: " Bin Meng
@ 2021-11-24 16:58 ` Palmer Dabbelt
0 siblings, 0 replies; 5+ messages in thread
From: Palmer Dabbelt @ 2021-11-24 16:58 UTC (permalink / raw)
To: bmeng.cn
Cc: Paul Walmsley, david.abdurachmanov, linux-kernel, linux-riscv, bin.meng
On Thu, 08 Jul 2021 06:40:03 PDT (-0700), bmeng.cn@gmail.com wrote:
> On Wed, Jun 16, 2021 at 3:46 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>>
>> From: Bin Meng <bin.meng@windriver.com>
>>
>> Per HiFive Unleashed schematics, the card detect signal of the
>> micro SD card is connected to gpio pin #11, which should be
>> reflected in the DT via the <gpios> property, as described in
>> Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt.
>>
>> [1] https://sifive.cdn.prismic.io/sifive/c52a8e32-05ce-4aaf-95c8-7bf8453f8698_hifive-unleashed-a00-schematics-1.pdf
>>
>> Signed-off-by: Bin Meng <bin.meng@windriver.com>
>> ---
>>
>> arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts | 1 +
>> 1 file changed, 1 insertion(+)
>>
>
> Ping?
Sorry I missed these, and thanks to David for pointing them out.
They're on fixes.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] riscv: dts: unmatched: Add gpio card detect to mmc-spi-slot
@ 2021-09-03 21:59 Ron Economos
0 siblings, 0 replies; 5+ messages in thread
From: Ron Economos @ 2021-09-03 21:59 UTC (permalink / raw)
To: linux-riscv
> From: Bin Meng <bin.meng at windriver.com <http://lists.infradead.org/mailman/listinfo/linux-riscv>>
>
> Per HiFive Unmatched schematics, the card detect signal of the
> micro SD card is connected to gpio pin #15, which should be
> reflected in the DT via the <gpios> property, as described in
> Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt.
>
> [1]https://sifive.cdn.prismic.io/sifive/6a06d6c0-6e66-49b5-8e9e-e68ce76f4192_hifive-unmatched-schematics-v3.pdf <https://sifive.cdn.prismic.io/sifive/6a06d6c0-6e66-49b5-8e9e-e68ce76f4192_hifive-unmatched-schematics-v3.pdf>
>
> Signed-off-by: Bin Meng <bin.meng at windriver.com <http://lists.infradead.org/mailman/listinfo/linux-riscv>>
> ---
>
> arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> index b1c3c596578f..214794363c6a 100644
> --- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> +++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> @@ -2,6 +2,7 @@
> /* Copyright (c) 2020 SiFive, Inc */
>
> #include "fu740-c000.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/interrupt-controller/irq.h>
>
> /* Clock frequency (in Hz) of the PCB crystal for rtcclk */
> @@ -228,6 +229,7 @@mmc at 0 <http://lists.infradead.org/mailman/listinfo/linux-riscv> {
> spi-max-frequency = <20000000>;
> voltage-ranges = <3300 3300>;
> disable-wp;
> + gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
> };
> };
>
> --
> 2.25.1
This is a very useful patch. When running the HiFive Unmatched board
without an SD card inserted, /var/log/syslog and dmesg gets spammed
every four seconds with:
|[Thu Aug 26 06:03:54 2021] mmc_spi spi1.0: no support for card's volts
[Thu Aug 26 06:03:54 2021] mmc0: error -22 whilst initialising SDIO card
This patch prevents that. Tested on HiFive Unmatched with Ubuntu 21.04
and v5.14.1 kernel. |
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-11-24 16:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 7:46 [PATCH 1/2] riscv: dts: unleashed: Add gpio card detect to mmc-spi-slot Bin Meng
2021-06-16 7:46 ` [PATCH 2/2] riscv: dts: unmatched: " Bin Meng
2021-07-08 13:40 ` [PATCH 1/2] riscv: dts: unleashed: " Bin Meng
2021-11-24 16:58 ` Palmer Dabbelt
2021-09-03 21:59 [PATCH 2/2] riscv: dts: unmatched: " Ron Economos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).