Hello WayneWWW,
Sorry for the late reply. We finally got the bridge supported and LVDS display working now.
It seems the kernel configuration options we put in above snippet alone is not enough to get the driver compiled and linked. Below is the bridge driver we are talking about.
/xavier/public_sources/kernel/kernel-4.9/drivers/gpu/drm/bridge/nxp-ptn3460.c
However we got another strange issue now. If we keep the LVDS enabled, and HDMI connected, Jetson wont boot. We are able to connect any one at a time. when we keep HDMI connected and after booting if we connect edp bridge, HDMI display does blank, system hangs and we get the following in serial console.
nvidia@jetson-0424318032561:~$ ▒▒WARNING: pll_d2 has no dyn ramp
▒▒[ 45.635820] tegradc 15220000.nvdisplay: tegra_nvdisp_assign_win: cannot assign win 4 to head 2, it owned by 0
[ 45.636036] tegradc 15220000.nvdisplay: failed to assign window 4
[ 45.636152] tegradc 15220000.nvdisplay: tegra_nvdisp_assign_win: cannot assign win 5 to head 2, it owned by 0
[ 45.636329] tegradc 15220000.nvdisplay: failed to assign window 5
[ 45.636479] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 45.636652] Mem abort info:
[ 45.636711] ESR = 0x96000005
[ 45.636776] Exception class = DABT (current EL), IL = 32 bits
[ 45.636876] SET = 0, FnV = 0
[ 45.636934] EA = 0, S1PTW = 0
[ 45.636989] Data abort info:
[ 45.637042] ISV = 0, ISS = 0x00000005
[ 45.637116] CM = 0, WnR = 0
[ 45.637182] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc3a0896000
[ 45.637575] [0000000000000000] *pgd=0000000000000000, *pud=0000000000000000
[ 45.638150] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 45.638582] Modules linked in: bnep fuse ar1335(O) nvs_bmi160 pwm_pca9685 nvs bluedroid_pm ip_tables x_tables
[ 45.643329] CPU: 3 PID: 30 Comm: kworker/3:0 Tainted: G O 4.9.108 #2
[ 45.650686] Hardware name: jetson-xavier (DT)
[ 45.655375] Workqueue: events hpd_worker
[ 45.659192] task: ffffffc3edb68000 task.stack: ffffffc3edb70000
[ 45.665388] PC is at tegra_nvdisp_head_enable+0x864/0x1448
[ 45.670803] LR is at tegra_nvdisp_head_enable+0x8e4/0x1448
[ 45.676059] pc : [<ffffff800862bf34>] lr : [<ffffff800862bfb4>] pstate: 20c00045
[ 45.683404] sp : ffffffc3edb73b30
[ 45.687074] x29: ffffffc3edb73b30 x28: ffffffc3c7c4e000
[ 45.692587] x27: 0000000000000009 x26: 0000000000010000
[ 45.698272] x25: 0000000000020000 x24: 0000000000000000
[ 45.703524] x23: 0000000000000000 x22: ffffffc3e9082078
[ 45.708597] x21: 00000000ffffffff x20: 0000000000000008
[ 45.714120] x19: ffffffc3c7c48000 x18: 0000000000000010
[ 45.719808] x17: 0000007f7967eb10 x16: 0000000000001028
[ 45.725486] x15: 0000000000000006 x14: 0000000000000002
[ 45.731173] x13: 0000000000000000 x12: 0000000000010101
[ 45.736947] x11: 000000000000032e x10: 0000000000000000
[ 45.742730] x9 : 000000000000032e x8 : 0000000000000006
[ 45.748245] x7 : 0000000000000002 x6 : 0000000000000004
[ 45.753757] x5 : 000000000000032e x4 : 0000000000000000
[ 45.759347] x3 : 0000000000000000 x2 : 0000000000000000
[ 45.764432] x1 : 0000000000000000 x0 : 0000000000000000
[ 45.770021]
Below is the diff on sources now
diff --git a/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-cvb-p2822-0000-a00.dtsi b/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-cvb-p2822-0000-a00.dtsi
index f1c5749..27ee5ce 100644
--- a/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-cvb-p2822-0000-a00.dtsi
+++ b/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-cvb-p2822-0000-a00.dtsi
@@ -51,7 +51,7 @@
};
};
};
-
+ /*
i2c@c240000 {
ucsi_ccg: ucsi_ccg@8 {
compatible = "nvidia,ucsi_ccg";
@@ -60,7 +60,8 @@
interrupt-parent = <&tegra_aon_gpio>;
interrupts = <TEGRA194_AON_GPIO(BB, 2) 0>;
wakeup-source;
- status = "okay";
+ status = "disabled";
};
};
+ */
};
diff --git a/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-platforms/tegra194-comms.dtsi b/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-platforms/tegra194-comms.dtsi
index 1985c0f..75664dc 100644
--- a/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-platforms/tegra194-comms.dtsi
+++ b/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-platforms/tegra194-comms.dtsi
@@ -70,7 +70,7 @@
lvds_pwdn {
gpio-hog;
- output-high;
+ output-low;
label = "lvds_pwdn";
gpios = <TEGRA194_MAIN_GPIO(Z, 2) 0>;
status = "okay";
diff --git a/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2822-disp.dtsi b/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2822-disp.dtsi
index c647bdd..dd2c305 100644
--- a/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2822-disp.dtsi
+++ b/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2822-disp.dtsi
@@ -92,6 +92,9 @@
&sor1_dp_display {
status = "okay";
nvidia,is_ext_dp_panel = <1>;
+ disp-default-out {
+ nvidia,out-flags = <TEGRA_DC_OUT_HOTPLUG_HIGH>;
+ };
};
&sor2 {
diff --git a/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2888-0001-p2822-0000-common.dtsi b/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2888-0001-p2822-0000-common.dtsi
index 7c6bbc1..6d0550d 100644
--- a/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2888-0001-p2822-0000-common.dtsi
+++ b/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2888-0001-p2822-0000-common.dtsi
@@ -258,6 +258,15 @@
};
};
+ i2c@3180000 {
+ lvds-bridge@20 {
+ compatible = "nxp,ptn3460";
+ reg = <0x20>;
+ edid-emulation = <4>;
+ status = "okay";
+ };
+ };
+
host1x {
dpaux@155F0000 {
status = "okay";
@@ -287,11 +296,11 @@
&sor0 {
- nvidia,typec-port = /bits/ 8 <0>;
+ /* nvidia,typec-port = /bits/ 8 <0>; */
};
&sor1 {
- nvidia,typec-port = /bits/ 8 <1>;
+ /* nvidia,typec-port = /bits/ 8 <1>; */
};
#if LINUX_VERSION >= 414
diff --git a/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-powermon-p2888.dtsi b/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-powermon-p2888.dtsi
index a1c4cb8..3529b39 100644
--- a/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-powermon-p2888.dtsi
+++ b/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-powermon-p2888.dtsi
@@ -20,7 +20,7 @@
offset = <40>;
};
};
-
+ /*
i2c@c240000 {
ina3221x_40: ina3221x@40 {
compatible = "ti,ina3221x";
@@ -79,4 +79,5 @@
};
};
};
+ */
};
diff --git a/kernel/kernel-4.9/arch/arm64/configs/tegra_ar1335_defconfig b/kernel/kernel-4.9/arch/arm64/configs/tegra_ar1335_defconfig
index 0fe686f..7b99162 100644
--- a/kernel/kernel-4.9/arch/arm64/configs/tegra_ar1335_defconfig
+++ b/kernel/kernel-4.9/arch/arm64/configs/tegra_ar1335_defconfig
@@ -967,3 +967,8 @@ CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
CONFIG_ARCH_TEGRA_18x_SOC=y
CONFIG_ARCH_TEGRA_19x_SOC=y
+CONFIG_VIDEOMODE_HELPERS=y
+CONFIG_DRM=y
+CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_PANEL_SIMPLE=y
+CONFIG_DRM_NXP_PTN3460=y
\ No newline at end of file
diff --git a/kernel/kernel-4.9/drivers/gpu/drm/bridge/nxp-ptn3460.c b/kernel/kernel-4.9/drivers/gpu/drm/bridge/nxp-ptn3460.c
index f1a9993..7545c24 100644
--- a/kernel/kernel-4.9/drivers/gpu/drm/bridge/nxp-ptn3460.c
+++ b/kernel/kernel-4.9/drivers/gpu/drm/bridge/nxp-ptn3460.c
@@ -325,7 +325,7 @@ static int ptn3460_probe(struct i2c_client *client,
if (IS_ERR(ptn_bridge->gpio_pd_n)) {
ret = PTR_ERR(ptn_bridge->gpio_pd_n);
dev_err(dev, "cannot get gpio_pd_n %d\n", ret);
- return ret;
+ //return ret;
}
/*
@@ -337,7 +337,7 @@ static int ptn3460_probe(struct i2c_client *client,
if (IS_ERR(ptn_bridge->gpio_rst_n)) {
ret = PTR_ERR(ptn_bridge->gpio_rst_n);
DRM_ERROR("cannot get gpio_rst_n %d\n", ret);
- return ret;
+ //return ret;
}
ret = of_property_read_u32(dev->of_node, "edid-emulation",
As you can guess, USB type C controller disabled, support for bridge added. Are we making any obvious mistakes ?