Hi!
I'm back with a new attempt at getting this panel upstream. This time with the bindings in a separate commit, as I hear that is preferred.
I think I covered all the pins on the panel...
Cheers, Peter
Gustaf Lindström (1): drm/panel: simple: add support for Sharp LQ150X1LG11 panels
Peter Rosin (1): dt-bindings: display: Add Sharp LQ150X1LG11 panel binding
.../bindings/display/panel/sharp,lq150x1lg11.txt | 36 ++++++++++++++++++++++ drivers/gpu/drm/panel/panel-simple.c | 27 ++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt
The Sharp 15" LQ150X1LG11 panel is an XGA TFT LCD panel.
Signed-off-by: Peter Rosin peda@axentia.se --- .../bindings/display/panel/sharp,lq150x1lg11.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt
diff --git a/Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt b/Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt new file mode 100644 index 000000000000..715ff7e332f2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt @@ -0,0 +1,36 @@ +Sharp 15" LQ150X1LG11 XGA TFT LCD panel + +Required properties: +- compatible: should be "sharp,lq150x1lg11" +- power-supply: regulator to provide the VCC supply voltage (3.3 volts) + +Optional properties: +- backlight: phandle of the backlight device +- rlud-gpios: a single GPIO for the RL/UD (rotate 180 degrees) pin. +- lvds-gpios: a single GPIO for the SELLVDS pin. + +If lrud-gpios and/or ldvs-gpios are not specified, the RL/UD and/or SELLVDS +pins are assumed to be handled appropriately by the hardware. + +Example: + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 100000>; /* VBR */ + + brightness-levels = <0 20 40 60 80 100>; + default-brightness-level = <2>; + + power-supply = <&vdd_12v_reg>; /* VDD */ + enable-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; /* XSTABY */ + }; + + panel { + compatible = "sharp,lq150x1lg11"; + + power-supply = <&vcc_3v3_reg>; /* VCC */ + + backlight = <&backlight>; + rlud-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; /* RL/UD */ + lvds-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; /* SELLVDS */ + };
On Tue, Sep 27, 2016 at 12:27:11AM +0200, Peter Rosin wrote:
The Sharp 15" LQ150X1LG11 panel is an XGA TFT LCD panel.
Signed-off-by: Peter Rosin peda@axentia.se
.../bindings/display/panel/sharp,lq150x1lg11.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt
diff --git a/Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt b/Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt new file mode 100644 index 000000000000..715ff7e332f2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt @@ -0,0 +1,36 @@ +Sharp 15" LQ150X1LG11 XGA TFT LCD panel
+Required properties: +- compatible: should be "sharp,lq150x1lg11" +- power-supply: regulator to provide the VCC supply voltage (3.3 volts)
Should be named according to the input, so vcc-supply.
+Optional properties: +- backlight: phandle of the backlight device +- rlud-gpios: a single GPIO for the RL/UD (rotate 180 degrees) pin. +- lvds-gpios: a single GPIO for the SELLVDS pin.
Why not sellvds-gpios?
+If lrud-gpios and/or ldvs-gpios are not specified, the RL/UD and/or SELLVDS
typos...
+pins are assumed to be handled appropriately by the hardware.
+Example:
- backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm 0 100000>; /* VBR */
brightness-levels = <0 20 40 60 80 100>;
default-brightness-level = <2>;
power-supply = <&vdd_12v_reg>; /* VDD */
enable-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; /* XSTABY */
- };
- panel {
compatible = "sharp,lq150x1lg11";
power-supply = <&vcc_3v3_reg>; /* VCC */
backlight = <&backlight>;
rlud-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; /* RL/UD */
lvds-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; /* SELLVDS */
- };
-- 2.1.4
-- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 2016-10-03 20:46, Rob Herring wrote:
On Tue, Sep 27, 2016 at 12:27:11AM +0200, Peter Rosin wrote:
The Sharp 15" LQ150X1LG11 panel is an XGA TFT LCD panel.
Signed-off-by: Peter Rosin peda@axentia.se
.../bindings/display/panel/sharp,lq150x1lg11.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt
diff --git a/Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt b/Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt new file mode 100644 index 000000000000..715ff7e332f2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt @@ -0,0 +1,36 @@ +Sharp 15" LQ150X1LG11 XGA TFT LCD panel
+Required properties: +- compatible: should be "sharp,lq150x1lg11" +- power-supply: regulator to provide the VCC supply voltage (3.3 volts)
Should be named according to the input, so vcc-supply.
Right, I wanted to do that, but the simple-panel bindings has power-supply as required and I desperately wanted to be compatible in order to make use of the simple-panel driver. That driver does require this entry, so I do not see any way around it. Any advice for this situation?
+Optional properties: +- backlight: phandle of the backlight device +- rlud-gpios: a single GPIO for the RL/UD (rotate 180 degrees) pin. +- lvds-gpios: a single GPIO for the SELLVDS pin.
Why not sellvds-gpios?
I'll change that in v4.
+If lrud-gpios and/or ldvs-gpios are not specified, the RL/UD and/or SELLVDS
typos...
Good thing you added the plural, I found s/lrud/rlud/ and s/ldvs/lvds/ Nice catch btw, thanks!
+pins are assumed to be handled appropriately by the hardware.
+Example:
- backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm 0 100000>; /* VBR */
brightness-levels = <0 20 40 60 80 100>;
default-brightness-level = <2>;
power-supply = <&vdd_12v_reg>; /* VDD */
enable-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; /* XSTABY */
- };
- panel {
compatible = "sharp,lq150x1lg11";
power-supply = <&vcc_3v3_reg>; /* VCC */
backlight = <&backlight>;
rlud-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; /* RL/UD */
lvds-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; /* SELLVDS */
- };
-- 2.1.4
-- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Oct 3, 2016 at 11:58 PM, Peter Rosin peda@axentia.se wrote:
On 2016-10-03 20:46, Rob Herring wrote:
On Tue, Sep 27, 2016 at 12:27:11AM +0200, Peter Rosin wrote:
The Sharp 15" LQ150X1LG11 panel is an XGA TFT LCD panel.
Signed-off-by: Peter Rosin peda@axentia.se
.../bindings/display/panel/sharp,lq150x1lg11.txt | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt
diff --git a/Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt b/Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt new file mode 100644 index 000000000000..715ff7e332f2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/sharp,lq150x1lg11.txt @@ -0,0 +1,36 @@ +Sharp 15" LQ150X1LG11 XGA TFT LCD panel
+Required properties: +- compatible: should be "sharp,lq150x1lg11" +- power-supply: regulator to provide the VCC supply voltage (3.3 volts)
Should be named according to the input, so vcc-supply.
Right, I wanted to do that, but the simple-panel bindings has power-supply as required and I desperately wanted to be compatible in order to make use of the simple-panel driver. That driver does require this entry, so I do not see any way around it. Any advice for this situation?
Okay, it's fine given it's a single supply.
Rob
From: Gustaf Lindström gl@axentia.se
The Sharp 15" LQ150X1LG11 panel is an XGA TFT LCD panel.
The simple-panel driver is used to get support for essential functionality of the panel.
Signed-off-by: Gustaf Lindström gl@axentia.se Signed-off-by: Peter Rosin peda@axentia.se --- drivers/gpu/drm/panel/panel-simple.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 85143d1b9b31..58cfe0a7a9d6 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1386,6 +1386,30 @@ static const struct panel_desc sharp_lq123p1jx31 = { }, };
+static const struct drm_display_mode sharp_lq150x1lg11_mode = { + .clock = 71100, + .hdisplay = 1024, + .hsync_start = 1024 + 168, + .hsync_end = 1024 + 168 + 64, + .htotal = 1024 + 168 + 64 + 88, + .vdisplay = 768, + .vsync_start = 768 + 37, + .vsync_end = 768 + 37 + 2, + .vtotal = 768 + 37 + 2 + 8, + .vrefresh = 60, +}; + +static const struct panel_desc sharp_lq150x1lg11 = { + .modes = &sharp_lq150x1lg11_mode, + .num_modes = 1, + .bpc = 8, + .size = { + .width = 304, + .height = 228, + }, + .bus_format = MEDIA_BUS_FMT_RGB565_1X16, +}; + static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = { .clock = 33300, .hdisplay = 800, @@ -1641,6 +1665,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "sharp,lq123p1jx31", .data = &sharp_lq123p1jx31, }, { + .compatible = "sharp,lq150x1lg11", + .data = &sharp_lq150x1lg11, + }, { .compatible = "shelly,sca07010-bfn-lnn", .data = &shelly_sca07010_bfn_lnn, }, {
dri-devel@lists.freedesktop.org