X96Air P3 slow microSDcard speed / How to edit the device tree?

Hi everybody,

recently I got a new microSD Card ( a Samsung Pro 512GB ), which normally is a very fast card. Now I tried to figure out at which speed this card would achieve in the internal microSD-Slot of my X96Air P3 running the latest stable version of CoreElec. Unfortunately I learned that the internal slot is very slow and seems to be limited to about 20 MByte/s, both reading and writing, regardless of the type of card I tested. Dmesg shows that the slot is clocked with 50MHz and is using 4bits, so the limit should be about 50MByte/s ?

In another thread
I learned that the speed of the microSD-slot was limited by purpose because some SDcards are incompatible without this limit and that this behavior could be changed by editing the dtb file. So I installed the device-tree-compiler and disassemled the dtb file used for my device, whis is sm1_s905x3_4g_1gbit.dtb

Nevertheless I am clueless about the question which setting in the decompiled file has to be altered to enable a higher speed for the internal slot. The question is also if the internal slot is capable to use 104MHz clock instead of the standard 50MHz.

Does anybody of you can give me a hint, please ?

Just for clarification: Currently, I am running CoreElec from the internal eMMC and it works just fine. Therefore I would like to use the microSD card only as additional storage, but this would be senseless with the current operation speed.

Thanks in advance for any clues,

I fooled around with the information I found here
and tried to activate the “sd-uhs-sdr25” mode. Now dmesg tells me that the system cannot switch to the ( lower ) voltage the UHS mode needs ( 1,8V instead of 3,3V )

After that I compared the dtb from Ubuntu for the odroid HC4 ( which claims to achieve full UHD SDR104 speed ) and found to more entrys in this dtb, thats

vol_switch = <0x11 0x06 0x00>;
vol_switch_18 = <0x01>;

but now dmesg tells me, that in cannot find the correct GPIO pins to execute this commands. Any idea ?

Hardkernel sells SBCs, therfore everything is public available: schematics, documentation, sources
But your X96Air P3 is a black box, so nobody knows if this voltage switching is available or not.

Just copying nodes from complete different board with different SOC will not work, for sure. You need to do reverse-engineering on the Android dtb the box came with, to see if there’s a similar node.

What SD-speed can you achieve under Android? Could be an indication if the box in general is capable of UHS modes.

At the moment the sdcard speed is limited to cap-sd-highspeed, that’s 25MByte/s. Since I am running CoreElec in single installation mode from the internal flash, I am not able to check the speed of the card reader under Android.

I used the HC4 for comparision because the Soc is the same, it’s a S905X3 on both devices. Furthermore Hardkernel advertises the HC4 to be capable of running SD-Cards in UHS-Mode, and after decompiling the device tree for the ubuntu offered by Hardkernel I could verify that this claim is correct. BTW, the CoreElec image for the HC4 does not activate the UHS mode for the cardreader in it’s device tree, but that’s another story.

Since I do not have Android installed the question is if and how could I extract the Android device tree from the original Android image for the X96Air. Is it neccessary to reflash the Box to Android, or could this be done by unpacking the original image file ?

I used a program I found in the internet which seems to be capable to unpack the original Android image. Where would I have to look for the original device tree ?

Thx in advance, Nanobot

I was able to extract the original Android dtb from the recovery image. To do this, I had to extract the recovery image for the X96Air, which gives me a file called aml_dtb.PARTITION, which is actually a gzip-compressed archive. This archive contains a file called _aml_dtb, which is an Amlogic Multi-DTB. With the help of fdtget ( included in coreelec ) and dtbsplit, which is available here

I was able to get the original Android DTB from the multi DTB. And as @rho-bot suspected, the X96Air is not designed to read sd cards in UHS-I mode.

Anyway thanks for your help and a suggestion: the CoreElec dtb-files for the Odroid C4 and Odroid HC4 devices should be revised, since these devices are capable of reading SD cards up to UHS-I SDR104 mode, but but this is not taken into account in the CoreElec device trees. The necessary information for this can be extracted from the Ubuntu image provided by Hardkernel.

C.U. Nanobot

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.