S905X4 built in DVB

Device freezes while loading kernel. With this sm1_s905x3_4g.dts everything works except the dvb part.

add demod ops fail -19
18:02:23.708 [    2.311660] dvb power gpio invalid

Most likely gpio pin conflict, if other dts parts are the same as coreelec dtb

Without full kernel log i cant tell what is wrong. Ar yiu using latest nightly ?

Gpio log only means that the power pin is not configured which is true and does not cause box to freeze

22.0-Piers_alpha1

hmm, yeah … that proves nothing :slight_smile: Maybe lets do this:
download current nightly version from here CoreELEC nightly builds and use fresh sd/usb drive (do not reuese storage partition from other installations, let the CE create it for you from scratch).
use sm1_s905x3_4g.dtb as your dtb.img and see if that works. If it Does work then use device tree I sent you and see if it boots succesfully.

Dmesg eror

[    2.080538] dvb power gpio invalid
[    2.080618] aml_dvb_extern_init: OK, version: V1.28
[   19.969539] probe amlogic dvb driver [V2.02]
[   19.969741] aml_dvb_get_adapter need register adapter first.
[   19.969745] DVB: registering new adapter (amlogic-dvb)
[   20.002145] DVB: Set DMX0 TS_RECORDER_ENABLE to 0
[   20.002181] DVB: Set DMX1 TS_RECORDER_ENABLE to 0
[   20.002187] DVB: Set DMX2 TS_RECORDER_ENABLE to 0
[   20.002191] DVB: reset ASYNC FIFOs
[   20.002658] DVB: Set DMX0 TS_RECORDER_ENABLE to 0
[   20.002692] DVB: Set DMX1 TS_RECORDER_ENABLE to 0
[   20.002696] DVB: Set DMX2 TS_RECORDER_ENABLE to 0
[   20.002699] DVB: reset ASYNC FIFOs
[   20.002707] DVB:dmx_reset_dmx_hw_ex_unlock into
[   20.002772] DVB: demux0 smallsec buf disable
[   20.002782] DVB: demux0 timeout disable
[   20.002787] DVB: demux0 timeout enable:timeout(9000),ch(0xfffffff8),match(1)
[   20.002846] DVB: demux0 smallsec buf disable
[   20.002854] DVB: demux0 timeout disable
[   20.002856] DVB: demux0 timeout enable:timeout(9000),ch(0xfffffff8),match(1)
[   20.002919] DVB: demux1 smallsec buf disable
[   20.002923] DVB: demux1 timeout disable
[   20.002926] DVB: demux1 timeout enable:timeout(9000),ch(0xfffffff8),match(1)
[   20.002976] DVB: demux1 smallsec buf disable
[   20.002980] DVB: demux1 timeout disable
[   20.002982] DVB: demux1 timeout enable:timeout(9000),ch(0xfffffff8),match(1)
[   20.353315] i2c i2c-2: dvb_meson: i2c wr failed=-6 len=3
[   20.353366] i2c i2c-2: dvb_meson: i2c rd failed=-6 len=4
[   20.353414] i2c i2c-2: dvb_meson: i2c wr failed=-6 len=3
[   20.353462] i2c i2c-2: dvb_meson: i2c rd failed=-6 len=4
[   20.353467] i2c i2c-2: dvb_meson: attach failed reading id
[   20.353582] i2c i2c-2: dvb_meson: i2c wr failed=-6 len=3
[   20.353630] i2c i2c-2: dvb_meson: i2c rd failed=-6 len=4
[   20.353678] i2c i2c-2: dvb_meson: i2c wr failed=-6 len=3
[   20.353724] i2c i2c-2: dvb_meson: i2c rd failed=-6 len=4
[   20.353729] i2c i2c-2: dvb_meson: attach failed reading id
[   20.353816] i2c i2c-2: dvb_meson: i2c wr failed=-6 len=3
[   20.353865] i2c i2c-2: dvb_meson: i2c rd failed=-6 len=4
[   20.353914] i2c i2c-2: dvb_meson: i2c wr failed=-6 len=3
[   20.353961] i2c i2c-2: dvb_meson: i2c rd failed=-6 len=4
[   20.353967] i2c i2c-2: dvb_meson: attach failed reading id

dmesg.txt (112.7 KB)

i2c

i2c-detec
i2c-2	i2c       	Meson I2C adapter               	I2C adapter
i2c-3	i2c       	Meson I2C adapter               	I2C adapter
i2c-3

i2c-3

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

sm1_s905x3_avl6762_serial_i2c3.dtb (77.2 KB)

[   29.012840] Error : -2 can't load the video/video_ucode.bin.[   29.012843] get data from fsys fail.
[   29.012846] invalid file type.
[   29.051807] Amlogic A/V streaming port init
[   29.069087] probe amlogic dvb driver [V2.02]
[   29.069186] ts0: serial
[   29.069347] ts0_control: 0x800
[   29.069354] ts0_invert: 0x0
[   29.069357] ts1: parallel
[   29.069364] ts1_control: 0x0
[   29.069368] read error:ts2_control: 0x0
[   29.069372] aml_dvb_get_adapter need register adapter first.[   29.069376] DVB: registering new adapter (amlogic-dvb)
[   29.069980] get irq num demux0_irq:50
[   29.086108] get irq num demux1_irq:68
[   29.097680] get irq num demux2_irq:69
[   29.108904] get async0_irq:70
[   29.109138] DVB: Set DMX0 TS_RECORDER_ENABLE to 0
[   29.109144] DVB: Set DMX1 TS_RECORDER_ENABLE to 0
[   29.109147] DVB: Set DMX2 TS_RECORDER_ENABLE to 0
[   29.109149] DVB: reset ASYNC FIFOs
[   29.109163] get async1_irq:71
[   29.109359] DVB: Set DMX0 TS_RECORDER_ENABLE to 0
[   29.109363] DVB: Set DMX1 TS_RECORDER_ENABLE to 0
[   29.109366] DVB: Set DMX2 TS_RECORDER_ENABLE to 0
[   29.109368] DVB: reset ASYNC FIFOs
[   29.109373] DVB:dmx_reset_dmx_hw_ex_unlock into
[   29.109414] DVB: demux0 smallsec buf disable
[   29.109417] DVB: demux0 timeout disable
[   29.109420] DVB: demux0 timeout enable:timeout(9000),ch(0xfffffff8),match(1)
[   29.109561] DVB: demux0 smallsec buf disable
[   29.109567] DVB: demux0 timeout disable
[   29.109569] DVB: demux0 timeout enable:timeout(9000),ch(0xfffffff8),match(1)
[   29.109616] DVB: demux1 smallsec buf disable
[   29.109619] DVB: demux1 timeout disable
[   29.109621] DVB: demux1 timeout enable:timeout(9000),ch(0xfffffff8),match(1)
[   29.109663] DVB: demux1 smallsec buf disable
[   29.109665] DVB: demux1 timeout disable
[   29.109668] DVB: demux1 timeout enable:timeout(9000),ch(0xfffffff8),match(1)
[   29.230317] Console: switching to colour dummy device 80x25
[   29.372319] tuner_attach_register_cb: register type 22, current num 1, modnum 1
[   29.372368] aml_attach_detach_dtvdemod: cb id 11
[   29.372421] [demod_attach_register_cb]:register type 11, current num 1, modnum 1
[   29.889532] i2c i2c-3: dvb_meson: i2c wr failed=-110 len=3
CoreELEC:~ # i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
CoreELEC:~ # i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Why You upload only part of the dmesg ? this does not make any sense. previously you posted output of i2cdetect on bus 3 which showed the demod responding, now you posted output where it is not responding. Does it magically disapeared from your device ?

I’m sorry, using SSH on the phone is a bit difficult. I noticed it after the second DTB and ran i2scan 2 or 3 times. But nothing seems connected. I’m sending the full statement.

dmesg2.txt (72.7 KB)

dmesg_debug.txt (71.9 KB)

If you use my first dtb then i2cdetect for bus 3 reports demod on addres 0x14 and if you use my second dtb then i2cdetect for bus 3 does not report anything ? Is that correct ?

CoreELEC:~ # dmesg > /storage/downloads/dmesg_debug.txt
CoreELEC:~ # i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
CoreELEC:~ # i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- 09 -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
CoreELEC:~ # i2cdetect -y 4
Error: Could not open file `/dev/i2c-4' or `/dev/i2c/4': No such file or directory
CoreELEC:~ # dmesg | grep i2c
[    1.840175] i2c /dev entries driver
[   31.717493] i2c i2c-3: dvb_meson: i2c wr failed=-110 len=3
[   32.225498] i2c i2c-3: dvb_meson: i2c rd failed=-110 len=4
[   32.737531] i2c i2c-3: dvb_meson: i2c wr failed=-110 len=3
[   33.249496] i2c i2c-3: dvb_meson: i2c rd failed=-110 len=4
[   33.249511] i2c i2c-3: dvb_meson: attach failed reading id
[   33.761476] i2c i2c-3: dvb_meson: i2c wr failed=-110 len=3
[   34.273494] i2c i2c-3: dvb_meson: i2c rd failed=-110 len=4
[   34.785494] i2c i2c-3: dvb_meson: i2c wr failed=-110 len=3
[   35.297476] i2c i2c-3: dvb_meson: i2c rd failed=-110 len=4
[   35.297498] i2c i2c-3: dvb_meson: attach failed reading id
CoreELEC:~ #

I scanned again and this is the result.

CoreELEC:~ # cat /sys/class/i2c-dev/i2c-*/name
Meson I2C adapter
Meson I2C adapter

CoreELEC:~ # ls /dev/i2c*
/dev/i2c-2 /dev/i2c-3

now 0×09, very interesting

Now adress 0x9 ?? Seems like broken hardware …
Try this, reduced i2c speed to 100kHz if that does not help then I don’t know what is going on, maybe this is not real avl6762 chip.
sm1_s905x3_avl6762_serial_i2c3_100khz.dtb (77.2 KB)

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

I tried sm1_s905x3_avl6762_serial.dtb again, and it gave me the address i2c-3 0x14. I think the tuner’s power pin dtb is the correct specification; the tuner isn’t being powered. I measured the voltage input of the avl6762 with a measuring device. I think the device is either finding it and then not finding it, or it’s giving a different address because it’s not receiving enough power.

Big Thank you for your effort

Avl6762 is a demodulator not a tuner. There is no gpio for demod power in android dtb. That does not mean there is no power pin for the demod

I know the difference between a demodulator and a tuner. Some types have translation errors. Actually, I think the i2c3 0X14 I found in the i2c file is definitely correct. The i2c address in the sm1 dts file below for kernel 5.4 is the same. I assume you added this in the dtbs you provided. The only problem is that the i2c scan sometimes doesn’t detect it or gives a different number. Something’s wrong.

https://github.com/herschel67/linux-khdas-5.4/blob/khadas-vims-5.4.y-v1.1/arch/arm/boot/dts/amlogic/sm1_s905x3_ac213.dts

dvb-extern {
		compatible = "amlogic, dvb-extern";
		dev_name = "dvb-extern";
		status = "okay";

		fe_num = <1>;
		fe0_demod = "Avl6762";
		fe0_i2c_adap_id = <&i2c3>;
		fe0_demod_i2c_addr = <0x14>;
		fe0_ts = <0>;
		fe0_reset_value = <0>;
		fe0_reset_gpio = <&gpio GPIOZ_10 GPIO_ACTIVE_HIGH>;
		fe0_ant_poweron_value = <0>;
		fe0_ant_power_gpio = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
	};

	dvb-demux {
		compatible = "amlogic, dvb-demux";
		dev_name = "dvb-demux";
		status = "okay";

		dmx = <&demux>;
		key_endia = <1>;
		add_s2p2 = <1>;
		add_ts_in = <1>;
		add_asyncfifo = <1>;

		ts0 = "serial";
		ts0_control = <0x800>;
		ts0_invert = <0>;
		pinctrl-names = "s_ts0";
		pinctrl-0 = <&dvb_s_ts0_pins>;
		clocks = <&clkc CLKID_DEMUX
		&clkc CLKID_AHB_ARB0
		&clkc CLKID_PARSER>;
		clock-names = "demux", "ahbarb0", "parser_top";
	};

dmesg_avl.txt (79.0 KB)

After much experimentation, the tuner was detected with the nightly build. But I searched with TVheadend, and then it disappeared from the list. The i2c device appears and disappears, or appears at a different address. I think the DTB you prepared is correct.

In android dtb there is reset pin defined. If the designer of your box was stupid enough to not connect a pullup resistor to it, then the reset pin could be floating and randomly resetting the chip. You could try to force this reset pin value to 1 with gpioset tool.

Tvheadent no found any channels

Loglevel debug: enabled
2025-10-27 23:54:07.980 mpegts: 546MHz in Kablo - tuning on Availink AVL6762 #0 : DVB-C #0
2025-10-27 23:54:07.980 subscription: 00F0: "epggrab" unsubscribing
2025-10-27 23:54:07.980 subscription: 00F3: "scan" subscribing to mux "546MHz", weight: 6, adapter: "Availink AVL6762 #0 : DVB-C #0", network: "Kablo", service: "Raw PID Subscription"
2025-10-27 23:54:12.980 mpegts: 546MHz in Kablo - scan no data, failed
2025-10-27 23:54:12.980 subscription: 00F3: "scan" unsubscribing
2025-10-27 23:54:12.980 mpegts: 666MHz in Kablo - tuning on Availink AVL6762 #0 : DVB-C #0
2025-10-27 23:54:12.980 subscription: 00F6: "scan" subscribing to mux "666MHz", weight: 6, adapter: "Availink AVL6762 #0 : DVB-C #0", network: "Kablo", service: "Raw PID Subscription"
2025-10-27 23:54:17.980 mpegts: 666MHz in Kablo - scan no data, failed
2025-10-27 23:54:17.980 subscription: 00F6: "scan" unsubscribing
2025-10-27 23:54:17.980 mpegts: 490MHz in Kablo - tuning on Availink AVL6762 #0 : DVB-C #0
2025-10-27 23:54:17.980 subscription: 00F9: "scan" subscribing to mux "490MHz", weight: 6, adapter: "Availink AVL6762 #0 : DVB-C #0", network: "Kablo", service: "Raw PID Subscription"