lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 27 Feb 2024 17:00:31 +0100
From: Dragan Simic <dsimic@...jaro.org>
To: Christopher Obbard <chris.obbard@...labora.com>
Cc: Folker Schwesinger <dev@...ker-schwesinger.de>, Alban Browaeys
 <alban.browaeys@...il.com>, Doug Anderson <dianders@...omium.org>, Jensen
 Huang <jensenhuang@...endlyarm.com>, Heiko Stübner
 <heiko@...ech.de>, Rob Herring <robh+dt@...nel.org>, Krzysztof Kozlowski
 <krzysztof.kozlowski+dt@...aro.org>, Vinod Koul <vkoul@...nel.org>, Chris
 Ruehl <chris.ruehl@...ys.com.hk>, Brian Norris <briannorris@...omium.org>,
 "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
 <devicetree@...r.kernel.org>, Linux ARM
 <linux-arm-kernel@...ts.infradead.org>, "open list:ARM/Rockchip SoC..."
 <linux-rockchip@...ts.infradead.org>, LKML <linux-kernel@...r.kernel.org>,
 Kishon Vijay Abraham I <kishon@...nel.org>
Subject: Re: [PATCH] arm64: dts: rockchip: add enable-strobe-pulldown to emmc
 phy on rk3399

Hello,

On 2024-02-27 11:38, Christopher Obbard wrote:
> On Tue, 2024-02-27 at 10:11 +0000, Folker Schwesinger wrote:
>> On Tue Feb 27, 2024 at 3:05 AM CET, Alban Browaeys wrote:
>> > Le mercredi 24 août 2022 à 07:57 -0700, Doug Anderson a écrit :
>> > > On Tue, Aug 23, 2022 at 8:11 PM Jensen Huang
>> > > <jensenhuang@...endlyarm.com> wrote:
>> > > > I realized that only some devices may be affected, so I considered
>> > > > modifying rk3399-nanopi4.dtsi only,
>> > > > but other boards without external pull-down should still need this
>> > > > patch.
>> > >
>> > > I guess the other alternative would be to change how the dt property
>> > > works. You could say:
>> > >
>> > > 1. If `enable-strobe-pulldown` is set then enable the strobe
>> > > pulldown.
>> > >
>> > > 2. If `enable-strobe-pulldown` is not set then don't touch the pin in
>> > > the kernel.
>> > >
>> > > 3. If someone later needs to explicitly disable the strobe pulldown
>> > > they could add a new property like `disable-strobe-pulldown`.
>> > >
>> > >
>> > > Obviously there are tradeoffs between that and what you've done and
>> > > I'm happy to let others make the call of which they'd prefer.
>> > >
>> >
>> > Christopher could you try "ROCK Pi 4" and "ROCK Pi 4+" with
>> > "enable-strobe-pulldown" instead of disabling HS400 as you did in July
>> > 2023?
>> >
>> 
>> with the following applied, the EMMC related errors are gone. dmesg 
>> only
>> shows "Purging ... bytes" during my tests:
>> 
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
>> b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
>> index f2279aa6ca9e..ae0fb87e1a8b 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
>> @@ -647,8 +647,10 @@ &saradc {
>>  &sdhci {
>>         max-frequency = <150000000>;
>>         bus-width = <8>;
>> -       mmc-hs200-1_8v;
>> +       mmc-hs400-1_8v;
>> +       mmc-hs400-enhanced-strobe;
>>         non-removable;
>> +       rockchip,enable-strobe-pulldown;
>>         status = "okay";
>>  };
>> 
>> For testing I ran dd three times in a row:
>> 
>> dd if=/dev/zero of=./zero.bin bs=1M count=5000
>> 
>> I tested this on both a Rock 4SE board and a Rock Pi 4B+ board with 
>> the
>> same results.
> 
> Just for the record, all Rock 4 board schematics have no external 
> strobe
> pulldown resistor on the board, so we should be good to enable this.
> 
> I wonder what other boards this could be enabled for ?
> 
> It seemed to be the case on some eMMC it would work, others it 
> wouldn't.
> 
> I haven't yet tested the above diff here as yet, but I can do that this 
> week
> on multiple boards & eMMC combos.
> 
> The diff above is also missing a fixes tag (and also be fixed for 
> rk3399-rock-
> 4c-plus.dts).

When it comes to HS400 support on the RockPro64 and the Pinebook Pro,
they're unfortunately miswired in a hopeless way, causing the DATA
STROBE signal from the eMMC chip (i.e. the eMMC module) not to even
reach the right ball on the RK3399 SoC.

Here are a few screenshots from the schematics that illustrate this
issue (the first one is from the eMMC module schematic, the remaining
two are from the RockPro64 schematic, which are pretty much exactly
the same in the Pinebook Pro schematic):

- https://i.imgur.com/MqD7rcG.png
- https://i.imgur.com/hrlQBck.png
- https://i.imgur.com/mtYvc9s.png

There have been some Pine64 community attempts to have this fixed in
new RockPro64 and Pinebook Pro hardware revisions, but such attempts
unfortunately failed. :/

Thus, we'll unfortunately have to deal with the whole thing on the
board level, instead of making changes on the SoC level.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ