public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
From: Ron Economos <w6rz@comcast.net>
To: linux-riscv@lists.infradead.org
Subject: Re: [PATCH 2/2] riscv: dts: unmatched: Add gpio card detect to mmc-spi-slot
Date: Fri, 3 Sep 2021 14:59:33 -0700	[thread overview]
Message-ID: <33be320b-2f73-64bc-0ca5-029aaffc59aa@comcast.net> (raw)

> 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

             reply	other threads:[~2021-09-08  0:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 21:59 Ron Economos [this message]
  -- strict thread matches above, loose matches on Subject: below --
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=33be320b-2f73-64bc-0ca5-029aaffc59aa@comcast.net \
    --to=w6rz@comcast.net \
    --cc=linux-riscv@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox