Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-08-10 Thread Rob Clark
On Mon, Aug 10, 2015 at 7:25 PM, Bjorn Andersson
 wrote:
> On Tue 28 Jul 05:54 PDT 2015, Srinivas Kandagatla wrote:
>
>> This patch adds LVDS panel for IFC6410.
>>
>
> My ifc6410 doesn't have a LVDS display, so I don't think these nodes
> belong in this dts file.

fwiw, my hope was that we could implement a panel-picker for lvds+ddc,
in a similar way to handling devices that could have multiple
different dsi panels, to make this a bit more automagically
plug-and-play.. srini has done some experiments with probing panel's
edid, so we just need to figure out if vendor+device-id in edid is
reliable enough to have a global table mapping them back to panel
compat strings or whether that table needs to go in dt..

BR,
-R

> I was thinking we could have a variant including this dts file adding
> the panel, but I assume that you can mount other panels than the auo
> panel defined below?
>
>
> Either way, I think we should keep this file to define the stuff that's
> on the IFC6410 itself and then figure out how to aid people in adding
> the rest of their additions...
>
> Regards,
> Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-08-10 Thread Bjorn Andersson
On Tue 28 Jul 05:54 PDT 2015, Srinivas Kandagatla wrote:

> This patch adds LVDS panel for IFC6410.
> 

My ifc6410 doesn't have a LVDS display, so I don't think these nodes
belong in this dts file.

I was thinking we could have a variant including this dts file adding
the panel, but I assume that you can mount other panels than the auo
panel defined below?


Either way, I think we should keep this file to define the stuff that's
on the IFC6410 itself and then figure out how to aid people in adding
the rest of their additions...

Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-08-10 Thread Bjorn Andersson
On Tue 28 Jul 05:54 PDT 2015, Srinivas Kandagatla wrote:

 This patch adds LVDS panel for IFC6410.
 

My ifc6410 doesn't have a LVDS display, so I don't think these nodes
belong in this dts file.

I was thinking we could have a variant including this dts file adding
the panel, but I assume that you can mount other panels than the auo
panel defined below?


Either way, I think we should keep this file to define the stuff that's
on the IFC6410 itself and then figure out how to aid people in adding
the rest of their additions...

Regards,
Bjorn
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-08-10 Thread Rob Clark
On Mon, Aug 10, 2015 at 7:25 PM, Bjorn Andersson
bjorn.anders...@sonymobile.com wrote:
 On Tue 28 Jul 05:54 PDT 2015, Srinivas Kandagatla wrote:

 This patch adds LVDS panel for IFC6410.


 My ifc6410 doesn't have a LVDS display, so I don't think these nodes
 belong in this dts file.

fwiw, my hope was that we could implement a panel-picker for lvds+ddc,
in a similar way to handling devices that could have multiple
different dsi panels, to make this a bit more automagically
plug-and-play.. srini has done some experiments with probing panel's
edid, so we just need to figure out if vendor+device-id in edid is
reliable enough to have a global table mapping them back to panel
compat strings or whether that table needs to go in dt..

BR,
-R

 I was thinking we could have a variant including this dts file adding
 the panel, but I assume that you can mount other panels than the auo
 panel defined below?


 Either way, I think we should keep this file to define the stuff that's
 on the IFC6410 itself and then figure out how to aid people in adding
 the rest of their additions...

 Regards,
 Bjorn
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-08-07 Thread Srinivas Kandagatla



On 29/07/15 23:46, Stephen Boyd wrote:

On 07/28/2015 05:54 AM, Srinivas Kandagatla wrote:

+
+panel_3p3v: panel_3p3v {
+compatible = "regulator-fixed";
+pinctrl-0 = <_en_gpios>;
+pinctrl-names = "default";
+regulator-min-microvolt = <330>;
+regulator-max-microvolt = <330>;
+regulator-name = "panel_en_3p3v";
+regulator-type = "voltage";
+startup-delay-us = <0>;
+gpio = <_gpio 36 GPIO_ACTIVE_HIGH>;
+enable-active-high;
+regulator-boot-on;
+};


We should put gpio regulators into their own container in the root of
the tree. Similar to what was done for 8960 gpio regulators.

I agree, Will do this in next version.



+
+backlight: backlight{
+pinctrl-0 = <_bl_gpios>;
+pinctrl-names = "default";
+compatible = "gpio-backlight";
+gpios = <_gpio 26 GPIO_ACTIVE_HIGH>;
+default-on;
+};
+
+panel: auo,b101xtn01 {
+status = "okay";
+compatible = "auo,b101xtn01";
+
+ddc-i2c-bus = <>;
+backlight = <>;
+power-supply = <_3p3v>;
  };


These two nodes shouldn't be under the SoC node. They don't have
registers so they should be at the root of the tree. And we don't need
to put labels twice on nodes. If we're modifying things in board
specific dtsi files it should be fine to leave the label off if the
label is in the SoC dtsi file.

Yep, will fix it in next version.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-08-07 Thread Srinivas Kandagatla



On 29/07/15 23:46, Stephen Boyd wrote:

On 07/28/2015 05:54 AM, Srinivas Kandagatla wrote:

+
+panel_3p3v: panel_3p3v {
+compatible = regulator-fixed;
+pinctrl-0 = disp_en_gpios;
+pinctrl-names = default;
+regulator-min-microvolt = 330;
+regulator-max-microvolt = 330;
+regulator-name = panel_en_3p3v;
+regulator-type = voltage;
+startup-delay-us = 0;
+gpio = pm8921_gpio 36 GPIO_ACTIVE_HIGH;
+enable-active-high;
+regulator-boot-on;
+};


We should put gpio regulators into their own container in the root of
the tree. Similar to what was done for 8960 gpio regulators.

I agree, Will do this in next version.



+
+backlight: backlight{
+pinctrl-0 = pwm_bl_gpios;
+pinctrl-names = default;
+compatible = gpio-backlight;
+gpios = pm8921_gpio 26 GPIO_ACTIVE_HIGH;
+default-on;
+};
+
+panel: auo,b101xtn01 {
+status = okay;
+compatible = auo,b101xtn01;
+
+ddc-i2c-bus = i2c3;
+backlight = backlight;
+power-supply = panel_3p3v;
  };


These two nodes shouldn't be under the SoC node. They don't have
registers so they should be at the root of the tree. And we don't need
to put labels twice on nodes. If we're modifying things in board
specific dtsi files it should be fine to leave the label off if the
label is in the SoC dtsi file.

Yep, will fix it in next version.



--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-07-29 Thread Stephen Boyd

On 07/28/2015 05:54 AM, Srinivas Kandagatla wrote:

+
+   panel_3p3v: panel_3p3v {
+   compatible = "regulator-fixed";
+   pinctrl-0 = <_en_gpios>;
+   pinctrl-names = "default";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   regulator-name = "panel_en_3p3v";
+   regulator-type = "voltage";
+   startup-delay-us = <0>;
+   gpio = <_gpio 36 GPIO_ACTIVE_HIGH>;
+   enable-active-high;
+   regulator-boot-on;
+   };


We should put gpio regulators into their own container in the root of 
the tree. Similar to what was done for 8960 gpio regulators.



+
+   backlight: backlight{
+   pinctrl-0 = <_bl_gpios>;
+   pinctrl-names = "default";
+   compatible = "gpio-backlight";
+   gpios = <_gpio 26 GPIO_ACTIVE_HIGH>;
+   default-on;
+   };
+
+   panel: auo,b101xtn01 {
+   status = "okay";
+   compatible = "auo,b101xtn01";
+
+   ddc-i2c-bus = <>;
+   backlight = <>;
+   power-supply = <_3p3v>;
};


These two nodes shouldn't be under the SoC node. They don't have 
registers so they should be at the root of the tree. And we don't need 
to put labels twice on nodes. If we're modifying things in board 
specific dtsi files it should be fine to leave the label off if the 
label is in the SoC dtsi file.


--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-07-29 Thread Srinivas Kandagatla



On 29/07/15 06:39, Archit Taneja wrote:

Hi Srini,

On 07/28/2015 06:24 PM, Srinivas Kandagatla wrote:

This patch adds LVDS panel for IFC6410.

Signed-off-by: Rob Clark 
[Rob Clark: WIP patch]
Signed-off-by: Srinivas Kandagatla 
---
  arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 66
++
  1 file changed, 66 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
index 1ab71f1..3bdac02 100644
--- a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
@@ -63,6 +63,12 @@
  qcom,switch-mode-frequency = <320>;
  };

+pm8921_l2: l2 {
+regulator-min-microvolt = <120>;
+regulator-max-microvolt = <120>;
+bias-pull-down;
+};
+
  pm8921_l3: l3 {
  regulator-min-microvolt = <305>;
  regulator-max-microvolt = <330>;
@@ -96,6 +102,10 @@
  pm8921_lvs1: lvs1 {
  bias-pull-down;
  };
+
+pm8921_lvs7: lvs7 {
+bias-pull-down;
+};
  };
  };

@@ -119,6 +129,41 @@

  mdp: qcom,mdp@510 {
  status = "okay";
+qcom,lvds-panel = <>;


We're trying to switch to the of_graph way of representing connected
panels. With that, the above phandle will go away. This needs to be
replaced with:



Thanks for the input, I modified the panel support to use graphs which 
works perfectly fine.


thanks,
srini

 port {
 lvds_out: endpoint {
 remote_endpoint = <_in>;
 };
 };


+lvds-vccs-3p3v-supply = <_3p3v>;
+lvds-pll-vdda-supply = <_l2>;
+lvds-vdda-supply = <_lvs7>;
+};
+
+panel_3p3v: panel_3p3v {
+compatible = "regulator-fixed";
+pinctrl-0 = <_en_gpios>;
+pinctrl-names = "default";
+regulator-min-microvolt = <330>;
+regulator-max-microvolt = <330>;
+regulator-name = "panel_en_3p3v";
+regulator-type = "voltage";
+startup-delay-us = <0>;
+gpio = <_gpio 36 GPIO_ACTIVE_HIGH>;
+enable-active-high;
+regulator-boot-on;
+};
+
+backlight: backlight{
+pinctrl-0 = <_bl_gpios>;
+pinctrl-names = "default";
+compatible = "gpio-backlight";
+gpios = <_gpio 26 GPIO_ACTIVE_HIGH>;
+default-on;
+};
+
+panel: auo,b101xtn01 {
+status = "okay";
+compatible = "auo,b101xtn01";
+
+ddc-i2c-bus = <>;
+backlight = <>;
+power-supply = <_3p3v>;


and for the panel:

 port {
 auo_in: endpoint {
 remote-endpoint = <_out>;
 };
 };

Thanks,
Archit


  };

  gsbi3: gsbi@1620 {
@@ -235,6 +280,27 @@
  pm8921_gpio: gpio@150 {
  pinctrl-names = "default";
  pinctrl-0 = <_default_gpios>;
+
+pwm_bl_gpios: pwm-bl-gpios {
+pios {
+pins = "gpio26";
+bias-disable;
+function = "normal";
+qcom,drive-strength =
;
+power-source = ;
+};
+};
+
+disp_en_gpios: disp-en-gpios {
+pios {
+pins = "gpio36";
+bias-disable;
+function = "normal";
+qcom,drive-strength =
;
+power-source = ;
+};
+};
+
  wlan_default_gpios: wlan-gpios {
  pios {
  pins = "gpio43";




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-07-29 Thread Stephen Boyd

On 07/28/2015 05:54 AM, Srinivas Kandagatla wrote:

+
+   panel_3p3v: panel_3p3v {
+   compatible = regulator-fixed;
+   pinctrl-0 = disp_en_gpios;
+   pinctrl-names = default;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   regulator-name = panel_en_3p3v;
+   regulator-type = voltage;
+   startup-delay-us = 0;
+   gpio = pm8921_gpio 36 GPIO_ACTIVE_HIGH;
+   enable-active-high;
+   regulator-boot-on;
+   };


We should put gpio regulators into their own container in the root of 
the tree. Similar to what was done for 8960 gpio regulators.



+
+   backlight: backlight{
+   pinctrl-0 = pwm_bl_gpios;
+   pinctrl-names = default;
+   compatible = gpio-backlight;
+   gpios = pm8921_gpio 26 GPIO_ACTIVE_HIGH;
+   default-on;
+   };
+
+   panel: auo,b101xtn01 {
+   status = okay;
+   compatible = auo,b101xtn01;
+
+   ddc-i2c-bus = i2c3;
+   backlight = backlight;
+   power-supply = panel_3p3v;
};


These two nodes shouldn't be under the SoC node. They don't have 
registers so they should be at the root of the tree. And we don't need 
to put labels twice on nodes. If we're modifying things in board 
specific dtsi files it should be fine to leave the label off if the 
label is in the SoC dtsi file.


--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-07-29 Thread Srinivas Kandagatla



On 29/07/15 06:39, Archit Taneja wrote:

Hi Srini,

On 07/28/2015 06:24 PM, Srinivas Kandagatla wrote:

This patch adds LVDS panel for IFC6410.

Signed-off-by: Rob Clark robdcl...@gmail.com
[Rob Clark: WIP patch]
Signed-off-by: Srinivas Kandagatla srinivas.kandaga...@linaro.org
---
  arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 66
++
  1 file changed, 66 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
index 1ab71f1..3bdac02 100644
--- a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
@@ -63,6 +63,12 @@
  qcom,switch-mode-frequency = 320;
  };

+pm8921_l2: l2 {
+regulator-min-microvolt = 120;
+regulator-max-microvolt = 120;
+bias-pull-down;
+};
+
  pm8921_l3: l3 {
  regulator-min-microvolt = 305;
  regulator-max-microvolt = 330;
@@ -96,6 +102,10 @@
  pm8921_lvs1: lvs1 {
  bias-pull-down;
  };
+
+pm8921_lvs7: lvs7 {
+bias-pull-down;
+};
  };
  };

@@ -119,6 +129,41 @@

  mdp: qcom,mdp@510 {
  status = okay;
+qcom,lvds-panel = panel;


We're trying to switch to the of_graph way of representing connected
panels. With that, the above phandle will go away. This needs to be
replaced with:



Thanks for the input, I modified the panel support to use graphs which 
works perfectly fine.


thanks,
srini

 port {
 lvds_out: endpoint {
 remote_endpoint = auo_in;
 };
 };


+lvds-vccs-3p3v-supply = ext_3p3v;
+lvds-pll-vdda-supply = pm8921_l2;
+lvds-vdda-supply = pm8921_lvs7;
+};
+
+panel_3p3v: panel_3p3v {
+compatible = regulator-fixed;
+pinctrl-0 = disp_en_gpios;
+pinctrl-names = default;
+regulator-min-microvolt = 330;
+regulator-max-microvolt = 330;
+regulator-name = panel_en_3p3v;
+regulator-type = voltage;
+startup-delay-us = 0;
+gpio = pm8921_gpio 36 GPIO_ACTIVE_HIGH;
+enable-active-high;
+regulator-boot-on;
+};
+
+backlight: backlight{
+pinctrl-0 = pwm_bl_gpios;
+pinctrl-names = default;
+compatible = gpio-backlight;
+gpios = pm8921_gpio 26 GPIO_ACTIVE_HIGH;
+default-on;
+};
+
+panel: auo,b101xtn01 {
+status = okay;
+compatible = auo,b101xtn01;
+
+ddc-i2c-bus = i2c3;
+backlight = backlight;
+power-supply = panel_3p3v;


and for the panel:

 port {
 auo_in: endpoint {
 remote-endpoint = lvds_out;
 };
 };

Thanks,
Archit


  };

  gsbi3: gsbi@1620 {
@@ -235,6 +280,27 @@
  pm8921_gpio: gpio@150 {
  pinctrl-names = default;
  pinctrl-0 = wlan_default_gpios;
+
+pwm_bl_gpios: pwm-bl-gpios {
+pios {
+pins = gpio26;
+bias-disable;
+function = normal;
+qcom,drive-strength =
PMIC_GPIO_STRENGTH_HIGH;
+power-source = PM8921_GPIO_S4;
+};
+};
+
+disp_en_gpios: disp-en-gpios {
+pios {
+pins = gpio36;
+bias-disable;
+function = normal;
+qcom,drive-strength =
PMIC_GPIO_STRENGTH_HIGH;
+power-source = PM8921_GPIO_S4;
+};
+};
+
  wlan_default_gpios: wlan-gpios {
  pios {
  pins = gpio43;




--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-07-28 Thread Archit Taneja

Hi Srini,

On 07/28/2015 06:24 PM, Srinivas Kandagatla wrote:

This patch adds LVDS panel for IFC6410.

Signed-off-by: Rob Clark 
[Rob Clark: WIP patch]
Signed-off-by: Srinivas Kandagatla 
---
  arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 66 ++
  1 file changed, 66 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts 
b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
index 1ab71f1..3bdac02 100644
--- a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
@@ -63,6 +63,12 @@
qcom,switch-mode-frequency = <320>;
};

+   pm8921_l2: l2 {
+   regulator-min-microvolt = <120>;
+   regulator-max-microvolt = <120>;
+   bias-pull-down;
+   };
+
pm8921_l3: l3 {
regulator-min-microvolt = <305>;
regulator-max-microvolt = <330>;
@@ -96,6 +102,10 @@
pm8921_lvs1: lvs1 {
bias-pull-down;
};
+
+   pm8921_lvs7: lvs7 {
+   bias-pull-down;
+   };
};
};

@@ -119,6 +129,41 @@

mdp: qcom,mdp@510 {
status = "okay";
+   qcom,lvds-panel = <>;


We're trying to switch to the of_graph way of representing connected
panels. With that, the above phandle will go away. This needs to be 
replaced with:


port {
lvds_out: endpoint {
remote_endpoint = <_in>;
};
};


+   lvds-vccs-3p3v-supply = <_3p3v>;
+   lvds-pll-vdda-supply = <_l2>;
+   lvds-vdda-supply = <_lvs7>;
+   };
+
+   panel_3p3v: panel_3p3v {
+   compatible = "regulator-fixed";
+   pinctrl-0 = <_en_gpios>;
+   pinctrl-names = "default";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   regulator-name = "panel_en_3p3v";
+   regulator-type = "voltage";
+   startup-delay-us = <0>;
+   gpio = <_gpio 36 GPIO_ACTIVE_HIGH>;
+   enable-active-high;
+   regulator-boot-on;
+   };
+
+   backlight: backlight{
+   pinctrl-0 = <_bl_gpios>;
+   pinctrl-names = "default";
+   compatible = "gpio-backlight";
+   gpios = <_gpio 26 GPIO_ACTIVE_HIGH>;
+   default-on;
+   };
+
+   panel: auo,b101xtn01 {
+   status = "okay";
+   compatible = "auo,b101xtn01";
+
+   ddc-i2c-bus = <>;
+   backlight = <>;
+   power-supply = <_3p3v>;


and for the panel:

port {
auo_in: endpoint {
remote-endpoint = <_out>;
};
};

Thanks,
Archit


};

gsbi3: gsbi@1620 {
@@ -235,6 +280,27 @@
pm8921_gpio: gpio@150 {
pinctrl-names = "default";
pinctrl-0 = <_default_gpios>;
+
+   pwm_bl_gpios: pwm-bl-gpios {
+   pios {
+   pins = "gpio26";
+   bias-disable;
+   function = "normal";
+   qcom,drive-strength = 
;
+   power-source = 
;
+   };
+   };
+
+   disp_en_gpios: disp-en-gpios {
+   pios {
+   pins = "gpio36";
+   bias-disable;
+   function = "normal";
+   qcom,drive-strength = 

Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-07-28 Thread Rob Clark
On Tue, Jul 28, 2015 at 1:50 PM, Andreas Färber  wrote:
> Am 28.07.2015 um 14:54 schrieb Srinivas Kandagatla:
>> This patch adds LVDS panel for IFC6410.
>>
>> Signed-off-by: Rob Clark 
>> [Rob Clark: WIP patch]
>> Signed-off-by: Srinivas Kandagatla 
>> ---
>>  arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 66 
>> ++
>>  1 file changed, 66 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts 
>> b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
>> index 1ab71f1..3bdac02 100644
>> --- a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
>> +++ b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
>> @@ -63,6 +63,12 @@
>>   qcom,switch-mode-frequency = <320>;
>>   };
>>
>> + pm8921_l2: l2 {
>> + regulator-min-microvolt = <120>;
>> + regulator-max-microvolt = <120>;
>> + bias-pull-down;
>> + };
>> +
>>   pm8921_l3: l3 {
>>   regulator-min-microvolt = <305>;
>>   regulator-max-microvolt = <330>;
>> @@ -96,6 +102,10 @@
>>   pm8921_lvs1: lvs1 {
>>   bias-pull-down;
>>   };
>> +
>> + pm8921_lvs7: lvs7 {
>> + bias-pull-down;
>> + };
>>   };
>>   };
>>
>> @@ -119,6 +129,41 @@
>>
>>   mdp: qcom,mdp@510 {
>>   status = "okay";
>> + qcom,lvds-panel = <>;
>
> In my testing this broke/uglified HDMI output. Since not everyone has
> that LVDS panel attached, or might have a different panel type, I don't
> think the panel node belongs in the generic -ifc6410.dts file.
> I suggest you add an -ifc6410+inforce-lvds.dts or so for that.

I think the problem is not so much the dt bindings, since we have an
i2c/ddc where we can probe the panel's edid and see if it is actually
attached.

Probably panel_simple_probe() should attempt to read edid (or at least
first block) if ddc is not null, and return an error if that times
out.  That way we could tell at runtime whether the panel is there or
not.

BR,
-R

>> + lvds-vccs-3p3v-supply = <_3p3v>;
>> + lvds-pll-vdda-supply = <_l2>;
>> + lvds-vdda-supply = <_lvs7>;
>> + };
>> +
>> + panel_3p3v: panel_3p3v {
>
> s/_/-/ ?
>
>> + compatible = "regulator-fixed";
>> + pinctrl-0 = <_en_gpios>;
>> + pinctrl-names = "default";
>> + regulator-min-microvolt = <330>;
>> + regulator-max-microvolt = <330>;
>> + regulator-name = "panel_en_3p3v";
>> + regulator-type = "voltage";
>> + startup-delay-us = <0>;
>> + gpio = <_gpio 36 GPIO_ACTIVE_HIGH>;
>> + enable-active-high;
>> + regulator-boot-on;
>> + };
>> +
>> + backlight: backlight{
>> + pinctrl-0 = <_bl_gpios>;
>> + pinctrl-names = "default";
>> + compatible = "gpio-backlight";
>> + gpios = <_gpio 26 GPIO_ACTIVE_HIGH>;
>> + default-on;
>> + };
>> +
>> + panel: auo,b101xtn01 {
>
> panel: panel { ?
>
> Regards,
> Andreas
>
>> + status = "okay";
>> + compatible = "auo,b101xtn01";
>> +
>> + ddc-i2c-bus = <>;
>> + backlight = <>;
>> + power-supply = <_3p3v>;
>>   };
>>
>>   gsbi3: gsbi@1620 {
>> @@ -235,6 +280,27 @@
>>   pm8921_gpio: gpio@150 {
>>   pinctrl-names = "default";
>>   pinctrl-0 = <_default_gpios>;
>> +
>> + pwm_bl_gpios: pwm-bl-gpios {
>> + pios {
>> + pins = "gpio26";
>> + bias-disable;
>> + function = "normal";
>> + qcom,drive-strength = 
>> ;
>> + power-source = 
>> ;
>> + };
>> + };
>> +
>> + disp_en_gpios: disp-en-gpios {
>> + pios {
>> 

Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-07-28 Thread Andreas Färber
Am 28.07.2015 um 14:54 schrieb Srinivas Kandagatla:
> This patch adds LVDS panel for IFC6410.
> 
> Signed-off-by: Rob Clark 
> [Rob Clark: WIP patch]
> Signed-off-by: Srinivas Kandagatla 
> ---
>  arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 66 
> ++
>  1 file changed, 66 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts 
> b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
> index 1ab71f1..3bdac02 100644
> --- a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
> +++ b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
> @@ -63,6 +63,12 @@
>   qcom,switch-mode-frequency = <320>;
>   };
>  
> + pm8921_l2: l2 {
> + regulator-min-microvolt = <120>;
> + regulator-max-microvolt = <120>;
> + bias-pull-down;
> + };
> +
>   pm8921_l3: l3 {
>   regulator-min-microvolt = <305>;
>   regulator-max-microvolt = <330>;
> @@ -96,6 +102,10 @@
>   pm8921_lvs1: lvs1 {
>   bias-pull-down;
>   };
> +
> + pm8921_lvs7: lvs7 {
> + bias-pull-down;
> + };
>   };
>   };
>  
> @@ -119,6 +129,41 @@
>  
>   mdp: qcom,mdp@510 {
>   status = "okay";
> + qcom,lvds-panel = <>;

In my testing this broke/uglified HDMI output. Since not everyone has
that LVDS panel attached, or might have a different panel type, I don't
think the panel node belongs in the generic -ifc6410.dts file.
I suggest you add an -ifc6410+inforce-lvds.dts or so for that.

> + lvds-vccs-3p3v-supply = <_3p3v>;
> + lvds-pll-vdda-supply = <_l2>;
> + lvds-vdda-supply = <_lvs7>;
> + };
> +
> + panel_3p3v: panel_3p3v {

s/_/-/ ?

> + compatible = "regulator-fixed";
> + pinctrl-0 = <_en_gpios>;
> + pinctrl-names = "default";
> + regulator-min-microvolt = <330>;
> + regulator-max-microvolt = <330>;
> + regulator-name = "panel_en_3p3v";
> + regulator-type = "voltage";
> + startup-delay-us = <0>;
> + gpio = <_gpio 36 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + regulator-boot-on;
> + };
> +
> + backlight: backlight{
> + pinctrl-0 = <_bl_gpios>;
> + pinctrl-names = "default";
> + compatible = "gpio-backlight";
> + gpios = <_gpio 26 GPIO_ACTIVE_HIGH>;
> + default-on;
> + };
> +
> + panel: auo,b101xtn01 {

panel: panel { ?

Regards,
Andreas

> + status = "okay";
> + compatible = "auo,b101xtn01";
> +
> + ddc-i2c-bus = <>;
> + backlight = <>;
> + power-supply = <_3p3v>;
>   };
>  
>   gsbi3: gsbi@1620 {
> @@ -235,6 +280,27 @@
>   pm8921_gpio: gpio@150 {
>   pinctrl-names = "default";
>   pinctrl-0 = <_default_gpios>;
> +
> + pwm_bl_gpios: pwm-bl-gpios {
> + pios {
> + pins = "gpio26";
> + bias-disable;
> + function = "normal";
> + qcom,drive-strength = 
> ;
> + power-source = 
> ;
> + };
> + };
> +
> + disp_en_gpios: disp-en-gpios {
> + pios {
> + pins = "gpio36";
> + bias-disable;
> + function = "normal";
> + qcom,drive-strength = 
> ;
> + power-source = 
> ;
> + };
> + };
> +
>   wlan_default_gpios: 

Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-07-28 Thread Archit Taneja

Hi Srini,

On 07/28/2015 06:24 PM, Srinivas Kandagatla wrote:

This patch adds LVDS panel for IFC6410.

Signed-off-by: Rob Clark robdcl...@gmail.com
[Rob Clark: WIP patch]
Signed-off-by: Srinivas Kandagatla srinivas.kandaga...@linaro.org
---
  arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 66 ++
  1 file changed, 66 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts 
b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
index 1ab71f1..3bdac02 100644
--- a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
@@ -63,6 +63,12 @@
qcom,switch-mode-frequency = 320;
};

+   pm8921_l2: l2 {
+   regulator-min-microvolt = 120;
+   regulator-max-microvolt = 120;
+   bias-pull-down;
+   };
+
pm8921_l3: l3 {
regulator-min-microvolt = 305;
regulator-max-microvolt = 330;
@@ -96,6 +102,10 @@
pm8921_lvs1: lvs1 {
bias-pull-down;
};
+
+   pm8921_lvs7: lvs7 {
+   bias-pull-down;
+   };
};
};

@@ -119,6 +129,41 @@

mdp: qcom,mdp@510 {
status = okay;
+   qcom,lvds-panel = panel;


We're trying to switch to the of_graph way of representing connected
panels. With that, the above phandle will go away. This needs to be 
replaced with:


port {
lvds_out: endpoint {
remote_endpoint = auo_in;
};
};


+   lvds-vccs-3p3v-supply = ext_3p3v;
+   lvds-pll-vdda-supply = pm8921_l2;
+   lvds-vdda-supply = pm8921_lvs7;
+   };
+
+   panel_3p3v: panel_3p3v {
+   compatible = regulator-fixed;
+   pinctrl-0 = disp_en_gpios;
+   pinctrl-names = default;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   regulator-name = panel_en_3p3v;
+   regulator-type = voltage;
+   startup-delay-us = 0;
+   gpio = pm8921_gpio 36 GPIO_ACTIVE_HIGH;
+   enable-active-high;
+   regulator-boot-on;
+   };
+
+   backlight: backlight{
+   pinctrl-0 = pwm_bl_gpios;
+   pinctrl-names = default;
+   compatible = gpio-backlight;
+   gpios = pm8921_gpio 26 GPIO_ACTIVE_HIGH;
+   default-on;
+   };
+
+   panel: auo,b101xtn01 {
+   status = okay;
+   compatible = auo,b101xtn01;
+
+   ddc-i2c-bus = i2c3;
+   backlight = backlight;
+   power-supply = panel_3p3v;


and for the panel:

port {
auo_in: endpoint {
remote-endpoint = lvds_out;
};
};

Thanks,
Archit


};

gsbi3: gsbi@1620 {
@@ -235,6 +280,27 @@
pm8921_gpio: gpio@150 {
pinctrl-names = default;
pinctrl-0 = wlan_default_gpios;
+
+   pwm_bl_gpios: pwm-bl-gpios {
+   pios {
+   pins = gpio26;
+   bias-disable;
+   function = normal;
+   qcom,drive-strength = 
PMIC_GPIO_STRENGTH_HIGH;
+   power-source = 
PM8921_GPIO_S4;
+   };
+   };
+
+   disp_en_gpios: disp-en-gpios {
+   pios {
+   pins = gpio36;
+   bias-disable;
+   function = 

Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-07-28 Thread Andreas Färber
Am 28.07.2015 um 14:54 schrieb Srinivas Kandagatla:
 This patch adds LVDS panel for IFC6410.
 
 Signed-off-by: Rob Clark robdcl...@gmail.com
 [Rob Clark: WIP patch]
 Signed-off-by: Srinivas Kandagatla srinivas.kandaga...@linaro.org
 ---
  arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 66 
 ++
  1 file changed, 66 insertions(+)
 
 diff --git a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts 
 b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
 index 1ab71f1..3bdac02 100644
 --- a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
 +++ b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
 @@ -63,6 +63,12 @@
   qcom,switch-mode-frequency = 320;
   };
  
 + pm8921_l2: l2 {
 + regulator-min-microvolt = 120;
 + regulator-max-microvolt = 120;
 + bias-pull-down;
 + };
 +
   pm8921_l3: l3 {
   regulator-min-microvolt = 305;
   regulator-max-microvolt = 330;
 @@ -96,6 +102,10 @@
   pm8921_lvs1: lvs1 {
   bias-pull-down;
   };
 +
 + pm8921_lvs7: lvs7 {
 + bias-pull-down;
 + };
   };
   };
  
 @@ -119,6 +129,41 @@
  
   mdp: qcom,mdp@510 {
   status = okay;
 + qcom,lvds-panel = panel;

In my testing this broke/uglified HDMI output. Since not everyone has
that LVDS panel attached, or might have a different panel type, I don't
think the panel node belongs in the generic -ifc6410.dts file.
I suggest you add an -ifc6410+inforce-lvds.dts or so for that.

 + lvds-vccs-3p3v-supply = ext_3p3v;
 + lvds-pll-vdda-supply = pm8921_l2;
 + lvds-vdda-supply = pm8921_lvs7;
 + };
 +
 + panel_3p3v: panel_3p3v {

s/_/-/ ?

 + compatible = regulator-fixed;
 + pinctrl-0 = disp_en_gpios;
 + pinctrl-names = default;
 + regulator-min-microvolt = 330;
 + regulator-max-microvolt = 330;
 + regulator-name = panel_en_3p3v;
 + regulator-type = voltage;
 + startup-delay-us = 0;
 + gpio = pm8921_gpio 36 GPIO_ACTIVE_HIGH;
 + enable-active-high;
 + regulator-boot-on;
 + };
 +
 + backlight: backlight{
 + pinctrl-0 = pwm_bl_gpios;
 + pinctrl-names = default;
 + compatible = gpio-backlight;
 + gpios = pm8921_gpio 26 GPIO_ACTIVE_HIGH;
 + default-on;
 + };
 +
 + panel: auo,b101xtn01 {

panel: panel { ?

Regards,
Andreas

 + status = okay;
 + compatible = auo,b101xtn01;
 +
 + ddc-i2c-bus = i2c3;
 + backlight = backlight;
 + power-supply = panel_3p3v;
   };
  
   gsbi3: gsbi@1620 {
 @@ -235,6 +280,27 @@
   pm8921_gpio: gpio@150 {
   pinctrl-names = default;
   pinctrl-0 = wlan_default_gpios;
 +
 + pwm_bl_gpios: pwm-bl-gpios {
 + pios {
 + pins = gpio26;
 + bias-disable;
 + function = normal;
 + qcom,drive-strength = 
 PMIC_GPIO_STRENGTH_HIGH;
 + power-source = 
 PM8921_GPIO_S4;
 + };
 + };
 +
 + disp_en_gpios: disp-en-gpios {
 + pios {
 + pins = gpio36;
 + bias-disable;
 + function = normal;
 + qcom,drive-strength = 
 PMIC_GPIO_STRENGTH_HIGH;
 + power-source = 
 PM8921_GPIO_S4;
 + };
 + };
 +
   wlan_default_gpios: 

Re: [PATCH v1 7/7] ARM: dts: ifc6410: add inforce LVDS panel support

2015-07-28 Thread Rob Clark
On Tue, Jul 28, 2015 at 1:50 PM, Andreas Färber afaer...@suse.de wrote:
 Am 28.07.2015 um 14:54 schrieb Srinivas Kandagatla:
 This patch adds LVDS panel for IFC6410.

 Signed-off-by: Rob Clark robdcl...@gmail.com
 [Rob Clark: WIP patch]
 Signed-off-by: Srinivas Kandagatla srinivas.kandaga...@linaro.org
 ---
  arch/arm/boot/dts/qcom-apq8064-ifc6410.dts | 66 
 ++
  1 file changed, 66 insertions(+)

 diff --git a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts 
 b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
 index 1ab71f1..3bdac02 100644
 --- a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
 +++ b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
 @@ -63,6 +63,12 @@
   qcom,switch-mode-frequency = 320;
   };

 + pm8921_l2: l2 {
 + regulator-min-microvolt = 120;
 + regulator-max-microvolt = 120;
 + bias-pull-down;
 + };
 +
   pm8921_l3: l3 {
   regulator-min-microvolt = 305;
   regulator-max-microvolt = 330;
 @@ -96,6 +102,10 @@
   pm8921_lvs1: lvs1 {
   bias-pull-down;
   };
 +
 + pm8921_lvs7: lvs7 {
 + bias-pull-down;
 + };
   };
   };

 @@ -119,6 +129,41 @@

   mdp: qcom,mdp@510 {
   status = okay;
 + qcom,lvds-panel = panel;

 In my testing this broke/uglified HDMI output. Since not everyone has
 that LVDS panel attached, or might have a different panel type, I don't
 think the panel node belongs in the generic -ifc6410.dts file.
 I suggest you add an -ifc6410+inforce-lvds.dts or so for that.

I think the problem is not so much the dt bindings, since we have an
i2c/ddc where we can probe the panel's edid and see if it is actually
attached.

Probably panel_simple_probe() should attempt to read edid (or at least
first block) if ddc is not null, and return an error if that times
out.  That way we could tell at runtime whether the panel is there or
not.

BR,
-R

 + lvds-vccs-3p3v-supply = ext_3p3v;
 + lvds-pll-vdda-supply = pm8921_l2;
 + lvds-vdda-supply = pm8921_lvs7;
 + };
 +
 + panel_3p3v: panel_3p3v {

 s/_/-/ ?

 + compatible = regulator-fixed;
 + pinctrl-0 = disp_en_gpios;
 + pinctrl-names = default;
 + regulator-min-microvolt = 330;
 + regulator-max-microvolt = 330;
 + regulator-name = panel_en_3p3v;
 + regulator-type = voltage;
 + startup-delay-us = 0;
 + gpio = pm8921_gpio 36 GPIO_ACTIVE_HIGH;
 + enable-active-high;
 + regulator-boot-on;
 + };
 +
 + backlight: backlight{
 + pinctrl-0 = pwm_bl_gpios;
 + pinctrl-names = default;
 + compatible = gpio-backlight;
 + gpios = pm8921_gpio 26 GPIO_ACTIVE_HIGH;
 + default-on;
 + };
 +
 + panel: auo,b101xtn01 {

 panel: panel { ?

 Regards,
 Andreas

 + status = okay;
 + compatible = auo,b101xtn01;
 +
 + ddc-i2c-bus = i2c3;
 + backlight = backlight;
 + power-supply = panel_3p3v;
   };

   gsbi3: gsbi@1620 {
 @@ -235,6 +280,27 @@
   pm8921_gpio: gpio@150 {
   pinctrl-names = default;
   pinctrl-0 = wlan_default_gpios;
 +
 + pwm_bl_gpios: pwm-bl-gpios {
 + pios {
 + pins = gpio26;
 + bias-disable;
 + function = normal;
 + qcom,drive-strength = 
 PMIC_GPIO_STRENGTH_HIGH;
 + power-source = 
 PM8921_GPIO_S4;
 + };
 + };
 +
 + disp_en_gpios: disp-en-gpios {
 + pios {
 + pins = gpio36;
 +