From 4ba10f08f462ffbb4898a1e9c46d81b0be674805 Mon Sep 17 00:00:00 2001 From: Fenglin Wu Date: Fri, 18 Sep 2020 10:33:43 +0800 Subject: [PATCH 1/2] dt-bindings: qcom,amoled-ecm: add display-panels property Add display-panels property for the ECM device to get the display blank and unblank notifications from the active panel device and re-enable ECM dynamically. Change-Id: Ia82f60a7f21908b69a7ba19a1884e955f0bad227 --- bindings/hwmon/qcom,amoled-ecm.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bindings/hwmon/qcom,amoled-ecm.yaml b/bindings/hwmon/qcom,amoled-ecm.yaml index 1cc8c2d1f95a..19957159ced4 100644 --- a/bindings/hwmon/qcom,amoled-ecm.yaml +++ b/bindings/hwmon/qcom,amoled-ecm.yaml @@ -53,6 +53,12 @@ properties: - const: ecm-sdam1 $ref: /schemas/types.yaml#/definitions/string-array + display-panels: + minItems: 1 + description: Array of one or more phandles of the display panel(s) + that sends the DRM blank/unblank notifications. + $ref: /schemas/types.yaml#/definitions/phandle-array + required: - compatible - reg From 9cadd4d7d22332e15ed3912e9e5759921b1d0610 Mon Sep 17 00:00:00 2001 From: Fenglin Wu Date: Wed, 16 Sep 2020 14:45:10 +0800 Subject: [PATCH 2/2] ARM: dts: msm: Add panel information to amoled-ecm for Lahaina platforms Add panel information for amoled-ecm device so that the driver can get display off/on notification from the DRM for the active panel and disable/re-enable ECM accordingly. Change-Id: If1cf00adf9cb3ee0a685575475b9dbab9cd71d98 --- qcom/lahaina-cdp.dtsi | 9 +++++++++ qcom/lahaina-mtp.dtsi | 8 ++++++++ qcom/lahaina-qrd-common.dtsi | 5 +++++ qcom/pm8350b.dtsi | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/qcom/lahaina-cdp.dtsi b/qcom/lahaina-cdp.dtsi index 21ae311b63e2..f7b317f6eddf 100644 --- a/qcom/lahaina-cdp.dtsi +++ b/qcom/lahaina-cdp.dtsi @@ -182,6 +182,15 @@ status = "ok"; }; +&pm8350b_amoled_ecm { + display-panels = <&dsi_sw43404_amoled_cmd + &dsi_sw43404_amoled_video + &dsi_sw43404_amoled_fhd_plus_cmd + &dsi_r66451_amoled_cmd + &dsi_r66451_amoled_video + &dsi_sharp_qhd_plus_dsc_cmd>; +}; + &pm8350c_switch0 { qcom,led-mask = <9>; /* Channels 1 & 4 */ qcom,symmetry-en; diff --git a/qcom/lahaina-mtp.dtsi b/qcom/lahaina-mtp.dtsi index 277333c2c9bd..74aa8aca5127 100644 --- a/qcom/lahaina-mtp.dtsi +++ b/qcom/lahaina-mtp.dtsi @@ -163,6 +163,14 @@ status = "ok"; }; +&pm8350b_amoled_ecm { + display-panels = <&dsi_sw43404_amoled_cmd + &dsi_sw43404_amoled_video + &dsi_sw43404_amoled_fhd_plus_cmd + &dsi_r66451_amoled_cmd + &dsi_r66451_amoled_video>; +}; + &pm8350c_switch0 { qcom,led-mask = <9>; /* Channels 1 & 4 */ qcom,symmetry-en; diff --git a/qcom/lahaina-qrd-common.dtsi b/qcom/lahaina-qrd-common.dtsi index 87a2b5fff5b6..ec76f9b97706 100644 --- a/qcom/lahaina-qrd-common.dtsi +++ b/qcom/lahaina-qrd-common.dtsi @@ -299,6 +299,11 @@ }; }; +&pm8350b_amoled_ecm { + display-panels = <&dsi_r66451_amoled_cmd + &dsi_r66451_amoled_video>; +}; + &soc { gpio_keys { compatible = "gpio-keys"; diff --git a/qcom/pm8350b.dtsi b/qcom/pm8350b.dtsi index c9110d289922..f92738d71ad5 100644 --- a/qcom/pm8350b.dtsi +++ b/qcom/pm8350b.dtsi @@ -208,7 +208,7 @@ }; }; - qcom,amoled-ecm@f900 { + pm8350b_amoled_ecm: qcom,amoled-ecm@f900 { compatible = "qcom,amoled-ecm"; reg = <0xf900>; nvmem-names = "amoled-ecm-sdam0", "amoled-ecm-sdam1";