I was finally able to get my eDP panel working after about 2 weeks thanks to Wayne’s help and reading other forum posts. After reviewing the kernel code pretty thoroughly, it appears that the driver for panel-s-edp-uhdtv-15-6 does the same thing as the AUO driver and already exists in the kernel. Rather than using the AUO DTS file that’s been mentioned here, I modified my devkit DTS file to enable the UHDTV driver:
diff --git a/kernel-dts/tegra210-jetson-tx1-p2597-2180-a01-devkit.dts b/kernel-dts/tegra210-jetson-tx1-p2597-2180-a01-devkit.dts
index 8c0fb71..4789dfb 100644
--- a/kernel-dts/tegra210-jetson-tx1-p2597-2180-a01-devkit.dts
+++ b/kernel-dts/tegra210-jetson-tx1-p2597-2180-a01-devkit.dts
@@ -28,11 +28,19 @@
bootloader {
nvidia,skip-display-init;
};
};
host1x {
dc@54200000 {
- status = "disabled";
+ status = "okay";
+ nvidia,dc-or-node = "/host1x/sor";
+ };
+
+ dpaux {
+ status = "okay";
};
dsi {
@@ -47,10 +55,26 @@
sor {
panel-s-edp-uhdtv-15-6 {
- status = "disabled";
+ status = "okay";
};
prod-settings {
- status = "disabled";
+
+ prod_c_hbr {
+ prod = <
+ 0x00000590 0x00f00000 0x00400000 //SOR_NV_PDISP_SOR_PLL1_0 23:20=LOADADJ 0x04
+ >;
+ };
+ prod_c_hbr2 {
+ prod = <
+ 0x00000590 0x00f00000 0x00600000 //SOR_NV_PDISP_SOR_PLL1_0 23:20=LOADADJ 0x06
+ >;
+ };
+ prod_c_rbr {
+ prod = <
+ 0x00000590 0x00f00000 0x00300000 //SOR_NV_PDISP_SOR_PLL1_0 23:20=LOADADJ 0x03
+ >;
+ };
+
};
};
};
@@ -62,25 +86,21 @@
};
backlight {
- status = "disabled";
+ status = "okay";
+ power-supply = <&battery_reg>;
panel-a-wuxga-8-0-bl {
status = "disabled";
};
panel-s-edp-uhdtv-15-6-bl {
- status = "disabled";
+ status = "okay";
+ pwms = <&tegra_pwm 0 5000000>;
};
};
- sor {
- status = "disabled";
- prod-settings {
- status = "disabled";
- };
- panel-s-edp-uhdtv-15-6 {
- smartdimmer {
- status = "disabled";
- };
- };
- };
};
I ran into a few hangups. First was that my panel had some EDID timing values that were not accepted by the board-panel.c code. This was resolved here by Wayne’s suggestion to modify h_ref_to_sync = 2: 2048x1536 eDP display on TX1 - Jetson TX1 - NVIDIA Developer Forums
Next, the backlight had some issues. Wayne’s DTS gpio-hog code was not working, plus hard-coding the PWM to be 100% wasn’t a good long-term solution. The BL_EN and BL_PWM pins would come on for a few seconds when first booting the kernel, but then shut down. I was able to confirm that my hardware worked using the terminal commands mentioned in this post: https://devtalk.nvidia.com/default/topic/1019016/jetson-tx1/how-to-enable-the-pwm-by-default-not-by-sysfs-control/post/5188457/#5188457
echo 0 > /sys/class/pwm/pwmchip0/export
cd /sys/class/pwm/pwmchip0/pwm0
echo 1000000 > period
echo 500000 > duty_cycle
echo 1 > enable
I traced the problem back to a log error that said “regulator_get() failed for (backlight, power)”. Even though I am not using a regulator for the backlight power (my backlight drivers run off the 19V main power), it seems the backlight code still requires a regulator to be specified. I chose a random regulator, and it magically worked. The backlight now stays on during boot, and I have full control over it from the Ubuntu GUI display brightness settings. Should I be using something else instead of this?
power-supply = <&battery_reg>;
Lastly, I had to add a board ID to configuration file: Linux_for_Tegra/bootloader/t210ref/cfg/board_config_p2597-devkit.xml
<?xml version="1.0"?>
<!-- Nvidia Tegra board info configuration file -->
<board_configs>
<board type="proc" id="2180" sku="1000" fab="0" />
<board type="display" id="1824" sku="0"/>
<board type="pmu" id="2180" sku="0000" />
</board_configs>
I’m still not quite sure how this XML file works, but it appears to get read by flash.sh. The code in board-panel.c appears to try to grab these values from the DTS file under the node /chosen/display-board/, but instead the values get pulled from this XML file. Is this explained in the documentation somewhere?
The Board ID gets read by board-panel.c in a switch statement that chooses which driver to enable. The UHDTV driver gets selected if the Board ID is 1824 and you’re using a TX1. By using this Board ID, I didn’t need to modify the C code. Is the expectation that an OEM will need to append to this switch statement to support their own hardware?
The last thing I need to solve is that my system not does not default to the correct resolution on a fresh install. Once I select the correct resolution, it does persist through rebooting. I have not investigated this yet.