martinayotte Posted April 12, 2019 Author Share Posted April 12, 2019 40 minutes ago, froezus said: You need also to rmmod the MAC module (something like dwmac-sun8i) it's him who manage the phy-supply. I've compiled a new kernel with DWMAC-SUN8I as module, and it seems to be the trick, even no needs to do manual "rmmod", simply "reboot", using NetworkManager on my OPiOnePlus. I will verify that it still true with "old school /etc/network/interface" , and then I will also confirm that it is working the same way on OPi3. This would means something is wrong in the cleanup when built-in in the kernel ... 1 Quote Link to comment Share on other sites More sharing options...
frozeus Posted April 12, 2019 Share Posted April 12, 2019 I still think it's related to timing and power of the PHY. Not memory messup. 0 Quote Link to comment Share on other sites More sharing options...
megi Posted April 12, 2019 Share Posted April 12, 2019 If rtl ephy is powered by two power supplies, they need to be enabled at the same time, otherwise it will fail (maybe not always, but it may). I've seen DTS files flying around that have this wrong and insert power up delays in wrong places. I only work on Orange Pi 3 though, so I have no concrete input on what other baords do. 0 Quote Link to comment Share on other sites More sharing options...
megi Posted April 12, 2019 Share Posted April 12, 2019 Configuring a reset line to the phy may also help, if it is connected to some GPIO on the SoC. 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted April 12, 2019 Author Share Posted April 12, 2019 2 minutes ago, megi said: I only work on Orange Pi 3 though, so I have no concrete input on what other baords do. But do you have the symptom if you are using "old school /etc/network/interface" on your OPi3 ? 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted April 12, 2019 Author Share Posted April 12, 2019 19 minutes ago, martinayotte said: I will verify that it still true with "old school /etc/network/interface" , and then I will also confirm that it is working the same way on OPi3. I seems the workaround is working for "old school /etc/network/interface", and this is also true for OPi3. Even if we don't have complete understanding, I think I will commit the DWMAC-SUN8I change in defconfig into Armbian ... 0 Quote Link to comment Share on other sites More sharing options...
dolphs Posted April 12, 2019 Share Posted April 12, 2019 1 hour ago, froezus said: You need also to rmmod the MAC module (something like dwmac-sun8i) it's him who manage the phy-supply. rmmod phy && rmmod mac modprobe mac (should also modprobe the phy) hmm current modules lis ( below ), the dwmac-sun8i reports : " rmmod: ERROR: Module dwmac_sun8i is builtin. " # thus not a module as it seems root@orangepioneplus:~# lsmod Module Size Used by snd_soc_hdmi_codec 16384 0 zstd 16384 4 snd_soc_core 126976 1 snd_soc_hdmi_codec snd_pcm_dmaengine 16384 1 snd_soc_core snd_pcm 94208 3 snd_soc_hdmi_codec,snd_soc_core,snd_pcm_dmaengine snd_timer 32768 1 snd_pcm snd 57344 4 snd_soc_hdmi_codec,snd_timer,snd_soc_core,snd_pcm soundcore 16384 1 snd dw_hdmi_cec 16384 0 dw_hdmi_i2s_audio 16384 0 cpufreq_dt 16384 0 sun50i_h6_ths 16384 0 thermal_sys 65536 2 cpufreq_dt,sun50i_h6_ths zram 28672 2 realtek 20480 1 Ran out of time due to unexpected visit ... more tomorrow therefore. cheers! 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted April 12, 2019 Author Share Posted April 12, 2019 3 minutes ago, dolphs said: the dwmac-sun8i reports : " rmmod: ERROR: Module dwmac_sun8i is builtin. " If you read my previous posts, it require to recompile the kernel with DWMAC-SUN8I as module. Since I've done it and tested succesffuly, I've just committed the change in Armbian, so simply redo a new build ... 2 Quote Link to comment Share on other sites More sharing options...
lanefu Posted April 13, 2019 Share Posted April 13, 2019 8 hours ago, martinayotte said: I've just committed the change in Armbian, so simply redo a new build ... Works for me! Spoiler $ ansible orangepioneplus.angrybear2.local -m reboot --become orangepioneplus.angrybear2.local | CHANGED => { "changed": true, "elapsed": 57, "rebooted": true } 0 Quote Link to comment Share on other sites More sharing options...
dolphs Posted April 13, 2019 Share Posted April 13, 2019 11 hours ago, martinayotte said: If you read my previous posts, it require to recompile the kernel with DWMAC-SUN8I as module. Since I've done it and tested succesffuly, I've just committed the change in Armbian, so simply redo a new build ... yes I did not browse carefully enough, apologies. However therefore the ghost vanished from our machines ( OpiOnePlus and Opi3 ), Suppose configuring this kernel setting from built in to Module is not a bad idea in general? 2 hours ago, lanefu said: Works for me! I can concur, well done all, appreciate your efforts! 0 Quote Link to comment Share on other sites More sharing options...
Werner Posted April 13, 2019 Share Posted April 13, 2019 Awesome news. And everyone can still be an old school guy using interfaces file 1 Quote Link to comment Share on other sites More sharing options...
dolphs Posted April 13, 2019 Share Posted April 13, 2019 30 minutes ago, Werner said: Awesome news. And everyone can still be an old school guy using interfaces file certainly just execute: root@orangepioneplus:~# systemctl disable NetworkManager root@orangepioneplus:~#ip a |grep ether link/ether 00:2d:fd:1e:f1:e1 brd ff:ff:ff:ff:ff:ff # take note of MAC address root@orangepioneplus:~#vi /etc/network/interfaces ## add or update in to /etc/network/interfaces.d/ auto eth0 iface eth0 inet static address 192.168.10.200 netmask 255.255.255.0 gateway 192.168.10.1 dns-nameservers 192.168.10.2 192.168.10.1 hwaddress ether 00:2d:fd:1e:f1:e1 root@orangepioneplus:~# reboot # wait 5 secs and reconnect to IP address set root@orangepioneplus:~# cat /etc/network/interfaces # tada! you guys don't even realise how perfect this weekend started, once again cheers for all your efforts, it is appreciated a lot! 2 Quote Link to comment Share on other sites More sharing options...
frozeus Posted April 13, 2019 Share Posted April 13, 2019 Great ! But still a workaround, will not work for people doing nfsroot. @martinayotte is there a Dev branch of 5.1 ? FYI I have test the IR receiver on H6 works fine : https://github.com/clementperon/linux/commits/h6_ir 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted April 13, 2019 Author Share Posted April 13, 2019 8 minutes ago, froezus said: is there a Dev branch of 5.1 ? Armbian still using Megous 5.0.y branch, but I've personally switched, just for test, to Megous 5.1.y. 0 Quote Link to comment Share on other sites More sharing options...
kexec Posted April 13, 2019 Share Posted April 13, 2019 @martinayotte how to change repo? I have tried but build failed once i change branch in source config. Also while testing @megous kernel i noticed that cpu max freq was 1.49, i guess there is some patch for dtb file which needs to be applied durring compile of dbt as it had made that scale down change in freq 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted April 13, 2019 Author Share Posted April 13, 2019 8 minutes ago, kexec said: I have tried but build failed once i change branch in source config. Right, once switched, there are few patches fo fix to get the build completed ... 8 minutes ago, kexec said: kernel i noticed that cpu max freq was 1.49 I've not seen that, both 5.0.y and 5.1.y have the OPP up to 1.80MHz, check with "cpufreq-info" ... 0 Quote Link to comment Share on other sites More sharing options...
johanvdw Posted April 14, 2019 Share Posted April 14, 2019 21 hours ago, dolphs said: certainly just execute: root@orangepioneplus:~# systemctl disable NetworkManager root@orangepioneplus:~#ip a |grep ether link/ether 00:2d:fd:1e:f1:e1 brd ff:ff:ff:ff:ff:ff # take note of MAC address root@orangepioneplus:~#vi /etc/network/interfaces ## add or update in to /etc/network/interfaces.d/ auto eth0 iface eth0 inet static address 192.168.10.200 netmask 255.255.255.0 gateway 192.168.10.1 dns-nameservers 192.168.10.2 192.168.10.1 hwaddress ether 00:2d:fd:1e:f1:e1 root@orangepioneplus:~# reboot # wait 5 secs and reconnect to IP address set root@orangepioneplus:~# cat /etc/network/interfaces # tada! you guys don't even realise how perfect this weekend started, once again cheers for all your efforts, it is appreciated a lot! You don't need to specify hwaddress if you use kernel 5.0 or later, as the changing mac address was addressed. 0 Quote Link to comment Share on other sites More sharing options...
greg798 Posted April 16, 2019 Share Posted April 16, 2019 Strangely. Im build u-boot and tadaa = restart have off again 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted April 16, 2019 Author Share Posted April 16, 2019 8 hours ago, greg798 said: Strangely. Im build u-boot and tadaa = restart have off again What do you means ? 0 Quote Link to comment Share on other sites More sharing options...
greg798 Posted April 16, 2019 Share Posted April 16, 2019 1 hour ago, martinayotte said: What do you means ? Im compile last uboot for opi3 and have old problem. Put reboot = poweroff . Again power unplug. Only me problem? 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted April 16, 2019 Author Share Posted April 16, 2019 3 minutes ago, greg798 said: Only me problem? Are you using Armbian build scripts ? The fix is in ATF, not in U-Boot itself... See that commit : https://github.com/armbian/build/blob/master/patch/atf/atf-sunxi64/0001-Fix-reset-issue-on-H6-by-using-R_WDOG.patch 0 Quote Link to comment Share on other sites More sharing options...
greg798 Posted April 16, 2019 Share Posted April 16, 2019 No this megous, but isn't there fix? 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted April 16, 2019 Author Share Posted April 16, 2019 30 minutes ago, greg798 said: No this megous, but isn't there fix? Maybe he didn't included the fix in those builds ... Why are you not using latest nightly from here ? https://dl.armbian.com/orangepi3/nightly/ 1 Quote Link to comment Share on other sites More sharing options...
greg798 Posted April 16, 2019 Share Posted April 16, 2019 Sorry, just buld and work reboot, but what im get this problem megous rep and last development uboot, I do not understand. Many thanks for your work guys. Armbian development kernel, dtb, modules for H6 great work to Arch Linux. PS dmesg bionic opi3 Quote [ 2.008272] sun50i-de2-bus 1000000.display-engine: Error couldn't map SRAM to device [ 2.008652] sun4i-usb-phy 5100400.phy: Couldn't request ID GPIO [ 2.008888] sun50i-usb3-phy 5210000.phy: failed to get phy clock [ 2.169352] sun4i-usb-phy 5100400.phy: Couldn't request ID GPIO little things 0 Quote Link to comment Share on other sites More sharing options...
dolphs Posted April 17, 2019 Share Posted April 17, 2019 On 4/10/2019 at 3:28 AM, dolphs said: As I dont have a " USB To TTL Serial UART STC Cable " yet I tried the HDMI output instead which reveals no output to screen ( also not after power cycling the device: WIP I suppose ). Yet I will await the nightly image, although I do not expect miracles to happen as what would be the different from images just built .... Read an interesting commit in kernel 5.0.8 rgd H6 although not related to reboot issue, interesting fix imho rgd HDMI. Would it be possible to incorporate this kernel in dev images ( which can be build manually ) please? <snip snip> drm/sun4i: DW HDMI: Lower max. supported rate for H6 commit cd9063757a227cf31ebf5391ccda2bf583b0806e upstream. Currently resolutions with pixel clock higher than 340 MHz don't work with H6 HDMI controller. They just produce a blank screen. Limit maximum pixel clock rate to 340 MHz until scrambling is supported. Cc: stable@vger.kernel.org # 5.0 Fixes: 40bb9d3147b2 ("drm/sun4i: Add support for H6 DW HDMI controller") <snip snip> 0 Quote Link to comment Share on other sites More sharing options...
kexec Posted April 17, 2019 Share Posted April 17, 2019 38 minutes ago, dolphs said: Read an interesting commit in kernel 5.0.8 rgd H6 although not related to reboot issue, interesting fix imho rgd HDMI. Would it be possible to incorporate this kernel in dev images ( which can be build manually ) please? <snip snip> drm/sun4i: DW HDMI: Lower max. supported rate for H6 commit cd9063757a227cf31ebf5391ccda2bf583b0806e upstream. Currently resolutions with pixel clock higher than 340 MHz don't work with H6 HDMI controller. They just produce a blank screen. Limit maximum pixel clock rate to 340 MHz until scrambling is supported. Cc: stable@vger.kernel.org # 5.0 Fixes: 40bb9d3147b2 ("drm/sun4i: Add support for H6 DW HDMI controller") <snip snip> i guess everyone can do this, it is just time question. If you are more experienced on that subject then you do it faster. have you seen this post ? 0 Quote Link to comment Share on other sites More sharing options...
Werner Posted April 17, 2019 Share Posted April 17, 2019 sunxi64-dev is currently based on megous orangepi-5.0 kernel branch and gets frequently upstream patches merged. So if this patch makes it into mainline kernel it will become available in this branch as well. 0 Quote Link to comment Share on other sites More sharing options...
kissste Posted April 17, 2019 Share Posted April 17, 2019 dwmac-sun8i 5020000.ethernet eth0: Could not attach to PHY dwmac-sun8i 5020000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19) This error is coming up. I have tried downgrading and regardless getting the same error. eth0 is not working anymore. 0 Quote Link to comment Share on other sites More sharing options...
martinayotte Posted April 17, 2019 Author Share Posted April 17, 2019 34 minutes ago, kissste said: This error is coming up. Which images are you using ? Because we found a workaround last Friday : compile kernel with DWMAC-SUN8I as module . 0 Quote Link to comment Share on other sites More sharing options...
data Posted April 22, 2019 Share Posted April 22, 2019 Will the reboot fix also work for the OPi Lite2? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.