jock

Armbian for RK3288 XT-Q8L-V10 (Q8) boards

Recommended Posts

This is an unofficial Armbian variant for XT-Q8L-V10 boards, also known as Chiptrip Q8, Vsmart Q8, ENY 3288 Q8, etc...

 

screenshot.png

 

All source code is available on github as an armbian fork: https://github.com/paolosabatino/build

To compile armbian images, just follow the official instructions and select "xt-q8l-v10" board.

 

Prebuilt images:

Armbian Ubuntu Xenial 5.41 Desktop - Kernel 4.4.126 (legacy)

Armbian Ubuntu Xenial 5.41 Desktop - Kernel 4.14.39 (mainline)

Armian Debian Stretch 5.41 Server - Kernel 4.4.126 (legacy)

Armian Debian Stretch 5.41 Server - Kernel 4.14.39 (next)

 

Instructions:

  • First of all, tv boxes comes with an obsolete u-boot. To be able to fully boot from sdcard, the fastest way is to zero-fill the internal eMMC: you won't brick your box, instead it will be forced to boot in Maskrom Mode which, by default, boots from the external sdcard. rkdeveloptool may come really handy for such job. Follow the guide just below or learn some more reference: https://github.com/nolange/rk3288-guide/blob/master/bootloader.md
  • Flash the image on the sdcard, plug it in and push the power button for 1 second (or until it turns blue)
  • Wait some seconds, the led should start blinking soon (HDMI output during boot is not available yet, so just wait for the login prompt, it should be there in less than 30 seconds)
  • As usual, armbian default credentials are user: root password: 1234

 

Current status:

  • Wireless: works. pretty fast and stable, signal is strong on my box;
  • Bluetooth: works. I was able to transfer files and stream audio without problems
  • USB ports: works, with autosuspend too. A quick benchmark show that transfer rate is quite good (topped at 34 MB/s)
  • USB OTG: works in host mode, no quirks apparently. Transfer rate is very good (topped at 38 MB/s)
  • MMC: works and is perfectly accessible as storage device. I did not test booting from it yet
  • SDCard: works. legacy kernel is limited to high speed, while mainline works fine in UHS mode too. A quick benchmark with a Samsung EVO card shows the promised 48Mb/s read speed.
  • Gigabit Ethernet: seems to work fast and reliably
  • HDMI: works but may have some quirks, expecially if you attach and detach the devices. Generally works, but resolution is not configurable (see the note at the bottom)
  • Serial: works
  • Audio: HDMI audio works, but SPDIF is still a work in progress
  • IR remote: works on legacy kernel, mainline kernel still lacks the proper driver
  • Reboot/Suspend process: still some mysteries lays around here: rebooting the device via command line actually shuts it down. Suspend is still not available.
  • Hardware acceleration: everything which works for rk3288 boards applies here too. This guide may help you to gain an hardware accelerated X11 and Chromium

 

Share this post


Link to post
Share on other sites

This guide describes how to erase the internal eMMC memory. This won't brick your TV Box, instead will force it to boot from the SD Card. Also I give some steps to backup and restore the original firmware in case you want to restore the original functionality.
The tool used here is rkdeveloptool, which is opensource and is available cloning or downloading the official rockchip-linux rkbin github repository.

 

Get into rockusb mode:

Getting into rockusb mode is essential to do anything else

 

1) plug the power cord inside the device

2) push the Reset button and keep it pushed while plugging the USB cable into the OTG port

3) check if the device is connected, use lsusb:

lsusb

Bus 001 Device 005: ID 058f:6377 Alcor Micro Corp. AU6375 4-LUN card reader
Bus 001 Device 003: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Bus 001 Device 029: ID 2207:320a  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
Bus 002 Device 005: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 002 Device 002: ID 046d:c312 Logitech, Inc. DeLuxe 250 Keyboard
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

you should be able to see a device with ID 2207:320a. If so, you are in rockusb mode and can jump to Backup, Restore or erase eMMC paragraphs below

 

Erase the eMMC:

To completely erase the eMMC card just run

./rkdeveloptool ef

it will take around a minute, then the flash memory will be completely erased and your box will boot from the sdcard

 

Backup:

First we determine the size of the eMMC flash memory

./rkdeveloptool rfi

Flash Info:
	Manufacturer: SAMSUNG, value=00
	Flash Size: 7393 MB
	Block Size: 512 KB
	Page Size: 2 KB
	ECC Bits: 0
	Access Time: 40
	Flash CS: Flash<0> 

in my case the size of the memory is 7393 Megabytes, so you can the command to retrieve the data:

./rkdeveloptool rl 0x0 $((7393 * 2048)) backup.data

this will download the original firmware in backup.data file in less than five minutes.


Restore the original firmware:

First we have to restore the original bootloader. Running these commands will do the job:

./rkdeveloptool db ../rk32/rk3288_ubootloader_v1.01.06.bin
Downloading bootloader succeeded.

./rkdeveloptool ul ../rk32/rk3288_ubootloader_v1.01.06.bin
Upgrading loader succeeded.

./rkdeveloptool wl 0x0 backup.data
Write LBA from file (100%)


 

Share this post


Link to post
Share on other sites
21 minutes ago, pro777 said:

jock, thanks for the excellent work!

It is necessary to make efforts for official support in armbian!

 

Thanks pro, it would be really nice to have official support for these boards, they look pretty polished and really rock-solid to me and the SoC is quite amazing

Share this post


Link to post
Share on other sites

hi, jock,

 

please consider the following additions and corrections to dts:

 

disable i2c5 to get rid of kernel messages like "0xff170000 timeout ..." 

&i2c5 {
	status = "disabled";
};

 

as a result of the previous editing, change the value of the property of ddc-i2c-bus to i2c4

&hdmi {	
	ddc-i2c-bus = <&i2c4>;
	#sound-dai-cells = <0>;
	status = "okay";
};

 

maybe you forgot, add, please, the element 'dr_mode = "host";' in the node '&usb_otg', so that OTG will work as a usb-host

&usb_otg {
    dr_mode = "host";
    vusb_d-supply = <&vcc_otg_5v>;
    vusb_a-supply = <&vcc_otg_5v>;
    status = "okay";
};

 

it's worth adding clocks to i2s

&i2s {
	#sound-dai-cells = <0>;
	clock-names = "i2s_hclk", "i2s_clk", "i2s_clk_out";
	clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>, <&cru SCLK_I2S0_OUT>;
	status = "okay";
};

 

It is better to add parts for RK1000, it is also desirable to add to the kernel drivers for it (CONFIG_MFD_RK1000, CONFIG_DRM_RK1000, CONFIG_SND_SOC_RK1000)

&i2c4 {
	status = "okay";
	rk1000_ctl: rk1000-ctl@40 {
		compatible = "rockchip,rk1000-ctl";
		reg = <0x40>;
		reset-gpios = <&gpio7 21 GPIO_ACTIVE_LOW>;
		clocks = <&cru SCLK_I2S0_OUT>;
		clock-names = "mclk";
		status = "okay";
	};

	rk1000-tve@42 {
		status = "okay";
		compatible = "rockchip,rk1000-tve";
		reg = <0x42>;
		rockchip,data-width = <24>;
		rockchip,output = "rgb";
		rockchip,ctl = <&rk1000_ctl>;
		#address-cells = <1>;
		#size-cells = <0>;
	};

	rk1000_codec: rk1000-codec@60 {
		compatible = "rockchip,rk1000-codec";
		reg = <0x60>;
		#sound-dai-cells = <0>;
		rockchip,spk-en-gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
		rockchip,pa-en-time-ms = <5000>;
		rockchip,ctl = <&rk1000_ctl>;
		status = "okay";
	};	
};

 

replace, please,  ir-keys table

	ir_key1 {
		rockchip,usercode = <0x1dcc>;
		rockchip,key_table = 
			<0xff KEY_POWER>, 
			<0xea KEY_PLAYPAUSE>,
			<0xe9 KEY_STOP>,
			<0xf9 KEY_PREVIOUSSONG>,
			<0xf5 KEY_NEXTSONG>,
			<0xbe KEY_1>,
			<0xba KEY_2>,
			<0xb2 KEY_3>,
			<0xbd KEY_4>,
			<0xb9 KEY_5>,
			<0xb1 KEY_6>,
			<0xbc KEY_7>,
			<0xb8 KEY_8>,
			<0xb0 KEY_9>,
			<0xb6 KEY_0>,
			<0xb5 KEY_BACKSPACE>,
			<0xb7 KEY_F6>,
			<0xfc KEY_HOME>,
			<0xf0 KEY_BACK>,
			<0xbf KEY_MENU>,
			<0xb3 KEY_TEXT>,
			<0xef KEY_LEFT>,
			<0xed KEY_RIGHT>,
			<0xbb KEY_DOWN>,
			<0xf8 KEY_UP>,
			<0xee KEY_ENTER>,
			<0xfd KEY_VOLUMEDOWN>,
			<0xf3 KEY_MUTE>,
			<0xf1 KEY_VOLUMEUP>,
			<0xfe KEY_F1>,
			<0xfa KEY_F2>,
			<0xf6 KEY_F3>,
			<0xf2 KEY_F4>;
	};

 

It is also desirable to rename the soundcard in node 'soundcard-hdmi'

simple-audio-card,name = "DW-I2S-HDMI";

 

I updated the firmware for Debian for SD-card. I made it possible to run MPV with hardware decoding h264, h265, according to the message of JMCC. Here is used DHD wi-fi driver. In my opinion, it works at a higher speed than brcmfmac. And with the reboot there seems to be all right.

 

Update:

I also noticed that when the OTG cable is connected to the computer, Armbian Ubuntu begun rebooted after selecting the reboot command from the menu.

Edited by pro777

Share this post


Link to post
Share on other sites

Thanks for the corrections to the device tree. I integrated most of them into the dts and I will publish them as soon as possible. At the moment I'm having problems compiling a working kernel because of some recent changes to the rockchip codebase which are producing non-booting kernels and I can't verify if everything is in place :/

 

I'm a little confused about the i2c5 bus, which is working pretty fine to me. I don't get any timeout message in dmesg and there shouldn't be any: all the rk3288 boards I viewed so far use the i2c5 bus for the HDMI DDC feature.

Maybe you are having issues with your monitor due to some misconfiguration or malfunction of that? In which case I'm not sure changing i2c5 to i2c4 is a good idea for two reasons. The i2c4 bus currently hosts the rk1000 on some addresses, and also I think the DDC feature is hardwired to the i2c5 bus and we, in the device tree, are just informing the linux driver of that.

Does it work changing i2c5 to i2c4 for you, or you just don't get the timeout messages?

 

About the OTG cable, you should not use it anymore, I finally found the power hold GPIO which keeps the act8846 powering the board. Nonetheless I noticed the same behaviour you describe: reboot does not work but if I keep the OTG cable connected to the computer reboot works.

 

 

 

 

 

Share this post


Link to post
Share on other sites
On 5/22/2018 at 10:54 PM, jock said:

Does it work changing i2c5 to i2c4 for you, or you just don't get the timeout messages?

Yes, indeed, I just got rid of the timeout messages in this way.

 

At me here such board:

20160128_134229.thumb.jpg.3cea21e9470de6f6501c5c825d80b315.jpg

 

If i2c5 is enabled and indicated to read the ddc information from it, i.e.:

Conf.1

&hdmi {
	/delete-property/pinctrl-names;
	/delete-property/pinctrl-0;
	/delete-property/pinctrl-1;	
	ddc-i2c-bus = <&i2c5>;
	#sound-dai-cells = <0>;
	status = "okay";
};

&i2c5 {
	status = "okay";
};

then the following information is received:

user@armbian:~$ ls -l /dev/i2c*
crw-rw---- 1 root i2c 89, 0 May 25 14:37 /dev/i2c-0
crw-rw---- 1 root i2c 89, 1 May 25 14:37 /dev/i2c-1
crw-rw---- 1 root i2c 89, 2 May 25 14:37 /dev/i2c-2
crw-rw---- 1 root i2c 89, 3 May 25 14:37 /dev/i2c-3
crw-rw---- 1 root i2c 89, 4 May 25 14:37 /dev/i2c-4
crw-rw---- 1 root i2c 89, 5 May 25 14:37 /dev/i2c-5
user@armbian:~$ sudo i2cdetect -y 5
[sudo] password for user: 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
user@armbian:~$ sudo get-edid -b 5
[sudo] password for user: 
5
This is read-edid version 3.0.2. Prepare for some fun.
Attempting to use i2c interface
Only trying 5 as per your request.
^C

DDC information can be obtained via i2c at ports 0x37 (DDC) and 0x50 (EDID).

We see that there are no contacts on i2c5 on these ports.

We change dts:

Conf.2

&hdmi {
	/delete-property/pinctrl-names;
	/delete-property/pinctrl-0;
	/delete-property/pinctrl-1;	
	ddc-i2c-bus = <&i2c4>;
	#sound-dai-cells = <0>;
	status = "okay";
};

&i2c5 {
	status = "disabled";
};

We get:

user@armbian:~$ ls -l /dev/i2c*
crw-rw---- 1 root i2c 89, 0 May 25 14:47 /dev/i2c-0
crw-rw---- 1 root i2c 89, 1 May 25 14:47 /dev/i2c-1
crw-rw---- 1 root i2c 89, 2 May 25 14:47 /dev/i2c-2
crw-rw---- 1 root i2c 89, 3 May 25 14:47 /dev/i2c-3
crw-rw---- 1 root i2c 89, 4 May 25 14:47 /dev/i2c-4
user@armbian:~$ sudo i2cdetect -y 4
[sudo] password for user: 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: UU -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
user@armbian:~$ sudo get-edid -b 4
4
This is read-edid version 3.0.2. Prepare for some fun.
Attempting to use i2c interface
Only trying 4 as per your request.
Bus 4 doesn't really have an EDID...
Couldn't find an accessible EDID on this bus.
I'm sorry nothing was successful. Maybe try some other arguments
if you played with them, or send an email to Matthew Kern <pyrophobicman@gmail.com>.

As you can see, on i2c4 on ports 0x37 and 0x50 there is also no contact.

We check the following configuration:

Conf.3

&hdmi {
	/delete-property/pinctrl-names;
	/delete-property/pinctrl-0;
	/delete-property/pinctrl-1;	
	//ddc-i2c-bus = <&i2c4>;
	#sound-dai-cells = <0>;
	status = "okay";
};

&i2c5 {
	status = "disabled";
};

We get:

user@armbian:~$ ls -l /dev/i2c*
crw-rw---- 1 root i2c 89, 0 May 25 14:51 /dev/i2c-0
crw-rw---- 1 root i2c 89, 1 May 25 14:51 /dev/i2c-1
crw-rw---- 1 root i2c 89, 2 May 25 14:51 /dev/i2c-2
crw-rw---- 1 root i2c 89, 3 May 25 14:51 /dev/i2c-3
crw-rw---- 1 root i2c 89, 4 May 25 14:51 /dev/i2c-4
crw-rw---- 1 root i2c 89, 6 May 25 14:51 /dev/i2c-6
user@armbian:~$ sudo i2cdetect -y 6
[sudo] password for user: 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: 30 31 32 33 34 35 36 37 -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
user@armbian:~$ sudo get-edid -b 6
6
This is read-edid version 3.0.2. Prepare for some fun.
Attempting to use i2c interface
Only trying 6 as per your request.
Bus 6 doesn't really have an EDID...
Couldn't find an accessible EDID on this bus.
I'm sorry nothing was successful. Maybe try some other arguments
if you played with them, or send an email to Matthew Kern <pyrophobicman@gmail.com>.

Strangely enough, in the system has appeared i2c6 to the address 0xff980000 (HDMI) :)
And also there are contacts on the ports of interest!

But it is impossible to obtain EDID information.

 

I also have the MK809-4K on RK3288 chip. I drew attention to the fact that it initially selects the correct mode of HDMI for 1920x1080. Therefore, I also checked the configuration # 3 on it. And it was possible to successfully read the EDID:

user@armbian:~$ ls -l /dev/i2c*
crw-rw---- 1 root i2c 89, 0 May 25 11:10 /dev/i2c-0
crw-rw---- 1 root i2c 89, 1 May 25 11:10 /dev/i2c-1
crw-rw---- 1 root i2c 89, 2 May 25 11:10 /dev/i2c-2
crw-rw---- 1 root i2c 89, 4 May 25 11:10 /dev/i2c-4
crw-rw---- 1 root i2c 89, 6 May 25 11:10 /dev/i2c-6

user@armbian:~$ sudo i2cdetect -y 6
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: 30 -- -- -- -- -- -- 37 -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

user@armbian:~$ sudo get-edid -b 6 > edid.bin
[sudo] пароль для user: 
6
This is read-edid version 3.0.2. Prepare for some fun.
Attempting to use i2c interface
Only trying 6 as per your request.
256-byte EDID successfully retrieved from i2c bus 6
Looks like i2c was successful. Have a good day.

user@armbian:~$ parse-edid < edid.bin
Checksum Correct

Section "Monitor"
	Identifier "SAMSUNG"
	ModelName "SAMSUNG"
	VendorName "SAM"
	# Monitor Manufactured week 46 of 2012
	# EDID version 1.3
	# Digital Display
	DisplaySize 480 270
	Gamma 2.20
	Option "DPMS" "false"
	Horizsync 15-81
	VertRefresh 24-75
	# Maximum pixel clock is 230MHz
	#Not giving standard mode: 1152x864, 75Hz
	#Not giving standard mode: 1280x720, 60Hz
	#Not giving standard mode: 1280x800, 60Hz
	#Not giving standard mode: 1280x1024, 60Hz
	#Not giving standard mode: 1440x900, 60Hz
	#Not giving standard mode: 1600x900, 60Hz
	#Not giving standard mode: 1680x1050, 60Hz

	#Extension block found. Parsing...
	Modeline 	"Mode 15" 74.25 1920 2448 2492 2640 540 542 547 562 +hsync +vsync interlace
	Modeline 	"Mode 0" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
	Modeline 	"Mode 1" 85.50 1366 1436 1579 1792 768 771 774 798 +hsync +vsync 
	Modeline 	"Mode 2" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
	Modeline 	"Mode 3" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
	Modeline 	"Mode 4" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync
	Modeline 	"Mode 5" 74.250 1280 1720 1760 1980 720 725 730 750 +hsync +vsync
	Modeline 	"Mode 6" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace
	Modeline 	"Mode 7" 74.250 1920 2448 2492 2640 1080 1082 1089 1125 +hsync +vsync interlace
	Modeline 	"Mode 8" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
	Modeline 	"Mode 9" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync
	Modeline 	"Mode 10" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
	Modeline 	"Mode 11" 74.250 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
	Modeline 	"Mode 12" 74.250 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
	Modeline 	"Mode 13" 27.027 1440 1478 1602 1716 480 484 487 525 -hsync -vsync interlace
	Modeline 	"Mode 14" 27.000 1440 1464 1590 1728 576 578 581 625 -hsync -vsync interlace
	Modeline 	"Mode 16" 74.25 1920 2008 2052 2200 540 542 547 562 +hsync +vsync interlace
	Modeline 	"Mode 17" 74.25 1280 1720 1760 1980 720 725 730 750 +hsync +vsync 
	Modeline 	"Mode 18" 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync 
	Option "PreferredMode" "Mode 15"
EndSection

Let's sum up. Configuration # 3 allows us to successfully obtain the EDID information on the MK809-4K. Failure in the case of Q8 can speak of a hardware problem?

 

P.S. jock, tell me, please, what code allows "power hold GPIO which keeps the act8846 powering the board"?

Share this post


Link to post
Share on other sites

I guess there is something wrong with the i2c driver. This is the output I can gather using the armbian image with 4.4.126 kernel:

 

root@xt:/home/paolo# dmesg | grep i2c
[    2.876359] i2c /dev entries driver
[    2.877897] of_get_named_gpiod_flags: can't parse 'vsel-gpios' property of node '/i2c@ff650000/syr827@40[0]'
[    2.877913] of_get_named_gpiod_flags: can't parse 'vsel-gpio' property of node '/i2c@ff650000/syr827@40[0]'
[    2.881312] of_get_named_gpiod_flags: can't parse 'vsel-gpios' property of node '/i2c@ff650000/syr828@41[0]'
[    2.881328] of_get_named_gpiod_flags: can't parse 'vsel-gpio' property of node '/i2c@ff650000/syr828@41[0]'
[    2.908968] rk3x-i2c ff650000.i2c: Initialized RK3xxx I2C bus at f0fba000
[    2.910075] rk3x-i2c ff140000.i2c: Initialized RK3xxx I2C bus at f0fbc000
[    2.911169] rk3x-i2c ff160000.i2c: Initialized RK3xxx I2C bus at f0fbe000
[    2.912242] rk3x-i2c ff170000.i2c: Initialized RK3xxx I2C bus at f0fd2000
[    2.913370] rk3x-i2c ff660000.i2c: Initialized RK3xxx I2C bus at f0fd4000
[    8.226809] i2c i2c-6: Added multiplexed i2c bus 7
[    8.228102] i2c i2c-6: Added multiplexed i2c bus 8

 

root@xt:/home/paolo# i2cdetect -y 5
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- 37 -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- 4a 4b -- -- -- -- 
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                        
root@xt:/home/paolo# get-edid -b 5 | parse-edid 
5
This is read-edid version 3.0.2. Prepare for some fun.
Attempting to use i2c interface
Only trying 5 as per your request.
256-byte EDID successfully retrieved from i2c bus 5
Looks like i2c was successful. Have a good day.
Checksum Correct

Section "Monitor"
	Identifier "PL2390"
	ModelName "PL2390"
	VendorName "IVM"
	# Monitor Manufactured week 6 of 2016
	# EDID version 1.3
	# Digital Display
	DisplaySize 510 290
	Gamma 2.20
	Option "DPMS" "true"
	Horizsync 30-83
	VertRefresh 55-76
	# Maximum pixel clock is 170MHz
	#Not giving standard mode: 1920x1080, 60Hz
	#Not giving standard mode: 1280x1024, 60Hz
	#Not giving standard mode: 1440x900, 60Hz
	#Not giving standard mode: 1680x1050, 60Hz
	#Not giving standard mode: 1280x960, 60Hz
	#Not giving standard mode: 1152x864, 75Hz
	#Not giving standard mode: 1440x900, 75Hz

	#Extension block found. Parsing...
	Modeline 	"Mode 13" 27.00 720 736 798 858 480 489 495 525 -hsync -vsync 
	Modeline 	"Mode 0" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
	Modeline 	"Mode 1" 25.200 640 656 752 800 480 490 492 525 -hsync -vsync
	Modeline 	"Mode 2" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
	Modeline 	"Mode 3" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
	Modeline 	"Mode 4" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync
	Modeline 	"Mode 5" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace
	Modeline 	"Mode 6" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
	Modeline 	"Mode 7" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync
	Modeline 	"Mode 8" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync
	Modeline 	"Mode 9" 74.250 1280 1720 1760 1980 720 725 730 750 +hsync +vsync
	Modeline 	"Mode 10" 74.250 1920 2448 2492 2640 1080 1082 1089 1125 +hsync +vsync interlace
	Modeline 	"Mode 11" 54.000 1440 1464 1592 1728 576 581 586 625 -hsync -vsync
	Modeline 	"Mode 12" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
	Modeline 	"Mode 14" 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync 
	Modeline 	"Mode 15" 27.00 720 732 796 864 576 581 586 625 -hsync -vsync 
	Option "PreferredMode" "Mode 13"
EndSection

So EDID works fine on my box using i2c5. I get devices at addresses 37 and 50 as you described and get-edit tool works fine. Also data is correctly reported (display name, modelines, etc...)

 

The i2c6 bus appearing in your test can be probably explained taking a look to the kernel documentation. I found this in the device tree documentation:

Quote

- ddc-i2c-bus: The HDMI DDC bus can be connected to either a system I2C master
  or the functionally-reduced I2C master contained in the DWC HDMI. When
  connected to a system I2C master this property contains a phandle to that
  I2C master controller.

so that bus is directly embedded into the HDMI controller and spawns up when there is not a master i2c bus for EDID, which is what you did removing the line from the device tree. From what I understand, that works but is suboptimal. To satisfy my curiosity I will try swapping the buses to see what happens. In the meantime you may do tests with another HDMI cable, it is quite common that faulty or cheap cables causes many kinds of issues (HDMI CEC not working or working intermittently for example...)

 

Quote

P.S. jock, tell me, please, what code allows "power hold GPIO which keeps the act8846 powering the board"?

 

Check the u-boot device tree for &pinctrl section. You'll find these lines:

&pinctrl {

        u-boot,dm-pre-reloc;

        pinctrl-names = "default";
        pinctrl-0 = <&power_led>, <&pwr_hold>;

        ...
          
        act8846 {       
                
                /*
                 * Original q8 device tree says:
                 *  - gpio0 11 HIGH -> power hold
                 *  - gpio7 1 LOW -> possibly pmic-vsel, we omit it here
                 */
                /*pmic_vsel: pmic-vsel {
                        rockchip,pins = <7 1 RK_FUNC_GPIO &pcfg_output_low>;
                };*/

                pwr_hold: pwr-hold {
                        rockchip,pins = <0 11 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
  
		...         
  
};

This way u-boot is instructed to turn the power led GPIO active and the power hold GPIO (which is pin 11 of bank 0) active at boot.

IMG_20180525_212511.jpg

 

edit: I made some tests with other i2c buses, nothing did work, only i2c5 is able to retrieve a valid EDID to me

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now