From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796132592; b=Tp7CJ60Lmm7Be6O6khZ+o2Y8+OjfHeVObpSOfwXPjG6T2QHYwV/BCg1yum7jigKYombs WDNVucqyEF85AKh9rm1Nlm2SakdpSfVLGSWbbfRVumFu5wnSBcYoWE4r6WilKWosSmvxo T3YD/xKD3gQjYnNsExGgprW/vmeHHs/NIRoge2npqZCfKyzfcL+TPxZ5Aa8BOGXYD0Nar 5OAbLeXv0KF3ix0zoYQJhtoCAr632JShuqiAaFaPn33SGJJ0j2nmXdLNM/Ps8AIY7r2LC V6pTpv8cV3tYcIL0z3w6/7cmIo9pontcHOeLvuehnHUoCt/ew+o/lZ3v8hWpCK3RBvQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796132592; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=5k9bKe8MbPMzzrxBpIE+d8ri1WMPwZ6noTmqEIYpQlY=; b=C1JK8lfBD+Mp5kElYCiWgxXhvC498opU7y3O5MddszxbEZTHHoLrvYJB9Itf7HbDiPoY pHuBd+tzFyREBSR37AkcOzfn5WZkSb7rnXC/arOCYCwDXN7ol22oG7HJCbASHvU3vcmxj RP76U1Bo2ppXK7cf/AhAJ2gmRtLwgCR/qWZ+VC8u8eSlEPu77/JmqtLvMOBxllzsk0Vbi fraCgQSJ4+7hnoTaL+j+eid934QxniBEztQl9Pu42Yvbnka+SE9+w5a594k/NfyixhUiC 7GCGJI7+6dWktd2KwIHkevDphDgIyr7qRoRUqT26Zv++tiwagT+K2h2GQM/RDeMG6SA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=K35IS9Cd; arc=none smtp.remote-ip=209.85.128.44 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71A9E606A327 for ; Tue, 1 Dec 2026 13:43:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 71A9E606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=K35IS9Cd Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4a35ac4475dso83933825e9.2 for ; Tue, 01 Dec 2026 05:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796132591; x=1796737391; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=5k9bKe8MbPMzzrxBpIE+d8ri1WMPwZ6noTmqEIYpQlY=; b=K35IS9CdQNd2gp/hGrmtNVNvnAV0lEaXNuNoyNke5both8zeKbxon7KGOct1xQ7ESy WOOJaiay02MX0ls41E1j08ULENUjUbRPI5iHMxMBC0rf01LWJZHkmIjkQtJyfopccWxO quk22nA8aYJ+5kGkiGF7MGKAFTpwXBuc1NTG+xMXxtUdNb7OeSQtYahQ00fn2oaeqci4 Pldbb/CG+BUBfVpL3CQeMB6pq8NQPgMDJfBmjiIdlTXVpMyTK5C/SLIvZvGle37xQOo4 an9kS8qL03W0Llnw5D9YZiYk6JuxOQfvFFOrOYIzqiEi02N4OMjed/cvglHWA+LSJ45e 09eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796132591; x=1796737391; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=5k9bKe8MbPMzzrxBpIE+d8ri1WMPwZ6noTmqEIYpQlY=; b=a6JoNg/ZaDWcImN4cLCBlRAyc7vv1nSQHdxR3vdrbHHVf2XNO+D2BxEhUsPUamdwoc glT0LLWmtBRxY1s55Jh1FyAUWzZ9wgLO2RRg5WRFQvLBfbgQGD5Jicfl+E4EzZ3ymBig /0gFxUqPNF/8r6EMmDIEh+Ur33eJcE9ubI1XnzkFmM29t2Q3YXK9mDtQAGvv/+zKy5sn Hq/zstAGrztIlMc+oIzE9EzdHqI2MdtoRRhXsHbsTDqjOgECqqTK8OEi1P/7cp5qRgT4 XVSpSv/oY6yhb3jkChkXz+Dn6st0HnhPZhITSh57RzIiRp7Qa/wCRSJVFRM7YsDRCSvl KPvw== X-Forwarded-Encrypted: i=1; AL+hErEASEl+60uIVhwHVOcgjbrwlGR3B+lFUNthhEELM4HhGp3KNnqHx0jjfKDA2ATzefqqnLTY2aUa7bd7@vger.kernel.org X-Gm-Message-State: APuU4Z+QzOPCiE9KnHlWgBB+oeij9dc4LsJZXKqQNTHLwjgZLJg+hFm3 68HNX1dxrkdGFa5yeBT8HpjK78nSY8QiSphw6awRKFmJoY6mNmb7h50j X-Gm-Gg: AZFdTZdvzx1JWF65CNjRVDYGhRy1WeEKzsMl5dMffDw5HFuFjq6PLHBgME6uOHc5t4W c+ZSwNbPt9J8lPdb9fpn5jcgsHrNoxi1briW5AouialWMs//4YxD5Y/R1MTkLTWfkhxNN43hHdK bcEsO/SzzUyxh/RH0SlqZS5C9xuhc+/qUfoUqQ0lBuTHTq376fZDIcajxYOe1EyRvq871NcpbQx QfVJPaiD6aVteDsnthoz581vQ5nPqw1SkoH5qPKTKCtnffECukMY0YOOGVva9+sQ9oEogxSePCh RSoCJDPVUuhBBlmFp8zjRC1q0X3vwMb6liySIf3i66KQnFqZXGG4USy5cn4swtFgYw01bOM9nU5 4mxxzgCHHv/KNdDu+IIGEn9C6e52vsR2k2//l/3GQkDILmwL1ICWJlpx/hLTj91pekfk1DEUkDR +TxUnDNPdGiJ4WvLKJm+mP+89y4qacWJki6KA9OpPueGh6Abb/TUAdWoKFD4QeUCl7ENBI0KPLd OGioWMHGZS9wHpQgdK0rpM/dFk/RZWquQh7RpbyyqxQ8tQBlRA02bgX9xcWdxnbpJo5yaYjhHcf +BWhCTxtHLYTOz1tg9goqHuCHgwWrbz9tvXDquV1B0n/f47dKaTvDcgkx7ZBLCRPkJOjRt26HaS ROw== X-Received: by 2002:a05:600c:530e:b0:4ba:eb:eb9b with SMTP id 5b1f17b1804b1-4bb8880aba2mr717562605e9.8.1796132590590; Tue, 01 Dec 2026 05:43:10 -0800 (PST) Received: from ?IPV6:2a02:e98:40:8091:a456:fe24:a89:daa6? ([2a02:e98:40:8091:a456:fe24:a89:daa6]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6c61f558sm73061267f8f.58.2026.12.01.05.43.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Dec 2026 05:43:10 -0800 (PST) Message-ID: <26135f2a-1a0a-4297-b526-2e206ee0d0e0@gmail.com> Date: Tue, 1 Dec 2026 14:43:09 +0100 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/4] ARM: dts: broadcom: bcm2711: Add DMA to sdhost To: Stefan Wahren , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Kanak Shilledar , Florian Fanelli Cc: Conor Dooley , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Miroslav Ondra , =?UTF-8?B?TWF0b3XFoSBIw71ibA==?= References: <20261127-bcm2835-spi-dma-v1-0-8b134991ba2e@gmail.com> <20261127-bcm2835-spi-dma-v1-4-8b134991ba2e@gmail.com> <484e2b18-e282-4543-9058-3c472e6212e5@gmx.net> Content-Language: cs, en-US From: =?UTF-8?B?S3J5xaF0b2YgxIxlcm7DvQ==?= In-Reply-To: <484e2b18-e282-4543-9058-3c472e6212e5@gmx.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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ý >> >> 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ý >> --- >>   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 = ; >> +    dmas = <&dma 13>; >> +    dma-names = "rx-tx"; >>   }; >>   &spi { >> >