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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201008160219.GM29778@kitsune.suse.cz>
Date:   Thu, 8 Oct 2020 18:02:19 +0200
From:   Michal Suchánek <msuchanek@...e.de>
To:     Maxime Ripard <maxime@...no.tech>
Cc:     linux-arm-kernel@...ts.infradead.org,
        Rob Herring <robh+dt@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ARM: dts: sun8i: h2+: Enable optional SPI flash on
 Orange Pi Zero board

On Thu, Oct 08, 2020 at 05:13:15PM +0200, Maxime Ripard wrote:
> Hi,
> 
> On Tue, Sep 29, 2020 at 10:30:25AM +0200, Michal Suchanek wrote:
> > The flash is present on all new boards and users went out of their way
> > to add it on the old ones.
> > 
> > Enabling it makes a more reasonable default.
> > 
> > Signed-off-by: Michal Suchanek <msuchanek@...e.de>
> > ---
> >  arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> > index f19ed981da9d..061d295bbba7 100644
> > --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> > +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> > @@ -163,8 +163,8 @@ &ohci1 {
> >  };
> >  
> >  &spi0 {
> > -	/* Disable SPI NOR by default: it optional on Orange Pi Zero boards */
> > -	status = "disabled";
> > +	/* Enable optional SPI NOR by default */
> > +	status = "okay";
> >  
> >  	flash@0 {
> >  		#address-cells = <1>;
> 
> Unfortunately, it's optional, so there's really no reason to enable it
> all the time. If it's troublesome to users, then the distros or vendors
> should make the changes necessary to the hardware, bootloader or their
> documentation to make it easier for those users.

I don't understand the reasoning. Why must it be disabled when optional?

By the same reasoning there is no reason to disable it all the time.
Also the boards that do not have the flsh are either broken or obsolete.
So most of the time enabling the flash chip is the right thing.

Or do we need two DTBs like sun8i-h2-plus-orangepi-zero.dts and
sun8i-h2-plus-orangepi-zero-no-spi-nor.dts

There is no way to change the setting on a runnig system, the pins are
routed to the flash pads anyway so are not usable for anything else. The
only thing that happens on boards that do not have the flash is kernel
probing it and complaining that the ID 00 00 00 is not valid SPI NOR
flash memory ID.

Thanks

Michal

Thanks

Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ