OMAPDSS: sharp-ls037v7dw01 DT support
Subsystems (3)
cover OMAPDSS: sharp-ls037v7dw01 DT support
Hi,
These are slightly reworked versions of the patches Tony sent:
* Split the DT doc into separate patch
* Handle errors from gpio functions
* Remove QVGA support
* Removed the change to arch/arm/mach-omap2/display.c. I'll add that to my patch which moves the conversion code to omapdss. Note that if you test this version, you need to add the panel name to the conversion list for now.
* Set MO gpio GPIO_ACTIVE_HIGH in omap3-evm-common.dtsi
* Set the GPIO default values the same way for DT and non-DT versions.
Tony, I removed the QVGA support as it was a new feature, not supported by the non-DT version. Also, I don't think it should be done as you had implemented it, but rather either have a flag in the DT data in case the pin is hardwired in the hardware, or let the user select the mode at runtime.
Also, I didn't quite understand the implementation. You had set initial values in the driver for MO and RESB differently than on the non-DT version. Was that on purpose?
You said in a comment: "The LCD is sideways, so we want the VGA mode instead of QVGA mode.". Why is that? How does the resolution affect the orientation?
With my version, the panel (should) always be in VGA mode, like the non-DT version does.
Only compile tested, I don't have boards with the panel.
Tomi
Tony Lindgren (4):
OMAPDSS: panel-sharp-ls037v7dw01: update to use gpiod
OMAPDSS: panel sharp-ls037v7dw01 DT support
Doc/DT: Add DT binding documentation for SHARP LS037V7DW01
ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and
ldp
.../bindings/video/sharp,ls037v7dw01.txt | 43 +++++ arch/arm/boot/dts/omap3-evm-37xx.dts | 50 +++++ arch/arm/boot/dts/omap3-evm-common.dtsi | 26 +++ arch/arm/boot/dts/omap3-ldp.dts | 29 ++- .../boot/dts/omap3-panel-sharp-ls037v7dw01.dtsi | 67 +++++++ .../omap2/displays-new/panel-sharp-ls037v7dw01.c | 210 +++++++++++++++------ 6 files changed, 363 insertions(+), 62 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt create mode 100644 arch/arm/boot/dts/omap3-panel-sharp-ls037v7dw01.dtsi
Signature · 1 line
1.9.1
PATCH 1/4 OMAPDSS: panel-sharp-ls037v7dw01: update to use gpiod
From: Tony Lindgren <[email protected]>
Using gpiod will make it easier to add device tree support for this panel in the following patches.
Note that all the GPIOs for this panel are optional, any of the the GPIOs could be configured with external pulls instead of GPIOs, so let's not error out if GPIOs are not found to make the panel more generic.
--- .../omap2/displays-new/panel-sharp-ls037v7dw01.c | 108 ++++++++++----------- 1 file changed, 54 insertions(+), 54 deletions(-)
drivers/video/fbdev/omap2/displays-new/panel-sharp-ls037v7dw01.c +54 -54
@@ -26,11 +26,11 @@ struct panel_drv_data {struct omap_video_timings videomode; -int resb_gpio; -int ini_gpio; -int mo_gpio; -int lr_gpio; -int ud_gpio; +struct gpio_desc *resb_gpio;/* low = reset active min 20 us */ +struct gpio_desc *ini_gpio;/* high = power on */ +struct gpio_desc *mo_gpio;/* low = 480x640, high = 240x320 */ +struct gpio_desc *lr_gpio;/* high = conventional horizontal scanning */ +struct gpio_desc *ud_gpio;/* high = conventional vertical scanning */ };static const struct omap_video_timings sharp_ls_timings = {
@@ -105,11 +105,11 @@ static int sharp_ls_enable(struct omap_dss_device *dssdev)/* wait couple of vsyncs until enabling the LCD */ msleep (50 ); -if (gpio_is_valid (ddata->resb_gpio)) -gpio_set_value_cansleep (ddata->resb_gpio,1 ); +if (ddata->resb_gpio) +gpiod_set_value_cansleep (ddata->resb_gpio,1 ); -if (gpio_is_valid (ddata->ini_gpio)) -gpio_set_value_cansleep (ddata->ini_gpio,1 ); +if (ddata->ini_gpio) +gpiod_set_value_cansleep (ddata->ini_gpio,1 ); dssdev->state =OMAP_DSS_DISPLAY_ACTIVE ;
@@ -124,11 +124,11 @@ static void sharp_ls_disable(struct omap_dss_device *dssdev)if (!omapdss_device_is_enabled (dssdev))return ; -if (gpio_is_valid (ddata->ini_gpio)) -gpio_set_value_cansleep (ddata->ini_gpio,0 ); +if (ddata->ini_gpio) +gpiod_set_value_cansleep (ddata->ini_gpio,0 ); -if (gpio_is_valid (ddata->resb_gpio)) -gpio_set_value_cansleep (ddata->resb_gpio,0 ); +if (ddata->resb_gpio) +gpiod_set_value_cansleep (ddata->resb_gpio,0 );/* wait at least 5 vsyncs after disabling the LCD */
@@ -182,11 +182,32 @@ static struct omap_dss_driver sharp_ls_ops = { .get_resolution = omapdss_default_get_resolution, }; +static int sharp_ls_get_gpio (struct device *dev,int gpio,unsigned long flags, +char *desc,struct gpio_desc **gpiod) +{ +struct gpio_desc *gd; +int r; + + *gpiod =NULL ; + + r =devm_gpio_request_one (dev, gpio, flags, desc); +if (r) +return r == -ENOENT ?0 : r; + + gd =gpio_to_desc (gpio); +if (IS_ERR (gd)) +return PTR_ERR (gd) == -ENOENT ?0 :PTR_ERR (gd); + + *gpiod = gd; +return 0 ; +} +static int sharp_ls_probe_pdata (struct platform_device *pdev) {const struct panel_sharp_ls037v7dw01_platform_data *pdata;struct panel_drv_data *ddata =platform_get_drvdata (pdev);struct omap_dss_device *dssdev, *in; +int r; pdata =dev_get_platdata (&pdev->dev);
@@ -204,11 +225,26 @@ static int sharp_ls_probe_pdata(struct platform_device *pdev) dssdev = &ddata->dssdev; dssdev->name = pdata->name; - ddata->resb_gpio = pdata->resb_gpio; - ddata->ini_gpio = pdata->ini_gpio; - ddata->mo_gpio = pdata->mo_gpio; - ddata->lr_gpio = pdata->lr_gpio; - ddata->ud_gpio = pdata->ud_gpio; + r =sharp_ls_get_gpio (&pdev->dev, pdata->mo_gpio,GPIOF_OUT_INIT_LOW , +"lcd MO" , &ddata->mo_gpio); +if (r) +return r; + r =sharp_ls_get_gpio (&pdev->dev, pdata->lr_gpio,GPIOF_OUT_INIT_HIGH , +"lcd LR" , &ddata->lr_gpio); +if (r) +return r; + r =sharp_ls_get_gpio (&pdev->dev, pdata->ud_gpio,GPIOF_OUT_INIT_HIGH , +"lcd UD" , &ddata->ud_gpio); +if (r) +return r; + r =sharp_ls_get_gpio (&pdev->dev, pdata->resb_gpio,GPIOF_OUT_INIT_LOW , +"lcd RESB" , &ddata->resb_gpio); +if (r) +return r; + r =sharp_ls_get_gpio (&pdev->dev, pdata->ini_gpio,GPIOF_OUT_INIT_LOW , +"lcd INI" , &ddata->ini_gpio); +if (r) +return r;return 0 ; }
@@ -233,41 +269,6 @@ static int sharp_ls_probe(struct platform_device *pdev)return -ENODEV ; } -if (gpio_is_valid (ddata->mo_gpio)) { - r =devm_gpio_request_one (&pdev->dev, ddata->mo_gpio, -GPIOF_OUT_INIT_LOW ,"lcd MO" ); -if (r) - goto err_gpio; - } - -if (gpio_is_valid (ddata->lr_gpio)) { - r =devm_gpio_request_one (&pdev->dev, ddata->lr_gpio, -GPIOF_OUT_INIT_HIGH ,"lcd LR" ); -if (r) - goto err_gpio; - } - -if (gpio_is_valid (ddata->ud_gpio)) { - r =devm_gpio_request_one (&pdev->dev, ddata->ud_gpio, -GPIOF_OUT_INIT_HIGH ,"lcd UD" ); -if (r) - goto err_gpio; - } - -if (gpio_is_valid (ddata->resb_gpio)) { - r =devm_gpio_request_one (&pdev->dev, ddata->resb_gpio, -GPIOF_OUT_INIT_LOW ,"lcd RESB" ); -if (r) - goto err_gpio; - } - -if (gpio_is_valid (ddata->ini_gpio)) { - r =devm_gpio_request_one (&pdev->dev, ddata->ini_gpio, -GPIOF_OUT_INIT_LOW ,"lcd INI" ); -if (r) - goto err_gpio; - } - ddata->videomode = sharp_ls_timings; dssdev = &ddata->dssdev;
@@ -287,7 +288,6 @@ static int sharp_ls_probe(struct platform_device *pdev)return 0 ; err_reg: -err_gpio:omap_dss_put_device (ddata->in);return r; }
Signature · 1 line
1.9.1
PATCH 2/4 OMAPDSS: panel sharp-ls037v7dw01 DT support
In reply to Tomi ValkeinenFrom: Tony Lindgren <[email protected]>
Add DT support for sharp-ls037v7dw01.
--- .../omap2/displays-new/panel-sharp-ls037v7dw01.c | 102 ++++++++++++++++++++- 1 file changed, 99 insertions(+), 3 deletions(-)
drivers/video/fbdev/omap2/displays-new/panel-sharp-ls037v7dw01.c +99 -3
@@ -12,15 +12,18 @@#include <linux/delay.h> #include <linux/gpio.h> #include <linux/module.h> +#include <linux/of.h> +#include <linux/of_gpio.h> #include <linux/platform_device.h> #include <linux/slab.h> - +#include <linux/regulator/consumer.h> #include <video/omapdss.h> #include <video/omap-panel-data.h> struct panel_drv_data {struct omap_dss_device dssdev;struct omap_dss_device *in; +struct regulator *vcc;int data_lines;
@@ -95,12 +98,21 @@ static int sharp_ls_enable(struct omap_dss_device *dssdev)if (omapdss_device_is_enabled (dssdev))return 0 ; - in->ops.dpi->set_data_lines (in, ddata->data_lines); +if (ddata->data_lines) + in->ops.dpi->set_data_lines (in, ddata->data_lines); in->ops.dpi->set_timings (in, &ddata->videomode); +if (ddata->vcc) { + r =regulator_enable (ddata->vcc); +if (r !=0 ) +return r; + } + r = in->ops.dpi->enable (in); -if (r) +if (r) { +regulator_disable (ddata->vcc);return r; + }/* wait couple of vsyncs until enabling the LCD */ msleep (50 );
@@ -136,6 +148,9 @@ static void sharp_ls_disable(struct omap_dss_device *dssdev) in->ops.dpi->disable (in); +if (ddata->vcc) +regulator_disable (ddata->vcc); + dssdev->state =OMAP_DSS_DISPLAY_DISABLED ; }
@@ -249,6 +264,75 @@ static int sharp_ls_probe_pdata(struct platform_device *pdev)return 0 ; } +static int sharp_ls_get_gpio_of (struct device *dev,int index,int val, +const char *desc,struct gpio_desc **gpiod) +{ +struct gpio_desc *gd; +int r; + + *gpiod =NULL ; + + gd =devm_gpiod_get_index (dev, desc, index); +if (IS_ERR (gd)) +return PTR_ERR (gd) == -ENOENT ?0 :PTR_ERR (gd); + + r =gpiod_direction_output (gd, val); +if (r) +return r; + + *gpiod = gd; +return 0 ; +} + +static int sharp_ls_probe_of (struct platform_device *pdev) +{ +struct panel_drv_data *ddata =platform_get_drvdata (pdev); +struct device_node *node = pdev->dev.of_node; +struct omap_dss_device *in; +int r; + + ddata->vcc =devm_regulator_get (&pdev->dev,"envdd" ); +if (IS_ERR (ddata->vcc)) { +dev_err (&pdev->dev,"failed to get regulator\n" ); +return PTR_ERR (ddata->vcc); + } + +/* lcd INI */ + r =sharp_ls_get_gpio_of (&pdev->dev,0 ,0 ,"enable" , &ddata->ini_gpio); +if (r) +return r; + +/* lcd RESB */ + r =sharp_ls_get_gpio_of (&pdev->dev,0 ,0 ,"reset" , &ddata->resb_gpio); +if (r) +return r; + +/* lcd MO */ + r =sharp_ls_get_gpio_of (&pdev->dev,0 ,0 ,"mode" , &ddata->mo_gpio); +if (r) +return r; + +/* lcd LR */ + r =sharp_ls_get_gpio_of (&pdev->dev,1 ,1 ,"mode" , &ddata->lr_gpio); +if (r) +return r; + +/* lcd UD */ + r =sharp_ls_get_gpio_of (&pdev->dev,2 ,1 ,"mode" , &ddata->ud_gpio); +if (r) +return r; + + in =omapdss_of_find_source_for_first_ep (node); +if (IS_ERR (in)) { +dev_err (&pdev->dev,"failed to find video source\n" ); +return PTR_ERR (in); + } + + ddata->in = in; + +return 0 ; +} +static int sharp_ls_probe (struct platform_device *pdev) {struct panel_drv_data *ddata;
@@ -265,6 +349,10 @@ static int sharp_ls_probe(struct platform_device *pdev) r =sharp_ls_probe_pdata (pdev);if (r)return r; + }else if (pdev->dev.of_node) { + r =sharp_ls_probe_of (pdev); +if (r) +return r; }else {return -ENODEV ; }
@@ -308,12 +396,20 @@ static int __exit sharp_ls_remove(struct platform_device *pdev)return 0 ; } +static const struct of_device_id sharp_ls_of_match[] = { + { .compatible ="omapdss,sharp,ls037v7dw01" , }, + {}, +}; + +MODULE_DEVICE_TABLE (of, sharp_ls_of_match); +static struct platform_driver sharp_ls_driver = { .probe = sharp_ls_probe, .remove =__exit_p (sharp_ls_remove), .driver = { .name ="panel-sharp-ls037v7dw01" , .owner =THIS_MODULE , + .of_match_table = sharp_ls_of_match, }, };
Signature · 1 line
1.9.1
PATCH 3/4 Doc/DT: Add DT binding documentation for SHARP LS037V7DW01
In reply to Tomi ValkeinenFrom: Tony Lindgren <[email protected]>
Add DT binding documentation for SHARP LS037V7DW01 panel.
--- .../bindings/video/sharp,ls037v7dw01.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt
Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt new file +43 -0
@@ -0,0 +1,43 @@ +SHARP LS037V7DW01 TFT-LCD panel +=================================== + +Required properties: +- compatible: "sharp,ls037v7dw01" + +Optional properties: +- label: a symbolic name for the panel +- enable-gpios: a GPIO spec for the optional enable pin. + This pin is the INI pin as specified in the LS037V7DW01.pdf file. +- reset-gpios: a GPIO spec for the optional reset pin. + This pin is the RESB pin as specified in the LS037V7DW01.pdf file. +- mode-gpios: a GPIO + ordered MO, LR, and UD as specified in the LS037V7DW01.pdf file. + +Required nodes: +- Video port for DPI input + +This panel can have zero to five GPIOs to configure to change configuration +between QVGA and VGA mode and the scan direction. As these pins can be also +configured with external pulls, all the GPIOs are considered optional with holes +in the array. + +Example +------- + +Example when connected to a omap2+ based device: + +lcd0: display { + compatible = "sharp,ls037v7dw01"; + power-supply = <&lcd_3v3>; + enable-gpios = <&gpio5 24 GPIO_ACTIVE_HIGH>; /* gpio152, lcd INI */ + reset-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>; /* gpio155, lcd RESB */ + mode-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH /* gpio154, lcd MO */ + &gpio1 2 GPIO_ACTIVE_HIGH /* gpio2, lcd LR */ + &gpio1 3 GPIO_ACTIVE_HIGH>; /* gpio3, lcd UD */ + + port { + lcd_in: endpoint { + remote-endpoint = <&dpi_out>; + }; + }; +};
Signature · 1 line
1.9.1
PATCH 4/4 ARM: dts: Add LCD panel sharp ls037v7dw01 support for omap3-evm and ldp
In reply to Tomi ValkeinenFrom: Tony Lindgren <[email protected]>
Looks like quite a few omap3 boards have sharp ls037v7dw01 that's configured as various panel dpi entries for whatever legacy reasons. For device tree based support, let's just configure these properly for panel ls037v7dw01 instead of panel dpi.
This patch creates a common file for panel ls037v7dw01, and makes boards ldp and omap3-evm to use it.
The ls037v7dw01 also seems to be coupled with an ad7846 touchscreen controller for the omaps, so let's add a basic configuration for the touchscreen also using the default values.
Note that we can now remove the regulator-name = "vdds_dsi" entry for ldp, that's no longer needed as we have the entry for vdds_dsi-supply = <&vpll2>.
--- arch/arm/boot/dts/omap3-evm-37xx.dts | 50 ++++++++++++++++ arch/arm/boot/dts/omap3-evm-common.dtsi | 26 +++++++++ arch/arm/boot/dts/omap3-ldp.dts | 29 ++++++++-- .../boot/dts/omap3-panel-sharp-ls037v7dw01.dtsi | 67 ++++++++++++++++++++++ 4 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 arch/arm/boot/dts/omap3-panel-sharp-ls037v7dw01.dtsi
arch/arm/boot/dts/omap3-evm-37xx.dts +50 -0
@@ -26,7 +26,44 @@ }; }; +&dss { + pinctrl-names = "default"; + pinctrl-0 = < + &dss_dpi_pins1 + &dss_dpi_pins2 + >; +}; + &omap3_pmx_core { + dss_dpi_pins1: pinmux_dss_dpi_pins2 { + pinctrl-single,pins = < + OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0) /* dss_pclk.dss_pclk */ + OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0) /* dss_hsync.dss_hsync */ + OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0) /* dss_vsync.dss_vsync */ + OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0) /* dss_acbias.dss_acbias */ + + OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0) /* dss_data6.dss_data6 */ + OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0) /* dss_data7.dss_data7 */ + OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0) /* dss_data8.dss_data8 */ + OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0) /* dss_data9.dss_data9 */ + OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0) /* dss_data10.dss_data10 */ + OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0) /* dss_data11.dss_data11 */ + OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0) /* dss_data12.dss_data12 */ + OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0) /* dss_data13.dss_data13 */ + OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0) /* dss_data14.dss_data14 */ + OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0) /* dss_data15.dss_data15 */ + OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0) /* dss_data16.dss_data16 */ + OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0) /* dss_data17.dss_data17 */ + + OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE3) /* dss_data18.dss_data0 */ + OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE3) /* dss_data19.dss_data1 */ + OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE3) /* dss_data20.dss_data2 */ + OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE3) /* dss_data21.dss_data3 */ + OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE3) /* dss_data22.dss_data4 */ + OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE3) /* dss_data23.dss_data5 */ + >; + }; + mmc1_pins: pinmux_mmc1_pins { pinctrl-single,pins = < 0x114 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk.sdmmc1_clk */
@@ -75,6 +112,19 @@ }; }; +&omap3_pmx_wkup { + dss_dpi_pins2: pinmux_dss_dpi_pins1 { + pinctrl-single,pins = < + 0x0a (PIN_OUTPUT | MUX_MODE3) /* sys_boot0.dss_data18 */ + 0x0c (PIN_OUTPUT | MUX_MODE3) /* sys_boot1.dss_data19 */ + 0x10 (PIN_OUTPUT | MUX_MODE3) /* sys_boot3.dss_data20 */ + 0x12 (PIN_OUTPUT | MUX_MODE3) /* sys_boot4.dss_data21 */ + 0x14 (PIN_OUTPUT | MUX_MODE3) /* sys_boot5.dss_data22 */ + 0x16 (PIN_OUTPUT | MUX_MODE3) /* sys_boot6.dss_data23 */ + >; + }; +}; + &mmc1 { pinctrl-names = "default"; pinctrl-0 = <&mmc1_pins>;
arch/arm/boot/dts/omap3-evm-common.dtsi +26 -0
@@ -44,6 +44,11 @@ #include "twl4030.dtsi" #include "twl4030_omap3.dtsi" +#include "omap3-panel-sharp-ls037v7dw01.dtsi" + +&backlight0 { + gpios = <&twl_gpio 18 GPIO_ACTIVE_LOW>; +}; &i2c2 { clock-frequency = <400000>;
@@ -61,6 +66,27 @@ }; }; +&lcd_3v3 { + gpio = <&gpio5 25 GPIO_ACTIVE_LOW>; /* gpio153 */ + enable-active-low; +}; + +&lcd0 { + enable-gpios = <&gpio5 24 GPIO_ACTIVE_HIGH>; /* gpio152, lcd INI */ + reset-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>; /* gpio155, lcd RESB */ + mode-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH /* gpio154, lcd MO */ + &gpio1 2 GPIO_ACTIVE_HIGH /* gpio2, lcd LR */ + &gpio1 3 GPIO_ACTIVE_HIGH>; /* gpio3, lcd UD */ +}; + +&mcspi1 { + tsc2046 at 0 { + interrupt-parent = <&gpio6>; + interrupts = <15 0>; /* gpio175 */ + pendown-gpio = <&gpio6 15 0>; + }; +}; + &mmc1 { vmmc-supply = <&vmmc1>; vmmc_aux-supply = <&vsim>;
arch/arm/boot/dts/omap3-ldp.dts +24 -5
@@ -164,6 +164,11 @@ #include "twl4030.dtsi" #include "twl4030_omap3.dtsi" +#include "omap3-panel-sharp-ls037v7dw01.dtsi" + +&backlight0 { + gpios = <&twl_gpio 7 GPIO_ACTIVE_HIGH>; +}; &i2c2 { clock-frequency = <400000>;
@@ -173,6 +178,25 @@ clock-frequency = <400000>; }; +/* tps61130rsa enabled by twl4030 regen */ +&lcd_3v3 { + regulator-always-on; +}; + +&lcd0 { + enable-gpios = <&twl_gpio 15 GPIO_ACTIVE_HIGH>; /* lcd INI */ + reset-gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>; /* gpio55, lcd RESB */ + mode-gpios = <&gpio2 24 GPIO_ACTIVE_HIGH>; /* gpio56, lcd MO */ +}; + +&mcspi1 { + tsc2046 at 0 { + interrupt-parent = <&gpio2>; + interrupts = <22 0>; /* gpio54 */ + pendown-gpio = <&gpio2 22 0>; + }; +}; + &mmc1 { /* See 35xx errata 2.1.1.128 in SPRZ278F */ compatible = "ti,omap3-pre-es3-hsmmc";
@@ -247,8 +271,3 @@ /* Needed for ads7846 */ regulator-name = "vcc"; }; - -&vpll2 { - /* Needed for DSS */ - regulator-name = "vdds_dsi"; -};
arch/arm/boot/dts/omap3-panel-sharp-ls037v7dw01.dtsi new file +67 -0
67 lines not on this page · raw message
Signature · 1 line
1.9.1
cover OMAPDSS: sharp-ls037v7dw01 DT support
In reply to Tomi ValkeinenQuoted 13 lines · Tomi Valkeinen
Hi,
These are slightly reworked versions of the patches Tony sent:
* Split the DT doc into separate patch
* Handle errors from gpio functions
* Remove QVGA support
* Removed the change toarch/arm/mach-omap2/display.c. I'll add that to my patch which moves the conversion code to omapdss. Note that if you test this version, you need to add the panel name to the conversion list for now.
* Set MO gpioGPIO_ACTIVE_HIGHinomap3-evm-common.dtsi
* Set the GPIO default values the same way for DT and non-DT versions.
Quoted 4 lines
Tony, I removed the QVGA support as it was a new feature, not supported by the non-DT version. Also, I don't think it should be done as you had implemented it, but rather either have a flag in the DT data in case the pin is hardwired in the hardware, or let the user select the mode at runtime.
OK. Probably should have both options eventually.
Quoted 3 lines
Also, I didn't quite understand the implementation. You had set initial values in the driver for MO and RESB differently than on the non-DT version. Was that on purpose?
I just configured things to what we had earlier for the legacy booting, QVGA for ldp and VGA for omap3-evm.
Quoted 2 lines
You said in a comment: "The LCD is sideways, so we want the VGA mode instead of QVGA mode.". Why is that? How does the resolution affect the orientation?
Yeah that's pretty confusing and probably written before I got the image working properly. I probably initially thought the VGA mode also switches the panel to 640x480, while it really sets it to 480x640.
Quoted 4 lines
With my version, the panel (should) always be in VGA mode, like the non-DT version does.
Only compile tested, I don't have boards with the panel.
Works for me on omap3-evm and ldp after patching in the mode to your panel compatible translation database system.
Regards,
Tony