Add upstream board Xunlong Orange Pi RV
v3 cover Add upstream board Xunlong Orange Pi RV
Xunlong Orange Pi RV patches are now in the Linux v6.19 release candidate, so let's introduce support for this board.
Note: The content of EEPROM is known to not be unique on this board, and an (optional) invented "XOPIRV" identifier is implemented with this series. Without, there are reports that the board is detected in U-Boot as StarFive VisionFive 2 1.3b, and is then functional enough to load the devicetree prior to booting Linux.
Changes since v2:
- Collect tags (no code changes)
- Adjust missing S-o-by tag to first of tags list order for patch 4 "configs: starfive: Add Orange Pi RV to visionfive2".
Changes since RFC v1:
- Cherrypick from devicetree-rebasing instead of importing upstream dts as -u-boot.dtsi overrides.
- Add basic documentation
- Mention invented "XOPIRV" identifier in commit messages
- Rebase on origin/next
E Shattow (3):
board: starfive: visionfive2: Add Orange Pi RV selection by product_id
configs: starfive: Add Orange Pi RV to visionfive2
doc: board: starfive: Add Xunlong OrangePi RV
Icenowy Zheng (2):
dt-bindings: riscv: starfive: add xunlong,orangepi-rv
riscv: dts: starfive: add Orange Pi RV
board/starfive/visionfive2/spl.c | 3 + .../visionfive2/starfive_visionfive2.c | 2 + configs/starfive_visionfive2_defconfig | 2 +- doc/board/starfive/index.rst | 1 + doc/board/starfive/orangepi_rv.rst | 35 +++++++++ dts/upstream/Bindings/riscv/starfive.yaml | 1 + .../src/riscv/starfive/jh7110-orangepi-rv.dts | 76 +++++++++++++++++++ 7 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 doc/board/starfive/orangepi_rv.rst create mode 100644 dts/upstream/src/riscv/starfive/jh7110-orangepi-rv.dts
base-commit: 55ca2110d74f8e5a594aecc11ce4103dc73e9e02
Signature · 1 line
2.50.0
PATCH v3 1/5 dt-bindings: riscv: starfive: add xunlong,orangepi-rv
From: Icenowy Zheng <[email protected]>
Add "xunlong,orangepi-rv" as a StarFive JH7110 SoC-based board.
[ upstream commit: d94ebab404b0ce6498770888e25102e32b2b13da ]
--- dts/upstream/Bindings/riscv/starfive.yaml | 1 + 1 file changed, 1 insertion(+)
dts/upstream/Bindings/riscv/starfive.yaml +1 -0
@@ -33,6 +33,7 @@ properties: - pine64,star64 - starfive,visionfive-2-v1.2a - starfive,visionfive-2-v1.3b + - xunlong,orangepi-rv - const: starfive,jh7110 additionalProperties: true
Signature · 1 line
2.50.0
PATCH v3 2/5 riscv: dts: starfive: add Orange Pi RV
In reply to E ShattowFrom: Icenowy Zheng <[email protected]>
Orange Pi RV is a SBC based on the StarFive VisionFive 2 board.
Orange Pi RV features:
- StarFive JH7110 SoC
- GbE port connected to JH7110 GMAC0 via YT8531 PHY
- 4x USB ports via VL805 PCIe USB controller connected to JH7110 pcie0
- M.2 M-key slot connected to JH7110 pcie1
- HDMI video output
- 3.5mm audio output
- Ampak AP6256 SDIO Wi-Fi/Bluetooth module on mmc0
- microSD slot on mmc1
- SPI NOR flash memory
- 24c02 EEPROM (read only by default)
[ upstream commit: 5b70764e10190d57e6cd3287d3a3b06f8c89f69c ]
--- .../src/riscv/starfive/jh7110-orangepi-rv.dts | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 dts/upstream/src/riscv/starfive/jh7110-orangepi-rv.dts
dts/upstream/src/riscv/starfive/jh7110-orangepi-rv.dts new file +76 -0
@@ -0,0 +1,76 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (C) 2025 Icenowy Zheng <[email protected]> + */ + +/dts-v1/; +#include "jh7110-common.dtsi" + +/ { + model = "Xunlong Orange Pi RV"; + compatible = "xunlong,orangepi-rv", "starfive,jh7110"; + + /* This regulator is always on by hardware */ + reg_vcc3v3_pcie: regulator-vcc3v3-pcie { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3-pcie"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&sysgpio 62 GPIO_ACTIVE_LOW>; + }; +}; + +&gmac0 { + assigned-clocks = <&aoncrg JH7110_AONCLK_GMAC0_TX>; + assigned-clock-parents = <&aoncrg JH7110_AONCLK_GMAC0_RMII_RTX>; + starfive,tx-use-rgmii-clk; + status = "okay"; +}; + +&mmc0 { + #address-cells = <1>; + #size-cells = <0>; + cap-sd-highspeed; + mmc-pwrseq = <&wifi_pwrseq>; + vmmc-supply = <®_vcc3v3_pcie>; + vqmmc-supply = <&vcc_3v3>; + status = "okay"; + + ap6256: wifi@1 { + compatible = "brcm,bcm43456-fmac", "brcm,bcm4329-fmac"; + reg = <1>; + /* TODO: out-of-band IRQ on GPIO21, lacking pinctrl support */ + }; +}; + +&mmc1 { + cd-gpios = <&sysgpio 41 GPIO_ACTIVE_HIGH>; +}; + +&pcie0 { + status = "okay"; +}; + +&pcie1 { + status = "okay"; +}; + +&phy0 { + rx-internal-delay-ps = <1500>; + tx-internal-delay-ps = <1500>; + motorcomm,rx-clk-drv-microamp = <3970>; + motorcomm,rx-data-drv-microamp = <2910>; + motorcomm,tx-clk-adj-enabled; + motorcomm,tx-clk-10-inverted; + motorcomm,tx-clk-100-inverted; + motorcomm,tx-clk-1000-inverted; +}; + +&pwmdac { + status = "okay"; +};
Signature · 1 line
2.50.0
PATCH v3 3/5 board: starfive: visionfive2: Add Orange Pi RV selection by product_id
In reply to E ShattowAdd XOPIRV identifier for Orange Pi RV to dts selection callback in SPL, and to fdtfile environment variable default value selection in payload.
--- board/starfive/visionfive2/spl.c | 3 +++ board/starfive/visionfive2/starfive_visionfive2.c | 2 ++ 2 files changed, 5 insertions(+)
board/starfive/visionfive2/spl.c +3 -0
@@ -131,6 +131,9 @@ int board_fit_config_name_match(const char *name) !strncmp(get_product_id_from_eeprom(), "MARC", 4) && !get_mmc_size_from_eeprom()) {return 0 ; + } else if (!strcmp(name, "starfive/jh7110-orangepi-rv") && + !strncmp(get_product_id_from_eeprom(), "XOPIRV", 6)) { +return 0 ; } else if (!strcmp(name, "starfive/jh7110-pine64-star64") && !strncmp(get_product_id_from_eeprom(), "STAR64", 6)) {return 0 ;
board/starfive/visionfive2/starfive_visionfive2.c +2 -0
@@ -63,6 +63,8 @@ static void set_fdtfile(void) }else { fdtfile ="starfive/jh7110-milkv-marscm-lite.dtb" ; } + }else if (!strncmp (get_product_id_from_eeprom (),"XOPIRV" ,6 )) { + fdtfile ="starfive/jh7110-orangepi-rv.dtb" ; }else if (!strncmp (get_product_id_from_eeprom (),"STAR64" ,6 )) { fdtfile ="starfive/jh7110-pine64-star64.dtb" ; }else if (!strncmp (get_product_id_from_eeprom (),"VF7110A" ,7 )) {
Signature · 1 line
2.50.0
PATCH v3 4/5 configs: starfive: Add Orange Pi RV to visionfive2
In reply to E ShattowAdd Orange Pi RV to visionfive2 CONFIG_OF_LIST
--- configs/starfive_visionfive2_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configs/starfive_visionfive2_defconfig +1 -1
@@ -80,7 +80,7 @@ CONFIG_WGET_HTTPS=y CONFIG_CMD_BOOTSTAGE=y CONFIG_OF_BOARD=y CONFIG_DEVICE_TREE_INCLUDES="starfive-visionfive2-u-boot.dtsi" -CONFIG_OF_LIST="starfive/jh7110-deepcomputing-fml13v01 starfive/jh7110-milkv-mars starfive/jh7110-milkv-marscm-emmc starfive/jh7110-milkv-marscm-lite starfive/jh7110-pine64-star64 starfive/jh7110-starfive-visionfive-2-v1.2a starfive/jh7110-starfive-visionfive-2-v1.3b" +CONFIG_OF_LIST="starfive/jh7110-deepcomputing-fml13v01 starfive/jh7110-milkv-mars starfive/jh7110-milkv-marscm-emmc starfive/jh7110-milkv-marscm-lite starfive/jh7110-orangepi-rv starfive/jh7110-pine64-star64 starfive/jh7110-starfive-visionfive-2-v1.2a starfive/jh7110-starfive-visionfive-2-v1.3b" CONFIG_MULTI_DTB_FIT=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y
Signature · 1 line
2.50.0
PATCH v3 5/5 doc: board: starfive: Add Xunlong OrangePi RV
In reply to E ShattowOrangePi RV is a board that uses the same EEPROM product serial identifier as the StarFive VisionFive 2 1.3b.
In fact it is not completely compatible with the StarFive VisionFive 2 1.3b for use with Linux Kernel however it is good enough for use with U-Boot SPL and U-Boot Main. Describe how to set the devicetree search path and, for advanced users, suggest that it is possible to update the EEPROM data with an invented "XOPIRV" identifier for automatic board detection.
--- doc/board/starfive/index.rst | 1 + doc/board/starfive/orangepi_rv.rst | 35 ++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 doc/board/starfive/orangepi_rv.rst
doc/board/starfive/index.rst +1 -0
@@ -10,5 +10,6 @@ StarFive milk-v_mars milkv_marscm_emmc milkv_marscm_lite + orangepi_rv pine64_star64 visionfive2
doc/board/starfive/orangepi_rv.rst new file +35 -0
@@ -0,0 +1,35 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Xunlong OrangePi RV +=================== + +U-Boot for the OrangePi RV uses the same U-Boot binaries as the VisionFive 2 +board. In U-Boot SPL the actual board is detected as a VisionFive2 1.3b due to +a manufacturer problem and having the same EEPROM data as VisionFive2 1.3b. + +Device-tree selection +--------------------- + +U-Boot will set variable $fdtfile to starfive/jh7110-starfive-visionfive-2-v1.3b.dtb + +This is sufficient for U-Boot however fails to work correctly with the Linux Kernel. + +To overrule this selection the variable can be set manually and saved in the +environment + +:: + + env set fdtfile starfive/jh7110-orangepi-rv.dtb + env save + +EEPROM modification +------------------- + +For advanced users and developers an EEPROM identifier product serial number +beginning with "XOPIRV" will match the OrangePi RV and automatically set the +correct device-tree at U-Boot SPL phase. The procedure for writing EEPROM data +is not detailed here however is similar to that of the Pine64 Star64 and Milk-V +Mars CM. The write-protect disable pads on the Orange Pi RV circuit board +bottom are labeled WP and GND near the M.2 connector. + +.. include:: jh7110_common.rst
Signature · 1 line
2.50.0
Quoted 30 lines · E Shattow
Xunlong Orange Pi RV patches are now in the Linux v6.19 release candidate, so let's introduce support for this board.
Note: The content of EEPROM is known to not be unique on this board, and an (optional) invented "XOPIRV" identifier is implemented with this series. Without, there are reports that the board is detected in U-Boot as StarFive VisionFive 2 1.3b, and is then functional enough to load the devicetree prior to booting Linux.
Changes since v2:
- Collect tags (no code changes)
- Adjust missing S-o-by tag to first of tags list order for patch 4 "configs: starfive: Add Orange Pi RV to visionfive2".Changes since RFC v1:
- Cherrypick from devicetree-rebasing instead of importing upstream dts as-u-boot.dtsioverrides.
- Add basic documentation
- Mention invented "XOPIRV" identifier in commit messages
- Rebase on origin/nextE Shattow (3):
board: starfive: visionfive2: Add Orange Pi RV selection byproduct_id
configs: starfive: Add Orange Pi RV to visionfive2
doc: board: starfive: Add Xunlong OrangePi RVIcenowy Zheng (2):
dt-bindings: riscv: starfive: add xunlong,orangepi-rv
riscv: dts: starfive: add Orange Pi RV
Quoted 10 lines
board/starfive/visionfive2/spl.c | 3 + .../visionfive2/starfive_visionfive2.c | 2 + configs/starfive_visionfive2_defconfig | 2 +- doc/board/starfive/index.rst | 1 + doc/board/starfive/orangepi_rv.rst | 35 +++++++++ dts/upstream/Bindings/riscv/starfive.yaml | 1 + .../src/riscv/starfive/jh7110-orangepi-rv.dts | 76 +++++++++++++++++++ 7 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 doc/board/starfive/orangepi_rv.rst create mode 100644 dts/upstream/src/riscv/starfive/jh7110-orangepi-rv.dts