Skip to content

Add ethernet driver for StarFive JH7110 SoC

Yanhong Wang u-boot 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest11 patches 13 repliesIn review
  2. v4 posting 2/211 patches 8 repliesSuperseded
  3. v3 posting 2/211 patches 2 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v2 posting 2/25 patches3 repliesSuperseded
v4 posting 1/27 patches28 repliesSuperseded
v3 posting 1/27 patches12 repliesSuperseded
v2 posting 1/29 patches21 repliesSuperseded
v17 patches30 repliesSuperseded

Changes in v5 from the cover letter

- Reorder a series of patches to make each patch is independent.
- Move CONFIG_DEFAULT_FDT_FILE and CONFIG_DEFAULT_DEVICE_TREE changes to patch 4.
- Move the definition of 'board_fdt_blob_setup' to patch 9.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phydrivers/net/phy/Kconfig drivers/net/phy/Makefile drivers/net/phy/motorcomm.c+444 -00 replies
2/11net: dwc_eth_qos: Add StarFive ethernet driver glue layerdrivers/net/Kconfig drivers/net/Makefile drivers/net/dwc_eth_qos.c +2 more+264 -00 replies
3/11riscv: dts: jh7110: Add ethernet device tree nodesarch/riscv/dts/jh7110-starfive-visionfive-2.dtsi arch/riscv/dts/jh7110.dtsi+103 -01 reply
4/11riscv: dts: jh7110: Combine the board device tree files of 1.2A and 1.3Barch/riscv/dts/Makefile arch/riscv/dts/jh7110-starfive-visionfive-2-u-boot.dtsi arch/riscv/dts/jh7110-starfive-visionfive-2-v1.2a.dts +3 more+28 -881 reply
5/11doc: board: starfive: Reword the make defconfig informationdoc/board/starfive/visionfive2.rst+3 -31 reply
6/11configs: starfive: Enable ethernet configuration for StarFive VisionFive2configs/starfive_visionfive2_defconfig+9 -01 reply
7/11eeprom: starfive: Enable ID EEPROM configurationarch/riscv/include/asm/arch-jh7110/eeprom.h board/starfive/visionfive2/Makefile board/starfive/visionfive2/visionfive2-i2c-eeprom.c+575 -01 reply
8/11riscv: dts: starfive: Add support eeprom device tree nodearch/riscv/dts/jh7110-starfive-visionfive-2-u-boot.dtsi arch/riscv/dts/jh7110-starfive-visionfive-2.dtsi+20 -01 reply
9/11configs: starfive: Enable ID EEPROM configurationboard/starfive/visionfive2/starfive_visionfive2.c configs/starfive_visionfive2_defconfig+31 -11 reply
10/11ram: starfive: Read memory size information from EEPROMarch/riscv/cpu/jh7110/spl.c drivers/ram/starfive/starfive_ddr.c+31 -35 replies
11/11board: starfive: Dynamic configuration of DT for 1.2A and 1.3Bboard/starfive/visionfive2/spl.c+157 -01 reply

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchRamon FriedRick ChenLeo Yu-Chi Liang
1/11R-b
2/11R-b
3/11R-b
4/11R-b
5/11R-b
6/11R-b
7/11R-b
8/11R-b
9/11R-b
10/11R-b
11/11R-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/11] Add ethernet driver for StarFive JH7110 SoC

This series of patches base on the latest branch/master,and adds ethernet support for the StarFive JH7110 RISC-V SoC. The series includes EEPROM, PHY and MAC drivers. The PHY model is YT8531 (from Motorcomm Inc), and the MAC version is dwmac-5.20 (from Synopsys DesignWare).

The implementation of the phy driver is ported from linux, but it has been adjusted for the u-boot framework.

EEPROM stores board-related information, such as DDR capacity, PCB version, MAC address, etc.

The main difference between StarFive VisionFive 2 1.2A and 1.3B is gmac, but the difference in gmac is not defined in DT, but reads the PCB version from EEPROM, and then dynamically configures the difference of gmac according to different PCB versions, which is compatible with 1.2A and 1.3B versions, which is more user-friendly.

The PHY and MAC driver has been tested on the StarFive VisionFive 2 1.2A and 1.3B boards and works normally.

For more information and support,you can visit RVspace wiki[1].
[1] https://wiki.rvspace.org/

v5:
- Reorder a series of patches to make each patch is independent.
- Move CONFIG_DEFAULT_FDT_FILE and CONFIG_DEFAULT_DEVICE_TREE changes to patch 4.
- Move the definition of 'board_fdt_blob_setup' to patch 9.

v4:
- Reworded the definition of the 'pbuf' variable in visionfive2-i2c-eeprom.c from a const pointer to const union.
- Added the section (".data") attribute to the 'pbuf' and 'has_been_read' global variables in visionfive2-i2-eeprom.c.

v3:
- Added EEPROM support.
- Combine the board device tree of 1.2A and 1.3B into one.
- Removed the delay configuration of gmac phy clock from DT.
- Dynamically configure gmac differences of 1.2A and 1.3B to DT according to the PCB version.
- DDR capacity information is read from EEPROM first, if not, it is defined by default in DT.

v2:
- Reworded the phy driver. Added platform private data struct to save the configuration data read from dts.
- Reworded the MAC driver. Added platform private data struct to save the configuration data read from dts.

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/cover/[email protected]/
v4 - https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/

Yanhong Wang (11):
net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy
net: dwc_eth_qos: Add StarFive ethernet driver glue layer
riscv: dts: jh7110: Add ethernet device tree nodes
riscv: dts: jh7110: Combine the board device tree files of 1.2A and

    1.3B

doc: board: starfive: Reword the make defconfig information
configs: starfive: Enable ethernet configuration for StarFive
VisionFive2
eeprom: starfive: Enable ID EEPROM configuration
riscv: dts: starfive: Add support eeprom device tree node
configs: starfive: Enable ID EEPROM configuration
ram: starfive: Read memory size information from EEPROM
board: starfive: Dynamic configuration of DT for 1.2A and 1.3B

 arch/riscv/cpu/jh7110/spl.c                   |  32 +-
 arch/riscv/dts/Makefile                       |   3 +-
 ... jh7110-starfive-visionfive-2-u-boot.dtsi} |  39 +-
 .../jh7110-starfive-visionfive-2-v1.2a.dts    |  12 -
 ...10-starfive-visionfive-2-v1.3b-u-boot.dtsi |  69 ---
 ...b.dts => jh7110-starfive-visionfive-2.dts} |   3 +-
 .../dts/jh7110-starfive-visionfive-2.dtsi     |  40 ++
 arch/riscv/dts/jh7110.dtsi                    |  69 +++
 arch/riscv/include/asm/arch-jh7110/eeprom.h   |  13 +
 board/starfive/visionfive2/Makefile           |   1 +
 board/starfive/visionfive2/spl.c              | 157 +++++
 .../visionfive2/starfive_visionfive2.c        |  13 +
 .../visionfive2/visionfive2-i2c-eeprom.c      | 561 ++++++++++++++++++
 configs/starfive_visionfive2_defconfig        |  32 +-
 doc/board/starfive/visionfive2.rst            |   6 +-
 drivers/net/Kconfig                           |   7 +
 drivers/net/Makefile                          |   1 +
 drivers/net/dwc_eth_qos.c                     |   6 +
 drivers/net/dwc_eth_qos.h                     |   1 +
 drivers/net/dwc_eth_qos_starfive.c            | 249 ++++++++
 drivers/net/phy/Kconfig                       |   6 +
 drivers/net/phy/Makefile                      |   1 +
 drivers/net/phy/motorcomm.c                   | 437 ++++++++++++++
 drivers/ram/starfive/starfive_ddr.c           |   2 -
 24 files changed, 1665 insertions(+), 95 deletions(-)
 rename arch/riscv/dts/{jh7110-starfive-visionfive-2-v1.2a-u-boot.dtsi => jh7110-starfive-visionfive-2-u-boot.dtsi} (58%)
 delete mode 100644 arch/riscv/dts/jh7110-starfive-visionfive-2-v1.2a.dts
 delete mode 100644 arch/riscv/dts/jh7110-starfive-visionfive-2-v1.3b-u-boot.dtsi
 rename arch/riscv/dts/{jh7110-starfive-visionfive-2-v1.3b.dts => jh7110-starfive-visionfive-2.dts} (65%)
 create mode 100644 arch/riscv/include/asm/arch-jh7110/eeprom.h
 create mode 100644 board/starfive/visionfive2/visionfive2-i2c-eeprom.c
 create mode 100644 drivers/net/dwc_eth_qos_starfive.c
 create mode 100644 drivers/net/phy/motorcomm.c

base-commit: 19b77d3d23966a0d6dbb3c86187765f11100fb6f

Signature · 1 line
2.17.1