Add 3d support for HDMI and eDP displays in khadas Edge-V

Hello,

I am working on Android TV. So, I am exploring the two displays namely HDMI & eDP and my project also includes the support of 3d for both the displays.

Does anyone have any idea regarding this stuff?

I can give you guidance in this respect. What is your eDP resolution?
1)EDP(vopb) + HDMI(vopl)
2)HDMI(vopb) + EDP(vopl)
Which configuration do you want to choose?

Note: The RK3399 platform has two VOPs: vopb (Supports 4K), and vopl (Supports 2K)

My display configuration:

  1. eDP (1080p) + HDMI (1080p)

Replace this file: kernel/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-android.dts

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
 */

/dts-v1/;

#include "rk3399-khadas-edge.dtsi"
#include <dt-bindings/sensor-dev.h>
#include <dt-bindings/input/input.h>

/ {
	model = "Khadas Board";
	compatible = "Khadas,edge", "Khadas,edge-io", "rockchip,rk3399";
	chosen {
	bootargs = "earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1 console=ttyFIQ0 androidboot.baseband=N/A androidboot.veritymode=enforcing androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init initrd=0x62000001,0x00800000 coherent_pool=1m";
	};
    khadas-matrix-keypad {
		status = "okay";
		compatible = "khadas-matrix-keypad";
		row_col_gpio =
				<&gpio0 10 GPIO_ACTIVE_HIGH>,
				<&gpio0 11 GPIO_ACTIVE_HIGH>,
				<&gpio0 12 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&matrix_gpio>;
		debounce-delay-ms = <10>;
		col-scan-delay-us = <10>;
		linux,no-autorepeat;
	};


	edp_panel: edp-panel {
                compatible = "panel-simple";
		backlight = <&backlight>;
                bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
		power-supply = <&vcc3v3_s0>;
	        reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>; /* GPIO4_D4 */
	        enable-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; /* GPIO4_D5 */
		prepare-delay-ms = <20>;
		enable-delay-ms = <20>;		
		ports {
			panel_in_edp: endpoint {
		      	remote-endpoint = <&edp_out_panel>;
	      		};
		};
		display-timings {
			native-mode = <&timing0>;

			timing0: timing0 {
				clock-frequency = <148500000>;
				hactive = <1920>;
				vactive = <1080>;
				hfront-porch = <148>;
				hsync-len = <44>;
				hback-porch = <528>;
				vfront-porch = <4>;
				vsync-len = <5>;
				vback-porch = <36>;
				hsync-active = <0>;
				vsync-active = <0>;
				de-active = <0>;
				pixelclk-active = <0>;
			};
		};
	};


	rt5651-sound {
		status = "okay";
		compatible = "simple-audio-card";

		pinctrl-names = "default";
		pinctrl-0 = <&rt5651_hpdet>;


		simple-audio-card,format = "i2s";
		simple-audio-card,name = "realtek,rt5651-codec";
		simple-audio-card,mclk-fs = <256>;
		simple-audio-card,hp-det-gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
		simple-audio-card,widgets =
			"Microphone", "Mic Jack",
			"Headphone", "Headphone Jack";
		simple-audio-card,routing =
			"Mic Jack", "MICBIAS1",
			"IN1P", "Mic Jack",
			"Headphone Jack", "HPOL",
			"Headphone Jack", "HPOR";
		simple-audio-card,cpu {
			sound-dai = <&i2s1>;
		};
		simple-audio-card,codec {
			sound-dai = <&rt5651>;
		};
	};
};
&firmware_android {
       compatible = "android,firmware";
       boot_devices = "fe330000.sdhci";
       vbmeta {
               compatible = "android,vbmeta";
               parts = "vbmeta,boot,system,vendor,dtbo";
       };
       fstab {
               compatible = "android,fstab";
               vendor {
                       compatible = "android,vendor";
                       dev = "/dev/block/by-name/vendor";
                       type = "ext4";
                       mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
                       fsmgr_flags = "wait,avb";
		};
	};
};

&fusb0 {
	status = "okay";
	max-input-voltage = <13000000>;
	max-input-current = <6000000>;
	charge-dev = <&bq25703>;
};

&fusb1 {
	status = "okay";
	max-input-voltage = <13000000>;
	max-input-current = <6000000>;
	charge-dev = <&bq25703>;
};

&i2s1 {
	status = "okay";
	rockchip,i2s-broken-burst-len;
	rockchip,playback-channels = <2>;
	rockchip,capture-channels = <2>;
	#sound-dai-cells = <0>;
};

&isp0_mmu {
	status = "okay";
};

&isp0 {
	status = "disabled";
};

&isp1_mmu {
	status = "okay";
};

&isp1 {
	status = "disabled";
};

&i2c1 {
	status = "okay";
	i2c-scl-rising-time-ns = <300>;
	i2c-scl-falling-time-ns = <15>;

	rt5651: rt5651@1a {
		#sound-dai-cells = <0>;
		compatible = "rockchip,rt5651";
		reg = <0x1a>;
		clocks = <&cru SCLK_I2S_8CH_OUT>;
		clock-names = "mclk";
		pinctrl-names = "default";
		pinctrl-0 = <&i2s_8ch_mclk>;
		status = "okay";
	};
};

&i2c6 {
	status = "okay";

	vm149c: vm149c@0c {
		compatible = "silicon touch,vm149c";
		status = "okay";
		reg = <0x0c>;
		rockchip,camera-module-index = <0>;
		rockchip,camera-module-facing = "back";
	};
	
	imx214b: imx214b@10 {
		compatible = "sony,imx214";
		status = "okay";
		reg = <0x10>;
		clocks = <&cru SCLK_CIF_OUT>;
		clock-names = "xvclk";
		/* avdd-supply = <>; */
		/* dvdd-supply = <>; */
		/* dovdd-supply = <>; */
		/* reset-gpios = <>; */
		pwdn-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "rockchip,camera_default";
		pinctrl-0 = <&cif_clkout>;
		rockchip,camera-module-index = <0>;
		rockchip,camera-module-facing = "back";
		rockchip,camera-module-name = "YG9626-S600Y7-C";
		rockchip,camera-module-lens-name = "LG-50013A7";
		lens-focus = <&vm149c>;
		port {
			ucam_out0: endpoint {
				remote-endpoint = <&mipi_in_ucam0>;
				//remote-endpoint = <&mipi_in_ucam1>;
				data-lanes = <1 2>;
			};
		};
	};	

	vm149c_front: vm149c_front@0c {
		compatible = "silicon touch,vm149c";
		status = "okay";
		reg = <0x0c>;
		rockchip,camera-module-index = <1>;
		rockchip,camera-module-facing = "front";		
	};
	
	imx214f: imx214f@10 {
		compatible = "sony,imx214";
		status = "okay";
		reg = <0x10>;
		clocks = <&cru SCLK_CIF_OUT>;
		clock-names = "xvclk";
		/* avdd-supply = <>; */
		/* dvdd-supply = <>; */
		/* dovdd-supply = <>; */
		/* reset-gpios = <>; */
		pwdn-gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "rockchip,camera_default";
		pinctrl-0 = <&cif_clkout>;
		rockchip,camera-module-index = <1>;
		rockchip,camera-module-facing = "front";
		rockchip,camera-module-name = "YG9626-S600Y7-C";
		rockchip,camera-module-lens-name = "LG-50013A7";
		lens-focus = <&vm149c_front>;
		port {
			ucam_out1: endpoint {
				//remote-endpoint = <&mipi_in_ucam0>;
				remote-endpoint = <&mipi_in_ucam1>;
				data-lanes = <1 2>;
			};
		};
	};	
};

&i2c7 {
	status = "okay";

	icm20602_acc: icm_acc@68 {
		compatible = "icm20602_acc";
		reg = <0x68>;
		irq-gpio = <&gpio0 8 IRQ_TYPE_LEVEL_LOW>; /* GPIO0_B0 */
		irq_enable = <0>;
		poll_delay_ms = <30>;
		type = <SENSOR_TYPE_ACCEL>;
		layout = <9>;
	};

	icm20602_gyro: icm_gyro@68 {
		compatible = "icm20602_gyro";
		reg = <0x68>;
		irq_enable = <0>;
		poll_delay_ms = <30>;
		type = <SENSOR_TYPE_GYROSCOPE>;
		layout = <7>;
	};
};

&i2c8 {
	status = "okay";
	i2c-scl-rising-time-ns = <600>;
	i2c-scl-falling-time-ns = <20>;

	apds9960@39 {
		compatible = "avago,apds9960";
		reg = <0x39>;
		interrupt-parent = <&gpio3>;
		interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
		led-r-gpio = <&gpio4 24 GPIO_ACTIVE_HIGH>;		
		pinctrl-names = "default";
		pinctrl-0 = <&apds_int_l>;
	};

	bq25703: bq25703@6b {
		compatible = "ti,bq25703";
		reg = <0x6b>;
		extcon = <&fusb0>, <&fusb1>;
		interrupt-parent = <&gpio1>;
		interrupts = <RK_PC7 IRQ_TYPE_LEVEL_LOW>; /* GPIO1_C7 */
		pinctrl-names = "default";
		pinctrl-0 = <&charger_ok>;
		ti,charge-current = <1500000>;
		ti,max-charge-voltage = <8500000>;
		ti,max-input-voltage = <20000000>;
		ti,max-input-current = <6000000>;
		ti,input-current-sdp = <500000>;
		ti,input-current-dcp = <2000000>;
		ti,input-current-cdp = <2000000>;
		ti,input-current-dc = <2000000>;
		ti,minimum-sys-voltage = <7400000>;
		ti,otg-voltage = <5000000>;
		ti,otg-current = <500000>;
		ti,input-current = <500000>;
		pd-charge-only = <0>;
		status = "okay";
	};

	cw2013: cw2013@62 {
		status = "okay";
		compatible = "cw201x";
		reg = <0x62>;
		bat_config_info = <0x15 0x7F 0x6E 0x66 0x65 0x5C 0x5B 0x59
				0x58 0x57 0x57 0x54 0x53 0x51 0x4B 0x48
				0x40 0x33 0x2A 0x26 0x23 0x25 0x2A 0x34
				0x45 0x4F 0x0C 0xCD 0x44 0x68 0x67 0x68
				0x6E 0x6F 0x6C 0x68 0x3A 0x10 0x8A 0x01
				0x01 0x54 0x52 0x87 0x8F 0x91 0x94 0x52
				0x82 0x8C 0x92 0x96 0x82 0xFF 0xFF 0xCB
				0x2F 0x7D 0x64 0xA5 0xB5 0x13 0x58 0x09>;
		monitor_sec = <5>;
		virtual_power = <0>;
		divider_res1 = <200>;
		divider_res2 = <200>;
		dc_det_gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
	};
};

&rk_key {
	enter-key {
		linux,code = <232>;
		label = "enter";
		rockchip,adc_value = <170>;
	};
};


&pwm3 {
	status = "okay";

	interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
	compatible = "rockchip,remotectl-pwm";
	remote_pwm_id = <3>;
	handle_cpu_id = <1>;
	remote_support_psci = <1>;
	pinctrl-names = "default";
	pinctrl-0 = <&pwm3b_pin>;

	ir_key1 {
		rockchip,usercode = <0xff00>;
		rockchip,key_table =
			<0xeb   KEY_POWER>,
			<0xec   KEY_MENU>,
			<0xfc   KEY_UP>,
			<0xfd   KEY_DOWN>,
			<0xf1   KEY_LEFT>,
			<0xe5   KEY_RIGHT>,
			<0xf8   232>,
			<0xa7   KEY_VOLUMEDOWN>,
			<0xa3    388>,  //mouse func
			<0xa4    388>,  //mouse func
			<0xf4   KEY_VOLUMEUP>,
			<0xfe   KEY_BACK>,
			<0xb7   KEY_HOME>;

	};

};

&backlight {
	pwms = <&pwm1 0 25000 0>;
	status = "okay";
};


&pwm1 {
	status = "okay";
};

&cdn_dp {
	status = "disabled";
};

&dp_in_vopl {
	status = "disabled";
};

&dp_in_vopb {
	status = "disabled";
};

&hdmi_in_vopl {
	status = "okay";
};

&hdmi_in_vopb {
	status = "disabled";
};

&route_hdmi {
	status = "okay";
	connect = <&vopl_out_hdmi>;
};

&vopb {
	status = "okay";
	assigned-clocks = <&cru DCLK_VOP0_DIV>;
	assigned-clock-parents = <&cru PLL_CPLL>;
};

&vopl {
	status = "okay";
	assigned-clocks = <&cru DCLK_VOP1_DIV>;
	assigned-clock-parents = <&cru PLL_VPLL>;
};
&route_edp {
	status = "okay";
	connect = <&vopb_out_edp>;
};

&edp_in_vopl {
	status = "disabled";
};

&edp_in_vopb {
	status = "okay";
};

&edp {
	force-hpd;
	status = "okay";
	ports {
		edp_out: port@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
			edp_out_panel: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&panel_in_edp>;
			};
		};
	};
};

&pinctrl {
	matrix {
		matrix_gpio: matrix_gpio {
			rockchip,pins =
				<0 10 RK_FUNC_GPIO &pcfg_pull_up>,
				<0 11 RK_FUNC_GPIO &pcfg_pull_up>,
				<0 12 RK_FUNC_GPIO &pcfg_pull_up>;
		};
	};

	apds_int_l: apds-int-l {
		rockchip,pins = <3 10 RK_FUNC_GPIO &pcfg_pull_up>;
	};

	charger {
		charger_ok: charge-ok {
			rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>; /* GPIO1_C7 */
		};
	};

	rt5651 {
		rt5651_hpdet: rt5651-hpdet {
			rockchip,pins = <1 0 RK_FUNC_GPIO &pcfg_pull_up>; /* GPIO1_A0 */
		};
	};
};

&mipi_dphy_rx0 {
	status = "okay";

	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;

			mipi_in_ucam0: endpoint@1 {
				reg = <1>;
				remote-endpoint = <&ucam_out0>;
				data-lanes = <1 2>;
			};
		};

		port@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;

			dphy_rx0_out: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&isp0_mipi_in>;
			};
		};
	};
};

&rkisp1_0 {
	status = "okay";

	port {
		#address-cells = <1>;
		#size-cells = <0>;

		isp0_mipi_in: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&dphy_rx0_out>;
		};
	};
};

&mipi_dphy_tx1rx1 {
	status = "okay";

	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;

			mipi_in_ucam1: endpoint@1 {
				reg = <1>;
				remote-endpoint = <&ucam_out1>;
				data-lanes = <1 2>;
			};
		};

		port@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;

			dphy_tx1rx1_out: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&isp1_mipi_in>;
			};
		};
	};
};

&rkisp1_1 {
	status = "okay";

	port {
		#address-cells = <1>;
		#size-cells = <0>;

		isp1_mipi_in: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&dphy_tx1rx1_out>;
		};
	};
};
  • Among the following parameters, you need to adjust the parameters of your EDP screen
		display-timings {
			native-mode = <&timing0>;

			timing0: timing0 {
				clock-frequency = <148500000>;
				hactive = <1920>;
				vactive = <1080>;
				hfront-porch = <148>;
				hsync-len = <44>;
				hback-porch = <528>;
				vfront-porch = <4>;
				vsync-len = <5>;
				vback-porch = <36>;
				hsync-active = <0>;
				vsync-active = <0>;
				de-active = <0>;
				pixelclk-active = <0>;
			};
		};

device/rockchip/rk3399/rk3399.mk

PRODUCT_PROPERTY_OVERRIDES += \
	persist.hdmi.ui.state=2 \
	persist.sys.rotation.einit=3 \
-    vendor.hwc.device.primary=HDMI-A,DP\
-	vendor.hwc.device.extend=DSI
+    vendor.hwc.device.primary=eDP \
+	vendor.hwc.device.extend=HDMI-A

Thank you for your quick reply but I managed to add the support of my eDP display.
Now, my eDP display is working with Edge-V but I want to add the support of 3D for my eDP display as well as HDMI display.

So, I am hoping that you could help me on 3D support.

I don’t know about it . Can you elaborate on it?

@goenjoy - Will these instructions work with Android 10? I’ve got Android 10 compiling and installing fine. When I then try these instructions I got a compile error - device label not recognized for &isp0 and &isp1. I tried commenting those lines out and everything builds but the EdgeV gets stuck on the Khadas boot screen (showing only on HDMI, black screen on eDP).

I’ve got the eDP screen connected and adjusted the timings in the DTS file. I can get the eDP screen working in Linux so I know the hardware is working. My target configuration is primary on eDP, secondary display on HDMI or USB-C/DP.

You can’t copy it. You just need to migrate the relevant display nodes.
You should check the relevant documents:RKDocs\common\display
https://docs.khadas.com/edge/ConnectLcd.html

Can you show an example of what you mean by “migrate the relevant nodes”? I’ve read through all the docs but still not figuring it out.

Maybe this is a stupid question - but what is the best way to debug the dts to see if my changes are working or causing errors?

How did you modify it?

I didn’t modify your file. Steps I followed -

  1. I installed a new clean repo for Android following the instructions on your online guides: https://docs.khadas.com/edge/DownloadAndroidSourceCode.html

  2. I verified that the clean build compiles and successfully installs on the EdgeV. It does. The HDMI and USB-C/DP interfaces work fine. No eDP.

  3. I replaced kernel/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-android.dts with the version listed above in this post. That would not compile. The compiler said that it didn’t recognize the labels &isp0 and &isp1.

  4. I commented out those lines like this - (I figured this would break something)
    //&isp0 {
    // status = “disabled”;
    //};

    //&isp1 {
    // status = “disabled”;
    //};

Then it would compile ok but the boot gets stuck on the u-boot splash screen.

  1. I then attempted to modify device/rockchip/rk3399/rk3399.mk:
    The first 3 lines you see below in the PRODUCT_PROPERTY_OVERRIDES section were in the default file. I tried to first just add the HDMI as primary as below. It still gets stuck on boot

PRODUCT_PROPERTY_OVERRIDES +=
ro.product.version = 1.0.0
ro.product.ota.host = www.rockchip.com:2300
ro.sf.lcd_density=280
# persist.hdmi.ui.state=2
# persist.sys.rotation.einit=3
# vendor.hwc.device.extend=eDP
vendor.hwc.device.primary=HDMI-A

The codes of their platforms are different, so there must be problems with direct replacement.
android 10.0 edp dts:

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
 */

/dts-v1/;

#include "rk3399-khadas-edge.dtsi"
#include <dt-bindings/sensor-dev.h>
#include <dt-bindings/input/input.h>

/ {
	compatible = "Khadas,edge", "rockchip,rk3399";
	
    khadas-matrix-keypad {
		status = "okay";
		compatible = "khadas-matrix-keypad";
		row_col_gpio =
				<&gpio0 10 GPIO_ACTIVE_HIGH>,
				<&gpio0 11 GPIO_ACTIVE_HIGH>,
				<&gpio0 12 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&matrix_gpio>;
		debounce-delay-ms = <10>;
		col-scan-delay-us = <10>;
		linux,no-autorepeat;
	};

	edp_panel: edp-panel {
                compatible = "panel-simple";
		backlight = <&backlight>;
                bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
		power-supply = <&vcc3v3_s0>;
	        reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>; /* GPIO4_D4 */
	        enable-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; /* GPIO4_D5 */
		prepare-delay-ms = <20>;
		enable-delay-ms = <20>;		
		ports {
			panel_in_edp: endpoint {
		      	remote-endpoint = <&edp_out_panel>;
	      		};
		};
		display-timings {
			native-mode = <&timing0>;

			timing0: timing0 {
				clock-frequency = <148500000>;
				hactive = <1920>;
				vactive = <1080>;
				hfront-porch = <148>;
				hsync-len = <44>;
				hback-porch = <528>;
				vfront-porch = <4>;
				vsync-len = <5>;
				vback-porch = <36>;
				hsync-active = <0>;
				vsync-active = <0>;
				de-active = <0>;
				pixelclk-active = <0>;
			};
		};
	};
	
	rt5651-sound {
		status = "okay";
		compatible = "simple-audio-card";

		pinctrl-names = "default";
		pinctrl-0 = <&rt5651_hpdet>;


		simple-audio-card,format = "i2s";
		simple-audio-card,name = "realtek,rt5651-codec";
		simple-audio-card,mclk-fs = <256>;
		simple-audio-card,hp-det-gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
		simple-audio-card,widgets =
			"Microphone", "Mic Jack",
			"Headphone", "Headphone Jack";
		simple-audio-card,routing =
			"Mic Jack", "MICBIAS1",
			"IN1P", "Mic Jack",
			"Headphone Jack", "HPOL",
			"Headphone Jack", "HPOR";
		simple-audio-card,cpu {
			sound-dai = <&i2s1>;
		};
		simple-audio-card,codec {
			sound-dai = <&rt5651>;
		};
	};
};

&fusb0 {
	status = "okay";
	max-input-voltage = <13000000>;
	max-input-current = <6000000>;
	charge-dev = <&bq25703>;
};

&fusb1 {
	status = "okay";
	max-input-voltage = <13000000>;
	max-input-current = <6000000>;
	charge-dev = <&bq25703>;
};

&i2s1 {
	status = "okay";
	rockchip,i2s-broken-burst-len;
	rockchip,playback-channels = <2>;
	rockchip,capture-channels = <2>;
	#sound-dai-cells = <0>;
};

&isp0_mmu {
	status = "okay";
};

&isp1_mmu {
	status = "okay";
};

&i2c0 {
	status = "okay";
	i2c-scl-rising-time-ns = <300>;
	i2c-scl-falling-time-ns = <15>;
};

&i2c1 {
	status = "okay";
	i2c-scl-rising-time-ns = <300>;
	i2c-scl-falling-time-ns = <15>;

	rt5651: rt5651@1a {
		#sound-dai-cells = <0>;
		compatible = "rockchip,rt5651";
		reg = <0x1a>;
		clocks = <&cru SCLK_I2S_8CH_OUT>;
		clock-names = "mclk";
		pinctrl-names = "default";
		pinctrl-0 = <&i2s_8ch_mclk>;
		status = "okay";
	};
};

&i2c6 {
	status = "okay";

	vm149c: vm149c@0c {
		compatible = "silicon touch,vm149c";
		status = "okay";
		reg = <0x0c>;
		rockchip,camera-module-index = <0>;
		rockchip,camera-module-facing = "back";
	};
	
	imx214b: imx214b@10 {
		compatible = "sony,imx214";
		status = "okay";
		reg = <0x10>;
		clocks = <&cru SCLK_CIF_OUT>;
		clock-names = "xvclk";
		/* avdd-supply = <>; */
		/* dvdd-supply = <>; */
		/* dovdd-supply = <>; */
		/* reset-gpios = <>; */
		pwdn-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "rockchip,camera_default";
		pinctrl-0 = <&cif_clkout>;
		rockchip,camera-module-index = <0>;
		rockchip,camera-module-facing = "back";
		rockchip,camera-module-name = "YG9626-S600Y7-C";
		rockchip,camera-module-lens-name = "LG-50013A7";
		lens-focus = <&vm149c>;
		port {
			ucam_out0: endpoint {
				remote-endpoint = <&mipi_in_ucam0>;
				//remote-endpoint = <&mipi_in_ucam1>;
				data-lanes = <1 2>;
			};
		};
	};	

	vm149c_front: vm149c_front@0c {
		compatible = "silicon touch,vm149c";
		status = "okay";
		reg = <0x0c>;
		rockchip,camera-module-index = <1>;
		rockchip,camera-module-facing = "front";		
	};
	
	imx214f: imx214f@10 {
		compatible = "sony,imx214";
		status = "okay";
		reg = <0x10>;
		clocks = <&cru SCLK_CIF_OUT>;
		clock-names = "xvclk";
		/* avdd-supply = <>; */
		/* dvdd-supply = <>; */
		/* dovdd-supply = <>; */
		/* reset-gpios = <>; */
		pwdn-gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "rockchip,camera_default";
		pinctrl-0 = <&cif_clkout>;
		rockchip,camera-module-index = <1>;
		rockchip,camera-module-facing = "front";
		rockchip,camera-module-name = "YG9626-S600Y7-C";
		rockchip,camera-module-lens-name = "LG-50013A7";
		lens-focus = <&vm149c_front>;
		port {
			ucam_out1: endpoint {
				//remote-endpoint = <&mipi_in_ucam0>;
				remote-endpoint = <&mipi_in_ucam1>;
				data-lanes = <1 2>;
			};
		};
	};	
};

&i2c7 {
	status = "okay";

	icm20602_acc: icm_acc@68 {
		compatible = "icm20602_acc";
		reg = <0x68>;
		irq-gpio = <&gpio0 8 IRQ_TYPE_LEVEL_LOW>; /* GPIO0_B0 */
		irq_enable = <0>;
		poll_delay_ms = <30>;
		type = <SENSOR_TYPE_ACCEL>;
		layout = <9>;
	};

	icm20602_gyro: icm_gyro@68 {
		compatible = "icm20602_gyro";
		reg = <0x68>;
		irq_enable = <0>;
		poll_delay_ms = <30>;
		type = <SENSOR_TYPE_GYROSCOPE>;
		layout = <7>;
	};
};

&i2c8 {
	status = "okay";
	i2c-scl-rising-time-ns = <600>;
	i2c-scl-falling-time-ns = <20>;

	apds9960@39 {
		compatible = "avago,apds9960";
		reg = <0x39>;
		interrupt-parent = <&gpio3>;
		interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
		led-r-gpio = <&gpio4 24 GPIO_ACTIVE_HIGH>;		
		pinctrl-names = "default";
		pinctrl-0 = <&apds_int_l>;
	};

	bq25703: bq25703@6b {
		compatible = "ti,bq25703";
		reg = <0x6b>;
		extcon = <&fusb0>, <&fusb1>;
		interrupt-parent = <&gpio1>;
		interrupts = <RK_PC7 IRQ_TYPE_LEVEL_LOW>; /* GPIO1_C7 */
		pinctrl-names = "default";
		pinctrl-0 = <&charger_ok>;
		ti,charge-current = <1500000>;
		ti,max-charge-voltage = <8500000>;
		ti,max-input-voltage = <20000000>;
		ti,max-input-current = <6000000>;
		ti,input-current-sdp = <500000>;
		ti,input-current-dcp = <2000000>;
		ti,input-current-cdp = <2000000>;
		ti,input-current-dc = <2000000>;
		ti,minimum-sys-voltage = <7400000>;
		ti,otg-voltage = <5000000>;
		ti,otg-current = <500000>;
		ti,input-current = <500000>;
		pd-charge-only = <0>;
		status = "okay";
	};

	cw2013: cw2013@62 {
		status = "okay";
		compatible = "cw201x";
		reg = <0x62>;
		bat_config_info = <0x15 0x7F 0x6E 0x66 0x65 0x5C 0x5B 0x59
				0x58 0x57 0x57 0x54 0x53 0x51 0x4B 0x48
				0x40 0x33 0x2A 0x26 0x23 0x25 0x2A 0x34
				0x45 0x4F 0x0C 0xCD 0x44 0x68 0x67 0x68
				0x6E 0x6F 0x6C 0x68 0x3A 0x10 0x8A 0x01
				0x01 0x54 0x52 0x87 0x8F 0x91 0x94 0x52
				0x82 0x8C 0x92 0x96 0x82 0xFF 0xFF 0xCB
				0x2F 0x7D 0x64 0xA5 0xB5 0x13 0x58 0x09>;
		monitor_sec = <5>;
		virtual_power = <0>;
		divider_res1 = <200>;
		divider_res2 = <200>;
		dc_det_gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
	};
};

&rk_key {
	enter-key {
		linux,code = <232>;
		label = "enter";
		rockchip,adc_value = <170>;
	};
};


&pwm3 {
	status = "okay";

	interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH 0>;
	compatible = "rockchip,remotectl-pwm";
	remote_pwm_id = <3>;
	handle_cpu_id = <1>;
	remote_support_psci = <1>;
	pinctrl-names = "default";
	pinctrl-0 = <&pwm3b_pin>;

	ir_key1 {
		rockchip,usercode = <0xff00>;
		rockchip,key_table =
			<0xeb   KEY_POWER>,
			<0xec   KEY_MENU>,
			<0xfc   KEY_UP>,
			<0xfd   KEY_DOWN>,
			<0xf1   KEY_LEFT>,
			<0xe5   KEY_RIGHT>,
			<0xf8   232>,
			<0xa7   KEY_VOLUMEDOWN>,
			<0xa3    388>,  //mouse func
			<0xa4    388>,  //mouse func
			<0xf4   KEY_VOLUMEUP>,
			<0xfe   KEY_BACK>,
			<0xb7   KEY_HOME>;

	};

};

&backlight {
	pwms = <&pwm1 0 25000 0>;
	status = "okay";
};


&pwm1 {
	status = "okay";
};

&cdn_dp {
	status = "disabled";
};

&dp_in_vopl {
	status = "disabled";
};

&dp_in_vopb {
	status = "disabled";
};

&hdmi_in_vopl {
	status = "okay";
};

&hdmi_in_vopb {
	status = "disabled";
};

&route_hdmi {
	status = "okay";
	connect = <&vopl_out_hdmi>;
};

&vopb {
	status = "okay";
	assigned-clocks = <&cru DCLK_VOP0_DIV>;
	assigned-clock-parents = <&cru PLL_CPLL>;
};

&vopl {
	status = "okay";
	assigned-clocks = <&cru DCLK_VOP1_DIV>;
	assigned-clock-parents = <&cru PLL_VPLL>;
};
&route_edp {
	status = "okay";
	connect = <&vopb_out_edp>;
};

&edp_in_vopl {
	status = "disabled";
};

&edp_in_vopb {
	status = "okay";
};

&edp {
	force-hpd;
	status = "okay";
	ports {
		edp_out: port@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
			edp_out_panel: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&panel_in_edp>;
			};
		};
	};
};


&pinctrl {
	matrix {
		matrix_gpio: matrix_gpio {
			rockchip,pins =
				<0 10 RK_FUNC_GPIO &pcfg_pull_up>,
				<0 11 RK_FUNC_GPIO &pcfg_pull_up>,
				<0 12 RK_FUNC_GPIO &pcfg_pull_up>;
		};
	};

	apds_int_l: apds-int-l {
		rockchip,pins = <3 10 RK_FUNC_GPIO &pcfg_pull_up>;
	};

	charger {
		charger_ok: charge-ok {
			rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>; /* GPIO1_C7 */
		};
	};

	rt5651 {
		rt5651_hpdet: rt5651-hpdet {
			rockchip,pins = <1 0 RK_FUNC_GPIO &pcfg_pull_up>; /* GPIO1_A0 */
		};
	};
};

&mipi_dphy_rx0 {
	status = "okay";

	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;

			mipi_in_ucam0: endpoint@1 {
				reg = <1>;
				remote-endpoint = <&ucam_out0>;
				data-lanes = <1 2>;
			};
		};

		port@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;

			dphy_rx0_out: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&isp0_mipi_in>;
			};
		};
	};
};

&rkisp1_0 {
	status = "okay";

	port {
		#address-cells = <1>;
		#size-cells = <0>;

		isp0_mipi_in: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&dphy_rx0_out>;
		};
	};
};

&mipi_dphy_tx1rx1 {
	status = "okay";

	ports {
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;

			mipi_in_ucam1: endpoint@1 {
				reg = <1>;
				remote-endpoint = <&ucam_out1>;
				data-lanes = <1 2>;
			};
		};

		port@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;

			dphy_tx1rx1_out: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&isp1_mipi_in>;
			};
		};
	};
};

&rkisp1_1 {
	status = "okay";

	port {
		#address-cells = <1>;
		#size-cells = <0>;

		isp1_mipi_in: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&dphy_tx1rx1_out>;
		};
	};
};
  • Among the following parameters, you need to adjust the parameters of your EDP screen
		display-timings {
			native-mode = <&timing0>;

			timing0: timing0 {
				clock-frequency = <148500000>;
				hactive = <1920>;
				vactive = <1080>;
				hfront-porch = <148>;
				hsync-len = <44>;
				hback-porch = <528>;
				vfront-porch = <4>;
				vsync-len = <5>;
				vback-porch = <36>;
				hsync-active = <0>;
				vsync-active = <0>;
				de-active = <0>;
				pixelclk-active = <0>;
			};
		};


The ‘#’ character cannot appear, which will result in unsuccessful configuration.

device\rockchip\rk3399\rk3399_Android10\rk3399_Android10.mk

hlm@Server:/users/hlm/Rockcip_Android10.0_SDK/device/rockchip/rk3399$ git diff
diff --git a/rk3399_Android10/rk3399_Android10.mk b/rk3399_Android10/rk3399_Android10.mk
index 2e4831e..2b2d97a 100755
--- a/rk3399_Android10/rk3399_Android10.mk
+++ b/rk3399_Android10/rk3399_Android10.mk
@@ -51,8 +51,9 @@ PRODUCT_PROPERTY_OVERRIDES += \
        persist.vendor.sys.hdmiui=1 \
        persist.sys.rotation.einit=3 \
        persist.sys.app.rotation=force_land \
-    vendor.hwc.device.primary=HDMI-A,DP \
-    vendor.hwc.device.extend=DSI
+    vendor.hwc.device.primary=eDP \
+    vendor.hwc.device.extend=HDMI-A

Thanks for sending this, but it’s still not working. Here’s what I did.

  1. Verified that I can build Android 10 and install on edgev. It boots into Android on HDMI screen

  2. replaced the kernel/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge-android.dts file with the contents of the file you just sent above. I updated the timings to match the data sheet for my eDP display:

display-timings {
native-mode = <&timing0>;

		timing0: timing0 {
			clock-frequency = <138700000>;
			hactive = <1920>;
			vactive = <1080>;
			hfront-porch = <48>;
			hsync-len = <32>;
			hback-porch = <80>;
			vfront-porch = <3>;
			vsync-len = <5>;
			vback-porch = <23>;
			hsync-active = <0>;
			vsync-active = <0>;
			de-active = <0>;
			pixelclk-active = <0>;
		};
	};
  1. edited rk3399_Android10.mk to this:
#
# Copyright 2014 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# First lunching is Q, api_level is 29
PRODUCT_SHIPPING_API_LEVEL := 29
PRODUCT_FSTAB_TEMPLATE := $(LOCAL_PATH)/fstab.in
PRODUCT_DTBO_TEMPLATE := $(LOCAL_PATH)/dt-overlay.in
PRODUCT_BOOT_DEVICE := fe330000.sdhci
include device/rockchip/common/build/rockchip/DynamicPartitions.mk
include device/rockchip/common/BoardConfig.mk
include device/rockchip/rk3399/rk3399_Android10/BoardConfig.mk
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
# Inherit from those products. Most specific first.
$(call inherit-product, device/rockchip/rk3399/device.mk)
$(call inherit-product, device/rockchip/common/device.mk)

#enable this for support f2fs with data partion
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4

PRODUCT_CHARACTERISTICS := tablet

PRODUCT_NAME := rk3399_Android10
PRODUCT_DEVICE := rk3399_Android10
PRODUCT_BRAND := rockchip
PRODUCT_MODEL := rk3399-Android10
PRODUCT_MANUFACTURER := Khadas
PRODUCT_AAPT_PREF_CONFIG := hdpi

PRODUCT_PACKAGES += \
    SoundRecorder

BUILD_NUMBER2 := $(shell $(DATE) +%Y%m%d)
PRODUCT_PROPERTY_OVERRIDES += \
    ro.build.display.id=Edge_Qt_$(BUILD_NUMBER2)
   
PRODUCT_PROPERTY_OVERRIDES += \
	persist.sys.rotation.efull=true \
	persist.vendor.sys.hdmiui=1 \
	persist.sys.rotation.einit=3 \
	persist.sys.app.rotation=force_land \
    vendor.hwc.device.primary=eDP \
    vendor.hwc.device.extend=HDMI-A,DP
# Get the long list of APNs
PRODUCT_COPY_FILES += vendor/rockchip/common/phone/etc/apns-full-conf.xml:system/etc/apns-conf.xml
PRODUCT_COPY_FILES += vendor/rockchip/common/phone/etc/spn-conf.xml:system/etc/spn-conf.xml
PRODUCT_PROPERTY_OVERRIDES += \
    ro.product.version = 1.0.0 \
    ro.product.ota.host = www.rockchip.com:2300 \
    ro.sf.lcd_density=280

PRODUCT_PROPERTY_OVERRIDES += \
   service.adb.tcp.port=5555

# bootanimation
PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/bootanimation.zip:product/media/bootanimation.zip   
#Factory test
PRODUCT_PACKAGES += \
   FactoryTest

#i2c tools
PRODUCT_PACKAGES += \
   i2cget \
   i2cset \
   i2cdump \
   i2cdetect
   
BUILD_WITH_GAPPS_CONFIG :=false
ifeq ($(BUILD_WITH_GAPPS_CONFIG),true)
$(call inherit-product-if-exists, vendor/rockchip/google/gapps.mk)
endif  
#PRODUCT_HAVE_OPTEE := true
  1. compiled, flashed and it shows the u-boot boot splash on the HDMI display, nothing on the eDP and no backlight on either. After a few seconds it reboots and keeps cycling.

Any ideas?

kernel\arch\arm64\boot\dts\rockchip.rk3399-khadas-edge-android.dtb.dts.tmp
@BarryS Post the contents of this document.

It was too large to post so I put it on google docs-

Kernel\arch\arm64\boot\dts\rockchip.rk3399-khadas-edge-android.dtb.dts.tmp

.rk3399-khadas-edge-android.dtb.dts.tmp

Did you erase the flash before upgrading the firmware?
If not, erase the flash before upgrading the firmware.

Still not working-
I erased the flash with sudo ./upgrade_tool ef /path/to/MiniLoaderAll.bin

Then flashed with the new android build. This time it again shows the u-boot splash (on HDMI) and then appears to just turn off. eDP is dark the whole time. As I’m typing this a few minutes later, it is waking up and then doing the same cycle of starting to boot and then going to sleep again.

Did you see anything in the .tmp file that looked wrong?

no problem. Send the boot log.

I’m having a difficult time getting the serial connection to work. I’ve tried 2 different serial adapters -
I keep getting gibberish- This is booting the Android10 build unmodified that boots successfully.
Any other way to get the boot log? Or have you seen this issue with the serial terminal before. Same thing happens on another EdgeV, but when I hook my Mac up to a RaspberryPi I can get the linux boot console on the same serial tool???

bs@Bs-MBP-2 ~ % kermit
Connecting to /dev/tty.usbserial-AQ00L2V5, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.

?{{i???m?B?j?B?Z{???G???3?V{?wggoffgFWgGfgGFgGFgGfgFVFGFGFgGFgg^GgGFGFgGVggwg?o???z??{{z{??{y{y?FngOy{?vf&WgO?FF’G?vGgFNNFWfvWgW_gN_WgOFfOGgVGf~O^e&?oG_W??WWGOgofgG_GgWwOgFff?/gfffNf
Í­um??]???9?%??
?-??5,?K??
???-??U? M
%}?=???-?
E???{???y?x???
???Wf?F_?F?~gF?fgn?Wn_nf_OngnwWf__FgNW~NWoOn_NgG_fFWNo~OwfFW_nOOnwffGFNFF~Wnf_fOG~f^v?N?fF_fOofGOfovn_fOVfGfOW~Nwfw_fw_fg?gvggVGfog_FgfoGgNfgO’?ngffGnVg_GvGGWonG__wgvW_n’~v~nOv_wV_wfVvg_v_Gfg~ww_wWOnwfwV_n’nwgvwOGWvWnfgVvwvgVvOFNoOvg&gvwVG~WgwfGGVwG~Gvo_gf_ov_G~g_VGwf~g6gWvWW~WFO?vWGvovO?vovOg_OvGvGFWn?vngngggfvOg_vO_vOgO6OGGG7NfnvOG_~onvOGnvvOgfgvggGnG?WG_nwWfWw_f/VOnfgW?GGowv_O~WvGv_ON_ON_O^ov_OfOv_O~n_OfOf_O_F’N_FWNn_fOOfOf_fOf_WfOOF&fwn__n_Of~wGfOwfOGWW^nfO^GfOwWnG^ogfGOfgf_7_WvWfOGFWwfogOfO^O_FOfoGfOff~fOwFw_OFOOOO^g__fOwfOGNgOfgOV^v~GfOWvo~F__GWVGng_gVGO"6>?.G?&?Ӣ&fKfWfWV_fOV_OfO_OF_WOfO_VOFWfOWOfOO_v_W_fOWnffOOVWfOOf__OWWfGwNfnGfGwfffoFFfofGfofoFfoFfoFffVfonvnFnfwF?GGwGnO_7nwwoFfOVoG?VowgfGG~gOvGVoFgfWgGgFo~gvGgoV/GFw?nngo7fNW_NgF??Nfg~fO_nf~fOOo_wnf_OFOfO^NFNWwfO_~O^Vggg^f_oFgw’V__vgFg^GOv_GgGg^g_fo__FggngggvWNg~f7WGfO^fO_oGfWWFg_FGgfogvo~vNGWnfGoO_vG/nGGfn_nf/GgvowooW/FGGFGwOogOFG_vwfWVg^VWWnOGwwoNVWgWOff?Fo?Vg_VgvOGWw^g_V_Gv_vvog_~V_vVv^6ovg_ovGG^goNgvg_o?VOGOVG?gG6nggwoog?FoGw?fF?ON#GWfGVvOGOgnwoFovOFgvO_OFog_WfO_fOfOfnf_N_ww~f/fGo~g’/foN_fgFfWfNFWfGGfWWnfoo_ff7fgf7oFfOGngF7fwWNwfWFWoNOFnwoJG_fofo_Ogf_GNGf_Nwof_f_vV^GNn?G’~O_wgGNnGWGNWf__gN_GWf_F&nnfg_fwwnO_N~/~#ggfgGnOgG&foVfOg_VG__Gfog_'ffg6fGgG~ooWNFgW_gvg_FG?VF?FgGFONgoGnwoNgOGv_o__ovW_nW_OOgGW_vg^~wfw~WvgGvOOVG~wvVvOgGWOWV^FO_WfGwfgGvOOvwWv~Wn_g_vOWoOg_onofGVg_WVwVOWvwvoovvOnFVGNvO?FOf?Fo?fggFV____FfwfnfGwfwWN_GFGGFoGG&?~/~?N~VOF__fogfg~wn_F_gONFgo_Fgo_nW^N_OFgwVwG^nogf~WGGWGwfWOGwgF~n^OFnwfOFFwf?Gv_fgV??&.^VNfOongVwovOwoongFNv_Ff_vW.N~nv~&F~V_g_VFvVg_Fv_V?nGWG_ofG^Goofng~wnWFffoVofoVFfoV~O’FoonffnnfFWGFg~VOgo6VgOnOVoVoFoOVooFnov?NoOVwBgvGV?V_Nf^GW??n^vg_fF_NofWo_fFg^vOGGFWGV?fWFOgGf_wNfFNGf^OfnOoV?vo_F^vo[Gw_ooO^GGW?f_ow??WGowWwoOVoWgwwoFo?Of_WwO?oWGfoWGG/wF^Oo??nnWgFwFVGgNGWvgGOwfooffgONWfgWfgffWFggg_oVgWgWwwn?o?OfOOwGoowfowogWWoggw_ooW_OOwoFoOw_GV_nfonfWFF?f_FOFG_Oofo_F?g^v~OnoVWnG^?wV_fWgwNof?f_wW_fWffW.fWWF/voFFO^Ng^ov~?oFG_GovoW_^Wwwfo?wgWW?Owof/WW?WwfgWg?wfgWgFoVgVno?VgWg?WwN_?wn_?wvgWWWo?GWVV_