summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPadmanabhan Komanduru <pkomandu@codeaurora.org>2015-04-27 11:09:59 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:42:09 -0700
commitb0e9f4abc48b4581996d17a6711ad1b3769dd3f3 (patch)
tree0ef56c1b2bfdce6dad335695d87973271d0c559d
parent3f2675c9cdffa29cf1c65f0363b8629368ee13b0 (diff)
ARM: dts: msm: specify DSI panel regulators in panel dtsi node
Regulators that are needed to supply power to the panel are currently specified in the DSI controller dtsi node. This limits the support of multiple panels on a single software build, since every panel may have a different set of regulator supply configurations. Hence, add the driver support to specify the panel regulators in panel dtsi file instead of mdss dtsi file and update the panel dtsi files accordingly. Change-Id: Icd512f0bcc353d4e856b9dbe5dead5a108f1318b Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org> [cip@codeaurora.org: Removed .dtsi file updates] Signed-off-by: Clarence Ip <cip@codeaurora.org>
-rw-r--r--Documentation/devicetree/bindings/fb/mdss-dsi-ctrl.txt36
-rw-r--r--Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt36
-rw-r--r--drivers/video/fbdev/msm/mdss_dsi.c31
3 files changed, 60 insertions, 43 deletions
diff --git a/Documentation/devicetree/bindings/fb/mdss-dsi-ctrl.txt b/Documentation/devicetree/bindings/fb/mdss-dsi-ctrl.txt
index 2293c28fe1f9..ea440c97f51e 100644
--- a/Documentation/devicetree/bindings/fb/mdss-dsi-ctrl.txt
+++ b/Documentation/devicetree/bindings/fb/mdss-dsi-ctrl.txt
@@ -49,12 +49,6 @@ Optional properties:
-- qcom,supply-post-on-sleep: time to sleep (ms) after turning on
-- qcom,supply-pre-off-sleep: time to sleep (ms) before turning off
-- qcom,supply-post-off-sleep: time to sleep (ms) after turning off
-- qcom,panel-supply-entries: A node that lists the elements of the supply used to
- power the DSI panel. There can be more than one instance
- of this binding, in which case the entry would be appended
- with the supply entry index. For a detailed description of
- fields in the supply entry, refer to the qcom,ctrl-supply-entries
- binding above.
- qcom,core-supply-entries: A node that lists the elements of the supply used to
power the DSI core. There can be more than one instance
of this binding, in which case the entry would be appended
@@ -157,34 +151,4 @@ Example:
};
};
- qcom,panel-supply-entries {
- #address-cells = <1>;
- #size-cells = <0>;
-
- qcom,panel-supply-entry@0 {
- reg = <0>;
- qcom,supply-name = "vdd";
- qcom,supply-min-voltage = <2800000>;
- qcom,supply-max-voltage = <2800000>;
- qcom,supply-enable-load = <100000>;
- qcom,supply-disable-load = <100>;
- qcom,supply-pre-on-sleep = <0>;
- qcom,supply-post-on-sleep = <0>;
- qcom,supply-pre-off-sleep = <0>;
- qcom,supply-post-off-sleep = <0>;
- };
-
- qcom,panel-supply-entry@1 {
- reg = <1>;
- qcom,supply-name = "vddio";
- qcom,supply-min-voltage = <1800000>;
- qcom,supply-max-voltage = <1800000>;
- qcom,supply-enable-load = <100000>;
- qcom,supply-disable-load = <100>;
- qcom,supply-pre-on-sleep = <0>;
- qcom,supply-post-on-sleep = <0>;
- qcom,supply-pre-off-sleep = <0>;
- qcom,supply-post-off-sleep = <0>;
- };
- };
};
diff --git a/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt b/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt
index d76e45298e0a..bf825b4cc19f 100644
--- a/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt
+++ b/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt
@@ -417,6 +417,12 @@ Optional properties:
in tandem to compress large image.
- qcom,mdss-dsc-config-by-manufacture-cmd: A boolean to indicates panel use manufacture command to setup pps
instead of standard dcs type 0x0A.
+- qcom,panel-supply-entries: A node that lists the elements of the supply used to
+ power the DSI panel. There can be more than one instance
+ of this binding, in which case the entry would be appended
+ with the supply entry index. For a detailed description of
+ fields in the supply entry, refer to the qcom,ctrl-supply-entries
+ binding above.
Note, if a given optional qcom,* binding is not present, then the driver will configure
the default values specified.
@@ -569,5 +575,35 @@ Example:
qcom,mdss-dsc-ich-reset-override = <0>;
qcom,mdss-dsc-data-path-mode = "1p1d";
qcom,mdss-dsc-config-by-manufacture-cmd;
+ qcom,panel-supply-entries {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ qcom,panel-supply-entry@0 {
+ reg = <0>;
+ qcom,supply-name = "vdd";
+ qcom,supply-min-voltage = <2800000>;
+ qcom,supply-max-voltage = <2800000>;
+ qcom,supply-enable-load = <100000>;
+ qcom,supply-disable-load = <100>;
+ qcom,supply-pre-on-sleep = <0>;
+ qcom,supply-post-on-sleep = <0>;
+ qcom,supply-pre-off-sleep = <0>;
+ qcom,supply-post-off-sleep = <0>;
+ };
+
+ qcom,panel-supply-entry@1 {
+ reg = <1>;
+ qcom,supply-name = "vddio";
+ qcom,supply-min-voltage = <1800000>;
+ qcom,supply-max-voltage = <1800000>;
+ qcom,supply-enable-load = <100000>;
+ qcom,supply-disable-load = <100>;
+ qcom,supply-pre-on-sleep = <0>;
+ qcom,supply-post-on-sleep = <0>;
+ qcom,supply-pre-off-sleep = <0>;
+ qcom,supply-post-off-sleep = <0>;
+ };
+ };
};
};
diff --git a/drivers/video/fbdev/msm/mdss_dsi.c b/drivers/video/fbdev/msm/mdss_dsi.c
index 11d8a4b55185..7779bbf29cf8 100644
--- a/drivers/video/fbdev/msm/mdss_dsi.c
+++ b/drivers/video/fbdev/msm/mdss_dsi.c
@@ -345,11 +345,12 @@ static void mdss_dsi_put_dt_vreg_data(struct device *dev,
}
static int mdss_dsi_get_dt_vreg_data(struct device *dev,
- struct dss_module_power *mp, enum dsi_pm_type module)
+ struct device_node *of_node, struct dss_module_power *mp,
+ enum dsi_pm_type module)
{
int i = 0, rc = 0;
u32 tmp = 0;
- struct device_node *of_node = NULL, *supply_node = NULL;
+ struct device_node *supply_node = NULL;
const char *pm_supply_name = NULL;
struct device_node *supply_root_node = NULL;
@@ -359,16 +360,22 @@ static int mdss_dsi_get_dt_vreg_data(struct device *dev,
return rc;
}
- of_node = dev->of_node;
-
mp->num_vreg = 0;
pm_supply_name = __mdss_dsi_pm_supply_node_name(module);
supply_root_node = of_get_child_by_name(of_node, pm_supply_name);
if (!supply_root_node) {
- pr_err("no supply entry present\n");
- goto novreg;
+ /*
+ * Try to get the root node for panel power supply using
+ * of_parse_phandle() API if of_get_child_by_name() API fails.
+ */
+ supply_root_node = of_parse_phandle(of_node, pm_supply_name, 0);
+ if (!supply_root_node) {
+ pr_err("no supply entry present\n");
+ goto novreg;
+ }
}
+
for_each_child_of_node(supply_root_node, supply_node) {
mp->num_vreg++;
}
@@ -2216,7 +2223,9 @@ static int mdss_dsi_ctrl_probe(struct platform_device *pdev)
/* Parse the regulator information */
for (i = 0; i < DSI_MAX_PM; i++) {
- rc = mdss_dsi_get_dt_vreg_data(&pdev->dev,
+ if (DSI_PANEL_PM == i)
+ continue;
+ rc = mdss_dsi_get_dt_vreg_data(&pdev->dev, pdev->dev.of_node,
&ctrl_pdata->power_data[i], i);
if (rc) {
DEV_ERR("%s: '%s' get_dt_vreg_data failed.rc=%d\n",
@@ -2456,6 +2465,14 @@ int dsi_panel_device_register(struct device_node *pan_node,
ctrl_pdev = of_find_device_by_node(dsi_ctrl_np);
+ rc = mdss_dsi_get_dt_vreg_data(&ctrl_pdev->dev, pan_node,
+ &ctrl_pdata->power_data[DSI_PANEL_PM], DSI_PANEL_PM);
+ if (rc) {
+ DEV_ERR("%s: '%s' get_dt_vreg_data failed.rc=%d\n",
+ __func__, __mdss_dsi_pm_name(DSI_PANEL_PM), rc);
+ return rc;
+ }
+
rc = mdss_dsi_regulator_init(ctrl_pdev);
if (rc) {
pr_err("%s: failed to init regulator, rc=%d\n",