[RFC PATCH v8 0/6] rockchip_sfc: add support for Rockchip SFC

Jon Lin jon.lin at rock-chips.com
Thu Aug 12 16:04:41 CEST 2021



Changes in v8:
- Move speed operation to set_speed logic
- Use read_poll
- Change debug to dev_dbg
- Simply exec_op dma logic
- Change to use tx single line to make a good compatible
- Change spiflash dts node

Changes in v7:
- Make sfc-use-dma configurable
- Make px30 SFC clock configurable

Changes in v6:
- Fix dma transfer logic
- Fix the error of the way to wait for dma transfer finished status

Changes in v5:
- Support dma transfer
- Add CONFIG_IS_ENABLED(CLK) limitation
- Support spinand devices
- Support SFC ver4 ver5
- Using "rockchip, sfc" as compatible id
- Get clock from the index to compatible with those case which's
  clock-names is not parsed
- px30 use "rockchip, sfc" as compatible id

Changes in v4:
- None

Changes in v3:
- Added "rockchip_sfc_adjust_op_work()" function from proposed Linux
  driver to fix potential issue on hardware. Note I never noticed
  this issue while testing, so I cannot test if it fixed any specific
  issue for me.
- Updated of-compatible string back to "rockchip,sfc" to match what
  is currently proposed for upstream driver. The hardware itself
  has multiple versions but a register is present in the hardware that
  is read by the driver to set version specific functionality.
- Updated px30.dtsi and rk3266-odroid-go2.dts device-trees so that
  sfc nodes match what is in upstream.

Changes in v2:
- Resending due to glitch with patch file truncating final two lines
  on patch 1/5 and incorrect patch version number on patch 5/5.

Changes in v1:
- Reworked code to utilize spi-mem framework, and based it closely
  off of work in progress code for mainline Linux.
- Removed DMA, as it didn't offer much performance benefit for
  booting (in my test cases), added complexity to the code, and
  interfered with A-TF.
- Updated the names of the bindings to match the work in progress
  Linux code.
- Moved alias to u-boot specific device-tree for Odroid Go Advance.
  Alias is updated with the spi0 node pointing to the SFC to
  help the sf command as well as facilitate booting from the SFC.
- Note 2 below no longer applies, as rebasing this off of upstream
  code should allow the device to work for NAND, and by utilizing
  the spi-mem framework it no longer has to extract the parameters

Chris Morgan (4):
  spi: rockchip_sfc: add support for Rockchip SFC
  rockchip: px30: Add support for using SFC
  rockchip: px30: add the serial flash controller
  rockchip: px30: add support for SFC for Odroid Go Advance

Jon Lin (1):
  rockchip: px30: Support configure SFC

Tom Rini (1):
  CI: Update to LLVM-12

 .azure-pipelines.yml                       |   4 +-
 .gitlab-ci.yml                             |   4 +-
 arch/arm/dts/px30.dtsi                     |  38 ++
 arch/arm/dts/rk3326-odroid-go2-u-boot.dtsi |  17 +
 arch/arm/dts/rk3326-odroid-go2.dts         |  16 +
 arch/arm/mach-rockchip/px30/px30.c         |  64 ++
 drivers/clk/rockchip/clk_px30.c            |  32 +
 drivers/spi/Kconfig                        |   8 +
 drivers/spi/Makefile                       |   1 +
 drivers/spi/rockchip_sfc.c                 | 646 +++++++++++++++++++++
 tools/docker/Dockerfile                    |   6 +-
 11 files changed, 829 insertions(+), 7 deletions(-)
 create mode 100644 drivers/spi/rockchip_sfc.c

-- 
2.17.1





More information about the U-Boot mailing list