diff mbox series

[3/4] ARM: dts: qcom: msm8974-klte: add support for display

Message ID 20210124135610.1779295-3-iskren.chernev@gmail.com (mailing list archive)
State Superseded
Headers show
Series [1/4] ARM: dts: qcom: msm8974: add gpu support | expand

Commit Message

Iskren Chernev Jan. 24, 2021, 1:56 p.m. UTC
From: Samuel Pascua <pascua.samuel.14@gmail.com>

Add initial support for the display found on the Samsung Galaxy 5 (klte)
phone. This is based on work from Jonathan Marek & Brian Masney.

Signed-off-by: Samuel Pascua <pascua.samuel.14@gmail.com>
Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
---
 .../boot/dts/qcom-msm8974-samsung-klte.dts    | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)

Comments

Konrad Dybcio Jan. 24, 2021, 3:04 p.m. UTC | #1
> +	mdss@fd900000 {
> +		status = "ok";
> +
> +		mdp@fd900000 {
> +			status = "ok";
> +		};
> +
> +		dsi@fd922800 {
> +			status = "ok";
> +
> +			vdda-supply = <&pma8084_l2>;
> +			vdd-supply = <&pma8084_l22>;
> +			vddio-supply = <&pma8084_l12>;
> +
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			ports {
> +				port@1 {
> +					endpoint {
> +						remote-endpoint = <&panel_in>;
> +						data-lanes = <0 1 2 3>;
> +					};
> +				};
> +			};
> +
> +			panel: panel@0 {
> +				reg = <0>;
> +				compatible = "samsung,s6e3fa2";
> +
> +				pinctrl-names = "default";
> +				pinctrl-0 = <&panel_pin>;
> +
> +				port {
> +					panel_in: endpoint {
> +						remote-endpoint = <&dsi0_out>;
> +					};
> +				};
> +			};
> +		};
> +
> +		dsi-phy@fd922a00 {
> +			status = "ok";
> +
> +			vddio-supply = <&pma8084_l12>;
> +		};
> +	};
>  };
>  

Please use &label here. If there's none, add them in msm8974.dtsi.


Konrad
Luca Weiss Jan. 24, 2021, 5:31 p.m. UTC | #2
Hi Konrad,

On Sonntag, 24. Jänner 2021 16:04:13 CET Konrad Dybcio wrote:
> > +	mdss@fd900000 {
> > +		status = "ok";
> > +
> > +		mdp@fd900000 {
> > +			status = "ok";
> > +		};
> > +
> > +		dsi@fd922800 {
> > +			status = "ok";
> > +
> > +			vdda-supply = <&pma8084_l2>;
> > +			vdd-supply = <&pma8084_l22>;
> > +			vddio-supply = <&pma8084_l12>;
> > +
> > +			#address-cells = <1>;
> > +			#size-cells = <0>;
> > +
> > +			ports {
> > +				port@1 {
> > +					endpoint {
> > +						remote-
endpoint = <&panel_in>;
> > +						data-lanes 
= <0 1 2 3>;
> > +					};
> > +				};
> > +			};
> > +
> > +			panel: panel@0 {
> > +				reg = <0>;
> > +				compatible = "samsung,s6e3fa2";
> > +
> > +				pinctrl-names = "default";
> > +				pinctrl-0 = <&panel_pin>;
> > +
> > +				port {
> > +					panel_in: endpoint {
> > +						remote-
endpoint = <&dsi0_out>;
> > +					};
> > +				};
> > +			};
> > +		};
> > +
> > +		dsi-phy@fd922a00 {
> > +			status = "ok";
> > +
> > +			vddio-supply = <&pma8084_l12>;
> > +		};
> > +	};
> > 
> >  };
> 
> Please use &label here. If there's none, add them in msm8974.dtsi.
> 

All msm8974 dts(i) files use this style. Deviating from it for this doesn't 
make sense. And yes msm8974 should probably be converted to the newer label 
style (as was done with msm8916 a while ago).

> 
> Konrad

Regards
Luca
Konrad Dybcio Jan. 24, 2021, 5:33 p.m. UTC | #3
> All msm8974 dts(i) files use this style. Deviating from it for this doesn't 
> make sense. And yes msm8974 should probably be converted to the newer label 
> style (as was done with msm8916 a while ago).

I have a >3k lines commit fixing that. Adding more code that strays from the new style doesn't really help.


Konrad
Bjorn Andersson Jan. 25, 2021, 3:40 p.m. UTC | #4
On Sun 24 Jan 11:33 CST 2021, Konrad Dybcio wrote:

> 
> > All msm8974 dts(i) files use this style. Deviating from it for this doesn't 
> > make sense. And yes msm8974 should probably be converted to the newer label 
> > style (as was done with msm8916 a while ago).
> 
> I have a >3k lines commit fixing that. Adding more code that strays
> from the new style doesn't really help.
> 

I know how bad it is, so I understand your desire to not have to rebase
that, but I will merge things as they become ready on the list.

So please post your change (perhaps it's posted and I'm failing to find
it in my inbox?) and I'd be happy to merge it so we get it cleaned up!

Thanks,
Bjorn
Konrad Dybcio Jan. 25, 2021, 3:47 p.m. UTC | #5
> I know how bad it is, so I understand your desire to not have to rebase
> that, but I will merge things as they become ready on the list.
>
> So please post your change (perhaps it's posted and I'm failing to find
> it in my inbox?) and I'd be happy to merge it so we get it cleaned up!
>
> Thanks,
> Bjorn


Here it is: [1]


Be aware that it truly is humongous and should be split (I couldn't resist adding missing pins/dma while cleaning things up) and it.. was not really intended to be sent as-is. It's also supposed to work on the previous release of Linux, so some Samsung DTs in particular changed since and will need some manual rebasing. But I'll happily leave it as a reference if somebody has the time to pick it up. The konrad/8974 branch in this repo contains more (beware, GPU ones are untested!) 8974 fixes and I have some more on my drive that are.. not really ready for their prime time just yet either..


Konrad



[1] https://github.com/SoMainline/linux/commit/291ea6860f8b95df67d63fbd378d61b3a157ac15
Bjorn Andersson Jan. 25, 2021, 3:57 p.m. UTC | #6
On Mon 25 Jan 09:47 CST 2021, Konrad Dybcio wrote:

> 
> > I know how bad it is, so I understand your desire to not have to rebase
> > that, but I will merge things as they become ready on the list.
> >
> > So please post your change (perhaps it's posted and I'm failing to find
> > it in my inbox?) and I'd be happy to merge it so we get it cleaned up!
> >
> > Thanks,
> > Bjorn
> 
> 
> Here it is: [1]
> 
> 
> Be aware that it truly is humongous and should be split (I couldn't
> resist adding missing pins/dma while cleaning things up) and it.. was
> not really intended to be sent as-is. It's also supposed to work on
> the previous release of Linux, so some Samsung DTs in particular
> changed since and will need some manual rebasing. But I'll happily
> leave it as a reference if somebody has the time to pick it up. The
> konrad/8974 branch in this repo contains more (beware, GPU ones are
> untested!) 8974 fixes and I have some more on my drive that are.. not
> really ready for their prime time just yet either..
> 

I like the end result, so please spend some time trying to get this
upstream (which would save you from having to rebase that going forward
:))

As you say I don't think it's appropriate to post or merge it as is, but
you should be able to send patches related to the 7 steps described in
the commit message - and don't be afraid of splitting it in more than
those patches. And we don't need to merge them all at once either...

Regards,
Bjorn
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts
index 5a7ac4a31031f..19c96b47a5dbd 100644
--- a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts
@@ -453,6 +453,16 @@  int {
 				bias-pull-down;
 			};
 		};
+
+		panel_pin: panel {
+			te {
+				pins = "gpio12";
+				function = "mdp_vsync";
+
+				drive-strength = <2>;
+				bias-disable;
+			};
+		};
 	};
 
 	sdhc_1: sdhci@f9824900 {
@@ -705,6 +715,54 @@  opp_table {
 	adreno@fdb00000 {
 		status = "ok";
 	};
+
+	mdss@fd900000 {
+		status = "ok";
+
+		mdp@fd900000 {
+			status = "ok";
+		};
+
+		dsi@fd922800 {
+			status = "ok";
+
+			vdda-supply = <&pma8084_l2>;
+			vdd-supply = <&pma8084_l22>;
+			vddio-supply = <&pma8084_l12>;
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			ports {
+				port@1 {
+					endpoint {
+						remote-endpoint = <&panel_in>;
+						data-lanes = <0 1 2 3>;
+					};
+				};
+			};
+
+			panel: panel@0 {
+				reg = <0>;
+				compatible = "samsung,s6e3fa2";
+
+				pinctrl-names = "default";
+				pinctrl-0 = <&panel_pin>;
+
+				port {
+					panel_in: endpoint {
+						remote-endpoint = <&dsi0_out>;
+					};
+				};
+			};
+		};
+
+		dsi-phy@fd922a00 {
+			status = "ok";
+
+			vddio-supply = <&pma8084_l12>;
+		};
+	};
 };
 
 &spmi_bus {