Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux-yocto: enable display on QCM6490 IDP board #593

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ CONFIG_ATL1C=m
CONFIG_CAN=m
CONFIG_CAN_MCP251XFD=m

CONFIG_BACKLIGHT_PWM=m
CONFIG_DRM_PANEL_NOVATEK_NT36672E=m
CONFIG_BACKLIGHT_PWM=y
CONFIG_DRM_PANEL_NOVATEK_NT36672E=y
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please describe the issue that you have and how does this fix the issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the above configs set to m, when I tried initially it was working. But later on I found that on multiple reboots, it's not working most of the time. But when the above configs are set as y, the device boots to shell consistently. In the failure case, the device is getting stuck before UFS enumeration and hence the panel and backlight modules are not loaded.

DSI PHY supply(vreg_l10c_0p88) is shared among UFS and USB as well. We tried below experiments suspecting it is a shared resource issue:

  1. As the UFS enumeration is not happening, we tried removing the PHY supply reference from the driver, the PHY probe is going ahead, but the issue is still there.
  2. We removed disable vote on the PHY supply but the issue persists.

So, it's not related to the shared supply between DSI PHY and UFS.

Below are the last set of logs in the failure case:

[ 1.824887] platform ae01000.display-controller: Fixed dependency cycle(s) with /soc@0/display-subsystem@ae00000/dsi@ae94000
[ 1.837031] platform ae01000.display-controller: Fixed dependency cycle(s) with /soc@0/display-subsystem@ae00000/dsi@ae94000
[ 1.848618] platform ae94000.dsi: Fixed dependency cycle(s) with /soc@0/display-subsystem@ae00000/dsi@ae94000/panel@0
[ 1.859535] platform ae94000.dsi: Fixed dependency cycle(s) with /soc@0/display-subsystem@ae00000/display-controller@ae01000
[ 1.874211] msm_dsi ae94000.dsi: supply refgen not found, using dummy regulator
[ 1.882201] msm_dsi ae94000.dsi: Fixed dependency cycle(s) with /soc@0/display-subsystem@ae00000/dsi@ae94000/panel@0
[ 1.893073] mipi-dsi ae94000.dsi.0: Fixed dependency cycle(s) with /soc@0/display-subsystem@ae00000/dsi@ae94000
[ 1.904303] printk: console [netcon0] enabled
[ 1.908812] netconsole: network logging started
[ 1.919298] clk: Disabling unused clocks
[ 2.028658] scsi 0:0:0:49488: Well-known LUN MICRON MT256GARAT4U313Q 0104 PQ: 0 ANSI: 6
[ 2.041892] scsi 0:0:0:49476: Well-known LUN MICRON MT256GARAT4U313Q 0104 PQ: 0 ANSI: 6
[ 2.052772] scsi 0:0:0:49456: Well-known LUN MICRON MT256GARAT4U313Q 0104 PQ: 0 ANSI: 6

I tried debugging but I didn't get any breakthrough, so we decided to go with y.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't answer the question, why it is not working. So, the issue needs to be debugged and solved properly.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider discussing the topic with the UFS team and with @Mani-Sadhasivam , upstream ufs-qcom maintainer. Anyway, building the panel to the kernel is not a proper fix for the UFS issue.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From fe56e57b5ef4b50e75613e553e2f7609aa1ef1db Mon Sep 17 00:00:00 2001
From: Vinod Polimera <[email protected]>
Date: Fri, 10 May 2024 11:41:59 +0530
Subject: [PATCH] DENIED: arm64: dts: qcom: qcm6490-idp: disable gpu

Disable GPU to avoid adreno errors during display commit as there is
no plan to enable GPU rendering in near future on QCM6490 IDP board.

Signed-off-by: Srihitha Tangudu <[email protected]>
Upstream-Status: Denied [https://lore.kernel.org/all/[email protected]/]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply: NAK. The GPU is present onboard, so there is no need to disable it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moreover, per Ritesh's email this patch is not necessary at all. GPU works on this platform.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few of the Conrad's Adreno 643+ fixes are yet to be backported. We are in discussion with our GPU team regarding the same and adreno firmware loading enablement.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPU on SC7280 has been supported upstream since 5.16. ZAP shader has been supported for ages. I fail to see what is so special about the QCM6490 which is supposed to be very close to SC7280.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, yes, please backport the patches and provide the firmware for the board.

---
arch/arm64/boot/dts/qcom/qcm6490-idp.dts | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
index 62cdee7a8156..4b898b441a0b 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
@@ -438,6 +438,10 @@ vreg_bob_3p296: bob {
};
};

+&gpu {
+ status = "disabled";
+};
+
&mdss {
status = "okay";
};
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
From ca745a15e3fff7a233bc80564188747d259c8976 Mon Sep 17 00:00:00 2001
From: Luca Weiss <[email protected]>
Date: Tue, 19 Sep 2023 14:45:57 +0200
Subject: [PATCH 1/3] UPSTREAM: arm64: dts: qcom: pm7250b: make SID
configurable

Like other Qualcomm PMICs the PM7250B can be used on different addresses
on the SPMI bus. Use similar defines like the PMK8350 to make this
possible but skip the ifndef based on maintainer feedback.

Signed-off-by: Luca Weiss <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8e2d56f64572e0432c355093a7601bde29677490]
---
arch/arm64/boot/dts/qcom/pm7250b.dtsi | 14 +++++++-------
arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 4 ++++
2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/pm7250b.dtsi b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
index e8540c36bd99..df0afe82f250 100644
--- a/arch/arm64/boot/dts/qcom/pm7250b.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm7250b.dtsi
@@ -39,16 +39,16 @@ trip2 {
};

&spmi_bus {
- pmic@2 {
+ pmic@PM7250B_SID {
compatible = "qcom,pm7250b", "qcom,spmi-pmic";
- reg = <0x2 SPMI_USID>;
+ reg = <PM7250B_SID SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;

pm7250b_temp: temp-alarm@2400 {
compatible = "qcom,spmi-temp-alarm";
reg = <0x2400>;
- interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
+ interrupts = <PM7250B_SID 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
io-channels = <&pm7250b_adc ADC5_DIE_TEMP>;
io-channel-names = "thermal";
#thermal-sensor-cells = <0>;
@@ -60,7 +60,7 @@ pm7250b_adc: adc@3100 {
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
- interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+ interrupts = <PM7250B_SID 0x31 0x0 IRQ_TYPE_EDGE_RISING>;

channel@0 {
reg = <ADC5_REF_GND>;
@@ -141,7 +141,7 @@ channel@99 {
pm7250b_adc_tm: adc-tm@3500 {
compatible = "qcom,spmi-adc-tm5";
reg = <0x3500>;
- interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
+ interrupts = <PM7250B_SID 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
#thermal-sensor-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
@@ -159,9 +159,9 @@ pm7250b_gpios: pinctrl@c000 {
};
};

- pmic@3 {
+ pmic@PM7250B_SID1 {
compatible = "qcom,pm7250b", "qcom,spmi-pmic";
- reg = <0x3 SPMI_USID>;
+ reg = <PM7250B_SID1 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
};
diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
index 136e273d09a7..943d5a150b64 100644
--- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
+++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
@@ -5,6 +5,10 @@

/dts-v1/;

+/* PM7250B is configured to use SID2/3 */
+#define PM7250B_SID 2
+#define PM7250B_SID1 3
+
/* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */
#define PMK8350_SID 6

--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
From 97e813b982bd7a1ea716e4846befe7e6b14e77f3 Mon Sep 17 00:00:00 2001
From: Ritesh Kumar <[email protected]>
Date: Thu, 15 Feb 2024 16:09:29 +0530
Subject: [PATCH] UPSTREAM: arm64: dts: qcom: qcm6490-idp: add display and
panel

Enable Display Subsystem with Novatek NT36672E Panel
on qcm6490 idp platform.

Signed-off-by: Ritesh Kumar <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 629c635eafbaf18260c8083360745c71674640d2]
---
arch/arm64/boot/dts/qcom/qcm6490-idp.dts | 92 ++++++++++++++++++++++++
1 file changed, 92 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
index 976923610958..62cdee7a8156 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
@@ -10,6 +10,7 @@
#define PM7250B_SID1 9

#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sc7280.dtsi"
#include "pm7250b.dtsi"
@@ -32,10 +33,29 @@ aliases {
serial0 = &uart5;
};

+ pm8350c_pwm_backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pm8350c_pwm 3 65535>;
+ enable-gpios = <&pm8350c_gpios 7 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&pmic_lcd_bl_en>;
+ pinctrl-names = "default";
+ };
+
chosen {
stdout-path = "serial0:115200n8";
};

+ lcd_disp_bias: regulator-lcd-disp-bias {
+ compatible = "regulator-fixed";
+ regulator-name = "lcd_disp_bias";
+ regulator-min-microvolt = <5500000>;
+ regulator-max-microvolt = <5500000>;
+ gpio = <&pm7250b_gpios 2 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ pinctrl-0 = <&lcd_disp_bias_en>;
+ pinctrl-names = "default";
+ };
+
reserved-memory {
xbl_mem: xbl@80700000 {
reg = <0x0 0x80700000 0x0 0x100000>;
@@ -418,7 +438,79 @@ vreg_bob_3p296: bob {
};
};

+&mdss {
+ status = "okay";
+};
+
+&mdss_dsi {
+ vdda-supply = <&vreg_l6b_1p2>;
+ status = "okay";
+
+ panel@0 {
+ compatible = "novatek,nt36672e";
+ reg = <0>;
+
+ reset-gpios = <&tlmm 44 GPIO_ACTIVE_HIGH>;
+
+ vddi-supply = <&vreg_l8c_1p62>;
+ avdd-supply = <&lcd_disp_bias>;
+ avee-supply = <&lcd_disp_bias>;
+
+ backlight = <&pm8350c_pwm_backlight>;
+
+ port {
+ panel0_in: endpoint {
+ remote-endpoint = <&mdss_dsi0_out>;
+ };
+ };
+ };
+};
+
+&mdss_dsi0_out {
+ remote-endpoint = <&panel0_in>;
+ data-lanes = <0 1 2 3>;
+};
+
+&mdss_dsi_phy {
+ vdds-supply = <&vreg_l10c_0p88>;
+ status = "okay";
+};
+
+&pm7250b_gpios {
+ lcd_disp_bias_en: lcd-disp-bias-en-state {
+ pins = "gpio2";
+ function = "func1";
+ bias-disable;
+ qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
+ input-disable;
+ output-enable;
+ power-source = <0>;
+ };
+};
+
+&pm8350c_gpios {
+ pmic_lcd_bl_en: pmic-lcd-bl-en-state {
+ pins = "gpio7";
+ function = "normal";
+ bias-disable;
+ qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
+ output-low;
+ power-source = <0>;
+ };
+
+ pmic_lcd_bl_pwm: pmic-lcd-bl-pwm-state {
+ pins = "gpio8";
+ function = "func1";
+ bias-disable;
+ qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
+ output-low;
+ power-source = <0>;
+ };
+};
+
&pm8350c_pwm {
+ pinctrl-0 = <&pmic_lcd_bl_pwm>;
+ pinctrl-names = "default";
status = "okay";

multi-led {
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
From 2f80a8fb7ca208335eb6af65df03af37200866d1 Mon Sep 17 00:00:00 2001
From: Hui Liu <[email protected]>
Date: Fri, 26 Jan 2024 10:56:52 +0800
Subject: [PATCH 2/3] UPSTREAM: arm64: dts: qcom: qcm6490-idp: Add definition
for three LEDs

Add definition for three LEDs to make sure they can
be enabled base on QCOM LPG LED driver.

Signed-off-by: Hui Liu <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8385383cc2c2f7039ecc57864043112cdc7026c7]
---
arch/arm64/boot/dts/qcom/qcm6490-idp.dts | 28 ++++++++++++++++++++++++
1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
index 7d13945ce4a3..67c8215af285 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
@@ -5,6 +5,7 @@

/dts-v1/;

+#include <dt-bindings/leds/common.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sc7280.dtsi"
#include "pm7325.dtsi"
@@ -412,6 +413,33 @@ vreg_bob_3p296: bob {
};
};

+&pm8350c_pwm {
+ status = "okay";
+
+ multi-led {
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STATUS;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@2 {
+ reg = <2>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@3 {
+ reg = <3>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+ };
+};
+
&qupv3_id_0 {
status = "okay";
};
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From e6e1fb2661b989451293f4365b1d6ccb8cd74280 Mon Sep 17 00:00:00 2001
From: Umang Chheda <[email protected]>
Date: Thu, 25 Jan 2024 17:23:00 +0530
Subject: [PATCH 3/3] UPSTREAM: arm64: dts: qcom: qcm6490-idp: Include PM7250B

Include PM7250B PMIC for qcm6490-idp.

Signed-off-by: Umang Chheda <[email protected]>
Reviewed-by: Konrad Dybcio <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d967cc9cf37ea2a6c7cdb9779113f10d2910bb4c]
---
arch/arm64/boot/dts/qcom/qcm6490-idp.dts | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
index 67c8215af285..976923610958 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts
@@ -5,9 +5,14 @@

/dts-v1/;

+/* PM7250B is configured to use SID8/9 */
+#define PM7250B_SID 8
+#define PM7250B_SID1 9
+
#include <dt-bindings/leds/common.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sc7280.dtsi"
+#include "pm7250b.dtsi"
#include "pm7325.dtsi"
#include "pm8350c.dtsi"
#include "pmk8350.dtsi"
--
2.34.1

Loading