Skip to content

请求适配H618的PCDN板子。4+128G ,这块板子性价比不错。 #3434

@lixuekun-jiandan

Description

@lixuekun-jiandan

现在市面上H618有很多PCDN淘汰下来的二手盒子,这种盒子之前是用来跑PCDN的,现在咸鱼100左右一台,128G Emmc,H618的芯片,4G内存,2个USB接口,1个HDMI显示接口,1个千兆网口,没有WIFI配置,蓝牙不太清楚。可以用来做很多事了。

我在咸鱼买到的这款H618盒子是刷了定制的 18.04.6 LTS (GNU/Linux 5.4.125 aarch64) 这款系统 且 内置了PCDN捆绑。

目前适配的H618镜像:Orange Pi Zero3 ,我已经经过测试黑屏无法启动,DTB没有经过替换测试。


我测试了 https://github.com/NickAlilovic/build 的 Armbian-unofficial_25.05.0-trunk_Vontar-h618_bookworm_edge_6.12.11_server.img 镜像刷入后是可以正常开机的,但是网卡无法识别,该镜像我看只看DTB里面只启用了 ethernet@5030000 网卡(猜测可能是无线网卡),但这款盒子用的是 ethernet@5020000 网卡节点,我经过反编译DTB然后进行不断的调试,最终系统里面可以正常显示 eth0 网口,但是PHY出错了,我实在是找不到问题了,希望armbian能够适配该板子,在此进行感激各位开发者。


下面我附加一些DTB信息,希望能够有用:

目前 5.4 内核,可以正常使用千兆网卡的 DTB信息:

	eth@5020000 {
		compatible = "allwinner,sunxi-gmac";
		reg = <0x00 0x5020000 0x00 0x10000 0x00 0x3000030 0x00 0x04>;
		interrupts = <0x00 0x0e 0x04>;
		interrupt-names = "gmacirq";
		clocks = <0x02 0x54 0x02 0x53>;
		clock-names = "gmac\0ephy";
		resets = <0x02 0x1f>;
		device_type = "gmac0";
		phy-mode = "rgmii";
		phy-rst = <0x23 0x08 0x10 0x00>;
		gmac-power0;
		gmac-power1;
		gmac-power2;
		status = "okay";
		pinctrl-0 = <0x5b>;
		pinctrl-1 = <0x5c>;
		pinctrl-names = "default\0sleep";
		tx-delay = <0x06>;
		rx-delay = <0x00>;
		phandle = <0xb9>;
	};

新的 6.12 内核,通过 Armbian-unofficial_25.05.0-trunk_Vontar-h618_bookworm_edge_6.12.11_server.img 进行反编译修改的DTB内核(该配置可以正常显示网口,但是会PHY失败,不知道什么问题):

ethernet@5020000 {
compatible = "allwinner,sun50i-h616-emac", "allwinner,sun50i-a64-emac";
//compatible = "allwinner,sunxi-gmac";
reg = <0x05020000 0x10000>; //该reg经过反复调试,不可变,变了会出错。
interrupts = <0x0 0xe 0x4>;
interrupt-names = "macirq";
clocks = <0x02 0x54 0x02 0x53>; // clocks 固定4个不报错,不然会报错 dwmac-sun8i 5020000.ethernet: EMAC reset timeout
clock-names = "stmmaceth";
resets = <0x2 0x1e>;
reset-names = "stmmaceth";
syscon = <0x2d 0x1>; // syscon 我一直报错,试了 0x0 和 0x1 都不可以,都会报错 0x0报错:Current syscon value is not the default 58000 (expect 50000) 0x1报错:dwmac-sun8i 5020000.ethernet: Current syscon value is not the default 53fe1 (expect 50000)

status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
phy-mode = "rgmii";    
phy-handle = <&ext_rgmii_phy>;
phy-supply = <&reg_dldo1>;
phy-io-supply = <&reg_aldo1>;
allwinner,tx-delay-ps = <700>; 
allwinner,rx-delay-ps = <3100>; 

mdio0 {
    compatible = "snps,dwmac-mdio";
    #address-cells = <1>;
    #size-cells = <0>;

    ext_rgmii_phy: ethernet-phy@0 {
        compatible = "realtek,rtl8211f", "ethernet-phy-ieee802.3-c22";
        reg = <0>;
	//reset-gpios = <&pio 7 10 0>; // 使用 PH9 会 资源冲突繁忙,PH10 正常,但还是PHY报错。
	//reset-assert-us = <10000>;   // 复位保持10ms
	//reset-deassert-us = <30000>; // 释放后等待30ms
    };
};

};

新的6.12内核进去系统后查看dmesg的相关错误信息:
[ 2.652997] sun8i-dw-hdmi 6000000.hdmi: Detected HDMI TX controller v2.12a with HDCP (DWC HDMI 2.0 TX PHY)
[ 3.815297] dwmac-sun8i 5020000.ethernet: IRQ eth_wake_irq not found
[ 3.815308] dwmac-sun8i 5020000.ethernet: IRQ eth_lpi not found
[ 3.815318] dwmac-sun8i 5020000.ethernet: IRQ sfty not found
[ 3.815810] dwmac-sun8i 5020000.ethernet: PTP uses main clock
[ 3.815844] dwmac-sun8i 5020000.ethernet: Current syscon value is not the default 53fe1 (expect 50000)
[ 3.821438] dwmac-sun8i 5020000.ethernet: No HW DMA feature register supported
[ 3.821464] dwmac-sun8i 5020000.ethernet: RX Checksum Offload Engine supported
[ 3.821471] dwmac-sun8i 5020000.ethernet: COE Type 2
[ 3.821478] dwmac-sun8i 5020000.ethernet: TX Checksum insertion supported
[ 3.821484] dwmac-sun8i 5020000.ethernet: Normal descriptors
[ 3.821490] dwmac-sun8i 5020000.ethernet: Chain mode enabled
[ 3.821505] dwmac-sun8i 5020000.ethernet: device MAC address ca:b5:f9:db:8e:97
[ 32.544851] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 32.545996] dwmac-sun8i 5020000.ethernet eth0: validation of rgmii-rxid with support 00,00000000,00000000,00006280 and advertisement 00,00000000,00000000,00006280 failed: -EINVAL
[ 32.546096] dwmac-sun8i 5020000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -22)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions