N900 DT support for N900 panel
Subsystems (2)
cover N900 DT support for N900 panel
Hi,
This patchset adds DT support for the N900 panel. The panel bindings will be extended once omapdss has DT support. Until then the panel driver defaults to omapdss.sdi0 in DT mode.
-- Sebastian
Sebastian Reichel (5):
OMAPDSS: ACX565AKM: Add basic DT support
DTS: ARM: OMAP3-N900: Add vendor prefixes to SPI devices
DTS: ARM: OMAP3-N900: Add reset gpio to lcd node
OMAPDSS: SDI: Use V28 as regulator for N900
Documentation: dt: Document ACX565AKM DT binding
.../devicetree/bindings/video/sony,acx565akm.txt | 22 ++++++++++++++++ arch/arm/boot/dts/omap3-n900.dts | 7 ++++-- .../omap2/displays-new/panel-sony-acx565akm.c | 29 ++++++++++++++++++++++ drivers/video/omap2/dss/sdi.c | 8 +++++- 4 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt
Signature · 1 line
1.8.4.3
PATCH 1/5 OMAPDSS: ACX565AKM: Add basic DT support
This adds basic DT support to the ACX565AKM panel driver.
--- .../omap2/displays-new/panel-sony-acx565akm.c | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+)
drivers/video/omap2/displays-new/panel-sony-acx565akm.c +29 -0
@@ -30,6 +30,8 @@#include <linux/backlight.h> #include <linux/fb.h> #include <linux/gpio.h> +#include <linux/of.h> +#include <linux/of_gpio.h> #include <video/omapdss.h> #include <video/omap-panel-data.h>
@@ -711,6 +713,28 @@ static int acx565akm_probe_pdata(struct spi_device *spi)return 0 ; } +static int acx565akm_probe_of (struct spi_device *spi) +{ +struct panel_drv_data *ddata =dev_get_drvdata (&spi->dev); +struct device_node *np = spi->dev.of_node; +struct omap_dss_device *dssdev; +int ret; + + ddata->reset_gpio =of_get_named_gpio (np,"reset-gpio" ,0 ); + +/* TODO: there is currently no DT binding for omapdss, so +* we use sdi.0 with 2 data lanes per default. */ + ddata->in =omap_dss_find_output ("sdi.0" ); + ddata->datapairs =2 ; + + dssdev = &ddata->dssdev; + ret =of_property_read_string (np,"label" , &dssdev->name); +if (ret <0 ) +return ret; + +return 0 ; +} +static int acx565akm_probe (struct spi_device *spi) {struct panel_drv_data *ddata;
@@ -738,7 +762,12 @@ static int acx565akm_probe(struct spi_device *spi) r =acx565akm_probe_pdata (spi);if (r)return r; + }else if (spi->dev.of_node) { + r =acx565akm_probe_of (spi); +if (r) +return r; }else { +dev_err (&spi->dev,"platform data missing!\n" );return -ENODEV ; }
Signature · 1 line
1.8.4.3
PATCH 2/5 DTS: ARM: OMAP3-N900: Add vendor prefixes to SPI devices
In reply to Sebastian ReichelSPI attached devices are currently missing vendor
prefixes. This patch adds them.
--- arch/arm/boot/dts/omap3-n900.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/omap3-n900.dts +2 -2
@@ -576,12 +576,12 @@ * Also... order in the device tree actually matters here. */ tsc2005@0 { - compatible = "tsc2005"; + compatible = "ti,tsc2005"; spi-max-frequency = <6000000>; reg = <0>; }; mipid@2 { - compatible = "acx565akm"; + compatible = "sony,acx565akm"; spi-max-frequency = <6000000>; reg = <2>;
Signature · 1 line
1.8.4.3
PATCH 3/5 DTS: ARM: OMAP3-N900: Add reset gpio to lcd node
In reply to Sebastian ReichelThis adds reset-gpio property to the Nokia N900's
lcd node.
--- arch/arm/boot/dts/omap3-n900.dts | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/boot/dts/omap3-n900.dts +3 -0
@@ -585,6 +585,9 @@ spi-max-frequency = <6000000>; reg = <2>; + label = "lcd"; + reset-gpio = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */ + pinctrl-names = "default"; pinctrl-0 = <&display_pins>; };
Signature · 1 line
1.8.4.3
PATCH 4/5 OMAPDSS: SDI: Use V28 as regulator for N900
In reply to Sebastian ReichelThis adds a Nokia N900 quirk, so that the V28 regulator is used for the omapdss.sdi port.
This quirk is needed until omapdss is converted to DT, so that the regulator can be acquired via a phandle.
On other boards the regulator can be renamed in the DT data, but on the Nokia N900 the regulator is also used for other hardware components.
--- drivers/video/omap2/dss/sdi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/video/omap2/dss/sdi.c +7 -1
@@ -26,6 +26,7 @@#include <linux/export.h> #include <linux/platform_device.h> #include <linux/string.h> +#include <linux/of.h> #include <video/omapdss.h> #include "dss.h"
@@ -263,7 +264,12 @@ static int sdi_init_regulator(void)if (sdi.vdds_sdi_reg)return 0 ; - vdds_sdi =devm_regulator_get (&sdi.pdev->dev,"vdds_sdi" ); +/* TODO: remove this hack, once we acquire regulator via DT phandle */ +if (of_machine_is_compatible ("nokia,omap3-n900" )) + vdds_sdi =devm_regulator_get (&sdi.pdev->dev,"V28" ); +else + vdds_sdi =devm_regulator_get (&sdi.pdev->dev,"vdds_sdi" ); +if (IS_ERR (vdds_sdi)) {DSSERR ("can't get VDDS_SDI regulator\n" );return PTR_ERR (vdds_sdi);
Signature · 1 line
1.8.4.3
PATCH 5/5 Documentation: dt: Document ACX565AKM DT binding
In reply to Sebastian ReichelAdd devicetree binding documentation for ACX565AKM panel.
--- .../devicetree/bindings/video/sony,acx565akm.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt
Documentation/devicetree/bindings/video/sony,acx565akm.txt new file +22 -0
@@ -0,0 +1,22 @@ +Device-Tree bindings for Sony ACX565AKM panel driver + +Required properties: +- compatible: value should be one among the following: + * "sony,acx565akm" +- reg: integer, chip select id of the panel +- spi-max-frequency: integer, maximal frequency of spi connection +- label: string, label for the panel (e.g. "lcd") +- reset-gpio: phandle + gpio specifier for the reset gpio + +Example: + +&mcspi1 { + mipid@2 { + compatible = "sony,acx565akm"; + spi-max-frequency = <6000000>; + reg = <2>; + + label = "lcd"; + reset-gpio = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* gpio 90 */ + }; +};
Signature · 1 line
1.8.4.3