Jump to content

Recommended Posts

Posted

@hexdump that should be working tree. Albeit I didn't test exactly this branch, from what I can see, it has all patches that are needed. Did you include mdio and emac node in Tanix TX6 DT?

Posted

@jernej - yes i had mdio and emac in my dtb. i'll just try to compile a kernel from your tree then tomorrow and will let you know then. have to leave now ...

Posted

@jernej - your libreelec image works with ethernet :)- i'm right now checking out your kernel tree and will build a kernel from this and if this works can look at the differences to the tree i used ...

Posted

@jernej - your libreelec image works with ethernet :)- i'm right now checking out your kernel tree and will build a kernel from this and if this works can look at the differences to the tree i used ...

Posted

@hexdump try with CONFIG_DWMAC_SUN8I=m Currently unsolved issue is that you have to make sure that AC200 EPHY driver initializes before network driver. With making network driver a module, and AC200 built-in, you make sure that this is the case.

Posted

@jernej - with that it works fine ... i just compared the ac200.* files from my patched megous tree with the ones from your tree and there were slight differences - can it be that you force pushed a new version a bit later than i took the patch from you? retrying the megous tree with the ac200.* files from your current trree now ...

 

Posted

@hexdump Yes, I force pushed minutes ago. I added a fix which always resets AC200 before first usage. This fixes the bug with non-working network after reboot.

Posted

a little update: @jernej - with the changes from your latest tree (after the force push) now it also works well if applied to the megous tree - i assume, that maybe beforehand the tree was not pushed completely (?) ... this way i now have it running on my qplus h6 tv box with ethernet, frequency scaling up to 1.8 ghz and thermal sensor values in /sys/class/thermal :)

 

@balbes150 - maybe its time to start your armbian image build machinery to spin a test image ... in case you are interested: i used the orange-pi-5.2 branch of this tree: https://github.com/megous/linux containing a lot of h6 patches already and applied the below attached patch to add the ethernet support from jernej and some dummy regulator to get the frequency scaling working. there are two dtb's included: sun50i-h6-qplus.dts - it has everything required for ethernet and frequency scaling and sun50i-h6-tanix-tx6.dts - it is the dtb from jernej and does not have frequency scaling enabled (no cpu voltage defined - not sure if it even works with the below patched tree). it looks like all h6 tv box hardware is very similar, so the qplus dtb should work fine on the tanix tx6 and other boxes as well.

 

it is important to add some proper active cooling when more load is put onto the cpu (running it in the tv box without additional cooling will result in overheating and a hanging system after some time with medium to high load). an alternative is to disable cpu cores via "echo 0 > /sys/devices/system/cpu/cpuX/online" - this way it should be possible to run it with 2 cores in the box and thermal throttling will handle the warming, with more cores throttling might not be strong enough to really cool down the cpu on high load as there is no voltage scaling. properly actively cooled it will run well with full load on all 4 cores at 1.8 ghz without throttling.

 

h6-tv-box-eth-qplus-tanix.patch config.ah6-5.2.0-meg-ah6+

Posted

@jernej - i guess active cooling would be best - @balbes150 has some good notes here:

i did attach this passive heat sink: https://www.ebay.de/itm/CPU-BGA-Chipsatz-Kühlkörper-passiv-Aluminium-50-x-55-mm-z-B-INTEL/312685159616 to the original heat sink (just clamped it upside down to it) - this way i could run with 4 cores, but it throttled down to about half speed after a while - no overheating though - active cooling (with fan) should be much better - the seller of the above heat sink has a cheap one of similar size with fan as well ...

Posted

i finally made some pictures of my cooling solution - this time on a mx10 pro 6k, which works fine with the above patch and dtb as well (except the usb 3 port was not working, but i guess this can be solved with some dtb magic) including ethernet, frequency scaling and thermal sensor. in case someone else has this box too, i would be interested to know if anyone got a serial console working as there are no obvious connectors visible. it looks like under the heat sink there are some contact points, which might be accessible with the heat sink removed, but i'm not sure if those are really serial console contact points (at least on a rockchip 3328 mx10 the serial console connection was right there).

 

while i had the box cooled well like this i ran sbc-bench and the results can be seem here: http://ix.io/1OQb - to me they are not really looking that bad - for instance the 7zip performance is just about 15-20% below that of the new and powerful raspberry pi 4b! so looks like those h6 boxes are a good choice if you want some cheap (i got both the qplus and the mx10 pro 6k for 33 and 31 euro including relatively fast shipping here from germany) and well performing little linux systems - at least when the h6 support in mainline has martured a bit.

 

best wishes - hexdump

 

h6-cooling-01.jpg

h6-cooling-02.jpg

Posted

funny anecdote: i got my hands on a used eachlink h6 mini box (the one the u-boot port for the h6 tv boxes started with) and to my surprise this box has 3gb ram builtin, but only 2g of them seem to be useable and inteded to be used - you can find the details here: https://github.com/apritzel/u-boot/issues/4#issuecomment-513580655

 

those tv boxes are always good for an unexpected surprise (just like most h6 tv boxes are sold as having 4gb although the h6 can only address 3gb of them ...)

 

best wishes - hexdump

Posted

@jernej - i just opened the eachlink h6 mini box once more and it really has 4x4gbit (K4B4G0446Q) and 4x2Gbit (K4B2G0446C) chips in it, which makes absolutely no sense following your 8x 4bit theory - this can at max only give 2gb of useable memory then and would explain the crashes beyond 2gb. i checked the web a bit for the datasheet of the memory and ran across https://www.datasheet.directory/index.php?title=Special:PdfViewer&url=https%3A%2F%2Fdatasheet.iiic.cc%2Fdatasheets-0%2Fsamsung%2FK4B2G0446C-HCH9.pdf which to me looks a bit like those chips can run in 4bit and 8bit width, but i might be wrong as i'm not at all an expert on this. in case the chips could run 8bit wide, then there might be two memory banks with 1x1gb and 1x2gb giving a total of 3gb and the setup of the box would make sense. the reason for my 2gb+ crashes might maybe be some broken ram or a timing problem still (timing only works well for one bank of the two)? but it is not that important - running it with 2gb is fine too.

 

hdmi output is not working, but this is an open topic on h6 still anyway i think. i tried 3 different monitors and different cables - none worked (on the qplus and the mx10 pro 6k hdmi output did work well). otherwise it is running fine and stable now (limited to 2gb) with ethernet, thermal sensor and frequency scaling up to 1.8ghz.

 

best wishes - hexdump

Posted

@hexdump those chips are all 4-bit. One of the datasheets have naming explained. K4B4G(04)46Q - number in brackets tells width of data bus. This configurations seems a bit strange to me. Does it work under Android? It would be very interesting to get Android boot log - at the very beginning of serial output you should see DRAM configuration. Can you provide first second or two of serial output?

 

H6 HDMI works well in general, except sometimes for 1080p resolution (I will investigate this later). It works on my Tanix TX6 box. There is one catch, though. I applied OrangePi 3 patch series, which contains improvements for HDMI driver. Reference design included DDC enable GPIO, which must be enabled in order to properly detect supported resolutions. I'm pretty sure Eachlink box uses this too.

Posted

hi @jernej - here is the legacy u-boot and android boot log: https://pastebin.com/raw/K89ce83x - there only 2gb get discovered. you got me convinced about the 4bit now btw. :)

 

regarding hdmi out (which is working fine on android) i tried: "ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; " from the orange pi 3 in the connector section of the dtb - it did not help. then i tried https://github.com/linux-sunxi/linux-sunxi/issues/291#issuecomment-372909917 but it did not help neither. i played with things like "disp.screen0_output_mode=1280x720p60" or "drm.edid_firmware=edid/1280x1024.bin" on the kernel cmdline but it all did not help - always no response on the monitor (one is 1280x1024, another is 1920x1080 and then i have a hdmi to vga adapter which usually works very well and reliable). is there anything around /sys or /proc which might help debugging this?

 

update: for completeness - this is the boot log of megous 5.2.1 - https://pastebin.com/raw/tqWPwbfY

Posted

@hexdump I'll give you tomorrow a patch which will provide some debug info to see what's going on with DRAM initialization. Android output will certainly help. Thanks!

 

Regarding HDMI, can you give me link to the kernel source you're using? this ddc-gpios thing was implemented in two different ways, I just want to check which one you have.

Posted

hi @jernej - this is the tree i'm currently using as a base as it has most of the h6 patches in already (orange-pi-5.2 branch): https://github.com/megous/linux

 

for completeness: this is the boot log of your latest libreelec image (LibreELEC-H6.arm-9.80-devel-20190711234608-e076031-tanix-tx6.img.gz) booting on this box - https://pastebin.com/raw/iVySMHL - again no hdmi working and even with mem=2048M it crashes at some point

 

a lot of thanks in advance and best wishes - hexdump

Posted

and please add "drm.debug=0xe" to kernel command line to get DRM debug info. Hopefully this will tell us where the problem is. BTW, you should still get output even without ddc-en-gpios, it would be just 1024x768 resolution. So problem is clearly elsewhere.

Posted

@hexdump regarding DRAM, Android detects 11 columns and 15 rows, which is what will give you 2 GiB RAM size. I guess we have to modify algorithm which detects columns and rows, but I'm not sure yet how. I'll dive into the code next few days.

 

Regarding HDMI, it seems like connector is always in "disconnected" state. Can you check that you pushed cable completely into the connector and if you did, try reconnecting and at the end, test different cable? I already had all that issues with HDMI :)

Posted

@jernej - i made a suggestion (wild guess again as i do not fully understand how everything works in detail) in the github issue - this should at least handle the case we see here properly i guess.

 

regarding HDMI: i already tried different cables and monitors - always the same and with all those cables and monitors it works perfectly fine with android. so i guess it is maybe more a software problem. again wild guessing: could it be anything regulator, gpio or i2c related, which is setup differently for the hdmi phy on this box? anything from /sys on the android side might give a clue?

 

best wishes - hexdump

Posted

@hexdump I really can't find any big difference in HDMI settings (I dumped DT from Eachlink Android image). There are only two differences - CEC is disabled and connection detection is done through polling and not interrupt, as it is done in mainline driver. Can you try disconnect and reconnect HDMI cable when system is already running? If it's only missed interrupt, then this can be eventually fixed.

 

BTW, H6 is using newer version of HDMI controller and there are some issues which still needs to be fixed:

1. on some monitors, 1080p doesn't really work

2. on Tanix TX6 box, CEC only works if you turn TV off and then back on when board is running

3. I can't figure out why switching to 4K@60Hz works differently than in any other driver code, including H6 BSP kernel

Posted

@jernej - partial success :) ... with video=HDMI-A-1:e i'm now at least getting 1024x768 - any chance to get higher resolutions? will give "drm.edid_firmware=edid/1280x1024.bin" a try next ...

 

update: full success - with that (i.e. both the :e and the edid) i have the monitor now running well at native 1280x1024 - console works and xorg too ;)

Posted
2 minutes ago, hexdump said:

with video=HDMI-A-1:e i'm now at least getting 1024x768 - any chance to get higher resolutions?

What does ":e" mean? allways connected? Yes, I'm using my Tanix TX6 box with 4K@30Hz. Resolution 1024x768 means that EDID read failed. For Tanix case, ddc-en-gpios DT property is enough to make it work.

Posted

:e is "output forced to on" according to https://wiki.archlinux.org/index.php/kernel_mode_setting#Forcing_modes

 

ok - will try the ddc-en-gpios now ...

 

update: mission accomplished - with ddc-en-gpios i get the full resolution even without edid forcing as you said - very nice! ... this box is a really nice system now ... next is to get the little fan i have laying around here working and to put it on the heat sink i put onto the cpu, so that i can hopefully run a make -j 4 kernel build with 1.8ghz on all 4 cores without throttling

 

@jernej - is there any other way to set a fixed eth mac besides setting it in u-boot? right now i'm getting a random new one on each boot ... and besides that: a big thank you for your support in getting this going that far!

 

@balbes150 - i think the h6 tv boxes now are really getting ready for some first armbian test builds :)

Posted
12 minutes ago, hexdump said:

with ddc-en-gpios i get the full resolution even without edid forcing as you said - very nice!

You mean without "video=HDMI-A-1:e"?

12 minutes ago, hexdump said:

is there any other way to set a fixed eth mac besides setting it in u-boot? right now i'm getting a random new one on each boot ...

In order to not get random MAC every boot, you have to convince U-Boot to auto-generate same MAC every time. This is done by defining ethernet0 alias in DT. Please note that both DTs, one in U-Boot and one used by kernel has to have this ethernet0 alias.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines