Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X96 Max Plus A100 no LAN after installing on eMMC #121

Closed
hubermedia-dev opened this issue Feb 23, 2022 · 5 comments
Closed

X96 Max Plus A100 no LAN after installing on eMMC #121

hubermedia-dev opened this issue Feb 23, 2022 · 5 comments

Comments

@hubermedia-dev
Copy link

Hello, I have a few X96 Max Plus boxes, the Android Firmware is X96Max_Plus_A100_20210608-1518.img.

Printed on the board is "Q5X3_141 V4.1 20112".

I can't reliably boot from SD card (can randomly rarely get it to boot some images on some SD cards some times, reflashing and pressing the toothpick button 10+ times sometimes works, sometimes not), but booting from USB works. (booting from SD card works after installing bootloader on the eMMC)
I managed to get eth0 working when booting from USB, but it seems breaks after replacing the bootloader on the eMMC.
After replacing the bootloader on the eMMC it even breaks LAN when booting from USB again.

Details:

with Image: Armbian_22.02.0_Aml_s905x3_focal_5.4.180_2022.02.19.0051.img.gz

booting from USB with default dtb in uEnv.txt FDT=/dtb/amlogic/meson-sm1-x96-max-plus-100m.dtb

  • ❌ only 1GB memory
  • ❌ eth0 does not work
dmesg|grep eth

[    0.000000] Machine model: AMedia X96 Max+ (eth0 speed:100Mb/s)
[    0.000000] psci: probing for conduit method from DT.
[    5.219732] meson8b-dwmac ff3f0000.ethernet: IRQ eth_wake_irq not found
[    5.222807] meson8b-dwmac ff3f0000.ethernet: IRQ eth_lpi not found
[    5.229027] meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
[    5.235605] meson8b-dwmac ff3f0000.ethernet: no reset control found
[    5.242114] meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    5.248199] meson8b-dwmac ff3f0000.ethernet:         DWMAC1000
[    5.253307] meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
[    5.260721] meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
[    5.268138] meson8b-dwmac ff3f0000.ethernet: COE Type 2
[    5.273313] meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
[    5.281146] meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
[    5.286682] meson8b-dwmac ff3f0000.ethernet: Normal descriptors
[    5.293308] meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
[    5.298329] meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[   11.004720] systemd[1]: Found device /sys/subsystem/net/devices/eth0.
[   11.456098] systemd[1]: Started ifup for eth0.
[   11.997659] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [Generic PHY]
[   12.114169] meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma
[   12.119313] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[   12.132489] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed
[   18.637664] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [Generic PHY]
[   18.754190] meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma
[   18.758600] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[   18.767649] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed
...

booting from USB with meson-sm1-x96-max-plus.dtb

  • ❌ only 1GB memory
  • ✔️ eth0 does not work
dmesg|grep eth

[    0.000000] psci: probing for conduit method from DT.
[    5.239687] meson8b-dwmac ff3f0000.ethernet: IRQ eth_wake_irq not found
[    5.242774] meson8b-dwmac ff3f0000.ethernet: IRQ eth_lpi not found
[    5.248990] meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
[    5.255573] meson8b-dwmac ff3f0000.ethernet: no reset control found
[    5.262105] meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    5.269002] meson8b-dwmac ff3f0000.ethernet:         DWMAC1000
[    5.273271] meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
[    5.281451] meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
[    5.288107] meson8b-dwmac ff3f0000.ethernet: COE Type 2
[    5.293282] meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
[    5.301043] meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
[    5.306648] meson8b-dwmac ff3f0000.ethernet: Normal descriptors
[    5.313278] meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
[    5.318296] meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[   11.786954] systemd[1]: Found device /sys/subsystem/net/devices/eth0.
[   12.778658] systemd[1]: Started ifup for eth0.
[   13.180884] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [Generic PHY]
[   13.294035] meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma
[   13.302869] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[   13.321607] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed
[   19.450846] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [Generic PHY]
[   19.567346] meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma
[   19.571461] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[   19.580484] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed
...

booting from USB with meson-sm1-sei610.dtb

  • ❌ only 1GB memory
  • ✔️ eth0 does work
dmesg|grep eth

[    0.000000] psci: probing for conduit method from DT.
[    5.356197] meson8b-dwmac ff3f0000.ethernet: IRQ eth_wake_irq not found
[    5.358743] meson8b-dwmac ff3f0000.ethernet: IRQ eth_lpi not found
[    5.364976] meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
[    5.370823] meson8b-dwmac ff3f0000.ethernet: no reset control found
[    5.378027] meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    5.384150] meson8b-dwmac ff3f0000.ethernet:         DWMAC1000
[    5.389265] meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
[    5.396682] meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
[    5.404096] meson8b-dwmac ff3f0000.ethernet: COE Type 2
[    5.409271] meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
[    5.416257] meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
[    5.422640] meson8b-dwmac ff3f0000.ethernet: Normal descriptors
[    5.428513] meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
[    5.434282] meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[   13.089080] systemd[1]: Found device /sys/subsystem/net/devices/eth0.
[   14.100034] systemd[1]: Started ifup for eth0.
[   14.584440] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.1:08] driver [Meson G12A Internal PHY]
[   14.600946] meson8b-dwmac ff3f0000.ethernet eth0: No Safety Features support found
[   14.606946] meson8b-dwmac ff3f0000.ethernet eth0: PTP not supported by HW
[   14.613698] meson8b-dwmac ff3f0000.ethernet eth0: configuring for phy/rmii link mode
[   16.125482] meson8b-dwmac ff3f0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[   16.132766] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

booting from USB with meson-sm1-sei610_578.dtb (inspired by #95)

  • ❌ only 1GB memory
  • ✔️ eth0 does work
dmesg|grep eth

[    0.000000] psci: probing for conduit method from DT.
[    5.316660] meson8b-dwmac ff3f0000.ethernet: IRQ eth_wake_irq not found
[    5.318983] meson8b-dwmac ff3f0000.ethernet: IRQ eth_lpi not found
[    5.325194] meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
[    5.331044] meson8b-dwmac ff3f0000.ethernet: no reset control found
[    5.338334] meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    5.344372] meson8b-dwmac ff3f0000.ethernet:         DWMAC1000
[    5.349485] meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
[    5.356899] meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
[    5.364318] meson8b-dwmac ff3f0000.ethernet: COE Type 2
[    5.369491] meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
[    5.376477] meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
[    5.382859] meson8b-dwmac ff3f0000.ethernet: Normal descriptors
[    5.388734] meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
[    5.394502] meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[   11.970127] systemd[1]: Found device /sys/subsystem/net/devices/eth0.
[   13.700000] systemd[1]: Started ifup for eth0.
[   14.304511] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.1:08] driver [Meson G12A Internal PHY]
[   14.321454] meson8b-dwmac ff3f0000.ethernet eth0: No Safety Features support found
[   14.327656] meson8b-dwmac ff3f0000.ethernet eth0: PTP not supported by HW
[   14.334242] meson8b-dwmac ff3f0000.ethernet eth0: configuring for phy/rmii link mode
[   37.952731] meson8b-dwmac ff3f0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[   37.956296] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

armbian-install (selecting 51: X96 Max+)

booting from eMMC, default dtb is meson-sm1-x96-max-plus.dtb

  • ✔️ 4GB memory
  • ❌ eth0 does not work
dmesg|grep eth

[    0.000000] psci: probing for conduit method from DT.
[    4.999378] meson8b-dwmac ff3f0000.ethernet: IRQ eth_wake_irq not found
[    5.002377] meson8b-dwmac ff3f0000.ethernet: IRQ eth_lpi not found
[    5.008594] meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
[    5.015174] meson8b-dwmac ff3f0000.ethernet: no reset control found
[    5.021692] meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    5.028585] meson8b-dwmac ff3f0000.ethernet:         DWMAC1000
[    5.032873] meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
[    5.041049] meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
[    5.047710] meson8b-dwmac ff3f0000.ethernet: COE Type 2
[    5.052881] meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
[    5.060648] meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
[    5.066249] meson8b-dwmac ff3f0000.ethernet: Normal descriptors
[    5.072872] meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
[    5.077898] meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    8.422630] systemd[1]: Found device /sys/subsystem/net/devices/eth0.
[    8.670525] systemd[1]: Started ifup for eth0.
[    9.050286] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [Generic PHY]
[    9.166704] meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma
[    9.170988] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[    9.184940] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed
[   14.796900] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [Generic PHY]
[   14.930042] meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma
[   14.934222] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[   14.943219] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed
...

booting from eMMC with meson-sm1-sei610.dtb

  • ✔️ 4GB memory
  • ❌ eth0 does not work
dmesg|grep eth

[    0.000000] psci: probing for conduit method from DT.
[    5.120409] meson8b-dwmac ff3f0000.ethernet: IRQ eth_wake_irq not found
[    5.123293] meson8b-dwmac ff3f0000.ethernet: IRQ eth_lpi not found
[    5.129542] meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
[    5.135392] meson8b-dwmac ff3f0000.ethernet: no reset control found
[    5.142671] meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    5.148674] meson8b-dwmac ff3f0000.ethernet:         DWMAC1000
[    5.153893] meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
[    5.161250] meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
[    5.168666] meson8b-dwmac ff3f0000.ethernet: COE Type 2
[    5.173840] meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
[    5.180827] meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
[    5.187210] meson8b-dwmac ff3f0000.ethernet: Normal descriptors
[    5.193082] meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
[    5.198851] meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    8.907281] systemd[1]: Found device /sys/subsystem/net/devices/eth0.
[    9.200948] systemd[1]: Started ifup for eth0.
[    9.590811] meson8b-dwmac ff3f0000.ethernet eth0: no phy at addr -1
[    9.596271] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[   15.324940] meson8b-dwmac ff3f0000.ethernet eth0: no phy at addr -1
[   15.331070] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
...

booting from USB with meson-sm1-x96-max-plus.dtb (after installing on eMMC)

  • ✔️ 4GB memory
  • ❌ eth0 does not work
dmesg|grep eth

[    0.000000] psci: probing for conduit method from DT.
[    5.002565] meson8b-dwmac ff3f0000.ethernet: IRQ eth_wake_irq not found
[    5.005336] meson8b-dwmac ff3f0000.ethernet: IRQ eth_lpi not found
[    5.011560] meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
[    5.018123] meson8b-dwmac ff3f0000.ethernet: no reset control found
[    5.024734] meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    5.031547] meson8b-dwmac ff3f0000.ethernet:         DWMAC1000
[    5.035842] meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
[    5.044024] meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
[    5.050675] meson8b-dwmac ff3f0000.ethernet: COE Type 2
[    5.055850] meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
[    5.063613] meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
[    5.069217] meson8b-dwmac ff3f0000.ethernet: Normal descriptors
[    5.075844] meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
[    5.080864] meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[   10.681849] systemd[1]: Found device /sys/subsystem/net/devices/eth0.
[   10.845438] systemd[1]: Started ifup for eth0.
[   11.293627] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [Generic PHY]
[   11.406787] meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma
[   11.411678] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[   11.420617] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed
...

booting from USB with meson-sm1-sei610.dtb (after installing on eMMC)

  • ✔️ 4GB memory
  • ❌ eth0 does not work
dmesg|grep eth

[    0.000000] psci: probing for conduit method from DT.
[    5.114468] meson8b-dwmac ff3f0000.ethernet: IRQ eth_wake_irq not found
[    5.117347] meson8b-dwmac ff3f0000.ethernet: IRQ eth_lpi not found
[    5.123622] meson8b-dwmac ff3f0000.ethernet: PTP uses main clock
[    5.129446] meson8b-dwmac ff3f0000.ethernet: no reset control found
[    5.136748] meson8b-dwmac ff3f0000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    5.142729] meson8b-dwmac ff3f0000.ethernet:         DWMAC1000
[    5.147945] meson8b-dwmac ff3f0000.ethernet: DMA HW capability register supported
[    5.155305] meson8b-dwmac ff3f0000.ethernet: RX Checksum Offload Engine supported
[    5.162721] meson8b-dwmac ff3f0000.ethernet: COE Type 2
[    5.167895] meson8b-dwmac ff3f0000.ethernet: TX Checksum insertion supported
[    5.174881] meson8b-dwmac ff3f0000.ethernet: Wake-Up On Lan supported
[    5.181264] meson8b-dwmac ff3f0000.ethernet: Normal descriptors
[    5.187135] meson8b-dwmac ff3f0000.ethernet: Ring mode enabled
[    5.192907] meson8b-dwmac ff3f0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[   10.735830] systemd[1]: Found device /sys/subsystem/net/devices/eth0.
[   11.405654] systemd[1]: Started ifup for eth0.
[   11.844771] meson8b-dwmac ff3f0000.ethernet eth0: no phy at addr -1
[   11.849882] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[   18.628018] meson8b-dwmac ff3f0000.ethernet eth0: no phy at addr -1
[   18.632059] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
...


I also get this output from the bootloader on the screen when booting after armbian-install:

U-Boot output

Net: eth0: ethernet@ff3f0000
Hit any key to stop autoboot: 0
starting USB...
Bus usb@ff500000: Register 3000140 NbrPorts 3
Starting the controller
USB XHCI 1.10
scanning bus usb@ff500000 for devices... 2 USB Device(s) found
  scanning usb for storage devices... 0 Storage Device(s) found
  
Device 0: unknown device
Card did not respond to voltage select! : -110
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc2(part 0) is current device
Scanning mmc 2:1...
Found U-Boot script /boot.scr
1025 bytes read in 1 ms (1001 KiB/s)
## Executing script at 08000000
Start AMLOGIC mainline U-boot
## Error: "bootfromsd" not defined
382 bytes read in 1 ms (373 KiB/s)
## Error: "mac" not defined
## Error: "eth_mac" not defined
ethaddr=56:90:cc:xx:xx:xx
20685312 bytes read in 447 ms (44.1 MiB/s)
6188624 bytes read in 134 ms (44 MiB/s)
47629 bytes read in 4 ms (11.4 MiB/s)
## Loading init Ramdisk from Legacy Image at 13000000 ...
   Image Name: uInitrd
   Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size: 6188560 Bytes = 5.9 MiB
   Load Adress: 00000000
   Entry Point: 00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 08008000
   Booting using the fdt blob at 0x8008000
   Loading Ramdisk to 3fa19000, end 3ffffe10 ... OK
ERROR: reserving fdt memory region failed (address=5300000 size=2000000 flags=4)
   Loading Device Tree to 000000003fa0a000, end 000000003fa18a0c ... OK
   
Starting kernel ...

I also tried the kernel 5.10 image, but results were similar (didn't retest for this issue).

I also tried upgrading to the newest kernel 5.16.10 (at time of testing), it most notably made the HDMI use the resolution of the connected monitor, however it didn't make the LAN work when installed on eMMC. (I believe it actually lowered the reliability of the LAN connection previously when booting from USB, but i have no accurate test of that)

I also tried to install the Android bootloader instead of mainline with "armbian-install no", because i read somewhere else that the hk1 bootloader works better, and that fits the filename of the Android Bootloader in the table for 51:X96 Max+: hk1box-bootloader.img.
However, that bricked the box :(.

In the U-Boot Output it is aware of the ethernet interface, i assume for PXE support.
Where do the U-Boot blobs come from? Can i compile the exact same myself, but leave out ethernet support, does that make any sense?
If it doesn't touch the ethernet with wrong parameters it may not mess it up. Or is the initialization by the bootloader actually required?

Do you have any suggestions that could help me get the Ethernet working?

Thank you.

@hubermedia-dev
Copy link
Author

Click to show pictures of the board

x96-2-g
x96-1-g

@ophub
Copy link
Owner

ophub commented Feb 24, 2022

Your network card cannot be used, indicating that there is no network card driver. What is your network card chip? IP1001M?The network card chip IP1001M can be used in Android, but the mainline kernel has not been driven yet.

@hubermedia-dev
Copy link
Author

Thank you for your answer.

Do you have a suggestion how to find out what chip it is? What i assume could be it on the board does not have any readable text, and in the dmesg output, the dtb or the /sys/ tree of the Android system i don't see anything like that.

X96Max_Plus_A100_20210608-1518.img Android dmesg

Linux localhost 4.9.113 #1 SMP PREEMPT Tue Jun 8 15:21:32 CST 2021 armv7l

franklin:/ $ dmesg|grep eth
[    0.000000] <6>[    0.000000@0] psci: probing for conduit method from DT.
[    0.350381] <3>[    0.350381@0] EARC ff663800.earc: Check whether support eARC TX
[    0.350399] <3>[    0.350399@0] EARC ff663800.earc: Check whether support eARC TX
[    0.350415] <3>[    0.350415@0] EARC ff663800.earc: Check whether support eARC TX
[    0.350431] <3>[    0.350431@0] EARC ff663800.earc: Check whether support eARC TX
[    0.350479] <3>[    0.350479@0] EARC ff663800.earc: platform get irq earc_tx failed, Check whether support eARC TX
[    0.922022] <6>[    0.922022@2]  ee eth reset:Addr = f0cf9008
[    0.932715] <6>[    0.932715@2] meson6-dwmac ff3f0000.ethernet: no reset control found
[    0.935955] <6>[    0.935955@2] eth%d: PHY ID 01803301 at 8 IRQ POLL (stmmac-0:08) active
[    0.938648] <6>[    0.938648@2] usbcore: registered new interface driver cdc_ether
[    0.944503] <5>[    0.944503@2] cpuidle: enable-method property 'psci' found operations
[    0.944665] <5>[    0.944665@2] cpuidle: enable-method property 'psci' found operations
[    0.944823] <5>[    0.944823@2] cpuidle: enable-method property 'psci' found operations
[    0.944968] <5>[    0.944968@2] cpuidle: enable-method property 'psci' found operations
[    4.588547] <6>[    4.588547@2] l2tp_eth: L2TP ethernet pseudowire support (L2TPv3)
[    4.646259] <6>[    4.646259@2] bl: method            = pwm(1)
[   12.891732] <4>[   12.891732@3] <if_bad>: set cur_etheraddr failed
[   17.880217] <6>[   17.880217@3] eth0: device MAC address 90:0e:b3:32:e9:fc
[   18.003316] <4>[   18.003316@2] meson6-dwmac ff3f0000.ethernet eth0: fail to init PTP.
[   18.003934] <6>[   18.003934@2] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   20.031259] <6>[   20.031259@2] meson6-dwmac ff3f0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[   20.670086] <6>[   20.670086@2] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

franklin:/ $ dmesg|grep -i phy
[    0.000000] <6>[    0.000000@0] Booting Linux on physical CPU 0x0
[    0.339071] <6>[    0.339071@0] rdma_register, rdma_table_addr f0ad1000 rdma_table_addr_phy e3840000 reg_buf ed720000
[    0.687024] <6>[    0.687024@0] secmon: phy_in_base: 0x50fe000, phy_out_base: 0x50ff000
[    0.688728] <6>[    0.688728@0] rdma_register, rdma_table_addr f0adc000 rdma_table_addr_phy e3849000 reg_buf ed790000
[    0.695598] <6>[    0.695598@0] hdmitx: hdmitx20: Mapped PHY: 0xffd00000
[    0.695625] <6>[    0.695625@0] hdmitx: hdmitx20: Mapped PHY: 0xff634400
[    0.695649] <6>[    0.695649@0] hdmitx: hdmitx20: Mapped PHY: 0xff900000
[    0.695667] <6>[    0.695667@0] hdmitx: hdmitx20: Mapped PHY: 0xff800000
[    0.695684] <6>[    0.695684@0] hdmitx: hdmitx20: Mapped PHY: 0xff63c000
[    0.695697] <6>[    0.695697@0] hdmitx: hdmitx20: Mapped PHY: 0xffd00000
[    0.695713] <6>[    0.695713@0] hdmitx: hdmitx20: Mapped PHY: 0xff608000
[    0.695728] <6>[    0.695728@0] hdmitx: hdmitx20: Mapped PHY: 0xff600000
[    0.695743] <6>[    0.695743@0] hdmitx: hdmitx20: Mapped PHY: 0xffe01000
[    0.825338] <4>[    0.825338@1] [RX]-up_phy_addr = 1
[    0.920699] <6>[    0.920699@2] libphy: Fixed MDIO Bus: probed
[    0.935937] <6>[    0.935937@2] libphy: stmmac: probed
[    0.935955] <6>[    0.935955@2] eth%d: PHY ID 01803301 at 8 IRQ POLL (stmmac-0:08) active
[    1.479458] <4>[    1.479458@0] [RX]-up_phy_addr = 1
[    1.479563] <6>[    1.479563@0] hdmitx: system: update physcial size: 550 310
[    3.733599] <6>[    3.733599@2] amlogic-new-usb2-v2 ffe09000.usb2phy: USB2 phy probe:phy_mem:0xffe09000, iomap phy_base:0xf0ee2000
[    3.742274] <6>[    3.742274@2] amlogic-new-usb3-v2 ffe09080.usb3phy: USB3 phy probe:phy_mem:0xffe09080, iomap phy_base:0xf0eed080
[    4.118813] <6>[    4.118813@2] rdma_register, rdma_table_addr f1009000 rdma_table_addr_phy e384a000 reg_buf c6309800
[    4.119277] <6>[    4.119277@2] rdma_register, rdma_table_addr f100b000 rdma_table_addr_phy e384b000 reg_buf c6309c00
[    4.644909] <4>[    4.644909@2] dwc_otg: usb0: type: 2 speed: 0, config: 0, dma: 0, id: 0, phy: ffe09000, ctrl: 0
[   10.217411] <4>[   10.217411@3] vpu base address get from platform driver physical base addr=0xff610000, virtual base=0xf2848000
[   14.174288] <4>[   14.174288@2] allocating phys 0x64c00000, size 20480k, wq:eac1d800.
[   14.212757] <4>[   14.212757@2] allocating phys 0x64c00000, virt addr 0x0, size 65536k
[   17.840206] <7>[   17.840206@2] vh264_init, vaddr=ead59000 phy_addr=2ad59000
[   17.962951] <6>[   17.962951@1] set phy setup_amp = 3
[   30.266075] <7>[   30.266075@3] vh264_init, vaddr=ead59000 phy_addr=2ad59000
[   30.378797] <7>[   30.378797@3] vh264_init, vaddr=e9954000 phy_addr=29954000

X96Max_Plus_A100_20210608-1518.img Android dtb

...
	ethernet@ff3f0000 {
		compatible = "amlogic, g12a-eth-dwmac\0snps,dwmac";
		reg = <0xff3f0000 0x10000 0xff634540 0x08 0xff64c000 0xa0 0xffd01008 0x04>;
		reg-names = "eth_base\0eth_cfg\0eth_pll\0eth_reset";
		interrupts = <0x00 0x08 0x01>;
		interrupt-names = "macirq";
		status = "okay";
		clocks = <0x02 0x38>;
		clock-names = "ethclk81";
		pll_val = <0x9c0040a 0x927e0000 0xac5f49e5>;
		analog_val = <0x20200000 0xc000 0x23>;
		pinctrl-names = "external_eth_pins";
		pinctrl-0 = <0x11>;
		mc_val = <0x1621>;
		cali_val = <0x30000>;
		internal_phy = <0x00>;
		phandle = <0x9b>;
	};
		internal_eth_pins {
			phandle = <0xbf>;

			mux {
				function = "eth";
			};
		};

		external_eth_pins {
			phandle = <0x11>;

			mux {
				groups = "eth_mdio\0eth_mdc\0eth_rgmii_rx_clk\0eth_rx_dv\0eth_rxd0\0eth_rxd1\0eth_rxd2_rgmii\0eth_rxd3_rgmii\0eth_rgmii_tx_clk\0eth_txen\0eth_txd0\0eth_txd1\0eth_txd2_rgmii\0eth_txd3_rgmii";
				function = "eth";
				drive-strength = <0x03>;
			};
		};

As I mentioned, when booting from USB while Android is installed, the network card works.
So to confirm, does this mean the Android bootloader initalizes the PHY low level part=network card chip, which then later the mainline Linux kernel can somehow use (stmmac appears as high level ethernet controller driver) even though missing the assumed IP1001M?
But with no bootloader that does this, the kernel would need to do that itself, which it can't because the right driver is missing (there is a icplus.c that mentions support for "ICPlus IP1001", but the "M" may need something different)?

@ophub
Copy link
Owner

ophub commented Feb 25, 2022

The IP1001M network card can be used on Android, and the manufacturer has made integrated customization. However, this driver is not currently available in the Linux kernel, so it cannot be used in armbian.

You can look at the code and model number on the motherboard's network card chip.

Supported network cards can be found in the kernel source code:

https://github.com/unifreq/linux-5.15.y/tree/main/drivers/net/ethernet

@ophub
Copy link
Owner

ophub commented Feb 25, 2022

@ophub ophub closed this as completed Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants