Skip to content

Basic StarFive JH7110 RISC-V SoC support

Yanhong Wang u-boot 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest17 patches 18 repliesIn review
  2. v417 patches 13 repliesSuperseded
  3. v317 patches 11 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v217 patches27 repliesSuperseded
v117 patches14 repliesSuperseded

Changes in v5 from the cover letter

- Fixed the build errors that came from "make htmldocs".
- Remove the MMU configuration from the S7 device tree node.
- Splitted starfive_visionfive2_defconfig into starfive_visionfive2_12a_defconfig and starfive_visionfive2_13b_defconfig.
- Added the implementation of 'get_function' callback function to pinctrl.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17riscv: cpu: jh7110: Add support for jh7110 SoCarch/riscv/cpu/jh7110/Makefile arch/riscv/cpu/jh7110/cpu.c arch/riscv/cpu/jh7110/dram.c +3 more+166 -02 replies
2/17cache: starfive: Add StarFive JH7110 supportdrivers/cache/cache-sifive-ccache.c+1 -00 replies
3/17dt-bindings: reset: Add StarFive JH7110 reset definitionsinclude/dt-bindings/reset/starfive,jh7110-crg.h+183 -00 replies
4/17reset: starfive: jh7110: Add reset driver for StarFive JH7110 SoCdrivers/reset/Kconfig drivers/reset/Makefile drivers/reset/reset-jh7110.c+175 -00 replies
5/17dt-bindings: clock: Add StarFive JH7110 clock definitionsinclude/dt-bindings/clock/starfive,jh7110-crg.h+257 -00 replies
6/17clk: starfive: Add StarFive JH7110 clock driverdrivers/clk/Kconfig drivers/clk/Makefile drivers/clk/starfive/Kconfig +4 more+1004 -00 replies
7/17dt-bindings: pinctrl: Add StarFive JH7110 pinctrl definitionsinclude/dt-bindings/pinctrl/pinctrl-starfive-jh7110.h+427 -00 replies
8/17pinctrl: starfive: Add StarFive JH7110 driverdrivers/pinctrl/Kconfig drivers/pinctrl/Makefile drivers/pinctrl/starfive/Kconfig +5 more+1001 -00 replies
9/17ram: starfive: add ddr driverdrivers/ram/Kconfig drivers/ram/Makefile drivers/ram/starfive/Kconfig +7 more+3202 -10 replies
10/17board: starfive: add StarFive VisionFive v2 board supportboard/starfive/visionfive2/MAINTAINERS board/starfive/visionfive2/Makefile board/starfive/visionfive2/spl.c +5 more+692 -01 reply
11/17riscv: cpu: jh7110: Add Kconfig for StarFive JH7110 SoCarch/riscv/cpu/jh7110/Kconfig+28 -00 replies
12/17board: starfive: Add Kconfig for StarFive VisionFive v2 Boardboard/starfive/visionfive2/Kconfig+53 -00 replies
13/17board: starfive: Add TARGET_STARFIVE_VISIONFIVE2 to Kconfigarch/riscv/Kconfig+5 -00 replies
14/17riscv: dts: jh7110: Add initial StarFive JH7110 device treearch/riscv/dts/jh7110.dtsi+573 -00 replies
15/17riscv: dts: jh7110: Add initial u-boot device treearch/riscv/dts/jh7110-u-boot.dtsi+99 -01 reply
16/17riscv: dts: jh7110: Add initial StarFive VisionFive v2 board device treearch/riscv/dts/Makefile arch/riscv/dts/jh7110-starfive-visionfive-2-v1.2a-u-boot.dtsi arch/riscv/dts/jh7110-starfive-visionfive-2-v1.2a.dts +3 more+483 -10 replies
17/17configs: starfive: add defconfig for StarFive VisionFvie2 1.2A and 1.3Bconfigs/starfive_visionfive2_12a_defconfig configs/starfive_visionfive2_13b_defconfig+158 -00 replies

Reviews trailers per patch

2 of 17 patches have a Reviewed-by or Acked-by.

PatchConor DooleyRick ChenSean Anderson
1/17T-b R-b
2/17T-b
3/17T-b
4/17T-b
5/17T-b A-b
6/17T-b
7/17T-b
8/17T-b
9/17T-b
10/17T-b
11/17T-b
12/17T-b
13/17T-b
14/17T-b
15/17T-b
16/17T-b
17/17T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/17] Basic StarFive JH7110 RISC-V SoC support

This series of patches base on the latest branch/master, and add support for the StarFive JH7110 RISC-V SoC and VisionFive V2 board. In order for this to be achieved, the respective DT nodes have been added, and the required defconfigs have been added to the boards' defconfig. What is more, the basic required DM drivers have been added, such as reset, clock, pinctrl, uart, ram etc.

Note that the register base address of reset controller is same with the clock controller. Therefore, there is no device tree node alone for reset driver. It binds device node in the clock driver.

The u-boot-spl and u-boot has been tested on the StarFive VisionFive 2 1.2A and 1.3B boards which equip with JH7110 SoC and works normally.

For more information and support, you can visit RVspace wiki[1].

[1] https://wiki.rvspace.org/

v5:
- Fixed the build errors that came from "make htmldocs".
- Remove the MMU configuration from the S7 device tree node.
- Splitted starfive_visionfive2_defconfig into starfive_visionfive2_12a_defconfig and starfive_visionfive2_13b_defconfig.
- Added the implementation of 'get_function' callback function to pinctrl.

v4:
- Replace compatible string "starfive,jh7110-ccache" with "sifive,ccache0".
- Added 'gmac0_tx_inv','gmac1_tx_inv','gmac1_rx' clock registration.
- Added enable_caches() call to enable L2 cache in board_init() function.
- Moved 'S7_0' device node from board dts to SoC -u-boot.dtsi.
- Added 'i2cx' device node to board dts to consistent with linux.
- Renamed device node 'sdcard1_pins' to 'mmc1_pins'.

v3:
- Added doc/board/starfive/visionfive2.rst file.
- Added support booting from SD.
- Added support pinctrl in SPL.
- Reworded dts to consistent with linux.
- Added CFG_EXTRA_ENV_SETTINGS configuration.
- Reworded starfive_visionfive2_defconfig.
- Reworded the clock driver.
- Renamed 'starfive-jh7110.h' to 'starfive,jh7110-crg.h'.
- Separated 'starfive_visionfive2.dts' to 'jh7110-starfive-visionfive-2-v1.3b.dts' and 'jh7110-starfive-visionfive-2-v1.2a.dts' to consistent with linux.
- Added pinmux_property_set callback function implementation in 'pinctrl-starfive.c'.

v2:
- Renamed file 'jh7110-regs.h' to 'regs.h'.
- Reworded the clear L2 LIM memory code in C.
- Removed flash init call in 'spl_soc_init' function.
- Reworded the clock driver.
- Rename the macro 'SET_DIV' to 'ASSIGNED_CLOCK_PARENTS' in 'spl.c'.
- Moved the device tree node 'dmc@15700000' from 'jh7110-u-boot.dtsi' to 'starfive_visionfive2-u-boot.dtsi'

Previous versions:
v1 - https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/
v2 - https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/
v3 - https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
v4 - https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/

Jianlong Huang (1):
dt-bindings: pinctrl: Add StarFive JH7110 pinctrl definitions

Kuan Lim Lee (1):
pinctrl: starfive: Add StarFive JH7110 driver

Yanhong Wang (15):
riscv: cpu: jh7110: Add support for jh7110 SoC
cache: starfive: Add StarFive JH7110 support
dt-bindings: reset: Add StarFive JH7110 reset definitions
reset: starfive: jh7110: Add reset driver for StarFive JH7110 SoC
dt-bindings: clock: Add StarFive JH7110 clock definitions
clk: starfive: Add StarFive JH7110 clock driver
ram: starfive: add ddr driver
board: starfive: add StarFive VisionFive v2 board support
riscv: cpu: jh7110: Add Kconfig for StarFive JH7110 SoC
board: starfive: Add Kconfig for StarFive VisionFive v2 Board
board: starfive: Add TARGET_STARFIVE_VISIONFIVE2 to Kconfig
riscv: dts: jh7110: Add initial StarFive JH7110 device tree
riscv: dts: jh7110: Add initial u-boot device tree
riscv: dts: jh7110: Add initial StarFive VisionFive v2 board device
tree
configs: starfive: add defconfig for StarFive VisionFvie2 1.2A and

    1.3B
 arch/riscv/Kconfig                            |    5 +
 arch/riscv/cpu/jh7110/Kconfig                 |   28 +
 arch/riscv/cpu/jh7110/Makefile                |   10 +
 arch/riscv/cpu/jh7110/cpu.c                   |   23 +
 arch/riscv/cpu/jh7110/dram.c                  |   38 +
 arch/riscv/cpu/jh7110/spl.c                   |   64 +
 arch/riscv/dts/Makefile                       |    3 +-
 ...10-starfive-visionfive-2-v1.2a-u-boot.dtsi |   69 +
 .../jh7110-starfive-visionfive-2-v1.2a.dts    |   12 +
 ...10-starfive-visionfive-2-v1.3b-u-boot.dtsi |   69 +
 .../jh7110-starfive-visionfive-2-v1.3b.dts    |   12 +
 .../dts/jh7110-starfive-visionfive-2.dtsi     |  319 +++
 arch/riscv/dts/jh7110-u-boot.dtsi             |   99 +
 arch/riscv/dts/jh7110.dtsi                    |  573 +++++
 arch/riscv/include/asm/arch-jh7110/regs.h     |   19 +
 arch/riscv/include/asm/arch-jh7110/spl.h      |   12 +
 board/starfive/visionfive2/Kconfig            |   53 +
 board/starfive/visionfive2/MAINTAINERS        |    7 +
 board/starfive/visionfive2/Makefile           |    7 +
 board/starfive/visionfive2/spl.c              |   87 +
 .../visionfive2/starfive_visionfive2.c        |   40 +
 configs/starfive_visionfive2_12a_defconfig    |   79 +
 configs/starfive_visionfive2_13b_defconfig    |   79 +
 doc/board/index.rst                           |    1 +
 doc/board/starfive/index.rst                  |    9 +
 doc/board/starfive/visionfive2.rst            |  492 +++++
 drivers/cache/cache-sifive-ccache.c           |    1 +
 drivers/clk/Kconfig                           |    1 +
 drivers/clk/Makefile                          |    1 +
 drivers/clk/starfive/Kconfig                  |   17 +
 drivers/clk/starfive/Makefile                 |    4 +
 drivers/clk/starfive/clk-jh7110-pll.c         |  321 +++
 drivers/clk/starfive/clk-jh7110.c             |  603 +++++
 drivers/clk/starfive/clk.h                    |   57 +
 drivers/pinctrl/Kconfig                       |    1 +
 drivers/pinctrl/Makefile                      |    1 +
 drivers/pinctrl/starfive/Kconfig              |   28 +
 drivers/pinctrl/starfive/Makefile             |    6 +
 drivers/pinctrl/starfive/pinctrl-jh7110-aon.c |  113 +
 drivers/pinctrl/starfive/pinctrl-jh7110-sys.c |  399 ++++
 drivers/pinctrl/starfive/pinctrl-starfive.c   |  398 ++++
 drivers/pinctrl/starfive/pinctrl-starfive.h   |   55 +
 drivers/ram/Kconfig                           |    1 +
 drivers/ram/Makefile                          |    4 +-
 drivers/ram/starfive/Kconfig                  |    5 +
 drivers/ram/starfive/Makefile                 |   11 +
 drivers/ram/starfive/ddrcsr_boot.c            |  339 +++
 drivers/ram/starfive/ddrphy_start.c           |  279 +++
 drivers/ram/starfive/ddrphy_train.c           |  383 ++++
 drivers/ram/starfive/ddrphy_utils.c           | 1955 +++++++++++++++++
 drivers/ram/starfive/starfive_ddr.c           |  161 ++
 drivers/ram/starfive/starfive_ddr.h           |   65 +
 drivers/reset/Kconfig                         |   16 +
 drivers/reset/Makefile                        |    1 +
 drivers/reset/reset-jh7110.c                  |  158 ++
 include/configs/starfive-visionfive2.h        |   49 +
 .../dt-bindings/clock/starfive,jh7110-crg.h   |  257 +++
 .../pinctrl/pinctrl-starfive-jh7110.h         |  427 ++++
 .../dt-bindings/reset/starfive,jh7110-crg.h   |  183 ++
 59 files changed, 8507 insertions(+), 2 deletions(-)
 create mode 100644 arch/riscv/cpu/jh7110/Kconfig
 create mode 100644 arch/riscv/cpu/jh7110/Makefile
 create mode 100644 arch/riscv/cpu/jh7110/cpu.c
 create mode 100644 arch/riscv/cpu/jh7110/dram.c
 create mode 100644 arch/riscv/cpu/jh7110/spl.c
 create mode 100644 arch/riscv/dts/jh7110-starfive-visionfive-2-v1.2a-u-boot.dtsi
 create mode 100644 arch/riscv/dts/jh7110-starfive-visionfive-2-v1.2a.dts
 create mode 100644 arch/riscv/dts/jh7110-starfive-visionfive-2-v1.3b-u-boot.dtsi
 create mode 100644 arch/riscv/dts/jh7110-starfive-visionfive-2-v1.3b.dts
 create mode 100644 arch/riscv/dts/jh7110-starfive-visionfive-2.dtsi
 create mode 100644 arch/riscv/dts/jh7110-u-boot.dtsi
 create mode 100644 arch/riscv/dts/jh7110.dtsi
 create mode 100644 arch/riscv/include/asm/arch-jh7110/regs.h
 create mode 100644 arch/riscv/include/asm/arch-jh7110/spl.h
 create mode 100644 board/starfive/visionfive2/Kconfig
 create mode 100644 board/starfive/visionfive2/MAINTAINERS
 create mode 100644 board/starfive/visionfive2/Makefile
 create mode 100644 board/starfive/visionfive2/spl.c
 create mode 100644 board/starfive/visionfive2/starfive_visionfive2.c
 create mode 100644 configs/starfive_visionfive2_12a_defconfig
 create mode 100644 configs/starfive_visionfive2_13b_defconfig
 create mode 100644 doc/board/starfive/index.rst
 create mode 100644 doc/board/starfive/visionfive2.rst
 create mode 100644 drivers/clk/starfive/Kconfig
 create mode 100644 drivers/clk/starfive/Makefile
 create mode 100644 drivers/clk/starfive/clk-jh7110-pll.c
 create mode 100644 drivers/clk/starfive/clk-jh7110.c
 create mode 100644 drivers/clk/starfive/clk.h
 create mode 100644 drivers/pinctrl/starfive/Kconfig
 create mode 100644 drivers/pinctrl/starfive/Makefile
 create mode 100644 drivers/pinctrl/starfive/pinctrl-jh7110-aon.c
 create mode 100644 drivers/pinctrl/starfive/pinctrl-jh7110-sys.c
 create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive.c
 create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive.h
 create mode 100644 drivers/ram/starfive/Kconfig
 create mode 100644 drivers/ram/starfive/Makefile
 create mode 100644 drivers/ram/starfive/ddrcsr_boot.c
 create mode 100644 drivers/ram/starfive/ddrphy_start.c
 create mode 100644 drivers/ram/starfive/ddrphy_train.c
 create mode 100644 drivers/ram/starfive/ddrphy_utils.c
 create mode 100644 drivers/ram/starfive/starfive_ddr.c
 create mode 100644 drivers/ram/starfive/starfive_ddr.h
 create mode 100644 drivers/reset/reset-jh7110.c
 create mode 100644 include/configs/starfive-visionfive2.h
 create mode 100644 include/dt-bindings/clock/starfive,jh7110-crg.h
 create mode 100644 include/dt-bindings/pinctrl/pinctrl-starfive-jh7110.h
 create mode 100644 include/dt-bindings/reset/starfive,jh7110-crg.h

base-commit: 41a88ad529b3943b1e465846eb24fe2c29203e35

Signature · 1 line
2.17.1