nighty has quit [Quit: Disappears in a puff of smoke]
<naobsd>
bryanp: there is updated rkloader and rknand blob. there is also patch to use newer blob with old kernel, it might be possible to apply it on your kernel source.
<naobsd>
bryanp: if you're using rkloader 1.x, you have to erase/reformat NAND with new rkloader
<bryanp>
very interesting. Patch changes the magic string or what not I am guessing?
<naobsd>
bryanp: patch in that archive is already applied in newer Rockchip SDK. I never tried patch so I'm not sure what's changed well. and I think most important change should be done in binary blob, there is no important thing in .c
<naobsd>
well
<naobsd>
patch -> updated files under kernel/drivers/mtd/nand/
<bryanp>
Great thanks for this. It is much appreciated!
<naobsd>
did you check this SDK? it's 4.2 SDK and kernel is 3.0.36(btw this should be newer than .36 but we usually say it's .36)
<naobsd>
bryanp: that sdk archive contains both rockchip original commit and changes for X5 i.e. you can get diff from original to x5
<bryanp>
I am not sure. Where did you dig up the link for that one?
<naobsd>
diff will be useful to port 4.4 SDK
<bryanp>
We are working with 3.0.8 but 3.0.36 could work. the LAN8720 or the rk vmac needs fixing though.
<naobsd>
I think I had to fix vmac power on/phy reset sequence for some board...
<naobsd>
SDK code was terrible ;)
<naobsd>
I think that sdk tarball is not up-to-date (at least it's 4.2, not 4.4) so there must have some amount of errors ;)
<bryanp>
(:
<naobsd>
I think I found that tarball link on minix user forum
<bryanp>
Yeah. I see problems with power on and no cable plugged, problems with warm restart but power off/on works fine.
<naobsd>
I guess it needs explicit power-off and/or phy reset on(before) vmac initialization
<bryanp>
Yes
<bryanp>
most likely the phy isn't being reset on restart
<bryanp>
Weird behavior happens. Nothing in kmsg to indicate a problem. Except sometimes link is going up and down. Probably if I can get all the registers dumped in both states I could figure it out.
<naobsd>
do you have schematic for your board? it's possible to reset phy via gpio if gpio and LAN8720 reset is connected
<naobsd>
generally, phy power on -> some delay -> assert reset pin -> delay -> deassert reset pin -> delay -> init
<bryanp>
I might have to ident manually
<bryanp>
I could add this to the board init right?
<naobsd>
I cannot remember 4.1 SDK structure
<naobsd>
in 4.2 SDK, there is kernel/arch/arm/mach-rk30/board-rk30-sdk-vmac.c
<naobsd>
it's included by board-BOARDNAME.c... there is minix-neo-x5-box.c in X5 4.2 SDK
<naobsd>
in board-rk30-sdk-vmac.c, you need to tweak regulator and phy reset pin control
<naobsd>
it seems RK30_PIN1_PD6 is reset pin on X5
<naobsd>
I have no idea about regulator on your board
<naobsd>
I think what I had to fix was issue on warm reboot
<naobsd>
I explicitly disabled regulator output in board-rk31-vmac.c:rk30_rmii_io_init()
<bryanp>
I have the warm boot function for sure
<bryanp>
problem*
<naobsd>
regulator output for phy is dedicated to phy in my case so it's ok to disable on(before) vmac init
<bryanp>
I see
<bryanp>
So are you powering down reg for phy during vmac init?
<naobsd>
probably "disable regulator" & "assert reset pin" in rk30_rmii_io_init(), then "enable regulator" & "deassert reset pin" in rk30_rmii_power_control(enable)
<naobsd>
well
<naobsd>
accurately, it's not "during", it's "before" or "at the beginning"
<naobsd>
well
<naobsd>
sorry
<naobsd>
rk30_rmii_io_init() should be called at the end of vmac_probe()
<naobsd>
MAC is in SoC, PHY is external
<bryanp>
yes
<naobsd>
MAC is initialized on vmac_probe(), and PHY power is off at the end of vmac_probe()
<naobsd>
there is 4.1 SDK. I cannot remember it's .git tarball or just source tree with mod for marsboard
<naobsd>
if it's not .git, it's difficult to extract generic code without marsboard specific change ;)
<naobsd>
I saw their 4.4 SDK, and I surprised because it's based on Radxa Rock SDK. they use Radxa Rock specific changes which shouldn't be needed for marsboard
<bryanp>
hehe
JohnDoe7 has joined #linux-rockchip
<bryanp>
Yes I think I downloaded and saw that it wasn't a git last week
<bryanp>
Many many hours have passed since (:
<naobsd>
so I decided to forget about their source tarball ;)
JohnDoe_71Rus has quit [Ping timeout: 244 seconds]