-
Posts
35 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
I found the dts setting about "ethernet@5020000" was different between kernel 5.15.93 and kernel 6.1.47. We need to make sure the following things are correct: 1. Ethernet driver uses the correct clock/reset 2. GPIO reset can be pulled up 3. MDIO can correctly go to PHY 4. Pinmux correctly sets Ethernet pins #Kernnel 5.15.93-sunxi64 ethernet@5020000 { compatible = "allwinner,sun50i-h6-emac\0allwinner,sun50i-a64-emac"; syscon = <0x31>; reg = <0x5020000 0x10000>; interrupts = <0x00 0x0c 0x04>; interrupt-names = "macirq"; resets = <0x04 0x21>; reset-names = "stmmaceth"; clocks = <0x04 0x54>; clock-names = "stmmaceth"; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <0x32>; phy-mode = "rgmii-id"; phy-handle = <0x33>; phy-supply = <0x34>; phy-io-supply = <0x35>; allwinner,rx-delay-ps = <0xc8>; allwinner,tx-delay-ps = <0xc8>; phandle = <0x78>; mdio { compatible = "snps,dwmac-mdio"; #address-cells = <0x01>; #size-cells = <0x00>; phandle = <0x79>; ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x01>; reset-gpios = <0x1f 0x03 0x0e 0x01>; reset-assert-us = <0x3a98>; reset-deassert-us = <0x9c40>; phandle = <0x33>; }; }; }; #Kernel 6.1.47-current-sunxi64 ethernet@5020000 { compatible = "allwinner,sun50i-h6-emac\0allwinner,sun50i-a64-emac"; syscon = <0x32>; reg = <0x5020000 0x10000>; interrupts = <0x00 0x0c 0x04>; interrupt-names = "macirq"; resets = <0x06 0x21>; reset-names = "stmmaceth"; clocks = <0x06 0x54>; clock-names = "stmmaceth"; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <0x33>; phy-mode = "rgmii-id"; phy-handle = <0x34>; phy-supply = <0x2e>; phy-io-supply = <0x35>; allwinner,rx-delay-ps = <0xc8>; allwinner,tx-delay-ps = <0xc8>; phandle = <0x79>; mdio { compatible = "snps,dwmac-mdio"; #address-cells = <0x01>; #size-cells = <0x00>; phandle = <0x7a>; ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x01>; reset-gpios = <0x1e 0x03 0x0e 0x01>; reset-assert-us = <0x3a98>; reset-deassert-us = <0x9c40>; phandle = <0x34>; }; }; };
-
I am trying to downgrade to kernel 5.15.93-sunxi64 and found the eth0 is worked. pi@orangepi3:~$ dmesg | grep eth0 [ 18.467932] dwmac-sun8i 5020000.ethernet eth0: PHY [stmmac-0:01] driver [RTL8211E Gigabit Ethernet] (irq=POLL) [ 18.468969] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 18.469701] dwmac-sun8i 5020000.ethernet eth0: No Safety Features support found [ 18.469727] dwmac-sun8i 5020000.ethernet eth0: No MAC Management Counters available [ 18.469734] dwmac-sun8i 5020000.ethernet eth0: PTP not supported by HW [ 18.475463] dwmac-sun8i 5020000.ethernet eth0: configuring for phy/rgmii-id link mode [ 20.510690] dwmac-sun8i 5020000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 20.510735] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
-
My log : https://paste.armbian.com/idomububex I find the phy issue stiil happened in OranpePi3 when using Kernel 6.1.47-current-sunxi64 and 6.12.20-current-sunxi64. @Jack07 @JohnnyLaw Do you still have same issue when using 6.X.X verion kernel?
-
Orangepi3 eth0 network card initialization failed
Char11e replied to Char11e's topic in Allwinner sunxi
@Werner I will close this Topic and discuss the issue in the old one. -
Orangepi3 eth0 network card initialization failed
Char11e replied to Char11e's topic in Allwinner sunxi
@Werner Yes, My SBC model is "OrangePi3", not LTS. -
Orangepi3 eth0 network card initialization failed
Char11e replied to Char11e's topic in Allwinner sunxi
Now I am trying to downgrade Kernel back to 5.51.X and figure out it. -
Orangepi3 eth0 network card initialization failed
Char11e replied to Char11e's topic in Allwinner sunxi
@Werner Got it! Thank you for your help. https://paste.armbian.com/idomububex Provided the link. -
The eth0 device does not work when using 6.1.47-current-sunxi64 and 6.12.20-current-sunxi64 kernels. There will be the following errors in the kernel log. pi@orangepi3:~$ dmesg | grep eth0 [ 16.997431] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 16.998219] dwmac-sun8i 5020000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) [ 19.284111] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 19.284754] dwmac-sun8i 5020000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) [ 19.308140] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 19.308738] dwmac-sun8i 5020000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) [ 19.334063] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 19.334754] dwmac-sun8i 5020000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) [ 19.358727] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 19.359417] dwmac-sun8i 5020000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) [ 151.380407] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 151.381105] dwmac-sun8i 5020000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) [ 157.928629] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 157.929360] dwmac-sun8i 5020000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) [ 320.009515] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 320.010271] dwmac-sun8i 5020000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) [ 320.037458] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 320.038169] dwmac-sun8i 5020000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) [ 320.062716] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 320.063428] dwmac-sun8i 5020000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) [ 320.082662] dwmac-sun8i 5020000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 320.083389] dwmac-sun8i 5020000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19)
-
This is a problem of interaction between the phy driver and MAC in the Linux kernel. ./stmicro/stmmac/stmmac_main.c:928: pr_err("%s: Cannot attach to PHY (error: %d)\n", __func__, ret); ./stmicro/stmmac/stmmac_main.c-894-static int stmmac_open(struct net_device *dev) ./stmicro/stmmac/stmmac_main.c:299:static int stmmac_init_phy(struct net_device *dev) ../phy/phy_device.c:371:struct phy_device * phy_connect(struct net_device *dev, const char *bus_id, ./phy_device.c:336:int phy_connect_direct(struct net_device *dev, struct phy_device *phydev, ./phy_device.c:441:static int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, ./phy_device.c:413:int phy_init_hw(struct phy_device *phydev) It is known that an error will be reported during phy initialization, but I am still looking for the kernel source code for Sunxi Linux 6.1.xx and 5.15.xx. Error code flow: stmmac_open > stmmac_init_phy > phy_connect > phy_connect_direct > phy_attach_direct > phy_init_hw
-
How to modify orange pi pc plus wifi intensity
Char11e replied to Char11e's topic in Allwinner sunxi
Hi @Igor, Thank you for your useful and honest advice. I appreciate it. https://github.com/CGarces/rtl8192eu-linux-driver/commit/d32dfa2c2b2a1b8e75d163d23e9e18f750ebfbe4 I have found that someone has provided a fix for Tx power in the rtl8192eu driver. I am currently compiling and testing this method to work in the RTL8189FS driver. -
How to modify orange pi pc plus wifi intensity
Char11e replied to Char11e's topic in Allwinner sunxi
Thank you for your explanation and contribution, I appreciate and admire it. https://linux-sunxi.org/Wifi#RTL8189FTV I will try to look into rtl8189fs, thank you very much! -
How to modify orange pi pc plus wifi intensity
Char11e replied to Char11e's topic in Allwinner sunxi
pi@orangepipcplus:~$ sudo iwconfig wlan0 txpower 20 Error for wireless request "Set Tx Power" (8B26) : SET failed on device wlan0 ; Operation not permitted. pi@orangepipcplus:~$ sudo iw dev wlan0 set txpower fixed 2000 pi@orangepipcplus:~$ I tried to use iwconfig and iw commands to configure txpower. However, iwconfig will give an error response of "Set tx power". iw does not respond to any messages. -
How to modify orange pi pc plus wifi intensity
Char11e replied to Char11e's topic in Allwinner sunxi
I'm not sure if this is related to a limitation of the rtl8189fs firmware. I tried closing the wlan0 interface first and then configuring txpower, but it didn't seem to work. After executing the command, check dmesg and no relevant logs are found. -
How to modify orange pi pc plus wifi intensity
Char11e replied to Char11e's topic in Allwinner sunxi
pi@orangepipcplus:~$ sudo lshw -C network *-network:0 description: Ethernet interface physical id: 12 logical name: eth0 serial: 02:81:64:17:11:3d size: 100Mbit/s capacity: 100Mbit/s capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=st_mac100 driverversion=6.6.44-current-sunxi duplex=full ip=192.168.1.100 link=yes multicast=yes port=twisted pair speed=100Mbit/s *-network:1 description: Wireless interface physical id: 13 bus info: mmc@1:0001:1 logical name: wlan0 serial: 12:81:64:17:11:3d capabilities: ethernet physical wireless configuration: broadcast=yes driver=rtl8189fs driverversion=6.6.44-current-sunxi ip=192.168.0.214 multicast=yes wireless=IEEE 802.11bgn *-network:2 description: Wireless interface physical id: 14 bus info: mmc@1:0001:1 logical name: wlan1 serial: 12:81:64:17:13:3d capabilities: ethernet physical wireless configuration: broadcast=yes driver=rtl8189fs driverversion=6.6.44-current-sunxi multicast=yes wireless=unassociated