linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: bcm2711: Use bcm2711 compatible for sdhci
@ 2020-01-20  4:17 Stephen Brennan
  2020-01-20  8:59 ` Matthias Brugger
  2020-01-20 11:03 ` Nicolas Saenz Julienne
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Brennan @ 2020-01-20  4:17 UTC (permalink / raw)
  To: Nicolas Saenz Julienne
  Cc: Stephen Brennan, Rob Herring, Mark Rutland, devicetree,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-arm-kernel,
	linux-kernel

When booting Raspberry Pi 4B using a micro SDHC UHS class 1 card, the SD
card partitions never appear in /dev.  According to the device tree
bindings for Broadcom IPROC SDHCI controller, we should use
"brcm,bcm2711-emmc2" compatible string on BCM2711. Set this compatible
string, which allows these cards to be mounted.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
---
 arch/arm/boot/dts/bcm2711.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
index b64865ad5a41..48e3b0162bda 100644
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -853,6 +853,7 @@ &mailbox {
 };
 
 &sdhci {
+	compatible = "brcm,bcm2711-emmc2";
 	interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
 };
 
-- 
2.24.0




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: bcm2711: Use bcm2711 compatible for sdhci
  2020-01-20  4:17 [PATCH] ARM: dts: bcm2711: Use bcm2711 compatible for sdhci Stephen Brennan
@ 2020-01-20  8:59 ` Matthias Brugger
  2020-01-20 11:03 ` Nicolas Saenz Julienne
  1 sibling, 0 replies; 5+ messages in thread
From: Matthias Brugger @ 2020-01-20  8:59 UTC (permalink / raw)
  To: Stephen Brennan, Nicolas Saenz Julienne
  Cc: Mark Rutland, devicetree, linux-kernel, Rob Herring,
	bcm-kernel-feedback-list, linux-arm-kernel, linux-rpi-kernel



On 20/01/2020 05:17, Stephen Brennan wrote:
> When booting Raspberry Pi 4B using a micro SDHC UHS class 1 card, the SD
> card partitions never appear in /dev.  According to the device tree
> bindings for Broadcom IPROC SDHCI controller, we should use
> "brcm,bcm2711-emmc2" compatible string on BCM2711. Set this compatible
> string, which allows these cards to be mounted.
> 
> Signed-off-by: Stephen Brennan <stephen@brennan.io>
> ---
>  arch/arm/boot/dts/bcm2711.dtsi | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
> index b64865ad5a41..48e3b0162bda 100644
> --- a/arch/arm/boot/dts/bcm2711.dtsi
> +++ b/arch/arm/boot/dts/bcm2711.dtsi
> @@ -853,6 +853,7 @@ &mailbox {
>  };
>  
>  &sdhci {
> +	compatible = "brcm,bcm2711-emmc2";
>  	interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
>  };
>  
> 

hm, sdhci is used to drive the wifi chip:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/bcm2711-rpi-4-b.dts?h=v5.5-rc7#n79

Are you sure you use the upstream devicetree?

Regards,
Matthias

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: bcm2711: Use bcm2711 compatible for sdhci
  2020-01-20  4:17 [PATCH] ARM: dts: bcm2711: Use bcm2711 compatible for sdhci Stephen Brennan
  2020-01-20  8:59 ` Matthias Brugger
@ 2020-01-20 11:03 ` Nicolas Saenz Julienne
  2020-01-20 19:59   ` Stephen Brennan
  1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Saenz Julienne @ 2020-01-20 11:03 UTC (permalink / raw)
  To: Stephen Brennan
  Cc: Mark Rutland, devicetree, linux-kernel, Rob Herring,
	bcm-kernel-feedback-list, linux-arm-kernel, linux-rpi-kernel

[-- Attachment #1: Type: text/plain, Size: 892 bytes --]

Hi Stephen,

On Sun, 2020-01-19 at 20:17 -0800, Stephen Brennan wrote:
> When booting Raspberry Pi 4B using a micro SDHC UHS class 1 card, the SD
> card partitions never appear in /dev.  According to the device tree
> bindings for Broadcom IPROC SDHCI controller, we should use
> "brcm,bcm2711-emmc2" compatible string on BCM2711. Set this compatible
> string, which allows these cards to be mounted.
> 
> Signed-off-by: Stephen Brennan <stephen@brennan.io>

Your UHS class 1 card should work out of the box using the current kernel
version. Note that the device node is defined here:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/bcm2711.dtsi?h=v5.5-rc7#n255

and enabled here:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/bcm2711-rpi-4-b.dts?h=v5.5-rc7#n98

Regards,
Nicolas


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: bcm2711: Use bcm2711 compatible for sdhci
  2020-01-20 11:03 ` Nicolas Saenz Julienne
@ 2020-01-20 19:59   ` Stephen Brennan
  2020-01-20 20:01     ` Nicolas Saenz Julienne
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Brennan @ 2020-01-20 19:59 UTC (permalink / raw)
  To: Nicolas Saenz Julienne
  Cc: Mark Rutland, devicetree, linux-kernel, Rob Herring,
	bcm-kernel-feedback-list, linux-arm-kernel, linux-rpi-kernel

Hi Nicolas,

You're right, this patch doesn't work (it doesn't even touch the correct 
device tree node). My bad.

> Your UHS class 1 card should work out of the box using the current
> kernel version.

I've been debugging an issue (reproduced on today's linux-next) in which my 
UHS class 1 card's partitions don't show up in `/dev`. For example, if I do 
`ls /dev | grep mmc`, I get just one result, "mmcblk1". I thought my patch 
fixed the issue, but it turns out that the issue is sporadic: on some 
boots, the issue manifests. On others, the partitions appear in /dev as 
normal. When I tested this patch, the issue had sporadically disappeared, 
leading me to believe the patch was effective.

Sorry for the noise! If you have any suggestions on debugging this, I'd 
appreciate it. As far as I know it could be anything - the particular card, 
the particular Pi, etc.

Thanks,
Stephen


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: bcm2711: Use bcm2711 compatible for sdhci
  2020-01-20 19:59   ` Stephen Brennan
@ 2020-01-20 20:01     ` Nicolas Saenz Julienne
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Saenz Julienne @ 2020-01-20 20:01 UTC (permalink / raw)
  To: Stephen Brennan
  Cc: Mark Rutland, devicetree, linux-kernel, Rob Herring,
	bcm-kernel-feedback-list, linux-arm-kernel, linux-rpi-kernel

Hi Stephen,

On Mon Jan 20, 2020 at 11:59 AM, Stephen Brennan wrote:
> Hi Nicolas,
>
> You're right, this patch doesn't work (it doesn't even touch the correct
> device tree node). My bad.
>
> > Your UHS class 1 card should work out of the box using the current
> > kernel version.
>
> I've been debugging an issue (reproduced on today's linux-next) in which
> my
> UHS class 1 card's partitions don't show up in `/dev`. For example, if I
> do
> `ls /dev | grep mmc`, I get just one result, "mmcblk1". I thought my
> patch
> fixed the issue, but it turns out that the issue is sporadic: on some
> boots, the issue manifests. On others, the partitions appear in /dev as
> normal. When I tested this patch, the issue had sporadically
> disappeared,
> leading me to believe the patch was effective.

Have you been playing with different device-trees? notably with the
Raspberry Pi foundation ones. Your mmc numbers could change, which might
be confusing.

If 100% sure it's failing, i.e. nothing happens for the mmc device after
seeing:

	mmc1: SDHCI controller on fe340000.emmc2 [fe340000.emmc2] using ADMA

I suggest enabling some extra debug options. Build the kernel with
DYNAMIC_DEBUG enabled and add dyndbg="module sdhci +mfp; module mmc_core
+mfp" to your kernel command line. It'll be extremely verbose for the
working case, but we can compare both and try to find something fishy.

Note that I use two UHS class 1 cards myself without issue.

> Sorry for the noise!

On the contrary, the more we are the better :)

Regards,
Nicolas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-21 10:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20  4:17 [PATCH] ARM: dts: bcm2711: Use bcm2711 compatible for sdhci Stephen Brennan
2020-01-20  8:59 ` Matthias Brugger
2020-01-20 11:03 ` Nicolas Saenz Julienne
2020-01-20 19:59   ` Stephen Brennan
2020-01-20 20:01     ` Nicolas Saenz Julienne

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).