Tanix TX6

  • How much work is involved in adding support for the Tanix TX6 Allwinner H6 device?

    I'm familiar with github and compiling images on Ubuntu etc, but don't know the steps required to add a new device to the image.

    Is this documented anywhere? I have no problem doing all the heavy lifting.

    Thanks.

    • Official Post

    How much work is involved in adding support for the Tanix TX6 Allwinner H6 device?

    If it uses LPDDR3 RAM type then it's not that hard, matter of writing few configuration files. Confirm first that it indeed uses LPDDR3 RAM and then I'll guide you through the process. If it's not LPDDR3, then it's much harder since you have to support new RAM type in U-Boot H6 DRAM driver, but I can help you there too.

  • If it uses LPDDR3 RAM type then it's not that hard, matter of writing few configuration files. Confirm first that it indeed uses LPDDR3 RAM and then I'll guide you through the process. If it's not LPDDR3, then it's much harder since you have to support new RAM type in U-Boot H6 DRAM driver, but I can help you there too.

    Thanks much for your reply. The box is due to be delivered tomorrow. According to the sellers website, it has DDR3 ram.

    See snapshot below :-

    Main Features

    ● Android 9.0 operation system

    ● Allwinner H6 CPU, up to 1.5GHz, Quad core, ARM Cortex-A53

    ● Mali T720 GPU

    ● 4GB DDR3 RAM + 64GB EMMC ROM

    ● 2.4GHz + 5.8GHz dual-band WiFi

    ● 100Mbps Ethernet

    ● Support 6K ultra HD image display

    ● Support H.265 decoding

    Is there a way I can tell which type of RAM is installed?

    Also, would I have to create a dtb file? I'd need help with that.

    Cheers.

    • Official Post

    Is there a way I can tell which type of RAM is installed?

    Only by opening the box and check markings on RAM chips. I found this Tanix TX6 TV Box - Allwinner H6 4/32GB Dual WiFi BT4.1 or 5 - FreakTab where board has certainly DDR3 RAM, which is not yet supported. You might get lucky, since manufacturers now and then change RAM, but I wouldn't count on that. So this is the biggest issue, because there is no documentation at all how to configure RAM. Current approach is to reverse engineer blobs provided by Allwinner.

    Also, would I have to create a dtb file? I'd need help with that.

    Yes. No problem, I can help, but that's the easy part.

  • Just realized that LPDDR is different to DDR. I'll let you know what I find when the box comes. Thx.

    jernej - I've uploaded 2 full size images of the Tanix TX6 Allwinner H6 box (files are bigger than 1MB hence the upload). Hopefully you will be able to confirm what type of ram is installed.

    Thanks!

    Link here:- MEGA

  • Search for K4B4G0446Q tells that this is DDR3L. Note that there is no software difference between DDR3 and DDR3L, later just uses lower voltage power. Anyway, are you up for the task of adding support for new RAM type? I can help you, but obviously I don't have such board to test changes.

    Thanks - if you let me know what to do, how to test it etc, I'll be happy to do it.

    Even Android 9.0 is garbage when it comes to Kodi.

    This box is responsive though.

    Edited once, last by ukmark62 (May 25, 2019 at 4:49 PM).

    • Official Post

    ukmark62 First of all, I suggest you find serial port on the board and connect it. Maybe you can find how-to on the internet or you'll have to do it hard way to find it by yourself. I'm sure correct settings for it are 115200 8N1 (I haven't seen different settings on any AW board/box).

    Then we'll need DTB from Android. There might be way to extract it from running system, but I usually extract it from Android update file.

    These two steps are pre-requirement for later U-Boot and Linux configuration and testing.

  • ukmark62 First of all, I suggest you find serial port on the board and connect it. Maybe you can find how-to on the internet or you'll have to do it hard way to find it by yourself. I'm sure correct settings for it are 115200 8N1 (I haven't seen different settings on any AW board/box).

    Then we'll need DTB from Android. There might be way to extract it from running system, but I usually extract it from Android update file.

    These two steps are pre-requirement for later U-Boot and Linux configuration and testing.

    I'm planning on getting this UART:- USB to TTL CP2102 UART Module 5Pin Serial Convertor 5v 3.3v + FREE Cables 606034480971 | eBay

    Never done this before but I like new challenges. Found this video on how to do it:-

    External Content www.youtube.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    I got the info from here:- http://linux-sunxi.org/uart

    EDIT:

    Actually looks very difficult on an android TV box board. I can't find the 3 connectors (GND, TX and RX) on the Tanix TX6 board. Seems like the Pine H64 board has proper connection points for UART, but I don't see anything on the Tanix TX6.

    Edited once, last by ukmark62 (May 25, 2019 at 6:03 PM).

  • jernej

    I have been on holiday and will be back later this week to work on the Tanix TX6 H6 box. I should have a multimeter and uart usb device when I get back. I will try to get the uart connection working then.

  • jernej

    I've made progress with the Tanix TX6 H6 board. I believe I've identified the TX,RX and GND pins with a multimeter. I de-soldered the holes and am now waiting in the post for some header pins to attach to the board in order to make the USB UART connection with cables. I'm hoping I don't have to solder the header pins to the board, as the distance between the holes is tiny and I doubt I could solder them without the solder touching other pins. However, the holes are small and I'm hoping that I can just attach the header pins without solder and get a tight enough fit for a connection.

    One thing, there are 5 pins on the board and 2 of the pins look like they could both be ground pins. They both beep when doing the continuity test and they both show zero voltage when the box is powered on. The pins are next to each other. I'm sure I have identified the VCC 3.3v(not to be used), TX(shows 3v) and RX(shows 0v) pins. Would it matter which of those 2 'ground' pins I used?

  • jernej

    Getting garbage on the UART connection to Tanix TX6 H6 box as example below:-

    ▒▒▒▒▒▒▒▒R▒▒J▒▒▒▒▒ ▒H▒▒▒▒▒▒▒▒▒▒"DD▒▒▒▒▒▒▒i▒▒▒$▒▒ DD"$▒$▒▒▒▒▒▒$D$DD$▒▒▒▒ ▒▒▒▒B"DD▒▒▒▒▒▒▒▒JJ▒+▒▒▒DDDDDDDDDDDDD$▒ښ*▒▒I $D $▒▒▒▒▒▒▒▒▒▒▒R▒U▒k▒▒▒@▒▒▒▒▒▒▒▒DD$▒▒▒▒▒▒▒ӷ▒▒B D▒▒▒▒▒▒▒▒▒▒▒▒$$▒U▒▒ D $DD$▒▒▒▒▒▒▒▒Jj▒۽▒DB▒H▒▒▒▒▒▒▒▒DD▒▒*▒▒Z▒▒I▒B@HBHDD$▒▒▒▒▒▒▒▒▒▒▒▒▒&"▒▒▒$$$$▒▒$DD▒▒▒▒*▒Z▒▒▒▒▒▒ $D

    Any ideas? Could it be a baud rate setting? Thx

    The UART USB device does show a blue light and red light when communicating. I am a complete noob on this - amazed that I have managed to get a connection using de-soldering, header pins, multimeter for first time etc. :shy:

    EDIT: Just figured out the lights correspond to the UART USB GND connection (red) and RX connection (blue) - tiny markings on the UART USB device show that info. I do get flashing blue light also on the TX USB UART connection, but the GND and RX lights are always on during the putty session, Still getting garbage chars

    UPDATE: Solved it by switching a cable around - the TX port on the H6 board was in a different place to where I thought - but all working now. Getting lots of readable text on boot up.

    What are the next steps? Thx

    Edited 7 times, last by ukmark62 (June 7, 2019 at 5:06 PM).

    • Official Post

    ukmark62 Congratulations! Small request, would you mind making basic device page with UART how-to on linux-sunxi.org (template: http://linux-sunxi.org/device_page_example)? You certainly don't need fill everything, but it would be nice to describe UART connection.

    Ideally, you should now find which of USB ports is USB OTG. That way you could experiment with U-Boot without SD card, but you would need to corrupt existing Android installation. You would also need USB A to A cable, which may damage hardware if wrongly used (5V line could be cut to lower chance to damage anything). You decide if fast experimenting without SD card is worth this trouble. If so, I can give you few more advices how to do that.

    If you are fine with burning your experimental U-Boot everytime to SD card, you could go to next step, which is to make working U-Boot with libdram (Allwinner DRAM driver). It's useful to have something which works and you then have register values which works for sure. Fortunately, someone already wrote short tutorial how to do that: https://forum.armbian.com/topic/10174-since-tanix-tx6-can-boot-from-the-sd-card/?do=findcomment&comment=80301

    Note: Before you start following above instructions, make sure you have 32-bit ARM compiler. On my distro it's arm-none-eabi-gcc. You should also execute export CROSS_COMPILE=arm-none-eabi-, so U-Boot build system will pick up correct compiler.

  • ukmark62 Congratulations! Small request, would you mind making basic device page with UART how-to on linux-sunxi.org (template: http://linux-sunxi.org/device_page_example)? You certainly don't need fill everything, but it would be nice to describe UART connection.

    Ideally, you should now find which of USB ports is USB OTG. That way you could experiment with U-Boot without SD card, but you would need to corrupt existing Android installation. You would also need USB A to A cable, which may damage hardware if wrongly used (5V line could be cut to lower chance to damage anything). You decide if fast experimenting without SD card is worth this trouble. If so, I can give you few more advices how to do that.

    If you are fine with burning your experimental U-Boot everytime to SD card, you could go to next step, which is to make working U-Boot with libdram (Allwinner DRAM driver). It's useful to have something which works and you then have register values which works for sure. Fortunately, someone already wrote short tutorial how to do that: https://forum.armbian.com/topic/10174-since-tanix-tx6-can-boot-from-the-sd-card/?do=findcomment&comment=80301

    Note: Before you start following above instructions, make sure you have 32-bit ARM compiler. On my distro it's arm-none-eabi-gcc. You should also execute export CROSS_COMPILE=arm-none-eabi-, so U-Boot build system will pick up correct compiler.

    I've got to the compile stage (relatively new to all this) and I get the following error when issuing the final "make". I'm opting for the SD card testing route. I have Ubuntu 16.04 installed using Oracle VM VirtualBox:-

    mark@mark-VirtualBox:~/u-boot$ make

    scripts/kconfig/conf --syncconfig Kconfig

    CHK include/config.h

    UPD include/config.h

    CFG u-boot.cfg

    GEN include/autoconf.mk

    GEN include/autoconf.mk.dep

    CFG spl/u-boot.cfg

    GEN spl/include/autoconf.mk

    *** Your GCC is older than 6.0 and is not supported

    arch/arm/config.mk:66: recipe for target 'checkgcc6' failed

    make: *** [checkgcc6] Error 1

    Had a look on internet and found lots of hits but I'm stuck here.

    Here is the config file I'm using named (eachlink_h6_mini_libdram_spl_defconfig). I modified 3 lines of the existing file as you can see below:-

    CONFIG_ARM=y

    CONFIG_ARCH_SUNXI=y

    CONFIG_SPL=y

    CONFIG_MACH_SUN50I_H6_32=y

    CONFIG_DRAM_SUN50I_H6=y /* this was previously not set */

    CONFIG_DRAM_SUN50I_H6_LIBDRAM=y

    CONFIG_MMC0_CD_PIN="PF6"

    CONFIG_MMC_SUNXI_SLOT_EXTRA=2

    # CONFIG_PSCI_RESET is not set

    CONFIG_NR_DRAM_BANKS=2 /* this was previously 1 - my box has 4GB RAM - what should this be set to???*/

    # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set

    # CONFIG_CMD_FLASH is not set

    # CONFIG_SPL_DOS_PARTITION is not set

    # CONFIG_SPL_EFI_PARTITION is not set

    CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-tanix-tx6" /* changed the device tree name - should it be changed back???? */