[U-Boot] [PATCH v3] dm: spi: Read default speed and mode values from DT
Patrick DELAUNAY
patrick.delaunay at st.com
Tue Feb 12 13:44:01 UTC 2019
Hi Jagan
> From: Jagan Teki <jagan at amarulasolutions.com>
> Sent: samedi 9 février 2019 17:22
> Subject: Re: [PATCH v3] dm: spi: Read default speed and mode values from DT
>
> On Mon, Jan 28, 2019 at 2:37 PM Patrick Delaunay <patrick.delaunay at st.com>
> wrote:
> >
> > This patch update the behavior introduced by commit 96907c0fe50a ("dm:
> > spi: Read default speed and mode values from DT")
> >
> > In case of DT boot, don't read default speed and mode for SPI from
> > CONFIG_* but instead read from DT node. This will make sure that
> > boards with multiple SPI/QSPI controllers can be probed at different
> > bus frequencies and SPI modes.
> >
> > DT values will be always used when available (full DM support of SPI
> > slave with available DT node) even if speed and mode are requested;
> > for example in splash screen support (in splash_sf_read_raw) or in SPL
> > boot (in spl_spi_load_image).
> > The caller of spi_get_bus_and_cs() no more need to force speed=0.
> >
> > But the current behavior don't change if the SPI slave is not present
> > (device with generic driver is created automatically) or if platdata
> > is used (CONFIG_OF_PLATDATA).
> >
> >
> > Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> > ---
> >
> > Changes in v3:
> > - complete rework of the patch-set to avoid regression
> >
> > Changes in v2:
> > - use variables to avoid duplicated code
> >
> > README | 3 +++
> > cmd/sf.c | 3 +--
> > common/spl/spl_spi.c | 2 ++
> > drivers/spi/spi-uclass.c | 4 +++-
> > include/spi.h | 9 +++++----
> > 5 files changed, 14 insertions(+), 7 deletions(-)
> >
> > diff --git a/README b/README
> > index 17d56b8..f7fe74f 100644
> > --- a/README
> > +++ b/README
> > @@ -2184,6 +2184,9 @@ The following options need to be configured:
> > CONFIG_SF_DEFAULT_MODE (see include/spi.h)
> > CONFIG_SF_DEFAULT_SPEED in Hz
> >
> > + In case of DT boot, SPI don't read default speed and mode
> > + from CONFIG_*, but from platdata values computed from available
> > + DT node
>
> This has to update in Kconfig help info.
Ok but witch Kconfig ? whitch config ?
drivers/mtd/spi/Kconfig
config DM_SPI_FLASH
PS: In master branch, these define are not in yet managed in Kconfig, but they are still managed by defines:
scripts/config_whitelist.txt:1713:CONFIG_SF_DEFAULT_MODE
And so documentation is done in README not in Kconfig
some migration in Kconfig is pending (moveconfig) ?
Regards
Patrick
More information about the U-Boot
mailing list