Devicetree
 help / color / mirror / Atom feed
From: "Kryštof Černý" <cleverline1mc@gmail.com>
To: Stefan Wahren <wahrenst@gmx.net>, Mark Brown <broonie@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Ray Jui <ray.jui@broadcom.com>,
	Scott Branden <scott.branden@broadcom.com>,
	Kanak Shilledar <kanakshilledar111@protonmail.com>,
	Florian Fanelli <f.fainelli@gmail.com>
Cc: "Conor Dooley" <conor.dooley@microchip.com>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	"Miroslav Ondra" <ondra@faster.cz>,
	"Matouš Hýbl" <hyblmatous@gmail.com>
Subject: Re: [PATCH 4/4] ARM: dts: broadcom: bcm2711: Add DMA to sdhost
Date: Tue, 1 Dec 2026 14:43:09 +0100	[thread overview]
Message-ID: <26135f2a-1a0a-4297-b526-2e206ee0d0e0@gmail.com> (raw)
In-Reply-To: <484e2b18-e282-4543-9058-3c472e6212e5@gmx.net>

Hello Stefan,
thank you for reviews.

Dne 29.11.2026 v 21:04 Stefan Wahren napsal(a):
> Am 27.11.26 um 16:21 schrieb Kryštof Černý via B4 Relay:
>> From: Kryštof Černý <cleverline1mc@gmail.com>
>>
>> On BCM2835/6/7, sdhost gets its DMA channel from bcm2835-common.dtsi.
>> Commit 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support")
>> added the BCM2711 DMA controller but gave sdhost no channel, so a
>> BCM2711 board that enables sdhost runs it in PIO mode:
>>
>>    sdhost-bcm2835 fe202000.mmc: unable to initialise DMA channel. 
>> Falling back to PIO
>>
>> Add the same dmas as on BCM2835/6/7; the BCM2711 legacy DMA engine uses
>> the same DREQ number.
>>
>> Tested on a Raspberry Pi 4 B: the driver gets its channel and reports
>> "DMA enabled". Nothing on that board is wired to the sdhost pins, so
>> transfers are untested.
>>
>> Fixes: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support")
> Disclaimer: I never tested SDHOST interface on Raspberry Pi 4. But 
> according to [1] the pins should be the same as the EMMC2 interface. So 
> in theory this only requires a change of the muxing.
> 
> For this change it would be better to have:
> - this really tested (e.g. with an SD card)
> - a real use case in the commit message
> 
> Best regards

I do not have a real use case for this interface, it is not used in 
products I am working on. Purpose of this patch is purely to make 
downstream closer to upstream, so I am okay if you decide we should drop 
this patch.

Hypothetical use case would be second SD card on Raspberry Pi 4B. 
Customers like to store data and the USB is outside and is less 
mechanically reliable than USB slot outside. No PCI-E present.

I tried to test it, but I do not have a reliable tooling for it. I have 
tested it with a micro SD adapter, that is meant to be used with SPI, 
not SD, so there are some random bias resistors and capacitors and two 
data lines are missing. Also my jumper wires were very thin and long, so 
probably EMI issues were present.

Test (50 MHz on 1-bit, 1 MiB blocks):

Read:
PIO: 6.2 MB/s, 12130/s interrupts from sdhost (mmc2), 100% usage of cpu core
DMA: 6.1 MB/s, 23/s interrupts DMA - none from sdhost, negligible cpu usage

Write:
failing on both PIO and DMA, not sure if an issue with driver or my test 
harness. On PIO fails entirely, on DMA every last written sector lost.

I will remove this patch from next series if you conclude the arguments 
are weak. I am ready to send it as soon as you decide it.

Thanks again for your assistance.
Kryštof

> 
> [1] - https://elinux.org/RPi_BCM2711_GPIOs
>> Signed-off-by: Kryštof Černý <cleverline1mc@gmail.com>
>> ---
>>   arch/arm/boot/dts/broadcom/bcm2711.dtsi | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/broadcom/bcm2711.dtsi b/arch/arm/boot/ 
>> dts/broadcom/bcm2711.dtsi
>> index 0680a0b1ca67..e18f11fb7f00 100644
>> --- a/arch/arm/boot/dts/broadcom/bcm2711.dtsi
>> +++ b/arch/arm/boot/dts/broadcom/bcm2711.dtsi
>> @@ -1155,6 +1155,8 @@ &sdhci {
>>   &sdhost {
>>       interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
>> +    dmas = <&dma 13>;
>> +    dma-names = "rx-tx";
>>   };
>>   &spi {
>>
> 


      reply	other threads:[~2026-12-01 13:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 15:21 [PATCH 0/4] spi: dt-bindings: bcm2835-spi, ARM: dts: bcm2711: Add DMA to spi0, i2s and sdhost Kryštof Černý via B4 Relay
2026-11-27 15:21 ` [PATCH 1/4] spi: dt-bindings: brcm,bcm2835-spi: Add dmas and dma-names Kryštof Černý via B4 Relay
2026-11-29 19:18   ` Stefan Wahren
2026-11-27 15:21 ` [PATCH 2/4] ARM: dts: broadcom: bcm2711: Add DMA to spi0 Kryštof Černý via B4 Relay
2026-11-29 19:43   ` Stefan Wahren
2026-11-27 15:21 ` [PATCH 3/4] ARM: dts: broadcom: bcm2711: Add DMA to i2s Kryštof Černý via B4 Relay
2026-11-29 20:19   ` Stefan Wahren
2026-11-27 15:21 ` [PATCH 4/4] ARM: dts: broadcom: bcm2711: Add DMA to sdhost Kryštof Černý via B4 Relay
2026-11-29 20:04   ` Stefan Wahren
2026-12-01 13:43     ` Kryštof Černý [this message]

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=26135f2a-1a0a-4297-b526-2e206ee0d0e0@gmail.com \
    --to=cleverline1mc@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=hyblmatous@gmail.com \
    --cc=kanakshilledar111@protonmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=ondra@faster.cz \
    --cc=ray.jui@broadcom.com \
    --cc=robh@kernel.org \
    --cc=scott.branden@broadcom.com \
    --cc=wahrenst@gmx.net \
    /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