diff mbox

ARM: dts: Create LogicPD-Display files

Message ID 1457116807-12696-1-git-send-email-aford173@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Adam Ford March 4, 2016, 6:40 p.m. UTC
Since there are a few different LogicPD Display Panel options,
this patch creates two dtsi files which can be included based on
which display panel is available.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
 arch/arm/boot/dts/logicpd-display_panel-15.dtsi   | 47 +++++++++++++++++++++++
 arch/arm/boot/dts/logicpd-display_panel-28.dtsi   | 40 +++++++++++++++++++
 arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts | 37 ++++--------------
 3 files changed, 95 insertions(+), 29 deletions(-)
 create mode 100644 arch/arm/boot/dts/logicpd-display_panel-15.dtsi
 create mode 100644 arch/arm/boot/dts/logicpd-display_panel-28.dtsi

Comments

Nishanth Menon March 4, 2016, 7:34 p.m. UTC | #1
On 03/04/2016 12:40 PM, Adam Ford wrote:
> Since there are a few different LogicPD Display Panel options,
> this patch creates two dtsi files which can be included based on
> which display panel is available.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---

Dumb question: any reason we cannot do this as device tree overlays?

>  arch/arm/boot/dts/logicpd-display_panel-15.dtsi   | 47 +++++++++++++++++++++++
>  arch/arm/boot/dts/logicpd-display_panel-28.dtsi   | 40 +++++++++++++++++++
>  arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts | 37 ++++--------------
>  3 files changed, 95 insertions(+), 29 deletions(-)
>  create mode 100644 arch/arm/boot/dts/logicpd-display_panel-15.dtsi
>  create mode 100644 arch/arm/boot/dts/logicpd-display_panel-28.dtsi
> 
> diff --git a/arch/arm/boot/dts/logicpd-display_panel-15.dtsi b/arch/arm/boot/dts/logicpd-display_panel-15.dtsi
> new file mode 100644
> index 0000000..8594526d2
> --- /dev/null
> +++ b/arch/arm/boot/dts/logicpd-display_panel-15.dtsi
> @@ -0,0 +1,47 @@
> +/*
> + * Common file for LogicPD Type 15 Display Panel
> + *
> + * Note that the board specific DTS file needs to specify
> + * pinctrl and enable-gpios.
> + */
> +
> +/ {
> +	aliases {
> +		display0 = &lcd0;
> +	};
> +
> +	video_reg: video_reg {
> +		compatible = "regulator-fixed";
> +		regulator-name = "fixed-supply";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +	};
> +
> +	lcd0: display@0 {
> +		compatible = "panel-dpi";
> +		label = "15";
> +		status = "okay";
> +		port {
> +			lcd_in: endpoint {
> +				remote-endpoint = <&dpi_out>;
> +			};
> +		};
> +
> +		panel-timing {
> +			clock-frequency = <9000000>;
> +			hactive = <480>;
> +			vactive = <272>;
> +			hfront-porch = <3>;
> +			hback-porch = <2>;
> +			hsync-len = <42>;
> +			vback-porch = <3>;
> +			vfront-porch = <4>;
> +			vsync-len = <11>;
> +			hsync-active = <0>;
> +			vsync-active = <0>;
> +			de-active = <1>;
> +			pixelclk-active = <1>;
> +		};
> +	};
> +};
> +
> diff --git a/arch/arm/boot/dts/logicpd-display_panel-28.dtsi b/arch/arm/boot/dts/logicpd-display_panel-28.dtsi
> new file mode 100644
> index 0000000..89ebeb9
> --- /dev/null
> +++ b/arch/arm/boot/dts/logicpd-display_panel-28.dtsi
> @@ -0,0 +1,40 @@
> +/*
> + * Common file for LogicPD Type 15 Display Panel
> + *
> + * Note that the board specific DTS file needs to specify
> + * pinctrl and enable-gpios.
> + */
> +
> +/ {
> +	aliases {
> +		display0 = &lcd0;
> +	};
> +
> +	lcd0: display@0 {
> +		compatible = "panel-dpi";
> +		label = "28";
> +		status = "okay";
> +		port {
> +			lcd_in: endpoint {
> +				remote-endpoint = <&dpi_out>;
> +			};
> +		};
> +
> +		panel-timing {
> +			clock-frequency = <9000000>;
> +			hactive = <480>;
> +			vactive = <272>;
> +			hfront-porch = <3>;
> +			hback-porch = <2>;
> +			hsync-len = <42>;
> +			vback-porch = <3>;
> +			vfront-porch = <2>;
> +			vsync-len = <11>;
> +			hsync-active = <1>;
> +			vsync-active = <1>;
> +			de-active = <1>;
> +			pixelclk-active = <0>;
> +		};
> +	};
> +};
> +
> diff --git a/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts b/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts
> index 4ed3652..a9904f4 100644
> --- a/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts
> +++ b/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts
> @@ -132,10 +132,6 @@
>  };
>  
>  / {
> -	aliases {
> -		display0 = &lcd0;
> -	};
> -
>  	video_reg: video_reg {
>  		compatible = "regulator-fixed";
>  		regulator-name = "fixed-supply";
> @@ -144,34 +140,9 @@
>  	};
>  
>  	lcd0: display@0 {
> -		compatible = "panel-dpi";
> -		label = "28";
> -		status = "okay";
> -		/* default-on; */
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&lcd_enable_pin>;
>  		enable-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>;	/* gpio155, lcd INI */
> -		port {
> -			lcd_in: endpoint {
> -				remote-endpoint = <&dpi_out>;
> -			};
> -		};
> -
> -		panel-timing {
> -			clock-frequency = <9000000>;
> -			hactive = <480>;
> -			vactive = <272>;
> -			hfront-porch = <3>;
> -			hback-porch = <2>;
> -			hsync-len = <42>;
> -			vback-porch = <3>;
> -			vfront-porch = <2>;
> -			vsync-len = <11>;
> -			hsync-active = <1>;
> -			vsync-active = <1>;
> -			de-active = <1>;
> -			pixelclk-active = <0>;
> -		};
>  	};
>  
>  	bl: backlight {
> @@ -185,6 +156,14 @@
>  	};
>  };
>  
> +/*
> + * The current production Panel is Type 28.
> + * For people with older, Type 15 displays, include
> + * logicpd-display_panel-15.dtsi instead
> + */
> +#include "logicpd-display_panel-28.dtsi"
> +
> +
>  &mmc1 {
>  	interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>;
>  	pinctrl-names = "default";
>
Adam Ford March 4, 2016, 8:31 p.m. UTC | #2
On Fri, Mar 4, 2016 at 1:34 PM, Nishanth Menon <nm@ti.com> wrote:
> On 03/04/2016 12:40 PM, Adam Ford wrote:
>> Since there are a few different LogicPD Display Panel options,
>> this patch creates two dtsi files which can be included based on
>> which display panel is available.
>>
>> Signed-off-by: Adam Ford <aford173@gmail.com>
>> ---
>
> Dumb question: any reason we cannot do this as device tree overlays?

There was a whole different discussion on a different thread about the
desire to move display stuff to the bootloader and device tree and
keep it out of userspace and the kernel.  I am just doing what I
thought the outcome was.  Tomi and Tony might have a different
opinion.  I thought by doing this, it would make it easy for people to
pick and choose which (if any LPD display they have and I tried to do
it in a similar fashion to how the SMC911x Ethernet dtsi file was done
which allows it to be included by a vareity of different boards.

adam
>
>>  arch/arm/boot/dts/logicpd-display_panel-15.dtsi   | 47 +++++++++++++++++++++++
>>  arch/arm/boot/dts/logicpd-display_panel-28.dtsi   | 40 +++++++++++++++++++
>>  arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts | 37 ++++--------------
>>  3 files changed, 95 insertions(+), 29 deletions(-)
>>  create mode 100644 arch/arm/boot/dts/logicpd-display_panel-15.dtsi
>>  create mode 100644 arch/arm/boot/dts/logicpd-display_panel-28.dtsi
>>
>> diff --git a/arch/arm/boot/dts/logicpd-display_panel-15.dtsi b/arch/arm/boot/dts/logicpd-display_panel-15.dtsi
>> new file mode 100644
>> index 0000000..8594526d2
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/logicpd-display_panel-15.dtsi
>> @@ -0,0 +1,47 @@
>> +/*
>> + * Common file for LogicPD Type 15 Display Panel
>> + *
>> + * Note that the board specific DTS file needs to specify
>> + * pinctrl and enable-gpios.
>> + */
>> +
>> +/ {
>> +     aliases {
>> +             display0 = &lcd0;
>> +     };
>> +
>> +     video_reg: video_reg {
>> +             compatible = "regulator-fixed";
>> +             regulator-name = "fixed-supply";
>> +             regulator-min-microvolt = <3300000>;
>> +             regulator-max-microvolt = <3300000>;
>> +     };
>> +
>> +     lcd0: display@0 {
>> +             compatible = "panel-dpi";
>> +             label = "15";
>> +             status = "okay";
>> +             port {
>> +                     lcd_in: endpoint {
>> +                             remote-endpoint = <&dpi_out>;
>> +                     };
>> +             };
>> +
>> +             panel-timing {
>> +                     clock-frequency = <9000000>;
>> +                     hactive = <480>;
>> +                     vactive = <272>;
>> +                     hfront-porch = <3>;
>> +                     hback-porch = <2>;
>> +                     hsync-len = <42>;
>> +                     vback-porch = <3>;
>> +                     vfront-porch = <4>;
>> +                     vsync-len = <11>;
>> +                     hsync-active = <0>;
>> +                     vsync-active = <0>;
>> +                     de-active = <1>;
>> +                     pixelclk-active = <1>;
>> +             };
>> +     };
>> +};
>> +
>> diff --git a/arch/arm/boot/dts/logicpd-display_panel-28.dtsi b/arch/arm/boot/dts/logicpd-display_panel-28.dtsi
>> new file mode 100644
>> index 0000000..89ebeb9
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/logicpd-display_panel-28.dtsi
>> @@ -0,0 +1,40 @@
>> +/*
>> + * Common file for LogicPD Type 15 Display Panel
>> + *
>> + * Note that the board specific DTS file needs to specify
>> + * pinctrl and enable-gpios.
>> + */
>> +
>> +/ {
>> +     aliases {
>> +             display0 = &lcd0;
>> +     };
>> +
>> +     lcd0: display@0 {
>> +             compatible = "panel-dpi";
>> +             label = "28";
>> +             status = "okay";
>> +             port {
>> +                     lcd_in: endpoint {
>> +                             remote-endpoint = <&dpi_out>;
>> +                     };
>> +             };
>> +
>> +             panel-timing {
>> +                     clock-frequency = <9000000>;
>> +                     hactive = <480>;
>> +                     vactive = <272>;
>> +                     hfront-porch = <3>;
>> +                     hback-porch = <2>;
>> +                     hsync-len = <42>;
>> +                     vback-porch = <3>;
>> +                     vfront-porch = <2>;
>> +                     vsync-len = <11>;
>> +                     hsync-active = <1>;
>> +                     vsync-active = <1>;
>> +                     de-active = <1>;
>> +                     pixelclk-active = <0>;
>> +             };
>> +     };
>> +};
>> +
>> diff --git a/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts b/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts
>> index 4ed3652..a9904f4 100644
>> --- a/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts
>> +++ b/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts
>> @@ -132,10 +132,6 @@
>>  };
>>
>>  / {
>> -     aliases {
>> -             display0 = &lcd0;
>> -     };
>> -
>>       video_reg: video_reg {
>>               compatible = "regulator-fixed";
>>               regulator-name = "fixed-supply";
>> @@ -144,34 +140,9 @@
>>       };
>>
>>       lcd0: display@0 {
>> -             compatible = "panel-dpi";
>> -             label = "28";
>> -             status = "okay";
>> -             /* default-on; */
>>               pinctrl-names = "default";
>>               pinctrl-0 = <&lcd_enable_pin>;
>>               enable-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>;    /* gpio155, lcd INI */
>> -             port {
>> -                     lcd_in: endpoint {
>> -                             remote-endpoint = <&dpi_out>;
>> -                     };
>> -             };
>> -
>> -             panel-timing {
>> -                     clock-frequency = <9000000>;
>> -                     hactive = <480>;
>> -                     vactive = <272>;
>> -                     hfront-porch = <3>;
>> -                     hback-porch = <2>;
>> -                     hsync-len = <42>;
>> -                     vback-porch = <3>;
>> -                     vfront-porch = <2>;
>> -                     vsync-len = <11>;
>> -                     hsync-active = <1>;
>> -                     vsync-active = <1>;
>> -                     de-active = <1>;
>> -                     pixelclk-active = <0>;
>> -             };
>>       };
>>
>>       bl: backlight {
>> @@ -185,6 +156,14 @@
>>       };
>>  };
>>
>> +/*
>> + * The current production Panel is Type 28.
>> + * For people with older, Type 15 displays, include
>> + * logicpd-display_panel-15.dtsi instead
>> + */
>> +#include "logicpd-display_panel-28.dtsi"
>> +
>> +
>>  &mmc1 {
>>       interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>;
>>       pinctrl-names = "default";
>>
>
>
> --
> Regards,
> Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Troy Benjegerdes March 5, 2016, 12:46 a.m. UTC | #3
On Fri, Mar 04, 2016 at 02:31:27PM -0600, Adam Ford wrote:
> On Fri, Mar 4, 2016 at 1:34 PM, Nishanth Menon <nm@ti.com> wrote:
> > On 03/04/2016 12:40 PM, Adam Ford wrote:
> >> Since there are a few different LogicPD Display Panel options,
> >> this patch creates two dtsi files which can be included based on
> >> which display panel is available.
> >>
> >> Signed-off-by: Adam Ford <aford173@gmail.com>
> >> ---
> >
> > Dumb question: any reason we cannot do this as device tree overlays?
> 
> There was a whole different discussion on a different thread about the
> desire to move display stuff to the bootloader and device tree and
> keep it out of userspace and the kernel.  I am just doing what I
> thought the outcome was.  Tomi and Tony might have a different
> opinion.  I thought by doing this, it would make it easy for people to
> pick and choose which (if any LPD display they have and I tried to do
> it in a similar fashion to how the SMC911x Ethernet dtsi file was done
> which allows it to be included by a vareity of different boards.
> 
> adam

What is the 'official' word on overlay support in mainline kernels these
days? I need to at least attempt to backport this to linux-3.14 and trying
to bring along overlays as well seems like an excercise in futility.

Another issue with overlays is you might want to display a progress screen
in the framebuffer right away on boot, how is this handled with overlays?

----------------------------------------------------------------------------
Troy Benjegerdes                 'da hozer'                  hozer@hozed.org
7 elements      earth::water::air::fire::mind::spirit::soul        grid.coop

      Never pick a fight with someone who buys ink by the barrel,
         nor try buy a hacker who makes money by the megahash

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren April 12, 2016, 8:46 p.m. UTC | #4
* Adam Ford <aford173@gmail.com> [160304 12:31]:
> On Fri, Mar 4, 2016 at 1:34 PM, Nishanth Menon <nm@ti.com> wrote:
> > On 03/04/2016 12:40 PM, Adam Ford wrote:
> >> Since there are a few different LogicPD Display Panel options,
> >> this patch creates two dtsi files which can be included based on
> >> which display panel is available.
> >>
> >> Signed-off-by: Adam Ford <aford173@gmail.com>
> >> ---
> >
> > Dumb question: any reason we cannot do this as device tree overlays?
> 
> There was a whole different discussion on a different thread about the
> desire to move display stuff to the bootloader and device tree and
> keep it out of userspace and the kernel.  I am just doing what I
> thought the outcome was.  Tomi and Tony might have a different
> opinion.  I thought by doing this, it would make it easy for people to
> pick and choose which (if any LPD display they have and I tried to do
> it in a similar fashion to how the SMC911x Ethernet dtsi file was done
> which allows it to be included by a vareity of different boards.

I think applying this won't hurt, it's easy to switch to use the DT
overlays with this.

Adam, can you please repost against current omap-for-v4.7/dt
as this no longer applies?

Thanks,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/logicpd-display_panel-15.dtsi b/arch/arm/boot/dts/logicpd-display_panel-15.dtsi
new file mode 100644
index 0000000..8594526d2
--- /dev/null
+++ b/arch/arm/boot/dts/logicpd-display_panel-15.dtsi
@@ -0,0 +1,47 @@ 
+/*
+ * Common file for LogicPD Type 15 Display Panel
+ *
+ * Note that the board specific DTS file needs to specify
+ * pinctrl and enable-gpios.
+ */
+
+/ {
+	aliases {
+		display0 = &lcd0;
+	};
+
+	video_reg: video_reg {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-supply";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+	};
+
+	lcd0: display@0 {
+		compatible = "panel-dpi";
+		label = "15";
+		status = "okay";
+		port {
+			lcd_in: endpoint {
+				remote-endpoint = <&dpi_out>;
+			};
+		};
+
+		panel-timing {
+			clock-frequency = <9000000>;
+			hactive = <480>;
+			vactive = <272>;
+			hfront-porch = <3>;
+			hback-porch = <2>;
+			hsync-len = <42>;
+			vback-porch = <3>;
+			vfront-porch = <4>;
+			vsync-len = <11>;
+			hsync-active = <0>;
+			vsync-active = <0>;
+			de-active = <1>;
+			pixelclk-active = <1>;
+		};
+	};
+};
+
diff --git a/arch/arm/boot/dts/logicpd-display_panel-28.dtsi b/arch/arm/boot/dts/logicpd-display_panel-28.dtsi
new file mode 100644
index 0000000..89ebeb9
--- /dev/null
+++ b/arch/arm/boot/dts/logicpd-display_panel-28.dtsi
@@ -0,0 +1,40 @@ 
+/*
+ * Common file for LogicPD Type 15 Display Panel
+ *
+ * Note that the board specific DTS file needs to specify
+ * pinctrl and enable-gpios.
+ */
+
+/ {
+	aliases {
+		display0 = &lcd0;
+	};
+
+	lcd0: display@0 {
+		compatible = "panel-dpi";
+		label = "28";
+		status = "okay";
+		port {
+			lcd_in: endpoint {
+				remote-endpoint = <&dpi_out>;
+			};
+		};
+
+		panel-timing {
+			clock-frequency = <9000000>;
+			hactive = <480>;
+			vactive = <272>;
+			hfront-porch = <3>;
+			hback-porch = <2>;
+			hsync-len = <42>;
+			vback-porch = <3>;
+			vfront-porch = <2>;
+			vsync-len = <11>;
+			hsync-active = <1>;
+			vsync-active = <1>;
+			de-active = <1>;
+			pixelclk-active = <0>;
+		};
+	};
+};
+
diff --git a/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts b/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts
index 4ed3652..a9904f4 100644
--- a/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts
+++ b/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts
@@ -132,10 +132,6 @@ 
 };
 
 / {
-	aliases {
-		display0 = &lcd0;
-	};
-
 	video_reg: video_reg {
 		compatible = "regulator-fixed";
 		regulator-name = "fixed-supply";
@@ -144,34 +140,9 @@ 
 	};
 
 	lcd0: display@0 {
-		compatible = "panel-dpi";
-		label = "28";
-		status = "okay";
-		/* default-on; */
 		pinctrl-names = "default";
 		pinctrl-0 = <&lcd_enable_pin>;
 		enable-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>;	/* gpio155, lcd INI */
-		port {
-			lcd_in: endpoint {
-				remote-endpoint = <&dpi_out>;
-			};
-		};
-
-		panel-timing {
-			clock-frequency = <9000000>;
-			hactive = <480>;
-			vactive = <272>;
-			hfront-porch = <3>;
-			hback-porch = <2>;
-			hsync-len = <42>;
-			vback-porch = <3>;
-			vfront-porch = <2>;
-			vsync-len = <11>;
-			hsync-active = <1>;
-			vsync-active = <1>;
-			de-active = <1>;
-			pixelclk-active = <0>;
-		};
 	};
 
 	bl: backlight {
@@ -185,6 +156,14 @@ 
 	};
 };
 
+/*
+ * The current production Panel is Type 28.
+ * For people with older, Type 15 displays, include
+ * logicpd-display_panel-15.dtsi instead
+ */
+#include "logicpd-display_panel-28.dtsi"
+
+
 &mmc1 {
 	interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>;
 	pinctrl-names = "default";