Extracted Device Tree and Analysis

daveshah

New member
May 27, 2017
3
5
0
ds0.me
As someone with an interest in embedded development (also happen to be using the Z5P 4k LCD in another project, but that's another story) and about to receive an XZP, I thought it would be interesting to extract and decompile the device tree from the now downloadable XZP firmware. I've put it online as a Github gist (spaces added because I'm not allowed to post links yet :() :

https : // gist.github.com/daveshah1/52227b83e9a04d6536b784e895293f77

Of particular interest for me and I suspect others is the LCD. I've put the config for the LCD only below (with the big calibration tables removed for clarity and to avoid the post length limit) :

Code:
somc,dual0_6_panel {
				somc,mdss-dsi-pcc-enable;
				somc,mdss-dsi-uv-command = <0x6010000 0x1da 0x6010000 0x1db>;
				somc,mdss-dsi-uv-param-type = <0x4>;
				somc,mdss-dsi-pcc-table-size = <0xe2>;
				somc,mdss-dsi-pcc-table = ***cut for readability***;
				somc,mdss-dsi-srgb-pcc-enable;
				somc,mdss-dsi-srgb-pcc-table-size = <0xe2>;
				somc,mdss-dsi-srgb-pcc-table = ***cut for readability***;
				somc,mdss-dsi-vivid-pcc-enable;
				somc,mdss-dsi-vivid-pcc-table-size = <0xe2>;
				somc,mdss-dsi-vivid-pcc-table = ***cut for readability***;
				somc,mdss-dsi-hdr-pcc-enable;
				somc,mdss-dsi-hdr-pcc-table-size = <0xe2>;
				somc,mdss-dsi-hdr-pcc-table = ***cut for readability***;
				qcom,mdss-dsi-panel-name = [36 00];
				qcom,mdss-dsi-panel-type = "dsi_cmd_mode";
				qcom,mdss-dsi-panel-controller = <0x1af>;
				qcom,mdss-dsi-panel-destination = "display_1";
				qcom,mdss-dsi-bpp = <0x18>;
				qcom,mdss-pan-physical-width-dimension = <0x44>;
				qcom,mdss-pan-physical-height-dimension = <0x79>;
				qcom,mdss-dsi-virtual-channel-id = <0x0>;
				qcom,mdss-dsi-stream = <0x0>;
				qcom,mdss-dsi-h-sync-skew = <0x0>;
				qcom,mdss-dsi-h-left-border = <0x0>;
				qcom,mdss-dsi-h-right-border = <0x0>;
				qcom,mdss-dsi-v-top-border = <0x0>;
				qcom,mdss-dsi-v-bottom-border = <0x0>;
				qcom,mdss-dsi-underflow-color = <0x0>;
				qcom,mdss-dsi-border-color = <0x0>;
				qcom,mdss-dsi-h-sync-pulse = <0x1>;
				qcom,mdss-dsi-traffic-mode = "non_burst_sync_event";
				qcom,mdss-dsi-bllp-eof-power-mode;
				qcom,mdss-dsi-bllp-power-mode;
				qcom,mdss-dsi-dma-trigger = "trigger_sw";
				qcom,mdss-dsi-mdp-trigger = "none";
				qcom,mdss-dsi-tx-eot-append;
				qcom,mdss-dsi-off-command = <0x5010000 0xa000128 0x5010000 0x96000110>;
				qcom,mdss-dsi-off-command-state = "dsi_hs_mode";
				qcom,mdss-dsi-te-pin-select = <0x1>;
				qcom,mdss-dsi-wr-mem-start = <0x2c>;
				qcom,mdss-dsi-wr-mem-continue = <0x3c>;
				qcom,mdss-dsi-te-dcs-command = <0x1>;
				qcom,mdss-dsi-te-check-enable;
				qcom,mdss-dsi-te-using-te-pin;
				qcom,mdss-dsi-lane-0-state;
				qcom,mdss-dsi-lane-1-state;
				qcom,mdss-dsi-lane-2-state;
				qcom,mdss-dsi-lane-3-state;
				qcom,panel-supply-entries = <0x1b4>;
				qcom,mdss-dsi-lp11-init;
				qcom,mdss-dsi-bl-min-level = <0x1>;
				qcom,mdss-dsi-bl-max-level = <0xfff>;
				qcom,mdss-brightness-max-level = <0xfff>;
				qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
				qcom,mdss-dsi-panel-hdr-enabled;
				qcom,mdss-dsi-panel-hdr-color-primaries = <0x3a5c 0x3dae 0x8408 0x3d54 0x2ac6 0x8408 0x1d1a 0x8fc>;
				qcom,mdss-dsi-panel-peak-brightness = <0x6acfc0>;
				qcom,mdss-dsi-panel-blackness-level = <0x1226>;
				somc,dsi-index = <0x0>;
				somc,lcd-id-adc = <0x89f08 0x9f6c8>;
				somc,mdss-dsi-master;
				somc,pw-on-rst-seq = <0x0 0xf 0x1 0xa 0x0 0xf 0x1 0x14>;
				somc,pw-off-rst-b-seq = <0x0 0xb>;
				somc,pw-wait-after-on-vdd = <0x0>;
				somc,pw-wait-after-on-vddio = <0xa>;
				somc,pw-wait-after-on-vsp = <0x0>;
				somc,pw-wait-after-on-vsn = <0x0>;
				somc,pw-wait-after-on-dcdc = <0xa>;
				somc,pw-wait-after-off-vdd = <0x0>;
				somc,pw-wait-after-off-vddio = <0x1>;
				somc,pw-wait-after-off-vsp = <0x5>;
				somc,pw-wait-after-off-vsn = <0x5>;
				somc,pw-wait-after-off-dcdc = <0x5>;
				somc,pw-wait-after-on-touch-avdd = <0x1>;
				somc,pw-wait-after-on-touch-vddio = <0x0>;
				somc,pw-wait-after-on-touch-reset = <0x0>;
				somc,pw-wait-after-on-touch-int-n = <0xa>;
				somc,pw-wait-after-off-touch-avdd = <0x0>;
				somc,pw-wait-after-off-touch-vddio = <0x0>;
				somc,pw-wait-after-off-touch-reset = <0x0>;
				somc,pw-wait-after-off-touch-int-n = <0x0>;
				somc,pw-down-period = <0x64>;
				somc,lab-output-voltage = <0x588040>;
				somc,ibb-output-voltage = <0x557300>;
				somc,qpnp-lab-limit-maximum-current = <0xc8>;
				somc,qpnp-ibb-limit-maximum-current = <0x320>;
				somc,qpnp-lab-max-precharge-time = <0x1f4>;
				somc,qpnp-lab-soft-start = <0x320>;
				somc,qpnp-ibb-discharge-resistor = <0x12c>;
				somc,qpnp-lab-pull-down-enable;
				somc,qpnp-lab-full-pull-down;
				somc,qpnp-ibb-pull-down-enable;
				somc,qpnp-ibb-full-pull-down;
				somc,ewu-wait-after-touch-reset = <0x28>;
				somc,lk-on-skip;
				qcom,esd-check-enabled;
				qcom,mdss-dsi-panel-status-command = <0x6010001 0x500010a>;
				qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode";
				qcom,mdss-dsi-panel-status-check-mode = "reg_read";
				qcom,mdss-dsi-panel-status-read-length = <0x1>;
				qcom,mdss-dsi-panel-max-error-count = <0x3>;
				qcom,mdss-dsi-panel-status-value = <0x9c>;
				somc,change-fps-enable;
				somc,change-fps-panel-type = "uhd_4k_type";
				somc,change-fps-panel-mode = "susres_mode";
				somc,change-fps-command = <0x39010000 0x6f0 0x55aa5208 0x390100 0x10 0xbd00ac0c 0xc000159 0x909010e 0xc0c00b4>;
				somc,driver-ic-vdisp = <0x780>;
				somc,driver-ic-rclk = <0x2625a00>;
				somc,driver-ic-total-porch = <0xc>;
				somc,change-fps-rtn-adj;
				somc,change-fps-rtn-pos = <0x1 0x6>;
				qcom,dynamic-mode-switch-enabled;
				qcom,dynamic-mode-switch-type = "dynamic-resolution-switch-immediate";
				qcom,dcs-cmd-by-left;

				qcom,mdss-dsi-display-timings {

					1080p {
						qcom,mdss-dsi-timing-default;
						qcom,mdss-dsi-panel-width = <0x21c>;
						qcom,mdss-dsi-panel-height = <0x780>;
						qcom,mdss-dsi-h-back-porch = <0x12c>;
						qcom,mdss-dsi-h-pulse-width = <0x28>;
						qcom,mdss-dsi-h-front-porch = <0x190>;
						qcom,mdss-dsi-v-back-porch = <0xa>;
						qcom,mdss-dsi-v-pulse-width = <0x2>;
						qcom,mdss-dsi-v-front-porch = <0xc>;
						qcom,mdss-dsi-panel-framerate = <0x3c>;
						qcom,mdss-dsi-panel-timings = <0x1b0606 0xb110507 0x5030400>;
						qcom,mdss-dsi-t-clk-post = <0x7>;
						qcom,mdss-dsi-t-clk-pre = <0x29>;
						qcom,mdss-dsi-on-command = [39 01 00 00 00 00 06 f0 55 aa 52 08 00 15 01 00 00 00 00 02 c9 01 15 01 00 00 00 00 02 90 00 15 01 00 00 00 00 02 58 01 39 01 00 00 00 00 06 f0 55 aa 52 08 07 15 01 00 00 00 00 02 ef 01 39 01 00 00 00 00 06 f0 55 aa 52 08 00 15 01 00 00 00 00 02 b4 01 39 01 00 00 00 00 10 bd 00 ac 0c 0c 00 01 56 09 09 01 01 0c 0c 00 d9 15 01 00 00 00 00 02 35 00 39 01 00 00 00 00 03 44 00 00 39 01 00 00 00 00 06 f0 55 aa 52 08 01 39 01 00 00 00 00 03 d4 88 88 39 01 00 00 00 00 05 ff aa 55 a5 80 15 01 00 00 00 00 02 6f 01 15 01 00 00 00 00 02 f3 10 39 01 00 00 00 00 05 ff aa 55 a5 00];
						qcom,mdss-dsi-post-panel-on-command = <0x5010000 0x129 0x5010000 0x43000111>;
						qcom,mdss-dsi-on-command-state = "dsi_lp_mode";
						qcom,mdss-dsi-timing-switch-command = [39 00 00 00 00 00 06 f0 55 aa 52 08 00 15 00 00 00 00 00 02 c9 01 15 00 00 00 00 00 02 90 00 15 00 00 00 00 00 02 58 01 15 00 00 00 00 00 02 03 00 39 00 00 00 00 00 06 f0 55 aa 52 08 04 15 01 00 00 00 00 02 c0 03];
						qcom,mdss-dsi-timing-switch-command-state = "dsi_lp_mode";
						qcom,mdss-tear-check-sync-init-val = <0xf00>;
						qcom,mdss-tear-check-start-pos = <0xf00>;
						qcom,mdss-tear-check-rd-ptr-trigger-intr = <0xf01>;
						qcom,config-select = <0x1b5>;
						qcom,mdss-dsi-panel-clockrate = <0x3595a6c0>;
					};

					4k {
						qcom,mdss-dsi-panel-width = <0x438>;
						qcom,mdss-dsi-panel-height = <0xf00>;
						qcom,mdss-dsi-h-back-porch = <0x68>;
						qcom,mdss-dsi-h-pulse-width = <0x28>;
						qcom,mdss-dsi-h-front-porch = <0x8c>;
						qcom,mdss-dsi-v-back-porch = <0xa>;
						qcom,mdss-dsi-v-pulse-width = <0x2>;
						qcom,mdss-dsi-v-front-porch = <0xc>;
						qcom,mdss-dsi-panel-framerate = <0x3c>;
						qcom,mdss-dsi-panel-timings = <0x1b0606 0xb110507 0x5030400>;
						qcom,mdss-dsi-t-clk-post = <0x7>;
						qcom,mdss-dsi-t-clk-pre = <0x29>;
						qcom,mdss-dsi-on-command = <0x15010000 0x290 0x3150100 0x2 0x3013901 0x0 0x6f055aa 0x52080415 0x1000000 0x2c003 0x39010000 0x6f0 0x55aa5208 0x7150100 0x2 0xef013901 0x0 0x6f055aa 0x52080015 0x1000000 0x2b401 0x15010000 0x235 0x390100 0x3 0x44000039 0x1000000 0x6f055 0xaa520801 0x39010000 0x3d4 0x88883901 0x0 0x5ffaa55 0xa5801501 0x0 0x26f0115 0x1000000 0x2f310 0x39010000 0x5ff 0xaa55a500>;
						qcom,mdss-dsi-post-panel-on-command = <0x5010000 0x129 0x5010000 0x43000111>;
						qcom,mdss-dsi-on-command-state = "dsi_lp_mode";
						qcom,mdss-dsi-timing-switch-command = [39 00 00 00 00 00 06 f0 55 aa 52 08 00 15 00 00 00 00 00 02 c9 01 15 00 00 00 00 00 02 90 03 15 00 00 00 00 00 02 58 00 15 00 00 00 00 00 02 03 01 39 00 00 00 00 00 06 f0 55 aa 52 08 04 15 01 00 00 00 00 02 c0 03];
						qcom,mdss-dsi-timing-switch-command-state = "dsi_lp_mode";
						qcom,compression-mode = "dsc";
						qcom,config-select = <0x1b6>;
						qcom,mdss-tear-check-sync-init-val = <0xf00>;
						qcom,mdss-tear-check-start-pos = <0xf00>;
						qcom,mdss-tear-check-rd-ptr-trigger-intr = <0xf01>;
						qcom,mdss-dsi-panel-clockrate = <0x3595a6c0>;
					};
				};
			};

			config0 {
				qcom,split-mode = "dualctl-split";
				linux,phandle = <0x1b5>;
				phandle = <0x1b5>;
			};

			config1 {
				qcom,mdss-dsc-encoders = <0x1>;
				qcom,mdss-dsc-slice-height = <0x20>;
				qcom,mdss-dsc-slice-width = <0x438>;
				qcom,mdss-dsc-slice-per-pkt = <0x1>;
				qcom,mdss-dsc-bit-per-component = <0x8>;
				qcom,mdss-dsc-bit-per-pixel = <0x8>;
				qcom,mdss-dsc-block-prediction-enable;
				linux,phandle = <0x1b6>;
				phandle = <0x1b6>;
			};
A few things to note, although may only be of interest to geeks like me...

- Despite all of the marketing info, as far as I can tell it's still running 8bpc/24bpp, not any kind of 10 bit colour. I think HDR is more a case of a brighter backlight and software filtering rather than anything else.
- Based on the panel setup commands I suspect it uses the same driver chip (NT35950) as the Z5P panel
- Both the Z5P and this panel use compression to fit 4k video in the bandwidth available (not used in 1080p mode). The former uses Qualcomm's proprietary FBC, the latter uses the newer VESA DSC. I think this may lead to slightly better quality in 4k mode, although the difference would probably never be visible.

The device tree only gives limited information about the camera, most of the camera configuration is done in a shared library (libcammw.so) which I'm also investigating. It would certainly be nice if you could tweak it to trade off framerate/resolution/record time like a pro HS camera.
 
  • Like
Reactions: Shnig
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone