Jump to content

Char11e

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by Char11e

  1. 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>; }; }; };
  2. 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
  3. 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?
  4. @Werner I will close this Topic and discuss the issue in the old one.
  5. @Werner Yes, My SBC model is "OrangePi3", not LTS.
  6. Now I am trying to downgrade Kernel back to 5.51.X and figure out it.
  7. @Werner Got it! Thank you for your help. https://paste.armbian.com/idomububex Provided the link.
  8. 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)
  9. 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
  10. 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.
  11. 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!
  12. At present, I tested and found that wlan0&wlan1 can only connect to the same SSID at the same time. However, the information in iw points out that the two have different phy numbers.
  13. 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.
  14. 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.
  15. 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
  16. pi@orangepipcplus:~$ uname -a Linux orangepipcplus 6.6.44-current-sunxi #1 SMP Sat Aug 3 06:54:42 UTC 2024 armv7l armv7l armv7l GNU/Linux pi@orangepipcplus:~$ cat /etc/os-release PRETTY_NAME="Armbian 24.8.0-trunk.581 jammy" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.4 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.armbian.com" SUPPORT_URL="https://forum.armbian.com" BUG_REPORT_URL="https://www.armbian.com/bugs" PRIVACY_POLICY_URL="https://www.armbian.com" UBUNTU_CODENAME=jammy ARMBIAN_PRETTY_NAME="Armbian 24.8.0-trunk.581 jammy"
  17. pi@orangepipcplus:~$ iwconfig lo no wireless extensions. eth0 no wireless extensions. wlan0 IEEE 802.11bgn ESSID:"R15-3437" Nickname:"<WIFI@REALTEK>" Mode:Managed Frequency:2.417 GHz Access Point: A4:2A:95:33:34:3B Bit Rate:72.2 Mb/s Sensitivity:0/0 Retry:off RTS thr:off Fragment thr:off Power Management:off Link Quality=97/100 Signal level=40/100 Noise level=0/100 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 wlan1 unassociated Nickname:"<WIFI@REALTEK>" Mode:Managed Frequency=2.412 GHz Access Point: Not-Associated Sensitivity:0/0 Retry:off RTS thr:off Fragment thr:off Power Management:off Link Quality:0 Signal level:0 Noise level:0 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 pi@orangepipcplus:~$ ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::81:64ff:fe17:113d prefixlen 64 scopeid 0x20<link> ether 02:81:64:17:11:3d txqueuelen 1000 (Ethernet) RX packets 249637 bytes 216991539 (216.9 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 273259 bytes 225570858 (225.5 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 35 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 346 bytes 44456 (44.4 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 346 bytes 44456 (44.4 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.0.214 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fe80::606f:e755:6337:dbe5 prefixlen 64 scopeid 0x20<link> ether 12:81:64:17:11:3d txqueuelen 1000 (Ethernet) RX packets 62772 bytes 196306992 (196.3 MB) RX errors 0 dropped 184 overruns 0 frame 0 TX packets 18238 bytes 6340912 (6.3 MB) TX errors 0 dropped 2 overruns 0 carrier 0 collisions 0 wlan1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 12:81:64:17:13:3d txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 pi@orangepipcplus:~$ sudo iw dev wlan0 info Interface wlan0 ifindex 3 wdev 0x1 addr 12:81:64:17:11:3d ssid R15-3437 type managed wiphy 0 txpower 12.00 dBm pi@orangepipcplus:~$ ^C pi@orangepipcplus:~$ sudo iw dev wlan0 set txpower fixed 2000 pi@orangepipcplus:~$ sudo iw dev wlan0 info Interface wlan0 ifindex 3 wdev 0x1 addr 12:81:64:17:11:3d ssid R15-3437 type managed wiphy 0 txpower 12.00 dBm pi@orangepipcplus:~$ sudo iw dev wlan0 set txpower fixed 1500 pi@orangepipcplus:~$ sudo iw dev wlan0 info Interface wlan0 ifindex 3 wdev 0x1 addr 12:81:64:17:11:3d ssid R15-3437 type managed wiphy 0 txpower 12.00 dBm
  18. I want to modify the antenna strength of wlan0 in orangepipcplus, but using software settings does not work.
  19. @Gunjan Gupta Thank you for your suggestion. Currently, the kernel is upgraded to 6.6.36-current-sunxi. I found that the dts file has the USB defaulted to otg mode, and the USB storage device can be read and used normally. usb@1c19000 { compatible = "allwinner,sun8i-h3-musb"; reg = <0x1c19000 0x400>; clocks = <0x03 0x20>; resets = <0x03 0x11>; interrupts = <0x00 0x47 0x04>; interrupt-names = "mc"; phys = <0x18 0x00>; phy-names = "usb"; extcon = <0x18 0x00>; dr_mode = "otg"; status = "okay"; phandle = <0x57>;
  20. @Igor Thank you very much for your information! At present, I have synchronized the kernel to the latest version and can already see the wlan0 network card.
  21. @Dmitriy Golovin Can I add RTL8189FS settings to armbian-config to enable the network card?
  22. dmesg also shows that mmc1 has detected the sdio card. pi@orangepipcplus:~$ dmesg | grep mmc [ 0.000000] Kernel command line: root=UUID=f9fc34f5-ca46-43b7-8daf-4f52710744dd rootwait rootfstype=ext4 splash=verbose console=ttyS0,115200 console=tty1 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 consoleblank=0 loglevel=1 ubootpart=6f12a333-01 ubootsource=mmc usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 cgroup_enable=memory swapaccount=1 [ 0.000000] Unknown kernel command line parameters "splash=verbose ubootpart=6f12a333-01 ubootsource=mmc sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 cgroup_enable=memory", will be passed to user space. [ 2.190752] sunxi-mmc 1c0f000.mmc: Got CD GPIO [ 2.215138] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB [ 2.219150] sunxi-mmc 1c11000.mmc: initialized, max. request size: 16384 KB [ 2.250971] mmc0: host does not support reading read-only switch, assuming write-enable [ 2.254281] mmc0: new high speed SDHC card at address aaaa [ 2.255979] mmcblk0: mmc0:aaaa SE32G 29.7 GiB [ 2.262583] mmcblk0: p1 [ 2.279121] ubootsource=mmc [ 2.339350] mmc2: new DDR MMC card at address 0001 [ 2.341100] mmcblk2: mmc2:0001 8GTF4R 7.28 GiB [ 2.344746] mmcblk2: p1 [ 2.346628] mmcblk2boot0: mmc2:0001 8GTF4R 4.00 MiB [ 2.350919] mmcblk2boot1: mmc2:0001 8GTF4R 4.00 MiB [ 3.048466] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq [ 3.071233] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB [ 3.108016] mmc1: new high speed SDIO card at address 0001 [ 3.989616] EXT4-fs (mmcblk0p1): mounted filesystem f9fc34f5-ca46-43b7-8daf-4f52710744dd ro with writeback data mode. Quota mode: none. [ 7.657890] EXT4-fs (mmcblk0p1): re-mounted f9fc34f5-ca46-43b7-8daf-4f52710744dd r/w. Quota mode: none. pi@orangepipcplus:~$
  23. I checked the dts settings and it shows that wifi is implemented in mmc1. mmc@1c10000 { reg = <0x1c10000 0x1000>; pinctrl-names = "default"; pinctrl-0 = <0x17>; resets = <0x03 0x08>; reset-names = "ahb"; interrupts = <0x00 0x3d 0x04>; status = "okay"; #address-cells = <0x01>; #size-cells = <0x00>; compatible = "allwinner,sun7i-a20-mmc"; clocks = <0x03 0x17 0x03 0x4a 0x03 0x4c 0x03 0x4b>; clock-names = "ahb\0mmc\0output\0sample"; vmmc-supply = <0x15>; mmc-pwrseq = <0x18>; bus-width = <0x04>; non-removable; phandle = <0x56>; sdio_wifi@1 { reg = <0x01>; phandle = <0x57>; }; };
  24. After orangepiplus upgraded the kernel, the native wifi interface card disappeared. Output log of sudo armbianmonitor -u: https://paste.armbian.com/ilufiwukav Currently, after upgrading the kernel to 6.6.36-current-sunxi, the native wlan0 will disappear.
  25. At present, when I check the status of the phy controller, it is unlocked. But I am very curious about the relationship between wdev 0x100000001 in wlan1 and wdev 0x1 in wlan0. Does this mean that wlan1 is simulated from wlan0? pi@orangepipcplus:~$ iw dev phy#1 Interface wlan1 ifindex 4 wdev 0x100000001 addr 12:81:64:17:13:3d type managed txpower 12.00 dBm phy#0 Interface wlan0 ifindex 3 wdev 0x1 addr 12:81:64:17:11:3d ssid R15-3437 type managed txpower 12.00 dBm pi@orangepipcplus:~$ rfkill ID TYPE DEVICE SOFT HARD 0 wlan phy0 unblocked unblocked 1 wlan phy1 unblocked unblocked pi@orangepipcplus:~$
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines