[U-Boot] [PATCH v2 0/6] rockchip: spl: rk3399: prepare to have SPI config per-board

Philipp Tomsich philipp.tomsich at theobroma-systems.com
Wed Mar 29 11:31:25 UTC 2017


To support SPI flashes (via the device model) and enable loading of
later-stage images from SPI in SPL, we need a few adjustments to the
common configuration header for the RK3399:
 - enable SPL_SPI_LOAD if SPI is enabled for SPL (in rk3399_common)
 - move CONFIG_SPI and CONFIG_SPI_FLASH (from rk3399_common) to defconfig

Changes in v2:
- fixes a wrong macro usage, which caused the SPI module input clock
  frequency to be significantly higher than intended
- frequencies have now been validated using an oscilloscope (keep in mind
  that all frequencies are derived from a 99MHz module input clock) at the
  following measurement points:
    *  1 MHz ...  0.99 MHz
    *  5 MHz ...  4.95 MHz
    * 10 MHz ...  9.9  MHz
    * 30 MHz ... 33    MHz
    * 50 MHz ... 49.5  MHz
- fixes an off-by-one for the RK3399 that cause the SPI module input
  clock to be misstated as 84MHz (even though it was running at 99MHz)

Jakob Unterwurzacher (2):
  rockchip: spi: enable support for the rk_spi driver for the RK3399
  rockchip: spi: rk3399: move CONFIG_SPI and CONFIG_SPI_FLASH to
    defconfig

Philipp Tomsich (4):
  rockchip: clk: rk3399: add clock support for SCLK_SPI1 and SCLK_SPI5
  clk: rk3399: fix off-by one during rate calculation in
    i2c/spi_set_rate
  rockchip: pinctrl: rk3399: add support for the SPI5 controller
  rockchip: spl: rk3399: enable SPL_SPI_LOAD if SPI is enabled for SPL

 arch/arm/include/asm/arch-rockchip/grf_rk3399.h | 12 +++++
 arch/arm/include/asm/arch-rockchip/periph.h     |  3 ++
 drivers/clk/rockchip/clk_rk3399.c               | 71 ++++++++++++++++++++++++-
 drivers/pinctrl/rockchip/pinctrl_rk3399.c       | 17 ++++++
 drivers/spi/rk_spi.c                            |  1 +
 include/configs/rk3399_common.h                 |  5 +-
 6 files changed, 106 insertions(+), 3 deletions(-)

-- 
1.9.1



More information about the U-Boot mailing list