Jump to content

Since Tanix TX6 can boot from the SD card


xaduha

Recommended Posts

no "video=HDMI-A-1:e" is still required - looks like it is needed for this box to get hdmi working at all ...

 

regarding u-boot ethernet: so i simply define this alias there (and then the same in the linux kernel)? i'll have to check if there was even ethernet defined in u-boot. i remember u-boot output saying ethernet not found ... and i guess i cannot simply take over the ethernet dtb section from the kernel to u-boot as i guess all the ac200 magic is missing there - right or wrong? 

Link to comment
Share on other sites

2 minutes ago, hexdump said:

no "video=HDMI-A-1:e" is still required - looks like it is needed for this box to get hdmi working at all ...

Ok, we'll debug that later. Can you just check if re-plugging HDMI cable when system is already running helps anything?

 

3 minutes ago, hexdump said:

regarding u-boot ethernet: so i simply define this alias there (and then the same in the linux kernel)? i'll have to check if there was even ethernet defined in u-boot. i remember u-boot output saying ethernet not found ... and i guess i cannot simply take over the ethernet dtb section from the kernel to u-boot as i guess all the ac200 magic is missing there - right or wrong? 

Having working U-Boot ethernet driver doesn't really matter for this to work. And yes, you can just take ethernet dtb section from Linux. Check my Tanix TX6 U-Boot patch: https://github.com/jernejsk/LibreELEC.tv/blob/tanix-tx6/projects/Allwinner/devices/H6/patches/u-boot/005-ethernet-hack.patch Note that you also need recent U-Boot or at least updated sun50i-h6.dtsi to have emac/mdio nodes.

Link to comment
Share on other sites

@jernej - unplugging and replugging the hdmi cable did not help - looks like "video=HDMI-A-1:e" is a must for this box for now. thanks for the info regarding u-boot ethernet - will have a look at this during the next days (setting a fixed mac via setenv ethaddr aa:bb:cc:... in u-boot works fine for now). is there actually an audio driver for the different audio outputs (analog, spdif and hdmi) in the works or existing? i would especially be interested in the analog out. the nice thing is that the h6 boards have a mali chip, which is on the radar of the panfrost team too ...

 

the system is now running very well, snappy and stable. with the little heat sink and the fan it still throttles a bit when i put all cores to full load, but it still remains at the higher clock speeds then. i changed the thermal tripping points to 85/90/100 for now - btw. at least in the megous code there is a bug in the third thermal trip point - it is set to 1000, which i guess is a bit too high :) (i think it is originally coming from a patch from icenowy)

 

at the end of the day two pictures of my current cooling hack: i used a 5mm thick piece of thermal conducting stuff (the green thing on the left of the first picture) a bit smaller than the cpu to get the heat sink high enough to not touch anything else on the board. then i put the heat sink on top and fixated it a bit with some rubber bands. at the end i put a small fan on top with some tape and connected it to a usb port. not really nice, but works quite well ...

 

best wishes and once more a lot of thanks to jernej for his support - hexdump

 

p.s. - attached at the very end is also my current kernel config and my current patch against the orange-pi-5.2 branch of https://github.com/megous/linux

 

eachlink-01.jpg

eachlink-02.jpg

 

 

config.ah6-5.2.1-meg-ah6+ h6-tv-box-eth-qplus-eachlink.patch

Link to comment
Share on other sites

5 hours ago, hexdump said:

is there actually an audio driver for the different audio outputs (analog, spdif and hdmi) in the works or existing?

spdif patches should land soon, HDMI patches exists in LE master if you want to take a look, analog doesn't exist yet AFAIK (analog is on AC200 companion chip, same as ethernet phy). All these needs DMA patches, which landed in 5.3-rc1.

Link to comment
Share on other sites

Guys,

May anybody hint how to solve issue: 

ac200 0-0010: Can't obtain the clock: -517

I’m using mainline 5.2.2 with patches from jernejsk repo https://github.com/jernejsk/LibreELEC.tv/tree/tanix-tx6/projects/Allwinner/devices/H6/patches/linux and sun50i-h6-eachlink-h6mini.dtb from patch included on  this thread msg: https://forum.armbian.com/applications/core/interface/file/attachment.php?id=4955

 

 

My HW is Eachlink H6 Mini.

 

System boots but no eth due ac200 can't obtain clock error.

(pls see attached dmesg.log)

 

For reference: I'm also attaching sun50i-h6.dtsi include file which is used by my kernel tree to compile sun50i-h6-eachlink-h6mini.dtb and also my kernel config.

 

I suspect something is still missing to get ac200 working...

 

 

sun50i-h6-eachlink-h6mini.dts sun50i-h6.dtsi dmesg.log linux-5.2-arm64-armv8.config

Link to comment
Share on other sites

2 hours ago, PiotrO said:

ac200 0-0010: Can't obtain the clock: -517

Just FYI, -517 may or may not indicate an issue. It means that not all required prerequirements are loaded. If this error is returned, kernel tries to load it multiple times until no more drivers can be loaded. But in this case, it's genuine issue, caused by missing CONFIG_PWM_SUN4I=y in kernel config.

 

Link to comment
Share on other sites

@PiotrO - maybe first test if there is any general problem with the tx6 mini by using the linux-megous tree (which has a lot h6 stuff in it already - it is mentioned in my post above) plus the config and the patch i attached above - this has been tested to work well and reliable on 3 different h6 tv boxes here. if this works, then maybe trying to get it working closer to mainline might be worth a try, but mainline is missing for instance frequency scaling so you'll end up at 900mhz and there is no thermal control as the thermal sensor is missing too.

 

best wishes - hexdump

Link to comment
Share on other sites

18 hours ago, jernej said:

Just FYI, -517 may or may not indicate an issue. It means that not all required prerequirements are loaded. If this error is returned, kernel tries to load it multiple times until no more drivers can be loaded. But in this case, it's genuine issue, caused by missing CONFIG_PWM_SUN4I=y in kernel config.

 

@jernej

 

Thx so much for help here. Got networking working :-)

 

Now I want to get general view what is currently possible to get as supported on H6 Eachlink with mainline 5.2.3 (+ patches from Your repo).

(strategy here is to have minimal required set of patches because my goal (minimyth2 appliance) is to have common kernel for rpi3, s905, rk33xx and H6. This is reason why I want to avoid to go with heavily patched forks like i.e. https://github.com/megous/linux).

 

May You (and @hexdump, others) pls give me some hints about following aspects regarding current H6 support status:

 

1. to get anything on my HDMI connected monitor I need add video=HDMI-A-1:e at kernel boot cmd. Is it still required?

 

2. at boot, my screen has only 4 tux pictures at upper left cornet. no any dmesg output. Is it normal at this stage of H6 support?

 

3. I don't have any audio cards reported by kernel. But I see snd modules loaded:

Module                  Size  Used by
sunxi_cedrus           28672  0
snd_soc_simple_card    24576  0
v4l2_mem2mem           32768  1 sunxi_cedrus
snd_soc_simple_card_utils    28672  1 snd_soc_simple_card
videobuf2_v4l2         28672  2 sunxi_cedrus,v4l2_mem2mem
dwmac_sun8i            28672  0
videobuf2_dma_contig    24576  1 sunxi_cedrus
stmmac_platform        24576  1 dwmac_sun8i
videobuf2_memops       20480  1 videobuf2_dma_contig
stmmac                172032  2 dwmac_sun8i,stmmac_platform
videobuf2_common       61440  3 sunxi_cedrus,videobuf2_v4l2,v4l2_mem2mem
joydev                 28672  0
panfrost               45056  0
videodev              217088  4 sunxi_cedrus,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem
gpu_sched              32768  1 panfrost
media                  53248  5 sunxi_cedrus,videodev,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem
nvmem_sunxi_sid        16384  1
uinput                 20480  0
loop                   32768  2
overlay               118784  2 

Is it possible to get audio on H6 Eachlink?

 

4. 3d block (panfrost) module load reports:

[    8.109566] panfrost 1800000.gpu: clock rate = 432000000
[    8.134402] panfrost 1800000.gpu: gpu soft reset timed out
[    8.140037] panfrost 1800000.gpu: Fatal error during GPU init

Is this expected at this stage of H6 support?

    

5. May You pls briefly look on my boot.log and see - is there anything worth to improve (by further patching kernel)?

 

thx in advance! 

boot.log

Link to comment
Share on other sites

17 hours ago, hexdump said:

@PiotrO - maybe first test if there is any general problem with the tx6 mini by using the linux-megous tree (which has a lot h6 stuff in it already - it is mentioned in my post above) plus the config and the patch i attached above - this has been tested to work well and reliable on 3 different h6 tv boxes here. if this works, then maybe trying to get it working closer to mainline might be worth a try, but mainline is missing for instance frequency scaling so you'll end up at 900mhz and there is no thermal control as the thermal sensor is missing too.

 

best wishes - hexdump

@hexdump,

Thx for help!

My strategy is to relay on mainline + minimal required set of patches because my goal (minimyth2 appliance) is to have common kernel for rpi3, s905, rk33xx and H6. This is reason why I want to avoid to go with heavily patched forks like i.e. https://github.com/megous/linux).

 

Do You know exact set of patches applied to mainline within magus tree to get freq.scalling?

I already applied dtb changes based on diff for your patch vs. mainline+jernej's patches (see attached patch) but I'm getting:

[    1.843275] core: _opp_supported_by_regulators: OPP minuV: 880000 maxuV: 880000, not supported by regulator
[    1.854018] cpu cpu0: _opp_add: OPP not supported by regulators (480000000)
[    1.861803] core: _opp_supported_by_regulators: OPP minuV: 880000 maxuV: 880000, not supported by regulator
[    1.872509] cpu cpu0: _opp_add: OPP not supported by regulators (720000000)
[    1.880284] core: _opp_supported_by_regulators: OPP minuV: 880000 maxuV: 880000, not supported by regulator
[    1.890985] cpu cpu0: _opp_add: OPP not supported by regulators (816000000)
[    1.898733] core: _opp_supported_by_regulators: OPP minuV: 880000 maxuV: 880000, not supported by regulator
[    1.909440] cpu cpu0: _opp_add: OPP not supported by regulators (888000000)
[    1.917209] core: _opp_supported_by_regulators: OPP minuV: 940000 maxuV: 940000, not supported by regulator
[    1.927912] cpu cpu0: _opp_add: OPP not supported by regulators (1080000000)
[    1.935754] core: _opp_supported_by_regulators: OPP minuV: 1000000 maxuV: 1000000, not supported by regulator
[    1.946645] cpu cpu0: _opp_add: OPP not supported by regulators (1320000000)
[    1.954510] core: _opp_supported_by_regulators: OPP minuV: 1060000 maxuV: 1060000, not supported by regulator
[    1.965404] cpu cpu0: _opp_add: OPP not supported by regulators (1488000000)
[    1.973336] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 912000 KHz
[    1.981430] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 1800000 KHz 

it looks something additional needs to be patched in mainline...

.

0814-H6-add-thermal-zones.patch

Link to comment
Share on other sites

5 hours ago, PiotrO said:

1. to get anything on my HDMI connected monitor I need add video=HDMI-A-1:e at kernel boot cmd. Is it still required?

I guess so. Eachlink is the only currently known H6 device which has this issue, so I really don't know what causes it. I don't have this particular box so I can't really fix it either.

 

5 hours ago, PiotrO said:

2. at boot, my screen has only 4 tux pictures at upper left cornet. no any dmesg output. Is it normal at this stage of H6 support?

This depends mostly on your kernel configuration and not driver support. If you see image on screen then display driver works ok.

5 hours ago, PiotrO said:

3. I don't have any audio cards reported by kernel. But I see snd modules loaded:

There are no H6 audio drivers in kernel yet. However, SPDIF patches will be merged soon, while you can pick HDMI audio patches from LibreELEC master repository. Analog driver doesn't exist yet and it's not easy to add. Note that for any of these sound outputs you need DMA support which was merged in 5.3-rc1.

 

5 hours ago, PiotrO said:

4. 3d block (panfrost) module load reports:

T720 is not supported by panfrost yet. It's best to use ARM's binary driver and complementary kernel driver for the time being.

 

Link to comment
Share on other sites

@PiotrO - for the frequency scaling there two things needed:

  • the hardware on tv boxes (or maybe their current support) does not support a changable voltage for the cpu - you only have one fixed voltage and you'll have to change the ranges of all opp speeds you want to support to include this one voltage (opp-table in sun50i-h6.dtsi)
  • i think you need to create (vcccpu) and attach a cpu-supply voltage regulator (&cpu0 section) to make it work

have a look at my qplus and eachlink-h6mini dtbs in the patch i attached above. this should get you forward i guess.

 

on my eachlink h6 mini (board revision v1.2) i have to add video=HDMI-A-1:e to get hdmi output at all. if you have an eachlink too, it might be interesting if you get something on hdmi without it.

 

what gpu node in the dtb are you using for panfrost?

 

best wishes and good luck - hexdump

Link to comment
Share on other sites

13 hours ago, hexdump said:

@PiotrO - for the frequency scaling there two things needed:

  • the hardware on tv boxes (or maybe their current support) does not support a changable voltage for the cpu - you only have one fixed voltage and you'll have to change the ranges of all opp speeds you want to support to include this one voltage (opp-table in sun50i-h6.dtsi)
  • i think you need to create (vcccpu) and attach a cpu-supply voltage regulator (&cpu0 section) to make it work

have a look at my qplus and eachlink-h6mini dtbs in the patch i attached above. this should get you forward i guess.

 

on my eachlink h6 mini (board revision v1.2) i have to add video=HDMI-A-1:e to get hdmi output at all. if you have an eachlink too, it might be interesting if you get something on hdmi without it.

 

what gpu node in the dtb are you using for panfrost?

 

best wishes and good luck - hexdump

Thx for replay!

It looks eachlink mini box isn't god investment for anybody who wants to play with H6....

This box is not using AXP 805 PMIC (typically bundled with the H6) but unknown IC which cryptic label "A8038 8099330k".

Unless we will have support for this PMIC - no GPU support nor any other HW parts supplied by this PMIC :-(

 

 

Link to comment
Share on other sites

1 hour ago, PiotrO said:

Unless we will have support for this PMIC - no GPU support nor any other HW parts supplied by this PMIC :-(

why not? According to Android DT voltage regulator node, it's fixed voltage regulator, so it's supplying voltage, you just can't change it or disable it. GPU support does not depend if you can or can't adjust voltage. It only means that it will produce more heat than necessary.

Link to comment
Share on other sites

19 hours ago, jernej said:

why not? According to Android DT voltage regulator node, it's fixed voltage regulator, so it's supplying voltage, you just can't change it or disable it. GPU support does not depend if you can or can't adjust voltage. It only means that it will produce more heat than necessary.

Oh - I just was extrapolating from other H6 designs :-p.

Is anybody looking on GPU support in eachlink h6?

If not - may You pls provide me (or point to) Android DT for this device for experimenting?

I can play with this hw for gpu support - but probably will need some assistance..... 

 

BTW: regarding audio support: I already experimenting with 5.2 mainline + Your's LibreELEC H6 patches from https://github.com/jernejsk/LibreELEC.tv/tree/tanix-tx6/projects/Allwinner/devices/H6/patches/linux

As I mentioned in my post:

sound modules seems to be loaded - but no any audio reported by alsa.

May You hint me where to further investigate why there is no any sound card?

 

Link to comment
Share on other sites

On 7/29/2019 at 6:48 PM, hexdump said:

@PiotrO - dd you btw. check if hdmi out works on your eachlink without the "video=HDMI-A-1:e"? is your eachlink board revision 1.1 or 1.2?

 

best wishes and good luck - hexdump

sorry for late replay.

With 5.2 kernel adding video=HDMI-A-1:e is required to get anything on screen.

With 5.3-rc3 screen not works. 

Regarding board ver. - it is v1.1.

Did You see anywhere on Internet android DT for this board?

 

Link to comment
Share on other sites

@PiotrO - i think the original kernel (3.x) is too old for a dtb on allwinner - they had their own thing similar to dtb back then. i think @jernej is more familiar with this and i think he even extracted something like this from the image of the box - maybe he can put it up here too if possible?

 

best wishes - hexdump

Link to comment
Share on other sites

On 7/28/2019 at 11:00 AM, PiotrO said:

Is anybody looking on GPU support in eachlink h6?

It's not different to other boards, except you don't need to specify voltage regulator. GPU driver is a mess right now. You can either use panfrost, which needs additional patches (I think megous git has it all) and it's not feature complete. On LibreELEC I'm using binary driver from ARM, but it's more tricky to make it work and you have only some options (fbdev - totaly obsolete, GBM - used on LE for Kodi and wayland server, wayland - for wayland clients). BTW, DT nodes for panfrost and ARM binary driver are slightly different.

 

On 7/28/2019 at 11:00 AM, PiotrO said:

BTW: regarding audio support: I already experimenting with 5.2 mainline + Your's LibreELEC H6 patches from https://github.com/jernejsk/LibreELEC.tv/tree/tanix-tx6/projects/Allwinner/devices/H6/patches/linux

You missed audio related patch in common patch folder: https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Allwinner/patches/linux/0001-hdmi-sound-improvements.patch (note that it's always better to pick patches from LibreELEC github, not mine, unless you are looking for device specific patches which is not included in LE master yet).

 

33 minutes ago, PiotrO said:

Did You see anywhere on Internet android DT for this board?

I added it in attachment. Be aware that this one is completely different to mainline one and can be used only as a guide.

 

35 minutes ago, PiotrO said:

With 5.3-rc3 screen not works. 

Which kernel sources are you using?

eachlink.dts

Link to comment
Share on other sites

8 minutes ago, PiotrO said:

I'm using mainline 5.3-rc2.

Sill can't get HDMI screen working on 5.3.

Exactly the same build but with 5.2 mainline gives HDMI  - so it looks 5.3 has something hanged...

Let me rephrase - can you give me the link to the source code and DT source you're using? Not all patches needed to make this (kinda) work are merged and different, incompatible versions exist.

Link to comment
Share on other sites

13 hours ago, jernej said:

Let me rephrase - can you give me the link to the source code and DT source you're using? Not all patches needed to make this (kinda) work are merged and different, incompatible versions exist.

Oh- sorry. I miss Your request :-p

Here are list of patches I'm using to get 5.3 mainline working ok (with gfx & sound) on my hw test set: x86 intel/amd, s905, s912, rk3328, rpi3 and very initially h6 (forget some of h6 patches. this is for pure experiments):

https://github.com/warpme/minimyth2/blob/master/script/kernel/linux-5.3/Makefile

 

Patches are here: https://github.com/warpme/minimyth2/tree/master/script/kernel/linux-5.3/files

 

DT for eachlink H6 i'm using is here: https://github.com/warpme/minimyth2/blob/master/script/kernel/linux-5.3/files/0812-arm64-dts-allwinner-add-h6-eachlink-h6mini.patch

  

Link to comment
Share on other sites

@jernej - which mali gpu driver(s) are you using? i think for panfrost you said that the megous tree maybe already has everything, but i think panfrost is not really useable at all right now on the t720 according to the panfrost irc - so lets look at the mali blobs: which driver are you using for this - i guess this one? - https://github.com/jernejsk/mali-midgard - if yes, which branch of it? and which blobs are you using, i guess this one? - https://github.com/jernejsk/H6-mali-userspace - is this the fbdev driver or the wayland one?

 

i'm thinking if it is maybe possible to use gl4es with the LIBGL_FB=3 option to run opengl apps even on the h6 in x11 with mali hw rendering this way - a simple proof of concept of the same setup on an amlogic s905w tv box looks very promising (https://github.com/ptitSeb/gl4es/issues/119). it will most probably not be very fast, but at least the opengl ui will be rendered by the gpu and not the cpu, which is a big progress already for my use case (www.vcvrack.com).

 

a lot of thanks in advance and best wishes - hexdump

Link to comment
Share on other sites

@PiotrO My patches which you took use old method of enabling DDC (https://github.com/warpme/minimyth2/blob/master/script/kernel/linux-5.3/files/0807-add-orange-pi-3.patch#L370-L586) but DTs which you added later use newer method (https://github.com/megous/linux/commit/4d10f540fe1635c684c5d0e985c5fe6686d412a7).

 

@hexdump LE uses this kernel driver https://github.com/LibreELEC/mali-midgard/tree/TX011-SW-99002-r28p0-01rel0, build by following script https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/linux-drivers/mali-midgard/package.mk.

 

Regarding about userspace part of the driver - LE currently uses 32-bit GBM version from here https://github.com/LibreELEC/libmali/tree/master/lib/arm-linux-gnueabihf. This was taken from pine64 wiki, where you can also find 64-bit GBM version and both of those two are accompanied also with respective wayland version (GBM is used with wayland server, for example GNOME, while wayland version is used by desktop applications, so you must have both versions installed for wayland).

 

I used FBDEV version that you linked a long time ago, but I had to hack kernel a bit to make it work. IIRC it was something about 32-bit color formats. I don't have this patch anymore and I'm very happy that I don't need to deal with FBDEV anymore. I'm not sure if X11 version exist somewhere.

 

Anyway, userspace driver situation is a bit messy and I can only help you with GBM version as this is the only one I use. Of course I can help you with kernel driver too, but with that repository it should be straightforward.

Link to comment
Share on other sites

@jernej - thanks a lot for all this information, it helped me a lot ... i now have my vcvrack opengl app running in x11 (with the normal modesetting xorg server) with opengl being rendered by the mali fbdev blob via gl4es and LIBGL_FB=3 hack. it is very slow due to the extra memory copying, but very useable in my case: the ui now gets rendered by the gpu and the cpu is free for doing audio stuff. some more details are here: https://github.com/ptitSeb/gl4es/issues/119

 

i'll write down some more about all this and put up my latest dtb with the gpu stuff here over the weekend.

 

a lot of thanks and best wishes - hexdump

Link to comment
Share on other sites

On 8/2/2019 at 5:32 PM, jernej said:

Well - thx for pointing this!

Unfortunately this probably not explains why I still don't have anything on hdmi output with 5.3 kernel while exactly the same patch set + kernel config gives screen with 5.2 kernel. 

I change H6 related patch set from Your git to https://github.com/megous/linux/commits/opi3-5.3 but this not helps.  

It looks like 5.3 needs some more work to get hdmi working in each link h6.

boot log for 5.3-rc2 with megous patches attached. 

H6_5.3-rc2_boot.log

Link to comment
Share on other sites

and also this:

[    2.768818] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:45:HDMI-A-1] disconnected
[    2.777425] [drm:drm_client_modeset_probe] No connectors reported connected with modes

I guess trick with ":e" doesn't work anymore or you have to change connector name in kernel parameter.

Link to comment
Share on other sites

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

Important Information

Terms of Use - Privacy Policy - Guidelines