More hardware information of iHost for helping porting HAOS

Thanks!

I have mainline u-boot starting up ok so far. However the kernel is aborting when it tries to probe PSCI, which I believe it requires to bring up SMP and remaining cpu cores. So not actually DDR related after all.

turns out OPTEE is mandatory for this SoC. Now got it booting quite a bit further.

1 Like

Glad to see you’re making progress. Hopefully, after you resolve these issues, you can publish a more complete and detailed description - so that more people who encounter the same problem or want to run HAOS directly on ihost can have fewer detour.

1 Like

Yes, I will publish my HAOS fork, including HAOS images on Github once its ready. I will probably do a blog post about it as well.

But for now still trying to resolve a few hardware issues. Still having trouble getting i2c2 bus and RTC working even though I have exact same dts nodes as provided above. Also would like to get a console working on the OTG port (but only just got USB working today) before I make images public!

I also seeing these below exceptions which also seem to appear in the iHost Linux Distro images. Any ideas what is causing these, mostly seem to happen with python or curl.

[11895.916955] curl (3245): undefined instruction: pc=a6c789f8
[11895.916969] CPU: 1 PID: 3245 Comm: curl Tainted: G           O       6.1.51 #2
[11895.916984] Hardware name: Generic DT based system
[11895.916992] PC is at 0xa6c789f8
[11895.917004] LR is at 0xa6c73131
[11895.917015] pc : [<a6c789f8>]    lr : [<a6c73131>]    psr: 00000030
[11895.917027] sp : aec7a918  ip : 00000001  fp : 00000000
[11895.917038] r10: a6d9e6ac  r9 : a6f55494  r8 : a6f554f0
[11895.917048] r7 : 00000001  r6 : a6db4c10  r5 : 00000000  r4 : a6db4d9c
[11895.917061] r3 : 00000008  r2 : a6db4d14  r1 : 00000000  r0 : 00000000
[11895.917072] Flags: nzcv  IRQs on  FIQs on  Mode USER_32  ISA Thumb  Segment user
[11895.917088] Control: 10c5387d  Table: 0564406a  DAC: 00000055
[11895.917103] Code: 4770 ef00 0c40 4770 (ff00) 0c40 
1 Like

Thanks for your feedback. We have also seen similar errors on node

I get explanation from https://www.kernel.org/doc/html/v4.15/admin-guide/tainted-kernels.html. It doesn‘t seem to affect the normal operation of the program

From the logs, may be something wrong with curl itself. How about upgrade curl version? :stuck_out_tongue:

curl was just an example, it happens with python3 and udevadm as well.

I still struggling get i2c2/bm8563 working. Do you know which power domain/regulator this is connected to? Could it maybe be sharing power with video or npu? I dont have these setup in my dts files as yet.

Does this work for you? This is the connection schematic of the RTC chip on the ihost

1 Like

Is this what you need ?

1 Like

I have i2c2 configured as per those pins and the same config as in your provided dts files. However any attempt to probe this bus, using i2cdetect or otherwise, just returns a timeout error. i2c0 is working fine though.

i2c2 also works in the iHost Linux distro, so I guess something is missing, but not sure what!

what’s your i2cdetect command ?

# i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         
   [15998.343047] rk3x-i2c ff400000.i2c: timeout, ipd: 0x00, state: 1
-- [15999.356340] rk3x-i2c ff400000.i2c: timeout, ipd: 0x00, state: 1
-- [16000.369673] rk3x-i2c ff400000.i2c: timeout, ipd: 0x00, state: 1
-- [16001.383003] rk3x-i2c ff400000.i2c: timeout, ipd: 0x00, state: 1

vs i2c0 which correctly detects the RK809

# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

may you provide your boot log about i2c2 ?

These are the only logs showing i2c2.

[    0.446647] usb usb2: SerialNumber: ffe10000.usb
[    0.447736] hub 2-0:1.0: USB hub found
[    0.448142] hub 2-0:1.0: 1 port detected
[    1.439897] rk3x-i2c ff400000.i2c: timeout, ipd: 0x00, state: 1
[    1.440452] rtc-pcf8563 2-0051: pcf8563_write_block_data: err=-110 addr=0e, d
ata=03
[    1.441134] rtc-pcf8563 2-0051: pcf8563_probe: write error
[    1.441708] rtc-pcf8563: probe of 2-0051 failed with error -5
[    1.442523] hci_uart_h5 serial0-0: GPIO lookup for consumer enable


Do you modified dts or defconfig which I given you?

Is your /proc/driver/rtc exist ? if exist, what’s cat /proc/driver/rtc return ?

I havent used those directly, I am trying to build mainline kernel 6.1 (with some rv1126 patches backported from 6.3). The DT nodes for i2c2 and RTC are identical to yours though.

The rtc driver doesnt get loaded, so that path doesnt exist.

I tracked this down finally, i2c2 has a special case grf offset in the code. Its working now I added that.

2 Likes

Full source code for my HAOS port so far can be found here for anyone interested.

Most peripherals are working now, except sound.

5 Likes

Thank you for your work! It looks great… Unfortunately, we are not familiar with HA, so we can not provide you with more support and help.

But I believe you are a savior for those users who want to use HA runing on iHost

2 Likes

Indeed @darkxst has done a marvelous job. Tests are really looking good. HAOS running natively on the iHost. I am excited and looking forward to the future updates.

4 Likes