H96 Pro+ S912 Standby mode

Hello,
I have my H96 Pro+ from Banggood (mainboard: ZH01-S912-TVBOX-V3.0). It is green with the specs 3gb+32gb. I have Coreelec on a seperate sdcard. The problem: Suspend dont work and when I shut down the box, I can only start it again by unplugging and plugging in the power supply. Now I have become aware of the uboot files from @Portisch. I used the wiki tutorial to install it.
Modifying the sdcard seems to work fine, but as soon as I delete the existing bootloader with ssh, dd gets an error:

dd: writing to `/dev/disk2': No space left on device 

I ignored the mistake and restarted the box of good will. But now the box doesnā€™t give a signal anymore and the LED lights up blue permanently. So I have read the logs via ttl:

TE: 224953

BL2 Built : 16:32:58, Nov  3 2017. 
gxl gb5491d8 - xiaobo.gu@droid12

set vdd cpu_a to 1120 mv
set vdd cpu_b to 1050 mv
set vddee to 1000 mv
Board ID = 3
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
STICKY_REG0: 0x00000000
STICKY_REG1: 0x00000000
STICKY_REG9: 0x00000000
DDR3 chl: Rank0+1 @ 912MHz - PASS
Rank0: 2048MB(auto)-2T-13
Rank1: 1024MB(auto)-2T-13
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
GXM:BL1:dc8b51:76f1a5;FEAT:ADFC318C:80;POC:3;RCY:0;EMMC:0;READ:0;CHK:AA;SD:0;READ:0;0.0;CHK:0;

The log keeps repeating itself.
Maybe someone has an idea what the problem is. Thanks in advance!

There is the u-boot missing. Continue here:


-> Reboot to the bootable micro SD card by one of this method:
-> use method 1

Be sure your sd card is bootable:

1 Like

Thanks for the answer! I took a new micro SDcard and followed the instructions (with Debian). There were no errors in the creation like with the previous ones. (I also changed the dtb.img file (I tested: gxm_q200_3g.img and gxm_q201_3g_1gbit.img)).
Nevertheless nothing has changed. The LED is permanently blue and I donā€™t get a signal via hdmi. I press and hold the reset button before connecting the power supply. How long do you have to wait until the coreelec logo comes? (I have waited up to 2min).
The log hasnā€™t changed either.
I hope you have another idea what Iā€™m doing wrong.

You see on the UART live log when the booting of the SD card is starting. If this is not starting you donā€™t have U-Boot.bin.sd.bin in sector 0 of the SD card.

1 Like

I donā€™t fully understand the log. But does the reading process start on this line, right?:

Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000

After that, the log starts all over again.
However, I donā€™t understand what Iā€™m doing wrong about creating the sd card. Can this be a hardware problem with the micro sd adapter or is it due to the microsd itself?
Is there another way to write sector 0 without dd?

Check this how it should look like.

1 Like

Thanks a lot for your answer.

Which TV box HW you are using?

This seems to be very specific to Khadas VIM2 HW. If I look to the schematics there are a Realtek PHY and something like a PIC. I have doubts this is also available with H96 Pro+
Thanks a lot for the info
Knut

Actually, just realised, I wake my nas from the app

Thanks for your help @Portisch!
I have now managed to get u-boot to load:

Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from SD, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from SD, src: 0x00020200, des: 0x05100000, size: 0x0002c600
Load bl33 from SD, src: 0x00050200, des: 0x01000000, size: 0x00065c00
NOTICE: BL3-1: v1.0(release):35dd647
NOTICE: BL3-1: Built : 15:20:30, Feb 7 2018

Then nothing happens anymore.

Nevertheless the box has its phases. Sometimes it starts u-boot without problems one after the other. Sometimes, however, it starts only after multiple replugging of the power supply. By the way, it is completely irrelevant if I hold down the reset button or not at all.
Either way, it still didnā€™t bring me to the result: CoreELEC starts.
Everything stays the same, no matter if u-boot starts or not:
-blue LED
-no HDMI signal
By the way, Iā€™m using your compiled u-boot files. Could that be a problem?

Wait, I take a look to my crystal ballā€¦ hmmm - I donā€™t see any log fileā€¦

  1. CL13 seems to be too much for the PE037-125. This RAM memory type requires/runs well with a CL value of 11. The Clk. Rate has to be lowered to 792Mhz (~ 800). You need another u-boot binary.
  2. The power supply may also be faulty.
  1. where do i get the right u-boot from? Can I compile it myself?
    Sorry if I ask stupid questions.

  2. in fact i donā€™t have the original included power supply (because itā€™s broken).
    However, I had no problems using both Android and Coreelec with the new.

Read above, there is a guide in the uboot wiki. Before compiling, open the board configfile (/board/h96proplus/configs/v2_2.h) and change the value of the clk. Rate from 912Mhz to 792Mhz.

v2_2.h:

#define CONFIG_DDR_CLK					792

If youā€™ve done everything right, the CL value should change from 13 to 11.

Rank1: 1024MB(auto)-2T-11

From where you got the type of ram?

@worldtest
uboot_v2_2_792MHz.zip (1.4 MB)

Maybe I have to split a little more the PCB boards.
These are what I found:
CZ-S32-V2.2 (DDR3)
CZ-S32-V3 (DDR4)
CZ-S32-V5 (LPDDR3)
CZ-S32-V6 (LPDDR3)
CZ-S32-V6.1 (LPDDR3)
ZH-01-S912-TVBOX-V.2.0
ZH-01-S912-TVBOX-V.3.0 (DDR3)

1 Like

From here

I have now found the time to realize @bumerc idea. Thanks @Portisch for the u-boot files. But I compiled it myself (I wanted to do it anyway).
With the changed Mhz number booting worked at the first try! So again a big thank you to @Portisch and @bumerc, for your very useful help!
It works so far at first view everything. However, I noticed small things:

When I restart Coreelec, the box goes off, but not on again. Only after pressing the power button the box starts again (this was also the case with the original U-Boot).

Goes off

[ 330.767128@0] reboot: Restarting system(systemd-shutdow)
bl31 reboot reason: 0xd
bl31 reboot reason: 0x1
system cmd 1.

GXM:BL1:dc8b51:76f1a5;FEAT:ADFC318C:80;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 103892

BL2 Built : 16:32:58, Nov 3 2017.
gxl gb5491d8 - xiaobo.gu@droid12

set vdd cpu_a to 1120 mv
set vdd cpu_b to 1050 mv
set vddee to 1000 mv
Board ID = 3
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
STICKY_REG0: 0x00000000
STICKY_REG1: 0x00000000
STICKY_REG9: 0x00000000
DDR3 chl: Rank0+1 @ 792MHz - PASS
Rank0: 2048MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x05100000, size: 0x0002c600
Load bl33 from eMMC, src: 0x00050200, des: 0x01000000, size: 0x00065c00
NOTICE: BL3-1: v1.0(release):35dd647
NOTICE: BL3-1: Built : 15:20:30, Feb 7 2018
NOTICE: BL31: BL33 decompress pass
mpu_config_enable:ok

[Image: gxl_v1.1.3243-377db0f 2017-09-07 11:28:58 qiufang.dai@droid07]

OPS=0x82

wdt: reset registers!

8d a f2 47 2b 70 cf ee 81 56 16 5b [0.342546 Inits done]

secure task start!
high task start!
low task start!
ERROR: Error initializing runtime service opteed_fast

U-Boot 2015.01-gbc6f877-dirty (Dec 11 2018 - 15:22:33)

DRAM: 3 GiB
Relocation Offset is: b6eb4000
registe

Power button

GXM:BL1:dc8b51:76f1a5;FEAT:ADFC318C:80;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 105782

BL2 Built : 16:32:58, Nov 3 2017.
gxl gb5491d8 - xiaobo.gu@droid12

set vdd cpu_a to 1120 mv
set vdd cpu_b to 1050 mv
set vddee to 1000 mv
Board ID = 3
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
STICKY_REG0: 0x00000000
STICKY_REG1: 0x00000000
STICKY_REG9: 0x00000000
DDR3 chl: Rank0+1 @ 792MHz - PASS
Rank0: 2048MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x05100000, size: 0x0002c600
Load bl33 from eMMC, src: 0x00050200, des: 0x01000000, size: 0x00065c00
NOTICE: BL3-1: v1.0(release):35dd647
NOTICE: BL3-1: Built : 15:20:30, Feb 7 2018
NOTICE: BL31: BL33 decompress pass
mpu_config_enable:ok

[Image: gxl_v1.1.3243-377db0f 2017-09-07 11:28:58 qiufang.dai@droid07]

OPS=0x82

wdt: reset registers!

8d a f2 47 2b 70 cf ee 81 56 16 5b [0.344519 Inits done]

secure task start!
high task start!
low task start!
ERROR: Error initializing runtime service opteed_fast

U-Boot 2015.01-gbc6f877-dirty (Dec 11 2018 - 15:22:33)

DRAM: 3 GiB
Relocation Offset is: b6eb4000
register usb cfg[0][1] = 00000000b7f5a960
[CANVAS]canvas init
boot_device_flag : 1
Nand PHY Ver:1.01.001.0006 (c) 2013 Amlogic Inc.
init bus_cycle=6, bus_timing=7, system=5.0ns
reset failed
get_chip_type and ret:fffffffe
get_chip_type and ret:fffffffe
chip detect failed and ret:fffffffe
nandphy_init failed and ret=0xfffffff1
MMC: aml_priv->desc_buf = 0x00000000b3eb46b0

If the box is off (after shutdown) and I want to start it with the remote control, it lights up shortly blue and nothing happens. Only with second pressing of the power key the box starts. In general not bad, because it didnā€™t work at all with the original u-boot!

Shutdown

[ 73.247990@0] reboot: Power down
bl31 reboot reason: 0x108
bl31 reboot reason: 0x108
system cmd 0.

bl30 get wakeup sources!

process command 00000006
bl30 enter suspend!

cpu clk suspend rate 1000000000

suspend_counter: 1

Enter ddr suspend

first time suspend

ddr suspend time: 1886us

store restore gp0 pll

process command 00000001
CEC cfg:0x0019
set vddee to 0x035cmv
08915d0000000000cec reset
kern log_addr:0x0f
rx stat:00, tx stat:00
rx stat:00, tx stat:01
ping_cec_ll_tx:TX_ERROR
Set cec log_addr:0x01, ADDR0:11

Power button

08915c0000000000exit_reason:0x02
set vddee to 0x03e8mv
set vdd_cpu a to 0x0460mv
set vdd_cpu a to 0x041amv
store restore gp0 pll

gp0 pll canā€™t lock

read gp0_ctrl 40000000

read gp0_ctrl2 0

read gp0_ctrl3 0

read gp0_ctrl4 0

Enter ddr resume

ddr resume time: 364us

cfg15 3b00000

cfg15 23b00000

BL1:dc8b51:76f1a5;FEAĆ“GXM:BL1:dc8b51:76f1a5;FEAT:ADFC318C:80;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 101347

BL2 Built : 16:32:58, Nov 3 2017.
gxl gb5491d8 - xiaobo.gu@droid12

set vdd cpu_a to 1120 mv
set vdd cpu_b to 1050 mv
set vddee to 1000 mv
Board ID = 3
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
STICKY_REG0: 0x00000000
STICKY_REG1: 0x00000000
STICKY_REG9: 0x00000000
DDR3 chl: Rank0+1 @ 792MHz - PASS
Rank0: 2048MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x05100000, size: 0x0002c600
Load bl33 from eMMC, src: 0x00050200, des: 0x01000000, size: 0x00065c00
NOTICE: BL3-1: v1.0(release):35dd647
NOTICE: BL3-1: Built : 15:20:30, Feb 7 2018
NOTICE: BL31: BL33 decompress pass
mpu_config_enable:ok

[Image: gxl_v1.1.3243-377db0f 2017-09-07 11:28:58 qiufang.dai@droid07]

OPS=0x82

wdt: reset registers!

8d a f2 47 2b 70 cf ee 81 56 16 5b [0.340123 Inits done]

secure task start!
high task start!
low task start!
ERROR: Error initializing runtime service opteed_fast

U-Boot 2015.01-gbc6f877-dirty (Dec 11 2018 - 15:22:33)

DRAM: 3 GiB
Relocation Offset is: b6eb4000
registe

Power button again

GXM:BL1:dc8b51:76f1a5;FEAT:ADFC318C:80;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 105535

BL2 Built : 16:32:58, Nov 3 2017.
gxl gb5491d8 - xiaobo.gu@droid12

set vdd cpu_a to 1120 mv
set vdd cpu_b to 1050 mv
set vddee to 1000 mv
Board ID = 3
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
STICKY_REG0: 0x00000000
STICKY_REG1: 0x00000000
STICKY_REG9: 0x00000000
DDR3 chl: Rank0+1 @ 792MHz - PASS
Rank0: 2048MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x05100000, size: 0x0002c600
Load bl33 from eMMC, src: 0x00050200, des: 0x01000000, size: 0x00065c00
NOTICE: BL3-1: v1.0(release):35dd647
NOTICE: BL3-1: Built : 15:20:30, Feb 7 2018
NOTICE: BL31: BL33 decompress pass
mpu_config_enable:ok

[Image: gxl_v1.1.3243-377db0f 2017-09-07 11:28:58 qiufang.dai@droid07]

OPS=0x82

wdt: reset registers!

8d a f2 47 2b 70 cf ee 81 56 16 5b [0.344256 Inits done]

secure task start!
high task start!
low task start!
ERROR: Error initializing runtime service opteed_fast

U-Boot 2015.01-gbc6f877-dirty (Dec 11 2018 - 15:22:33)

DRAM: 3 GiB
Relocation Offset is: b6eb4000
register usb cfg[0][1] = 00000000b7f5a960
[CANVAS]canvas init
boot_device_flag : 1
Nand PHY Ver:1.01.001.0006 (c) 2013 Amlogic Inc.
init bus_cycle=6, bus_timing=7, system=5.0ns
reset failed
get_chip_type and ret:fffffffe
get_chip_type and ret:fffffffe
chip detect failed and ret:fffffffe

  1. Did you connect any external device to the USB port?
  2. Read through the wiki manual exactly, cec19 is no longer used, change this value accordingly.
1 Like
  1. No, there was no USB device on the box the whole time.
  2. I have now changed cec19 to cec3f via ssh. Why isn cec19 the default when itā€™s no longer used?

most likely the guys just forgot.

ā€”ā€”ā€”ā€”-
For Experiments - if anyone wants to test WOL, here are new uboot binaries.
-Added KBI, and RTL8211F external phy driver
-TFTP should now work too.
The binaries have not been tested since I am limited in time. Therefore installation at your own risk. (network and boot problems can occur :slight_smile: ).

u-boot_ddr3_4_lpddr3
Please do not install on DDR3-CL11 (792Mhz) devices.

I am currently also working on WOL for this box. And have seen the same features missing you said. But I didnā€™t had time yet to test it.