Message ID | 1490691517-9291-9-git-send-email-philipp.tomsich@theobroma-systems.com |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show |
On 28 March 2017 at 02:58, Philipp Tomsich <philipp.tomsich@theobroma-systems.com> wrote: > From: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> > > The RK3399-Q7 (Puma) unsually (this is a build-time option for > customised boards) has an on-module SPI-flash connected to SPI1. > As of today, this is a Winbond W25Q32DW (32MBit) device. > > The SPI5 controller is routed to the Q7 edge connector and provides > general-purpose SPI connectivity for customer base-boards. > > With some minor improvements on integration into our outbound tree > - explicitly modelled the SPI flash as 'spiflash' under spi0 > [dts: rk3399-puma: explicitly model spi-flash under spi1] > - renamed the aliases to spi0 and spi1 to allow easier use of > commands and legacy (SPL) infrastructure... i.e. the controllers > will be 0 and 1 for 'sf probe', 'sspi', etc. > [dts: rk3399-puma: rename aliases to number spi as 0 and 1 for commands] > > X-AffectedPlatforms: RK3399-Q7 > Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> > Tested-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> > --- > > arch/arm/dts/rk3399-puma.dts | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) Acked-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/arm/dts/rk3399-puma.dts b/arch/arm/dts/rk3399-puma.dts index 4f68451..dc00bd9 100644 --- a/arch/arm/dts/rk3399-puma.dts +++ b/arch/arm/dts/rk3399-puma.dts @@ -18,6 +18,11 @@ u-boot,spl-boot-order = &sdhci, "mmc1"; }; + aliases { + spi0 = &spi1; + spi1 = &spi5; + }; + vdd_center: vdd-center { compatible = "pwm-regulator"; pwms = <&pwm3 0 25000 0>; @@ -159,3 +164,24 @@ rx_delay = <0x10>; status = "okay"; }; + +&spi1 { + u-boot,dm-pre-reloc; + + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + + spiflash: w25q32dw@0 { + compatible = "spi-flash"; + reg = <0>; + spi-max-frequency = <5000000>; + spi-cpol; + spi-cpha; + }; +}; + +&spi5 { + status = "okay"; +};