All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-01-21 10:56 ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Stefan Roese, Tony Lindgren, Sebastian Reichel,
	Enric Balletbo Serra, Darren Etheridge, Sebastian Reichel,
	Tomi Valkeinen, Archit Taneja, Laurent Pinchart,
	Dr . H . Nikolaus Schaller, Marek Belisko, Robert Nelson,
	Javier Martinez Canillas, Florian Vaussard

Hi,

Here's version 3 of the DSS DT series.

The previous version can be found from:

v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249
v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866

The main changes to v2 are:

- DT Binding documentation
- OMAP2 DSS support
- Split DSI register space
- DSS nodes disabled by default
- Hack to have generic DT bindings but OMAP specific drivers (for now)

This series can also be found from:

git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3

 Tomi

Javier Martinez Canillas (1):
  ARM: omap3-igep0020.dts: add display information

Sebastian Reichel (1):
  OMAPDSS: acx565akm: Add DT support

Tomi Valkeinen (39):
  ARM: OMAP2+: add omapdss_init_of()
  ARM: OMAP2+: DT 'compatible' tweak for displays
  OMAPDSS: add 'label' support for DT
  OMAPDSS: get dssdev->alias from DT alias
  OMAPFB: clean up default display search
  OMAPFB: search for default display with DT alias
  OMAPDSS: add of helpers
  OMAPDSS: Improve regulator names for DT
  OMAPDSS: Add DT support to DSS
  OMAPDSS: Add DT support to DISPC
  OMAPDSS: Add DT support to HDMI
  OMAPDSS: Add DT support to VENC
  OMAPDSS: Add DT support to DSI
  OMAPDSS: panel-dsi-cm: Add DT support
  OMAPDSS: encoder-tfp410: Add DT support
  OMAPDSS: connector-dvi: Add DT support
  OMAPDSS: encoder-tpd12s015: Add DT support
  OMAPDSS: hdmi-connector: Add DT support
  OMAPDSS: panel-dpi: Add DT support
  OMAPDSS: connector-analog-tv: Add DT support
  ARM: omap2.dtsi: add omapdss information
  ARM: omap3.dtsi: add omapdss information
  ARM: omap4.dtsi: add omapdss information
  ARM: omap4-panda.dts: add display information
  ARM: omap4-sdp.dts: add display information
  ARM: omap3-beagle.dts: add display information
  ARM: omap3-beagle-xm.dts: add display information
  ARM: omap3-n900.dts: add display information
  OMAPDSS: remove DT hacks for regulators
  ARM: OMAP2+: remove pdata quirks for displays
  Doc/DT: Add OMAP DSS DT Bindings
  Doc/DT: Add DT binding documentation for Analog TV Connector
  Doc/DT: Add DT binding documentation for DVI Connector
  Doc/DT: Add DT binding documentation for HDMI Connector
  Doc/DT: Add DT binding documentation for MIPI DPI Panel
  Doc/DT: Add DT binding documentation for MIPI DSI CM Panel
  Doc/DT: Add DT binding documentation for Sony acx565akm panel
  Doc/DT: Add DT binding documentation for TFP410 encoder
  Doc/DT: Add DT binding documentation for tpd12s015 encoder

 .../bindings/video/analog-tv-connector.txt         |  23 +++
 .../devicetree/bindings/video/dvi-connector.txt    |  26 +++
 .../devicetree/bindings/video/hdmi-connector.txt   |  23 +++
 .../devicetree/bindings/video/panel-dpi.txt        |  43 ++++
 .../devicetree/bindings/video/panel-dsi-cm.txt     |  26 +++
 .../devicetree/bindings/video/sony,acx565akm.txt   |  28 +++
 .../devicetree/bindings/video/ti,omap-dss.txt      | 197 ++++++++++++++++++
 .../devicetree/bindings/video/ti,omap2-dss.txt     |  54 +++++
 .../devicetree/bindings/video/ti,omap3-dss.txt     |  73 +++++++
 .../devicetree/bindings/video/ti,omap4-dss.txt     |  99 +++++++++
 .../devicetree/bindings/video/ti,tfp410.txt        |  41 ++++
 .../devicetree/bindings/video/ti,tpd12s015.txt     |  44 ++++
 .../devicetree/bindings/video/video-ports.txt      |  22 ++
 arch/arm/boot/dts/omap2.dtsi                       |  31 +++
 arch/arm/boot/dts/omap3-beagle-xm.dts              | 119 +++++++++++
 arch/arm/boot/dts/omap3-beagle.dts                 | 116 +++++++++++
 arch/arm/boot/dts/omap3-igep0020.dts               |  59 +++++-
 arch/arm/boot/dts/omap3-n900.dts                   |  70 ++++++-
 arch/arm/boot/dts/omap3.dtsi                       |  42 ++++
 arch/arm/boot/dts/omap4-panda-common.dtsi          | 119 ++++++++++-
 arch/arm/boot/dts/omap4-sdp.dts                    | 107 +++++++++-
 arch/arm/boot/dts/omap4.dtsi                       |  65 ++++++
 arch/arm/mach-omap2/board-generic.c                |   4 +
 arch/arm/mach-omap2/common.h                       |   3 +
 arch/arm/mach-omap2/display.c                      | 132 ++++++++++++
 arch/arm/mach-omap2/dss-common.c                   | 224 ---------------------
 arch/arm/mach-omap2/pdata-quirks.c                 |   3 -
 .../video/omap2/displays-new/connector-analog-tv.c |  43 +++-
 drivers/video/omap2/displays-new/connector-dvi.c   |  43 ++++
 drivers/video/omap2/displays-new/connector-hdmi.c  |  30 +++
 drivers/video/omap2/displays-new/encoder-tfp410.c  |  43 +++-
 .../video/omap2/displays-new/encoder-tpd12s015.c   |  56 ++++++
 drivers/video/omap2/displays-new/panel-dpi.c       |  64 +++++-
 drivers/video/omap2/displays-new/panel-dsi-cm.c    |  65 +++++-
 .../omap2/displays-new/panel-sony-acx565akm.c      |  33 ++-
 drivers/video/omap2/dss/Makefile                   |   2 +-
 drivers/video/omap2/dss/dispc.c                    |   8 +
 drivers/video/omap2/dss/display.c                  |  28 ++-
 drivers/video/omap2/dss/dpi.c                      |  47 +++++
 drivers/video/omap2/dss/dsi.c                      | 147 +++++++++++++-
 drivers/video/omap2/dss/dss-of.c                   | 159 +++++++++++++++
 drivers/video/omap2/dss/dss.c                      |  64 ++++++
 drivers/video/omap2/dss/dss.h                      |   6 +
 drivers/video/omap2/dss/hdmi4.c                    |  14 +-
 drivers/video/omap2/dss/sdi.c                      |  45 +++++
 drivers/video/omap2/dss/venc.c                     |  66 +++++-
 drivers/video/omap2/omapfb/omapfb-main.c           |  67 ++++--
 include/video/omapdss.h                            |  14 ++
 48 files changed, 2550 insertions(+), 287 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/video/analog-tv-connector.txt
 create mode 100644 Documentation/devicetree/bindings/video/dvi-connector.txt
 create mode 100644 Documentation/devicetree/bindings/video/hdmi-connector.txt
 create mode 100644 Documentation/devicetree/bindings/video/panel-dpi.txt
 create mode 100644 Documentation/devicetree/bindings/video/panel-dsi-cm.txt
 create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap2-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap3-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap4-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,tfp410.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,tpd12s015.txt
 create mode 100644 Documentation/devicetree/bindings/video/video-ports.txt
 create mode 100644 drivers/video/omap2/dss/dss-of.c

-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-01-21 10:56 ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Here's version 3 of the DSS DT series.

The previous version can be found from:

v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249
v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866

The main changes to v2 are:

- DT Binding documentation
- OMAP2 DSS support
- Split DSI register space
- DSS nodes disabled by default
- Hack to have generic DT bindings but OMAP specific drivers (for now)

This series can also be found from:

git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3

 Tomi

Javier Martinez Canillas (1):
  ARM: omap3-igep0020.dts: add display information

Sebastian Reichel (1):
  OMAPDSS: acx565akm: Add DT support

Tomi Valkeinen (39):
  ARM: OMAP2+: add omapdss_init_of()
  ARM: OMAP2+: DT 'compatible' tweak for displays
  OMAPDSS: add 'label' support for DT
  OMAPDSS: get dssdev->alias from DT alias
  OMAPFB: clean up default display search
  OMAPFB: search for default display with DT alias
  OMAPDSS: add of helpers
  OMAPDSS: Improve regulator names for DT
  OMAPDSS: Add DT support to DSS
  OMAPDSS: Add DT support to DISPC
  OMAPDSS: Add DT support to HDMI
  OMAPDSS: Add DT support to VENC
  OMAPDSS: Add DT support to DSI
  OMAPDSS: panel-dsi-cm: Add DT support
  OMAPDSS: encoder-tfp410: Add DT support
  OMAPDSS: connector-dvi: Add DT support
  OMAPDSS: encoder-tpd12s015: Add DT support
  OMAPDSS: hdmi-connector: Add DT support
  OMAPDSS: panel-dpi: Add DT support
  OMAPDSS: connector-analog-tv: Add DT support
  ARM: omap2.dtsi: add omapdss information
  ARM: omap3.dtsi: add omapdss information
  ARM: omap4.dtsi: add omapdss information
  ARM: omap4-panda.dts: add display information
  ARM: omap4-sdp.dts: add display information
  ARM: omap3-beagle.dts: add display information
  ARM: omap3-beagle-xm.dts: add display information
  ARM: omap3-n900.dts: add display information
  OMAPDSS: remove DT hacks for regulators
  ARM: OMAP2+: remove pdata quirks for displays
  Doc/DT: Add OMAP DSS DT Bindings
  Doc/DT: Add DT binding documentation for Analog TV Connector
  Doc/DT: Add DT binding documentation for DVI Connector
  Doc/DT: Add DT binding documentation for HDMI Connector
  Doc/DT: Add DT binding documentation for MIPI DPI Panel
  Doc/DT: Add DT binding documentation for MIPI DSI CM Panel
  Doc/DT: Add DT binding documentation for Sony acx565akm panel
  Doc/DT: Add DT binding documentation for TFP410 encoder
  Doc/DT: Add DT binding documentation for tpd12s015 encoder

 .../bindings/video/analog-tv-connector.txt         |  23 +++
 .../devicetree/bindings/video/dvi-connector.txt    |  26 +++
 .../devicetree/bindings/video/hdmi-connector.txt   |  23 +++
 .../devicetree/bindings/video/panel-dpi.txt        |  43 ++++
 .../devicetree/bindings/video/panel-dsi-cm.txt     |  26 +++
 .../devicetree/bindings/video/sony,acx565akm.txt   |  28 +++
 .../devicetree/bindings/video/ti,omap-dss.txt      | 197 ++++++++++++++++++
 .../devicetree/bindings/video/ti,omap2-dss.txt     |  54 +++++
 .../devicetree/bindings/video/ti,omap3-dss.txt     |  73 +++++++
 .../devicetree/bindings/video/ti,omap4-dss.txt     |  99 +++++++++
 .../devicetree/bindings/video/ti,tfp410.txt        |  41 ++++
 .../devicetree/bindings/video/ti,tpd12s015.txt     |  44 ++++
 .../devicetree/bindings/video/video-ports.txt      |  22 ++
 arch/arm/boot/dts/omap2.dtsi                       |  31 +++
 arch/arm/boot/dts/omap3-beagle-xm.dts              | 119 +++++++++++
 arch/arm/boot/dts/omap3-beagle.dts                 | 116 +++++++++++
 arch/arm/boot/dts/omap3-igep0020.dts               |  59 +++++-
 arch/arm/boot/dts/omap3-n900.dts                   |  70 ++++++-
 arch/arm/boot/dts/omap3.dtsi                       |  42 ++++
 arch/arm/boot/dts/omap4-panda-common.dtsi          | 119 ++++++++++-
 arch/arm/boot/dts/omap4-sdp.dts                    | 107 +++++++++-
 arch/arm/boot/dts/omap4.dtsi                       |  65 ++++++
 arch/arm/mach-omap2/board-generic.c                |   4 +
 arch/arm/mach-omap2/common.h                       |   3 +
 arch/arm/mach-omap2/display.c                      | 132 ++++++++++++
 arch/arm/mach-omap2/dss-common.c                   | 224 ---------------------
 arch/arm/mach-omap2/pdata-quirks.c                 |   3 -
 .../video/omap2/displays-new/connector-analog-tv.c |  43 +++-
 drivers/video/omap2/displays-new/connector-dvi.c   |  43 ++++
 drivers/video/omap2/displays-new/connector-hdmi.c  |  30 +++
 drivers/video/omap2/displays-new/encoder-tfp410.c  |  43 +++-
 .../video/omap2/displays-new/encoder-tpd12s015.c   |  56 ++++++
 drivers/video/omap2/displays-new/panel-dpi.c       |  64 +++++-
 drivers/video/omap2/displays-new/panel-dsi-cm.c    |  65 +++++-
 .../omap2/displays-new/panel-sony-acx565akm.c      |  33 ++-
 drivers/video/omap2/dss/Makefile                   |   2 +-
 drivers/video/omap2/dss/dispc.c                    |   8 +
 drivers/video/omap2/dss/display.c                  |  28 ++-
 drivers/video/omap2/dss/dpi.c                      |  47 +++++
 drivers/video/omap2/dss/dsi.c                      | 147 +++++++++++++-
 drivers/video/omap2/dss/dss-of.c                   | 159 +++++++++++++++
 drivers/video/omap2/dss/dss.c                      |  64 ++++++
 drivers/video/omap2/dss/dss.h                      |   6 +
 drivers/video/omap2/dss/hdmi4.c                    |  14 +-
 drivers/video/omap2/dss/sdi.c                      |  45 +++++
 drivers/video/omap2/dss/venc.c                     |  66 +++++-
 drivers/video/omap2/omapfb/omapfb-main.c           |  67 ++++--
 include/video/omapdss.h                            |  14 ++
 48 files changed, 2550 insertions(+), 287 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/video/analog-tv-connector.txt
 create mode 100644 Documentation/devicetree/bindings/video/dvi-connector.txt
 create mode 100644 Documentation/devicetree/bindings/video/hdmi-connector.txt
 create mode 100644 Documentation/devicetree/bindings/video/panel-dpi.txt
 create mode 100644 Documentation/devicetree/bindings/video/panel-dsi-cm.txt
 create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap2-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap3-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap4-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,tfp410.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,tpd12s015.txt
 create mode 100644 Documentation/devicetree/bindings/video/video-ports.txt
 create mode 100644 drivers/video/omap2/dss/dss-of.c

-- 
1.8.3.2


^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-01-21 10:56 ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Here's version 3 of the DSS DT series.

The previous version can be found from:

v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249
v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866

The main changes to v2 are:

- DT Binding documentation
- OMAP2 DSS support
- Split DSI register space
- DSS nodes disabled by default
- Hack to have generic DT bindings but OMAP specific drivers (for now)

This series can also be found from:

git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3

 Tomi

Javier Martinez Canillas (1):
  ARM: omap3-igep0020.dts: add display information

Sebastian Reichel (1):
  OMAPDSS: acx565akm: Add DT support

Tomi Valkeinen (39):
  ARM: OMAP2+: add omapdss_init_of()
  ARM: OMAP2+: DT 'compatible' tweak for displays
  OMAPDSS: add 'label' support for DT
  OMAPDSS: get dssdev->alias from DT alias
  OMAPFB: clean up default display search
  OMAPFB: search for default display with DT alias
  OMAPDSS: add of helpers
  OMAPDSS: Improve regulator names for DT
  OMAPDSS: Add DT support to DSS
  OMAPDSS: Add DT support to DISPC
  OMAPDSS: Add DT support to HDMI
  OMAPDSS: Add DT support to VENC
  OMAPDSS: Add DT support to DSI
  OMAPDSS: panel-dsi-cm: Add DT support
  OMAPDSS: encoder-tfp410: Add DT support
  OMAPDSS: connector-dvi: Add DT support
  OMAPDSS: encoder-tpd12s015: Add DT support
  OMAPDSS: hdmi-connector: Add DT support
  OMAPDSS: panel-dpi: Add DT support
  OMAPDSS: connector-analog-tv: Add DT support
  ARM: omap2.dtsi: add omapdss information
  ARM: omap3.dtsi: add omapdss information
  ARM: omap4.dtsi: add omapdss information
  ARM: omap4-panda.dts: add display information
  ARM: omap4-sdp.dts: add display information
  ARM: omap3-beagle.dts: add display information
  ARM: omap3-beagle-xm.dts: add display information
  ARM: omap3-n900.dts: add display information
  OMAPDSS: remove DT hacks for regulators
  ARM: OMAP2+: remove pdata quirks for displays
  Doc/DT: Add OMAP DSS DT Bindings
  Doc/DT: Add DT binding documentation for Analog TV Connector
  Doc/DT: Add DT binding documentation for DVI Connector
  Doc/DT: Add DT binding documentation for HDMI Connector
  Doc/DT: Add DT binding documentation for MIPI DPI Panel
  Doc/DT: Add DT binding documentation for MIPI DSI CM Panel
  Doc/DT: Add DT binding documentation for Sony acx565akm panel
  Doc/DT: Add DT binding documentation for TFP410 encoder
  Doc/DT: Add DT binding documentation for tpd12s015 encoder

 .../bindings/video/analog-tv-connector.txt         |  23 +++
 .../devicetree/bindings/video/dvi-connector.txt    |  26 +++
 .../devicetree/bindings/video/hdmi-connector.txt   |  23 +++
 .../devicetree/bindings/video/panel-dpi.txt        |  43 ++++
 .../devicetree/bindings/video/panel-dsi-cm.txt     |  26 +++
 .../devicetree/bindings/video/sony,acx565akm.txt   |  28 +++
 .../devicetree/bindings/video/ti,omap-dss.txt      | 197 ++++++++++++++++++
 .../devicetree/bindings/video/ti,omap2-dss.txt     |  54 +++++
 .../devicetree/bindings/video/ti,omap3-dss.txt     |  73 +++++++
 .../devicetree/bindings/video/ti,omap4-dss.txt     |  99 +++++++++
 .../devicetree/bindings/video/ti,tfp410.txt        |  41 ++++
 .../devicetree/bindings/video/ti,tpd12s015.txt     |  44 ++++
 .../devicetree/bindings/video/video-ports.txt      |  22 ++
 arch/arm/boot/dts/omap2.dtsi                       |  31 +++
 arch/arm/boot/dts/omap3-beagle-xm.dts              | 119 +++++++++++
 arch/arm/boot/dts/omap3-beagle.dts                 | 116 +++++++++++
 arch/arm/boot/dts/omap3-igep0020.dts               |  59 +++++-
 arch/arm/boot/dts/omap3-n900.dts                   |  70 ++++++-
 arch/arm/boot/dts/omap3.dtsi                       |  42 ++++
 arch/arm/boot/dts/omap4-panda-common.dtsi          | 119 ++++++++++-
 arch/arm/boot/dts/omap4-sdp.dts                    | 107 +++++++++-
 arch/arm/boot/dts/omap4.dtsi                       |  65 ++++++
 arch/arm/mach-omap2/board-generic.c                |   4 +
 arch/arm/mach-omap2/common.h                       |   3 +
 arch/arm/mach-omap2/display.c                      | 132 ++++++++++++
 arch/arm/mach-omap2/dss-common.c                   | 224 ---------------------
 arch/arm/mach-omap2/pdata-quirks.c                 |   3 -
 .../video/omap2/displays-new/connector-analog-tv.c |  43 +++-
 drivers/video/omap2/displays-new/connector-dvi.c   |  43 ++++
 drivers/video/omap2/displays-new/connector-hdmi.c  |  30 +++
 drivers/video/omap2/displays-new/encoder-tfp410.c  |  43 +++-
 .../video/omap2/displays-new/encoder-tpd12s015.c   |  56 ++++++
 drivers/video/omap2/displays-new/panel-dpi.c       |  64 +++++-
 drivers/video/omap2/displays-new/panel-dsi-cm.c    |  65 +++++-
 .../omap2/displays-new/panel-sony-acx565akm.c      |  33 ++-
 drivers/video/omap2/dss/Makefile                   |   2 +-
 drivers/video/omap2/dss/dispc.c                    |   8 +
 drivers/video/omap2/dss/display.c                  |  28 ++-
 drivers/video/omap2/dss/dpi.c                      |  47 +++++
 drivers/video/omap2/dss/dsi.c                      | 147 +++++++++++++-
 drivers/video/omap2/dss/dss-of.c                   | 159 +++++++++++++++
 drivers/video/omap2/dss/dss.c                      |  64 ++++++
 drivers/video/omap2/dss/dss.h                      |   6 +
 drivers/video/omap2/dss/hdmi4.c                    |  14 +-
 drivers/video/omap2/dss/sdi.c                      |  45 +++++
 drivers/video/omap2/dss/venc.c                     |  66 +++++-
 drivers/video/omap2/omapfb/omapfb-main.c           |  67 ++++--
 include/video/omapdss.h                            |  14 ++
 48 files changed, 2550 insertions(+), 287 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/video/analog-tv-connector.txt
 create mode 100644 Documentation/devicetree/bindings/video/dvi-connector.txt
 create mode 100644 Documentation/devicetree/bindings/video/hdmi-connector.txt
 create mode 100644 Documentation/devicetree/bindings/video/panel-dpi.txt
 create mode 100644 Documentation/devicetree/bindings/video/panel-dsi-cm.txt
 create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap2-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap3-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap4-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,tfp410.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,tpd12s015.txt
 create mode 100644 Documentation/devicetree/bindings/video/video-ports.txt
 create mode 100644 drivers/video/omap2/dss/dss-of.c

-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 01/41] ARM: OMAP2+: add omapdss_init_of()
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

omapdss driver uses a omapdss platform device to pass platform specific
function pointers and DSS hardware version from the arch code to the
driver. This device is needed also when booting with DT.

This patch adds omapdss_init_of() function, called from board-generic at
init time, which creates the omapdss device.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/board-generic.c |  2 +
 arch/arm/mach-omap2/common.h        |  2 +
 arch/arm/mach-omap2/display.c       | 76 +++++++++++++++++++++++++++++++++++++
 3 files changed, 80 insertions(+)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 8d972ff18c56..842e4f21ab09 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -36,6 +36,8 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
 static void __init omap_generic_init(void)
 {
 	pdata_quirks_init(omap_dt_match_table);
+
+	omapdss_init_of();
 }
 
 #ifdef CONFIG_SOC_OMAP2420
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index e30ef6797c63..04a4d360dd20 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -307,5 +307,7 @@ extern int omap_dss_reset(struct omap_hwmod *);
 /* SoC specific clock initializer */
 extern int (*omap_clk_init)(void);
 
+int __init omapdss_init_of(void);
+
 #endif /* __ASSEMBLER__ */
 #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 4cf165502b35..77cd927e5acb 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -23,6 +23,8 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/delay.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
 
 #include <video/omapdss.h>
 #include "omap_hwmod.h"
@@ -552,3 +554,77 @@ int omap_dss_reset(struct omap_hwmod *oh)
 
 	return r;
 }
+
+int __init omapdss_init_of(void)
+{
+	int r;
+	enum omapdss_version ver;
+	struct device_node *node;
+
+	static struct omap_dss_board_info board_data = {
+		.dsi_enable_pads = omap_dsi_enable_pads,
+		.dsi_disable_pads = omap_dsi_disable_pads,
+		.get_context_loss_count = omap_pm_get_dev_context_loss_count,
+		.set_min_bus_tput = omap_dss_set_min_bus_tput,
+	};
+
+	/* only create dss helper devices if dss is enabled in the .dts */
+
+	node = of_find_compatible_node(NULL, NULL, "ti,omap2-dss");
+	if (!node)
+		node = of_find_compatible_node(NULL, NULL, "ti,omap3-dss");
+	if (!node)
+		node = of_find_compatible_node(NULL, NULL, "ti,omap4-dss");
+	if (!node)
+		return 0;
+
+	if (!of_device_is_available(node))
+		return 0;
+
+	ver = omap_display_get_version();
+
+	if (ver == OMAPDSS_VER_UNKNOWN) {
+		pr_err("DSS not supported on this SoC\n");
+		return -ENODEV;
+	}
+
+	board_data.version = ver;
+
+	omap_display_device.dev.platform_data = &board_data;
+
+	r = platform_device_register(&omap_display_device);
+	if (r < 0) {
+		pr_err("Unable to register omapdss device\n");
+		return r;
+	}
+
+	/* create DRM device */
+	r = omap_init_drm();
+	if (r < 0) {
+		pr_err("Unable to register omapdrm device\n");
+		return r;
+	}
+
+	/* create vrfb device */
+	r = omap_init_vrfb();
+	if (r < 0) {
+		pr_err("Unable to register omapvrfb device\n");
+		return r;
+	}
+
+	/* create FB device */
+	r = omap_init_fb();
+	if (r < 0) {
+		pr_err("Unable to register omapfb device\n");
+		return r;
+	}
+
+	/* create V4L2 display device */
+	r = omap_init_vout();
+	if (r < 0) {
+		pr_err("Unable to register omap_vout device\n");
+		return r;
+	}
+
+	return 0;
+}
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 01/41] ARM: OMAP2+: add omapdss_init_of()
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

omapdss driver uses a omapdss platform device to pass platform specific
function pointers and DSS hardware version from the arch code to the
driver. This device is needed also when booting with DT.

This patch adds omapdss_init_of() function, called from board-generic at
init time, which creates the omapdss device.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/board-generic.c |  2 +
 arch/arm/mach-omap2/common.h        |  2 +
 arch/arm/mach-omap2/display.c       | 76 +++++++++++++++++++++++++++++++++++++
 3 files changed, 80 insertions(+)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 8d972ff18c56..842e4f21ab09 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -36,6 +36,8 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
 static void __init omap_generic_init(void)
 {
 	pdata_quirks_init(omap_dt_match_table);
+
+	omapdss_init_of();
 }
 
 #ifdef CONFIG_SOC_OMAP2420
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index e30ef6797c63..04a4d360dd20 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -307,5 +307,7 @@ extern int omap_dss_reset(struct omap_hwmod *);
 /* SoC specific clock initializer */
 extern int (*omap_clk_init)(void);
 
+int __init omapdss_init_of(void);
+
 #endif /* __ASSEMBLER__ */
 #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 4cf165502b35..77cd927e5acb 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -23,6 +23,8 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/delay.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
 
 #include <video/omapdss.h>
 #include "omap_hwmod.h"
@@ -552,3 +554,77 @@ int omap_dss_reset(struct omap_hwmod *oh)
 
 	return r;
 }
+
+int __init omapdss_init_of(void)
+{
+	int r;
+	enum omapdss_version ver;
+	struct device_node *node;
+
+	static struct omap_dss_board_info board_data = {
+		.dsi_enable_pads = omap_dsi_enable_pads,
+		.dsi_disable_pads = omap_dsi_disable_pads,
+		.get_context_loss_count = omap_pm_get_dev_context_loss_count,
+		.set_min_bus_tput = omap_dss_set_min_bus_tput,
+	};
+
+	/* only create dss helper devices if dss is enabled in the .dts */
+
+	node = of_find_compatible_node(NULL, NULL, "ti,omap2-dss");
+	if (!node)
+		node = of_find_compatible_node(NULL, NULL, "ti,omap3-dss");
+	if (!node)
+		node = of_find_compatible_node(NULL, NULL, "ti,omap4-dss");
+	if (!node)
+		return 0;
+
+	if (!of_device_is_available(node))
+		return 0;
+
+	ver = omap_display_get_version();
+
+	if (ver = OMAPDSS_VER_UNKNOWN) {
+		pr_err("DSS not supported on this SoC\n");
+		return -ENODEV;
+	}
+
+	board_data.version = ver;
+
+	omap_display_device.dev.platform_data = &board_data;
+
+	r = platform_device_register(&omap_display_device);
+	if (r < 0) {
+		pr_err("Unable to register omapdss device\n");
+		return r;
+	}
+
+	/* create DRM device */
+	r = omap_init_drm();
+	if (r < 0) {
+		pr_err("Unable to register omapdrm device\n");
+		return r;
+	}
+
+	/* create vrfb device */
+	r = omap_init_vrfb();
+	if (r < 0) {
+		pr_err("Unable to register omapvrfb device\n");
+		return r;
+	}
+
+	/* create FB device */
+	r = omap_init_fb();
+	if (r < 0) {
+		pr_err("Unable to register omapfb device\n");
+		return r;
+	}
+
+	/* create V4L2 display device */
+	r = omap_init_vout();
+	if (r < 0) {
+		pr_err("Unable to register omap_vout device\n");
+		return r;
+	}
+
+	return 0;
+}
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 01/41] ARM: OMAP2+: add omapdss_init_of()
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

omapdss driver uses a omapdss platform device to pass platform specific
function pointers and DSS hardware version from the arch code to the
driver. This device is needed also when booting with DT.

This patch adds omapdss_init_of() function, called from board-generic at
init time, which creates the omapdss device.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/board-generic.c |  2 +
 arch/arm/mach-omap2/common.h        |  2 +
 arch/arm/mach-omap2/display.c       | 76 +++++++++++++++++++++++++++++++++++++
 3 files changed, 80 insertions(+)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 8d972ff18c56..842e4f21ab09 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -36,6 +36,8 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
 static void __init omap_generic_init(void)
 {
 	pdata_quirks_init(omap_dt_match_table);
+
+	omapdss_init_of();
 }
 
 #ifdef CONFIG_SOC_OMAP2420
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index e30ef6797c63..04a4d360dd20 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -307,5 +307,7 @@ extern int omap_dss_reset(struct omap_hwmod *);
 /* SoC specific clock initializer */
 extern int (*omap_clk_init)(void);
 
+int __init omapdss_init_of(void);
+
 #endif /* __ASSEMBLER__ */
 #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 4cf165502b35..77cd927e5acb 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -23,6 +23,8 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/delay.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
 
 #include <video/omapdss.h>
 #include "omap_hwmod.h"
@@ -552,3 +554,77 @@ int omap_dss_reset(struct omap_hwmod *oh)
 
 	return r;
 }
+
+int __init omapdss_init_of(void)
+{
+	int r;
+	enum omapdss_version ver;
+	struct device_node *node;
+
+	static struct omap_dss_board_info board_data = {
+		.dsi_enable_pads = omap_dsi_enable_pads,
+		.dsi_disable_pads = omap_dsi_disable_pads,
+		.get_context_loss_count = omap_pm_get_dev_context_loss_count,
+		.set_min_bus_tput = omap_dss_set_min_bus_tput,
+	};
+
+	/* only create dss helper devices if dss is enabled in the .dts */
+
+	node = of_find_compatible_node(NULL, NULL, "ti,omap2-dss");
+	if (!node)
+		node = of_find_compatible_node(NULL, NULL, "ti,omap3-dss");
+	if (!node)
+		node = of_find_compatible_node(NULL, NULL, "ti,omap4-dss");
+	if (!node)
+		return 0;
+
+	if (!of_device_is_available(node))
+		return 0;
+
+	ver = omap_display_get_version();
+
+	if (ver == OMAPDSS_VER_UNKNOWN) {
+		pr_err("DSS not supported on this SoC\n");
+		return -ENODEV;
+	}
+
+	board_data.version = ver;
+
+	omap_display_device.dev.platform_data = &board_data;
+
+	r = platform_device_register(&omap_display_device);
+	if (r < 0) {
+		pr_err("Unable to register omapdss device\n");
+		return r;
+	}
+
+	/* create DRM device */
+	r = omap_init_drm();
+	if (r < 0) {
+		pr_err("Unable to register omapdrm device\n");
+		return r;
+	}
+
+	/* create vrfb device */
+	r = omap_init_vrfb();
+	if (r < 0) {
+		pr_err("Unable to register omapvrfb device\n");
+		return r;
+	}
+
+	/* create FB device */
+	r = omap_init_fb();
+	if (r < 0) {
+		pr_err("Unable to register omapfb device\n");
+		return r;
+	}
+
+	/* create V4L2 display device */
+	r = omap_init_vout();
+	if (r < 0) {
+		pr_err("Unable to register omap_vout device\n");
+		return r;
+	}
+
+	return 0;
+}
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 02/41] ARM: OMAP2+: DT 'compatible' tweak for displays
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

As there is no common panel framework in the kernel, we have OMAP
specific panel drivers. However, the DT data should be generic. This
brings the issue that some other platform could use the same panels, and
would need to create a driver with the same 'compatible' string as the
OMAP driver.

In the long run, we have to get a common panel framework. For the time
being, this patch solves the issue:

At early boot time, we go through the DT nodes looking for the panels
the kernel supports for OMAP. For each found node, the 'compatible'
string is prepended with "omapdss,", i.e. "sony,acx565akm" becomes
"omapdss,sony,acx565akm". The OMAP display drivers all have "omapdss,"
at the beginning of their compatible field.

This allows us to have generic DT data, but OMAP specific display
drivers.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/board-generic.c |  2 ++
 arch/arm/mach-omap2/common.h        |  1 +
 arch/arm/mach-omap2/display.c       | 56 +++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 842e4f21ab09..08921d0d63d4 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -35,6 +35,8 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
 
 static void __init omap_generic_init(void)
 {
+	omapdss_early_init_of();
+
 	pdata_quirks_init(omap_dt_match_table);
 
 	omapdss_init_of();
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 04a4d360dd20..e21702e2e82e 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -308,6 +308,7 @@ extern int omap_dss_reset(struct omap_hwmod *);
 extern int (*omap_clk_init)(void);
 
 int __init omapdss_init_of(void);
+void __init omapdss_early_init_of(void);
 
 #endif /* __ASSEMBLER__ */
 #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 77cd927e5acb..9a729bd3d28b 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -25,6 +25,7 @@
 #include <linux/delay.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/slab.h>
 
 #include <video/omapdss.h>
 #include "omap_hwmod.h"
@@ -555,6 +556,61 @@ int omap_dss_reset(struct omap_hwmod *oh)
 	return r;
 }
 
+/* list of 'compatible' nodes to convert to omapdss specific */
+static const char * const dss_compat_conv_list[] __initconst = {
+	"composite-connector",
+	"dvi-connector",
+	"hdmi-connector",
+	"panel-dpi",
+	"panel-dsi-cm",
+	"sony,acx565akm",
+	"svideo-connector",
+	"ti,tfp410",
+	"ti,tpd12s015",
+};
+
+/* prepend compatible string with "omapdss," */
+static __init void omapdss_omapify_node(struct device_node *node,
+	const char *compat)
+{
+	char *new_compat;
+	struct property *prop;
+
+	new_compat = kasprintf(GFP_KERNEL, "omapdss,%s", compat);
+
+	prop = kzalloc(sizeof(*prop), GFP_KERNEL);
+	prop->name = "compatible";
+	prop->value = new_compat;
+	prop->length = strlen(new_compat) + 1;
+
+	of_update_property(node, prop);
+}
+
+/*
+ * As omapdss panel drivers are omapdss specific, but we want to define the
+ * DT-data in generic manner, we convert the compatible strings of the panel
+ * nodes from "panel-foo" to "omapdss,panel-foo". This way we can have both
+ * correct DT data and omapdss specific drivers.
+ *
+ * When we get generic panel drivers to the kernel, this will be removed.
+ */
+void __init omapdss_early_init_of(void)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(dss_compat_conv_list); ++i) {
+		const char *compat = dss_compat_conv_list[i];
+		struct device_node *node = NULL;
+
+		while ((node = of_find_compatible_node(node, NULL, compat))) {
+			if (!of_device_is_available(node))
+				continue;
+
+			omapdss_omapify_node(node, compat);
+		}
+	}
+}
+
 int __init omapdss_init_of(void)
 {
 	int r;
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 02/41] ARM: OMAP2+: DT 'compatible' tweak for displays
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

As there is no common panel framework in the kernel, we have OMAP
specific panel drivers. However, the DT data should be generic. This
brings the issue that some other platform could use the same panels, and
would need to create a driver with the same 'compatible' string as the
OMAP driver.

In the long run, we have to get a common panel framework. For the time
being, this patch solves the issue:

At early boot time, we go through the DT nodes looking for the panels
the kernel supports for OMAP. For each found node, the 'compatible'
string is prepended with "omapdss,", i.e. "sony,acx565akm" becomes
"omapdss,sony,acx565akm". The OMAP display drivers all have "omapdss,"
at the beginning of their compatible field.

This allows us to have generic DT data, but OMAP specific display
drivers.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/board-generic.c |  2 ++
 arch/arm/mach-omap2/common.h        |  1 +
 arch/arm/mach-omap2/display.c       | 56 +++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 842e4f21ab09..08921d0d63d4 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -35,6 +35,8 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
 
 static void __init omap_generic_init(void)
 {
+	omapdss_early_init_of();
+
 	pdata_quirks_init(omap_dt_match_table);
 
 	omapdss_init_of();
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 04a4d360dd20..e21702e2e82e 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -308,6 +308,7 @@ extern int omap_dss_reset(struct omap_hwmod *);
 extern int (*omap_clk_init)(void);
 
 int __init omapdss_init_of(void);
+void __init omapdss_early_init_of(void);
 
 #endif /* __ASSEMBLER__ */
 #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 77cd927e5acb..9a729bd3d28b 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -25,6 +25,7 @@
 #include <linux/delay.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/slab.h>
 
 #include <video/omapdss.h>
 #include "omap_hwmod.h"
@@ -555,6 +556,61 @@ int omap_dss_reset(struct omap_hwmod *oh)
 	return r;
 }
 
+/* list of 'compatible' nodes to convert to omapdss specific */
+static const char * const dss_compat_conv_list[] __initconst = {
+	"composite-connector",
+	"dvi-connector",
+	"hdmi-connector",
+	"panel-dpi",
+	"panel-dsi-cm",
+	"sony,acx565akm",
+	"svideo-connector",
+	"ti,tfp410",
+	"ti,tpd12s015",
+};
+
+/* prepend compatible string with "omapdss," */
+static __init void omapdss_omapify_node(struct device_node *node,
+	const char *compat)
+{
+	char *new_compat;
+	struct property *prop;
+
+	new_compat = kasprintf(GFP_KERNEL, "omapdss,%s", compat);
+
+	prop = kzalloc(sizeof(*prop), GFP_KERNEL);
+	prop->name = "compatible";
+	prop->value = new_compat;
+	prop->length = strlen(new_compat) + 1;
+
+	of_update_property(node, prop);
+}
+
+/*
+ * As omapdss panel drivers are omapdss specific, but we want to define the
+ * DT-data in generic manner, we convert the compatible strings of the panel
+ * nodes from "panel-foo" to "omapdss,panel-foo". This way we can have both
+ * correct DT data and omapdss specific drivers.
+ *
+ * When we get generic panel drivers to the kernel, this will be removed.
+ */
+void __init omapdss_early_init_of(void)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(dss_compat_conv_list); ++i) {
+		const char *compat = dss_compat_conv_list[i];
+		struct device_node *node = NULL;
+
+		while ((node = of_find_compatible_node(node, NULL, compat))) {
+			if (!of_device_is_available(node))
+				continue;
+
+			omapdss_omapify_node(node, compat);
+		}
+	}
+}
+
 int __init omapdss_init_of(void)
 {
 	int r;
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 02/41] ARM: OMAP2+: DT 'compatible' tweak for displays
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

As there is no common panel framework in the kernel, we have OMAP
specific panel drivers. However, the DT data should be generic. This
brings the issue that some other platform could use the same panels, and
would need to create a driver with the same 'compatible' string as the
OMAP driver.

In the long run, we have to get a common panel framework. For the time
being, this patch solves the issue:

At early boot time, we go through the DT nodes looking for the panels
the kernel supports for OMAP. For each found node, the 'compatible'
string is prepended with "omapdss,", i.e. "sony,acx565akm" becomes
"omapdss,sony,acx565akm". The OMAP display drivers all have "omapdss,"
at the beginning of their compatible field.

This allows us to have generic DT data, but OMAP specific display
drivers.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/board-generic.c |  2 ++
 arch/arm/mach-omap2/common.h        |  1 +
 arch/arm/mach-omap2/display.c       | 56 +++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 842e4f21ab09..08921d0d63d4 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -35,6 +35,8 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
 
 static void __init omap_generic_init(void)
 {
+	omapdss_early_init_of();
+
 	pdata_quirks_init(omap_dt_match_table);
 
 	omapdss_init_of();
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 04a4d360dd20..e21702e2e82e 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -308,6 +308,7 @@ extern int omap_dss_reset(struct omap_hwmod *);
 extern int (*omap_clk_init)(void);
 
 int __init omapdss_init_of(void);
+void __init omapdss_early_init_of(void);
 
 #endif /* __ASSEMBLER__ */
 #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 77cd927e5acb..9a729bd3d28b 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -25,6 +25,7 @@
 #include <linux/delay.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/slab.h>
 
 #include <video/omapdss.h>
 #include "omap_hwmod.h"
@@ -555,6 +556,61 @@ int omap_dss_reset(struct omap_hwmod *oh)
 	return r;
 }
 
+/* list of 'compatible' nodes to convert to omapdss specific */
+static const char * const dss_compat_conv_list[] __initconst = {
+	"composite-connector",
+	"dvi-connector",
+	"hdmi-connector",
+	"panel-dpi",
+	"panel-dsi-cm",
+	"sony,acx565akm",
+	"svideo-connector",
+	"ti,tfp410",
+	"ti,tpd12s015",
+};
+
+/* prepend compatible string with "omapdss," */
+static __init void omapdss_omapify_node(struct device_node *node,
+	const char *compat)
+{
+	char *new_compat;
+	struct property *prop;
+
+	new_compat = kasprintf(GFP_KERNEL, "omapdss,%s", compat);
+
+	prop = kzalloc(sizeof(*prop), GFP_KERNEL);
+	prop->name = "compatible";
+	prop->value = new_compat;
+	prop->length = strlen(new_compat) + 1;
+
+	of_update_property(node, prop);
+}
+
+/*
+ * As omapdss panel drivers are omapdss specific, but we want to define the
+ * DT-data in generic manner, we convert the compatible strings of the panel
+ * nodes from "panel-foo" to "omapdss,panel-foo". This way we can have both
+ * correct DT data and omapdss specific drivers.
+ *
+ * When we get generic panel drivers to the kernel, this will be removed.
+ */
+void __init omapdss_early_init_of(void)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(dss_compat_conv_list); ++i) {
+		const char *compat = dss_compat_conv_list[i];
+		struct device_node *node = NULL;
+
+		while ((node = of_find_compatible_node(node, NULL, compat))) {
+			if (!of_device_is_available(node))
+				continue;
+
+			omapdss_omapify_node(node, compat);
+		}
+	}
+}
+
 int __init omapdss_init_of(void)
 {
 	int r;
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 03/41] OMAPDSS: add 'label' support for DT
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add support to get the label (i.e. a "nickname") for a display from the
DT data. If there is no label defined, use the display's alias (e.g.
'display0') as a name.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/display.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 669a81fdf58e..012ada38a29d 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/jiffies.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 #include "dss.h"
@@ -137,6 +138,14 @@ int omapdss_register_display(struct omap_dss_device *dssdev)
 	snprintf(dssdev->alias, sizeof(dssdev->alias),
 			"display%d", disp_num_counter++);
 
+	/* Use 'label' property for name, if it exists */
+	if (dssdev->dev->of_node)
+		of_property_read_string(dssdev->dev->of_node, "label",
+			&dssdev->name);
+
+	if (dssdev->name == NULL)
+		dssdev->name = dssdev->alias;
+
 	if (drv && drv->get_resolution == NULL)
 		drv->get_resolution = omapdss_default_get_resolution;
 	if (drv && drv->get_recommended_bpp == NULL)
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 03/41] OMAPDSS: add 'label' support for DT
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add support to get the label (i.e. a "nickname") for a display from the
DT data. If there is no label defined, use the display's alias (e.g.
'display0') as a name.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/display.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 669a81fdf58e..012ada38a29d 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/jiffies.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 #include "dss.h"
@@ -137,6 +138,14 @@ int omapdss_register_display(struct omap_dss_device *dssdev)
 	snprintf(dssdev->alias, sizeof(dssdev->alias),
 			"display%d", disp_num_counter++);
 
+	/* Use 'label' property for name, if it exists */
+	if (dssdev->dev->of_node)
+		of_property_read_string(dssdev->dev->of_node, "label",
+			&dssdev->name);
+
+	if (dssdev->name = NULL)
+		dssdev->name = dssdev->alias;
+
 	if (drv && drv->get_resolution = NULL)
 		drv->get_resolution = omapdss_default_get_resolution;
 	if (drv && drv->get_recommended_bpp = NULL)
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 03/41] OMAPDSS: add 'label' support for DT
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add support to get the label (i.e. a "nickname") for a display from the
DT data. If there is no label defined, use the display's alias (e.g.
'display0') as a name.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/display.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 669a81fdf58e..012ada38a29d 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/jiffies.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 #include "dss.h"
@@ -137,6 +138,14 @@ int omapdss_register_display(struct omap_dss_device *dssdev)
 	snprintf(dssdev->alias, sizeof(dssdev->alias),
 			"display%d", disp_num_counter++);
 
+	/* Use 'label' property for name, if it exists */
+	if (dssdev->dev->of_node)
+		of_property_read_string(dssdev->dev->of_node, "label",
+			&dssdev->name);
+
+	if (dssdev->name == NULL)
+		dssdev->name = dssdev->alias;
+
 	if (drv && drv->get_resolution == NULL)
 		drv->get_resolution = omapdss_default_get_resolution;
 	if (drv && drv->get_recommended_bpp == NULL)
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 04/41] OMAPDSS: get dssdev->alias from DT alias
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56     ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

We currently create a "displayX" style alias name for all displays,
using a number that is incremented for each registered display. With the
new DSS device model there is no clear order in which the displays are
registered, and thus the numbering is somewhat random.

This patch improves the behavior for DT case so that if the displays
have been assigned DT aliases, those aliases will be used as DSS
aliases.

This means that "display0" is always the one specified in the DT alias,
and thus display0 can be used as default display in case the user didn't
specify a default display.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
---
 drivers/video/omap2/dss/display.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 012ada38a29d..21080f9dae87 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -134,9 +134,24 @@ static int disp_num_counter;
 int omapdss_register_display(struct omap_dss_device *dssdev)
 {
 	struct omap_dss_driver *drv = dssdev->driver;
+	int id;
 
-	snprintf(dssdev->alias, sizeof(dssdev->alias),
-			"display%d", disp_num_counter++);
+	/*
+	 * Note: this presumes all the displays are either using DT or non-DT,
+	 * which normally should be the case. This also presumes that all
+	 * displays either have an DT alias, or none has.
+	 */
+
+	if (dssdev->dev->of_node) {
+		id = of_alias_get_id(dssdev->dev->of_node, "display");
+
+		if (id < 0)
+			id = disp_num_counter++;
+	} else {
+		id = disp_num_counter++;
+	}
+
+	snprintf(dssdev->alias, sizeof(dssdev->alias), "display%d", id);
 
 	/* Use 'label' property for name, if it exists */
 	if (dssdev->dev->of_node)
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 04/41] OMAPDSS: get dssdev->alias from DT alias
@ 2014-01-21 10:56     ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

We currently create a "displayX" style alias name for all displays,
using a number that is incremented for each registered display. With the
new DSS device model there is no clear order in which the displays are
registered, and thus the numbering is somewhat random.

This patch improves the behavior for DT case so that if the displays
have been assigned DT aliases, those aliases will be used as DSS
aliases.

This means that "display0" is always the one specified in the DT alias,
and thus display0 can be used as default display in case the user didn't
specify a default display.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/display.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 012ada38a29d..21080f9dae87 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -134,9 +134,24 @@ static int disp_num_counter;
 int omapdss_register_display(struct omap_dss_device *dssdev)
 {
 	struct omap_dss_driver *drv = dssdev->driver;
+	int id;
 
-	snprintf(dssdev->alias, sizeof(dssdev->alias),
-			"display%d", disp_num_counter++);
+	/*
+	 * Note: this presumes all the displays are either using DT or non-DT,
+	 * which normally should be the case. This also presumes that all
+	 * displays either have an DT alias, or none has.
+	 */
+
+	if (dssdev->dev->of_node) {
+		id = of_alias_get_id(dssdev->dev->of_node, "display");
+
+		if (id < 0)
+			id = disp_num_counter++;
+	} else {
+		id = disp_num_counter++;
+	}
+
+	snprintf(dssdev->alias, sizeof(dssdev->alias), "display%d", id);
 
 	/* Use 'label' property for name, if it exists */
 	if (dssdev->dev->of_node)
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 04/41] OMAPDSS: get dssdev->alias from DT alias
@ 2014-01-21 10:56     ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

We currently create a "displayX" style alias name for all displays,
using a number that is incremented for each registered display. With the
new DSS device model there is no clear order in which the displays are
registered, and thus the numbering is somewhat random.

This patch improves the behavior for DT case so that if the displays
have been assigned DT aliases, those aliases will be used as DSS
aliases.

This means that "display0" is always the one specified in the DT alias,
and thus display0 can be used as default display in case the user didn't
specify a default display.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/display.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 012ada38a29d..21080f9dae87 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -134,9 +134,24 @@ static int disp_num_counter;
 int omapdss_register_display(struct omap_dss_device *dssdev)
 {
 	struct omap_dss_driver *drv = dssdev->driver;
+	int id;
 
-	snprintf(dssdev->alias, sizeof(dssdev->alias),
-			"display%d", disp_num_counter++);
+	/*
+	 * Note: this presumes all the displays are either using DT or non-DT,
+	 * which normally should be the case. This also presumes that all
+	 * displays either have an DT alias, or none has.
+	 */
+
+	if (dssdev->dev->of_node) {
+		id = of_alias_get_id(dssdev->dev->of_node, "display");
+
+		if (id < 0)
+			id = disp_num_counter++;
+	} else {
+		id = disp_num_counter++;
+	}
+
+	snprintf(dssdev->alias, sizeof(dssdev->alias), "display%d", id);
 
 	/* Use 'label' property for name, if it exists */
 	if (dssdev->dev->of_node)
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 05/41] OMAPFB: clean up default display search
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Separate the code for finding the default display into a function for
clarity and to make it easier to extend it in the future.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/omapfb/omapfb-main.c | 46 ++++++++++++++++++++------------
 1 file changed, 29 insertions(+), 17 deletions(-)

diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index fcb9e932d00c..b7469636f15c 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2417,6 +2417,34 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev,
 	return 0;
 }
 
+static struct omap_dss_device *
+omapfb_find_default_display(struct omapfb2_device *fbdev)
+{
+	const char *def_name;
+	int i;
+
+	/* search with the display name from the user or the board file */
+
+	def_name = omapdss_get_default_display_name();
+
+	if (def_name) {
+		for (i = 0; i < fbdev->num_displays; ++i) {
+			struct omap_dss_device *dssdev;
+
+			dssdev = fbdev->displays[i].dssdev;
+
+			if (dssdev->name && strcmp(def_name, dssdev->name) == 0)
+				return dssdev;
+		}
+
+		/* def_name given but not found */
+		return NULL;
+	}
+
+	/* return the first display we have in the list */
+	return fbdev->displays[0].dssdev;
+}
+
 static int omapfb_probe(struct platform_device *pdev)
 {
 	struct omapfb2_device *fbdev = NULL;
@@ -2494,23 +2522,7 @@ static int omapfb_probe(struct platform_device *pdev)
 	for (i = 0; i < fbdev->num_managers; i++)
 		fbdev->managers[i] = omap_dss_get_overlay_manager(i);
 
-	def_display = NULL;
-
-	for (i = 0; i < fbdev->num_displays; ++i) {
-		struct omap_dss_device *dssdev;
-		const char *def_name;
-
-		def_name = omapdss_get_default_display_name();
-
-		dssdev = fbdev->displays[i].dssdev;
-
-		if (def_name == NULL ||
-			(dssdev->name && strcmp(def_name, dssdev->name) == 0)) {
-			def_display = dssdev;
-			break;
-		}
-	}
-
+	def_display = omapfb_find_default_display(fbdev);
 	if (def_display == NULL) {
 		dev_err(fbdev->dev, "failed to find default display\n");
 		r = -EPROBE_DEFER;
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 05/41] OMAPFB: clean up default display search
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Separate the code for finding the default display into a function for
clarity and to make it easier to extend it in the future.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/omapfb/omapfb-main.c | 46 ++++++++++++++++++++------------
 1 file changed, 29 insertions(+), 17 deletions(-)

diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index fcb9e932d00c..b7469636f15c 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2417,6 +2417,34 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev,
 	return 0;
 }
 
+static struct omap_dss_device *
+omapfb_find_default_display(struct omapfb2_device *fbdev)
+{
+	const char *def_name;
+	int i;
+
+	/* search with the display name from the user or the board file */
+
+	def_name = omapdss_get_default_display_name();
+
+	if (def_name) {
+		for (i = 0; i < fbdev->num_displays; ++i) {
+			struct omap_dss_device *dssdev;
+
+			dssdev = fbdev->displays[i].dssdev;
+
+			if (dssdev->name && strcmp(def_name, dssdev->name) = 0)
+				return dssdev;
+		}
+
+		/* def_name given but not found */
+		return NULL;
+	}
+
+	/* return the first display we have in the list */
+	return fbdev->displays[0].dssdev;
+}
+
 static int omapfb_probe(struct platform_device *pdev)
 {
 	struct omapfb2_device *fbdev = NULL;
@@ -2494,23 +2522,7 @@ static int omapfb_probe(struct platform_device *pdev)
 	for (i = 0; i < fbdev->num_managers; i++)
 		fbdev->managers[i] = omap_dss_get_overlay_manager(i);
 
-	def_display = NULL;
-
-	for (i = 0; i < fbdev->num_displays; ++i) {
-		struct omap_dss_device *dssdev;
-		const char *def_name;
-
-		def_name = omapdss_get_default_display_name();
-
-		dssdev = fbdev->displays[i].dssdev;
-
-		if (def_name = NULL ||
-			(dssdev->name && strcmp(def_name, dssdev->name) = 0)) {
-			def_display = dssdev;
-			break;
-		}
-	}
-
+	def_display = omapfb_find_default_display(fbdev);
 	if (def_display = NULL) {
 		dev_err(fbdev->dev, "failed to find default display\n");
 		r = -EPROBE_DEFER;
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 05/41] OMAPFB: clean up default display search
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Separate the code for finding the default display into a function for
clarity and to make it easier to extend it in the future.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/omapfb/omapfb-main.c | 46 ++++++++++++++++++++------------
 1 file changed, 29 insertions(+), 17 deletions(-)

diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index fcb9e932d00c..b7469636f15c 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2417,6 +2417,34 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev,
 	return 0;
 }
 
+static struct omap_dss_device *
+omapfb_find_default_display(struct omapfb2_device *fbdev)
+{
+	const char *def_name;
+	int i;
+
+	/* search with the display name from the user or the board file */
+
+	def_name = omapdss_get_default_display_name();
+
+	if (def_name) {
+		for (i = 0; i < fbdev->num_displays; ++i) {
+			struct omap_dss_device *dssdev;
+
+			dssdev = fbdev->displays[i].dssdev;
+
+			if (dssdev->name && strcmp(def_name, dssdev->name) == 0)
+				return dssdev;
+		}
+
+		/* def_name given but not found */
+		return NULL;
+	}
+
+	/* return the first display we have in the list */
+	return fbdev->displays[0].dssdev;
+}
+
 static int omapfb_probe(struct platform_device *pdev)
 {
 	struct omapfb2_device *fbdev = NULL;
@@ -2494,23 +2522,7 @@ static int omapfb_probe(struct platform_device *pdev)
 	for (i = 0; i < fbdev->num_managers; i++)
 		fbdev->managers[i] = omap_dss_get_overlay_manager(i);
 
-	def_display = NULL;
-
-	for (i = 0; i < fbdev->num_displays; ++i) {
-		struct omap_dss_device *dssdev;
-		const char *def_name;
-
-		def_name = omapdss_get_default_display_name();
-
-		dssdev = fbdev->displays[i].dssdev;
-
-		if (def_name == NULL ||
-			(dssdev->name && strcmp(def_name, dssdev->name) == 0)) {
-			def_display = dssdev;
-			break;
-		}
-	}
-
+	def_display = omapfb_find_default_display(fbdev);
 	if (def_display == NULL) {
 		dev_err(fbdev->dev, "failed to find default display\n");
 		r = -EPROBE_DEFER;
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 06/41] OMAPFB: search for default display with DT alias
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Improve the search for the default display in two ways:
* compare the given display name to the display's alias
* if no display name is given, look for "display0" DT alias

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/omapfb/omapfb-main.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index b7469636f15c..f121e87b30be 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2423,7 +2423,10 @@ omapfb_find_default_display(struct omapfb2_device *fbdev)
 	const char *def_name;
 	int i;
 
-	/* search with the display name from the user or the board file */
+	/*
+	 * Search with the display name from the user or the board file,
+	 * comparing to display names and aliases
+	 */
 
 	def_name = omapdss_get_default_display_name();
 
@@ -2435,12 +2438,30 @@ omapfb_find_default_display(struct omapfb2_device *fbdev)
 
 			if (dssdev->name && strcmp(def_name, dssdev->name) == 0)
 				return dssdev;
+
+			if (strcmp(def_name, dssdev->alias) == 0)
+				return dssdev;
 		}
 
 		/* def_name given but not found */
 		return NULL;
 	}
 
+	/* then look for DT alias display0 */
+	for (i = 0; i < fbdev->num_displays; ++i) {
+		struct omap_dss_device *dssdev;
+		int id;
+
+		dssdev = fbdev->displays[i].dssdev;
+
+		if (dssdev->dev->of_node == NULL)
+			continue;
+
+		id = of_alias_get_id(dssdev->dev->of_node, "display");
+		if (id == 0)
+			return dssdev;
+	}
+
 	/* return the first display we have in the list */
 	return fbdev->displays[0].dssdev;
 }
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 06/41] OMAPFB: search for default display with DT alias
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Improve the search for the default display in two ways:
* compare the given display name to the display's alias
* if no display name is given, look for "display0" DT alias

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/omapfb/omapfb-main.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index b7469636f15c..f121e87b30be 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2423,7 +2423,10 @@ omapfb_find_default_display(struct omapfb2_device *fbdev)
 	const char *def_name;
 	int i;
 
-	/* search with the display name from the user or the board file */
+	/*
+	 * Search with the display name from the user or the board file,
+	 * comparing to display names and aliases
+	 */
 
 	def_name = omapdss_get_default_display_name();
 
@@ -2435,12 +2438,30 @@ omapfb_find_default_display(struct omapfb2_device *fbdev)
 
 			if (dssdev->name && strcmp(def_name, dssdev->name) = 0)
 				return dssdev;
+
+			if (strcmp(def_name, dssdev->alias) = 0)
+				return dssdev;
 		}
 
 		/* def_name given but not found */
 		return NULL;
 	}
 
+	/* then look for DT alias display0 */
+	for (i = 0; i < fbdev->num_displays; ++i) {
+		struct omap_dss_device *dssdev;
+		int id;
+
+		dssdev = fbdev->displays[i].dssdev;
+
+		if (dssdev->dev->of_node = NULL)
+			continue;
+
+		id = of_alias_get_id(dssdev->dev->of_node, "display");
+		if (id = 0)
+			return dssdev;
+	}
+
 	/* return the first display we have in the list */
 	return fbdev->displays[0].dssdev;
 }
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 06/41] OMAPFB: search for default display with DT alias
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Improve the search for the default display in two ways:
* compare the given display name to the display's alias
* if no display name is given, look for "display0" DT alias

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/omapfb/omapfb-main.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index b7469636f15c..f121e87b30be 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2423,7 +2423,10 @@ omapfb_find_default_display(struct omapfb2_device *fbdev)
 	const char *def_name;
 	int i;
 
-	/* search with the display name from the user or the board file */
+	/*
+	 * Search with the display name from the user or the board file,
+	 * comparing to display names and aliases
+	 */
 
 	def_name = omapdss_get_default_display_name();
 
@@ -2435,12 +2438,30 @@ omapfb_find_default_display(struct omapfb2_device *fbdev)
 
 			if (dssdev->name && strcmp(def_name, dssdev->name) == 0)
 				return dssdev;
+
+			if (strcmp(def_name, dssdev->alias) == 0)
+				return dssdev;
 		}
 
 		/* def_name given but not found */
 		return NULL;
 	}
 
+	/* then look for DT alias display0 */
+	for (i = 0; i < fbdev->num_displays; ++i) {
+		struct omap_dss_device *dssdev;
+		int id;
+
+		dssdev = fbdev->displays[i].dssdev;
+
+		if (dssdev->dev->of_node == NULL)
+			continue;
+
+		id = of_alias_get_id(dssdev->dev->of_node, "display");
+		if (id == 0)
+			return dssdev;
+	}
+
 	/* return the first display we have in the list */
 	return fbdev->displays[0].dssdev;
 }
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 07/41] OMAPDSS: add of helpers
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add helpers to get ports and endpoints from DT data.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/Makefile |   2 +-
 drivers/video/omap2/dss/dss-of.c | 159 +++++++++++++++++++++++++++++++++++++++
 include/video/omapdss.h          |  14 ++++
 3 files changed, 174 insertions(+), 1 deletion(-)
 create mode 100644 drivers/video/omap2/dss/dss-of.c

diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile
index d3aa91bdd6a8..8aec8bda27cc 100644
--- a/drivers/video/omap2/dss/Makefile
+++ b/drivers/video/omap2/dss/Makefile
@@ -1,7 +1,7 @@
 obj-$(CONFIG_OMAP2_DSS) += omapdss.o
 # Core DSS files
 omapdss-y := core.o dss.o dss_features.o dispc.o dispc_coefs.o display.o \
-	output.o
+	output.o dss-of.o
 # DSS compat layer files
 omapdss-y += manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o \
 	dispc-compat.o display-sysfs.o
diff --git a/drivers/video/omap2/dss/dss-of.c b/drivers/video/omap2/dss/dss-of.c
new file mode 100644
index 000000000000..7beb62fb367c
--- /dev/null
+++ b/drivers/video/omap2/dss/dss-of.c
@@ -0,0 +1,159 @@
+/*
+ * Copyright (C) 2013 Texas Instruments
+ * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
+
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/seq_file.h>
+
+#include <video/omapdss.h>
+
+struct device_node *
+omapdss_of_get_next_port(const struct device_node *parent,
+			 struct device_node *prev)
+{
+	struct device_node *port = NULL;
+
+	if (!parent)
+		return NULL;
+
+	if (!prev) {
+		struct device_node *ports;
+		/*
+		 * It's the first call, we have to find a port subnode
+		 * within this node or within an optional 'ports' node.
+		 */
+		ports = of_get_child_by_name(parent, "ports");
+		if (ports)
+			parent = ports;
+
+		port = of_get_child_by_name(parent, "port");
+
+		/* release the 'ports' node */
+		of_node_put(ports);
+	} else {
+		struct device_node *ports;
+
+		ports = of_get_parent(prev);
+		if (!ports)
+			return NULL;
+
+		do {
+			port = of_get_next_child(ports, prev);
+			if (!port) {
+				of_node_put(ports);
+				return NULL;
+			}
+			prev = port;
+		} while (of_node_cmp(port->name, "port") != 0);
+	}
+
+	return port;
+}
+EXPORT_SYMBOL_GPL(omapdss_of_get_next_port);
+
+struct device_node *
+omapdss_of_get_next_endpoint(const struct device_node *parent,
+			     struct device_node *prev)
+{
+	struct device_node *ep = NULL;
+
+	if (!parent)
+		return NULL;
+
+	do {
+		ep = of_get_next_child(parent, prev);
+		if (!ep)
+			return NULL;
+		prev = ep;
+	} while (of_node_cmp(ep->name, "endpoint") != 0);
+
+	return ep;
+}
+EXPORT_SYMBOL_GPL(omapdss_of_get_next_endpoint);
+
+static struct device_node *
+omapdss_of_get_remote_device_node(const struct device_node *node)
+{
+	struct device_node *np;
+	int i;
+
+	np = of_parse_phandle(node, "remote-endpoint", 0);
+
+	if (!np)
+		return NULL;
+
+	np = of_get_next_parent(np);
+
+	for (i = 0; i < 3 && np; ++i) {
+		struct property *prop;
+
+		prop = of_find_property(np, "compatible", NULL);
+
+		if (prop)
+			return np;
+
+		np = of_get_next_parent(np);
+	}
+
+	return NULL;
+}
+
+struct device_node *
+omapdss_of_get_first_endpoint(const struct device_node *parent)
+{
+	struct device_node *port;
+	struct device_node *ep;
+
+	port = omapdss_of_get_next_port(parent, NULL);
+	if (port) {
+		ep = omapdss_of_get_next_endpoint(port, NULL);
+		of_node_put(port);
+	} else {
+		ep = omapdss_of_get_next_endpoint(parent, NULL);
+	}
+
+	return ep;
+}
+EXPORT_SYMBOL_GPL(omapdss_of_get_first_endpoint);
+
+struct omap_dss_device *
+omapdss_of_find_source_for_first_ep(struct device_node *node)
+{
+	struct device_node *ep;
+	struct device_node *src_node;
+	struct omap_dss_device *src;
+
+	ep = omapdss_of_get_first_endpoint(node);
+	if (!ep)
+		return ERR_PTR(-EINVAL);
+
+	src_node = omapdss_of_get_remote_device_node(ep);
+
+	of_node_put(ep);
+
+	if (!src_node)
+		return ERR_PTR(-EINVAL);
+
+	src = omap_dss_find_output_by_node(src_node);
+
+	of_node_put(src_node);
+
+	if (!src)
+		return ERR_PTR(-EPROBE_DEFER);
+
+	return src;
+}
+EXPORT_SYMBOL_GPL(omapdss_of_find_source_for_first_ep);
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 3d7c51a6f9ff..e3cd2a921c2f 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -1019,4 +1019,18 @@ static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev)
 	return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE;
 }
 
+struct device_node *
+omapdss_of_get_next_port(const struct device_node *parent,
+			 struct device_node *prev);
+
+struct device_node *
+omapdss_of_get_next_endpoint(const struct device_node *parent,
+			     struct device_node *prev);
+
+struct device_node *
+omapdss_of_get_first_endpoint(const struct device_node *parent);
+
+struct omap_dss_device *
+omapdss_of_find_source_for_first_ep(struct device_node *node);
+
 #endif
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 07/41] OMAPDSS: add of helpers
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add helpers to get ports and endpoints from DT data.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/Makefile |   2 +-
 drivers/video/omap2/dss/dss-of.c | 159 +++++++++++++++++++++++++++++++++++++++
 include/video/omapdss.h          |  14 ++++
 3 files changed, 174 insertions(+), 1 deletion(-)
 create mode 100644 drivers/video/omap2/dss/dss-of.c

diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile
index d3aa91bdd6a8..8aec8bda27cc 100644
--- a/drivers/video/omap2/dss/Makefile
+++ b/drivers/video/omap2/dss/Makefile
@@ -1,7 +1,7 @@
 obj-$(CONFIG_OMAP2_DSS) += omapdss.o
 # Core DSS files
 omapdss-y := core.o dss.o dss_features.o dispc.o dispc_coefs.o display.o \
-	output.o
+	output.o dss-of.o
 # DSS compat layer files
 omapdss-y += manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o \
 	dispc-compat.o display-sysfs.o
diff --git a/drivers/video/omap2/dss/dss-of.c b/drivers/video/omap2/dss/dss-of.c
new file mode 100644
index 000000000000..7beb62fb367c
--- /dev/null
+++ b/drivers/video/omap2/dss/dss-of.c
@@ -0,0 +1,159 @@
+/*
+ * Copyright (C) 2013 Texas Instruments
+ * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
+
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/seq_file.h>
+
+#include <video/omapdss.h>
+
+struct device_node *
+omapdss_of_get_next_port(const struct device_node *parent,
+			 struct device_node *prev)
+{
+	struct device_node *port = NULL;
+
+	if (!parent)
+		return NULL;
+
+	if (!prev) {
+		struct device_node *ports;
+		/*
+		 * It's the first call, we have to find a port subnode
+		 * within this node or within an optional 'ports' node.
+		 */
+		ports = of_get_child_by_name(parent, "ports");
+		if (ports)
+			parent = ports;
+
+		port = of_get_child_by_name(parent, "port");
+
+		/* release the 'ports' node */
+		of_node_put(ports);
+	} else {
+		struct device_node *ports;
+
+		ports = of_get_parent(prev);
+		if (!ports)
+			return NULL;
+
+		do {
+			port = of_get_next_child(ports, prev);
+			if (!port) {
+				of_node_put(ports);
+				return NULL;
+			}
+			prev = port;
+		} while (of_node_cmp(port->name, "port") != 0);
+	}
+
+	return port;
+}
+EXPORT_SYMBOL_GPL(omapdss_of_get_next_port);
+
+struct device_node *
+omapdss_of_get_next_endpoint(const struct device_node *parent,
+			     struct device_node *prev)
+{
+	struct device_node *ep = NULL;
+
+	if (!parent)
+		return NULL;
+
+	do {
+		ep = of_get_next_child(parent, prev);
+		if (!ep)
+			return NULL;
+		prev = ep;
+	} while (of_node_cmp(ep->name, "endpoint") != 0);
+
+	return ep;
+}
+EXPORT_SYMBOL_GPL(omapdss_of_get_next_endpoint);
+
+static struct device_node *
+omapdss_of_get_remote_device_node(const struct device_node *node)
+{
+	struct device_node *np;
+	int i;
+
+	np = of_parse_phandle(node, "remote-endpoint", 0);
+
+	if (!np)
+		return NULL;
+
+	np = of_get_next_parent(np);
+
+	for (i = 0; i < 3 && np; ++i) {
+		struct property *prop;
+
+		prop = of_find_property(np, "compatible", NULL);
+
+		if (prop)
+			return np;
+
+		np = of_get_next_parent(np);
+	}
+
+	return NULL;
+}
+
+struct device_node *
+omapdss_of_get_first_endpoint(const struct device_node *parent)
+{
+	struct device_node *port;
+	struct device_node *ep;
+
+	port = omapdss_of_get_next_port(parent, NULL);
+	if (port) {
+		ep = omapdss_of_get_next_endpoint(port, NULL);
+		of_node_put(port);
+	} else {
+		ep = omapdss_of_get_next_endpoint(parent, NULL);
+	}
+
+	return ep;
+}
+EXPORT_SYMBOL_GPL(omapdss_of_get_first_endpoint);
+
+struct omap_dss_device *
+omapdss_of_find_source_for_first_ep(struct device_node *node)
+{
+	struct device_node *ep;
+	struct device_node *src_node;
+	struct omap_dss_device *src;
+
+	ep = omapdss_of_get_first_endpoint(node);
+	if (!ep)
+		return ERR_PTR(-EINVAL);
+
+	src_node = omapdss_of_get_remote_device_node(ep);
+
+	of_node_put(ep);
+
+	if (!src_node)
+		return ERR_PTR(-EINVAL);
+
+	src = omap_dss_find_output_by_node(src_node);
+
+	of_node_put(src_node);
+
+	if (!src)
+		return ERR_PTR(-EPROBE_DEFER);
+
+	return src;
+}
+EXPORT_SYMBOL_GPL(omapdss_of_find_source_for_first_ep);
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 3d7c51a6f9ff..e3cd2a921c2f 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -1019,4 +1019,18 @@ static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev)
 	return dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
 }
 
+struct device_node *
+omapdss_of_get_next_port(const struct device_node *parent,
+			 struct device_node *prev);
+
+struct device_node *
+omapdss_of_get_next_endpoint(const struct device_node *parent,
+			     struct device_node *prev);
+
+struct device_node *
+omapdss_of_get_first_endpoint(const struct device_node *parent);
+
+struct omap_dss_device *
+omapdss_of_find_source_for_first_ep(struct device_node *node);
+
 #endif
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 07/41] OMAPDSS: add of helpers
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add helpers to get ports and endpoints from DT data.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/Makefile |   2 +-
 drivers/video/omap2/dss/dss-of.c | 159 +++++++++++++++++++++++++++++++++++++++
 include/video/omapdss.h          |  14 ++++
 3 files changed, 174 insertions(+), 1 deletion(-)
 create mode 100644 drivers/video/omap2/dss/dss-of.c

diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile
index d3aa91bdd6a8..8aec8bda27cc 100644
--- a/drivers/video/omap2/dss/Makefile
+++ b/drivers/video/omap2/dss/Makefile
@@ -1,7 +1,7 @@
 obj-$(CONFIG_OMAP2_DSS) += omapdss.o
 # Core DSS files
 omapdss-y := core.o dss.o dss_features.o dispc.o dispc_coefs.o display.o \
-	output.o
+	output.o dss-of.o
 # DSS compat layer files
 omapdss-y += manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o \
 	dispc-compat.o display-sysfs.o
diff --git a/drivers/video/omap2/dss/dss-of.c b/drivers/video/omap2/dss/dss-of.c
new file mode 100644
index 000000000000..7beb62fb367c
--- /dev/null
+++ b/drivers/video/omap2/dss/dss-of.c
@@ -0,0 +1,159 @@
+/*
+ * Copyright (C) 2013 Texas Instruments
+ * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
+
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/seq_file.h>
+
+#include <video/omapdss.h>
+
+struct device_node *
+omapdss_of_get_next_port(const struct device_node *parent,
+			 struct device_node *prev)
+{
+	struct device_node *port = NULL;
+
+	if (!parent)
+		return NULL;
+
+	if (!prev) {
+		struct device_node *ports;
+		/*
+		 * It's the first call, we have to find a port subnode
+		 * within this node or within an optional 'ports' node.
+		 */
+		ports = of_get_child_by_name(parent, "ports");
+		if (ports)
+			parent = ports;
+
+		port = of_get_child_by_name(parent, "port");
+
+		/* release the 'ports' node */
+		of_node_put(ports);
+	} else {
+		struct device_node *ports;
+
+		ports = of_get_parent(prev);
+		if (!ports)
+			return NULL;
+
+		do {
+			port = of_get_next_child(ports, prev);
+			if (!port) {
+				of_node_put(ports);
+				return NULL;
+			}
+			prev = port;
+		} while (of_node_cmp(port->name, "port") != 0);
+	}
+
+	return port;
+}
+EXPORT_SYMBOL_GPL(omapdss_of_get_next_port);
+
+struct device_node *
+omapdss_of_get_next_endpoint(const struct device_node *parent,
+			     struct device_node *prev)
+{
+	struct device_node *ep = NULL;
+
+	if (!parent)
+		return NULL;
+
+	do {
+		ep = of_get_next_child(parent, prev);
+		if (!ep)
+			return NULL;
+		prev = ep;
+	} while (of_node_cmp(ep->name, "endpoint") != 0);
+
+	return ep;
+}
+EXPORT_SYMBOL_GPL(omapdss_of_get_next_endpoint);
+
+static struct device_node *
+omapdss_of_get_remote_device_node(const struct device_node *node)
+{
+	struct device_node *np;
+	int i;
+
+	np = of_parse_phandle(node, "remote-endpoint", 0);
+
+	if (!np)
+		return NULL;
+
+	np = of_get_next_parent(np);
+
+	for (i = 0; i < 3 && np; ++i) {
+		struct property *prop;
+
+		prop = of_find_property(np, "compatible", NULL);
+
+		if (prop)
+			return np;
+
+		np = of_get_next_parent(np);
+	}
+
+	return NULL;
+}
+
+struct device_node *
+omapdss_of_get_first_endpoint(const struct device_node *parent)
+{
+	struct device_node *port;
+	struct device_node *ep;
+
+	port = omapdss_of_get_next_port(parent, NULL);
+	if (port) {
+		ep = omapdss_of_get_next_endpoint(port, NULL);
+		of_node_put(port);
+	} else {
+		ep = omapdss_of_get_next_endpoint(parent, NULL);
+	}
+
+	return ep;
+}
+EXPORT_SYMBOL_GPL(omapdss_of_get_first_endpoint);
+
+struct omap_dss_device *
+omapdss_of_find_source_for_first_ep(struct device_node *node)
+{
+	struct device_node *ep;
+	struct device_node *src_node;
+	struct omap_dss_device *src;
+
+	ep = omapdss_of_get_first_endpoint(node);
+	if (!ep)
+		return ERR_PTR(-EINVAL);
+
+	src_node = omapdss_of_get_remote_device_node(ep);
+
+	of_node_put(ep);
+
+	if (!src_node)
+		return ERR_PTR(-EINVAL);
+
+	src = omap_dss_find_output_by_node(src_node);
+
+	of_node_put(src_node);
+
+	if (!src)
+		return ERR_PTR(-EPROBE_DEFER);
+
+	return src;
+}
+EXPORT_SYMBOL_GPL(omapdss_of_find_source_for_first_ep);
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 3d7c51a6f9ff..e3cd2a921c2f 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -1019,4 +1019,18 @@ static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev)
 	return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE;
 }
 
+struct device_node *
+omapdss_of_get_next_port(const struct device_node *parent,
+			 struct device_node *prev);
+
+struct device_node *
+omapdss_of_get_next_endpoint(const struct device_node *parent,
+			     struct device_node *prev);
+
+struct device_node *
+omapdss_of_get_first_endpoint(const struct device_node *parent);
+
+struct omap_dss_device *
+omapdss_of_find_source_for_first_ep(struct device_node *node);
+
 #endif
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 08/41] OMAPDSS: Improve regulator names for DT
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

The regulator names used for DSS components are somewhat ugly for DT
use. As we're just adding DT support, it's simple to change the
regulator names.

This patch makes the DSS driver get the regulators with somewhat cleaner
names. For example, this allows us to define HDMI's VDDA regulator in
the DT data as:

vdda-supply = <...>;

instead of

vdda_hdmi_dac-supply = <...>;

The code also still tries to get the regulators with the old names, if
the regulator_get with the new names fail. This keep backward
compatibility, and can be removed after we have moved to DT.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c   | 5 ++++-
 drivers/video/omap2/dss/hdmi4.c | 5 ++++-
 drivers/video/omap2/dss/venc.c  | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index a820c37e323e..b7c92705fb54 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1151,7 +1151,10 @@ static int dsi_regulator_init(struct platform_device *dsidev)
 	if (dsi->vdds_dsi_reg != NULL)
 		return 0;
 
-	vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi");
+	vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdd");
+
+	if (IS_ERR(vdds_dsi))
+		vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi");
 
 	/* DT HACK: try VCXIO to make omapdss work for o4 sdp/panda */
 	if (IS_ERR(vdds_dsi))
diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c
index 4a74538f9ea5..11e7500197c1 100644
--- a/drivers/video/omap2/dss/hdmi4.c
+++ b/drivers/video/omap2/dss/hdmi4.c
@@ -88,7 +88,10 @@ static int hdmi_init_regulator(void)
 	if (hdmi.vdda_hdmi_dac_reg != NULL)
 		return 0;
 
-	reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac");
+	reg = devm_regulator_get(&hdmi.pdev->dev, "vdda");
+
+	if (IS_ERR(reg)
+		reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac");
 
 	/* DT HACK: try VDAC to make omapdss work for o4 sdp/panda */
 	if (IS_ERR(reg))
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 2cd7f7e42105..c0e4def29795 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -636,7 +636,10 @@ static int venc_init_regulator(void)
 	if (venc.vdda_dac_reg != NULL)
 		return 0;
 
-	vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda_dac");
+	vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda");
+
+	if (IS_ERR(vdda_dac))
+		vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda_dac");
 
 	if (IS_ERR(vdda_dac)) {
 		if (PTR_ERR(vdda_dac) != -EPROBE_DEFER)
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 08/41] OMAPDSS: Improve regulator names for DT
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

The regulator names used for DSS components are somewhat ugly for DT
use. As we're just adding DT support, it's simple to change the
regulator names.

This patch makes the DSS driver get the regulators with somewhat cleaner
names. For example, this allows us to define HDMI's VDDA regulator in
the DT data as:

vdda-supply = <...>;

instead of

vdda_hdmi_dac-supply = <...>;

The code also still tries to get the regulators with the old names, if
the regulator_get with the new names fail. This keep backward
compatibility, and can be removed after we have moved to DT.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c   | 5 ++++-
 drivers/video/omap2/dss/hdmi4.c | 5 ++++-
 drivers/video/omap2/dss/venc.c  | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index a820c37e323e..b7c92705fb54 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1151,7 +1151,10 @@ static int dsi_regulator_init(struct platform_device *dsidev)
 	if (dsi->vdds_dsi_reg != NULL)
 		return 0;
 
-	vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi");
+	vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdd");
+
+	if (IS_ERR(vdds_dsi))
+		vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi");
 
 	/* DT HACK: try VCXIO to make omapdss work for o4 sdp/panda */
 	if (IS_ERR(vdds_dsi))
diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c
index 4a74538f9ea5..11e7500197c1 100644
--- a/drivers/video/omap2/dss/hdmi4.c
+++ b/drivers/video/omap2/dss/hdmi4.c
@@ -88,7 +88,10 @@ static int hdmi_init_regulator(void)
 	if (hdmi.vdda_hdmi_dac_reg != NULL)
 		return 0;
 
-	reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac");
+	reg = devm_regulator_get(&hdmi.pdev->dev, "vdda");
+
+	if (IS_ERR(reg)
+		reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac");
 
 	/* DT HACK: try VDAC to make omapdss work for o4 sdp/panda */
 	if (IS_ERR(reg))
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 2cd7f7e42105..c0e4def29795 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -636,7 +636,10 @@ static int venc_init_regulator(void)
 	if (venc.vdda_dac_reg != NULL)
 		return 0;
 
-	vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda_dac");
+	vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda");
+
+	if (IS_ERR(vdda_dac))
+		vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda_dac");
 
 	if (IS_ERR(vdda_dac)) {
 		if (PTR_ERR(vdda_dac) != -EPROBE_DEFER)
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 08/41] OMAPDSS: Improve regulator names for DT
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

The regulator names used for DSS components are somewhat ugly for DT
use. As we're just adding DT support, it's simple to change the
regulator names.

This patch makes the DSS driver get the regulators with somewhat cleaner
names. For example, this allows us to define HDMI's VDDA regulator in
the DT data as:

vdda-supply = <...>;

instead of

vdda_hdmi_dac-supply = <...>;

The code also still tries to get the regulators with the old names, if
the regulator_get with the new names fail. This keep backward
compatibility, and can be removed after we have moved to DT.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c   | 5 ++++-
 drivers/video/omap2/dss/hdmi4.c | 5 ++++-
 drivers/video/omap2/dss/venc.c  | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index a820c37e323e..b7c92705fb54 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1151,7 +1151,10 @@ static int dsi_regulator_init(struct platform_device *dsidev)
 	if (dsi->vdds_dsi_reg != NULL)
 		return 0;
 
-	vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi");
+	vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdd");
+
+	if (IS_ERR(vdds_dsi))
+		vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi");
 
 	/* DT HACK: try VCXIO to make omapdss work for o4 sdp/panda */
 	if (IS_ERR(vdds_dsi))
diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c
index 4a74538f9ea5..11e7500197c1 100644
--- a/drivers/video/omap2/dss/hdmi4.c
+++ b/drivers/video/omap2/dss/hdmi4.c
@@ -88,7 +88,10 @@ static int hdmi_init_regulator(void)
 	if (hdmi.vdda_hdmi_dac_reg != NULL)
 		return 0;
 
-	reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac");
+	reg = devm_regulator_get(&hdmi.pdev->dev, "vdda");
+
+	if (IS_ERR(reg)
+		reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac");
 
 	/* DT HACK: try VDAC to make omapdss work for o4 sdp/panda */
 	if (IS_ERR(reg))
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 2cd7f7e42105..c0e4def29795 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -636,7 +636,10 @@ static int venc_init_regulator(void)
 	if (venc.vdda_dac_reg != NULL)
 		return 0;
 
-	vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda_dac");
+	vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda");
+
+	if (IS_ERR(vdda_dac))
+		vdda_dac = devm_regulator_get(&venc.pdev->dev, "vdda_dac");
 
 	if (IS_ERR(vdda_dac)) {
 		if (PTR_ERR(vdda_dac) != -EPROBE_DEFER)
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 09/41] OMAPDSS: Add DT support to DSS
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56     ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT support for DSS. Contrary to the non-DT version, the DSS in DT
mode contains DPI and SDI outputs, which better reflects the hardware.
The non-DT code will be removed after all boards have been converted to
DT, so there's no need to change the non-DT code to act the same way.

The code for DPI and SDI needs to be refined later to make it possible
to add multiple DPI ports. For now, handling just a single DPI port is
enough for all the boards.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
---
 drivers/video/omap2/dss/dpi.c | 47 +++++++++++++++++++++++++++++++
 drivers/video/omap2/dss/dss.c | 64 +++++++++++++++++++++++++++++++++++++++++++
 drivers/video/omap2/dss/dss.h |  6 ++++
 drivers/video/omap2/dss/sdi.c | 45 ++++++++++++++++++++++++++++++
 4 files changed, 162 insertions(+)

diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index fcba3c129efb..8b8f670a0d7d 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -30,6 +30,7 @@
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 #include <linux/string.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 
@@ -49,6 +50,8 @@ static struct {
 	int data_lines;
 
 	struct omap_dss_device output;
+
+	bool port_initialized;
 } dpi;
 
 static struct platform_device *dpi_get_dsidev(enum omap_channel channel)
@@ -727,3 +730,47 @@ void __exit dpi_uninit_platform_driver(void)
 {
 	platform_driver_unregister(&omap_dpi_driver);
 }
+
+int __init dpi_init_port(struct platform_device *pdev, struct device_node *port)
+{
+	struct device_node *ep;
+	u32 datalines;
+	int r;
+
+	ep = omapdss_of_get_next_endpoint(port, NULL);
+	if (!ep)
+		return 0;
+
+	r = of_property_read_u32(ep, "data-lines", &datalines);
+	if (r) {
+		DSSERR("failed to parse datalines\n");
+		goto err_datalines;
+	}
+
+	dpi.data_lines = datalines;
+
+	of_node_put(ep);
+
+	dpi.pdev = pdev;
+
+	mutex_init(&dpi.lock);
+
+	dpi_init_output(pdev);
+
+	dpi.port_initialized = true;
+
+	return 0;
+
+err_datalines:
+	of_node_put(ep);
+
+	return r;
+}
+
+void __exit dpi_uninit_port(void)
+{
+	if (!dpi.port_initialized)
+		return;
+
+	dpi_uninit_output(dpi.pdev);
+}
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index bd01608e67e2..8316a0b56154 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -23,6 +23,7 @@
 #define DSS_SUBSYS_NAME "DSS"
 
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/io.h>
 #include <linux/export.h>
 #include <linux/err.h>
@@ -33,6 +34,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/gfp.h>
 #include <linux/sizes.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 
@@ -841,6 +843,54 @@ static int __init dss_init_features(struct platform_device *pdev)
 	return 0;
 }
 
+static int dss_init_ports(struct platform_device *pdev)
+{
+	struct device_node *parent = pdev->dev.of_node;
+	struct device_node *port;
+	int r;
+
+	port = omapdss_of_get_next_port(parent, NULL);
+	if (!port) {
+
+#ifdef CONFIG_OMAP2_DSS_DPI
+		dpi_init_port(pdev, parent);
+#endif
+		return 0;
+	}
+
+	do {
+		u32 reg;
+
+		r = of_property_read_u32(port, "reg", &reg);
+		if (r)
+			reg = 0;
+
+#ifdef CONFIG_OMAP2_DSS_DPI
+		if (reg == 0)
+			dpi_init_port(pdev, port);
+#endif
+
+#ifdef CONFIG_OMAP2_DSS_SDI
+		if (reg == 1)
+			sdi_init_port(pdev, port);
+#endif
+
+	} while ((port = omapdss_of_get_next_port(parent, port)) != NULL);
+
+	return 0;
+}
+
+static void dss_uninit_ports(void)
+{
+#ifdef CONFIG_OMAP2_DSS_DPI
+	dpi_uninit_port();
+#endif
+
+#ifdef CONFIG_OMAP2_DSS_SDI
+	sdi_uninit_port();
+#endif
+}
+
 /* DSS HW IP initialisation */
 static int __init omap_dsshw_probe(struct platform_device *pdev)
 {
@@ -899,6 +949,8 @@ static int __init omap_dsshw_probe(struct platform_device *pdev)
 	dss.lcd_clk_source[0] = OMAP_DSS_CLK_SRC_FCK;
 	dss.lcd_clk_source[1] = OMAP_DSS_CLK_SRC_FCK;
 
+	dss_init_ports(pdev);
+
 	rev = dss_read_reg(DSS_REVISION);
 	printk(KERN_INFO "OMAP DSS rev %d.%d\n",
 			FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0));
@@ -918,6 +970,8 @@ err_setup_clocks:
 
 static int __exit omap_dsshw_remove(struct platform_device *pdev)
 {
+	dss_uninit_ports();
+
 	pm_runtime_disable(&pdev->dev);
 
 	dss_put_clocks();
@@ -955,12 +1009,22 @@ static const struct dev_pm_ops dss_pm_ops = {
 	.runtime_resume = dss_runtime_resume,
 };
 
+static const struct of_device_id dss_of_match[] = {
+	{ .compatible = "ti,omap2-dss", },
+	{ .compatible = "ti,omap3-dss", },
+	{ .compatible = "ti,omap4-dss", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, dss_of_match);
+
 static struct platform_driver omap_dsshw_driver = {
 	.remove         = __exit_p(omap_dsshw_remove),
 	.driver         = {
 		.name   = "omapdss_dss",
 		.owner  = THIS_MODULE,
 		.pm	= &dss_pm_ops,
+		.of_match_table = dss_of_match,
 	},
 };
 
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index f538e867c0f8..81c6bc8befea 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -261,6 +261,9 @@ bool dss_div_calc(unsigned long fck_min, dss_div_calc_func func, void *data);
 int sdi_init_platform_driver(void) __init;
 void sdi_uninit_platform_driver(void) __exit;
 
+int sdi_init_port(struct platform_device *pdev, struct device_node *port) __init;
+void sdi_uninit_port(void) __exit;
+
 /* DSI */
 
 typedef bool (*dsi_pll_calc_func)(int regn, int regm, unsigned long fint,
@@ -372,6 +375,9 @@ static inline bool dsi_pll_calc(struct platform_device *dsidev,
 int dpi_init_platform_driver(void) __init;
 void dpi_uninit_platform_driver(void) __exit;
 
+int dpi_init_port(struct platform_device *pdev, struct device_node *port) __init;
+void dpi_uninit_port(void) __exit;
+
 /* DISPC */
 int dispc_init_platform_driver(void) __init;
 void dispc_uninit_platform_driver(void) __exit;
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 156d146a72a6..e4404ddefe5b 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -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"
@@ -41,6 +42,8 @@ static struct {
 	int datapairs;
 
 	struct omap_dss_device output;
+
+	bool port_initialized;
 } sdi;
 
 struct sdi_clk_calc_ctx {
@@ -388,3 +391,45 @@ void __exit sdi_uninit_platform_driver(void)
 {
 	platform_driver_unregister(&omap_sdi_driver);
 }
+
+int __init sdi_init_port(struct platform_device *pdev, struct device_node *port)
+{
+	struct device_node *ep;
+	u32 datapairs;
+	int r;
+
+	ep = omapdss_of_get_next_endpoint(port, NULL);
+	if (!ep)
+		return 0;
+
+	r = of_property_read_u32(ep, "datapairs", &datapairs);
+	if (r) {
+		DSSERR("failed to parse datapairs\n");
+		goto err_datapairs;
+	}
+
+	sdi.datapairs = datapairs;
+
+	of_node_put(ep);
+
+	sdi.pdev = pdev;
+
+	sdi_init_output(pdev);
+
+	sdi.port_initialized = true;
+
+	return 0;
+
+err_datapairs:
+	of_node_put(ep);
+
+	return r;
+}
+
+void __exit sdi_uninit_port(void)
+{
+	if (!sdi.port_initialized)
+		return;
+
+	sdi_uninit_output(sdi.pdev);
+}
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 09/41] OMAPDSS: Add DT support to DSS
@ 2014-01-21 10:56     ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for DSS. Contrary to the non-DT version, the DSS in DT
mode contains DPI and SDI outputs, which better reflects the hardware.
The non-DT code will be removed after all boards have been converted to
DT, so there's no need to change the non-DT code to act the same way.

The code for DPI and SDI needs to be refined later to make it possible
to add multiple DPI ports. For now, handling just a single DPI port is
enough for all the boards.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dpi.c | 47 +++++++++++++++++++++++++++++++
 drivers/video/omap2/dss/dss.c | 64 +++++++++++++++++++++++++++++++++++++++++++
 drivers/video/omap2/dss/dss.h |  6 ++++
 drivers/video/omap2/dss/sdi.c | 45 ++++++++++++++++++++++++++++++
 4 files changed, 162 insertions(+)

diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index fcba3c129efb..8b8f670a0d7d 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -30,6 +30,7 @@
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 #include <linux/string.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 
@@ -49,6 +50,8 @@ static struct {
 	int data_lines;
 
 	struct omap_dss_device output;
+
+	bool port_initialized;
 } dpi;
 
 static struct platform_device *dpi_get_dsidev(enum omap_channel channel)
@@ -727,3 +730,47 @@ void __exit dpi_uninit_platform_driver(void)
 {
 	platform_driver_unregister(&omap_dpi_driver);
 }
+
+int __init dpi_init_port(struct platform_device *pdev, struct device_node *port)
+{
+	struct device_node *ep;
+	u32 datalines;
+	int r;
+
+	ep = omapdss_of_get_next_endpoint(port, NULL);
+	if (!ep)
+		return 0;
+
+	r = of_property_read_u32(ep, "data-lines", &datalines);
+	if (r) {
+		DSSERR("failed to parse datalines\n");
+		goto err_datalines;
+	}
+
+	dpi.data_lines = datalines;
+
+	of_node_put(ep);
+
+	dpi.pdev = pdev;
+
+	mutex_init(&dpi.lock);
+
+	dpi_init_output(pdev);
+
+	dpi.port_initialized = true;
+
+	return 0;
+
+err_datalines:
+	of_node_put(ep);
+
+	return r;
+}
+
+void __exit dpi_uninit_port(void)
+{
+	if (!dpi.port_initialized)
+		return;
+
+	dpi_uninit_output(dpi.pdev);
+}
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index bd01608e67e2..8316a0b56154 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -23,6 +23,7 @@
 #define DSS_SUBSYS_NAME "DSS"
 
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/io.h>
 #include <linux/export.h>
 #include <linux/err.h>
@@ -33,6 +34,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/gfp.h>
 #include <linux/sizes.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 
@@ -841,6 +843,54 @@ static int __init dss_init_features(struct platform_device *pdev)
 	return 0;
 }
 
+static int dss_init_ports(struct platform_device *pdev)
+{
+	struct device_node *parent = pdev->dev.of_node;
+	struct device_node *port;
+	int r;
+
+	port = omapdss_of_get_next_port(parent, NULL);
+	if (!port) {
+
+#ifdef CONFIG_OMAP2_DSS_DPI
+		dpi_init_port(pdev, parent);
+#endif
+		return 0;
+	}
+
+	do {
+		u32 reg;
+
+		r = of_property_read_u32(port, "reg", &reg);
+		if (r)
+			reg = 0;
+
+#ifdef CONFIG_OMAP2_DSS_DPI
+		if (reg = 0)
+			dpi_init_port(pdev, port);
+#endif
+
+#ifdef CONFIG_OMAP2_DSS_SDI
+		if (reg = 1)
+			sdi_init_port(pdev, port);
+#endif
+
+	} while ((port = omapdss_of_get_next_port(parent, port)) != NULL);
+
+	return 0;
+}
+
+static void dss_uninit_ports(void)
+{
+#ifdef CONFIG_OMAP2_DSS_DPI
+	dpi_uninit_port();
+#endif
+
+#ifdef CONFIG_OMAP2_DSS_SDI
+	sdi_uninit_port();
+#endif
+}
+
 /* DSS HW IP initialisation */
 static int __init omap_dsshw_probe(struct platform_device *pdev)
 {
@@ -899,6 +949,8 @@ static int __init omap_dsshw_probe(struct platform_device *pdev)
 	dss.lcd_clk_source[0] = OMAP_DSS_CLK_SRC_FCK;
 	dss.lcd_clk_source[1] = OMAP_DSS_CLK_SRC_FCK;
 
+	dss_init_ports(pdev);
+
 	rev = dss_read_reg(DSS_REVISION);
 	printk(KERN_INFO "OMAP DSS rev %d.%d\n",
 			FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0));
@@ -918,6 +970,8 @@ err_setup_clocks:
 
 static int __exit omap_dsshw_remove(struct platform_device *pdev)
 {
+	dss_uninit_ports();
+
 	pm_runtime_disable(&pdev->dev);
 
 	dss_put_clocks();
@@ -955,12 +1009,22 @@ static const struct dev_pm_ops dss_pm_ops = {
 	.runtime_resume = dss_runtime_resume,
 };
 
+static const struct of_device_id dss_of_match[] = {
+	{ .compatible = "ti,omap2-dss", },
+	{ .compatible = "ti,omap3-dss", },
+	{ .compatible = "ti,omap4-dss", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, dss_of_match);
+
 static struct platform_driver omap_dsshw_driver = {
 	.remove         = __exit_p(omap_dsshw_remove),
 	.driver         = {
 		.name   = "omapdss_dss",
 		.owner  = THIS_MODULE,
 		.pm	= &dss_pm_ops,
+		.of_match_table = dss_of_match,
 	},
 };
 
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index f538e867c0f8..81c6bc8befea 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -261,6 +261,9 @@ bool dss_div_calc(unsigned long fck_min, dss_div_calc_func func, void *data);
 int sdi_init_platform_driver(void) __init;
 void sdi_uninit_platform_driver(void) __exit;
 
+int sdi_init_port(struct platform_device *pdev, struct device_node *port) __init;
+void sdi_uninit_port(void) __exit;
+
 /* DSI */
 
 typedef bool (*dsi_pll_calc_func)(int regn, int regm, unsigned long fint,
@@ -372,6 +375,9 @@ static inline bool dsi_pll_calc(struct platform_device *dsidev,
 int dpi_init_platform_driver(void) __init;
 void dpi_uninit_platform_driver(void) __exit;
 
+int dpi_init_port(struct platform_device *pdev, struct device_node *port) __init;
+void dpi_uninit_port(void) __exit;
+
 /* DISPC */
 int dispc_init_platform_driver(void) __init;
 void dispc_uninit_platform_driver(void) __exit;
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 156d146a72a6..e4404ddefe5b 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -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"
@@ -41,6 +42,8 @@ static struct {
 	int datapairs;
 
 	struct omap_dss_device output;
+
+	bool port_initialized;
 } sdi;
 
 struct sdi_clk_calc_ctx {
@@ -388,3 +391,45 @@ void __exit sdi_uninit_platform_driver(void)
 {
 	platform_driver_unregister(&omap_sdi_driver);
 }
+
+int __init sdi_init_port(struct platform_device *pdev, struct device_node *port)
+{
+	struct device_node *ep;
+	u32 datapairs;
+	int r;
+
+	ep = omapdss_of_get_next_endpoint(port, NULL);
+	if (!ep)
+		return 0;
+
+	r = of_property_read_u32(ep, "datapairs", &datapairs);
+	if (r) {
+		DSSERR("failed to parse datapairs\n");
+		goto err_datapairs;
+	}
+
+	sdi.datapairs = datapairs;
+
+	of_node_put(ep);
+
+	sdi.pdev = pdev;
+
+	sdi_init_output(pdev);
+
+	sdi.port_initialized = true;
+
+	return 0;
+
+err_datapairs:
+	of_node_put(ep);
+
+	return r;
+}
+
+void __exit sdi_uninit_port(void)
+{
+	if (!sdi.port_initialized)
+		return;
+
+	sdi_uninit_output(sdi.pdev);
+}
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 09/41] OMAPDSS: Add DT support to DSS
@ 2014-01-21 10:56     ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for DSS. Contrary to the non-DT version, the DSS in DT
mode contains DPI and SDI outputs, which better reflects the hardware.
The non-DT code will be removed after all boards have been converted to
DT, so there's no need to change the non-DT code to act the same way.

The code for DPI and SDI needs to be refined later to make it possible
to add multiple DPI ports. For now, handling just a single DPI port is
enough for all the boards.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dpi.c | 47 +++++++++++++++++++++++++++++++
 drivers/video/omap2/dss/dss.c | 64 +++++++++++++++++++++++++++++++++++++++++++
 drivers/video/omap2/dss/dss.h |  6 ++++
 drivers/video/omap2/dss/sdi.c | 45 ++++++++++++++++++++++++++++++
 4 files changed, 162 insertions(+)

diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index fcba3c129efb..8b8f670a0d7d 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -30,6 +30,7 @@
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 #include <linux/string.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 
@@ -49,6 +50,8 @@ static struct {
 	int data_lines;
 
 	struct omap_dss_device output;
+
+	bool port_initialized;
 } dpi;
 
 static struct platform_device *dpi_get_dsidev(enum omap_channel channel)
@@ -727,3 +730,47 @@ void __exit dpi_uninit_platform_driver(void)
 {
 	platform_driver_unregister(&omap_dpi_driver);
 }
+
+int __init dpi_init_port(struct platform_device *pdev, struct device_node *port)
+{
+	struct device_node *ep;
+	u32 datalines;
+	int r;
+
+	ep = omapdss_of_get_next_endpoint(port, NULL);
+	if (!ep)
+		return 0;
+
+	r = of_property_read_u32(ep, "data-lines", &datalines);
+	if (r) {
+		DSSERR("failed to parse datalines\n");
+		goto err_datalines;
+	}
+
+	dpi.data_lines = datalines;
+
+	of_node_put(ep);
+
+	dpi.pdev = pdev;
+
+	mutex_init(&dpi.lock);
+
+	dpi_init_output(pdev);
+
+	dpi.port_initialized = true;
+
+	return 0;
+
+err_datalines:
+	of_node_put(ep);
+
+	return r;
+}
+
+void __exit dpi_uninit_port(void)
+{
+	if (!dpi.port_initialized)
+		return;
+
+	dpi_uninit_output(dpi.pdev);
+}
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index bd01608e67e2..8316a0b56154 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -23,6 +23,7 @@
 #define DSS_SUBSYS_NAME "DSS"
 
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/io.h>
 #include <linux/export.h>
 #include <linux/err.h>
@@ -33,6 +34,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/gfp.h>
 #include <linux/sizes.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 
@@ -841,6 +843,54 @@ static int __init dss_init_features(struct platform_device *pdev)
 	return 0;
 }
 
+static int dss_init_ports(struct platform_device *pdev)
+{
+	struct device_node *parent = pdev->dev.of_node;
+	struct device_node *port;
+	int r;
+
+	port = omapdss_of_get_next_port(parent, NULL);
+	if (!port) {
+
+#ifdef CONFIG_OMAP2_DSS_DPI
+		dpi_init_port(pdev, parent);
+#endif
+		return 0;
+	}
+
+	do {
+		u32 reg;
+
+		r = of_property_read_u32(port, "reg", &reg);
+		if (r)
+			reg = 0;
+
+#ifdef CONFIG_OMAP2_DSS_DPI
+		if (reg == 0)
+			dpi_init_port(pdev, port);
+#endif
+
+#ifdef CONFIG_OMAP2_DSS_SDI
+		if (reg == 1)
+			sdi_init_port(pdev, port);
+#endif
+
+	} while ((port = omapdss_of_get_next_port(parent, port)) != NULL);
+
+	return 0;
+}
+
+static void dss_uninit_ports(void)
+{
+#ifdef CONFIG_OMAP2_DSS_DPI
+	dpi_uninit_port();
+#endif
+
+#ifdef CONFIG_OMAP2_DSS_SDI
+	sdi_uninit_port();
+#endif
+}
+
 /* DSS HW IP initialisation */
 static int __init omap_dsshw_probe(struct platform_device *pdev)
 {
@@ -899,6 +949,8 @@ static int __init omap_dsshw_probe(struct platform_device *pdev)
 	dss.lcd_clk_source[0] = OMAP_DSS_CLK_SRC_FCK;
 	dss.lcd_clk_source[1] = OMAP_DSS_CLK_SRC_FCK;
 
+	dss_init_ports(pdev);
+
 	rev = dss_read_reg(DSS_REVISION);
 	printk(KERN_INFO "OMAP DSS rev %d.%d\n",
 			FLD_GET(rev, 7, 4), FLD_GET(rev, 3, 0));
@@ -918,6 +970,8 @@ err_setup_clocks:
 
 static int __exit omap_dsshw_remove(struct platform_device *pdev)
 {
+	dss_uninit_ports();
+
 	pm_runtime_disable(&pdev->dev);
 
 	dss_put_clocks();
@@ -955,12 +1009,22 @@ static const struct dev_pm_ops dss_pm_ops = {
 	.runtime_resume = dss_runtime_resume,
 };
 
+static const struct of_device_id dss_of_match[] = {
+	{ .compatible = "ti,omap2-dss", },
+	{ .compatible = "ti,omap3-dss", },
+	{ .compatible = "ti,omap4-dss", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, dss_of_match);
+
 static struct platform_driver omap_dsshw_driver = {
 	.remove         = __exit_p(omap_dsshw_remove),
 	.driver         = {
 		.name   = "omapdss_dss",
 		.owner  = THIS_MODULE,
 		.pm	= &dss_pm_ops,
+		.of_match_table = dss_of_match,
 	},
 };
 
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index f538e867c0f8..81c6bc8befea 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -261,6 +261,9 @@ bool dss_div_calc(unsigned long fck_min, dss_div_calc_func func, void *data);
 int sdi_init_platform_driver(void) __init;
 void sdi_uninit_platform_driver(void) __exit;
 
+int sdi_init_port(struct platform_device *pdev, struct device_node *port) __init;
+void sdi_uninit_port(void) __exit;
+
 /* DSI */
 
 typedef bool (*dsi_pll_calc_func)(int regn, int regm, unsigned long fint,
@@ -372,6 +375,9 @@ static inline bool dsi_pll_calc(struct platform_device *dsidev,
 int dpi_init_platform_driver(void) __init;
 void dpi_uninit_platform_driver(void) __exit;
 
+int dpi_init_port(struct platform_device *pdev, struct device_node *port) __init;
+void dpi_uninit_port(void) __exit;
+
 /* DISPC */
 int dispc_init_platform_driver(void) __init;
 void dispc_uninit_platform_driver(void) __exit;
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 156d146a72a6..e4404ddefe5b 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -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"
@@ -41,6 +42,8 @@ static struct {
 	int datapairs;
 
 	struct omap_dss_device output;
+
+	bool port_initialized;
 } sdi;
 
 struct sdi_clk_calc_ctx {
@@ -388,3 +391,45 @@ void __exit sdi_uninit_platform_driver(void)
 {
 	platform_driver_unregister(&omap_sdi_driver);
 }
+
+int __init sdi_init_port(struct platform_device *pdev, struct device_node *port)
+{
+	struct device_node *ep;
+	u32 datapairs;
+	int r;
+
+	ep = omapdss_of_get_next_endpoint(port, NULL);
+	if (!ep)
+		return 0;
+
+	r = of_property_read_u32(ep, "datapairs", &datapairs);
+	if (r) {
+		DSSERR("failed to parse datapairs\n");
+		goto err_datapairs;
+	}
+
+	sdi.datapairs = datapairs;
+
+	of_node_put(ep);
+
+	sdi.pdev = pdev;
+
+	sdi_init_output(pdev);
+
+	sdi.port_initialized = true;
+
+	return 0;
+
+err_datapairs:
+	of_node_put(ep);
+
+	return r;
+}
+
+void __exit sdi_uninit_port(void)
+{
+	if (!sdi.port_initialized)
+		return;
+
+	sdi_uninit_output(sdi.pdev);
+}
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 10/41] OMAPDSS: Add DT support to DISPC
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT support to DISPC. Only thing needed here is the of_match_table.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dispc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index f51646f15cf2..3ac51e125846 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -3781,12 +3781,20 @@ static const struct dev_pm_ops dispc_pm_ops = {
 	.runtime_resume = dispc_runtime_resume,
 };
 
+static const struct of_device_id dispc_of_match[] = {
+	{ .compatible = "ti,omap2-dispc", },
+	{ .compatible = "ti,omap3-dispc", },
+	{ .compatible = "ti,omap4-dispc", },
+	{},
+};
+
 static struct platform_driver omap_dispchw_driver = {
 	.remove         = __exit_p(omap_dispchw_remove),
 	.driver         = {
 		.name   = "omapdss_dispc",
 		.owner  = THIS_MODULE,
 		.pm	= &dispc_pm_ops,
+		.of_match_table = dispc_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 10/41] OMAPDSS: Add DT support to DISPC
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support to DISPC. Only thing needed here is the of_match_table.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dispc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index f51646f15cf2..3ac51e125846 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -3781,12 +3781,20 @@ static const struct dev_pm_ops dispc_pm_ops = {
 	.runtime_resume = dispc_runtime_resume,
 };
 
+static const struct of_device_id dispc_of_match[] = {
+	{ .compatible = "ti,omap2-dispc", },
+	{ .compatible = "ti,omap3-dispc", },
+	{ .compatible = "ti,omap4-dispc", },
+	{},
+};
+
 static struct platform_driver omap_dispchw_driver = {
 	.remove         = __exit_p(omap_dispchw_remove),
 	.driver         = {
 		.name   = "omapdss_dispc",
 		.owner  = THIS_MODULE,
 		.pm	= &dispc_pm_ops,
+		.of_match_table = dispc_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 10/41] OMAPDSS: Add DT support to DISPC
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support to DISPC. Only thing needed here is the of_match_table.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dispc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index f51646f15cf2..3ac51e125846 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -3781,12 +3781,20 @@ static const struct dev_pm_ops dispc_pm_ops = {
 	.runtime_resume = dispc_runtime_resume,
 };
 
+static const struct of_device_id dispc_of_match[] = {
+	{ .compatible = "ti,omap2-dispc", },
+	{ .compatible = "ti,omap3-dispc", },
+	{ .compatible = "ti,omap4-dispc", },
+	{},
+};
+
 static struct platform_driver omap_dispchw_driver = {
 	.remove         = __exit_p(omap_dispchw_remove),
 	.driver         = {
 		.name   = "omapdss_dispc",
 		.owner  = THIS_MODULE,
 		.pm	= &dispc_pm_ops,
+		.of_match_table = dispc_of_match,
 	},
 };
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 11/41] OMAPDSS: Add DT support to HDMI
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT support to HDMI driver. The only thing needed for DT support here
is the of_match_table.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/hdmi4.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c
index 11e7500197c1..064bec4e08d4 100644
--- a/drivers/video/omap2/dss/hdmi4.c
+++ b/drivers/video/omap2/dss/hdmi4.c
@@ -682,6 +682,11 @@ static const struct dev_pm_ops hdmi_pm_ops = {
 	.runtime_resume = hdmi_runtime_resume,
 };
 
+static const struct of_device_id hdmi_of_match[] = {
+	{ .compatible = "ti,omap4-hdmi", },
+	{},
+};
+
 static struct platform_driver omapdss_hdmihw_driver = {
 	.probe		= omapdss_hdmihw_probe,
 	.remove         = __exit_p(omapdss_hdmihw_remove),
@@ -689,6 +694,7 @@ static struct platform_driver omapdss_hdmihw_driver = {
 		.name   = "omapdss_hdmi",
 		.owner  = THIS_MODULE,
 		.pm	= &hdmi_pm_ops,
+		.of_match_table = hdmi_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 11/41] OMAPDSS: Add DT support to HDMI
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support to HDMI driver. The only thing needed for DT support here
is the of_match_table.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/hdmi4.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c
index 11e7500197c1..064bec4e08d4 100644
--- a/drivers/video/omap2/dss/hdmi4.c
+++ b/drivers/video/omap2/dss/hdmi4.c
@@ -682,6 +682,11 @@ static const struct dev_pm_ops hdmi_pm_ops = {
 	.runtime_resume = hdmi_runtime_resume,
 };
 
+static const struct of_device_id hdmi_of_match[] = {
+	{ .compatible = "ti,omap4-hdmi", },
+	{},
+};
+
 static struct platform_driver omapdss_hdmihw_driver = {
 	.probe		= omapdss_hdmihw_probe,
 	.remove         = __exit_p(omapdss_hdmihw_remove),
@@ -689,6 +694,7 @@ static struct platform_driver omapdss_hdmihw_driver = {
 		.name   = "omapdss_hdmi",
 		.owner  = THIS_MODULE,
 		.pm	= &hdmi_pm_ops,
+		.of_match_table = hdmi_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 11/41] OMAPDSS: Add DT support to HDMI
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support to HDMI driver. The only thing needed for DT support here
is the of_match_table.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/hdmi4.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c
index 11e7500197c1..064bec4e08d4 100644
--- a/drivers/video/omap2/dss/hdmi4.c
+++ b/drivers/video/omap2/dss/hdmi4.c
@@ -682,6 +682,11 @@ static const struct dev_pm_ops hdmi_pm_ops = {
 	.runtime_resume = hdmi_runtime_resume,
 };
 
+static const struct of_device_id hdmi_of_match[] = {
+	{ .compatible = "ti,omap4-hdmi", },
+	{},
+};
+
 static struct platform_driver omapdss_hdmihw_driver = {
 	.probe		= omapdss_hdmihw_probe,
 	.remove         = __exit_p(omapdss_hdmihw_remove),
@@ -689,6 +694,7 @@ static struct platform_driver omapdss_hdmihw_driver = {
 		.name   = "omapdss_hdmi",
 		.owner  = THIS_MODULE,
 		.pm	= &hdmi_pm_ops,
+		.of_match_table = hdmi_of_match,
 	},
 };
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 12/41] OMAPDSS: Add DT support to VENC
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT support to VENC.

In contrast to non-DT version, the DT version gets the invert-polarity
and connector type via venc's endpoint, not from the connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/venc.c | 61 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index c0e4def29795..b962a01961f5 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -34,6 +34,7 @@
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 
@@ -808,6 +809,48 @@ static void __exit venc_uninit_output(struct platform_device *pdev)
 	omapdss_unregister_output(out);
 }
 
+static int venc_probe_of(struct platform_device *pdev)
+{
+	struct device_node *node = pdev->dev.of_node;
+	struct device_node *ep;
+	u32 channels;
+	int r;
+
+	ep = omapdss_of_get_first_endpoint(node);
+	if (!ep)
+		return 0;
+
+	venc.invert_polarity = of_property_read_bool(ep, "ti,invert-polarity");
+
+	r = of_property_read_u32(ep, "ti,channels", &channels);
+	if (r) {
+		dev_err(&pdev->dev,
+			"failed to read property 'ti,channels': %d\n", r);
+		goto err;
+	}
+
+	switch (channels) {
+	case 1:
+		venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE;
+		break;
+	case 2:
+		venc.type = OMAP_DSS_VENC_TYPE_SVIDEO;
+		break;
+	default:
+		dev_err(&pdev->dev, "bad channel propert '%d'\n", channels);
+		r = -EINVAL;
+		goto err;
+	}
+
+	of_node_put(ep);
+
+	return 0;
+err:
+	of_node_put(ep);
+
+	return 0;
+}
+
 /* VENC HW IP initialisation */
 static int omap_venchw_probe(struct platform_device *pdev)
 {
@@ -849,12 +892,21 @@ static int omap_venchw_probe(struct platform_device *pdev)
 
 	venc_runtime_put();
 
+	if (pdev->dev.of_node) {
+		r = venc_probe_of(pdev);
+		if (r) {
+			DSSERR("Invalid DT data\n");
+			goto err_probe_of;
+		}
+	}
+
 	dss_debugfs_create_file("venc", venc_dump_regs);
 
 	venc_init_output(pdev);
 
 	return 0;
 
+err_probe_of:
 err_runtime_get:
 	pm_runtime_disable(&pdev->dev);
 	return r;
@@ -898,6 +950,14 @@ static const struct dev_pm_ops venc_pm_ops = {
 	.runtime_resume = venc_runtime_resume,
 };
 
+
+static const struct of_device_id venc_of_match[] = {
+	{ .compatible = "ti,omap2-venc", },
+	{ .compatible = "ti,omap3-venc", },
+	{ .compatible = "ti,omap4-venc", },
+	{},
+};
+
 static struct platform_driver omap_venchw_driver = {
 	.probe		= omap_venchw_probe,
 	.remove         = __exit_p(omap_venchw_remove),
@@ -905,6 +965,7 @@ static struct platform_driver omap_venchw_driver = {
 		.name   = "omapdss_venc",
 		.owner  = THIS_MODULE,
 		.pm	= &venc_pm_ops,
+		.of_match_table = venc_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 12/41] OMAPDSS: Add DT support to VENC
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support to VENC.

In contrast to non-DT version, the DT version gets the invert-polarity
and connector type via venc's endpoint, not from the connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/venc.c | 61 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index c0e4def29795..b962a01961f5 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -34,6 +34,7 @@
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 
@@ -808,6 +809,48 @@ static void __exit venc_uninit_output(struct platform_device *pdev)
 	omapdss_unregister_output(out);
 }
 
+static int venc_probe_of(struct platform_device *pdev)
+{
+	struct device_node *node = pdev->dev.of_node;
+	struct device_node *ep;
+	u32 channels;
+	int r;
+
+	ep = omapdss_of_get_first_endpoint(node);
+	if (!ep)
+		return 0;
+
+	venc.invert_polarity = of_property_read_bool(ep, "ti,invert-polarity");
+
+	r = of_property_read_u32(ep, "ti,channels", &channels);
+	if (r) {
+		dev_err(&pdev->dev,
+			"failed to read property 'ti,channels': %d\n", r);
+		goto err;
+	}
+
+	switch (channels) {
+	case 1:
+		venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE;
+		break;
+	case 2:
+		venc.type = OMAP_DSS_VENC_TYPE_SVIDEO;
+		break;
+	default:
+		dev_err(&pdev->dev, "bad channel propert '%d'\n", channels);
+		r = -EINVAL;
+		goto err;
+	}
+
+	of_node_put(ep);
+
+	return 0;
+err:
+	of_node_put(ep);
+
+	return 0;
+}
+
 /* VENC HW IP initialisation */
 static int omap_venchw_probe(struct platform_device *pdev)
 {
@@ -849,12 +892,21 @@ static int omap_venchw_probe(struct platform_device *pdev)
 
 	venc_runtime_put();
 
+	if (pdev->dev.of_node) {
+		r = venc_probe_of(pdev);
+		if (r) {
+			DSSERR("Invalid DT data\n");
+			goto err_probe_of;
+		}
+	}
+
 	dss_debugfs_create_file("venc", venc_dump_regs);
 
 	venc_init_output(pdev);
 
 	return 0;
 
+err_probe_of:
 err_runtime_get:
 	pm_runtime_disable(&pdev->dev);
 	return r;
@@ -898,6 +950,14 @@ static const struct dev_pm_ops venc_pm_ops = {
 	.runtime_resume = venc_runtime_resume,
 };
 
+
+static const struct of_device_id venc_of_match[] = {
+	{ .compatible = "ti,omap2-venc", },
+	{ .compatible = "ti,omap3-venc", },
+	{ .compatible = "ti,omap4-venc", },
+	{},
+};
+
 static struct platform_driver omap_venchw_driver = {
 	.probe		= omap_venchw_probe,
 	.remove         = __exit_p(omap_venchw_remove),
@@ -905,6 +965,7 @@ static struct platform_driver omap_venchw_driver = {
 		.name   = "omapdss_venc",
 		.owner  = THIS_MODULE,
 		.pm	= &venc_pm_ops,
+		.of_match_table = venc_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 12/41] OMAPDSS: Add DT support to VENC
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support to VENC.

In contrast to non-DT version, the DT version gets the invert-polarity
and connector type via venc's endpoint, not from the connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/venc.c | 61 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index c0e4def29795..b962a01961f5 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -34,6 +34,7 @@
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 
@@ -808,6 +809,48 @@ static void __exit venc_uninit_output(struct platform_device *pdev)
 	omapdss_unregister_output(out);
 }
 
+static int venc_probe_of(struct platform_device *pdev)
+{
+	struct device_node *node = pdev->dev.of_node;
+	struct device_node *ep;
+	u32 channels;
+	int r;
+
+	ep = omapdss_of_get_first_endpoint(node);
+	if (!ep)
+		return 0;
+
+	venc.invert_polarity = of_property_read_bool(ep, "ti,invert-polarity");
+
+	r = of_property_read_u32(ep, "ti,channels", &channels);
+	if (r) {
+		dev_err(&pdev->dev,
+			"failed to read property 'ti,channels': %d\n", r);
+		goto err;
+	}
+
+	switch (channels) {
+	case 1:
+		venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE;
+		break;
+	case 2:
+		venc.type = OMAP_DSS_VENC_TYPE_SVIDEO;
+		break;
+	default:
+		dev_err(&pdev->dev, "bad channel propert '%d'\n", channels);
+		r = -EINVAL;
+		goto err;
+	}
+
+	of_node_put(ep);
+
+	return 0;
+err:
+	of_node_put(ep);
+
+	return 0;
+}
+
 /* VENC HW IP initialisation */
 static int omap_venchw_probe(struct platform_device *pdev)
 {
@@ -849,12 +892,21 @@ static int omap_venchw_probe(struct platform_device *pdev)
 
 	venc_runtime_put();
 
+	if (pdev->dev.of_node) {
+		r = venc_probe_of(pdev);
+		if (r) {
+			DSSERR("Invalid DT data\n");
+			goto err_probe_of;
+		}
+	}
+
 	dss_debugfs_create_file("venc", venc_dump_regs);
 
 	venc_init_output(pdev);
 
 	return 0;
 
+err_probe_of:
 err_runtime_get:
 	pm_runtime_disable(&pdev->dev);
 	return r;
@@ -898,6 +950,14 @@ static const struct dev_pm_ops venc_pm_ops = {
 	.runtime_resume = venc_runtime_resume,
 };
 
+
+static const struct of_device_id venc_of_match[] = {
+	{ .compatible = "ti,omap2-venc", },
+	{ .compatible = "ti,omap3-venc", },
+	{ .compatible = "ti,omap4-venc", },
+	{},
+};
+
 static struct platform_driver omap_venchw_driver = {
 	.probe		= omap_venchw_probe,
 	.remove         = __exit_p(omap_venchw_remove),
@@ -905,6 +965,7 @@ static struct platform_driver omap_venchw_driver = {
 		.name   = "omapdss_venc",
 		.owner  = THIS_MODULE,
 		.pm	= &venc_pm_ops,
+		.of_match_table = venc_of_match,
 	},
 };
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 13/41] OMAPDSS: Add DT support to DSI
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add the code to make the DSI driver work with device tree on OMAP3 and
OMAP4.

A minor hack is needed at the moment in the DSI driver: the DSS driver
needs to know the ID number of a DSI device, as clocks are routed in
different ways to the DSI devices. At the moment we don't have any
proper way to manage this, so this patchs adds a simple lookup table
that is used to deduce the ID from the DSI device's base address.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c | 139 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 138 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index b7c92705fb54..98bb2d68a462 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -38,6 +38,8 @@
 #include <linux/slab.h>
 #include <linux/debugfs.h>
 #include <linux/pm_runtime.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
 
 #include <video/omapdss.h>
 #include <video/mipi_display.h>
@@ -386,6 +388,13 @@ struct dsi_packet_sent_handler_data {
 	struct completion *completion;
 };
 
+struct dsi_module_id_data {
+	u32 address;
+	int id;
+};
+
+static const struct of_device_id dsi_of_match[];
+
 #ifdef DSI_PERF_MEASURE
 static bool dsi_perf;
 module_param(dsi_perf, bool, 0644);
@@ -5373,12 +5382,69 @@ static void dsi_uninit_output(struct platform_device *dsidev)
 	omapdss_unregister_output(out);
 }
 
+static int dsi_probe_of(struct platform_device *pdev)
+{
+	struct device_node *node = pdev->dev.of_node;
+	struct dsi_data *dsi = dsi_get_dsidrv_data(pdev);
+	struct property *prop;
+	u32 lane_arr[10];
+	int len, num_pins;
+	int r, i;
+	struct device_node *ep;
+	struct omap_dsi_pin_config pin_cfg;
+
+	ep = omapdss_of_get_first_endpoint(node);
+	if (!ep)
+		return 0;
+
+	prop = of_find_property(ep, "lanes", &len);
+	if (prop == NULL) {
+		dev_err(&pdev->dev, "failed to find lane data\n");
+		r = -EINVAL;
+		goto err;
+	}
+
+	num_pins = len / sizeof(u32);
+
+	if (num_pins < 4 || num_pins % 2 != 0
+			|| num_pins > dsi->num_lanes_supported * 2) {
+		dev_err(&pdev->dev, "bad number of lanes\n");
+		r = -EINVAL;
+		goto err;
+	}
+
+	r = of_property_read_u32_array(ep, "lanes", lane_arr, num_pins);
+	if (r) {
+		dev_err(&pdev->dev, "failed to read lane data\n");
+		goto err;
+	}
+
+	pin_cfg.num_pins = num_pins;
+	for (i = 0; i < num_pins; ++i)
+		pin_cfg.pins[i] = (int)lane_arr[i];
+
+	r = dsi_configure_pins(&dsi->output, &pin_cfg);
+	if (r) {
+		dev_err(&pdev->dev, "failed to configure pins");
+		goto err;
+	}
+
+	of_node_put(ep);
+
+	return 0;
+
+err:
+	of_node_put(ep);
+	return r;
+}
+
 /* DSI1 HW IP initialisation */
 static int omap_dsihw_probe(struct platform_device *dsidev)
 {
 	u32 rev;
 	int r, i;
 	struct dsi_data *dsi;
+	struct resource *dsi_mem;
 	struct resource *res;
 	struct resource temp_res;
 
@@ -5386,7 +5452,6 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 	if (!dsi)
 		return -ENOMEM;
 
-	dsi->module_id = dsidev->id;
 	dsi->pdev = dsidev;
 	dev_set_drvdata(&dsidev->dev, dsi);
 
@@ -5424,6 +5489,8 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 		res = &temp_res;
 	}
 
+	dsi_mem = res;
+
 	dsi->proto_base = devm_ioremap(&dsidev->dev, res->start,
 		resource_size(res));
 	if (!dsi->proto_base) {
@@ -5484,6 +5551,31 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 		return r;
 	}
 
+	if (dsidev->dev.of_node) {
+		const struct of_device_id *match;
+		const struct dsi_module_id_data *d;
+
+		match = of_match_node(dsi_of_match, dsidev->dev.of_node);
+		if (!match) {
+			DSSERR("unsupported DSI module\n");
+			return -ENODEV;
+		}
+
+		d = match->data;
+
+		while (d->address != 0 && d->address != dsi_mem->start)
+			d++;
+
+		if (d->address == 0) {
+			DSSERR("unsupported DSI module\n");
+			return -ENODEV;
+		}
+
+		dsi->module_id = d->id;
+	} else {
+		dsi->module_id = dsidev->id;
+	}
+
 	/* DSI VCs initialization */
 	for (i = 0; i < ARRAY_SIZE(dsi->vc); i++) {
 		dsi->vc[i].source = DSI_VC_SOURCE_L4;
@@ -5519,6 +5611,19 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 
 	dsi_init_output(dsidev);
 
+	if (dsidev->dev.of_node) {
+		r = dsi_probe_of(dsidev);
+		if (r) {
+			DSSERR("Invalid DSI DT data\n");
+			goto err_probe_of;
+		}
+
+		r = of_platform_populate(dsidev->dev.of_node, NULL, NULL,
+			&dsidev->dev);
+		if (r)
+			DSSERR("Failed to populate DSI child devices: %d\n", r);
+	}
+
 	dsi_runtime_put(dsidev);
 
 	if (dsi->module_id == 0)
@@ -5532,17 +5637,31 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 	else if (dsi->module_id == 1)
 		dss_debugfs_create_file("dsi2_irqs", dsi2_dump_irqs);
 #endif
+
 	return 0;
 
+err_probe_of:
+	dsi_uninit_output(dsidev);
+	dsi_runtime_put(dsidev);
+
 err_runtime_get:
 	pm_runtime_disable(&dsidev->dev);
 	return r;
 }
 
+static int dsi_unregister_child(struct device *dev, void *data)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	platform_device_unregister(pdev);
+	return 0;
+}
+
 static int __exit omap_dsihw_remove(struct platform_device *dsidev)
 {
 	struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
 
+	device_for_each_child(&dsidev->dev, NULL, dsi_unregister_child);
+
 	WARN_ON(dsi->scp_clk_refcount > 0);
 
 	dsi_uninit_output(dsidev);
@@ -5580,6 +5699,23 @@ static const struct dev_pm_ops dsi_pm_ops = {
 	.runtime_resume = dsi_runtime_resume,
 };
 
+static const struct dsi_module_id_data dsi_of_data_omap3[] = {
+	{ .address = 0x4804fc00, .id = 0, },
+	{ },
+};
+
+static const struct dsi_module_id_data dsi_of_data_omap4[] = {
+	{ .address = 0x58004000, .id = 0, },
+	{ .address = 0x58005000, .id = 1, },
+	{ },
+};
+
+static const struct of_device_id dsi_of_match[] = {
+	{ .compatible = "ti,omap3-dsi", .data = dsi_of_data_omap3, },
+	{ .compatible = "ti,omap4-dsi", .data = dsi_of_data_omap4, },
+	{},
+};
+
 static struct platform_driver omap_dsihw_driver = {
 	.probe		= omap_dsihw_probe,
 	.remove         = __exit_p(omap_dsihw_remove),
@@ -5587,6 +5723,7 @@ static struct platform_driver omap_dsihw_driver = {
 		.name   = "omapdss_dsi",
 		.owner  = THIS_MODULE,
 		.pm	= &dsi_pm_ops,
+		.of_match_table = dsi_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 13/41] OMAPDSS: Add DT support to DSI
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add the code to make the DSI driver work with device tree on OMAP3 and
OMAP4.

A minor hack is needed at the moment in the DSI driver: the DSS driver
needs to know the ID number of a DSI device, as clocks are routed in
different ways to the DSI devices. At the moment we don't have any
proper way to manage this, so this patchs adds a simple lookup table
that is used to deduce the ID from the DSI device's base address.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c | 139 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 138 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index b7c92705fb54..98bb2d68a462 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -38,6 +38,8 @@
 #include <linux/slab.h>
 #include <linux/debugfs.h>
 #include <linux/pm_runtime.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
 
 #include <video/omapdss.h>
 #include <video/mipi_display.h>
@@ -386,6 +388,13 @@ struct dsi_packet_sent_handler_data {
 	struct completion *completion;
 };
 
+struct dsi_module_id_data {
+	u32 address;
+	int id;
+};
+
+static const struct of_device_id dsi_of_match[];
+
 #ifdef DSI_PERF_MEASURE
 static bool dsi_perf;
 module_param(dsi_perf, bool, 0644);
@@ -5373,12 +5382,69 @@ static void dsi_uninit_output(struct platform_device *dsidev)
 	omapdss_unregister_output(out);
 }
 
+static int dsi_probe_of(struct platform_device *pdev)
+{
+	struct device_node *node = pdev->dev.of_node;
+	struct dsi_data *dsi = dsi_get_dsidrv_data(pdev);
+	struct property *prop;
+	u32 lane_arr[10];
+	int len, num_pins;
+	int r, i;
+	struct device_node *ep;
+	struct omap_dsi_pin_config pin_cfg;
+
+	ep = omapdss_of_get_first_endpoint(node);
+	if (!ep)
+		return 0;
+
+	prop = of_find_property(ep, "lanes", &len);
+	if (prop = NULL) {
+		dev_err(&pdev->dev, "failed to find lane data\n");
+		r = -EINVAL;
+		goto err;
+	}
+
+	num_pins = len / sizeof(u32);
+
+	if (num_pins < 4 || num_pins % 2 != 0
+			|| num_pins > dsi->num_lanes_supported * 2) {
+		dev_err(&pdev->dev, "bad number of lanes\n");
+		r = -EINVAL;
+		goto err;
+	}
+
+	r = of_property_read_u32_array(ep, "lanes", lane_arr, num_pins);
+	if (r) {
+		dev_err(&pdev->dev, "failed to read lane data\n");
+		goto err;
+	}
+
+	pin_cfg.num_pins = num_pins;
+	for (i = 0; i < num_pins; ++i)
+		pin_cfg.pins[i] = (int)lane_arr[i];
+
+	r = dsi_configure_pins(&dsi->output, &pin_cfg);
+	if (r) {
+		dev_err(&pdev->dev, "failed to configure pins");
+		goto err;
+	}
+
+	of_node_put(ep);
+
+	return 0;
+
+err:
+	of_node_put(ep);
+	return r;
+}
+
 /* DSI1 HW IP initialisation */
 static int omap_dsihw_probe(struct platform_device *dsidev)
 {
 	u32 rev;
 	int r, i;
 	struct dsi_data *dsi;
+	struct resource *dsi_mem;
 	struct resource *res;
 	struct resource temp_res;
 
@@ -5386,7 +5452,6 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 	if (!dsi)
 		return -ENOMEM;
 
-	dsi->module_id = dsidev->id;
 	dsi->pdev = dsidev;
 	dev_set_drvdata(&dsidev->dev, dsi);
 
@@ -5424,6 +5489,8 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 		res = &temp_res;
 	}
 
+	dsi_mem = res;
+
 	dsi->proto_base = devm_ioremap(&dsidev->dev, res->start,
 		resource_size(res));
 	if (!dsi->proto_base) {
@@ -5484,6 +5551,31 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 		return r;
 	}
 
+	if (dsidev->dev.of_node) {
+		const struct of_device_id *match;
+		const struct dsi_module_id_data *d;
+
+		match = of_match_node(dsi_of_match, dsidev->dev.of_node);
+		if (!match) {
+			DSSERR("unsupported DSI module\n");
+			return -ENODEV;
+		}
+
+		d = match->data;
+
+		while (d->address != 0 && d->address != dsi_mem->start)
+			d++;
+
+		if (d->address = 0) {
+			DSSERR("unsupported DSI module\n");
+			return -ENODEV;
+		}
+
+		dsi->module_id = d->id;
+	} else {
+		dsi->module_id = dsidev->id;
+	}
+
 	/* DSI VCs initialization */
 	for (i = 0; i < ARRAY_SIZE(dsi->vc); i++) {
 		dsi->vc[i].source = DSI_VC_SOURCE_L4;
@@ -5519,6 +5611,19 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 
 	dsi_init_output(dsidev);
 
+	if (dsidev->dev.of_node) {
+		r = dsi_probe_of(dsidev);
+		if (r) {
+			DSSERR("Invalid DSI DT data\n");
+			goto err_probe_of;
+		}
+
+		r = of_platform_populate(dsidev->dev.of_node, NULL, NULL,
+			&dsidev->dev);
+		if (r)
+			DSSERR("Failed to populate DSI child devices: %d\n", r);
+	}
+
 	dsi_runtime_put(dsidev);
 
 	if (dsi->module_id = 0)
@@ -5532,17 +5637,31 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 	else if (dsi->module_id = 1)
 		dss_debugfs_create_file("dsi2_irqs", dsi2_dump_irqs);
 #endif
+
 	return 0;
 
+err_probe_of:
+	dsi_uninit_output(dsidev);
+	dsi_runtime_put(dsidev);
+
 err_runtime_get:
 	pm_runtime_disable(&dsidev->dev);
 	return r;
 }
 
+static int dsi_unregister_child(struct device *dev, void *data)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	platform_device_unregister(pdev);
+	return 0;
+}
+
 static int __exit omap_dsihw_remove(struct platform_device *dsidev)
 {
 	struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
 
+	device_for_each_child(&dsidev->dev, NULL, dsi_unregister_child);
+
 	WARN_ON(dsi->scp_clk_refcount > 0);
 
 	dsi_uninit_output(dsidev);
@@ -5580,6 +5699,23 @@ static const struct dev_pm_ops dsi_pm_ops = {
 	.runtime_resume = dsi_runtime_resume,
 };
 
+static const struct dsi_module_id_data dsi_of_data_omap3[] = {
+	{ .address = 0x4804fc00, .id = 0, },
+	{ },
+};
+
+static const struct dsi_module_id_data dsi_of_data_omap4[] = {
+	{ .address = 0x58004000, .id = 0, },
+	{ .address = 0x58005000, .id = 1, },
+	{ },
+};
+
+static const struct of_device_id dsi_of_match[] = {
+	{ .compatible = "ti,omap3-dsi", .data = dsi_of_data_omap3, },
+	{ .compatible = "ti,omap4-dsi", .data = dsi_of_data_omap4, },
+	{},
+};
+
 static struct platform_driver omap_dsihw_driver = {
 	.probe		= omap_dsihw_probe,
 	.remove         = __exit_p(omap_dsihw_remove),
@@ -5587,6 +5723,7 @@ static struct platform_driver omap_dsihw_driver = {
 		.name   = "omapdss_dsi",
 		.owner  = THIS_MODULE,
 		.pm	= &dsi_pm_ops,
+		.of_match_table = dsi_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 13/41] OMAPDSS: Add DT support to DSI
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add the code to make the DSI driver work with device tree on OMAP3 and
OMAP4.

A minor hack is needed at the moment in the DSI driver: the DSS driver
needs to know the ID number of a DSI device, as clocks are routed in
different ways to the DSI devices. At the moment we don't have any
proper way to manage this, so this patchs adds a simple lookup table
that is used to deduce the ID from the DSI device's base address.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c | 139 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 138 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index b7c92705fb54..98bb2d68a462 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -38,6 +38,8 @@
 #include <linux/slab.h>
 #include <linux/debugfs.h>
 #include <linux/pm_runtime.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
 
 #include <video/omapdss.h>
 #include <video/mipi_display.h>
@@ -386,6 +388,13 @@ struct dsi_packet_sent_handler_data {
 	struct completion *completion;
 };
 
+struct dsi_module_id_data {
+	u32 address;
+	int id;
+};
+
+static const struct of_device_id dsi_of_match[];
+
 #ifdef DSI_PERF_MEASURE
 static bool dsi_perf;
 module_param(dsi_perf, bool, 0644);
@@ -5373,12 +5382,69 @@ static void dsi_uninit_output(struct platform_device *dsidev)
 	omapdss_unregister_output(out);
 }
 
+static int dsi_probe_of(struct platform_device *pdev)
+{
+	struct device_node *node = pdev->dev.of_node;
+	struct dsi_data *dsi = dsi_get_dsidrv_data(pdev);
+	struct property *prop;
+	u32 lane_arr[10];
+	int len, num_pins;
+	int r, i;
+	struct device_node *ep;
+	struct omap_dsi_pin_config pin_cfg;
+
+	ep = omapdss_of_get_first_endpoint(node);
+	if (!ep)
+		return 0;
+
+	prop = of_find_property(ep, "lanes", &len);
+	if (prop == NULL) {
+		dev_err(&pdev->dev, "failed to find lane data\n");
+		r = -EINVAL;
+		goto err;
+	}
+
+	num_pins = len / sizeof(u32);
+
+	if (num_pins < 4 || num_pins % 2 != 0
+			|| num_pins > dsi->num_lanes_supported * 2) {
+		dev_err(&pdev->dev, "bad number of lanes\n");
+		r = -EINVAL;
+		goto err;
+	}
+
+	r = of_property_read_u32_array(ep, "lanes", lane_arr, num_pins);
+	if (r) {
+		dev_err(&pdev->dev, "failed to read lane data\n");
+		goto err;
+	}
+
+	pin_cfg.num_pins = num_pins;
+	for (i = 0; i < num_pins; ++i)
+		pin_cfg.pins[i] = (int)lane_arr[i];
+
+	r = dsi_configure_pins(&dsi->output, &pin_cfg);
+	if (r) {
+		dev_err(&pdev->dev, "failed to configure pins");
+		goto err;
+	}
+
+	of_node_put(ep);
+
+	return 0;
+
+err:
+	of_node_put(ep);
+	return r;
+}
+
 /* DSI1 HW IP initialisation */
 static int omap_dsihw_probe(struct platform_device *dsidev)
 {
 	u32 rev;
 	int r, i;
 	struct dsi_data *dsi;
+	struct resource *dsi_mem;
 	struct resource *res;
 	struct resource temp_res;
 
@@ -5386,7 +5452,6 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 	if (!dsi)
 		return -ENOMEM;
 
-	dsi->module_id = dsidev->id;
 	dsi->pdev = dsidev;
 	dev_set_drvdata(&dsidev->dev, dsi);
 
@@ -5424,6 +5489,8 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 		res = &temp_res;
 	}
 
+	dsi_mem = res;
+
 	dsi->proto_base = devm_ioremap(&dsidev->dev, res->start,
 		resource_size(res));
 	if (!dsi->proto_base) {
@@ -5484,6 +5551,31 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 		return r;
 	}
 
+	if (dsidev->dev.of_node) {
+		const struct of_device_id *match;
+		const struct dsi_module_id_data *d;
+
+		match = of_match_node(dsi_of_match, dsidev->dev.of_node);
+		if (!match) {
+			DSSERR("unsupported DSI module\n");
+			return -ENODEV;
+		}
+
+		d = match->data;
+
+		while (d->address != 0 && d->address != dsi_mem->start)
+			d++;
+
+		if (d->address == 0) {
+			DSSERR("unsupported DSI module\n");
+			return -ENODEV;
+		}
+
+		dsi->module_id = d->id;
+	} else {
+		dsi->module_id = dsidev->id;
+	}
+
 	/* DSI VCs initialization */
 	for (i = 0; i < ARRAY_SIZE(dsi->vc); i++) {
 		dsi->vc[i].source = DSI_VC_SOURCE_L4;
@@ -5519,6 +5611,19 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 
 	dsi_init_output(dsidev);
 
+	if (dsidev->dev.of_node) {
+		r = dsi_probe_of(dsidev);
+		if (r) {
+			DSSERR("Invalid DSI DT data\n");
+			goto err_probe_of;
+		}
+
+		r = of_platform_populate(dsidev->dev.of_node, NULL, NULL,
+			&dsidev->dev);
+		if (r)
+			DSSERR("Failed to populate DSI child devices: %d\n", r);
+	}
+
 	dsi_runtime_put(dsidev);
 
 	if (dsi->module_id == 0)
@@ -5532,17 +5637,31 @@ static int omap_dsihw_probe(struct platform_device *dsidev)
 	else if (dsi->module_id == 1)
 		dss_debugfs_create_file("dsi2_irqs", dsi2_dump_irqs);
 #endif
+
 	return 0;
 
+err_probe_of:
+	dsi_uninit_output(dsidev);
+	dsi_runtime_put(dsidev);
+
 err_runtime_get:
 	pm_runtime_disable(&dsidev->dev);
 	return r;
 }
 
+static int dsi_unregister_child(struct device *dev, void *data)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	platform_device_unregister(pdev);
+	return 0;
+}
+
 static int __exit omap_dsihw_remove(struct platform_device *dsidev)
 {
 	struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
 
+	device_for_each_child(&dsidev->dev, NULL, dsi_unregister_child);
+
 	WARN_ON(dsi->scp_clk_refcount > 0);
 
 	dsi_uninit_output(dsidev);
@@ -5580,6 +5699,23 @@ static const struct dev_pm_ops dsi_pm_ops = {
 	.runtime_resume = dsi_runtime_resume,
 };
 
+static const struct dsi_module_id_data dsi_of_data_omap3[] = {
+	{ .address = 0x4804fc00, .id = 0, },
+	{ },
+};
+
+static const struct dsi_module_id_data dsi_of_data_omap4[] = {
+	{ .address = 0x58004000, .id = 0, },
+	{ .address = 0x58005000, .id = 1, },
+	{ },
+};
+
+static const struct of_device_id dsi_of_match[] = {
+	{ .compatible = "ti,omap3-dsi", .data = dsi_of_data_omap3, },
+	{ .compatible = "ti,omap4-dsi", .data = dsi_of_data_omap4, },
+	{},
+};
+
 static struct platform_driver omap_dsihw_driver = {
 	.probe		= omap_dsihw_probe,
 	.remove         = __exit_p(omap_dsihw_remove),
@@ -5587,6 +5723,7 @@ static struct platform_driver omap_dsihw_driver = {
 		.name   = "omapdss_dsi",
 		.owner  = THIS_MODULE,
 		.pm	= &dsi_pm_ops,
+		.of_match_table = dsi_of_match,
 	},
 };
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 14/41] OMAPDSS: panel-dsi-cm: Add DT support
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT support for panel-dsi-cm.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/panel-dsi-cm.c | 65 +++++++++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)

diff --git a/drivers/video/omap2/displays-new/panel-dsi-cm.c b/drivers/video/omap2/displays-new/panel-dsi-cm.c
index b7baafe83aa3..d302c4428ab7 100644
--- a/drivers/video/omap2/displays-new/panel-dsi-cm.c
+++ b/drivers/video/omap2/displays-new/panel-dsi-cm.c
@@ -22,6 +22,8 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/workqueue.h>
+#include <linux/of_device.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
@@ -595,10 +597,13 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
 		.lp_clk_max = 10000000,
 	};
 
-	r = in->ops.dsi->configure_pins(in, &ddata->pin_config);
-	if (r) {
-		dev_err(&ddata->pdev->dev, "failed to configure DSI pins\n");
-		goto err0;
+	if (ddata->pin_config.num_pins > 0) {
+		r = in->ops.dsi->configure_pins(in, &ddata->pin_config);
+		if (r) {
+			dev_err(&ddata->pdev->dev,
+				"failed to configure DSI pins\n");
+			goto err0;
+		}
 	}
 
 	r = in->ops.dsi->set_config(in, &dsi_config);
@@ -1156,6 +1161,46 @@ static int dsicm_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int dsicm_probe_of(struct platform_device *pdev)
+{
+	struct device_node *node = pdev->dev.of_node;
+	struct panel_drv_data *ddata = platform_get_drvdata(pdev);
+	struct omap_dss_device *in;
+	int gpio;
+
+	gpio = of_get_gpio(node, 0);
+	if (!gpio_is_valid(gpio)) {
+		dev_err(&pdev->dev, "failed to parse reset gpio\n");
+		return gpio;
+	}
+	ddata->reset_gpio = gpio;
+
+	if (of_gpio_count(node) > 1) {
+		gpio = of_get_gpio(node, 1);
+
+		if (gpio_is_valid(gpio) || gpio == -ENOENT) {
+			ddata->ext_te_gpio = gpio;
+		} else {
+			dev_err(&pdev->dev, "failed to parse TE gpio\n");
+			return gpio;
+		}
+	} else {
+		ddata->ext_te_gpio = -1;
+	}
+
+	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;
+
+	/* TODO: ulps, backlight */
+
+	return 0;
+}
+
 static int dsicm_probe(struct platform_device *pdev)
 {
 	struct backlight_properties props;
@@ -1178,6 +1223,10 @@ static int dsicm_probe(struct platform_device *pdev)
 		r = dsicm_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = dsicm_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -1320,12 +1369,20 @@ static int __exit dsicm_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id dsicm_of_match[] = {
+	{ .compatible = "omapdss,panel-dsi-cm", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, dsicm_of_match);
+
 static struct platform_driver dsicm_driver = {
 	.probe = dsicm_probe,
 	.remove = __exit_p(dsicm_remove),
 	.driver = {
 		.name = "panel-dsi-cm",
 		.owner = THIS_MODULE,
+		.of_match_table = dsicm_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 14/41] OMAPDSS: panel-dsi-cm: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for panel-dsi-cm.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/panel-dsi-cm.c | 65 +++++++++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)

diff --git a/drivers/video/omap2/displays-new/panel-dsi-cm.c b/drivers/video/omap2/displays-new/panel-dsi-cm.c
index b7baafe83aa3..d302c4428ab7 100644
--- a/drivers/video/omap2/displays-new/panel-dsi-cm.c
+++ b/drivers/video/omap2/displays-new/panel-dsi-cm.c
@@ -22,6 +22,8 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/workqueue.h>
+#include <linux/of_device.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
@@ -595,10 +597,13 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
 		.lp_clk_max = 10000000,
 	};
 
-	r = in->ops.dsi->configure_pins(in, &ddata->pin_config);
-	if (r) {
-		dev_err(&ddata->pdev->dev, "failed to configure DSI pins\n");
-		goto err0;
+	if (ddata->pin_config.num_pins > 0) {
+		r = in->ops.dsi->configure_pins(in, &ddata->pin_config);
+		if (r) {
+			dev_err(&ddata->pdev->dev,
+				"failed to configure DSI pins\n");
+			goto err0;
+		}
 	}
 
 	r = in->ops.dsi->set_config(in, &dsi_config);
@@ -1156,6 +1161,46 @@ static int dsicm_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int dsicm_probe_of(struct platform_device *pdev)
+{
+	struct device_node *node = pdev->dev.of_node;
+	struct panel_drv_data *ddata = platform_get_drvdata(pdev);
+	struct omap_dss_device *in;
+	int gpio;
+
+	gpio = of_get_gpio(node, 0);
+	if (!gpio_is_valid(gpio)) {
+		dev_err(&pdev->dev, "failed to parse reset gpio\n");
+		return gpio;
+	}
+	ddata->reset_gpio = gpio;
+
+	if (of_gpio_count(node) > 1) {
+		gpio = of_get_gpio(node, 1);
+
+		if (gpio_is_valid(gpio) || gpio = -ENOENT) {
+			ddata->ext_te_gpio = gpio;
+		} else {
+			dev_err(&pdev->dev, "failed to parse TE gpio\n");
+			return gpio;
+		}
+	} else {
+		ddata->ext_te_gpio = -1;
+	}
+
+	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;
+
+	/* TODO: ulps, backlight */
+
+	return 0;
+}
+
 static int dsicm_probe(struct platform_device *pdev)
 {
 	struct backlight_properties props;
@@ -1178,6 +1223,10 @@ static int dsicm_probe(struct platform_device *pdev)
 		r = dsicm_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = dsicm_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -1320,12 +1369,20 @@ static int __exit dsicm_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id dsicm_of_match[] = {
+	{ .compatible = "omapdss,panel-dsi-cm", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, dsicm_of_match);
+
 static struct platform_driver dsicm_driver = {
 	.probe = dsicm_probe,
 	.remove = __exit_p(dsicm_remove),
 	.driver = {
 		.name = "panel-dsi-cm",
 		.owner = THIS_MODULE,
+		.of_match_table = dsicm_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 14/41] OMAPDSS: panel-dsi-cm: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for panel-dsi-cm.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/panel-dsi-cm.c | 65 +++++++++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)

diff --git a/drivers/video/omap2/displays-new/panel-dsi-cm.c b/drivers/video/omap2/displays-new/panel-dsi-cm.c
index b7baafe83aa3..d302c4428ab7 100644
--- a/drivers/video/omap2/displays-new/panel-dsi-cm.c
+++ b/drivers/video/omap2/displays-new/panel-dsi-cm.c
@@ -22,6 +22,8 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/workqueue.h>
+#include <linux/of_device.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
@@ -595,10 +597,13 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
 		.lp_clk_max = 10000000,
 	};
 
-	r = in->ops.dsi->configure_pins(in, &ddata->pin_config);
-	if (r) {
-		dev_err(&ddata->pdev->dev, "failed to configure DSI pins\n");
-		goto err0;
+	if (ddata->pin_config.num_pins > 0) {
+		r = in->ops.dsi->configure_pins(in, &ddata->pin_config);
+		if (r) {
+			dev_err(&ddata->pdev->dev,
+				"failed to configure DSI pins\n");
+			goto err0;
+		}
 	}
 
 	r = in->ops.dsi->set_config(in, &dsi_config);
@@ -1156,6 +1161,46 @@ static int dsicm_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int dsicm_probe_of(struct platform_device *pdev)
+{
+	struct device_node *node = pdev->dev.of_node;
+	struct panel_drv_data *ddata = platform_get_drvdata(pdev);
+	struct omap_dss_device *in;
+	int gpio;
+
+	gpio = of_get_gpio(node, 0);
+	if (!gpio_is_valid(gpio)) {
+		dev_err(&pdev->dev, "failed to parse reset gpio\n");
+		return gpio;
+	}
+	ddata->reset_gpio = gpio;
+
+	if (of_gpio_count(node) > 1) {
+		gpio = of_get_gpio(node, 1);
+
+		if (gpio_is_valid(gpio) || gpio == -ENOENT) {
+			ddata->ext_te_gpio = gpio;
+		} else {
+			dev_err(&pdev->dev, "failed to parse TE gpio\n");
+			return gpio;
+		}
+	} else {
+		ddata->ext_te_gpio = -1;
+	}
+
+	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;
+
+	/* TODO: ulps, backlight */
+
+	return 0;
+}
+
 static int dsicm_probe(struct platform_device *pdev)
 {
 	struct backlight_properties props;
@@ -1178,6 +1223,10 @@ static int dsicm_probe(struct platform_device *pdev)
 		r = dsicm_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = dsicm_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -1320,12 +1369,20 @@ static int __exit dsicm_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id dsicm_of_match[] = {
+	{ .compatible = "omapdss,panel-dsi-cm", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, dsicm_of_match);
+
 static struct platform_driver dsicm_driver = {
 	.probe = dsicm_probe,
 	.remove = __exit_p(dsicm_remove),
 	.driver = {
 		.name = "panel-dsi-cm",
 		.owner = THIS_MODULE,
+		.of_match_table = dsicm_of_match,
 	},
 };
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 15/41] OMAPDSS: encoder-tfp410: Add DT support
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT support for encoder-tfp410.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/encoder-tfp410.c | 43 ++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/displays-new/encoder-tfp410.c b/drivers/video/omap2/displays-new/encoder-tfp410.c
index 4a291e756be9..e1ef972e33cd 100644
--- a/drivers/video/omap2/displays-new/encoder-tfp410.c
+++ b/drivers/video/omap2/displays-new/encoder-tfp410.c
@@ -13,6 +13,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
@@ -82,7 +83,8 @@ static int tfp410_enable(struct omap_dss_device *dssdev)
 		return 0;
 
 	in->ops.dpi->set_timings(in, &ddata->timings);
-	in->ops.dpi->set_data_lines(in, ddata->data_lines);
+	if (ddata->data_lines)
+		in->ops.dpi->set_data_lines(in, ddata->data_lines);
 
 	r = in->ops.dpi->enable(in);
 	if (r)
@@ -179,6 +181,33 @@ static int tfp410_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int tfp410_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 gpio;
+
+	gpio = of_get_gpio(node, 0);
+
+	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
+		ddata->pd_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse PD gpio\n");
+		return gpio;
+	}
+
+	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 tfp410_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -195,6 +224,10 @@ static int tfp410_probe(struct platform_device *pdev)
 		r = tfp410_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = tfp410_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -251,12 +284,20 @@ static int __exit tfp410_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id tfp410_of_match[] = {
+	{ .compatible = "omapdss,ti,tfp410", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, tfp410_of_match);
+
 static struct platform_driver tfp410_driver = {
 	.probe	= tfp410_probe,
 	.remove	= __exit_p(tfp410_remove),
 	.driver	= {
 		.name	= "tfp410",
 		.owner	= THIS_MODULE,
+		.of_match_table = tfp410_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 15/41] OMAPDSS: encoder-tfp410: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for encoder-tfp410.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/encoder-tfp410.c | 43 ++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/displays-new/encoder-tfp410.c b/drivers/video/omap2/displays-new/encoder-tfp410.c
index 4a291e756be9..e1ef972e33cd 100644
--- a/drivers/video/omap2/displays-new/encoder-tfp410.c
+++ b/drivers/video/omap2/displays-new/encoder-tfp410.c
@@ -13,6 +13,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
@@ -82,7 +83,8 @@ static int tfp410_enable(struct omap_dss_device *dssdev)
 		return 0;
 
 	in->ops.dpi->set_timings(in, &ddata->timings);
-	in->ops.dpi->set_data_lines(in, ddata->data_lines);
+	if (ddata->data_lines)
+		in->ops.dpi->set_data_lines(in, ddata->data_lines);
 
 	r = in->ops.dpi->enable(in);
 	if (r)
@@ -179,6 +181,33 @@ static int tfp410_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int tfp410_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 gpio;
+
+	gpio = of_get_gpio(node, 0);
+
+	if (gpio_is_valid(gpio) || gpio = -ENOENT) {
+		ddata->pd_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse PD gpio\n");
+		return gpio;
+	}
+
+	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 tfp410_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -195,6 +224,10 @@ static int tfp410_probe(struct platform_device *pdev)
 		r = tfp410_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = tfp410_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -251,12 +284,20 @@ static int __exit tfp410_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id tfp410_of_match[] = {
+	{ .compatible = "omapdss,ti,tfp410", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, tfp410_of_match);
+
 static struct platform_driver tfp410_driver = {
 	.probe	= tfp410_probe,
 	.remove	= __exit_p(tfp410_remove),
 	.driver	= {
 		.name	= "tfp410",
 		.owner	= THIS_MODULE,
+		.of_match_table = tfp410_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 15/41] OMAPDSS: encoder-tfp410: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for encoder-tfp410.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/encoder-tfp410.c | 43 ++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/displays-new/encoder-tfp410.c b/drivers/video/omap2/displays-new/encoder-tfp410.c
index 4a291e756be9..e1ef972e33cd 100644
--- a/drivers/video/omap2/displays-new/encoder-tfp410.c
+++ b/drivers/video/omap2/displays-new/encoder-tfp410.c
@@ -13,6 +13,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
@@ -82,7 +83,8 @@ static int tfp410_enable(struct omap_dss_device *dssdev)
 		return 0;
 
 	in->ops.dpi->set_timings(in, &ddata->timings);
-	in->ops.dpi->set_data_lines(in, ddata->data_lines);
+	if (ddata->data_lines)
+		in->ops.dpi->set_data_lines(in, ddata->data_lines);
 
 	r = in->ops.dpi->enable(in);
 	if (r)
@@ -179,6 +181,33 @@ static int tfp410_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int tfp410_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 gpio;
+
+	gpio = of_get_gpio(node, 0);
+
+	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
+		ddata->pd_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse PD gpio\n");
+		return gpio;
+	}
+
+	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 tfp410_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -195,6 +224,10 @@ static int tfp410_probe(struct platform_device *pdev)
 		r = tfp410_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = tfp410_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -251,12 +284,20 @@ static int __exit tfp410_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id tfp410_of_match[] = {
+	{ .compatible = "omapdss,ti,tfp410", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, tfp410_of_match);
+
 static struct platform_driver tfp410_driver = {
 	.probe	= tfp410_probe,
 	.remove	= __exit_p(tfp410_remove),
 	.driver	= {
 		.name	= "tfp410",
 		.owner	= THIS_MODULE,
+		.of_match_table = tfp410_of_match,
 	},
 };
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 16/41] OMAPDSS: connector-dvi: Add DT support
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT support for connector-dvi.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/connector-dvi.c | 43 ++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/drivers/video/omap2/displays-new/connector-dvi.c b/drivers/video/omap2/displays-new/connector-dvi.c
index b6c50904038e..4ea26abdcb64 100644
--- a/drivers/video/omap2/displays-new/connector-dvi.c
+++ b/drivers/video/omap2/displays-new/connector-dvi.c
@@ -277,6 +277,37 @@ static int dvic_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int dvic_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;
+	struct device_node *adapter_node;
+	struct i2c_adapter *adapter;
+
+	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;
+
+	adapter_node = of_parse_phandle(node, "i2c-bus", 0);
+	if (adapter_node) {
+		adapter = of_find_i2c_adapter_by_node(adapter_node);
+		if (adapter == NULL) {
+			dev_err(&pdev->dev, "failed to parse i2c-bus\n");
+			omap_dss_put_device(ddata->in);
+			return -EPROBE_DEFER;
+		}
+
+		ddata->i2c_adapter = adapter;
+	}
+
+	return 0;
+}
+
 static int dvic_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -293,6 +324,10 @@ static int dvic_probe(struct platform_device *pdev)
 		r = dvic_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = dvic_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -342,12 +377,20 @@ static int __exit dvic_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id dvic_of_match[] = {
+	{ .compatible = "omapdss,dvi-connector", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, dvic_of_match);
+
 static struct platform_driver dvi_connector_driver = {
 	.probe	= dvic_probe,
 	.remove	= __exit_p(dvic_remove),
 	.driver	= {
 		.name	= "connector-dvi",
 		.owner	= THIS_MODULE,
+		.of_match_table = dvic_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 16/41] OMAPDSS: connector-dvi: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for connector-dvi.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/connector-dvi.c | 43 ++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/drivers/video/omap2/displays-new/connector-dvi.c b/drivers/video/omap2/displays-new/connector-dvi.c
index b6c50904038e..4ea26abdcb64 100644
--- a/drivers/video/omap2/displays-new/connector-dvi.c
+++ b/drivers/video/omap2/displays-new/connector-dvi.c
@@ -277,6 +277,37 @@ static int dvic_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int dvic_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;
+	struct device_node *adapter_node;
+	struct i2c_adapter *adapter;
+
+	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;
+
+	adapter_node = of_parse_phandle(node, "i2c-bus", 0);
+	if (adapter_node) {
+		adapter = of_find_i2c_adapter_by_node(adapter_node);
+		if (adapter = NULL) {
+			dev_err(&pdev->dev, "failed to parse i2c-bus\n");
+			omap_dss_put_device(ddata->in);
+			return -EPROBE_DEFER;
+		}
+
+		ddata->i2c_adapter = adapter;
+	}
+
+	return 0;
+}
+
 static int dvic_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -293,6 +324,10 @@ static int dvic_probe(struct platform_device *pdev)
 		r = dvic_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = dvic_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -342,12 +377,20 @@ static int __exit dvic_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id dvic_of_match[] = {
+	{ .compatible = "omapdss,dvi-connector", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, dvic_of_match);
+
 static struct platform_driver dvi_connector_driver = {
 	.probe	= dvic_probe,
 	.remove	= __exit_p(dvic_remove),
 	.driver	= {
 		.name	= "connector-dvi",
 		.owner	= THIS_MODULE,
+		.of_match_table = dvic_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 16/41] OMAPDSS: connector-dvi: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for connector-dvi.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/connector-dvi.c | 43 ++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/drivers/video/omap2/displays-new/connector-dvi.c b/drivers/video/omap2/displays-new/connector-dvi.c
index b6c50904038e..4ea26abdcb64 100644
--- a/drivers/video/omap2/displays-new/connector-dvi.c
+++ b/drivers/video/omap2/displays-new/connector-dvi.c
@@ -277,6 +277,37 @@ static int dvic_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int dvic_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;
+	struct device_node *adapter_node;
+	struct i2c_adapter *adapter;
+
+	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;
+
+	adapter_node = of_parse_phandle(node, "i2c-bus", 0);
+	if (adapter_node) {
+		adapter = of_find_i2c_adapter_by_node(adapter_node);
+		if (adapter == NULL) {
+			dev_err(&pdev->dev, "failed to parse i2c-bus\n");
+			omap_dss_put_device(ddata->in);
+			return -EPROBE_DEFER;
+		}
+
+		ddata->i2c_adapter = adapter;
+	}
+
+	return 0;
+}
+
 static int dvic_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -293,6 +324,10 @@ static int dvic_probe(struct platform_device *pdev)
 		r = dvic_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = dvic_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -342,12 +377,20 @@ static int __exit dvic_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id dvic_of_match[] = {
+	{ .compatible = "omapdss,dvi-connector", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, dvic_of_match);
+
 static struct platform_driver dvi_connector_driver = {
 	.probe	= dvic_probe,
 	.remove	= __exit_p(dvic_remove),
 	.driver	= {
 		.name	= "connector-dvi",
 		.owner	= THIS_MODULE,
+		.of_match_table = dvic_of_match,
 	},
 };
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 17/41] OMAPDSS: encoder-tpd12s015: Add DT support
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT support for encoder-tpd12s015.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../video/omap2/displays-new/encoder-tpd12s015.c   | 56 ++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/drivers/video/omap2/displays-new/encoder-tpd12s015.c b/drivers/video/omap2/displays-new/encoder-tpd12s015.c
index d5c936cb217f..7e33686171e3 100644
--- a/drivers/video/omap2/displays-new/encoder-tpd12s015.c
+++ b/drivers/video/omap2/displays-new/encoder-tpd12s015.c
@@ -15,6 +15,7 @@
 #include <linux/slab.h>
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
@@ -289,6 +290,49 @@ static int tpd_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int tpd_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 gpio;
+
+	/* CT CP HPD GPIO */
+	gpio = of_get_gpio(node, 0);
+	if (!gpio_is_valid(gpio)) {
+		dev_err(&pdev->dev, "failed to parse CT CP HPD gpio\n");
+		return gpio;
+	}
+	ddata->ct_cp_hpd_gpio = gpio;
+
+	/* LS OE GPIO */
+	gpio = of_get_gpio(node, 1);
+	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
+		ddata->ls_oe_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse LS OE gpio\n");
+		return gpio;
+	}
+
+	/* HPD GPIO */
+	gpio = of_get_gpio(node, 2);
+	if (!gpio_is_valid(gpio)) {
+		dev_err(&pdev->dev, "failed to parse HPD gpio\n");
+		return gpio;
+	}
+	ddata->hpd_gpio = gpio;
+
+	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 tpd_probe(struct platform_device *pdev)
 {
 	struct omap_dss_device *in, *dssdev;
@@ -307,6 +351,10 @@ static int tpd_probe(struct platform_device *pdev)
 		r = tpd_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = tpd_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -379,12 +427,20 @@ static int __exit tpd_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id tpd_of_match[] = {
+	{ .compatible = "omapdss,ti,tpd12s015", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, tpd_of_match);
+
 static struct platform_driver tpd_driver = {
 	.probe	= tpd_probe,
 	.remove	= __exit_p(tpd_remove),
 	.driver	= {
 		.name	= "tpd12s015",
 		.owner	= THIS_MODULE,
+		.of_match_table = tpd_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 17/41] OMAPDSS: encoder-tpd12s015: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for encoder-tpd12s015.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../video/omap2/displays-new/encoder-tpd12s015.c   | 56 ++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/drivers/video/omap2/displays-new/encoder-tpd12s015.c b/drivers/video/omap2/displays-new/encoder-tpd12s015.c
index d5c936cb217f..7e33686171e3 100644
--- a/drivers/video/omap2/displays-new/encoder-tpd12s015.c
+++ b/drivers/video/omap2/displays-new/encoder-tpd12s015.c
@@ -15,6 +15,7 @@
 #include <linux/slab.h>
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
@@ -289,6 +290,49 @@ static int tpd_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int tpd_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 gpio;
+
+	/* CT CP HPD GPIO */
+	gpio = of_get_gpio(node, 0);
+	if (!gpio_is_valid(gpio)) {
+		dev_err(&pdev->dev, "failed to parse CT CP HPD gpio\n");
+		return gpio;
+	}
+	ddata->ct_cp_hpd_gpio = gpio;
+
+	/* LS OE GPIO */
+	gpio = of_get_gpio(node, 1);
+	if (gpio_is_valid(gpio) || gpio = -ENOENT) {
+		ddata->ls_oe_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse LS OE gpio\n");
+		return gpio;
+	}
+
+	/* HPD GPIO */
+	gpio = of_get_gpio(node, 2);
+	if (!gpio_is_valid(gpio)) {
+		dev_err(&pdev->dev, "failed to parse HPD gpio\n");
+		return gpio;
+	}
+	ddata->hpd_gpio = gpio;
+
+	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 tpd_probe(struct platform_device *pdev)
 {
 	struct omap_dss_device *in, *dssdev;
@@ -307,6 +351,10 @@ static int tpd_probe(struct platform_device *pdev)
 		r = tpd_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = tpd_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -379,12 +427,20 @@ static int __exit tpd_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id tpd_of_match[] = {
+	{ .compatible = "omapdss,ti,tpd12s015", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, tpd_of_match);
+
 static struct platform_driver tpd_driver = {
 	.probe	= tpd_probe,
 	.remove	= __exit_p(tpd_remove),
 	.driver	= {
 		.name	= "tpd12s015",
 		.owner	= THIS_MODULE,
+		.of_match_table = tpd_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 17/41] OMAPDSS: encoder-tpd12s015: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for encoder-tpd12s015.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../video/omap2/displays-new/encoder-tpd12s015.c   | 56 ++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/drivers/video/omap2/displays-new/encoder-tpd12s015.c b/drivers/video/omap2/displays-new/encoder-tpd12s015.c
index d5c936cb217f..7e33686171e3 100644
--- a/drivers/video/omap2/displays-new/encoder-tpd12s015.c
+++ b/drivers/video/omap2/displays-new/encoder-tpd12s015.c
@@ -15,6 +15,7 @@
 #include <linux/slab.h>
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
@@ -289,6 +290,49 @@ static int tpd_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int tpd_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 gpio;
+
+	/* CT CP HPD GPIO */
+	gpio = of_get_gpio(node, 0);
+	if (!gpio_is_valid(gpio)) {
+		dev_err(&pdev->dev, "failed to parse CT CP HPD gpio\n");
+		return gpio;
+	}
+	ddata->ct_cp_hpd_gpio = gpio;
+
+	/* LS OE GPIO */
+	gpio = of_get_gpio(node, 1);
+	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
+		ddata->ls_oe_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse LS OE gpio\n");
+		return gpio;
+	}
+
+	/* HPD GPIO */
+	gpio = of_get_gpio(node, 2);
+	if (!gpio_is_valid(gpio)) {
+		dev_err(&pdev->dev, "failed to parse HPD gpio\n");
+		return gpio;
+	}
+	ddata->hpd_gpio = gpio;
+
+	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 tpd_probe(struct platform_device *pdev)
 {
 	struct omap_dss_device *in, *dssdev;
@@ -307,6 +351,10 @@ static int tpd_probe(struct platform_device *pdev)
 		r = tpd_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = tpd_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -379,12 +427,20 @@ static int __exit tpd_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id tpd_of_match[] = {
+	{ .compatible = "omapdss,ti,tpd12s015", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, tpd_of_match);
+
 static struct platform_driver tpd_driver = {
 	.probe	= tpd_probe,
 	.remove	= __exit_p(tpd_remove),
 	.driver	= {
 		.name	= "tpd12s015",
 		.owner	= THIS_MODULE,
+		.of_match_table = tpd_of_match,
 	},
 };
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 18/41] OMAPDSS: hdmi-connector: Add DT support
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT support for hdmi-connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/connector-hdmi.c | 30 +++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/drivers/video/omap2/displays-new/connector-hdmi.c b/drivers/video/omap2/displays-new/connector-hdmi.c
index 9abe2c039ae9..2e026eab2dd0 100644
--- a/drivers/video/omap2/displays-new/connector-hdmi.c
+++ b/drivers/video/omap2/displays-new/connector-hdmi.c
@@ -12,6 +12,7 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <drm/drm_edid.h>
 
@@ -301,6 +302,23 @@ static int hdmic_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int hdmic_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;
+
+	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 hdmic_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -318,6 +336,10 @@ static int hdmic_probe(struct platform_device *pdev)
 		r = hdmic_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = hdmic_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -359,12 +381,20 @@ static int __exit hdmic_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id hdmic_of_match[] = {
+	{ .compatible = "omapdss,hdmi-connector", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, hdmic_of_match);
+
 static struct platform_driver hdmi_connector_driver = {
 	.probe	= hdmic_probe,
 	.remove	= __exit_p(hdmic_remove),
 	.driver	= {
 		.name	= "connector-hdmi",
 		.owner	= THIS_MODULE,
+		.of_match_table = hdmic_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 18/41] OMAPDSS: hdmi-connector: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for hdmi-connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/connector-hdmi.c | 30 +++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/drivers/video/omap2/displays-new/connector-hdmi.c b/drivers/video/omap2/displays-new/connector-hdmi.c
index 9abe2c039ae9..2e026eab2dd0 100644
--- a/drivers/video/omap2/displays-new/connector-hdmi.c
+++ b/drivers/video/omap2/displays-new/connector-hdmi.c
@@ -12,6 +12,7 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <drm/drm_edid.h>
 
@@ -301,6 +302,23 @@ static int hdmic_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int hdmic_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;
+
+	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 hdmic_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -318,6 +336,10 @@ static int hdmic_probe(struct platform_device *pdev)
 		r = hdmic_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = hdmic_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -359,12 +381,20 @@ static int __exit hdmic_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id hdmic_of_match[] = {
+	{ .compatible = "omapdss,hdmi-connector", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, hdmic_of_match);
+
 static struct platform_driver hdmi_connector_driver = {
 	.probe	= hdmic_probe,
 	.remove	= __exit_p(hdmic_remove),
 	.driver	= {
 		.name	= "connector-hdmi",
 		.owner	= THIS_MODULE,
+		.of_match_table = hdmic_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 18/41] OMAPDSS: hdmi-connector: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for hdmi-connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/connector-hdmi.c | 30 +++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/drivers/video/omap2/displays-new/connector-hdmi.c b/drivers/video/omap2/displays-new/connector-hdmi.c
index 9abe2c039ae9..2e026eab2dd0 100644
--- a/drivers/video/omap2/displays-new/connector-hdmi.c
+++ b/drivers/video/omap2/displays-new/connector-hdmi.c
@@ -12,6 +12,7 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <drm/drm_edid.h>
 
@@ -301,6 +302,23 @@ static int hdmic_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int hdmic_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;
+
+	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 hdmic_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -318,6 +336,10 @@ static int hdmic_probe(struct platform_device *pdev)
 		r = hdmic_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = hdmic_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -359,12 +381,20 @@ static int __exit hdmic_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id hdmic_of_match[] = {
+	{ .compatible = "omapdss,hdmi-connector", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, hdmic_of_match);
+
 static struct platform_driver hdmi_connector_driver = {
 	.probe	= hdmic_probe,
 	.remove	= __exit_p(hdmic_remove),
 	.driver	= {
 		.name	= "connector-hdmi",
 		.owner	= THIS_MODULE,
+		.of_match_table = hdmic_of_match,
 	},
 };
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT support for panel-dpi.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/panel-dpi.c | 64 +++++++++++++++++++++++++++-
 1 file changed, 63 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/displays-new/panel-dpi.c b/drivers/video/omap2/displays-new/panel-dpi.c
index 5f8f7e7c81ef..b032daf0f407 100644
--- a/drivers/video/omap2/displays-new/panel-dpi.c
+++ b/drivers/video/omap2/displays-new/panel-dpi.c
@@ -13,9 +13,12 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/of.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
+#include <video/of_display_timing.h>
 
 struct panel_drv_data {
 	struct omap_dss_device dssdev;
@@ -70,7 +73,8 @@ static int panel_dpi_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);
 
 	r = in->ops.dpi->enable(in);
@@ -182,6 +186,52 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int panel_dpi_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;
+	struct display_timing timing;
+	struct videomode vm;
+	int gpio;
+
+	gpio = of_get_gpio(node, 0);
+	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
+		ddata->enable_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse enable gpio\n");
+		return gpio;
+	}
+
+	gpio = of_get_gpio(node, 1);
+	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
+		ddata->backlight_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse backlight gpio\n");
+		return gpio;
+	}
+
+	r = of_get_display_timing(node, "panel-timing", &timing);
+	if (r) {
+		dev_err(&pdev->dev, "failed to get video timing\n");
+		return r;
+	}
+
+	videomode_from_timing(&timing, &vm);
+	videomode_to_omap_video_timings(&vm, &ddata->videomode);
+
+	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 panel_dpi_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -198,6 +248,10 @@ static int panel_dpi_probe(struct platform_device *pdev)
 		r = panel_dpi_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = panel_dpi_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -254,12 +308,20 @@ static int __exit panel_dpi_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id panel_dpi_of_match[] = {
+	{ .compatible = "omapdss,panel-dpi", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, panel_dpi_of_match);
+
 static struct platform_driver panel_dpi_driver = {
 	.probe = panel_dpi_probe,
 	.remove = __exit_p(panel_dpi_remove),
 	.driver = {
 		.name = "panel-dpi",
 		.owner = THIS_MODULE,
+		.of_match_table = panel_dpi_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for panel-dpi.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/panel-dpi.c | 64 +++++++++++++++++++++++++++-
 1 file changed, 63 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/displays-new/panel-dpi.c b/drivers/video/omap2/displays-new/panel-dpi.c
index 5f8f7e7c81ef..b032daf0f407 100644
--- a/drivers/video/omap2/displays-new/panel-dpi.c
+++ b/drivers/video/omap2/displays-new/panel-dpi.c
@@ -13,9 +13,12 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/of.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
+#include <video/of_display_timing.h>
 
 struct panel_drv_data {
 	struct omap_dss_device dssdev;
@@ -70,7 +73,8 @@ static int panel_dpi_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);
 
 	r = in->ops.dpi->enable(in);
@@ -182,6 +186,52 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int panel_dpi_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;
+	struct display_timing timing;
+	struct videomode vm;
+	int gpio;
+
+	gpio = of_get_gpio(node, 0);
+	if (gpio_is_valid(gpio) || gpio = -ENOENT) {
+		ddata->enable_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse enable gpio\n");
+		return gpio;
+	}
+
+	gpio = of_get_gpio(node, 1);
+	if (gpio_is_valid(gpio) || gpio = -ENOENT) {
+		ddata->backlight_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse backlight gpio\n");
+		return gpio;
+	}
+
+	r = of_get_display_timing(node, "panel-timing", &timing);
+	if (r) {
+		dev_err(&pdev->dev, "failed to get video timing\n");
+		return r;
+	}
+
+	videomode_from_timing(&timing, &vm);
+	videomode_to_omap_video_timings(&vm, &ddata->videomode);
+
+	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 panel_dpi_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -198,6 +248,10 @@ static int panel_dpi_probe(struct platform_device *pdev)
 		r = panel_dpi_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = panel_dpi_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -254,12 +308,20 @@ static int __exit panel_dpi_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id panel_dpi_of_match[] = {
+	{ .compatible = "omapdss,panel-dpi", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, panel_dpi_of_match);
+
 static struct platform_driver panel_dpi_driver = {
 	.probe = panel_dpi_probe,
 	.remove = __exit_p(panel_dpi_remove),
 	.driver = {
 		.name = "panel-dpi",
 		.owner = THIS_MODULE,
+		.of_match_table = panel_dpi_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for panel-dpi.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays-new/panel-dpi.c | 64 +++++++++++++++++++++++++++-
 1 file changed, 63 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/displays-new/panel-dpi.c b/drivers/video/omap2/displays-new/panel-dpi.c
index 5f8f7e7c81ef..b032daf0f407 100644
--- a/drivers/video/omap2/displays-new/panel-dpi.c
+++ b/drivers/video/omap2/displays-new/panel-dpi.c
@@ -13,9 +13,12 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/of.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
+#include <video/of_display_timing.h>
 
 struct panel_drv_data {
 	struct omap_dss_device dssdev;
@@ -70,7 +73,8 @@ static int panel_dpi_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);
 
 	r = in->ops.dpi->enable(in);
@@ -182,6 +186,52 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int panel_dpi_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;
+	struct display_timing timing;
+	struct videomode vm;
+	int gpio;
+
+	gpio = of_get_gpio(node, 0);
+	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
+		ddata->enable_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse enable gpio\n");
+		return gpio;
+	}
+
+	gpio = of_get_gpio(node, 1);
+	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
+		ddata->backlight_gpio = gpio;
+	} else {
+		dev_err(&pdev->dev, "failed to parse backlight gpio\n");
+		return gpio;
+	}
+
+	r = of_get_display_timing(node, "panel-timing", &timing);
+	if (r) {
+		dev_err(&pdev->dev, "failed to get video timing\n");
+		return r;
+	}
+
+	videomode_from_timing(&timing, &vm);
+	videomode_to_omap_video_timings(&vm, &ddata->videomode);
+
+	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 panel_dpi_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -198,6 +248,10 @@ static int panel_dpi_probe(struct platform_device *pdev)
 		r = panel_dpi_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = panel_dpi_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -254,12 +308,20 @@ static int __exit panel_dpi_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id panel_dpi_of_match[] = {
+	{ .compatible = "omapdss,panel-dpi", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, panel_dpi_of_match);
+
 static struct platform_driver panel_dpi_driver = {
 	.probe = panel_dpi_probe,
 	.remove = __exit_p(panel_dpi_remove),
 	.driver = {
 		.name = "panel-dpi",
 		.owner = THIS_MODULE,
+		.of_match_table = panel_dpi_of_match,
 	},
 };
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 20/41] OMAPDSS: connector-analog-tv: Add DT support
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT support for connector-analog-tv.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../video/omap2/displays-new/connector-analog-tv.c | 43 +++++++++++++++++++++-
 1 file changed, 41 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/displays-new/connector-analog-tv.c b/drivers/video/omap2/displays-new/connector-analog-tv.c
index ccd9073f706f..5c840325def4 100644
--- a/drivers/video/omap2/displays-new/connector-analog-tv.c
+++ b/drivers/video/omap2/displays-new/connector-analog-tv.c
@@ -12,6 +12,7 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
@@ -42,6 +43,12 @@ static const struct omap_video_timings tvc_pal_timings = {
 	.interlace	= true,
 };
 
+static const struct of_device_id tvc_of_match[];
+
+struct tvc_of_data {
+	enum omap_dss_venc_type connector_type;
+};
+
 #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
 
 static int tvc_connect(struct omap_dss_device *dssdev)
@@ -91,8 +98,12 @@ static int tvc_enable(struct omap_dss_device *dssdev)
 
 	in->ops.atv->set_timings(in, &ddata->timings);
 
-	in->ops.atv->set_type(in, ddata->connector_type);
-	in->ops.atv->invert_vid_out_polarity(in, ddata->invert_polarity);
+	if (!ddata->dev->of_node) {
+		in->ops.atv->set_type(in, ddata->connector_type);
+
+		in->ops.atv->invert_vid_out_polarity(in,
+			ddata->invert_polarity);
+	}
 
 	r = in->ops.atv->enable(in);
 	if (r)
@@ -205,6 +216,23 @@ static int tvc_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int tvc_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;
+
+	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 tvc_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -222,6 +250,10 @@ static int tvc_probe(struct platform_device *pdev)
 		r = tvc_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = tvc_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -263,12 +295,19 @@ static int __exit tvc_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id tvc_of_match[] = {
+	{ .compatible = "omapdss,svideo-connector", },
+	{ .compatible = "omapdss,composite-video-connector", },
+	{},
+};
+
 static struct platform_driver tvc_connector_driver = {
 	.probe	= tvc_probe,
 	.remove	= __exit_p(tvc_remove),
 	.driver	= {
 		.name	= "connector-analog-tv",
 		.owner	= THIS_MODULE,
+		.of_match_table = tvc_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 20/41] OMAPDSS: connector-analog-tv: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for connector-analog-tv.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../video/omap2/displays-new/connector-analog-tv.c | 43 +++++++++++++++++++++-
 1 file changed, 41 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/displays-new/connector-analog-tv.c b/drivers/video/omap2/displays-new/connector-analog-tv.c
index ccd9073f706f..5c840325def4 100644
--- a/drivers/video/omap2/displays-new/connector-analog-tv.c
+++ b/drivers/video/omap2/displays-new/connector-analog-tv.c
@@ -12,6 +12,7 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
@@ -42,6 +43,12 @@ static const struct omap_video_timings tvc_pal_timings = {
 	.interlace	= true,
 };
 
+static const struct of_device_id tvc_of_match[];
+
+struct tvc_of_data {
+	enum omap_dss_venc_type connector_type;
+};
+
 #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
 
 static int tvc_connect(struct omap_dss_device *dssdev)
@@ -91,8 +98,12 @@ static int tvc_enable(struct omap_dss_device *dssdev)
 
 	in->ops.atv->set_timings(in, &ddata->timings);
 
-	in->ops.atv->set_type(in, ddata->connector_type);
-	in->ops.atv->invert_vid_out_polarity(in, ddata->invert_polarity);
+	if (!ddata->dev->of_node) {
+		in->ops.atv->set_type(in, ddata->connector_type);
+
+		in->ops.atv->invert_vid_out_polarity(in,
+			ddata->invert_polarity);
+	}
 
 	r = in->ops.atv->enable(in);
 	if (r)
@@ -205,6 +216,23 @@ static int tvc_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int tvc_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;
+
+	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 tvc_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -222,6 +250,10 @@ static int tvc_probe(struct platform_device *pdev)
 		r = tvc_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = tvc_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -263,12 +295,19 @@ static int __exit tvc_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id tvc_of_match[] = {
+	{ .compatible = "omapdss,svideo-connector", },
+	{ .compatible = "omapdss,composite-video-connector", },
+	{},
+};
+
 static struct platform_driver tvc_connector_driver = {
 	.probe	= tvc_probe,
 	.remove	= __exit_p(tvc_remove),
 	.driver	= {
 		.name	= "connector-analog-tv",
 		.owner	= THIS_MODULE,
+		.of_match_table = tvc_of_match,
 	},
 };
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 20/41] OMAPDSS: connector-analog-tv: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT support for connector-analog-tv.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../video/omap2/displays-new/connector-analog-tv.c | 43 +++++++++++++++++++++-
 1 file changed, 41 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/displays-new/connector-analog-tv.c b/drivers/video/omap2/displays-new/connector-analog-tv.c
index ccd9073f706f..5c840325def4 100644
--- a/drivers/video/omap2/displays-new/connector-analog-tv.c
+++ b/drivers/video/omap2/displays-new/connector-analog-tv.c
@@ -12,6 +12,7 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
@@ -42,6 +43,12 @@ static const struct omap_video_timings tvc_pal_timings = {
 	.interlace	= true,
 };
 
+static const struct of_device_id tvc_of_match[];
+
+struct tvc_of_data {
+	enum omap_dss_venc_type connector_type;
+};
+
 #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
 
 static int tvc_connect(struct omap_dss_device *dssdev)
@@ -91,8 +98,12 @@ static int tvc_enable(struct omap_dss_device *dssdev)
 
 	in->ops.atv->set_timings(in, &ddata->timings);
 
-	in->ops.atv->set_type(in, ddata->connector_type);
-	in->ops.atv->invert_vid_out_polarity(in, ddata->invert_polarity);
+	if (!ddata->dev->of_node) {
+		in->ops.atv->set_type(in, ddata->connector_type);
+
+		in->ops.atv->invert_vid_out_polarity(in,
+			ddata->invert_polarity);
+	}
 
 	r = in->ops.atv->enable(in);
 	if (r)
@@ -205,6 +216,23 @@ static int tvc_probe_pdata(struct platform_device *pdev)
 	return 0;
 }
 
+static int tvc_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;
+
+	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 tvc_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -222,6 +250,10 @@ static int tvc_probe(struct platform_device *pdev)
 		r = tvc_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = tvc_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -263,12 +295,19 @@ static int __exit tvc_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id tvc_of_match[] = {
+	{ .compatible = "omapdss,svideo-connector", },
+	{ .compatible = "omapdss,composite-video-connector", },
+	{},
+};
+
 static struct platform_driver tvc_connector_driver = {
 	.probe	= tvc_probe,
 	.remove	= __exit_p(tvc_remove),
 	.driver	= {
 		.name	= "connector-analog-tv",
 		.owner	= THIS_MODULE,
+		.of_match_table = tvc_of_match,
 	},
 };
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 21/41] OMAPDSS: acx565akm: Add DT support
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

From: Sebastian Reichel <sre@debian.org>

Add DT support for panel-sony-acx565akm

Signed-off-by: Sebastian Reichel <sre@debian.org>
[tomi.valkeinen@ti.com: some modifications]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../omap2/displays-new/panel-sony-acx565akm.c      | 33 +++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c
index 8e97d06921ff..8d2745ce55e3 100644
--- a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c
+++ b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c
@@ -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>
@@ -547,7 +549,9 @@ static int acx565akm_panel_power_on(struct omap_dss_device *dssdev)
 	dev_dbg(&ddata->spi->dev, "%s\n", __func__);
 
 	in->ops.sdi->set_timings(in, &ddata->videomode);
-	in->ops.sdi->set_datapairs(in, ddata->datapairs);
+
+	if (ddata->datapairs > 0)
+		in->ops.sdi->set_datapairs(in, ddata->datapairs);
 
 	r = in->ops.sdi->enable(in);
 	if (r) {
@@ -726,6 +730,22 @@ 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;
+
+	ddata->reset_gpio = of_get_gpio(np, 0);
+
+	ddata->in = omapdss_of_find_source_for_first_ep(np);
+	if (IS_ERR(ddata->in)) {
+		dev_err(&spi->dev, "failed to find video source\n");
+		return PTR_ERR(ddata->in);
+	}
+
+	return 0;
+}
+
 static int acx565akm_probe(struct spi_device *spi)
 {
 	struct panel_drv_data *ddata;
@@ -753,7 +773,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;
 	}
 
@@ -864,10 +889,16 @@ static int acx565akm_remove(struct spi_device *spi)
 	return 0;
 }
 
+static const struct of_device_id acx565akm_of_match[] = {
+	{ .compatible = "omapdss,sony,acx565akm", },
+	{},
+};
+
 static struct spi_driver acx565akm_driver = {
 	.driver = {
 		.name	= "acx565akm",
 		.owner	= THIS_MODULE,
+		.of_match_table = acx565akm_of_match,
 	},
 	.probe	= acx565akm_probe,
 	.remove	= acx565akm_remove,
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 21/41] OMAPDSS: acx565akm: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

From: Sebastian Reichel <sre@debian.org>

Add DT support for panel-sony-acx565akm

Signed-off-by: Sebastian Reichel <sre@debian.org>
[tomi.valkeinen@ti.com: some modifications]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../omap2/displays-new/panel-sony-acx565akm.c      | 33 +++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c
index 8e97d06921ff..8d2745ce55e3 100644
--- a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c
+++ b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c
@@ -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>
@@ -547,7 +549,9 @@ static int acx565akm_panel_power_on(struct omap_dss_device *dssdev)
 	dev_dbg(&ddata->spi->dev, "%s\n", __func__);
 
 	in->ops.sdi->set_timings(in, &ddata->videomode);
-	in->ops.sdi->set_datapairs(in, ddata->datapairs);
+
+	if (ddata->datapairs > 0)
+		in->ops.sdi->set_datapairs(in, ddata->datapairs);
 
 	r = in->ops.sdi->enable(in);
 	if (r) {
@@ -726,6 +730,22 @@ 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;
+
+	ddata->reset_gpio = of_get_gpio(np, 0);
+
+	ddata->in = omapdss_of_find_source_for_first_ep(np);
+	if (IS_ERR(ddata->in)) {
+		dev_err(&spi->dev, "failed to find video source\n");
+		return PTR_ERR(ddata->in);
+	}
+
+	return 0;
+}
+
 static int acx565akm_probe(struct spi_device *spi)
 {
 	struct panel_drv_data *ddata;
@@ -753,7 +773,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;
 	}
 
@@ -864,10 +889,16 @@ static int acx565akm_remove(struct spi_device *spi)
 	return 0;
 }
 
+static const struct of_device_id acx565akm_of_match[] = {
+	{ .compatible = "omapdss,sony,acx565akm", },
+	{},
+};
+
 static struct spi_driver acx565akm_driver = {
 	.driver = {
 		.name	= "acx565akm",
 		.owner	= THIS_MODULE,
+		.of_match_table = acx565akm_of_match,
 	},
 	.probe	= acx565akm_probe,
 	.remove	= acx565akm_remove,
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 21/41] OMAPDSS: acx565akm: Add DT support
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

From: Sebastian Reichel <sre@debian.org>

Add DT support for panel-sony-acx565akm

Signed-off-by: Sebastian Reichel <sre@debian.org>
[tomi.valkeinen at ti.com: some modifications]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../omap2/displays-new/panel-sony-acx565akm.c      | 33 +++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c
index 8e97d06921ff..8d2745ce55e3 100644
--- a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c
+++ b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c
@@ -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>
@@ -547,7 +549,9 @@ static int acx565akm_panel_power_on(struct omap_dss_device *dssdev)
 	dev_dbg(&ddata->spi->dev, "%s\n", __func__);
 
 	in->ops.sdi->set_timings(in, &ddata->videomode);
-	in->ops.sdi->set_datapairs(in, ddata->datapairs);
+
+	if (ddata->datapairs > 0)
+		in->ops.sdi->set_datapairs(in, ddata->datapairs);
 
 	r = in->ops.sdi->enable(in);
 	if (r) {
@@ -726,6 +730,22 @@ 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;
+
+	ddata->reset_gpio = of_get_gpio(np, 0);
+
+	ddata->in = omapdss_of_find_source_for_first_ep(np);
+	if (IS_ERR(ddata->in)) {
+		dev_err(&spi->dev, "failed to find video source\n");
+		return PTR_ERR(ddata->in);
+	}
+
+	return 0;
+}
+
 static int acx565akm_probe(struct spi_device *spi)
 {
 	struct panel_drv_data *ddata;
@@ -753,7 +773,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;
 	}
 
@@ -864,10 +889,16 @@ static int acx565akm_remove(struct spi_device *spi)
 	return 0;
 }
 
+static const struct of_device_id acx565akm_of_match[] = {
+	{ .compatible = "omapdss,sony,acx565akm", },
+	{},
+};
+
 static struct spi_driver acx565akm_driver = {
 	.driver = {
 		.name	= "acx565akm",
 		.owner	= THIS_MODULE,
+		.of_match_table = acx565akm_of_match,
 	},
 	.probe	= acx565akm_probe,
 	.remove	= acx565akm_remove,
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 22/41] ARM: omap2.dtsi: add omapdss information
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT data for OMAP2 display subsystem, which contains the following
blocks:

dss - the wrapper/glue for the display modules
dispc - display controller
rfbi - MIPI DBI encoder
venc - analog TV encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap2.dtsi | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi
index d0c5b37e248c..af3531cc4576 100644
--- a/arch/arm/boot/dts/omap2.dtsi
+++ b/arch/arm/boot/dts/omap2.dtsi
@@ -271,5 +271,36 @@
 			ti,hwmods = "timer12";
 			ti,timer-pwm;
 		};
+
+		dss: dss@48050000 {
+			compatible = "ti,omap2-dss", "simple-bus";
+			reg = <0x48050000 0x400>;
+			status = "disabled";
+			ti,hwmods = "dss_core";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			dispc@48050400 {
+				compatible = "ti,omap2-dispc";
+				reg = <0x48050400 0x400>;
+				interrupts = <25>;
+				ti,hwmods = "dss_dispc";
+			};
+
+			rfbi: encoder@48050800 {
+				compatible = "ti,omap2-rfbi";
+				reg = <0x48050800 0x400>;
+				status = "disabled";
+				ti,hwmods = "dss_rfbi";
+			};
+
+			venc: encoder@48050c00 {
+				compatible = "ti,omap2-venc";
+				reg = <0x48050c00 0x400>;
+				status = "disabled";
+				ti,hwmods = "dss_venc";
+			};
+		};
 	};
 };
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 22/41] ARM: omap2.dtsi: add omapdss information
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP2 display subsystem, which contains the following
blocks:

dss - the wrapper/glue for the display modules
dispc - display controller
rfbi - MIPI DBI encoder
venc - analog TV encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap2.dtsi | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi
index d0c5b37e248c..af3531cc4576 100644
--- a/arch/arm/boot/dts/omap2.dtsi
+++ b/arch/arm/boot/dts/omap2.dtsi
@@ -271,5 +271,36 @@
 			ti,hwmods = "timer12";
 			ti,timer-pwm;
 		};
+
+		dss: dss@48050000 {
+			compatible = "ti,omap2-dss", "simple-bus";
+			reg = <0x48050000 0x400>;
+			status = "disabled";
+			ti,hwmods = "dss_core";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			dispc@48050400 {
+				compatible = "ti,omap2-dispc";
+				reg = <0x48050400 0x400>;
+				interrupts = <25>;
+				ti,hwmods = "dss_dispc";
+			};
+
+			rfbi: encoder@48050800 {
+				compatible = "ti,omap2-rfbi";
+				reg = <0x48050800 0x400>;
+				status = "disabled";
+				ti,hwmods = "dss_rfbi";
+			};
+
+			venc: encoder@48050c00 {
+				compatible = "ti,omap2-venc";
+				reg = <0x48050c00 0x400>;
+				status = "disabled";
+				ti,hwmods = "dss_venc";
+			};
+		};
 	};
 };
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 22/41] ARM: omap2.dtsi: add omapdss information
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP2 display subsystem, which contains the following
blocks:

dss - the wrapper/glue for the display modules
dispc - display controller
rfbi - MIPI DBI encoder
venc - analog TV encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap2.dtsi | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi
index d0c5b37e248c..af3531cc4576 100644
--- a/arch/arm/boot/dts/omap2.dtsi
+++ b/arch/arm/boot/dts/omap2.dtsi
@@ -271,5 +271,36 @@
 			ti,hwmods = "timer12";
 			ti,timer-pwm;
 		};
+
+		dss: dss at 48050000 {
+			compatible = "ti,omap2-dss", "simple-bus";
+			reg = <0x48050000 0x400>;
+			status = "disabled";
+			ti,hwmods = "dss_core";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			dispc at 48050400 {
+				compatible = "ti,omap2-dispc";
+				reg = <0x48050400 0x400>;
+				interrupts = <25>;
+				ti,hwmods = "dss_dispc";
+			};
+
+			rfbi: encoder at 48050800 {
+				compatible = "ti,omap2-rfbi";
+				reg = <0x48050800 0x400>;
+				status = "disabled";
+				ti,hwmods = "dss_rfbi";
+			};
+
+			venc: encoder at 48050c00 {
+				compatible = "ti,omap2-venc";
+				reg = <0x48050c00 0x400>;
+				status = "disabled";
+				ti,hwmods = "dss_venc";
+			};
+		};
 	};
 };
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 23/41] ARM: omap3.dtsi: add omapdss information
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT data for OMAP3 display subsystem, which contains the following
blocks:

dss - the wrapper/glue for the display modules
dispc - display controller
dsi - MIPI DSI encoder
rfbi - MIPI DBI encoder
venc - analog TV encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index daabf99d402a..d942f9a4723f 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -630,5 +630,47 @@
 			num-eps = <16>;
 			ram-bits = <12>;
 		};
+
+		dss: dss@48050000 {
+			compatible = "ti,omap3-dss", "simple-bus";
+			reg = <0x48050000 0x200>;
+			status = "disabled";
+			ti,hwmods = "dss_core";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			dispc@48050400 {
+				compatible = "ti,omap3-dispc";
+				reg = <0x48050400 0x400>;
+				interrupts = <25>;
+				ti,hwmods = "dss_dispc";
+			};
+
+			dsi: encoder@4804fc00 {
+				compatible = "ti,omap3-dsi";
+				reg = <0x4804fc00 0x200>,
+				      <0x4804fe00 0x40>,
+				      <0x4804ff00 0x20>;
+				reg-names = "proto", "phy", "pll";
+				interrupts = <25>;
+				status = "disabled";
+				ti,hwmods = "dss_dsi1";
+			};
+
+			rfbi: encoder@48050800 {
+				compatible = "ti,omap3-rfbi";
+				reg = <0x48050800 0x100>;
+				status = "disabled";
+				ti,hwmods = "dss_rfbi";
+			};
+
+			venc: encoder@48050c00 {
+				compatible = "ti,omap3-venc";
+				reg = <0x48050c00 0x100>;
+				status = "disabled";
+				ti,hwmods = "dss_venc";
+			};
+		};
 	};
 };
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 23/41] ARM: omap3.dtsi: add omapdss information
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP3 display subsystem, which contains the following
blocks:

dss - the wrapper/glue for the display modules
dispc - display controller
dsi - MIPI DSI encoder
rfbi - MIPI DBI encoder
venc - analog TV encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index daabf99d402a..d942f9a4723f 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -630,5 +630,47 @@
 			num-eps = <16>;
 			ram-bits = <12>;
 		};
+
+		dss: dss@48050000 {
+			compatible = "ti,omap3-dss", "simple-bus";
+			reg = <0x48050000 0x200>;
+			status = "disabled";
+			ti,hwmods = "dss_core";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			dispc@48050400 {
+				compatible = "ti,omap3-dispc";
+				reg = <0x48050400 0x400>;
+				interrupts = <25>;
+				ti,hwmods = "dss_dispc";
+			};
+
+			dsi: encoder@4804fc00 {
+				compatible = "ti,omap3-dsi";
+				reg = <0x4804fc00 0x200>,
+				      <0x4804fe00 0x40>,
+				      <0x4804ff00 0x20>;
+				reg-names = "proto", "phy", "pll";
+				interrupts = <25>;
+				status = "disabled";
+				ti,hwmods = "dss_dsi1";
+			};
+
+			rfbi: encoder@48050800 {
+				compatible = "ti,omap3-rfbi";
+				reg = <0x48050800 0x100>;
+				status = "disabled";
+				ti,hwmods = "dss_rfbi";
+			};
+
+			venc: encoder@48050c00 {
+				compatible = "ti,omap3-venc";
+				reg = <0x48050c00 0x100>;
+				status = "disabled";
+				ti,hwmods = "dss_venc";
+			};
+		};
 	};
 };
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 23/41] ARM: omap3.dtsi: add omapdss information
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP3 display subsystem, which contains the following
blocks:

dss - the wrapper/glue for the display modules
dispc - display controller
dsi - MIPI DSI encoder
rfbi - MIPI DBI encoder
venc - analog TV encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index daabf99d402a..d942f9a4723f 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -630,5 +630,47 @@
 			num-eps = <16>;
 			ram-bits = <12>;
 		};
+
+		dss: dss at 48050000 {
+			compatible = "ti,omap3-dss", "simple-bus";
+			reg = <0x48050000 0x200>;
+			status = "disabled";
+			ti,hwmods = "dss_core";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			dispc at 48050400 {
+				compatible = "ti,omap3-dispc";
+				reg = <0x48050400 0x400>;
+				interrupts = <25>;
+				ti,hwmods = "dss_dispc";
+			};
+
+			dsi: encoder at 4804fc00 {
+				compatible = "ti,omap3-dsi";
+				reg = <0x4804fc00 0x200>,
+				      <0x4804fe00 0x40>,
+				      <0x4804ff00 0x20>;
+				reg-names = "proto", "phy", "pll";
+				interrupts = <25>;
+				status = "disabled";
+				ti,hwmods = "dss_dsi1";
+			};
+
+			rfbi: encoder at 48050800 {
+				compatible = "ti,omap3-rfbi";
+				reg = <0x48050800 0x100>;
+				status = "disabled";
+				ti,hwmods = "dss_rfbi";
+			};
+
+			venc: encoder at 48050c00 {
+				compatible = "ti,omap3-venc";
+				reg = <0x48050c00 0x100>;
+				status = "disabled";
+				ti,hwmods = "dss_venc";
+			};
+		};
 	};
 };
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 24/41] ARM: omap4.dtsi: add omapdss information
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT data for OMAP4 display subsystem, which contains the following
blocks:

dss - the wrapper/glue for the display modules
dispc - display controller
dsi - MIPI DSI encoder (two independent modules)
rfbi - MIPI DBI encoder
venc - analog TV encoder
hdmi - HDMI encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap4.dtsi | 65 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index a1e05853afcd..19498b2fa316 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -705,5 +705,70 @@
 			dmas = <&sdma 117>, <&sdma 116>;
 			dma-names = "tx", "rx";
 		};
+
+		dss: dss@58000000 {
+			compatible = "ti,omap4-dss", "simple-bus";
+			reg = <0x58000000 0x80>;
+			status = "disabled";
+			ti,hwmods = "dss_core";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			dispc@58001000 {
+				compatible = "ti,omap4-dispc";
+				reg = <0x58001000 0x1000>;
+				interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+				ti,hwmods = "dss_dispc";
+			};
+
+			rfbi: encoder@58002000  {
+				compatible = "ti,omap4-rfbi";
+				reg = <0x58002000 0x1000>;
+				status = "disabled";
+				ti,hwmods = "dss_rfbi";
+			};
+
+			venc: encoder@58003000 {
+				compatible = "ti,omap4-venc";
+				reg = <0x58003000 0x1000>;
+				status = "disabled";
+				ti,hwmods = "dss_venc";
+			};
+
+			dsi1: encoder@58004000 {
+				compatible = "ti,omap4-dsi";
+				reg = <0x58004000 0x200>,
+				      <0x58004200 0x40>,
+				      <0x58004300 0x20>;
+				reg-names = "proto", "phy", "pll";
+				interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+				ti,hwmods = "dss_dsi1";
+			};
+
+			dsi2: encoder@58005000 {
+				compatible = "ti,omap4-dsi";
+				reg = <0x58005000 0x200>,
+				      <0x58005200 0x40>,
+				      <0x58005300 0x20>;
+				reg-names = "proto", "phy", "pll";
+				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+				ti,hwmods = "dss_dsi2";
+			};
+
+			hdmi: encoder@58006000 {
+				compatible = "ti,omap4-hdmi";
+				reg = <0x58006000 0x200>,
+				      <0x58006200 0x100>,
+				      <0x58006300 0x100>,
+				      <0x58006400 0x1000>;
+				reg-names = "wp", "pll", "phy", "core";
+				interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+				ti,hwmods = "dss_hdmi";
+			};
+		};
 	};
 };
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 24/41] ARM: omap4.dtsi: add omapdss information
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP4 display subsystem, which contains the following
blocks:

dss - the wrapper/glue for the display modules
dispc - display controller
dsi - MIPI DSI encoder (two independent modules)
rfbi - MIPI DBI encoder
venc - analog TV encoder
hdmi - HDMI encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap4.dtsi | 65 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index a1e05853afcd..19498b2fa316 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -705,5 +705,70 @@
 			dmas = <&sdma 117>, <&sdma 116>;
 			dma-names = "tx", "rx";
 		};
+
+		dss: dss@58000000 {
+			compatible = "ti,omap4-dss", "simple-bus";
+			reg = <0x58000000 0x80>;
+			status = "disabled";
+			ti,hwmods = "dss_core";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			dispc@58001000 {
+				compatible = "ti,omap4-dispc";
+				reg = <0x58001000 0x1000>;
+				interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+				ti,hwmods = "dss_dispc";
+			};
+
+			rfbi: encoder@58002000  {
+				compatible = "ti,omap4-rfbi";
+				reg = <0x58002000 0x1000>;
+				status = "disabled";
+				ti,hwmods = "dss_rfbi";
+			};
+
+			venc: encoder@58003000 {
+				compatible = "ti,omap4-venc";
+				reg = <0x58003000 0x1000>;
+				status = "disabled";
+				ti,hwmods = "dss_venc";
+			};
+
+			dsi1: encoder@58004000 {
+				compatible = "ti,omap4-dsi";
+				reg = <0x58004000 0x200>,
+				      <0x58004200 0x40>,
+				      <0x58004300 0x20>;
+				reg-names = "proto", "phy", "pll";
+				interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+				ti,hwmods = "dss_dsi1";
+			};
+
+			dsi2: encoder@58005000 {
+				compatible = "ti,omap4-dsi";
+				reg = <0x58005000 0x200>,
+				      <0x58005200 0x40>,
+				      <0x58005300 0x20>;
+				reg-names = "proto", "phy", "pll";
+				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+				ti,hwmods = "dss_dsi2";
+			};
+
+			hdmi: encoder@58006000 {
+				compatible = "ti,omap4-hdmi";
+				reg = <0x58006000 0x200>,
+				      <0x58006200 0x100>,
+				      <0x58006300 0x100>,
+				      <0x58006400 0x1000>;
+				reg-names = "wp", "pll", "phy", "core";
+				interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+				ti,hwmods = "dss_hdmi";
+			};
+		};
 	};
 };
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 24/41] ARM: omap4.dtsi: add omapdss information
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP4 display subsystem, which contains the following
blocks:

dss - the wrapper/glue for the display modules
dispc - display controller
dsi - MIPI DSI encoder (two independent modules)
rfbi - MIPI DBI encoder
venc - analog TV encoder
hdmi - HDMI encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap4.dtsi | 65 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index a1e05853afcd..19498b2fa316 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -705,5 +705,70 @@
 			dmas = <&sdma 117>, <&sdma 116>;
 			dma-names = "tx", "rx";
 		};
+
+		dss: dss at 58000000 {
+			compatible = "ti,omap4-dss", "simple-bus";
+			reg = <0x58000000 0x80>;
+			status = "disabled";
+			ti,hwmods = "dss_core";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			dispc at 58001000 {
+				compatible = "ti,omap4-dispc";
+				reg = <0x58001000 0x1000>;
+				interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+				ti,hwmods = "dss_dispc";
+			};
+
+			rfbi: encoder at 58002000  {
+				compatible = "ti,omap4-rfbi";
+				reg = <0x58002000 0x1000>;
+				status = "disabled";
+				ti,hwmods = "dss_rfbi";
+			};
+
+			venc: encoder at 58003000 {
+				compatible = "ti,omap4-venc";
+				reg = <0x58003000 0x1000>;
+				status = "disabled";
+				ti,hwmods = "dss_venc";
+			};
+
+			dsi1: encoder at 58004000 {
+				compatible = "ti,omap4-dsi";
+				reg = <0x58004000 0x200>,
+				      <0x58004200 0x40>,
+				      <0x58004300 0x20>;
+				reg-names = "proto", "phy", "pll";
+				interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+				ti,hwmods = "dss_dsi1";
+			};
+
+			dsi2: encoder at 58005000 {
+				compatible = "ti,omap4-dsi";
+				reg = <0x58005000 0x200>,
+				      <0x58005200 0x40>,
+				      <0x58005300 0x20>;
+				reg-names = "proto", "phy", "pll";
+				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+				ti,hwmods = "dss_dsi2";
+			};
+
+			hdmi: encoder at 58006000 {
+				compatible = "ti,omap4-hdmi";
+				reg = <0x58006000 0x200>,
+				      <0x58006200 0x100>,
+				      <0x58006300 0x100>,
+				      <0x58006400 0x1000>;
+				reg-names = "wp", "pll", "phy", "core";
+				interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+				ti,hwmods = "dss_hdmi";
+			};
+		};
 	};
 };
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 25/41] ARM: omap4-panda.dts: add display information
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT data for OMAP4 Pandaboard. The board has the following displays:

dvi: uses TFP410 encoder to convert DPI to DVI
hdmi: OMAP HDMI output with TPD12S015 ESD/level shifter

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap4-panda-common.dtsi | 119 +++++++++++++++++++++++++++++-
 1 file changed, 115 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index 88c6a05cab41..20aa18ff4823 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -16,6 +16,11 @@
 		reg = <0x80000000 0x40000000>; /* 1 GB */
 	};
 
+	aliases {
+		display0 = &dvi0;
+		display1 = &hdmi0;
+	};
+
 	leds: leds {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
@@ -104,6 +109,87 @@
 		startup-delay-us = <70000>;
 		enable-active-high;
 	};
+
+	tfp410: encoder@0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;	/* 0, power-down */
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tfp410_pins>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tfp410_in: endpoint@0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tfp410_out: endpoint@0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector@0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+
+	tpd12s015: encoder@1 {
+		compatible = "ti,tpd12s015";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpd12s015_pins>;
+
+		gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+			<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+			<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tpd12s015_in: endpoint@0 {
+					remote-endpoint = <&hdmi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tpd12s015_out: endpoint@0 {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
+		};
+	};
+
+	hdmi0: connector@1 {
+		compatible = "hdmi-connector";
+		label = "hdmi";
+
+		hdmi_connector_in: endpoint {
+			remote-endpoint = <&tpd12s015_out>;
+		};
+	};
 };
 
 &omap4_pmx_core {
@@ -112,10 +198,6 @@
 			&twl6040_pins
 			&mcpdm_pins
 			&mcbsp1_pins
-			&dss_dpi_pins
-			&tfp410_pins
-			&dss_hdmi_pins
-			&tpd12s015_pins
 			&hsusbb1_pins
 	>;
 
@@ -409,3 +491,32 @@
 &usbhsehci {
 	phys = <&hsusb1_phy>;
 };
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+&dsi2 {
+	status = "ok";
+	vdd-supply = <&vcxio>;
+};
+
+&hdmi {
+	status = "ok";
+	vdda-supply = <&vdac>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_hdmi_pins>;
+
+	hdmi_out: endpoint {
+		remote-endpoint = <&tpd12s015_in>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 25/41] ARM: omap4-panda.dts: add display information
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP4 Pandaboard. The board has the following displays:

dvi: uses TFP410 encoder to convert DPI to DVI
hdmi: OMAP HDMI output with TPD12S015 ESD/level shifter

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap4-panda-common.dtsi | 119 +++++++++++++++++++++++++++++-
 1 file changed, 115 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index 88c6a05cab41..20aa18ff4823 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -16,6 +16,11 @@
 		reg = <0x80000000 0x40000000>; /* 1 GB */
 	};
 
+	aliases {
+		display0 = &dvi0;
+		display1 = &hdmi0;
+	};
+
 	leds: leds {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
@@ -104,6 +109,87 @@
 		startup-delay-us = <70000>;
 		enable-active-high;
 	};
+
+	tfp410: encoder@0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;	/* 0, power-down */
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tfp410_pins>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tfp410_in: endpoint@0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tfp410_out: endpoint@0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector@0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+
+	tpd12s015: encoder@1 {
+		compatible = "ti,tpd12s015";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpd12s015_pins>;
+
+		gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+			<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+			<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tpd12s015_in: endpoint@0 {
+					remote-endpoint = <&hdmi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tpd12s015_out: endpoint@0 {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
+		};
+	};
+
+	hdmi0: connector@1 {
+		compatible = "hdmi-connector";
+		label = "hdmi";
+
+		hdmi_connector_in: endpoint {
+			remote-endpoint = <&tpd12s015_out>;
+		};
+	};
 };
 
 &omap4_pmx_core {
@@ -112,10 +198,6 @@
 			&twl6040_pins
 			&mcpdm_pins
 			&mcbsp1_pins
-			&dss_dpi_pins
-			&tfp410_pins
-			&dss_hdmi_pins
-			&tpd12s015_pins
 			&hsusbb1_pins
 	>;
 
@@ -409,3 +491,32 @@
 &usbhsehci {
 	phys = <&hsusb1_phy>;
 };
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+&dsi2 {
+	status = "ok";
+	vdd-supply = <&vcxio>;
+};
+
+&hdmi {
+	status = "ok";
+	vdda-supply = <&vdac>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_hdmi_pins>;
+
+	hdmi_out: endpoint {
+		remote-endpoint = <&tpd12s015_in>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 25/41] ARM: omap4-panda.dts: add display information
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP4 Pandaboard. The board has the following displays:

dvi: uses TFP410 encoder to convert DPI to DVI
hdmi: OMAP HDMI output with TPD12S015 ESD/level shifter

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap4-panda-common.dtsi | 119 +++++++++++++++++++++++++++++-
 1 file changed, 115 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index 88c6a05cab41..20aa18ff4823 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -16,6 +16,11 @@
 		reg = <0x80000000 0x40000000>; /* 1 GB */
 	};
 
+	aliases {
+		display0 = &dvi0;
+		display1 = &hdmi0;
+	};
+
 	leds: leds {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
@@ -104,6 +109,87 @@
 		startup-delay-us = <70000>;
 		enable-active-high;
 	};
+
+	tfp410: encoder at 0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;	/* 0, power-down */
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tfp410_pins>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				tfp410_in: endpoint at 0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				tfp410_out: endpoint at 0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector at 0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+
+	tpd12s015: encoder at 1 {
+		compatible = "ti,tpd12s015";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpd12s015_pins>;
+
+		gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+			<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+			<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				tpd12s015_in: endpoint at 0 {
+					remote-endpoint = <&hdmi_out>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				tpd12s015_out: endpoint at 0 {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
+		};
+	};
+
+	hdmi0: connector at 1 {
+		compatible = "hdmi-connector";
+		label = "hdmi";
+
+		hdmi_connector_in: endpoint {
+			remote-endpoint = <&tpd12s015_out>;
+		};
+	};
 };
 
 &omap4_pmx_core {
@@ -112,10 +198,6 @@
 			&twl6040_pins
 			&mcpdm_pins
 			&mcbsp1_pins
-			&dss_dpi_pins
-			&tfp410_pins
-			&dss_hdmi_pins
-			&tpd12s015_pins
 			&hsusbb1_pins
 	>;
 
@@ -409,3 +491,32 @@
 &usbhsehci {
 	phys = <&hsusb1_phy>;
 };
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+&dsi2 {
+	status = "ok";
+	vdd-supply = <&vcxio>;
+};
+
+&hdmi {
+	status = "ok";
+	vdda-supply = <&vdac>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_hdmi_pins>;
+
+	hdmi_out: endpoint {
+		remote-endpoint = <&tpd12s015_in>;
+	};
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 26/41] ARM: omap4-sdp.dts: add display information
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56     ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT data for OMAP4 SDP board. The board has the following displays:

lcd0: a command mode DSI panel connected to OMAP DSI1 encoder
lcd1: a command mode DSI panel connected to OMAP DSI2 encoder
hdmi: OMAP HDMI output with TPD12S015 ESD/level shifter

Signed-off-by: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/omap4-sdp.dts | 107 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 105 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index dbc81fb6ef03..cf9f6cbbd349 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -19,6 +19,12 @@
 		reg = <0x80000000 0x40000000>; /* 1 GB */
 	};
 
+	aliases {
+		display0 = &lcd0;
+		display1 = &lcd1;
+		display2 = &hdmi0;
+	};
+
 	vdd_eth: fixedregulator-vdd-eth {
 		compatible = "regulator-fixed";
 		regulator-name = "VDD_ETH";
@@ -153,6 +159,47 @@
 		startup-delay-us = <70000>;
 		enable-active-high;
 	};
+
+	tpd12s015: encoder@0 {
+		compatible = "ti,tpd12s015";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpd12s015_pins>;
+
+		gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+			<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+			<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tpd12s015_in: endpoint@0 {
+					remote-endpoint = <&hdmi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tpd12s015_out: endpoint@0 {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
+		};
+	};
+
+	hdmi0: connector@0 {
+		compatible = "hdmi-connector";
+		label = "hdmi";
+
+		hdmi_connector_in: endpoint {
+			remote-endpoint = <&tpd12s015_out>;
+		};
+	};
 };
 
 &omap4_pmx_core {
@@ -163,8 +210,6 @@
 			&dmic_pins
 			&mcbsp1_pins
 			&mcbsp2_pins
-			&dss_hdmi_pins
-			&tpd12s015_pins
 	>;
 
 	uart2_pins: pinmux_uart2_pins {
@@ -550,3 +595,61 @@
 	mode = <3>;
 	power = <50>;
 };
+
+&dss {
+	status = "ok";
+};
+
+&dsi1 {
+	status = "ok";
+	vdd-supply = <&vcxio>;
+
+	dsi1_out_ep: endpoint {
+		remote-endpoint = <&lcd0_in>;
+		lanes = <0 1 2 3 4 5>;
+	};
+
+	lcd0: display {
+		compatible = "tpo,taal", "panel-dsi-cm";
+		label = "lcd0";
+
+		gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>;	/* 102, reset */
+
+		lcd0_in: endpoint {
+			remote-endpoint = <&dsi1_out_ep>;
+		};
+	};
+};
+
+&dsi2 {
+	status = "ok";
+	vdd-supply = <&vcxio>;
+
+	dsi2_out_ep: endpoint {
+		remote-endpoint = <&lcd1_in>;
+		lanes = <0 1 2 3 4 5>;
+	};
+
+	lcd1: display {
+		compatible = "tpo,taal", "panel-dsi-cm";
+		label = "lcd1";
+
+		gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>;	/* 104, reset */
+
+		lcd1_in: endpoint {
+			remote-endpoint = <&dsi2_out_ep>;
+		};
+	};
+};
+
+&hdmi {
+	status = "ok";
+	vdda-supply = <&vdac>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_hdmi_pins>;
+
+	hdmi_out: endpoint {
+		remote-endpoint = <&tpd12s015_in>;
+	};
+};
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 26/41] ARM: omap4-sdp.dts: add display information
@ 2014-01-21 10:56     ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP4 SDP board. The board has the following displays:

lcd0: a command mode DSI panel connected to OMAP DSI1 encoder
lcd1: a command mode DSI panel connected to OMAP DSI2 encoder
hdmi: OMAP HDMI output with TPD12S015 ESD/level shifter

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap4-sdp.dts | 107 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 105 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index dbc81fb6ef03..cf9f6cbbd349 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -19,6 +19,12 @@
 		reg = <0x80000000 0x40000000>; /* 1 GB */
 	};
 
+	aliases {
+		display0 = &lcd0;
+		display1 = &lcd1;
+		display2 = &hdmi0;
+	};
+
 	vdd_eth: fixedregulator-vdd-eth {
 		compatible = "regulator-fixed";
 		regulator-name = "VDD_ETH";
@@ -153,6 +159,47 @@
 		startup-delay-us = <70000>;
 		enable-active-high;
 	};
+
+	tpd12s015: encoder@0 {
+		compatible = "ti,tpd12s015";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpd12s015_pins>;
+
+		gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+			<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+			<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tpd12s015_in: endpoint@0 {
+					remote-endpoint = <&hdmi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tpd12s015_out: endpoint@0 {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
+		};
+	};
+
+	hdmi0: connector@0 {
+		compatible = "hdmi-connector";
+		label = "hdmi";
+
+		hdmi_connector_in: endpoint {
+			remote-endpoint = <&tpd12s015_out>;
+		};
+	};
 };
 
 &omap4_pmx_core {
@@ -163,8 +210,6 @@
 			&dmic_pins
 			&mcbsp1_pins
 			&mcbsp2_pins
-			&dss_hdmi_pins
-			&tpd12s015_pins
 	>;
 
 	uart2_pins: pinmux_uart2_pins {
@@ -550,3 +595,61 @@
 	mode = <3>;
 	power = <50>;
 };
+
+&dss {
+	status = "ok";
+};
+
+&dsi1 {
+	status = "ok";
+	vdd-supply = <&vcxio>;
+
+	dsi1_out_ep: endpoint {
+		remote-endpoint = <&lcd0_in>;
+		lanes = <0 1 2 3 4 5>;
+	};
+
+	lcd0: display {
+		compatible = "tpo,taal", "panel-dsi-cm";
+		label = "lcd0";
+
+		gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>;	/* 102, reset */
+
+		lcd0_in: endpoint {
+			remote-endpoint = <&dsi1_out_ep>;
+		};
+	};
+};
+
+&dsi2 {
+	status = "ok";
+	vdd-supply = <&vcxio>;
+
+	dsi2_out_ep: endpoint {
+		remote-endpoint = <&lcd1_in>;
+		lanes = <0 1 2 3 4 5>;
+	};
+
+	lcd1: display {
+		compatible = "tpo,taal", "panel-dsi-cm";
+		label = "lcd1";
+
+		gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>;	/* 104, reset */
+
+		lcd1_in: endpoint {
+			remote-endpoint = <&dsi2_out_ep>;
+		};
+	};
+};
+
+&hdmi {
+	status = "ok";
+	vdda-supply = <&vdac>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_hdmi_pins>;
+
+	hdmi_out: endpoint {
+		remote-endpoint = <&tpd12s015_in>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 26/41] ARM: omap4-sdp.dts: add display information
@ 2014-01-21 10:56     ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP4 SDP board. The board has the following displays:

lcd0: a command mode DSI panel connected to OMAP DSI1 encoder
lcd1: a command mode DSI panel connected to OMAP DSI2 encoder
hdmi: OMAP HDMI output with TPD12S015 ESD/level shifter

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap4-sdp.dts | 107 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 105 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index dbc81fb6ef03..cf9f6cbbd349 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -19,6 +19,12 @@
 		reg = <0x80000000 0x40000000>; /* 1 GB */
 	};
 
+	aliases {
+		display0 = &lcd0;
+		display1 = &lcd1;
+		display2 = &hdmi0;
+	};
+
 	vdd_eth: fixedregulator-vdd-eth {
 		compatible = "regulator-fixed";
 		regulator-name = "VDD_ETH";
@@ -153,6 +159,47 @@
 		startup-delay-us = <70000>;
 		enable-active-high;
 	};
+
+	tpd12s015: encoder at 0 {
+		compatible = "ti,tpd12s015";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpd12s015_pins>;
+
+		gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+			<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+			<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				tpd12s015_in: endpoint at 0 {
+					remote-endpoint = <&hdmi_out>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				tpd12s015_out: endpoint at 0 {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
+		};
+	};
+
+	hdmi0: connector at 0 {
+		compatible = "hdmi-connector";
+		label = "hdmi";
+
+		hdmi_connector_in: endpoint {
+			remote-endpoint = <&tpd12s015_out>;
+		};
+	};
 };
 
 &omap4_pmx_core {
@@ -163,8 +210,6 @@
 			&dmic_pins
 			&mcbsp1_pins
 			&mcbsp2_pins
-			&dss_hdmi_pins
-			&tpd12s015_pins
 	>;
 
 	uart2_pins: pinmux_uart2_pins {
@@ -550,3 +595,61 @@
 	mode = <3>;
 	power = <50>;
 };
+
+&dss {
+	status = "ok";
+};
+
+&dsi1 {
+	status = "ok";
+	vdd-supply = <&vcxio>;
+
+	dsi1_out_ep: endpoint {
+		remote-endpoint = <&lcd0_in>;
+		lanes = <0 1 2 3 4 5>;
+	};
+
+	lcd0: display {
+		compatible = "tpo,taal", "panel-dsi-cm";
+		label = "lcd0";
+
+		gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>;	/* 102, reset */
+
+		lcd0_in: endpoint {
+			remote-endpoint = <&dsi1_out_ep>;
+		};
+	};
+};
+
+&dsi2 {
+	status = "ok";
+	vdd-supply = <&vcxio>;
+
+	dsi2_out_ep: endpoint {
+		remote-endpoint = <&lcd1_in>;
+		lanes = <0 1 2 3 4 5>;
+	};
+
+	lcd1: display {
+		compatible = "tpo,taal", "panel-dsi-cm";
+		label = "lcd1";
+
+		gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>;	/* 104, reset */
+
+		lcd1_in: endpoint {
+			remote-endpoint = <&dsi2_out_ep>;
+		};
+	};
+};
+
+&hdmi {
+	status = "ok";
+	vdda-supply = <&vdac>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_hdmi_pins>;
+
+	hdmi_out: endpoint {
+		remote-endpoint = <&tpd12s015_in>;
+	};
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 27/41] ARM: omap3-beagle.dts: add display information
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:56   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT data for OMAP3 Beagle board. The board has the following displays:

dvi: uses TFP410 encoder to convert DPI to DVI
tv: analog svideo

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3-beagle.dts | 116 +++++++++++++++++++++++++++++++++++++
 1 file changed, 116 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
index 3ba4a625ea5b..2b8efe355734 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -24,6 +24,11 @@
 		reg = <0x80000000 0x10000000>; /* 256 MB */
 	};
 
+	aliases {
+		display0 = &dvi0;
+		display1 = &tv0;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 		pmu_stat {
@@ -80,6 +85,55 @@
 		};
 
 	};
+
+	tfp410: encoder@0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio6 10 GPIO_ACTIVE_LOW>;	/* 170, power-down */
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tfp410_pins>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tfp410_in: endpoint@0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tfp410_out: endpoint@0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector@0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+
+	tv0: connector@1 {
+		compatible = "svideo-connector";
+		label = "tv";
+
+		tv_connector_in: endpoint {
+			remote-endpoint = <&venc_out>;
+		};
+	};
 };
 
 &omap3_pmx_wkup {
@@ -119,6 +173,45 @@
 			0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */
 		>;
 	};
+
+	tfp410_pins: pinmux_tfp410_pins {
+		pinctrl-single,pins = <
+			0x194 (PIN_OUTPUT | MUX_MODE4)	/* hdq_sio.gpio_170 */
+		>;
+	};
+
+	dss_dpi_pins: pinmux_dss_dpi_pins {
+		pinctrl-single,pins = <
+			0x0a4 (PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
+			0x0a6 (PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
+			0x0a8 (PIN_OUTPUT | MUX_MODE0)   /* dss_vsync.dss_vsync */
+			0x0aa (PIN_OUTPUT | MUX_MODE0)   /* dss_acbias.dss_acbias */
+			0x0ac (PIN_OUTPUT | MUX_MODE0)   /* dss_data0.dss_data0 */
+			0x0ae (PIN_OUTPUT | MUX_MODE0)   /* dss_data1.dss_data1 */
+			0x0b0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data2.dss_data2 */
+			0x0b2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data3.dss_data3 */
+			0x0b4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data4.dss_data4 */
+			0x0b6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data5.dss_data5 */
+			0x0b8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data6.dss_data6 */
+			0x0ba (PIN_OUTPUT | MUX_MODE0)   /* dss_data7.dss_data7 */
+			0x0bc (PIN_OUTPUT | MUX_MODE0)   /* dss_data8.dss_data8 */
+			0x0be (PIN_OUTPUT | MUX_MODE0)   /* dss_data9.dss_data9 */
+			0x0c0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data10.dss_data10 */
+			0x0c2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data11.dss_data11 */
+			0x0c4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data12.dss_data12 */
+			0x0c6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data13.dss_data13 */
+			0x0c8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data14.dss_data14 */
+			0x0ca (PIN_OUTPUT | MUX_MODE0)   /* dss_data15.dss_data15 */
+			0x0cc (PIN_OUTPUT | MUX_MODE0)   /* dss_data16.dss_data16 */
+			0x0ce (PIN_OUTPUT | MUX_MODE0)   /* dss_data17.dss_data17 */
+			0x0d0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data18.dss_data18 */
+			0x0d2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data19.dss_data19 */
+			0x0d4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data20.dss_data20 */
+			0x0d6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data21.dss_data21 */
+			0x0d8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data22.dss_data22 */
+			0x0da (PIN_OUTPUT | MUX_MODE0)   /* dss_data23.dss_data23 */
+		>;
+	};
 };
 
 &i2c1 {
@@ -199,3 +292,26 @@
 	regulator-max-microvolt = <1800000>;
 	regulator-always-on;
 };
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+&venc {
+	status = "ok";
+
+	vdda-supply = <&vdac>;
+
+	venc_out: endpoint {
+		remote-endpoint = <&tv_connector_in>;
+		ti,channels = <2>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 27/41] ARM: omap3-beagle.dts: add display information
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP3 Beagle board. The board has the following displays:

dvi: uses TFP410 encoder to convert DPI to DVI
tv: analog svideo

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3-beagle.dts | 116 +++++++++++++++++++++++++++++++++++++
 1 file changed, 116 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
index 3ba4a625ea5b..2b8efe355734 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -24,6 +24,11 @@
 		reg = <0x80000000 0x10000000>; /* 256 MB */
 	};
 
+	aliases {
+		display0 = &dvi0;
+		display1 = &tv0;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 		pmu_stat {
@@ -80,6 +85,55 @@
 		};
 
 	};
+
+	tfp410: encoder@0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio6 10 GPIO_ACTIVE_LOW>;	/* 170, power-down */
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tfp410_pins>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tfp410_in: endpoint@0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tfp410_out: endpoint@0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector@0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+
+	tv0: connector@1 {
+		compatible = "svideo-connector";
+		label = "tv";
+
+		tv_connector_in: endpoint {
+			remote-endpoint = <&venc_out>;
+		};
+	};
 };
 
 &omap3_pmx_wkup {
@@ -119,6 +173,45 @@
 			0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */
 		>;
 	};
+
+	tfp410_pins: pinmux_tfp410_pins {
+		pinctrl-single,pins = <
+			0x194 (PIN_OUTPUT | MUX_MODE4)	/* hdq_sio.gpio_170 */
+		>;
+	};
+
+	dss_dpi_pins: pinmux_dss_dpi_pins {
+		pinctrl-single,pins = <
+			0x0a4 (PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
+			0x0a6 (PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
+			0x0a8 (PIN_OUTPUT | MUX_MODE0)   /* dss_vsync.dss_vsync */
+			0x0aa (PIN_OUTPUT | MUX_MODE0)   /* dss_acbias.dss_acbias */
+			0x0ac (PIN_OUTPUT | MUX_MODE0)   /* dss_data0.dss_data0 */
+			0x0ae (PIN_OUTPUT | MUX_MODE0)   /* dss_data1.dss_data1 */
+			0x0b0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data2.dss_data2 */
+			0x0b2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data3.dss_data3 */
+			0x0b4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data4.dss_data4 */
+			0x0b6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data5.dss_data5 */
+			0x0b8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data6.dss_data6 */
+			0x0ba (PIN_OUTPUT | MUX_MODE0)   /* dss_data7.dss_data7 */
+			0x0bc (PIN_OUTPUT | MUX_MODE0)   /* dss_data8.dss_data8 */
+			0x0be (PIN_OUTPUT | MUX_MODE0)   /* dss_data9.dss_data9 */
+			0x0c0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data10.dss_data10 */
+			0x0c2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data11.dss_data11 */
+			0x0c4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data12.dss_data12 */
+			0x0c6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data13.dss_data13 */
+			0x0c8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data14.dss_data14 */
+			0x0ca (PIN_OUTPUT | MUX_MODE0)   /* dss_data15.dss_data15 */
+			0x0cc (PIN_OUTPUT | MUX_MODE0)   /* dss_data16.dss_data16 */
+			0x0ce (PIN_OUTPUT | MUX_MODE0)   /* dss_data17.dss_data17 */
+			0x0d0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data18.dss_data18 */
+			0x0d2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data19.dss_data19 */
+			0x0d4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data20.dss_data20 */
+			0x0d6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data21.dss_data21 */
+			0x0d8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data22.dss_data22 */
+			0x0da (PIN_OUTPUT | MUX_MODE0)   /* dss_data23.dss_data23 */
+		>;
+	};
 };
 
 &i2c1 {
@@ -199,3 +292,26 @@
 	regulator-max-microvolt = <1800000>;
 	regulator-always-on;
 };
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+&venc {
+	status = "ok";
+
+	vdda-supply = <&vdac>;
+
+	venc_out: endpoint {
+		remote-endpoint = <&tv_connector_in>;
+		ti,channels = <2>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 27/41] ARM: omap3-beagle.dts: add display information
@ 2014-01-21 10:56   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP3 Beagle board. The board has the following displays:

dvi: uses TFP410 encoder to convert DPI to DVI
tv: analog svideo

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3-beagle.dts | 116 +++++++++++++++++++++++++++++++++++++
 1 file changed, 116 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
index 3ba4a625ea5b..2b8efe355734 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -24,6 +24,11 @@
 		reg = <0x80000000 0x10000000>; /* 256 MB */
 	};
 
+	aliases {
+		display0 = &dvi0;
+		display1 = &tv0;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 		pmu_stat {
@@ -80,6 +85,55 @@
 		};
 
 	};
+
+	tfp410: encoder at 0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio6 10 GPIO_ACTIVE_LOW>;	/* 170, power-down */
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tfp410_pins>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				tfp410_in: endpoint at 0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				tfp410_out: endpoint at 0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector at 0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+
+	tv0: connector at 1 {
+		compatible = "svideo-connector";
+		label = "tv";
+
+		tv_connector_in: endpoint {
+			remote-endpoint = <&venc_out>;
+		};
+	};
 };
 
 &omap3_pmx_wkup {
@@ -119,6 +173,45 @@
 			0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */
 		>;
 	};
+
+	tfp410_pins: pinmux_tfp410_pins {
+		pinctrl-single,pins = <
+			0x194 (PIN_OUTPUT | MUX_MODE4)	/* hdq_sio.gpio_170 */
+		>;
+	};
+
+	dss_dpi_pins: pinmux_dss_dpi_pins {
+		pinctrl-single,pins = <
+			0x0a4 (PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
+			0x0a6 (PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
+			0x0a8 (PIN_OUTPUT | MUX_MODE0)   /* dss_vsync.dss_vsync */
+			0x0aa (PIN_OUTPUT | MUX_MODE0)   /* dss_acbias.dss_acbias */
+			0x0ac (PIN_OUTPUT | MUX_MODE0)   /* dss_data0.dss_data0 */
+			0x0ae (PIN_OUTPUT | MUX_MODE0)   /* dss_data1.dss_data1 */
+			0x0b0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data2.dss_data2 */
+			0x0b2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data3.dss_data3 */
+			0x0b4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data4.dss_data4 */
+			0x0b6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data5.dss_data5 */
+			0x0b8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data6.dss_data6 */
+			0x0ba (PIN_OUTPUT | MUX_MODE0)   /* dss_data7.dss_data7 */
+			0x0bc (PIN_OUTPUT | MUX_MODE0)   /* dss_data8.dss_data8 */
+			0x0be (PIN_OUTPUT | MUX_MODE0)   /* dss_data9.dss_data9 */
+			0x0c0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data10.dss_data10 */
+			0x0c2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data11.dss_data11 */
+			0x0c4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data12.dss_data12 */
+			0x0c6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data13.dss_data13 */
+			0x0c8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data14.dss_data14 */
+			0x0ca (PIN_OUTPUT | MUX_MODE0)   /* dss_data15.dss_data15 */
+			0x0cc (PIN_OUTPUT | MUX_MODE0)   /* dss_data16.dss_data16 */
+			0x0ce (PIN_OUTPUT | MUX_MODE0)   /* dss_data17.dss_data17 */
+			0x0d0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data18.dss_data18 */
+			0x0d2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data19.dss_data19 */
+			0x0d4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data20.dss_data20 */
+			0x0d6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data21.dss_data21 */
+			0x0d8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data22.dss_data22 */
+			0x0da (PIN_OUTPUT | MUX_MODE0)   /* dss_data23.dss_data23 */
+		>;
+	};
 };
 
 &i2c1 {
@@ -199,3 +292,26 @@
 	regulator-max-microvolt = <1800000>;
 	regulator-always-on;
 };
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+&venc {
+	status = "ok";
+
+	vdda-supply = <&vdac>;
+
+	venc_out: endpoint {
+		remote-endpoint = <&tv_connector_in>;
+		ti,channels = <2>;
+	};
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 28/41] ARM: omap3-beagle-xm.dts: add display information
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT data for OMAP3 Beagle-xM board. The board has the following displays:

dvi: uses TFP410 encoder to convert DPI to DVI
tv: analog svideo

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3-beagle-xm.dts | 119 ++++++++++++++++++++++++++++++++++
 1 file changed, 119 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts
index df33a50bc070..f6cec7e6ac11 100644
--- a/arch/arm/boot/dts/omap3-beagle-xm.dts
+++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
@@ -24,6 +24,11 @@
 		reg = <0x80000000 0x20000000>; /* 512 MB */
 	};
 
+	aliases {
+		display0 = &dvi0;
+		display1 = &tv0;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -86,6 +91,54 @@
 		reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */
 		vcc-supply = <&hsusb2_power>;
 	};
+
+	tfp410: encoder@0 {
+		compatible = "ti,tfp410";
+		gpios = <&twl_gpio 2 GPIO_ACTIVE_LOW>;
+
+		/* XXX pinctrl from twl */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tfp410_in: endpoint@0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tfp410_out: endpoint@0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector@0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+
+	tv0: connector@1 {
+		compatible = "svideo-connector";
+		label = "tv";
+
+		tv_connector_in: endpoint {
+			remote-endpoint = <&venc_out>;
+		};
+	};
 };
 
 &omap3_pmx_wkup {
@@ -94,6 +147,17 @@
 			0x0e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot2.gpio_4 */
 		>;
 	};
+
+	dss_dpi_pins2: pinmux_dss_dpi_pins {
+		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 */
+		>;
+	};
 };
 
 &omap3_pmx_core {
@@ -125,6 +189,35 @@
 			0x1ae (PIN_INPUT_PULLDOWN | MUX_MODE3)	/* mcspi2_cs1.hsusb2_data3 */
 		>;
 	};
+
+	dss_dpi_pins1: pinmux_dss_dpi_pins {
+		pinctrl-single,pins = <
+			0x0a4 (PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
+			0x0a6 (PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
+			0x0a8 (PIN_OUTPUT | MUX_MODE0)   /* dss_vsync.dss_vsync */
+			0x0aa (PIN_OUTPUT | MUX_MODE0)   /* dss_acbias.dss_acbias */
+
+			0x0b8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data6.dss_data6 */
+			0x0ba (PIN_OUTPUT | MUX_MODE0)   /* dss_data7.dss_data7 */
+			0x0bc (PIN_OUTPUT | MUX_MODE0)   /* dss_data8.dss_data8 */
+			0x0be (PIN_OUTPUT | MUX_MODE0)   /* dss_data9.dss_data9 */
+			0x0c0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data10.dss_data10 */
+			0x0c2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data11.dss_data11 */
+			0x0c4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data12.dss_data12 */
+			0x0c6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data13.dss_data13 */
+			0x0c8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data14.dss_data14 */
+			0x0ca (PIN_OUTPUT | MUX_MODE0)   /* dss_data15.dss_data15 */
+			0x0cc (PIN_OUTPUT | MUX_MODE0)   /* dss_data16.dss_data16 */
+			0x0ce (PIN_OUTPUT | MUX_MODE0)   /* dss_data17.dss_data17 */
+
+			0x0d0 (PIN_OUTPUT | MUX_MODE3)   /* dss_data18.dss_data0 */
+			0x0d2 (PIN_OUTPUT | MUX_MODE3)   /* dss_data19.dss_data1 */
+			0x0d4 (PIN_OUTPUT | MUX_MODE3)   /* dss_data20.dss_data2 */
+			0x0d6 (PIN_OUTPUT | MUX_MODE3)   /* dss_data21.dss_data3 */
+			0x0d8 (PIN_OUTPUT | MUX_MODE3)   /* dss_data22.dss_data4 */
+			0x0da (PIN_OUTPUT | MUX_MODE3)   /* dss_data23.dss_data5 */
+		>;
+	};
 };
 
 &i2c1 {
@@ -222,3 +315,29 @@
 	regulator-max-microvolt = <1800000>;
 	regulator-always-on;
 };
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <
+		&dss_dpi_pins1
+		&dss_dpi_pins2
+	>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+&venc {
+	status = "ok";
+
+	vdda-supply = <&vdac>;
+
+	venc_out: endpoint {
+		remote-endpoint = <&tv_connector_in>;
+		ti,channels = <2>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 28/41] ARM: omap3-beagle-xm.dts: add display information
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP3 Beagle-xM board. The board has the following displays:

dvi: uses TFP410 encoder to convert DPI to DVI
tv: analog svideo

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3-beagle-xm.dts | 119 ++++++++++++++++++++++++++++++++++
 1 file changed, 119 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts
index df33a50bc070..f6cec7e6ac11 100644
--- a/arch/arm/boot/dts/omap3-beagle-xm.dts
+++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
@@ -24,6 +24,11 @@
 		reg = <0x80000000 0x20000000>; /* 512 MB */
 	};
 
+	aliases {
+		display0 = &dvi0;
+		display1 = &tv0;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -86,6 +91,54 @@
 		reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */
 		vcc-supply = <&hsusb2_power>;
 	};
+
+	tfp410: encoder@0 {
+		compatible = "ti,tfp410";
+		gpios = <&twl_gpio 2 GPIO_ACTIVE_LOW>;
+
+		/* XXX pinctrl from twl */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tfp410_in: endpoint@0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tfp410_out: endpoint@0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector@0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+
+	tv0: connector@1 {
+		compatible = "svideo-connector";
+		label = "tv";
+
+		tv_connector_in: endpoint {
+			remote-endpoint = <&venc_out>;
+		};
+	};
 };
 
 &omap3_pmx_wkup {
@@ -94,6 +147,17 @@
 			0x0e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot2.gpio_4 */
 		>;
 	};
+
+	dss_dpi_pins2: pinmux_dss_dpi_pins {
+		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 */
+		>;
+	};
 };
 
 &omap3_pmx_core {
@@ -125,6 +189,35 @@
 			0x1ae (PIN_INPUT_PULLDOWN | MUX_MODE3)	/* mcspi2_cs1.hsusb2_data3 */
 		>;
 	};
+
+	dss_dpi_pins1: pinmux_dss_dpi_pins {
+		pinctrl-single,pins = <
+			0x0a4 (PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
+			0x0a6 (PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
+			0x0a8 (PIN_OUTPUT | MUX_MODE0)   /* dss_vsync.dss_vsync */
+			0x0aa (PIN_OUTPUT | MUX_MODE0)   /* dss_acbias.dss_acbias */
+
+			0x0b8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data6.dss_data6 */
+			0x0ba (PIN_OUTPUT | MUX_MODE0)   /* dss_data7.dss_data7 */
+			0x0bc (PIN_OUTPUT | MUX_MODE0)   /* dss_data8.dss_data8 */
+			0x0be (PIN_OUTPUT | MUX_MODE0)   /* dss_data9.dss_data9 */
+			0x0c0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data10.dss_data10 */
+			0x0c2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data11.dss_data11 */
+			0x0c4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data12.dss_data12 */
+			0x0c6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data13.dss_data13 */
+			0x0c8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data14.dss_data14 */
+			0x0ca (PIN_OUTPUT | MUX_MODE0)   /* dss_data15.dss_data15 */
+			0x0cc (PIN_OUTPUT | MUX_MODE0)   /* dss_data16.dss_data16 */
+			0x0ce (PIN_OUTPUT | MUX_MODE0)   /* dss_data17.dss_data17 */
+
+			0x0d0 (PIN_OUTPUT | MUX_MODE3)   /* dss_data18.dss_data0 */
+			0x0d2 (PIN_OUTPUT | MUX_MODE3)   /* dss_data19.dss_data1 */
+			0x0d4 (PIN_OUTPUT | MUX_MODE3)   /* dss_data20.dss_data2 */
+			0x0d6 (PIN_OUTPUT | MUX_MODE3)   /* dss_data21.dss_data3 */
+			0x0d8 (PIN_OUTPUT | MUX_MODE3)   /* dss_data22.dss_data4 */
+			0x0da (PIN_OUTPUT | MUX_MODE3)   /* dss_data23.dss_data5 */
+		>;
+	};
 };
 
 &i2c1 {
@@ -222,3 +315,29 @@
 	regulator-max-microvolt = <1800000>;
 	regulator-always-on;
 };
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <
+		&dss_dpi_pins1
+		&dss_dpi_pins2
+	>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+&venc {
+	status = "ok";
+
+	vdda-supply = <&vdac>;
+
+	venc_out: endpoint {
+		remote-endpoint = <&tv_connector_in>;
+		ti,channels = <2>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 28/41] ARM: omap3-beagle-xm.dts: add display information
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP3 Beagle-xM board. The board has the following displays:

dvi: uses TFP410 encoder to convert DPI to DVI
tv: analog svideo

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3-beagle-xm.dts | 119 ++++++++++++++++++++++++++++++++++
 1 file changed, 119 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts
index df33a50bc070..f6cec7e6ac11 100644
--- a/arch/arm/boot/dts/omap3-beagle-xm.dts
+++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
@@ -24,6 +24,11 @@
 		reg = <0x80000000 0x20000000>; /* 512 MB */
 	};
 
+	aliases {
+		display0 = &dvi0;
+		display1 = &tv0;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -86,6 +91,54 @@
 		reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */
 		vcc-supply = <&hsusb2_power>;
 	};
+
+	tfp410: encoder at 0 {
+		compatible = "ti,tfp410";
+		gpios = <&twl_gpio 2 GPIO_ACTIVE_LOW>;
+
+		/* XXX pinctrl from twl */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				tfp410_in: endpoint at 0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				tfp410_out: endpoint at 0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector at 0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+
+	tv0: connector at 1 {
+		compatible = "svideo-connector";
+		label = "tv";
+
+		tv_connector_in: endpoint {
+			remote-endpoint = <&venc_out>;
+		};
+	};
 };
 
 &omap3_pmx_wkup {
@@ -94,6 +147,17 @@
 			0x0e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot2.gpio_4 */
 		>;
 	};
+
+	dss_dpi_pins2: pinmux_dss_dpi_pins {
+		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 */
+		>;
+	};
 };
 
 &omap3_pmx_core {
@@ -125,6 +189,35 @@
 			0x1ae (PIN_INPUT_PULLDOWN | MUX_MODE3)	/* mcspi2_cs1.hsusb2_data3 */
 		>;
 	};
+
+	dss_dpi_pins1: pinmux_dss_dpi_pins {
+		pinctrl-single,pins = <
+			0x0a4 (PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
+			0x0a6 (PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
+			0x0a8 (PIN_OUTPUT | MUX_MODE0)   /* dss_vsync.dss_vsync */
+			0x0aa (PIN_OUTPUT | MUX_MODE0)   /* dss_acbias.dss_acbias */
+
+			0x0b8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data6.dss_data6 */
+			0x0ba (PIN_OUTPUT | MUX_MODE0)   /* dss_data7.dss_data7 */
+			0x0bc (PIN_OUTPUT | MUX_MODE0)   /* dss_data8.dss_data8 */
+			0x0be (PIN_OUTPUT | MUX_MODE0)   /* dss_data9.dss_data9 */
+			0x0c0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data10.dss_data10 */
+			0x0c2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data11.dss_data11 */
+			0x0c4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data12.dss_data12 */
+			0x0c6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data13.dss_data13 */
+			0x0c8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data14.dss_data14 */
+			0x0ca (PIN_OUTPUT | MUX_MODE0)   /* dss_data15.dss_data15 */
+			0x0cc (PIN_OUTPUT | MUX_MODE0)   /* dss_data16.dss_data16 */
+			0x0ce (PIN_OUTPUT | MUX_MODE0)   /* dss_data17.dss_data17 */
+
+			0x0d0 (PIN_OUTPUT | MUX_MODE3)   /* dss_data18.dss_data0 */
+			0x0d2 (PIN_OUTPUT | MUX_MODE3)   /* dss_data19.dss_data1 */
+			0x0d4 (PIN_OUTPUT | MUX_MODE3)   /* dss_data20.dss_data2 */
+			0x0d6 (PIN_OUTPUT | MUX_MODE3)   /* dss_data21.dss_data3 */
+			0x0d8 (PIN_OUTPUT | MUX_MODE3)   /* dss_data22.dss_data4 */
+			0x0da (PIN_OUTPUT | MUX_MODE3)   /* dss_data23.dss_data5 */
+		>;
+	};
 };
 
 &i2c1 {
@@ -222,3 +315,29 @@
 	regulator-max-microvolt = <1800000>;
 	regulator-always-on;
 };
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <
+		&dss_dpi_pins1
+		&dss_dpi_pins2
+	>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+&venc {
+	status = "ok";
+
+	vdda-supply = <&vdac>;
+
+	venc_out: endpoint {
+		remote-endpoint = <&tv_connector_in>;
+		ti,channels = <2>;
+	};
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 29/41] ARM: omap3-igep0020.dts: add display information
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57     ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Javier Martinez Canillas, Tomi Valkeinen

From: Javier Martinez Canillas <javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>

Add DT data for OMAP3 IGEPv2 board. The board has the following displays:

dvi: uses TFP410 encoder to convert DPI to DVI

Signed-off-by: Javier Martinez Canillas <javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/omap3-igep0020.dts | 59 +++++++++++++++++++++++++++++++-----
 1 file changed, 52 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts
index 1c7e74d2d2bc..bd8dcc9f7ab4 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -61,14 +61,52 @@
 		reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; /* gpio_24 */
 		vcc-supply = <&hsusb1_power>;
 	};
+
+	tfp410: encoder@0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio6 10 GPIO_ACTIVE_LOW>; /* 170, power-down */
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tfp410_pins>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tfp410_in: endpoint@0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tfp410_out: endpoint@0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector@0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
 };
 
 &omap3_pmx_core {
 	pinctrl-names = "default";
 	pinctrl-0 = <
 		&hsusbb1_pins
-		&tfp410_pins
-		&dss_pins
 	>;
 
 	hsusbb1_pins: pinmux_hsusbb1_pins {
@@ -88,13 +126,13 @@
 		>;
 	};
 
-	tfp410_pins: tfp410_dvi_pins {
+	tfp410_pins: pinmux_tfp410_pins {
 		pinctrl-single,pins = <
 			0x196 (PIN_OUTPUT | MUX_MODE4)   /* hdq_sio.gpio_170 */
 		>;
 	};
 
-	dss_pins: pinmux_dss_dvi_pins {
+	dss_dpi_pins: pinmux_dss_dpi_pins {
 		pinctrl-single,pins = <
 			0x0a4 (PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
 			0x0a6 (PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
@@ -216,7 +254,14 @@
 	phys = <&hsusb1_phy>;
 };
 
-&vpll2 {
-        /* Needed for DSS */
-        regulator-name = "vdds_dsi";
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
 };
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 29/41] ARM: omap3-igep0020.dts: add display information
@ 2014-01-21 10:57     ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

Add DT data for OMAP3 IGEPv2 board. The board has the following displays:

dvi: uses TFP410 encoder to convert DPI to DVI

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3-igep0020.dts | 59 +++++++++++++++++++++++++++++++-----
 1 file changed, 52 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts
index 1c7e74d2d2bc..bd8dcc9f7ab4 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -61,14 +61,52 @@
 		reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; /* gpio_24 */
 		vcc-supply = <&hsusb1_power>;
 	};
+
+	tfp410: encoder@0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio6 10 GPIO_ACTIVE_LOW>; /* 170, power-down */
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tfp410_pins>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tfp410_in: endpoint@0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tfp410_out: endpoint@0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector@0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
 };
 
 &omap3_pmx_core {
 	pinctrl-names = "default";
 	pinctrl-0 = <
 		&hsusbb1_pins
-		&tfp410_pins
-		&dss_pins
 	>;
 
 	hsusbb1_pins: pinmux_hsusbb1_pins {
@@ -88,13 +126,13 @@
 		>;
 	};
 
-	tfp410_pins: tfp410_dvi_pins {
+	tfp410_pins: pinmux_tfp410_pins {
 		pinctrl-single,pins = <
 			0x196 (PIN_OUTPUT | MUX_MODE4)   /* hdq_sio.gpio_170 */
 		>;
 	};
 
-	dss_pins: pinmux_dss_dvi_pins {
+	dss_dpi_pins: pinmux_dss_dpi_pins {
 		pinctrl-single,pins = <
 			0x0a4 (PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
 			0x0a6 (PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
@@ -216,7 +254,14 @@
 	phys = <&hsusb1_phy>;
 };
 
-&vpll2 {
-        /* Needed for DSS */
-        regulator-name = "vdds_dsi";
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
 };
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 29/41] ARM: omap3-igep0020.dts: add display information
@ 2014-01-21 10:57     ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

Add DT data for OMAP3 IGEPv2 board. The board has the following displays:

dvi: uses TFP410 encoder to convert DPI to DVI

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3-igep0020.dts | 59 +++++++++++++++++++++++++++++++-----
 1 file changed, 52 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts
index 1c7e74d2d2bc..bd8dcc9f7ab4 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -61,14 +61,52 @@
 		reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; /* gpio_24 */
 		vcc-supply = <&hsusb1_power>;
 	};
+
+	tfp410: encoder at 0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio6 10 GPIO_ACTIVE_LOW>; /* 170, power-down */
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tfp410_pins>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				tfp410_in: endpoint at 0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				tfp410_out: endpoint at 0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector at 0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
 };
 
 &omap3_pmx_core {
 	pinctrl-names = "default";
 	pinctrl-0 = <
 		&hsusbb1_pins
-		&tfp410_pins
-		&dss_pins
 	>;
 
 	hsusbb1_pins: pinmux_hsusbb1_pins {
@@ -88,13 +126,13 @@
 		>;
 	};
 
-	tfp410_pins: tfp410_dvi_pins {
+	tfp410_pins: pinmux_tfp410_pins {
 		pinctrl-single,pins = <
 			0x196 (PIN_OUTPUT | MUX_MODE4)   /* hdq_sio.gpio_170 */
 		>;
 	};
 
-	dss_pins: pinmux_dss_dvi_pins {
+	dss_dpi_pins: pinmux_dss_dpi_pins {
 		pinctrl-single,pins = <
 			0x0a4 (PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
 			0x0a6 (PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
@@ -216,7 +254,14 @@
 	phys = <&hsusb1_phy>;
 };
 
-&vpll2 {
-        /* Needed for DSS */
-        regulator-name = "vdds_dsi";
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
 };
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 30/41] ARM: omap3-n900.dts: add display information
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT data for OMAP3 N900 board. The board has the following displays:

lcd: LCD panel connected to OMAP's SDI output
tv: analog svideo

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3-n900.dts | 70 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 66 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index 6fc85f963530..c1bb04d55d4b 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -74,6 +74,14 @@
 		};
 	};
 
+	tv: connector {
+		compatible = "composite-connector";
+		label = "tv";
+
+		tv_connector_in: endpoint {
+			remote-endpoint = <&venc_out>;
+		};
+	};
 };
 
 &omap3_pmx_core {
@@ -140,11 +148,23 @@
 		>;
 	};
 
-	display_pins: pinmux_display_pins {
+	acx565akm_pins: pinmux_acx565akm_pins {
 		pinctrl-single,pins = <
 			0x0d4 (PIN_OUTPUT | MUX_MODE4)		/* RX51_LCD_RESET_GPIO */
 		>;
 	};
+
+	dss_sdi_pins: pinmux_dss_sdi_pins {
+		pinctrl-single,pins = <
+			0x0c0 (PIN_OUTPUT | MUX_MODE1)   /* dss_data10.sdi_dat1n */
+			0x0c2 (PIN_OUTPUT | MUX_MODE1)   /* dss_data11.sdi_dat1p */
+			0x0c4 (PIN_OUTPUT | MUX_MODE1)   /* dss_data12.sdi_dat2n */
+			0x0c6 (PIN_OUTPUT | MUX_MODE1)   /* dss_data13.sdi_dat2p */
+
+			0x0d8 (PIN_OUTPUT | MUX_MODE1)   /* dss_data22.sdi_clkp */
+			0x0da (PIN_OUTPUT | MUX_MODE1)   /* dss_data23.sdi_clkn */
+		>;
+	};
 };
 
 &i2c1 {
@@ -471,13 +491,21 @@
 		spi-max-frequency = <6000000>;
 		reg = <0>;
 	};
-	mipid@2 {
-		compatible = "acx565akm";
+
+	acx565akm@2 {
+		compatible = "sony,acx565akm";
 		spi-max-frequency = <6000000>;
 		reg = <2>;
 
 		pinctrl-names = "default";
-		pinctrl-0 = <&display_pins>;
+		pinctrl-0 = <&acx565akm_pins>;
+
+		label = "lcd";
+		gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */
+
+		lcd_in: endpoint {
+			remote-endpoint = <&sdi_out>;
+		};
 	};
 };
 
@@ -503,3 +531,37 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart3_pins>;
 };
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_sdi_pins>;
+
+	vdds_sdi-supply = <&vaux1>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@1 {
+			reg = <1>;
+
+			sdi_out: endpoint {
+				remote-endpoint = <&lcd_in>;
+				datapairs = <2>;
+			};
+		};
+	};
+};
+
+&venc {
+	status = "ok";
+
+	vdda-supply = <&vdac>;
+
+	venc_out: endpoint {
+		remote-endpoint = <&tv_connector_in>;
+		ti,channels = <1>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 30/41] ARM: omap3-n900.dts: add display information
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP3 N900 board. The board has the following displays:

lcd: LCD panel connected to OMAP's SDI output
tv: analog svideo

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3-n900.dts | 70 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 66 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index 6fc85f963530..c1bb04d55d4b 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -74,6 +74,14 @@
 		};
 	};
 
+	tv: connector {
+		compatible = "composite-connector";
+		label = "tv";
+
+		tv_connector_in: endpoint {
+			remote-endpoint = <&venc_out>;
+		};
+	};
 };
 
 &omap3_pmx_core {
@@ -140,11 +148,23 @@
 		>;
 	};
 
-	display_pins: pinmux_display_pins {
+	acx565akm_pins: pinmux_acx565akm_pins {
 		pinctrl-single,pins = <
 			0x0d4 (PIN_OUTPUT | MUX_MODE4)		/* RX51_LCD_RESET_GPIO */
 		>;
 	};
+
+	dss_sdi_pins: pinmux_dss_sdi_pins {
+		pinctrl-single,pins = <
+			0x0c0 (PIN_OUTPUT | MUX_MODE1)   /* dss_data10.sdi_dat1n */
+			0x0c2 (PIN_OUTPUT | MUX_MODE1)   /* dss_data11.sdi_dat1p */
+			0x0c4 (PIN_OUTPUT | MUX_MODE1)   /* dss_data12.sdi_dat2n */
+			0x0c6 (PIN_OUTPUT | MUX_MODE1)   /* dss_data13.sdi_dat2p */
+
+			0x0d8 (PIN_OUTPUT | MUX_MODE1)   /* dss_data22.sdi_clkp */
+			0x0da (PIN_OUTPUT | MUX_MODE1)   /* dss_data23.sdi_clkn */
+		>;
+	};
 };
 
 &i2c1 {
@@ -471,13 +491,21 @@
 		spi-max-frequency = <6000000>;
 		reg = <0>;
 	};
-	mipid@2 {
-		compatible = "acx565akm";
+
+	acx565akm@2 {
+		compatible = "sony,acx565akm";
 		spi-max-frequency = <6000000>;
 		reg = <2>;
 
 		pinctrl-names = "default";
-		pinctrl-0 = <&display_pins>;
+		pinctrl-0 = <&acx565akm_pins>;
+
+		label = "lcd";
+		gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */
+
+		lcd_in: endpoint {
+			remote-endpoint = <&sdi_out>;
+		};
 	};
 };
 
@@ -503,3 +531,37 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart3_pins>;
 };
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_sdi_pins>;
+
+	vdds_sdi-supply = <&vaux1>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@1 {
+			reg = <1>;
+
+			sdi_out: endpoint {
+				remote-endpoint = <&lcd_in>;
+				datapairs = <2>;
+			};
+		};
+	};
+};
+
+&venc {
+	status = "ok";
+
+	vdda-supply = <&vdac>;
+
+	venc_out: endpoint {
+		remote-endpoint = <&tv_connector_in>;
+		ti,channels = <1>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 30/41] ARM: omap3-n900.dts: add display information
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT data for OMAP3 N900 board. The board has the following displays:

lcd: LCD panel connected to OMAP's SDI output
tv: analog svideo

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/omap3-n900.dts | 70 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 66 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index 6fc85f963530..c1bb04d55d4b 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -74,6 +74,14 @@
 		};
 	};
 
+	tv: connector {
+		compatible = "composite-connector";
+		label = "tv";
+
+		tv_connector_in: endpoint {
+			remote-endpoint = <&venc_out>;
+		};
+	};
 };
 
 &omap3_pmx_core {
@@ -140,11 +148,23 @@
 		>;
 	};
 
-	display_pins: pinmux_display_pins {
+	acx565akm_pins: pinmux_acx565akm_pins {
 		pinctrl-single,pins = <
 			0x0d4 (PIN_OUTPUT | MUX_MODE4)		/* RX51_LCD_RESET_GPIO */
 		>;
 	};
+
+	dss_sdi_pins: pinmux_dss_sdi_pins {
+		pinctrl-single,pins = <
+			0x0c0 (PIN_OUTPUT | MUX_MODE1)   /* dss_data10.sdi_dat1n */
+			0x0c2 (PIN_OUTPUT | MUX_MODE1)   /* dss_data11.sdi_dat1p */
+			0x0c4 (PIN_OUTPUT | MUX_MODE1)   /* dss_data12.sdi_dat2n */
+			0x0c6 (PIN_OUTPUT | MUX_MODE1)   /* dss_data13.sdi_dat2p */
+
+			0x0d8 (PIN_OUTPUT | MUX_MODE1)   /* dss_data22.sdi_clkp */
+			0x0da (PIN_OUTPUT | MUX_MODE1)   /* dss_data23.sdi_clkn */
+		>;
+	};
 };
 
 &i2c1 {
@@ -471,13 +491,21 @@
 		spi-max-frequency = <6000000>;
 		reg = <0>;
 	};
-	mipid at 2 {
-		compatible = "acx565akm";
+
+	acx565akm at 2 {
+		compatible = "sony,acx565akm";
 		spi-max-frequency = <6000000>;
 		reg = <2>;
 
 		pinctrl-names = "default";
-		pinctrl-0 = <&display_pins>;
+		pinctrl-0 = <&acx565akm_pins>;
+
+		label = "lcd";
+		gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */
+
+		lcd_in: endpoint {
+			remote-endpoint = <&sdi_out>;
+		};
 	};
 };
 
@@ -503,3 +531,37 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart3_pins>;
 };
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_sdi_pins>;
+
+	vdds_sdi-supply = <&vaux1>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port at 1 {
+			reg = <1>;
+
+			sdi_out: endpoint {
+				remote-endpoint = <&lcd_in>;
+				datapairs = <2>;
+			};
+		};
+	};
+};
+
+&venc {
+	status = "ok";
+
+	vdda-supply = <&vdac>;
+
+	venc_out: endpoint {
+		remote-endpoint = <&tv_connector_in>;
+		ti,channels = <1>;
+	};
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 31/41] OMAPDSS: remove DT hacks for regulators
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

For booting Panda and 4430SDP with DT, while DSS did not support DT, we
had to had small hacks in the omapdss driver to get the regulators. With
DT now supported in DSS, we can remove those hacks.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c   | 9 +--------
 drivers/video/omap2/dss/hdmi4.c | 9 +--------
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 98bb2d68a462..f461fe015554 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1162,16 +1162,9 @@ static int dsi_regulator_init(struct platform_device *dsidev)
 
 	vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdd");
 
-	if (IS_ERR(vdds_dsi))
-		vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi");
-
-	/* DT HACK: try VCXIO to make omapdss work for o4 sdp/panda */
-	if (IS_ERR(vdds_dsi))
-		vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "VCXIO");
-
 	if (IS_ERR(vdds_dsi)) {
 		if (PTR_ERR(vdds_dsi) != -EPROBE_DEFER)
-			DSSERR("can't get VDDS_DSI regulator\n");
+			DSSERR("can't get DSI VDD regulator\n");
 		return PTR_ERR(vdds_dsi);
 	}
 
diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c
index 064bec4e08d4..17b24b26f6cd 100644
--- a/drivers/video/omap2/dss/hdmi4.c
+++ b/drivers/video/omap2/dss/hdmi4.c
@@ -90,16 +90,9 @@ static int hdmi_init_regulator(void)
 
 	reg = devm_regulator_get(&hdmi.pdev->dev, "vdda");
 
-	if (IS_ERR(reg)
-		reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac");
-
-	/* DT HACK: try VDAC to make omapdss work for o4 sdp/panda */
-	if (IS_ERR(reg))
-		reg = devm_regulator_get(&hdmi.pdev->dev, "VDAC");
-
 	if (IS_ERR(reg)) {
 		if (PTR_ERR(reg) != -EPROBE_DEFER)
-			DSSERR("can't get VDDA_HDMI_DAC regulator\n");
+			DSSERR("can't get VDDA regulator\n");
 		return PTR_ERR(reg);
 	}
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 31/41] OMAPDSS: remove DT hacks for regulators
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

For booting Panda and 4430SDP with DT, while DSS did not support DT, we
had to had small hacks in the omapdss driver to get the regulators. With
DT now supported in DSS, we can remove those hacks.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c   | 9 +--------
 drivers/video/omap2/dss/hdmi4.c | 9 +--------
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 98bb2d68a462..f461fe015554 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1162,16 +1162,9 @@ static int dsi_regulator_init(struct platform_device *dsidev)
 
 	vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdd");
 
-	if (IS_ERR(vdds_dsi))
-		vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi");
-
-	/* DT HACK: try VCXIO to make omapdss work for o4 sdp/panda */
-	if (IS_ERR(vdds_dsi))
-		vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "VCXIO");
-
 	if (IS_ERR(vdds_dsi)) {
 		if (PTR_ERR(vdds_dsi) != -EPROBE_DEFER)
-			DSSERR("can't get VDDS_DSI regulator\n");
+			DSSERR("can't get DSI VDD regulator\n");
 		return PTR_ERR(vdds_dsi);
 	}
 
diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c
index 064bec4e08d4..17b24b26f6cd 100644
--- a/drivers/video/omap2/dss/hdmi4.c
+++ b/drivers/video/omap2/dss/hdmi4.c
@@ -90,16 +90,9 @@ static int hdmi_init_regulator(void)
 
 	reg = devm_regulator_get(&hdmi.pdev->dev, "vdda");
 
-	if (IS_ERR(reg)
-		reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac");
-
-	/* DT HACK: try VDAC to make omapdss work for o4 sdp/panda */
-	if (IS_ERR(reg))
-		reg = devm_regulator_get(&hdmi.pdev->dev, "VDAC");
-
 	if (IS_ERR(reg)) {
 		if (PTR_ERR(reg) != -EPROBE_DEFER)
-			DSSERR("can't get VDDA_HDMI_DAC regulator\n");
+			DSSERR("can't get VDDA regulator\n");
 		return PTR_ERR(reg);
 	}
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 31/41] OMAPDSS: remove DT hacks for regulators
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

For booting Panda and 4430SDP with DT, while DSS did not support DT, we
had to had small hacks in the omapdss driver to get the regulators. With
DT now supported in DSS, we can remove those hacks.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c   | 9 +--------
 drivers/video/omap2/dss/hdmi4.c | 9 +--------
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 98bb2d68a462..f461fe015554 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1162,16 +1162,9 @@ static int dsi_regulator_init(struct platform_device *dsidev)
 
 	vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdd");
 
-	if (IS_ERR(vdds_dsi))
-		vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "vdds_dsi");
-
-	/* DT HACK: try VCXIO to make omapdss work for o4 sdp/panda */
-	if (IS_ERR(vdds_dsi))
-		vdds_dsi = devm_regulator_get(&dsi->pdev->dev, "VCXIO");
-
 	if (IS_ERR(vdds_dsi)) {
 		if (PTR_ERR(vdds_dsi) != -EPROBE_DEFER)
-			DSSERR("can't get VDDS_DSI regulator\n");
+			DSSERR("can't get DSI VDD regulator\n");
 		return PTR_ERR(vdds_dsi);
 	}
 
diff --git a/drivers/video/omap2/dss/hdmi4.c b/drivers/video/omap2/dss/hdmi4.c
index 064bec4e08d4..17b24b26f6cd 100644
--- a/drivers/video/omap2/dss/hdmi4.c
+++ b/drivers/video/omap2/dss/hdmi4.c
@@ -90,16 +90,9 @@ static int hdmi_init_regulator(void)
 
 	reg = devm_regulator_get(&hdmi.pdev->dev, "vdda");
 
-	if (IS_ERR(reg)
-		reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac");
-
-	/* DT HACK: try VDAC to make omapdss work for o4 sdp/panda */
-	if (IS_ERR(reg))
-		reg = devm_regulator_get(&hdmi.pdev->dev, "VDAC");
-
 	if (IS_ERR(reg)) {
 		if (PTR_ERR(reg) != -EPROBE_DEFER)
-			DSSERR("can't get VDDA_HDMI_DAC regulator\n");
+			DSSERR("can't get VDDA regulator\n");
 		return PTR_ERR(reg);
 	}
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 32/41] ARM: OMAP2+: remove pdata quirks for displays
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Remove pdata quirks for the displays on boards that are now supported
properly with DT.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/dss-common.c   | 224 -------------------------------------
 arch/arm/mach-omap2/pdata-quirks.c |   3 -
 2 files changed, 227 deletions(-)

diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c
index dadccc91488c..010bb72d2b75 100644
--- a/arch/arm/mach-omap2/dss-common.c
+++ b/arch/arm/mach-omap2/dss-common.c
@@ -33,227 +33,3 @@
 #include "soc.h"
 #include "dss-common.h"
 #include "mux.h"
-
-#define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
-#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
-#define HDMI_GPIO_HPD  63 /* Hotplug detect */
-
-#define PANDA_DVI_TFP410_POWER_DOWN_GPIO	0
-
-/* DVI Connector */
-static struct connector_dvi_platform_data omap4_panda_dvi_connector_pdata = {
-	.name                   = "dvi",
-	.source                 = "tfp410.0",
-	.i2c_bus_num            = 2,
-};
-
-static struct platform_device omap4_panda_dvi_connector_device = {
-	.name                   = "connector-dvi",
-	.id                     = 0,
-	.dev.platform_data      = &omap4_panda_dvi_connector_pdata,
-};
-
-/* TFP410 DPI-to-DVI chip */
-static struct encoder_tfp410_platform_data omap4_panda_tfp410_pdata = {
-	.name                   = "tfp410.0",
-	.source                 = "dpi.0",
-	.data_lines             = 24,
-	.power_down_gpio        = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
-};
-
-static struct platform_device omap4_panda_tfp410_device = {
-	.name                   = "tfp410",
-	.id                     = 0,
-	.dev.platform_data      = &omap4_panda_tfp410_pdata,
-};
-
-/* HDMI Connector */
-static struct connector_hdmi_platform_data omap4_panda_hdmi_connector_pdata = {
-	.name                   = "hdmi",
-	.source                 = "tpd12s015.0",
-};
-
-static struct platform_device omap4_panda_hdmi_connector_device = {
-	.name                   = "connector-hdmi",
-	.id                     = 0,
-	.dev.platform_data      = &omap4_panda_hdmi_connector_pdata,
-};
-
-/* TPD12S015 HDMI ESD protection & level shifter chip */
-static struct encoder_tpd12s015_platform_data omap4_panda_tpd_pdata = {
-	.name                   = "tpd12s015.0",
-	.source                 = "hdmi.0",
-
-	.ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
-	.ls_oe_gpio = HDMI_GPIO_LS_OE,
-	.hpd_gpio = HDMI_GPIO_HPD,
-};
-
-static struct platform_device omap4_panda_tpd_device = {
-	.name                   = "tpd12s015",
-	.id                     = 0,
-	.dev.platform_data      = &omap4_panda_tpd_pdata,
-};
-
-static struct omap_dss_board_info omap4_panda_dss_data = {
-	.default_display_name = "dvi",
-};
-
-void __init omap4_panda_display_init_of(void)
-{
-	omap_display_init(&omap4_panda_dss_data);
-
-	platform_device_register(&omap4_panda_tfp410_device);
-	platform_device_register(&omap4_panda_dvi_connector_device);
-
-	platform_device_register(&omap4_panda_tpd_device);
-	platform_device_register(&omap4_panda_hdmi_connector_device);
-}
-
-
-/* OMAP4 Blaze display data */
-
-#define DISPLAY_SEL_GPIO	59	/* LCD2/PicoDLP switch */
-#define DLP_POWER_ON_GPIO	40
-
-static struct panel_dsicm_platform_data dsi1_panel = {
-	.name		= "lcd",
-	.source		= "dsi.0",
-	.reset_gpio	= 102,
-	.use_ext_te	= false,
-	.ext_te_gpio	= 101,
-	.pin_config = {
-		.num_pins	= 6,
-		.pins		= { 0, 1, 2, 3, 4, 5 },
-	},
-};
-
-static struct platform_device sdp4430_lcd_device = {
-	.name                   = "panel-dsi-cm",
-	.id                     = 0,
-	.dev.platform_data	= &dsi1_panel,
-};
-
-static struct panel_dsicm_platform_data dsi2_panel = {
-	.name		= "lcd2",
-	.source		= "dsi.1",
-	.reset_gpio	= 104,
-	.use_ext_te	= false,
-	.ext_te_gpio	= 103,
-	.pin_config = {
-		.num_pins	= 6,
-		.pins		= { 0, 1, 2, 3, 4, 5 },
-	},
-};
-
-static struct platform_device sdp4430_lcd2_device = {
-	.name                   = "panel-dsi-cm",
-	.id                     = 1,
-	.dev.platform_data	= &dsi2_panel,
-};
-
-/* HDMI Connector */
-static struct connector_hdmi_platform_data sdp4430_hdmi_connector_pdata = {
-	.name                   = "hdmi",
-	.source                 = "tpd12s015.0",
-};
-
-static struct platform_device sdp4430_hdmi_connector_device = {
-	.name                   = "connector-hdmi",
-	.id                     = 0,
-	.dev.platform_data      = &sdp4430_hdmi_connector_pdata,
-};
-
-/* TPD12S015 HDMI ESD protection & level shifter chip */
-static struct encoder_tpd12s015_platform_data sdp4430_tpd_pdata = {
-	.name                   = "tpd12s015.0",
-	.source                 = "hdmi.0",
-
-	.ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
-	.ls_oe_gpio = HDMI_GPIO_LS_OE,
-	.hpd_gpio = HDMI_GPIO_HPD,
-};
-
-static struct platform_device sdp4430_tpd_device = {
-	.name                   = "tpd12s015",
-	.id                     = 0,
-	.dev.platform_data      = &sdp4430_tpd_pdata,
-};
-
-
-static struct omap_dss_board_info sdp4430_dss_data = {
-	.default_display_name = "lcd",
-};
-
-/*
- * we select LCD2 by default (instead of Pico DLP) by setting DISPLAY_SEL_GPIO.
- * Setting DLP_POWER_ON gpio enables the VDLP_2V5 VDLP_1V8 and VDLP_1V0 rails
- * used by picodlp on the 4430sdp platform. Keep this gpio disabled as LCD2 is
- * selected by default
- */
-void __init omap_4430sdp_display_init_of(void)
-{
-	int r;
-
-	r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
-			"display_sel");
-	if (r)
-		pr_err("%s: Could not get display_sel GPIO\n", __func__);
-
-	r = gpio_request_one(DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
-		"DLP POWER ON");
-	if (r)
-		pr_err("%s: Could not get DLP POWER ON GPIO\n", __func__);
-
-	omap_display_init(&sdp4430_dss_data);
-
-	platform_device_register(&sdp4430_lcd_device);
-	platform_device_register(&sdp4430_lcd2_device);
-
-	platform_device_register(&sdp4430_tpd_device);
-	platform_device_register(&sdp4430_hdmi_connector_device);
-}
-
-
-/* OMAP3 IGEPv2 data */
-
-#define IGEP2_DVI_TFP410_POWER_DOWN_GPIO	170
-
-/* DVI Connector */
-static struct connector_dvi_platform_data omap3_igep2_dvi_connector_pdata = {
-	.name                   = "dvi",
-	.source                 = "tfp410.0",
-	.i2c_bus_num            = 2,
-};
-
-static struct platform_device omap3_igep2_dvi_connector_device = {
-	.name                   = "connector-dvi",
-	.id                     = 0,
-	.dev.platform_data      = &omap3_igep2_dvi_connector_pdata,
-};
-
-/* TFP410 DPI-to-DVI chip */
-static struct encoder_tfp410_platform_data omap3_igep2_tfp410_pdata = {
-	.name                   = "tfp410.0",
-	.source                 = "dpi.0",
-	.data_lines             = 24,
-	.power_down_gpio        = IGEP2_DVI_TFP410_POWER_DOWN_GPIO,
-};
-
-static struct platform_device omap3_igep2_tfp410_device = {
-	.name                   = "tfp410",
-	.id                     = 0,
-	.dev.platform_data      = &omap3_igep2_tfp410_pdata,
-};
-
-static struct omap_dss_board_info igep2_dss_data = {
-	.default_display_name = "dvi",
-};
-
-void __init omap3_igep2_display_init_of(void)
-{
-	omap_display_init(&igep2_dss_data);
-
-	platform_device_register(&omap3_igep2_tfp410_device);
-	platform_device_register(&omap3_igep2_dvi_connector_device);
-}
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 39f020c982e8..68e3bca42e60 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -80,7 +80,6 @@ static void __init hsmmc2_internal_input_clk(void)
 
 static void __init omap3_igep0020_legacy_init(void)
 {
-	omap3_igep2_display_init_of();
 }
 
 static void __init omap3_evm_legacy_init(void)
@@ -97,14 +96,12 @@ static void __init omap3_zoom_legacy_init(void)
 #ifdef CONFIG_ARCH_OMAP4
 static void __init omap4_sdp_legacy_init(void)
 {
-	omap_4430sdp_display_init_of();
 	legacy_init_wl12xx(WL12XX_REFCLOCK_26,
 			   WL12XX_TCXOCLOCK_26, 53);
 }
 
 static void __init omap4_panda_legacy_init(void)
 {
-	omap4_panda_display_init_of();
 	legacy_init_ehci_clk("auxclk3_ck");
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53);
 }
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 32/41] ARM: OMAP2+: remove pdata quirks for displays
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Remove pdata quirks for the displays on boards that are now supported
properly with DT.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/dss-common.c   | 224 -------------------------------------
 arch/arm/mach-omap2/pdata-quirks.c |   3 -
 2 files changed, 227 deletions(-)

diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c
index dadccc91488c..010bb72d2b75 100644
--- a/arch/arm/mach-omap2/dss-common.c
+++ b/arch/arm/mach-omap2/dss-common.c
@@ -33,227 +33,3 @@
 #include "soc.h"
 #include "dss-common.h"
 #include "mux.h"
-
-#define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
-#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
-#define HDMI_GPIO_HPD  63 /* Hotplug detect */
-
-#define PANDA_DVI_TFP410_POWER_DOWN_GPIO	0
-
-/* DVI Connector */
-static struct connector_dvi_platform_data omap4_panda_dvi_connector_pdata = {
-	.name                   = "dvi",
-	.source                 = "tfp410.0",
-	.i2c_bus_num            = 2,
-};
-
-static struct platform_device omap4_panda_dvi_connector_device = {
-	.name                   = "connector-dvi",
-	.id                     = 0,
-	.dev.platform_data      = &omap4_panda_dvi_connector_pdata,
-};
-
-/* TFP410 DPI-to-DVI chip */
-static struct encoder_tfp410_platform_data omap4_panda_tfp410_pdata = {
-	.name                   = "tfp410.0",
-	.source                 = "dpi.0",
-	.data_lines             = 24,
-	.power_down_gpio        = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
-};
-
-static struct platform_device omap4_panda_tfp410_device = {
-	.name                   = "tfp410",
-	.id                     = 0,
-	.dev.platform_data      = &omap4_panda_tfp410_pdata,
-};
-
-/* HDMI Connector */
-static struct connector_hdmi_platform_data omap4_panda_hdmi_connector_pdata = {
-	.name                   = "hdmi",
-	.source                 = "tpd12s015.0",
-};
-
-static struct platform_device omap4_panda_hdmi_connector_device = {
-	.name                   = "connector-hdmi",
-	.id                     = 0,
-	.dev.platform_data      = &omap4_panda_hdmi_connector_pdata,
-};
-
-/* TPD12S015 HDMI ESD protection & level shifter chip */
-static struct encoder_tpd12s015_platform_data omap4_panda_tpd_pdata = {
-	.name                   = "tpd12s015.0",
-	.source                 = "hdmi.0",
-
-	.ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
-	.ls_oe_gpio = HDMI_GPIO_LS_OE,
-	.hpd_gpio = HDMI_GPIO_HPD,
-};
-
-static struct platform_device omap4_panda_tpd_device = {
-	.name                   = "tpd12s015",
-	.id                     = 0,
-	.dev.platform_data      = &omap4_panda_tpd_pdata,
-};
-
-static struct omap_dss_board_info omap4_panda_dss_data = {
-	.default_display_name = "dvi",
-};
-
-void __init omap4_panda_display_init_of(void)
-{
-	omap_display_init(&omap4_panda_dss_data);
-
-	platform_device_register(&omap4_panda_tfp410_device);
-	platform_device_register(&omap4_panda_dvi_connector_device);
-
-	platform_device_register(&omap4_panda_tpd_device);
-	platform_device_register(&omap4_panda_hdmi_connector_device);
-}
-
-
-/* OMAP4 Blaze display data */
-
-#define DISPLAY_SEL_GPIO	59	/* LCD2/PicoDLP switch */
-#define DLP_POWER_ON_GPIO	40
-
-static struct panel_dsicm_platform_data dsi1_panel = {
-	.name		= "lcd",
-	.source		= "dsi.0",
-	.reset_gpio	= 102,
-	.use_ext_te	= false,
-	.ext_te_gpio	= 101,
-	.pin_config = {
-		.num_pins	= 6,
-		.pins		= { 0, 1, 2, 3, 4, 5 },
-	},
-};
-
-static struct platform_device sdp4430_lcd_device = {
-	.name                   = "panel-dsi-cm",
-	.id                     = 0,
-	.dev.platform_data	= &dsi1_panel,
-};
-
-static struct panel_dsicm_platform_data dsi2_panel = {
-	.name		= "lcd2",
-	.source		= "dsi.1",
-	.reset_gpio	= 104,
-	.use_ext_te	= false,
-	.ext_te_gpio	= 103,
-	.pin_config = {
-		.num_pins	= 6,
-		.pins		= { 0, 1, 2, 3, 4, 5 },
-	},
-};
-
-static struct platform_device sdp4430_lcd2_device = {
-	.name                   = "panel-dsi-cm",
-	.id                     = 1,
-	.dev.platform_data	= &dsi2_panel,
-};
-
-/* HDMI Connector */
-static struct connector_hdmi_platform_data sdp4430_hdmi_connector_pdata = {
-	.name                   = "hdmi",
-	.source                 = "tpd12s015.0",
-};
-
-static struct platform_device sdp4430_hdmi_connector_device = {
-	.name                   = "connector-hdmi",
-	.id                     = 0,
-	.dev.platform_data      = &sdp4430_hdmi_connector_pdata,
-};
-
-/* TPD12S015 HDMI ESD protection & level shifter chip */
-static struct encoder_tpd12s015_platform_data sdp4430_tpd_pdata = {
-	.name                   = "tpd12s015.0",
-	.source                 = "hdmi.0",
-
-	.ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
-	.ls_oe_gpio = HDMI_GPIO_LS_OE,
-	.hpd_gpio = HDMI_GPIO_HPD,
-};
-
-static struct platform_device sdp4430_tpd_device = {
-	.name                   = "tpd12s015",
-	.id                     = 0,
-	.dev.platform_data      = &sdp4430_tpd_pdata,
-};
-
-
-static struct omap_dss_board_info sdp4430_dss_data = {
-	.default_display_name = "lcd",
-};
-
-/*
- * we select LCD2 by default (instead of Pico DLP) by setting DISPLAY_SEL_GPIO.
- * Setting DLP_POWER_ON gpio enables the VDLP_2V5 VDLP_1V8 and VDLP_1V0 rails
- * used by picodlp on the 4430sdp platform. Keep this gpio disabled as LCD2 is
- * selected by default
- */
-void __init omap_4430sdp_display_init_of(void)
-{
-	int r;
-
-	r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
-			"display_sel");
-	if (r)
-		pr_err("%s: Could not get display_sel GPIO\n", __func__);
-
-	r = gpio_request_one(DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
-		"DLP POWER ON");
-	if (r)
-		pr_err("%s: Could not get DLP POWER ON GPIO\n", __func__);
-
-	omap_display_init(&sdp4430_dss_data);
-
-	platform_device_register(&sdp4430_lcd_device);
-	platform_device_register(&sdp4430_lcd2_device);
-
-	platform_device_register(&sdp4430_tpd_device);
-	platform_device_register(&sdp4430_hdmi_connector_device);
-}
-
-
-/* OMAP3 IGEPv2 data */
-
-#define IGEP2_DVI_TFP410_POWER_DOWN_GPIO	170
-
-/* DVI Connector */
-static struct connector_dvi_platform_data omap3_igep2_dvi_connector_pdata = {
-	.name                   = "dvi",
-	.source                 = "tfp410.0",
-	.i2c_bus_num            = 2,
-};
-
-static struct platform_device omap3_igep2_dvi_connector_device = {
-	.name                   = "connector-dvi",
-	.id                     = 0,
-	.dev.platform_data      = &omap3_igep2_dvi_connector_pdata,
-};
-
-/* TFP410 DPI-to-DVI chip */
-static struct encoder_tfp410_platform_data omap3_igep2_tfp410_pdata = {
-	.name                   = "tfp410.0",
-	.source                 = "dpi.0",
-	.data_lines             = 24,
-	.power_down_gpio        = IGEP2_DVI_TFP410_POWER_DOWN_GPIO,
-};
-
-static struct platform_device omap3_igep2_tfp410_device = {
-	.name                   = "tfp410",
-	.id                     = 0,
-	.dev.platform_data      = &omap3_igep2_tfp410_pdata,
-};
-
-static struct omap_dss_board_info igep2_dss_data = {
-	.default_display_name = "dvi",
-};
-
-void __init omap3_igep2_display_init_of(void)
-{
-	omap_display_init(&igep2_dss_data);
-
-	platform_device_register(&omap3_igep2_tfp410_device);
-	platform_device_register(&omap3_igep2_dvi_connector_device);
-}
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 39f020c982e8..68e3bca42e60 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -80,7 +80,6 @@ static void __init hsmmc2_internal_input_clk(void)
 
 static void __init omap3_igep0020_legacy_init(void)
 {
-	omap3_igep2_display_init_of();
 }
 
 static void __init omap3_evm_legacy_init(void)
@@ -97,14 +96,12 @@ static void __init omap3_zoom_legacy_init(void)
 #ifdef CONFIG_ARCH_OMAP4
 static void __init omap4_sdp_legacy_init(void)
 {
-	omap_4430sdp_display_init_of();
 	legacy_init_wl12xx(WL12XX_REFCLOCK_26,
 			   WL12XX_TCXOCLOCK_26, 53);
 }
 
 static void __init omap4_panda_legacy_init(void)
 {
-	omap4_panda_display_init_of();
 	legacy_init_ehci_clk("auxclk3_ck");
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53);
 }
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 32/41] ARM: OMAP2+: remove pdata quirks for displays
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Remove pdata quirks for the displays on boards that are now supported
properly with DT.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/mach-omap2/dss-common.c   | 224 -------------------------------------
 arch/arm/mach-omap2/pdata-quirks.c |   3 -
 2 files changed, 227 deletions(-)

diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c
index dadccc91488c..010bb72d2b75 100644
--- a/arch/arm/mach-omap2/dss-common.c
+++ b/arch/arm/mach-omap2/dss-common.c
@@ -33,227 +33,3 @@
 #include "soc.h"
 #include "dss-common.h"
 #include "mux.h"
-
-#define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
-#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
-#define HDMI_GPIO_HPD  63 /* Hotplug detect */
-
-#define PANDA_DVI_TFP410_POWER_DOWN_GPIO	0
-
-/* DVI Connector */
-static struct connector_dvi_platform_data omap4_panda_dvi_connector_pdata = {
-	.name                   = "dvi",
-	.source                 = "tfp410.0",
-	.i2c_bus_num            = 2,
-};
-
-static struct platform_device omap4_panda_dvi_connector_device = {
-	.name                   = "connector-dvi",
-	.id                     = 0,
-	.dev.platform_data      = &omap4_panda_dvi_connector_pdata,
-};
-
-/* TFP410 DPI-to-DVI chip */
-static struct encoder_tfp410_platform_data omap4_panda_tfp410_pdata = {
-	.name                   = "tfp410.0",
-	.source                 = "dpi.0",
-	.data_lines             = 24,
-	.power_down_gpio        = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
-};
-
-static struct platform_device omap4_panda_tfp410_device = {
-	.name                   = "tfp410",
-	.id                     = 0,
-	.dev.platform_data      = &omap4_panda_tfp410_pdata,
-};
-
-/* HDMI Connector */
-static struct connector_hdmi_platform_data omap4_panda_hdmi_connector_pdata = {
-	.name                   = "hdmi",
-	.source                 = "tpd12s015.0",
-};
-
-static struct platform_device omap4_panda_hdmi_connector_device = {
-	.name                   = "connector-hdmi",
-	.id                     = 0,
-	.dev.platform_data      = &omap4_panda_hdmi_connector_pdata,
-};
-
-/* TPD12S015 HDMI ESD protection & level shifter chip */
-static struct encoder_tpd12s015_platform_data omap4_panda_tpd_pdata = {
-	.name                   = "tpd12s015.0",
-	.source                 = "hdmi.0",
-
-	.ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
-	.ls_oe_gpio = HDMI_GPIO_LS_OE,
-	.hpd_gpio = HDMI_GPIO_HPD,
-};
-
-static struct platform_device omap4_panda_tpd_device = {
-	.name                   = "tpd12s015",
-	.id                     = 0,
-	.dev.platform_data      = &omap4_panda_tpd_pdata,
-};
-
-static struct omap_dss_board_info omap4_panda_dss_data = {
-	.default_display_name = "dvi",
-};
-
-void __init omap4_panda_display_init_of(void)
-{
-	omap_display_init(&omap4_panda_dss_data);
-
-	platform_device_register(&omap4_panda_tfp410_device);
-	platform_device_register(&omap4_panda_dvi_connector_device);
-
-	platform_device_register(&omap4_panda_tpd_device);
-	platform_device_register(&omap4_panda_hdmi_connector_device);
-}
-
-
-/* OMAP4 Blaze display data */
-
-#define DISPLAY_SEL_GPIO	59	/* LCD2/PicoDLP switch */
-#define DLP_POWER_ON_GPIO	40
-
-static struct panel_dsicm_platform_data dsi1_panel = {
-	.name		= "lcd",
-	.source		= "dsi.0",
-	.reset_gpio	= 102,
-	.use_ext_te	= false,
-	.ext_te_gpio	= 101,
-	.pin_config = {
-		.num_pins	= 6,
-		.pins		= { 0, 1, 2, 3, 4, 5 },
-	},
-};
-
-static struct platform_device sdp4430_lcd_device = {
-	.name                   = "panel-dsi-cm",
-	.id                     = 0,
-	.dev.platform_data	= &dsi1_panel,
-};
-
-static struct panel_dsicm_platform_data dsi2_panel = {
-	.name		= "lcd2",
-	.source		= "dsi.1",
-	.reset_gpio	= 104,
-	.use_ext_te	= false,
-	.ext_te_gpio	= 103,
-	.pin_config = {
-		.num_pins	= 6,
-		.pins		= { 0, 1, 2, 3, 4, 5 },
-	},
-};
-
-static struct platform_device sdp4430_lcd2_device = {
-	.name                   = "panel-dsi-cm",
-	.id                     = 1,
-	.dev.platform_data	= &dsi2_panel,
-};
-
-/* HDMI Connector */
-static struct connector_hdmi_platform_data sdp4430_hdmi_connector_pdata = {
-	.name                   = "hdmi",
-	.source                 = "tpd12s015.0",
-};
-
-static struct platform_device sdp4430_hdmi_connector_device = {
-	.name                   = "connector-hdmi",
-	.id                     = 0,
-	.dev.platform_data      = &sdp4430_hdmi_connector_pdata,
-};
-
-/* TPD12S015 HDMI ESD protection & level shifter chip */
-static struct encoder_tpd12s015_platform_data sdp4430_tpd_pdata = {
-	.name                   = "tpd12s015.0",
-	.source                 = "hdmi.0",
-
-	.ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
-	.ls_oe_gpio = HDMI_GPIO_LS_OE,
-	.hpd_gpio = HDMI_GPIO_HPD,
-};
-
-static struct platform_device sdp4430_tpd_device = {
-	.name                   = "tpd12s015",
-	.id                     = 0,
-	.dev.platform_data      = &sdp4430_tpd_pdata,
-};
-
-
-static struct omap_dss_board_info sdp4430_dss_data = {
-	.default_display_name = "lcd",
-};
-
-/*
- * we select LCD2 by default (instead of Pico DLP) by setting DISPLAY_SEL_GPIO.
- * Setting DLP_POWER_ON gpio enables the VDLP_2V5 VDLP_1V8 and VDLP_1V0 rails
- * used by picodlp on the 4430sdp platform. Keep this gpio disabled as LCD2 is
- * selected by default
- */
-void __init omap_4430sdp_display_init_of(void)
-{
-	int r;
-
-	r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
-			"display_sel");
-	if (r)
-		pr_err("%s: Could not get display_sel GPIO\n", __func__);
-
-	r = gpio_request_one(DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
-		"DLP POWER ON");
-	if (r)
-		pr_err("%s: Could not get DLP POWER ON GPIO\n", __func__);
-
-	omap_display_init(&sdp4430_dss_data);
-
-	platform_device_register(&sdp4430_lcd_device);
-	platform_device_register(&sdp4430_lcd2_device);
-
-	platform_device_register(&sdp4430_tpd_device);
-	platform_device_register(&sdp4430_hdmi_connector_device);
-}
-
-
-/* OMAP3 IGEPv2 data */
-
-#define IGEP2_DVI_TFP410_POWER_DOWN_GPIO	170
-
-/* DVI Connector */
-static struct connector_dvi_platform_data omap3_igep2_dvi_connector_pdata = {
-	.name                   = "dvi",
-	.source                 = "tfp410.0",
-	.i2c_bus_num            = 2,
-};
-
-static struct platform_device omap3_igep2_dvi_connector_device = {
-	.name                   = "connector-dvi",
-	.id                     = 0,
-	.dev.platform_data      = &omap3_igep2_dvi_connector_pdata,
-};
-
-/* TFP410 DPI-to-DVI chip */
-static struct encoder_tfp410_platform_data omap3_igep2_tfp410_pdata = {
-	.name                   = "tfp410.0",
-	.source                 = "dpi.0",
-	.data_lines             = 24,
-	.power_down_gpio        = IGEP2_DVI_TFP410_POWER_DOWN_GPIO,
-};
-
-static struct platform_device omap3_igep2_tfp410_device = {
-	.name                   = "tfp410",
-	.id                     = 0,
-	.dev.platform_data      = &omap3_igep2_tfp410_pdata,
-};
-
-static struct omap_dss_board_info igep2_dss_data = {
-	.default_display_name = "dvi",
-};
-
-void __init omap3_igep2_display_init_of(void)
-{
-	omap_display_init(&igep2_dss_data);
-
-	platform_device_register(&omap3_igep2_tfp410_device);
-	platform_device_register(&omap3_igep2_dvi_connector_device);
-}
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 39f020c982e8..68e3bca42e60 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -80,7 +80,6 @@ static void __init hsmmc2_internal_input_clk(void)
 
 static void __init omap3_igep0020_legacy_init(void)
 {
-	omap3_igep2_display_init_of();
 }
 
 static void __init omap3_evm_legacy_init(void)
@@ -97,14 +96,12 @@ static void __init omap3_zoom_legacy_init(void)
 #ifdef CONFIG_ARCH_OMAP4
 static void __init omap4_sdp_legacy_init(void)
 {
-	omap_4430sdp_display_init_of();
 	legacy_init_wl12xx(WL12XX_REFCLOCK_26,
 			   WL12XX_TCXOCLOCK_26, 53);
 }
 
 static void __init omap4_panda_legacy_init(void)
 {
-	omap4_panda_display_init_of();
 	legacy_init_ehci_clk("auxclk3_ck");
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53);
 }
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 33/41] Doc/DT: Add OMAP DSS DT Bindings
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add device tree bindings for OMAP Display Subsystem for the following
SoCs: OMAP2, OMAP3, OMAP4.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/ti,omap-dss.txt      | 197 +++++++++++++++++++++
 .../devicetree/bindings/video/ti,omap2-dss.txt     |  54 ++++++
 .../devicetree/bindings/video/ti,omap3-dss.txt     |  73 ++++++++
 .../devicetree/bindings/video/ti,omap4-dss.txt     |  99 +++++++++++
 .../devicetree/bindings/video/video-ports.txt      |  22 +++
 5 files changed, 445 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap2-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap3-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap4-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/video-ports.txt

diff --git a/Documentation/devicetree/bindings/video/ti,omap-dss.txt b/Documentation/devicetree/bindings/video/ti,omap-dss.txt
new file mode 100644
index 000000000000..3b3a7c09106c
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap-dss.txt
@@ -0,0 +1,197 @@
+Texas Instruments OMAP Display Subsystem
+========================================
+
+Generic Description
+-------------------
+
+This document is a generic description of the OMAP Display Subsystem bindings.
+Binding details for each OMAP SoC version are described in respective binding
+documentation.
+
+The OMAP Display Subsystem (DSS) hardware consists of DSS Core, DISPC module and
+a number of encoder modules. All DSS versions contain DSS Core and DISPC, but
+the encoder modules vary.
+
+The DSS Core is the parent of the other DSS modules, and manages clock routing,
+integration to the SoC, etc.
+
+DISPC is the display controller, which reads pixels from the memory and outputs
+a RGB pixel stream to encoders.
+
+The encoder modules encode the received RGB pixel stream to a video output like
+HDMI, MIPI DPI, etc.
+
+Video Ports
+-----------
+
+The DSS Core and the encoders have video port outputs. The structure of the
+video ports is described in Documentation/devicetree/bindings/video/video-
+ports.txt, and the properties for the ports and endpoints for each encoder are
+described in the SoC's DSS binding documentation.
+
+The video ports are used to describe the connections to external hardware, like
+panels or external encoders.
+
+Aliases
+-------
+
+The board dts file may define aliases for displays to assign "displayX" style
+name for each display. If no aliases are defined, a semi-random number is used
+for the display.
+
+Example
+-------
+
+A shortened example of the DSS description for OMAP4, with non-relevant parts
+removed, defined in omap4.dtsi:
+
+dss: dss@58000000 {
+	compatible = "ti,omap4-dss", "simple-bus";
+	reg = <0x58000000 0x80>;
+	status = "disabled";
+	ti,hwmods = "dss_core";
+	#address-cells = <1>;
+	#size-cells = <1>;
+	ranges;
+
+	dispc@58001000 {
+		compatible = "ti,omap4-dispc";
+		reg = <0x58001000 0x1000>;
+		interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+		ti,hwmods = "dss_dispc";
+	};
+
+	hdmi: encoder@58006000 {
+		compatible = "ti,omap4-hdmi";
+		reg = <0x58006000 0x200>,
+		      <0x58006200 0x100>,
+		      <0x58006300 0x100>,
+		      <0x58006400 0x1000>;
+		reg-names = "wp", "pll", "phy", "core";
+		interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+		ti,hwmods = "dss_hdmi";
+	};
+};
+
+A shortened example of the board description for OMAP4 Panda board, defined in
+omap4-panda.dts.
+
+The Panda board has a DVI and a HDMI connector, and the board contains a TFP410
+chip (MIPI DPI to DVI encoder) and a TPD12S015 chip (HDMI ESD protection & level
+shifter). The video pipelines for the connectors are formed as follows:
+
+DSS Core --(MIPI DPI)--> TFP410 --(DVI)--> DVI Connector
+OMAP HDMI --(HDMI)--> TPD12S015 --(HDMI)--> HDMI COnnector
+
+/ {
+	aliases {
+		display0 = &dvi0;
+		display1 = &hdmi0;
+	};
+
+	tfp410: encoder@0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;	/* 0, power-down */
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tfp410_pins>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tfp410_in: endpoint@0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tfp410_out: endpoint@0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector@0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+
+	tpd12s015: encoder@1 {
+		compatible = "ti,tpd12s015";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpd12s015_pins>;
+
+		gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+			<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+			<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tpd12s015_in: endpoint@0 {
+					remote-endpoint = <&hdmi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tpd12s015_out: endpoint@0 {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
+		};
+	};
+
+	hdmi0: connector@1 {
+		compatible = "hdmi-connector";
+		label = "hdmi";
+
+		hdmi_connector_in: endpoint {
+			remote-endpoint = <&tpd12s015_out>;
+		};
+	};
+};
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+&hdmi {
+	status = "ok";
+	vdda-supply = <&vdac>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_hdmi_pins>;
+
+	hdmi_out: endpoint {
+		remote-endpoint = <&tpd12s015_in>;
+	};
+};
diff --git a/Documentation/devicetree/bindings/video/ti,omap2-dss.txt b/Documentation/devicetree/bindings/video/ti,omap2-dss.txt
new file mode 100644
index 000000000000..fa8bb2ed1170
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap2-dss.txt
@@ -0,0 +1,54 @@
+Texas Instruments OMAP2 Display Subsystem
+=========================================
+
+See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic
+description about OMAP Display Subsystem bindings.
+
+DSS Core
+--------
+
+Required properties:
+- compatible: "ti,omap2-dss"
+- reg: address and length of the register space
+- ti,hwmods: "dss_core"
+
+Optional nodes:
+- Video port for DPI output
+
+DPI Endpoint required properties:
+- data-lines: number of lines used
+
+
+DISPC
+-----
+
+Required properties:
+- compatible: "ti,omap2-dispc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_dispc"
+- interrupts: the DISPC interrupt
+
+
+RFBI
+----
+
+Required properties:
+- compatible: "ti,omap2-rfbi"
+- reg: address and length of the register space
+- ti,hwmods: "dss_rfbi"
+
+
+VENC
+----
+
+Required properties:
+- compatible: "ti,omap2-venc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_venc"
+- vdda-supply: power supply for DAC
+
+VENC Endpoint required properties:
+
+Required properties:
+- ti,invert-polarity: invert the polarity of the video signal
+- ti,channels: 1 for composite, 2 for s-video
diff --git a/Documentation/devicetree/bindings/video/ti,omap3-dss.txt b/Documentation/devicetree/bindings/video/ti,omap3-dss.txt
new file mode 100644
index 000000000000..2b62c78c9596
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap3-dss.txt
@@ -0,0 +1,73 @@
+Texas Instruments OMAP3 Display Subsystem
+=========================================
+
+See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic
+description about OMAP Display Subsystem bindings.
+
+DSS Core
+--------
+
+Required properties:
+- compatible: "ti,omap3-dss"
+- reg: address and length of the register space
+- ti,hwmods: "dss_core"
+
+Optional nodes:
+- Video ports:
+	- Port 0: DPI output
+	- Port 1: SDI output
+
+DPI Endpoint required properties:
+- data-lines: number of lines used
+
+SDI Endpoint required properties:
+- datapairs: number of datapairs used
+
+
+DISPC
+-----
+
+Required properties:
+- compatible: "ti,omap3-dispc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_dispc"
+- interrupts: the DISPC interrupt
+
+
+RFBI
+----
+
+Required properties:
+- compatible: "ti,omap3-rfbi"
+- reg: address and length of the register space
+- ti,hwmods: "dss_rfbi"
+
+
+VENC
+----
+
+Required properties:
+- compatible: "ti,omap3-venc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_venc"
+- vdda-supply: power supply for DAC
+
+VENC Endpoint required properties:
+- ti,invert-polarity: invert the polarity of the video signal
+- ti,channels: 1 for composite, 2 for s-video
+
+
+DSI
+---
+
+Required properties:
+- compatible: "ti,omap3-dsi"
+- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll'
+- reg-names: "proto", "phy", "pll"
+- interrupts: the DSI interrupt line
+- ti,hwmods: "dss_dsi1"
+- vdd-supply: power supply for DSI
+
+DSI Endpoint required properties:
+- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-,
+  DATA1+, DATA1-, ...
diff --git a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt
new file mode 100644
index 000000000000..37aa9e6a173e
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt
@@ -0,0 +1,99 @@
+Texas Instruments OMAP4 Display Subsystem
+=========================================
+
+See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic
+description about OMAP Display Subsystem bindings.
+
+DSS Core
+--------
+
+Required properties:
+- compatible: "ti,omap4-dss"
+- reg: address and length of the register space
+- ti,hwmods: "dss_core"
+
+Required nodes:
+- DISPC
+
+Optional nodes:
+- DSS Submodules: RFBI, VENC, DSI, HDMI
+- Video port for DPI output
+
+DPI Endpoint required properties:
+- data-lines: number of lines used
+
+
+DISPC
+-----
+
+Required properties:
+- compatible: "ti,omap4-dispc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_dispc"
+- interrupts: the DISPC interrupt
+
+
+RFBI
+----
+
+Required properties:
+- compatible: "ti,omap4-rfbi"
+- reg: address and length of the register space
+- ti,hwmods: "dss_rfbi"
+
+Optional nodes:
+- Video port for RFBI output
+- RFBI controlled peripherals
+
+
+VENC
+----
+
+Required properties:
+- compatible: "ti,omap4-venc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_venc"
+- vdda-supply: power supply for DAC
+
+Optional nodes:
+- Video port for VENC output
+
+VENC Endpoint required properties:
+- ti,invert-polarity: invert the polarity of the video signal
+- ti,channels: 1 for composite, 2 for s-video
+
+
+DSI
+---
+
+Required properties:
+- compatible: "ti,omap4-dsi"
+- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll'
+- reg-names: "proto", "phy", "pll"
+- interrupts: the DSI interrupt line
+- ti,hwmods: "dss_dsi1" or "dss_dsi2"
+- vdd-supply: power supply for DSI
+
+Optional nodes:
+- Video port for DSI output
+- DSI controlled peripherals
+
+DSI Endpoint required properties:
+- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-,
+  DATA1+, DATA1-, ...
+
+
+HDMI
+----
+
+Required properties:
+- compatible: "ti,omap4-hdmi"
+- reg: addresses and lengths of the register spaces for 'wp', 'pll', 'phy',
+       'core'
+- reg-names: "wp", "pll", "phy", "core"
+- interrupts: the HDMI interrupt line
+- ti,hwmods: "dss_hdmi"
+- vdda-supply: vdda power supply
+
+Optional nodes:
+- Video port for HDMI output
diff --git a/Documentation/devicetree/bindings/video/video-ports.txt b/Documentation/devicetree/bindings/video/video-ports.txt
new file mode 100644
index 000000000000..dad4c436caae
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/video-ports.txt
@@ -0,0 +1,22 @@
+Video Ports
+===========
+
+The video port bindings used for display devices is a superset of the v4l2 video
+ports described here:
+
+Documentation/devicetree/bindings/media/video-interfaces.txt
+
+The only difference is a more compact way to describe devices with only one
+endpoint. In cases like that, the 'ports' and 'port' nodes are not needed. For
+example, a DPI panel with a single input endpoint:
+
+lcd0: display@0 {
+	compatible = "samsung,lte430wq-f0c", "panel-dpi";
+
+	lcd_in: endpoint {
+		remote-endpoint = <&dpi_out>;
+	};
+};
+
+The rest of the bindings are the same as in v4l2 video port bindings and not
+described here.
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 33/41] Doc/DT: Add OMAP DSS DT Bindings
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add device tree bindings for OMAP Display Subsystem for the following
SoCs: OMAP2, OMAP3, OMAP4.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/ti,omap-dss.txt      | 197 +++++++++++++++++++++
 .../devicetree/bindings/video/ti,omap2-dss.txt     |  54 ++++++
 .../devicetree/bindings/video/ti,omap3-dss.txt     |  73 ++++++++
 .../devicetree/bindings/video/ti,omap4-dss.txt     |  99 +++++++++++
 .../devicetree/bindings/video/video-ports.txt      |  22 +++
 5 files changed, 445 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap2-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap3-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap4-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/video-ports.txt

diff --git a/Documentation/devicetree/bindings/video/ti,omap-dss.txt b/Documentation/devicetree/bindings/video/ti,omap-dss.txt
new file mode 100644
index 000000000000..3b3a7c09106c
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap-dss.txt
@@ -0,0 +1,197 @@
+Texas Instruments OMAP Display Subsystem
+====================
+
+Generic Description
+-------------------
+
+This document is a generic description of the OMAP Display Subsystem bindings.
+Binding details for each OMAP SoC version are described in respective binding
+documentation.
+
+The OMAP Display Subsystem (DSS) hardware consists of DSS Core, DISPC module and
+a number of encoder modules. All DSS versions contain DSS Core and DISPC, but
+the encoder modules vary.
+
+The DSS Core is the parent of the other DSS modules, and manages clock routing,
+integration to the SoC, etc.
+
+DISPC is the display controller, which reads pixels from the memory and outputs
+a RGB pixel stream to encoders.
+
+The encoder modules encode the received RGB pixel stream to a video output like
+HDMI, MIPI DPI, etc.
+
+Video Ports
+-----------
+
+The DSS Core and the encoders have video port outputs. The structure of the
+video ports is described in Documentation/devicetree/bindings/video/video-
+ports.txt, and the properties for the ports and endpoints for each encoder are
+described in the SoC's DSS binding documentation.
+
+The video ports are used to describe the connections to external hardware, like
+panels or external encoders.
+
+Aliases
+-------
+
+The board dts file may define aliases for displays to assign "displayX" style
+name for each display. If no aliases are defined, a semi-random number is used
+for the display.
+
+Example
+-------
+
+A shortened example of the DSS description for OMAP4, with non-relevant parts
+removed, defined in omap4.dtsi:
+
+dss: dss@58000000 {
+	compatible = "ti,omap4-dss", "simple-bus";
+	reg = <0x58000000 0x80>;
+	status = "disabled";
+	ti,hwmods = "dss_core";
+	#address-cells = <1>;
+	#size-cells = <1>;
+	ranges;
+
+	dispc@58001000 {
+		compatible = "ti,omap4-dispc";
+		reg = <0x58001000 0x1000>;
+		interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+		ti,hwmods = "dss_dispc";
+	};
+
+	hdmi: encoder@58006000 {
+		compatible = "ti,omap4-hdmi";
+		reg = <0x58006000 0x200>,
+		      <0x58006200 0x100>,
+		      <0x58006300 0x100>,
+		      <0x58006400 0x1000>;
+		reg-names = "wp", "pll", "phy", "core";
+		interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+		ti,hwmods = "dss_hdmi";
+	};
+};
+
+A shortened example of the board description for OMAP4 Panda board, defined in
+omap4-panda.dts.
+
+The Panda board has a DVI and a HDMI connector, and the board contains a TFP410
+chip (MIPI DPI to DVI encoder) and a TPD12S015 chip (HDMI ESD protection & level
+shifter). The video pipelines for the connectors are formed as follows:
+
+DSS Core --(MIPI DPI)--> TFP410 --(DVI)--> DVI Connector
+OMAP HDMI --(HDMI)--> TPD12S015 --(HDMI)--> HDMI COnnector
+
+/ {
+	aliases {
+		display0 = &dvi0;
+		display1 = &hdmi0;
+	};
+
+	tfp410: encoder@0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;	/* 0, power-down */
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tfp410_pins>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tfp410_in: endpoint@0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tfp410_out: endpoint@0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector@0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+
+	tpd12s015: encoder@1 {
+		compatible = "ti,tpd12s015";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpd12s015_pins>;
+
+		gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+			<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+			<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tpd12s015_in: endpoint@0 {
+					remote-endpoint = <&hdmi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tpd12s015_out: endpoint@0 {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
+		};
+	};
+
+	hdmi0: connector@1 {
+		compatible = "hdmi-connector";
+		label = "hdmi";
+
+		hdmi_connector_in: endpoint {
+			remote-endpoint = <&tpd12s015_out>;
+		};
+	};
+};
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+&hdmi {
+	status = "ok";
+	vdda-supply = <&vdac>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_hdmi_pins>;
+
+	hdmi_out: endpoint {
+		remote-endpoint = <&tpd12s015_in>;
+	};
+};
diff --git a/Documentation/devicetree/bindings/video/ti,omap2-dss.txt b/Documentation/devicetree/bindings/video/ti,omap2-dss.txt
new file mode 100644
index 000000000000..fa8bb2ed1170
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap2-dss.txt
@@ -0,0 +1,54 @@
+Texas Instruments OMAP2 Display Subsystem
+====================+
+See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic
+description about OMAP Display Subsystem bindings.
+
+DSS Core
+--------
+
+Required properties:
+- compatible: "ti,omap2-dss"
+- reg: address and length of the register space
+- ti,hwmods: "dss_core"
+
+Optional nodes:
+- Video port for DPI output
+
+DPI Endpoint required properties:
+- data-lines: number of lines used
+
+
+DISPC
+-----
+
+Required properties:
+- compatible: "ti,omap2-dispc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_dispc"
+- interrupts: the DISPC interrupt
+
+
+RFBI
+----
+
+Required properties:
+- compatible: "ti,omap2-rfbi"
+- reg: address and length of the register space
+- ti,hwmods: "dss_rfbi"
+
+
+VENC
+----
+
+Required properties:
+- compatible: "ti,omap2-venc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_venc"
+- vdda-supply: power supply for DAC
+
+VENC Endpoint required properties:
+
+Required properties:
+- ti,invert-polarity: invert the polarity of the video signal
+- ti,channels: 1 for composite, 2 for s-video
diff --git a/Documentation/devicetree/bindings/video/ti,omap3-dss.txt b/Documentation/devicetree/bindings/video/ti,omap3-dss.txt
new file mode 100644
index 000000000000..2b62c78c9596
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap3-dss.txt
@@ -0,0 +1,73 @@
+Texas Instruments OMAP3 Display Subsystem
+====================+
+See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic
+description about OMAP Display Subsystem bindings.
+
+DSS Core
+--------
+
+Required properties:
+- compatible: "ti,omap3-dss"
+- reg: address and length of the register space
+- ti,hwmods: "dss_core"
+
+Optional nodes:
+- Video ports:
+	- Port 0: DPI output
+	- Port 1: SDI output
+
+DPI Endpoint required properties:
+- data-lines: number of lines used
+
+SDI Endpoint required properties:
+- datapairs: number of datapairs used
+
+
+DISPC
+-----
+
+Required properties:
+- compatible: "ti,omap3-dispc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_dispc"
+- interrupts: the DISPC interrupt
+
+
+RFBI
+----
+
+Required properties:
+- compatible: "ti,omap3-rfbi"
+- reg: address and length of the register space
+- ti,hwmods: "dss_rfbi"
+
+
+VENC
+----
+
+Required properties:
+- compatible: "ti,omap3-venc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_venc"
+- vdda-supply: power supply for DAC
+
+VENC Endpoint required properties:
+- ti,invert-polarity: invert the polarity of the video signal
+- ti,channels: 1 for composite, 2 for s-video
+
+
+DSI
+---
+
+Required properties:
+- compatible: "ti,omap3-dsi"
+- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll'
+- reg-names: "proto", "phy", "pll"
+- interrupts: the DSI interrupt line
+- ti,hwmods: "dss_dsi1"
+- vdd-supply: power supply for DSI
+
+DSI Endpoint required properties:
+- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-,
+  DATA1+, DATA1-, ...
diff --git a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt
new file mode 100644
index 000000000000..37aa9e6a173e
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt
@@ -0,0 +1,99 @@
+Texas Instruments OMAP4 Display Subsystem
+====================+
+See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic
+description about OMAP Display Subsystem bindings.
+
+DSS Core
+--------
+
+Required properties:
+- compatible: "ti,omap4-dss"
+- reg: address and length of the register space
+- ti,hwmods: "dss_core"
+
+Required nodes:
+- DISPC
+
+Optional nodes:
+- DSS Submodules: RFBI, VENC, DSI, HDMI
+- Video port for DPI output
+
+DPI Endpoint required properties:
+- data-lines: number of lines used
+
+
+DISPC
+-----
+
+Required properties:
+- compatible: "ti,omap4-dispc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_dispc"
+- interrupts: the DISPC interrupt
+
+
+RFBI
+----
+
+Required properties:
+- compatible: "ti,omap4-rfbi"
+- reg: address and length of the register space
+- ti,hwmods: "dss_rfbi"
+
+Optional nodes:
+- Video port for RFBI output
+- RFBI controlled peripherals
+
+
+VENC
+----
+
+Required properties:
+- compatible: "ti,omap4-venc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_venc"
+- vdda-supply: power supply for DAC
+
+Optional nodes:
+- Video port for VENC output
+
+VENC Endpoint required properties:
+- ti,invert-polarity: invert the polarity of the video signal
+- ti,channels: 1 for composite, 2 for s-video
+
+
+DSI
+---
+
+Required properties:
+- compatible: "ti,omap4-dsi"
+- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll'
+- reg-names: "proto", "phy", "pll"
+- interrupts: the DSI interrupt line
+- ti,hwmods: "dss_dsi1" or "dss_dsi2"
+- vdd-supply: power supply for DSI
+
+Optional nodes:
+- Video port for DSI output
+- DSI controlled peripherals
+
+DSI Endpoint required properties:
+- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-,
+  DATA1+, DATA1-, ...
+
+
+HDMI
+----
+
+Required properties:
+- compatible: "ti,omap4-hdmi"
+- reg: addresses and lengths of the register spaces for 'wp', 'pll', 'phy',
+       'core'
+- reg-names: "wp", "pll", "phy", "core"
+- interrupts: the HDMI interrupt line
+- ti,hwmods: "dss_hdmi"
+- vdda-supply: vdda power supply
+
+Optional nodes:
+- Video port for HDMI output
diff --git a/Documentation/devicetree/bindings/video/video-ports.txt b/Documentation/devicetree/bindings/video/video-ports.txt
new file mode 100644
index 000000000000..dad4c436caae
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/video-ports.txt
@@ -0,0 +1,22 @@
+Video Ports
+=====+
+The video port bindings used for display devices is a superset of the v4l2 video
+ports described here:
+
+Documentation/devicetree/bindings/media/video-interfaces.txt
+
+The only difference is a more compact way to describe devices with only one
+endpoint. In cases like that, the 'ports' and 'port' nodes are not needed. For
+example, a DPI panel with a single input endpoint:
+
+lcd0: display@0 {
+	compatible = "samsung,lte430wq-f0c", "panel-dpi";
+
+	lcd_in: endpoint {
+		remote-endpoint = <&dpi_out>;
+	};
+};
+
+The rest of the bindings are the same as in v4l2 video port bindings and not
+described here.
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 33/41] Doc/DT: Add OMAP DSS DT Bindings
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add device tree bindings for OMAP Display Subsystem for the following
SoCs: OMAP2, OMAP3, OMAP4.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/ti,omap-dss.txt      | 197 +++++++++++++++++++++
 .../devicetree/bindings/video/ti,omap2-dss.txt     |  54 ++++++
 .../devicetree/bindings/video/ti,omap3-dss.txt     |  73 ++++++++
 .../devicetree/bindings/video/ti,omap4-dss.txt     |  99 +++++++++++
 .../devicetree/bindings/video/video-ports.txt      |  22 +++
 5 files changed, 445 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap2-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap3-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/ti,omap4-dss.txt
 create mode 100644 Documentation/devicetree/bindings/video/video-ports.txt

diff --git a/Documentation/devicetree/bindings/video/ti,omap-dss.txt b/Documentation/devicetree/bindings/video/ti,omap-dss.txt
new file mode 100644
index 000000000000..3b3a7c09106c
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap-dss.txt
@@ -0,0 +1,197 @@
+Texas Instruments OMAP Display Subsystem
+========================================
+
+Generic Description
+-------------------
+
+This document is a generic description of the OMAP Display Subsystem bindings.
+Binding details for each OMAP SoC version are described in respective binding
+documentation.
+
+The OMAP Display Subsystem (DSS) hardware consists of DSS Core, DISPC module and
+a number of encoder modules. All DSS versions contain DSS Core and DISPC, but
+the encoder modules vary.
+
+The DSS Core is the parent of the other DSS modules, and manages clock routing,
+integration to the SoC, etc.
+
+DISPC is the display controller, which reads pixels from the memory and outputs
+a RGB pixel stream to encoders.
+
+The encoder modules encode the received RGB pixel stream to a video output like
+HDMI, MIPI DPI, etc.
+
+Video Ports
+-----------
+
+The DSS Core and the encoders have video port outputs. The structure of the
+video ports is described in Documentation/devicetree/bindings/video/video-
+ports.txt, and the properties for the ports and endpoints for each encoder are
+described in the SoC's DSS binding documentation.
+
+The video ports are used to describe the connections to external hardware, like
+panels or external encoders.
+
+Aliases
+-------
+
+The board dts file may define aliases for displays to assign "displayX" style
+name for each display. If no aliases are defined, a semi-random number is used
+for the display.
+
+Example
+-------
+
+A shortened example of the DSS description for OMAP4, with non-relevant parts
+removed, defined in omap4.dtsi:
+
+dss: dss at 58000000 {
+	compatible = "ti,omap4-dss", "simple-bus";
+	reg = <0x58000000 0x80>;
+	status = "disabled";
+	ti,hwmods = "dss_core";
+	#address-cells = <1>;
+	#size-cells = <1>;
+	ranges;
+
+	dispc at 58001000 {
+		compatible = "ti,omap4-dispc";
+		reg = <0x58001000 0x1000>;
+		interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+		ti,hwmods = "dss_dispc";
+	};
+
+	hdmi: encoder at 58006000 {
+		compatible = "ti,omap4-hdmi";
+		reg = <0x58006000 0x200>,
+		      <0x58006200 0x100>,
+		      <0x58006300 0x100>,
+		      <0x58006400 0x1000>;
+		reg-names = "wp", "pll", "phy", "core";
+		interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+		ti,hwmods = "dss_hdmi";
+	};
+};
+
+A shortened example of the board description for OMAP4 Panda board, defined in
+omap4-panda.dts.
+
+The Panda board has a DVI and a HDMI connector, and the board contains a TFP410
+chip (MIPI DPI to DVI encoder) and a TPD12S015 chip (HDMI ESD protection & level
+shifter). The video pipelines for the connectors are formed as follows:
+
+DSS Core --(MIPI DPI)--> TFP410 --(DVI)--> DVI Connector
+OMAP HDMI --(HDMI)--> TPD12S015 --(HDMI)--> HDMI COnnector
+
+/ {
+	aliases {
+		display0 = &dvi0;
+		display1 = &hdmi0;
+	};
+
+	tfp410: encoder at 0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;	/* 0, power-down */
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tfp410_pins>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				tfp410_in: endpoint at 0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				tfp410_out: endpoint at 0 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector at 0 {
+		compatible = "dvi-connector";
+		label = "dvi";
+
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+
+	tpd12s015: encoder at 1 {
+		compatible = "ti,tpd12s015";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&tpd12s015_pins>;
+
+		gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+			<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+			<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+
+				tpd12s015_in: endpoint at 0 {
+					remote-endpoint = <&hdmi_out>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				tpd12s015_out: endpoint at 0 {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
+		};
+	};
+
+	hdmi0: connector at 1 {
+		compatible = "hdmi-connector";
+		label = "hdmi";
+
+		hdmi_connector_in: endpoint {
+			remote-endpoint = <&tpd12s015_out>;
+		};
+	};
+};
+
+&dss {
+	status = "ok";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_dpi_pins>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+&hdmi {
+	status = "ok";
+	vdda-supply = <&vdac>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&dss_hdmi_pins>;
+
+	hdmi_out: endpoint {
+		remote-endpoint = <&tpd12s015_in>;
+	};
+};
diff --git a/Documentation/devicetree/bindings/video/ti,omap2-dss.txt b/Documentation/devicetree/bindings/video/ti,omap2-dss.txt
new file mode 100644
index 000000000000..fa8bb2ed1170
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap2-dss.txt
@@ -0,0 +1,54 @@
+Texas Instruments OMAP2 Display Subsystem
+=========================================
+
+See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic
+description about OMAP Display Subsystem bindings.
+
+DSS Core
+--------
+
+Required properties:
+- compatible: "ti,omap2-dss"
+- reg: address and length of the register space
+- ti,hwmods: "dss_core"
+
+Optional nodes:
+- Video port for DPI output
+
+DPI Endpoint required properties:
+- data-lines: number of lines used
+
+
+DISPC
+-----
+
+Required properties:
+- compatible: "ti,omap2-dispc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_dispc"
+- interrupts: the DISPC interrupt
+
+
+RFBI
+----
+
+Required properties:
+- compatible: "ti,omap2-rfbi"
+- reg: address and length of the register space
+- ti,hwmods: "dss_rfbi"
+
+
+VENC
+----
+
+Required properties:
+- compatible: "ti,omap2-venc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_venc"
+- vdda-supply: power supply for DAC
+
+VENC Endpoint required properties:
+
+Required properties:
+- ti,invert-polarity: invert the polarity of the video signal
+- ti,channels: 1 for composite, 2 for s-video
diff --git a/Documentation/devicetree/bindings/video/ti,omap3-dss.txt b/Documentation/devicetree/bindings/video/ti,omap3-dss.txt
new file mode 100644
index 000000000000..2b62c78c9596
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap3-dss.txt
@@ -0,0 +1,73 @@
+Texas Instruments OMAP3 Display Subsystem
+=========================================
+
+See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic
+description about OMAP Display Subsystem bindings.
+
+DSS Core
+--------
+
+Required properties:
+- compatible: "ti,omap3-dss"
+- reg: address and length of the register space
+- ti,hwmods: "dss_core"
+
+Optional nodes:
+- Video ports:
+	- Port 0: DPI output
+	- Port 1: SDI output
+
+DPI Endpoint required properties:
+- data-lines: number of lines used
+
+SDI Endpoint required properties:
+- datapairs: number of datapairs used
+
+
+DISPC
+-----
+
+Required properties:
+- compatible: "ti,omap3-dispc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_dispc"
+- interrupts: the DISPC interrupt
+
+
+RFBI
+----
+
+Required properties:
+- compatible: "ti,omap3-rfbi"
+- reg: address and length of the register space
+- ti,hwmods: "dss_rfbi"
+
+
+VENC
+----
+
+Required properties:
+- compatible: "ti,omap3-venc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_venc"
+- vdda-supply: power supply for DAC
+
+VENC Endpoint required properties:
+- ti,invert-polarity: invert the polarity of the video signal
+- ti,channels: 1 for composite, 2 for s-video
+
+
+DSI
+---
+
+Required properties:
+- compatible: "ti,omap3-dsi"
+- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll'
+- reg-names: "proto", "phy", "pll"
+- interrupts: the DSI interrupt line
+- ti,hwmods: "dss_dsi1"
+- vdd-supply: power supply for DSI
+
+DSI Endpoint required properties:
+- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-,
+  DATA1+, DATA1-, ...
diff --git a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt
new file mode 100644
index 000000000000..37aa9e6a173e
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt
@@ -0,0 +1,99 @@
+Texas Instruments OMAP4 Display Subsystem
+=========================================
+
+See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic
+description about OMAP Display Subsystem bindings.
+
+DSS Core
+--------
+
+Required properties:
+- compatible: "ti,omap4-dss"
+- reg: address and length of the register space
+- ti,hwmods: "dss_core"
+
+Required nodes:
+- DISPC
+
+Optional nodes:
+- DSS Submodules: RFBI, VENC, DSI, HDMI
+- Video port for DPI output
+
+DPI Endpoint required properties:
+- data-lines: number of lines used
+
+
+DISPC
+-----
+
+Required properties:
+- compatible: "ti,omap4-dispc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_dispc"
+- interrupts: the DISPC interrupt
+
+
+RFBI
+----
+
+Required properties:
+- compatible: "ti,omap4-rfbi"
+- reg: address and length of the register space
+- ti,hwmods: "dss_rfbi"
+
+Optional nodes:
+- Video port for RFBI output
+- RFBI controlled peripherals
+
+
+VENC
+----
+
+Required properties:
+- compatible: "ti,omap4-venc"
+- reg: address and length of the register space
+- ti,hwmods: "dss_venc"
+- vdda-supply: power supply for DAC
+
+Optional nodes:
+- Video port for VENC output
+
+VENC Endpoint required properties:
+- ti,invert-polarity: invert the polarity of the video signal
+- ti,channels: 1 for composite, 2 for s-video
+
+
+DSI
+---
+
+Required properties:
+- compatible: "ti,omap4-dsi"
+- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll'
+- reg-names: "proto", "phy", "pll"
+- interrupts: the DSI interrupt line
+- ti,hwmods: "dss_dsi1" or "dss_dsi2"
+- vdd-supply: power supply for DSI
+
+Optional nodes:
+- Video port for DSI output
+- DSI controlled peripherals
+
+DSI Endpoint required properties:
+- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-,
+  DATA1+, DATA1-, ...
+
+
+HDMI
+----
+
+Required properties:
+- compatible: "ti,omap4-hdmi"
+- reg: addresses and lengths of the register spaces for 'wp', 'pll', 'phy',
+       'core'
+- reg-names: "wp", "pll", "phy", "core"
+- interrupts: the HDMI interrupt line
+- ti,hwmods: "dss_hdmi"
+- vdda-supply: vdda power supply
+
+Optional nodes:
+- Video port for HDMI output
diff --git a/Documentation/devicetree/bindings/video/video-ports.txt b/Documentation/devicetree/bindings/video/video-ports.txt
new file mode 100644
index 000000000000..dad4c436caae
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/video-ports.txt
@@ -0,0 +1,22 @@
+Video Ports
+===========
+
+The video port bindings used for display devices is a superset of the v4l2 video
+ports described here:
+
+Documentation/devicetree/bindings/media/video-interfaces.txt
+
+The only difference is a more compact way to describe devices with only one
+endpoint. In cases like that, the 'ports' and 'port' nodes are not needed. For
+example, a DPI panel with a single input endpoint:
+
+lcd0: display at 0 {
+	compatible = "samsung,lte430wq-f0c", "panel-dpi";
+
+	lcd_in: endpoint {
+		remote-endpoint = <&dpi_out>;
+	};
+};
+
+The rest of the bindings are the same as in v4l2 video port bindings and not
+described here.
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 34/41] Doc/DT: Add DT binding documentation for Analog TV Connector
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT binding documentation for Analog TV Connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../bindings/video/analog-tv-connector.txt         | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/analog-tv-connector.txt

diff --git a/Documentation/devicetree/bindings/video/analog-tv-connector.txt b/Documentation/devicetree/bindings/video/analog-tv-connector.txt
new file mode 100644
index 000000000000..d6be373d8705
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/analog-tv-connector.txt
@@ -0,0 +1,23 @@
+Analog TV Connector
+===================
+
+Required properties:
+- compatible: "composite-connector" or "svideo-connector"
+
+Optional properties:
+- label: a symbolic name for the connector
+
+Required nodes:
+- Video port for TV input
+
+Example
+-------
+
+tv: connector {
+	compatible = "composite-connector";
+	label = "tv";
+
+	tv_connector_in: endpoint {
+		remote-endpoint = <&venc_out>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 34/41] Doc/DT: Add DT binding documentation for Analog TV Connector
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for Analog TV Connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../bindings/video/analog-tv-connector.txt         | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/analog-tv-connector.txt

diff --git a/Documentation/devicetree/bindings/video/analog-tv-connector.txt b/Documentation/devicetree/bindings/video/analog-tv-connector.txt
new file mode 100644
index 000000000000..d6be373d8705
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/analog-tv-connector.txt
@@ -0,0 +1,23 @@
+Analog TV Connector
+=========+
+Required properties:
+- compatible: "composite-connector" or "svideo-connector"
+
+Optional properties:
+- label: a symbolic name for the connector
+
+Required nodes:
+- Video port for TV input
+
+Example
+-------
+
+tv: connector {
+	compatible = "composite-connector";
+	label = "tv";
+
+	tv_connector_in: endpoint {
+		remote-endpoint = <&venc_out>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 34/41] Doc/DT: Add DT binding documentation for Analog TV Connector
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for Analog TV Connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../bindings/video/analog-tv-connector.txt         | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/analog-tv-connector.txt

diff --git a/Documentation/devicetree/bindings/video/analog-tv-connector.txt b/Documentation/devicetree/bindings/video/analog-tv-connector.txt
new file mode 100644
index 000000000000..d6be373d8705
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/analog-tv-connector.txt
@@ -0,0 +1,23 @@
+Analog TV Connector
+===================
+
+Required properties:
+- compatible: "composite-connector" or "svideo-connector"
+
+Optional properties:
+- label: a symbolic name for the connector
+
+Required nodes:
+- Video port for TV input
+
+Example
+-------
+
+tv: connector {
+	compatible = "composite-connector";
+	label = "tv";
+
+	tv_connector_in: endpoint {
+		remote-endpoint = <&venc_out>;
+	};
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 35/41] Doc/DT: Add DT binding documentation for DVI Connector
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT binding documentation for DVI Connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/dvi-connector.txt    | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/dvi-connector.txt

diff --git a/Documentation/devicetree/bindings/video/dvi-connector.txt b/Documentation/devicetree/bindings/video/dvi-connector.txt
new file mode 100644
index 000000000000..6a0aff866c78
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/dvi-connector.txt
@@ -0,0 +1,26 @@
+DVI Connector
+==============
+
+Required properties:
+- compatible: "dvi-connector"
+
+Optional properties:
+- label: a symbolic name for the connector
+- i2c-bus: phandle to the i2c bus that is connected to DVI DDC
+
+Required nodes:
+- Video port for DVI input
+
+Example
+-------
+
+dvi0: connector@0 {
+	compatible = "dvi-connector";
+	label = "dvi";
+
+	i2c-bus = <&i2c3>;
+
+	dvi_connector_in: endpoint {
+		remote-endpoint = <&tfp410_out>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 35/41] Doc/DT: Add DT binding documentation for DVI Connector
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for DVI Connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/dvi-connector.txt    | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/dvi-connector.txt

diff --git a/Documentation/devicetree/bindings/video/dvi-connector.txt b/Documentation/devicetree/bindings/video/dvi-connector.txt
new file mode 100644
index 000000000000..6a0aff866c78
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/dvi-connector.txt
@@ -0,0 +1,26 @@
+DVI Connector
+=======
+
+Required properties:
+- compatible: "dvi-connector"
+
+Optional properties:
+- label: a symbolic name for the connector
+- i2c-bus: phandle to the i2c bus that is connected to DVI DDC
+
+Required nodes:
+- Video port for DVI input
+
+Example
+-------
+
+dvi0: connector@0 {
+	compatible = "dvi-connector";
+	label = "dvi";
+
+	i2c-bus = <&i2c3>;
+
+	dvi_connector_in: endpoint {
+		remote-endpoint = <&tfp410_out>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 35/41] Doc/DT: Add DT binding documentation for DVI Connector
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for DVI Connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/dvi-connector.txt    | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/dvi-connector.txt

diff --git a/Documentation/devicetree/bindings/video/dvi-connector.txt b/Documentation/devicetree/bindings/video/dvi-connector.txt
new file mode 100644
index 000000000000..6a0aff866c78
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/dvi-connector.txt
@@ -0,0 +1,26 @@
+DVI Connector
+==============
+
+Required properties:
+- compatible: "dvi-connector"
+
+Optional properties:
+- label: a symbolic name for the connector
+- i2c-bus: phandle to the i2c bus that is connected to DVI DDC
+
+Required nodes:
+- Video port for DVI input
+
+Example
+-------
+
+dvi0: connector at 0 {
+	compatible = "dvi-connector";
+	label = "dvi";
+
+	i2c-bus = <&i2c3>;
+
+	dvi_connector_in: endpoint {
+		remote-endpoint = <&tfp410_out>;
+	};
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 36/41] Doc/DT: Add DT binding documentation for HDMI Connector
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT binding documentation for HDMI Connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/hdmi-connector.txt   | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/hdmi-connector.txt

diff --git a/Documentation/devicetree/bindings/video/hdmi-connector.txt b/Documentation/devicetree/bindings/video/hdmi-connector.txt
new file mode 100644
index 000000000000..5d25f6a432bb
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/hdmi-connector.txt
@@ -0,0 +1,23 @@
+HDMI Connector
+==============
+
+Required properties:
+- compatible: "hdmi-connector"
+
+Optional properties:
+- label: a symbolic name for the connector
+
+Required nodes:
+- Video port for HDMI input
+
+Example
+-------
+
+hdmi0: connector@1 {
+	compatible = "hdmi-connector";
+	label = "hdmi";
+
+	hdmi_connector_in: endpoint {
+		remote-endpoint = <&tpd12s015_out>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 36/41] Doc/DT: Add DT binding documentation for HDMI Connector
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for HDMI Connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/hdmi-connector.txt   | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/hdmi-connector.txt

diff --git a/Documentation/devicetree/bindings/video/hdmi-connector.txt b/Documentation/devicetree/bindings/video/hdmi-connector.txt
new file mode 100644
index 000000000000..5d25f6a432bb
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/hdmi-connector.txt
@@ -0,0 +1,23 @@
+HDMI Connector
+=======
+
+Required properties:
+- compatible: "hdmi-connector"
+
+Optional properties:
+- label: a symbolic name for the connector
+
+Required nodes:
+- Video port for HDMI input
+
+Example
+-------
+
+hdmi0: connector@1 {
+	compatible = "hdmi-connector";
+	label = "hdmi";
+
+	hdmi_connector_in: endpoint {
+		remote-endpoint = <&tpd12s015_out>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 36/41] Doc/DT: Add DT binding documentation for HDMI Connector
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for HDMI Connector.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/hdmi-connector.txt   | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/hdmi-connector.txt

diff --git a/Documentation/devicetree/bindings/video/hdmi-connector.txt b/Documentation/devicetree/bindings/video/hdmi-connector.txt
new file mode 100644
index 000000000000..5d25f6a432bb
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/hdmi-connector.txt
@@ -0,0 +1,23 @@
+HDMI Connector
+==============
+
+Required properties:
+- compatible: "hdmi-connector"
+
+Optional properties:
+- label: a symbolic name for the connector
+
+Required nodes:
+- Video port for HDMI input
+
+Example
+-------
+
+hdmi0: connector at 1 {
+	compatible = "hdmi-connector";
+	label = "hdmi";
+
+	hdmi_connector_in: endpoint {
+		remote-endpoint = <&tpd12s015_out>;
+	};
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 37/41] Doc/DT: Add DT binding documentation for MIPI DPI Panel
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT binding documentation for MIPI DPI Panel.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/panel-dpi.txt        | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/panel-dpi.txt

diff --git a/Documentation/devicetree/bindings/video/panel-dpi.txt b/Documentation/devicetree/bindings/video/panel-dpi.txt
new file mode 100644
index 000000000000..72636c6f1c67
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/panel-dpi.txt
@@ -0,0 +1,43 @@
+Generic MIPI DPI Panel
+======================
+
+Required properties:
+- compatible: "panel-dpi"
+
+Optional properties:
+- label: a symbolic name for the panel
+- gpios: panel enable gpio and backlight enable gpio
+
+Required nodes:
+- "panel-timing" containing video timings
+  (Documentation/devicetree/bindings/video/display-timing.txt)
+- Video port for DPI input
+
+Example
+-------
+
+lcd0: display@0 {
+        compatible = "samsung,lte430wq-f0c", "panel-dpi";
+        label = "lcd";
+
+        lcd_in: endpoint {
+                remote-endpoint = <&dpi_out>;
+        };
+
+        panel-timing {
+                clock-frequency = <9200000>;
+                hactive = <480>;
+                vactive = <272>;
+                hfront-porch = <8>;
+                hback-porch = <4>;
+                hsync-len = <41>;
+                vback-porch = <2>;
+                vfront-porch = <4>;
+                vsync-len = <10>;
+
+                hsync-active = <0>;
+                vsync-active = <0>;
+                de-active = <1>;
+                pixelclk-active = <1>;
+        };
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 37/41] Doc/DT: Add DT binding documentation for MIPI DPI Panel
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for MIPI DPI Panel.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/panel-dpi.txt        | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/panel-dpi.txt

diff --git a/Documentation/devicetree/bindings/video/panel-dpi.txt b/Documentation/devicetree/bindings/video/panel-dpi.txt
new file mode 100644
index 000000000000..72636c6f1c67
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/panel-dpi.txt
@@ -0,0 +1,43 @@
+Generic MIPI DPI Panel
+===========
+
+Required properties:
+- compatible: "panel-dpi"
+
+Optional properties:
+- label: a symbolic name for the panel
+- gpios: panel enable gpio and backlight enable gpio
+
+Required nodes:
+- "panel-timing" containing video timings
+  (Documentation/devicetree/bindings/video/display-timing.txt)
+- Video port for DPI input
+
+Example
+-------
+
+lcd0: display@0 {
+        compatible = "samsung,lte430wq-f0c", "panel-dpi";
+        label = "lcd";
+
+        lcd_in: endpoint {
+                remote-endpoint = <&dpi_out>;
+        };
+
+        panel-timing {
+                clock-frequency = <9200000>;
+                hactive = <480>;
+                vactive = <272>;
+                hfront-porch = <8>;
+                hback-porch = <4>;
+                hsync-len = <41>;
+                vback-porch = <2>;
+                vfront-porch = <4>;
+                vsync-len = <10>;
+
+                hsync-active = <0>;
+                vsync-active = <0>;
+                de-active = <1>;
+                pixelclk-active = <1>;
+        };
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 37/41] Doc/DT: Add DT binding documentation for MIPI DPI Panel
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for MIPI DPI Panel.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/panel-dpi.txt        | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/panel-dpi.txt

diff --git a/Documentation/devicetree/bindings/video/panel-dpi.txt b/Documentation/devicetree/bindings/video/panel-dpi.txt
new file mode 100644
index 000000000000..72636c6f1c67
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/panel-dpi.txt
@@ -0,0 +1,43 @@
+Generic MIPI DPI Panel
+======================
+
+Required properties:
+- compatible: "panel-dpi"
+
+Optional properties:
+- label: a symbolic name for the panel
+- gpios: panel enable gpio and backlight enable gpio
+
+Required nodes:
+- "panel-timing" containing video timings
+  (Documentation/devicetree/bindings/video/display-timing.txt)
+- Video port for DPI input
+
+Example
+-------
+
+lcd0: display at 0 {
+        compatible = "samsung,lte430wq-f0c", "panel-dpi";
+        label = "lcd";
+
+        lcd_in: endpoint {
+                remote-endpoint = <&dpi_out>;
+        };
+
+        panel-timing {
+                clock-frequency = <9200000>;
+                hactive = <480>;
+                vactive = <272>;
+                hfront-porch = <8>;
+                hback-porch = <4>;
+                hsync-len = <41>;
+                vback-porch = <2>;
+                vfront-porch = <4>;
+                vsync-len = <10>;
+
+                hsync-active = <0>;
+                vsync-active = <0>;
+                de-active = <1>;
+                pixelclk-active = <1>;
+        };
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 38/41] Doc/DT: Add DT binding documentation for MIPI DSI CM Panel
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT binding documentation for MIPI DSI Command Mode Panel.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/panel-dsi-cm.txt     | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/panel-dsi-cm.txt

diff --git a/Documentation/devicetree/bindings/video/panel-dsi-cm.txt b/Documentation/devicetree/bindings/video/panel-dsi-cm.txt
new file mode 100644
index 000000000000..73f422556d4f
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/panel-dsi-cm.txt
@@ -0,0 +1,26 @@
+Generic MIPI DSI Command Mode Panel
+===================================
+
+Required properties:
+- compatible: "panel-dsi-cm"
+
+Optional properties:
+- label: a symbolic name for the panel
+- gpios: panel reset gpio and TE gpio
+
+Required nodes:
+- Video port for DSI input
+
+Example
+-------
+
+lcd0: display {
+	compatible = "tpo,taal", "panel-dsi-cm";
+	label = "lcd0";
+
+	gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>;	/* 102, reset */
+
+	lcd0_in: endpoint {
+		remote-endpoint = <&dsi1_out_ep>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 38/41] Doc/DT: Add DT binding documentation for MIPI DSI CM Panel
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for MIPI DSI Command Mode Panel.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/panel-dsi-cm.txt     | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/panel-dsi-cm.txt

diff --git a/Documentation/devicetree/bindings/video/panel-dsi-cm.txt b/Documentation/devicetree/bindings/video/panel-dsi-cm.txt
new file mode 100644
index 000000000000..73f422556d4f
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/panel-dsi-cm.txt
@@ -0,0 +1,26 @@
+Generic MIPI DSI Command Mode Panel
+=================+
+Required properties:
+- compatible: "panel-dsi-cm"
+
+Optional properties:
+- label: a symbolic name for the panel
+- gpios: panel reset gpio and TE gpio
+
+Required nodes:
+- Video port for DSI input
+
+Example
+-------
+
+lcd0: display {
+	compatible = "tpo,taal", "panel-dsi-cm";
+	label = "lcd0";
+
+	gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>;	/* 102, reset */
+
+	lcd0_in: endpoint {
+		remote-endpoint = <&dsi1_out_ep>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 38/41] Doc/DT: Add DT binding documentation for MIPI DSI CM Panel
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for MIPI DSI Command Mode Panel.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/panel-dsi-cm.txt     | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/panel-dsi-cm.txt

diff --git a/Documentation/devicetree/bindings/video/panel-dsi-cm.txt b/Documentation/devicetree/bindings/video/panel-dsi-cm.txt
new file mode 100644
index 000000000000..73f422556d4f
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/panel-dsi-cm.txt
@@ -0,0 +1,26 @@
+Generic MIPI DSI Command Mode Panel
+===================================
+
+Required properties:
+- compatible: "panel-dsi-cm"
+
+Optional properties:
+- label: a symbolic name for the panel
+- gpios: panel reset gpio and TE gpio
+
+Required nodes:
+- Video port for DSI input
+
+Example
+-------
+
+lcd0: display {
+	compatible = "tpo,taal", "panel-dsi-cm";
+	label = "lcd0";
+
+	gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>;	/* 102, reset */
+
+	lcd0_in: endpoint {
+		remote-endpoint = <&dsi1_out_ep>;
+	};
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 39/41] Doc/DT: Add DT binding documentation for Sony acx565akm panel
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT binding documentation for Sony acx565akm panel

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/sony,acx565akm.txt   | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt

diff --git a/Documentation/devicetree/bindings/video/sony,acx565akm.txt b/Documentation/devicetree/bindings/video/sony,acx565akm.txt
new file mode 100644
index 000000000000..cd9cfdf7e3fe
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/sony,acx565akm.txt
@@ -0,0 +1,28 @@
+Sony ACX565AKM SDI Panel
+========================
+
+Required properties:
+- compatible: "sony,acx565akm"
+
+Optional properties:
+- label: a symbolic name for the panel
+- gpios: panel reset gpio
+
+Required nodes:
+- Video port for SDI input
+
+Example
+-------
+
+acx565akm@2 {
+	compatible = "sony,acx565akm";
+	spi-max-frequency = <6000000>;
+	reg = <2>;
+
+	label = "lcd";
+	gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */
+
+	lcd_in: endpoint {
+		remote-endpoint = <&sdi_out>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 39/41] Doc/DT: Add DT binding documentation for Sony acx565akm panel
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for Sony acx565akm panel

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/sony,acx565akm.txt   | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt

diff --git a/Documentation/devicetree/bindings/video/sony,acx565akm.txt b/Documentation/devicetree/bindings/video/sony,acx565akm.txt
new file mode 100644
index 000000000000..cd9cfdf7e3fe
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/sony,acx565akm.txt
@@ -0,0 +1,28 @@
+Sony ACX565AKM SDI Panel
+============
+
+Required properties:
+- compatible: "sony,acx565akm"
+
+Optional properties:
+- label: a symbolic name for the panel
+- gpios: panel reset gpio
+
+Required nodes:
+- Video port for SDI input
+
+Example
+-------
+
+acx565akm@2 {
+	compatible = "sony,acx565akm";
+	spi-max-frequency = <6000000>;
+	reg = <2>;
+
+	label = "lcd";
+	gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */
+
+	lcd_in: endpoint {
+		remote-endpoint = <&sdi_out>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 39/41] Doc/DT: Add DT binding documentation for Sony acx565akm panel
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for Sony acx565akm panel

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/sony,acx565akm.txt   | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt

diff --git a/Documentation/devicetree/bindings/video/sony,acx565akm.txt b/Documentation/devicetree/bindings/video/sony,acx565akm.txt
new file mode 100644
index 000000000000..cd9cfdf7e3fe
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/sony,acx565akm.txt
@@ -0,0 +1,28 @@
+Sony ACX565AKM SDI Panel
+========================
+
+Required properties:
+- compatible: "sony,acx565akm"
+
+Optional properties:
+- label: a symbolic name for the panel
+- gpios: panel reset gpio
+
+Required nodes:
+- Video port for SDI input
+
+Example
+-------
+
+acx565akm at 2 {
+	compatible = "sony,acx565akm";
+	spi-max-frequency = <6000000>;
+	reg = <2>;
+
+	label = "lcd";
+	gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* 90 */
+
+	lcd_in: endpoint {
+		remote-endpoint = <&sdi_out>;
+	};
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 40/41] Doc/DT: Add DT binding documentation for TFP410 encoder
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT binding documentation for TFP410 encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/ti,tfp410.txt        | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ti,tfp410.txt

diff --git a/Documentation/devicetree/bindings/video/ti,tfp410.txt b/Documentation/devicetree/bindings/video/ti,tfp410.txt
new file mode 100644
index 000000000000..6a5a04627584
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,tfp410.txt
@@ -0,0 +1,41 @@
+TFP410 DPI to DVI encoder
+=========================
+
+Required properties:
+- compatible: "ti,tfp410"
+
+Optional properties:
+- gpios: power-down gpio
+
+Required nodes:
+- Video port 0 for DPI input
+- Video port 1 for DVI output
+
+Example
+-------
+
+tfp410: encoder@0 {
+	compatible = "ti,tfp410";
+	gpios = <&twl_gpio 2 GPIO_ACTIVE_LOW>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			tfp410_in: endpoint@0 {
+				remote-endpoint = <&dpi_out>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			tfp410_out: endpoint@0 {
+				remote-endpoint = <&dvi_connector_in>;
+			};
+		};
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 40/41] Doc/DT: Add DT binding documentation for TFP410 encoder
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for TFP410 encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/ti,tfp410.txt        | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ti,tfp410.txt

diff --git a/Documentation/devicetree/bindings/video/ti,tfp410.txt b/Documentation/devicetree/bindings/video/ti,tfp410.txt
new file mode 100644
index 000000000000..6a5a04627584
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,tfp410.txt
@@ -0,0 +1,41 @@
+TFP410 DPI to DVI encoder
+============+
+Required properties:
+- compatible: "ti,tfp410"
+
+Optional properties:
+- gpios: power-down gpio
+
+Required nodes:
+- Video port 0 for DPI input
+- Video port 1 for DVI output
+
+Example
+-------
+
+tfp410: encoder@0 {
+	compatible = "ti,tfp410";
+	gpios = <&twl_gpio 2 GPIO_ACTIVE_LOW>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			tfp410_in: endpoint@0 {
+				remote-endpoint = <&dpi_out>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			tfp410_out: endpoint@0 {
+				remote-endpoint = <&dvi_connector_in>;
+			};
+		};
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 40/41] Doc/DT: Add DT binding documentation for TFP410 encoder
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for TFP410 encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/ti,tfp410.txt        | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ti,tfp410.txt

diff --git a/Documentation/devicetree/bindings/video/ti,tfp410.txt b/Documentation/devicetree/bindings/video/ti,tfp410.txt
new file mode 100644
index 000000000000..6a5a04627584
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,tfp410.txt
@@ -0,0 +1,41 @@
+TFP410 DPI to DVI encoder
+=========================
+
+Required properties:
+- compatible: "ti,tfp410"
+
+Optional properties:
+- gpios: power-down gpio
+
+Required nodes:
+- Video port 0 for DPI input
+- Video port 1 for DVI output
+
+Example
+-------
+
+tfp410: encoder at 0 {
+	compatible = "ti,tfp410";
+	gpios = <&twl_gpio 2 GPIO_ACTIVE_LOW>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port at 0 {
+			reg = <0>;
+
+			tfp410_in: endpoint at 0 {
+				remote-endpoint = <&dpi_out>;
+			};
+		};
+
+		port at 1 {
+			reg = <1>;
+
+			tfp410_out: endpoint at 0 {
+				remote-endpoint = <&dvi_connector_in>;
+			};
+		};
+	};
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 41/41] Doc/DT: Add DT binding documentation for tpd12s015 encoder
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 10:57   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard,
	Tomi Valkeinen

Add DT binding documentation for tpd12s015 encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/ti,tpd12s015.txt     | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ti,tpd12s015.txt

diff --git a/Documentation/devicetree/bindings/video/ti,tpd12s015.txt b/Documentation/devicetree/bindings/video/ti,tpd12s015.txt
new file mode 100644
index 000000000000..26e6d32e3f20
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,tpd12s015.txt
@@ -0,0 +1,44 @@
+TPD12S015 HDMI level shifter and ESD protection chip
+====================================================
+
+Required properties:
+- compatible: "ti,tpd12s015"
+
+Optional properties:
+- gpios: CT CP HPD, LS OE and HPD gpios
+
+Required nodes:
+- Video port 0 for HDMI input
+- Video port 1 for HDMI output
+
+Example
+-------
+
+tpd12s015: encoder@1 {
+	compatible = "ti,tpd12s015";
+
+	gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+		<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+		<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			tpd12s015_in: endpoint@0 {
+				remote-endpoint = <&hdmi_out>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			tpd12s015_out: endpoint@0 {
+				remote-endpoint = <&hdmi_connector_in>;
+			};
+		};
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 41/41] Doc/DT: Add DT binding documentation for tpd12s015 encoder
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for tpd12s015 encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/ti,tpd12s015.txt     | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ti,tpd12s015.txt

diff --git a/Documentation/devicetree/bindings/video/ti,tpd12s015.txt b/Documentation/devicetree/bindings/video/ti,tpd12s015.txt
new file mode 100644
index 000000000000..26e6d32e3f20
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,tpd12s015.txt
@@ -0,0 +1,44 @@
+TPD12S015 HDMI level shifter and ESD protection chip
+==========================
+
+Required properties:
+- compatible: "ti,tpd12s015"
+
+Optional properties:
+- gpios: CT CP HPD, LS OE and HPD gpios
+
+Required nodes:
+- Video port 0 for HDMI input
+- Video port 1 for HDMI output
+
+Example
+-------
+
+tpd12s015: encoder@1 {
+	compatible = "ti,tpd12s015";
+
+	gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+		<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+		<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			tpd12s015_in: endpoint@0 {
+				remote-endpoint = <&hdmi_out>;
+			};
+		};
+
+		port@1 {
+			reg = <1>;
+
+			tpd12s015_out: endpoint@0 {
+				remote-endpoint = <&hdmi_connector_in>;
+			};
+		};
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 41/41] Doc/DT: Add DT binding documentation for tpd12s015 encoder
@ 2014-01-21 10:57   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-21 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

Add DT binding documentation for tpd12s015 encoder

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 .../devicetree/bindings/video/ti,tpd12s015.txt     | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/ti,tpd12s015.txt

diff --git a/Documentation/devicetree/bindings/video/ti,tpd12s015.txt b/Documentation/devicetree/bindings/video/ti,tpd12s015.txt
new file mode 100644
index 000000000000..26e6d32e3f20
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,tpd12s015.txt
@@ -0,0 +1,44 @@
+TPD12S015 HDMI level shifter and ESD protection chip
+====================================================
+
+Required properties:
+- compatible: "ti,tpd12s015"
+
+Optional properties:
+- gpios: CT CP HPD, LS OE and HPD gpios
+
+Required nodes:
+- Video port 0 for HDMI input
+- Video port 1 for HDMI output
+
+Example
+-------
+
+tpd12s015: encoder at 1 {
+	compatible = "ti,tpd12s015";
+
+	gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
+		<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
+		<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port at 0 {
+			reg = <0>;
+
+			tpd12s015_in: endpoint at 0 {
+				remote-endpoint = <&hdmi_out>;
+			};
+		};
+
+		port at 1 {
+			reg = <1>;
+
+			tpd12s015_out: endpoint at 0 {
+				remote-endpoint = <&hdmi_connector_in>;
+			};
+		};
+	};
+};
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 30/41] ARM: omap3-n900.dts: add display information
  2014-01-21 10:57   ` Tomi Valkeinen
  (?)
@ 2014-01-21 15:26     ` Sebastian Reichel
  -1 siblings, 0 replies; 192+ messages in thread
From: Sebastian Reichel @ 2014-01-21 15:26 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Javier Martinez Canillas, Enric Balletbo Serra,
	Florian Vaussard

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

On Tue, Jan 21, 2014 at 12:57:02PM +0200, Tomi Valkeinen wrote:
> Add DT data for OMAP3 N900 board. The board has the following
> displays:
> 
> lcd: LCD panel connected to OMAP's SDI output
> tv: analog svideo
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Your dss-dt-review-3 branch boots on my N900 with working display.

Tested-by: Sebastian Reichel <sre@debian.org>

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 30/41] ARM: omap3-n900.dts: add display information
@ 2014-01-21 15:26     ` Sebastian Reichel
  0 siblings, 0 replies; 192+ messages in thread
From: Sebastian Reichel @ 2014-01-21 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

On Tue, Jan 21, 2014 at 12:57:02PM +0200, Tomi Valkeinen wrote:
> Add DT data for OMAP3 N900 board. The board has the following
> displays:
> 
> lcd: LCD panel connected to OMAP's SDI output
> tv: analog svideo
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Your dss-dt-review-3 branch boots on my N900 with working display.

Tested-by: Sebastian Reichel <sre@debian.org>

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 30/41] ARM: omap3-n900.dts: add display information
@ 2014-01-21 15:26     ` Sebastian Reichel
  0 siblings, 0 replies; 192+ messages in thread
From: Sebastian Reichel @ 2014-01-21 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 21, 2014 at 12:57:02PM +0200, Tomi Valkeinen wrote:
> Add DT data for OMAP3 N900 board. The board has the following
> displays:
> 
> lcd: LCD panel connected to OMAP's SDI output
> tv: analog svideo
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Your dss-dt-review-3 branch boots on my N900 with working display.

Tested-by: Sebastian Reichel <sre@debian.org>

-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140121/7ad69e80/attachment.sig>

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 39/41] Doc/DT: Add DT binding documentation for Sony acx565akm panel
  2014-01-21 10:57   ` Tomi Valkeinen
  (?)
@ 2014-01-21 15:28     ` Sebastian Reichel
  -1 siblings, 0 replies; 192+ messages in thread
From: Sebastian Reichel @ 2014-01-21 15:28 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Javier Martinez Canillas, Enric Balletbo Serra,
	Florian Vaussard

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

On Tue, Jan 21, 2014 at 12:57:11PM +0200, Tomi Valkeinen wrote:
> Add DT binding documentation for Sony acx565akm panel
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Reviewed-by: Sebastian Reichel <sre@debian.org>

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 39/41] Doc/DT: Add DT binding documentation for Sony acx565akm panel
@ 2014-01-21 15:28     ` Sebastian Reichel
  0 siblings, 0 replies; 192+ messages in thread
From: Sebastian Reichel @ 2014-01-21 15:28 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

On Tue, Jan 21, 2014 at 12:57:11PM +0200, Tomi Valkeinen wrote:
> Add DT binding documentation for Sony acx565akm panel
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Reviewed-by: Sebastian Reichel <sre@debian.org>

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 39/41] Doc/DT: Add DT binding documentation for Sony acx565akm panel
@ 2014-01-21 15:28     ` Sebastian Reichel
  0 siblings, 0 replies; 192+ messages in thread
From: Sebastian Reichel @ 2014-01-21 15:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 21, 2014 at 12:57:11PM +0200, Tomi Valkeinen wrote:
> Add DT binding documentation for Sony acx565akm panel
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

Reviewed-by: Sebastian Reichel <sre@debian.org>

-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140121/57e87725/attachment.sig>

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-21 21:29   ` Nishanth Menon
  -1 siblings, 0 replies; 192+ messages in thread
From: Nishanth Menon @ 2014-01-21 21:29 UTC (permalink / raw)
  To: Tomi Valkeinen, linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Darren Etheridge, Sebastian Reichel, Tony Lindgren,
	Sebastian Reichel, Stefan Roese, Enric Balletbo Serra,
	Archit Taneja, Laurent Pinchart, Dr . H . Nikolaus Schaller,
	Marek Belisko, Robert Nelson, Javier Martinez Canillas,
	Florian Vaussard

Tomi,

On 01/21/2014 04:56 AM, Tomi Valkeinen wrote:
> Hi,
> 
> Here's version 3 of the DSS DT series.
> 
> The previous version can be found from:
> 
> v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249
> v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866
> 
> The main changes to v2 are:
> 
> - DT Binding documentation
> - OMAP2 DSS support
> - Split DSI register space
> - DSS nodes disabled by default
> - Hack to have generic DT bindings but OMAP specific drivers (for now)
> 
> This series can also be found from:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3
> 
http://slexy.org/view/s20JhteOFR is my quick build test report -> few
checkpatch and build bisect issues would probably need fixing.



-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-01-21 21:29   ` Nishanth Menon
  0 siblings, 0 replies; 192+ messages in thread
From: Nishanth Menon @ 2014-01-21 21:29 UTC (permalink / raw)
  To: linux-arm-kernel

Tomi,

On 01/21/2014 04:56 AM, Tomi Valkeinen wrote:
> Hi,
> 
> Here's version 3 of the DSS DT series.
> 
> The previous version can be found from:
> 
> v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249
> v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866
> 
> The main changes to v2 are:
> 
> - DT Binding documentation
> - OMAP2 DSS support
> - Split DSI register space
> - DSS nodes disabled by default
> - Hack to have generic DT bindings but OMAP specific drivers (for now)
> 
> This series can also be found from:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3
> 
http://slexy.org/view/s20JhteOFR is my quick build test report -> few
checkpatch and build bisect issues would probably need fixing.



-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-01-21 21:29   ` Nishanth Menon
  0 siblings, 0 replies; 192+ messages in thread
From: Nishanth Menon @ 2014-01-21 21:29 UTC (permalink / raw)
  To: linux-arm-kernel

Tomi,

On 01/21/2014 04:56 AM, Tomi Valkeinen wrote:
> Hi,
> 
> Here's version 3 of the DSS DT series.
> 
> The previous version can be found from:
> 
> v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249
> v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866
> 
> The main changes to v2 are:
> 
> - DT Binding documentation
> - OMAP2 DSS support
> - Split DSI register space
> - DSS nodes disabled by default
> - Hack to have generic DT bindings but OMAP specific drivers (for now)
> 
> This series can also be found from:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3
> 
http://slexy.org/view/s20JhteOFR is my quick build test report -> few
checkpatch and build bisect issues would probably need fixing.



-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
  2014-01-21 21:29   ` Nishanth Menon
  (?)
@ 2014-01-22  8:41     ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-22  8:41 UTC (permalink / raw)
  To: Nishanth Menon, linux-arm-kernel, linux-omap, linux-fbdev, devicetree
  Cc: Darren Etheridge, Sebastian Reichel, Tony Lindgren,
	Sebastian Reichel, Stefan Roese, Enric Balletbo Serra,
	Archit Taneja, Laurent Pinchart, Dr . H . Nikolaus Schaller,
	Marek Belisko, Robert Nelson, Javier Martinez Canillas,
	Florian Vaussard


[-- Attachment #1.1: Type: text/plain, Size: 1123 bytes --]

On 2014-01-21 23:29, Nishanth Menon wrote:
> Tomi,
> 
> On 01/21/2014 04:56 AM, Tomi Valkeinen wrote:
>> Hi,
>>
>> Here's version 3 of the DSS DT series.
>>
>> The previous version can be found from:
>>
>> v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249
>> v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866
>>
>> The main changes to v2 are:
>>
>> - DT Binding documentation
>> - OMAP2 DSS support
>> - Split DSI register space
>> - DSS nodes disabled by default
>> - Hack to have generic DT bindings but OMAP specific drivers (for now)
>>
>> This series can also be found from:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3
>>
> http://slexy.org/view/s20JhteOFR is my quick build test report -> few
> checkpatch and build bisect issues would probably need fixing.

Thanks. Shouldn't make trivial changes, and then not run a full
commit-by-commit compile test...

I fixed the issues and pushed the branch again to work/dss-dt-review-3.
The fixes are minor, so the already posted series can be reviewed.

 Tomi



[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-01-22  8:41     ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-22  8:41 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]

On 2014-01-21 23:29, Nishanth Menon wrote:
> Tomi,
> 
> On 01/21/2014 04:56 AM, Tomi Valkeinen wrote:
>> Hi,
>>
>> Here's version 3 of the DSS DT series.
>>
>> The previous version can be found from:
>>
>> v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249
>> v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866
>>
>> The main changes to v2 are:
>>
>> - DT Binding documentation
>> - OMAP2 DSS support
>> - Split DSI register space
>> - DSS nodes disabled by default
>> - Hack to have generic DT bindings but OMAP specific drivers (for now)
>>
>> This series can also be found from:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3
>>
> http://slexy.org/view/s20JhteOFR is my quick build test report -> few
> checkpatch and build bisect issues would probably need fixing.

Thanks. Shouldn't make trivial changes, and then not run a full
commit-by-commit compile test...

I fixed the issues and pushed the branch again to work/dss-dt-review-3.
The fixes are minor, so the already posted series can be reviewed.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-01-22  8:41     ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-22  8:41 UTC (permalink / raw)
  To: linux-arm-kernel

On 2014-01-21 23:29, Nishanth Menon wrote:
> Tomi,
> 
> On 01/21/2014 04:56 AM, Tomi Valkeinen wrote:
>> Hi,
>>
>> Here's version 3 of the DSS DT series.
>>
>> The previous version can be found from:
>>
>> v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249
>> v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866
>>
>> The main changes to v2 are:
>>
>> - DT Binding documentation
>> - OMAP2 DSS support
>> - Split DSI register space
>> - DSS nodes disabled by default
>> - Hack to have generic DT bindings but OMAP specific drivers (for now)
>>
>> This series can also be found from:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3
>>
> http://slexy.org/view/s20JhteOFR is my quick build test report -> few
> checkpatch and build bisect issues would probably need fixing.

Thanks. Shouldn't make trivial changes, and then not run a full
commit-by-commit compile test...

I fixed the issues and pushed the branch again to work/dss-dt-review-3.
The fixes are minor, so the already posted series can be reviewed.

 Tomi


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140122/257a5b6c/attachment.sig>

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 30/41] ARM: omap3-n900.dts: add display information
  2014-01-21 15:26     ` Sebastian Reichel
  (?)
@ 2014-01-24 11:46       ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-24 11:46 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Javier Martinez Canillas, Enric Balletbo Serra,
	Florian Vaussard

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

On 2014-01-21 17:26, Sebastian Reichel wrote:
> On Tue, Jan 21, 2014 at 12:57:02PM +0200, Tomi Valkeinen wrote:
>> Add DT data for OMAP3 N900 board. The board has the following
>> displays:
>>
>> lcd: LCD panel connected to OMAP's SDI output
>> tv: analog svideo
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> 
> Your dss-dt-review-3 branch boots on my N900 with working display.
> 
> Tested-by: Sebastian Reichel <sre@debian.org>

Ok, thanks!

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 30/41] ARM: omap3-n900.dts: add display information
@ 2014-01-24 11:46       ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-24 11:46 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

On 2014-01-21 17:26, Sebastian Reichel wrote:
> On Tue, Jan 21, 2014 at 12:57:02PM +0200, Tomi Valkeinen wrote:
>> Add DT data for OMAP3 N900 board. The board has the following
>> displays:
>>
>> lcd: LCD panel connected to OMAP's SDI output
>> tv: analog svideo
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> 
> Your dss-dt-review-3 branch boots on my N900 with working display.
> 
> Tested-by: Sebastian Reichel <sre@debian.org>

Ok, thanks!

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 30/41] ARM: omap3-n900.dts: add display information
@ 2014-01-24 11:46       ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-01-24 11:46 UTC (permalink / raw)
  To: linux-arm-kernel

On 2014-01-21 17:26, Sebastian Reichel wrote:
> On Tue, Jan 21, 2014 at 12:57:02PM +0200, Tomi Valkeinen wrote:
>> Add DT data for OMAP3 N900 board. The board has the following
>> displays:
>>
>> lcd: LCD panel connected to OMAP's SDI output
>> tv: analog svideo
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> 
> Your dss-dt-review-3 branch boots on my N900 with working display.
> 
> Tested-by: Sebastian Reichel <sre@debian.org>

Ok, thanks!

 Tomi


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140124/862ff532/attachment.sig>

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-01-26 23:07   ` Javier Martinez Canillas
  -1 siblings, 0 replies; 192+ messages in thread
From: Javier Martinez Canillas @ 2014-01-26 23:07 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Tony Lindgren, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Enric Balletbo Serra, Florian Vaussard

Hi Tomi,

On Tue, Jan 21, 2014 at 7:56 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> Hi,
>
> Here's version 3 of the DSS DT series.
>
> The previous version can be found from:
>
> v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249
> v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866
>
> The main changes to v2 are:
>
> - DT Binding documentation
> - OMAP2 DSS support
> - Split DSI register space
> - DSS nodes disabled by default
> - Hack to have generic DT bindings but OMAP specific drivers (for now)
>
> This series can also be found from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3
>

I tested this branch on my DM3730 IGEPv2 and output display is working
correctly.

Tested-by: Javier Martinez Canillas <javier@dowhile0.org>

>  Tomi
>
> Javier Martinez Canillas (1):
>   ARM: omap3-igep0020.dts: add display information
>
> Sebastian Reichel (1):
>   OMAPDSS: acx565akm: Add DT support
>
> Tomi Valkeinen (39):
>   ARM: OMAP2+: add omapdss_init_of()
>   ARM: OMAP2+: DT 'compatible' tweak for displays
>   OMAPDSS: add 'label' support for DT
>   OMAPDSS: get dssdev->alias from DT alias
>   OMAPFB: clean up default display search
>   OMAPFB: search for default display with DT alias
>   OMAPDSS: add of helpers
>   OMAPDSS: Improve regulator names for DT
>   OMAPDSS: Add DT support to DSS
>   OMAPDSS: Add DT support to DISPC
>   OMAPDSS: Add DT support to HDMI
>   OMAPDSS: Add DT support to VENC
>   OMAPDSS: Add DT support to DSI
>   OMAPDSS: panel-dsi-cm: Add DT support
>   OMAPDSS: encoder-tfp410: Add DT support
>   OMAPDSS: connector-dvi: Add DT support
>   OMAPDSS: encoder-tpd12s015: Add DT support
>   OMAPDSS: hdmi-connector: Add DT support
>   OMAPDSS: panel-dpi: Add DT support
>   OMAPDSS: connector-analog-tv: Add DT support
>   ARM: omap2.dtsi: add omapdss information
>   ARM: omap3.dtsi: add omapdss information
>   ARM: omap4.dtsi: add omapdss information
>   ARM: omap4-panda.dts: add display information
>   ARM: omap4-sdp.dts: add display information
>   ARM: omap3-beagle.dts: add display information
>   ARM: omap3-beagle-xm.dts: add display information
>   ARM: omap3-n900.dts: add display information
>   OMAPDSS: remove DT hacks for regulators
>   ARM: OMAP2+: remove pdata quirks for displays
>   Doc/DT: Add OMAP DSS DT Bindings
>   Doc/DT: Add DT binding documentation for Analog TV Connector
>   Doc/DT: Add DT binding documentation for DVI Connector
>   Doc/DT: Add DT binding documentation for HDMI Connector
>   Doc/DT: Add DT binding documentation for MIPI DPI Panel
>   Doc/DT: Add DT binding documentation for MIPI DSI CM Panel
>   Doc/DT: Add DT binding documentation for Sony acx565akm panel
>   Doc/DT: Add DT binding documentation for TFP410 encoder
>   Doc/DT: Add DT binding documentation for tpd12s015 encoder
>
>  .../bindings/video/analog-tv-connector.txt         |  23 +++
>  .../devicetree/bindings/video/dvi-connector.txt    |  26 +++
>  .../devicetree/bindings/video/hdmi-connector.txt   |  23 +++
>  .../devicetree/bindings/video/panel-dpi.txt        |  43 ++++
>  .../devicetree/bindings/video/panel-dsi-cm.txt     |  26 +++
>  .../devicetree/bindings/video/sony,acx565akm.txt   |  28 +++
>  .../devicetree/bindings/video/ti,omap-dss.txt      | 197 ++++++++++++++++++
>  .../devicetree/bindings/video/ti,omap2-dss.txt     |  54 +++++
>  .../devicetree/bindings/video/ti,omap3-dss.txt     |  73 +++++++
>  .../devicetree/bindings/video/ti,omap4-dss.txt     |  99 +++++++++
>  .../devicetree/bindings/video/ti,tfp410.txt        |  41 ++++
>  .../devicetree/bindings/video/ti,tpd12s015.txt     |  44 ++++
>  .../devicetree/bindings/video/video-ports.txt      |  22 ++
>  arch/arm/boot/dts/omap2.dtsi                       |  31 +++
>  arch/arm/boot/dts/omap3-beagle-xm.dts              | 119 +++++++++++
>  arch/arm/boot/dts/omap3-beagle.dts                 | 116 +++++++++++
>  arch/arm/boot/dts/omap3-igep0020.dts               |  59 +++++-
>  arch/arm/boot/dts/omap3-n900.dts                   |  70 ++++++-
>  arch/arm/boot/dts/omap3.dtsi                       |  42 ++++
>  arch/arm/boot/dts/omap4-panda-common.dtsi          | 119 ++++++++++-
>  arch/arm/boot/dts/omap4-sdp.dts                    | 107 +++++++++-
>  arch/arm/boot/dts/omap4.dtsi                       |  65 ++++++
>  arch/arm/mach-omap2/board-generic.c                |   4 +
>  arch/arm/mach-omap2/common.h                       |   3 +
>  arch/arm/mach-omap2/display.c                      | 132 ++++++++++++
>  arch/arm/mach-omap2/dss-common.c                   | 224 ---------------------
>  arch/arm/mach-omap2/pdata-quirks.c                 |   3 -
>  .../video/omap2/displays-new/connector-analog-tv.c |  43 +++-
>  drivers/video/omap2/displays-new/connector-dvi.c   |  43 ++++
>  drivers/video/omap2/displays-new/connector-hdmi.c  |  30 +++
>  drivers/video/omap2/displays-new/encoder-tfp410.c  |  43 +++-
>  .../video/omap2/displays-new/encoder-tpd12s015.c   |  56 ++++++
>  drivers/video/omap2/displays-new/panel-dpi.c       |  64 +++++-
>  drivers/video/omap2/displays-new/panel-dsi-cm.c    |  65 +++++-
>  .../omap2/displays-new/panel-sony-acx565akm.c      |  33 ++-
>  drivers/video/omap2/dss/Makefile                   |   2 +-
>  drivers/video/omap2/dss/dispc.c                    |   8 +
>  drivers/video/omap2/dss/display.c                  |  28 ++-
>  drivers/video/omap2/dss/dpi.c                      |  47 +++++
>  drivers/video/omap2/dss/dsi.c                      | 147 +++++++++++++-
>  drivers/video/omap2/dss/dss-of.c                   | 159 +++++++++++++++
>  drivers/video/omap2/dss/dss.c                      |  64 ++++++
>  drivers/video/omap2/dss/dss.h                      |   6 +
>  drivers/video/omap2/dss/hdmi4.c                    |  14 +-
>  drivers/video/omap2/dss/sdi.c                      |  45 +++++
>  drivers/video/omap2/dss/venc.c                     |  66 +++++-
>  drivers/video/omap2/omapfb/omapfb-main.c           |  67 ++++--
>  include/video/omapdss.h                            |  14 ++
>  48 files changed, 2550 insertions(+), 287 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/video/analog-tv-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/video/dvi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/video/hdmi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/video/panel-dpi.txt
>  create mode 100644 Documentation/devicetree/bindings/video/panel-dsi-cm.txt
>  create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,omap-dss.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,omap2-dss.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,omap3-dss.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,omap4-dss.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,tfp410.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,tpd12s015.txt
>  create mode 100644 Documentation/devicetree/bindings/video/video-ports.txt
>  create mode 100644 drivers/video/omap2/dss/dss-of.c
>
> --
> 1.8.3.2
>

Thanks a lot and best regards,
Javier

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-01-26 23:07   ` Javier Martinez Canillas
  0 siblings, 0 replies; 192+ messages in thread
From: Javier Martinez Canillas @ 2014-01-26 23:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tomi,

On Tue, Jan 21, 2014 at 7:56 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> Hi,
>
> Here's version 3 of the DSS DT series.
>
> The previous version can be found from:
>
> v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249
> v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866
>
> The main changes to v2 are:
>
> - DT Binding documentation
> - OMAP2 DSS support
> - Split DSI register space
> - DSS nodes disabled by default
> - Hack to have generic DT bindings but OMAP specific drivers (for now)
>
> This series can also be found from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3
>

I tested this branch on my DM3730 IGEPv2 and output display is working
correctly.

Tested-by: Javier Martinez Canillas <javier@dowhile0.org>

>  Tomi
>
> Javier Martinez Canillas (1):
>   ARM: omap3-igep0020.dts: add display information
>
> Sebastian Reichel (1):
>   OMAPDSS: acx565akm: Add DT support
>
> Tomi Valkeinen (39):
>   ARM: OMAP2+: add omapdss_init_of()
>   ARM: OMAP2+: DT 'compatible' tweak for displays
>   OMAPDSS: add 'label' support for DT
>   OMAPDSS: get dssdev->alias from DT alias
>   OMAPFB: clean up default display search
>   OMAPFB: search for default display with DT alias
>   OMAPDSS: add of helpers
>   OMAPDSS: Improve regulator names for DT
>   OMAPDSS: Add DT support to DSS
>   OMAPDSS: Add DT support to DISPC
>   OMAPDSS: Add DT support to HDMI
>   OMAPDSS: Add DT support to VENC
>   OMAPDSS: Add DT support to DSI
>   OMAPDSS: panel-dsi-cm: Add DT support
>   OMAPDSS: encoder-tfp410: Add DT support
>   OMAPDSS: connector-dvi: Add DT support
>   OMAPDSS: encoder-tpd12s015: Add DT support
>   OMAPDSS: hdmi-connector: Add DT support
>   OMAPDSS: panel-dpi: Add DT support
>   OMAPDSS: connector-analog-tv: Add DT support
>   ARM: omap2.dtsi: add omapdss information
>   ARM: omap3.dtsi: add omapdss information
>   ARM: omap4.dtsi: add omapdss information
>   ARM: omap4-panda.dts: add display information
>   ARM: omap4-sdp.dts: add display information
>   ARM: omap3-beagle.dts: add display information
>   ARM: omap3-beagle-xm.dts: add display information
>   ARM: omap3-n900.dts: add display information
>   OMAPDSS: remove DT hacks for regulators
>   ARM: OMAP2+: remove pdata quirks for displays
>   Doc/DT: Add OMAP DSS DT Bindings
>   Doc/DT: Add DT binding documentation for Analog TV Connector
>   Doc/DT: Add DT binding documentation for DVI Connector
>   Doc/DT: Add DT binding documentation for HDMI Connector
>   Doc/DT: Add DT binding documentation for MIPI DPI Panel
>   Doc/DT: Add DT binding documentation for MIPI DSI CM Panel
>   Doc/DT: Add DT binding documentation for Sony acx565akm panel
>   Doc/DT: Add DT binding documentation for TFP410 encoder
>   Doc/DT: Add DT binding documentation for tpd12s015 encoder
>
>  .../bindings/video/analog-tv-connector.txt         |  23 +++
>  .../devicetree/bindings/video/dvi-connector.txt    |  26 +++
>  .../devicetree/bindings/video/hdmi-connector.txt   |  23 +++
>  .../devicetree/bindings/video/panel-dpi.txt        |  43 ++++
>  .../devicetree/bindings/video/panel-dsi-cm.txt     |  26 +++
>  .../devicetree/bindings/video/sony,acx565akm.txt   |  28 +++
>  .../devicetree/bindings/video/ti,omap-dss.txt      | 197 ++++++++++++++++++
>  .../devicetree/bindings/video/ti,omap2-dss.txt     |  54 +++++
>  .../devicetree/bindings/video/ti,omap3-dss.txt     |  73 +++++++
>  .../devicetree/bindings/video/ti,omap4-dss.txt     |  99 +++++++++
>  .../devicetree/bindings/video/ti,tfp410.txt        |  41 ++++
>  .../devicetree/bindings/video/ti,tpd12s015.txt     |  44 ++++
>  .../devicetree/bindings/video/video-ports.txt      |  22 ++
>  arch/arm/boot/dts/omap2.dtsi                       |  31 +++
>  arch/arm/boot/dts/omap3-beagle-xm.dts              | 119 +++++++++++
>  arch/arm/boot/dts/omap3-beagle.dts                 | 116 +++++++++++
>  arch/arm/boot/dts/omap3-igep0020.dts               |  59 +++++-
>  arch/arm/boot/dts/omap3-n900.dts                   |  70 ++++++-
>  arch/arm/boot/dts/omap3.dtsi                       |  42 ++++
>  arch/arm/boot/dts/omap4-panda-common.dtsi          | 119 ++++++++++-
>  arch/arm/boot/dts/omap4-sdp.dts                    | 107 +++++++++-
>  arch/arm/boot/dts/omap4.dtsi                       |  65 ++++++
>  arch/arm/mach-omap2/board-generic.c                |   4 +
>  arch/arm/mach-omap2/common.h                       |   3 +
>  arch/arm/mach-omap2/display.c                      | 132 ++++++++++++
>  arch/arm/mach-omap2/dss-common.c                   | 224 ---------------------
>  arch/arm/mach-omap2/pdata-quirks.c                 |   3 -
>  .../video/omap2/displays-new/connector-analog-tv.c |  43 +++-
>  drivers/video/omap2/displays-new/connector-dvi.c   |  43 ++++
>  drivers/video/omap2/displays-new/connector-hdmi.c  |  30 +++
>  drivers/video/omap2/displays-new/encoder-tfp410.c  |  43 +++-
>  .../video/omap2/displays-new/encoder-tpd12s015.c   |  56 ++++++
>  drivers/video/omap2/displays-new/panel-dpi.c       |  64 +++++-
>  drivers/video/omap2/displays-new/panel-dsi-cm.c    |  65 +++++-
>  .../omap2/displays-new/panel-sony-acx565akm.c      |  33 ++-
>  drivers/video/omap2/dss/Makefile                   |   2 +-
>  drivers/video/omap2/dss/dispc.c                    |   8 +
>  drivers/video/omap2/dss/display.c                  |  28 ++-
>  drivers/video/omap2/dss/dpi.c                      |  47 +++++
>  drivers/video/omap2/dss/dsi.c                      | 147 +++++++++++++-
>  drivers/video/omap2/dss/dss-of.c                   | 159 +++++++++++++++
>  drivers/video/omap2/dss/dss.c                      |  64 ++++++
>  drivers/video/omap2/dss/dss.h                      |   6 +
>  drivers/video/omap2/dss/hdmi4.c                    |  14 +-
>  drivers/video/omap2/dss/sdi.c                      |  45 +++++
>  drivers/video/omap2/dss/venc.c                     |  66 +++++-
>  drivers/video/omap2/omapfb/omapfb-main.c           |  67 ++++--
>  include/video/omapdss.h                            |  14 ++
>  48 files changed, 2550 insertions(+), 287 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/video/analog-tv-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/video/dvi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/video/hdmi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/video/panel-dpi.txt
>  create mode 100644 Documentation/devicetree/bindings/video/panel-dsi-cm.txt
>  create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,omap-dss.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,omap2-dss.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,omap3-dss.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,omap4-dss.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,tfp410.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,tpd12s015.txt
>  create mode 100644 Documentation/devicetree/bindings/video/video-ports.txt
>  create mode 100644 drivers/video/omap2/dss/dss-of.c
>
> --
> 1.8.3.2
>

Thanks a lot and best regards,
Javier

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-01-26 23:07   ` Javier Martinez Canillas
  0 siblings, 0 replies; 192+ messages in thread
From: Javier Martinez Canillas @ 2014-01-26 23:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tomi,

On Tue, Jan 21, 2014 at 7:56 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> Hi,
>
> Here's version 3 of the DSS DT series.
>
> The previous version can be found from:
>
> v1: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108249
> v2: http://permalink.gmane.org/gmane.linux.ports.arm.omap/108866
>
> The main changes to v2 are:
>
> - DT Binding documentation
> - OMAP2 DSS support
> - Split DSI register space
> - DSS nodes disabled by default
> - Hack to have generic DT bindings but OMAP specific drivers (for now)
>
> This series can also be found from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt-review-3
>

I tested this branch on my DM3730 IGEPv2 and output display is working
correctly.

Tested-by: Javier Martinez Canillas <javier@dowhile0.org>

>  Tomi
>
> Javier Martinez Canillas (1):
>   ARM: omap3-igep0020.dts: add display information
>
> Sebastian Reichel (1):
>   OMAPDSS: acx565akm: Add DT support
>
> Tomi Valkeinen (39):
>   ARM: OMAP2+: add omapdss_init_of()
>   ARM: OMAP2+: DT 'compatible' tweak for displays
>   OMAPDSS: add 'label' support for DT
>   OMAPDSS: get dssdev->alias from DT alias
>   OMAPFB: clean up default display search
>   OMAPFB: search for default display with DT alias
>   OMAPDSS: add of helpers
>   OMAPDSS: Improve regulator names for DT
>   OMAPDSS: Add DT support to DSS
>   OMAPDSS: Add DT support to DISPC
>   OMAPDSS: Add DT support to HDMI
>   OMAPDSS: Add DT support to VENC
>   OMAPDSS: Add DT support to DSI
>   OMAPDSS: panel-dsi-cm: Add DT support
>   OMAPDSS: encoder-tfp410: Add DT support
>   OMAPDSS: connector-dvi: Add DT support
>   OMAPDSS: encoder-tpd12s015: Add DT support
>   OMAPDSS: hdmi-connector: Add DT support
>   OMAPDSS: panel-dpi: Add DT support
>   OMAPDSS: connector-analog-tv: Add DT support
>   ARM: omap2.dtsi: add omapdss information
>   ARM: omap3.dtsi: add omapdss information
>   ARM: omap4.dtsi: add omapdss information
>   ARM: omap4-panda.dts: add display information
>   ARM: omap4-sdp.dts: add display information
>   ARM: omap3-beagle.dts: add display information
>   ARM: omap3-beagle-xm.dts: add display information
>   ARM: omap3-n900.dts: add display information
>   OMAPDSS: remove DT hacks for regulators
>   ARM: OMAP2+: remove pdata quirks for displays
>   Doc/DT: Add OMAP DSS DT Bindings
>   Doc/DT: Add DT binding documentation for Analog TV Connector
>   Doc/DT: Add DT binding documentation for DVI Connector
>   Doc/DT: Add DT binding documentation for HDMI Connector
>   Doc/DT: Add DT binding documentation for MIPI DPI Panel
>   Doc/DT: Add DT binding documentation for MIPI DSI CM Panel
>   Doc/DT: Add DT binding documentation for Sony acx565akm panel
>   Doc/DT: Add DT binding documentation for TFP410 encoder
>   Doc/DT: Add DT binding documentation for tpd12s015 encoder
>
>  .../bindings/video/analog-tv-connector.txt         |  23 +++
>  .../devicetree/bindings/video/dvi-connector.txt    |  26 +++
>  .../devicetree/bindings/video/hdmi-connector.txt   |  23 +++
>  .../devicetree/bindings/video/panel-dpi.txt        |  43 ++++
>  .../devicetree/bindings/video/panel-dsi-cm.txt     |  26 +++
>  .../devicetree/bindings/video/sony,acx565akm.txt   |  28 +++
>  .../devicetree/bindings/video/ti,omap-dss.txt      | 197 ++++++++++++++++++
>  .../devicetree/bindings/video/ti,omap2-dss.txt     |  54 +++++
>  .../devicetree/bindings/video/ti,omap3-dss.txt     |  73 +++++++
>  .../devicetree/bindings/video/ti,omap4-dss.txt     |  99 +++++++++
>  .../devicetree/bindings/video/ti,tfp410.txt        |  41 ++++
>  .../devicetree/bindings/video/ti,tpd12s015.txt     |  44 ++++
>  .../devicetree/bindings/video/video-ports.txt      |  22 ++
>  arch/arm/boot/dts/omap2.dtsi                       |  31 +++
>  arch/arm/boot/dts/omap3-beagle-xm.dts              | 119 +++++++++++
>  arch/arm/boot/dts/omap3-beagle.dts                 | 116 +++++++++++
>  arch/arm/boot/dts/omap3-igep0020.dts               |  59 +++++-
>  arch/arm/boot/dts/omap3-n900.dts                   |  70 ++++++-
>  arch/arm/boot/dts/omap3.dtsi                       |  42 ++++
>  arch/arm/boot/dts/omap4-panda-common.dtsi          | 119 ++++++++++-
>  arch/arm/boot/dts/omap4-sdp.dts                    | 107 +++++++++-
>  arch/arm/boot/dts/omap4.dtsi                       |  65 ++++++
>  arch/arm/mach-omap2/board-generic.c                |   4 +
>  arch/arm/mach-omap2/common.h                       |   3 +
>  arch/arm/mach-omap2/display.c                      | 132 ++++++++++++
>  arch/arm/mach-omap2/dss-common.c                   | 224 ---------------------
>  arch/arm/mach-omap2/pdata-quirks.c                 |   3 -
>  .../video/omap2/displays-new/connector-analog-tv.c |  43 +++-
>  drivers/video/omap2/displays-new/connector-dvi.c   |  43 ++++
>  drivers/video/omap2/displays-new/connector-hdmi.c  |  30 +++
>  drivers/video/omap2/displays-new/encoder-tfp410.c  |  43 +++-
>  .../video/omap2/displays-new/encoder-tpd12s015.c   |  56 ++++++
>  drivers/video/omap2/displays-new/panel-dpi.c       |  64 +++++-
>  drivers/video/omap2/displays-new/panel-dsi-cm.c    |  65 +++++-
>  .../omap2/displays-new/panel-sony-acx565akm.c      |  33 ++-
>  drivers/video/omap2/dss/Makefile                   |   2 +-
>  drivers/video/omap2/dss/dispc.c                    |   8 +
>  drivers/video/omap2/dss/display.c                  |  28 ++-
>  drivers/video/omap2/dss/dpi.c                      |  47 +++++
>  drivers/video/omap2/dss/dsi.c                      | 147 +++++++++++++-
>  drivers/video/omap2/dss/dss-of.c                   | 159 +++++++++++++++
>  drivers/video/omap2/dss/dss.c                      |  64 ++++++
>  drivers/video/omap2/dss/dss.h                      |   6 +
>  drivers/video/omap2/dss/hdmi4.c                    |  14 +-
>  drivers/video/omap2/dss/sdi.c                      |  45 +++++
>  drivers/video/omap2/dss/venc.c                     |  66 +++++-
>  drivers/video/omap2/omapfb/omapfb-main.c           |  67 ++++--
>  include/video/omapdss.h                            |  14 ++
>  48 files changed, 2550 insertions(+), 287 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/video/analog-tv-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/video/dvi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/video/hdmi-connector.txt
>  create mode 100644 Documentation/devicetree/bindings/video/panel-dpi.txt
>  create mode 100644 Documentation/devicetree/bindings/video/panel-dsi-cm.txt
>  create mode 100644 Documentation/devicetree/bindings/video/sony,acx565akm.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,omap-dss.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,omap2-dss.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,omap3-dss.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,omap4-dss.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,tfp410.txt
>  create mode 100644 Documentation/devicetree/bindings/video/ti,tpd12s015.txt
>  create mode 100644 Documentation/devicetree/bindings/video/video-ports.txt
>  create mode 100644 drivers/video/omap2/dss/dss-of.c
>
> --
> 1.8.3.2
>

Thanks a lot and best regards,
Javier

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
  2014-01-21 10:56 ` Tomi Valkeinen
  (?)
@ 2014-03-06  7:29   ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-03-06  7:29 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Laurent Pinchart, Stefan Roese,
	Sebastian Reichel, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Sebastian Reichel, Javier Martinez Canillas,
	Enric Balletbo Serra, Florian Vaussard

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

Hi Tony,

On 21/01/14 12:56, Tomi Valkeinen wrote:
> Hi,
> 
> Here's version 3 of the DSS DT series.

Can you have a look at the arch/arm/ parts in the series and ack if
they're ok, i.e, patches 1, 2, 32.

Then there are the .dts patches, 22-30, for which I haven't been able to
get any acks. I'm not sure who I should get acks from for those, but I
don't mind adding yours if you want to give it.

The .dts patches have had minor changes compared to the ones posted
here, according to the DT bindings review comments, but nothing much has
changed.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-03-06  7:29   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-03-06  7:29 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

Hi Tony,

On 21/01/14 12:56, Tomi Valkeinen wrote:
> Hi,
> 
> Here's version 3 of the DSS DT series.

Can you have a look at the arch/arm/ parts in the series and ack if
they're ok, i.e, patches 1, 2, 32.

Then there are the .dts patches, 22-30, for which I haven't been able to
get any acks. I'm not sure who I should get acks from for those, but I
don't mind adding yours if you want to give it.

The .dts patches have had minor changes compared to the ones posted
here, according to the DT bindings review comments, but nothing much has
changed.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-03-06  7:29   ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-03-06  7:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tony,

On 21/01/14 12:56, Tomi Valkeinen wrote:
> Hi,
> 
> Here's version 3 of the DSS DT series.

Can you have a look at the arch/arm/ parts in the series and ack if
they're ok, i.e, patches 1, 2, 32.

Then there are the .dts patches, 22-30, for which I haven't been able to
get any acks. I'm not sure who I should get acks from for those, but I
don't mind adding yours if you want to give it.

The .dts patches have had minor changes compared to the ones posted
here, according to the DT bindings review comments, but nothing much has
changed.

 Tomi


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140306/a2c3b74e/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
  2014-03-06  7:29   ` Tomi Valkeinen
  (?)
@ 2014-03-07 16:49     ` Tony Lindgren
  -1 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-03-07 16:49 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Laurent Pinchart, Stefan Roese,
	Sebastian Reichel, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Sebastian Reichel, Javier Martinez Canillas,
	Enric Balletbo Serra, Florian Vaussard

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140305 23:32]:
> Hi Tony,
> 
> On 21/01/14 12:56, Tomi Valkeinen wrote:
> > Hi,
> > 
> > Here's version 3 of the DSS DT series.
> 
> Can you have a look at the arch/arm/ parts in the series and ack if
> they're ok, i.e, patches 1, 2, 32.

Patches 1, 2 & 32 look OK to me, so for those please feel free to add:

Acked-by: Tony Lindgren <tony@atomide.com>

There's a minor merge conflict in pdata-quirks.c, but that's trivial
so it should be OK for you to queue those along with the DSS patches.

> Then there are the .dts patches, 22-30, for which I haven't been able to
> get any acks. I'm not sure who I should get acks from for those, but I
> don't mind adding yours if you want to give it.
> 
> The .dts patches have had minor changes compared to the ones posted
> here, according to the DT bindings review comments, but nothing much has
> changed.

These will cause unnecessary merge conflicts all over the place:

Auto-merging arch/arm/boot/dts/omap4.dtsi
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap4.dtsi
Auto-merging arch/arm/boot/dts/omap4-sdp.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap4-sdp.dts
Auto-merging arch/arm/boot/dts/omap4-panda-common.dtsi
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap4-panda-common.dtsi
Auto-merging arch/arm/boot/dts/omap3.dtsi
Auto-merging arch/arm/boot/dts/omap3-n900.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap3-n900.dts
Auto-merging arch/arm/boot/dts/omap3-igep0020.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap3-igep0020.dts
Auto-merging arch/arm/boot/dts/omap3-beagle.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap3-beagle.dts
Auto-merging arch/arm/boot/dts/omap3-beagle-xm.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap3-beagle-xm.dts

How about do a pull request for just the .dts changes against current
omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
that just the .dts changes alone won't break anything.

Then make sure your series works both ways and maybe do a follow up
patch that flips things over after the dependencies are merged.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-03-07 16:49     ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-03-07 16:49 UTC (permalink / raw)
  To: linux-arm-kernel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140305 23:32]:
> Hi Tony,
> 
> On 21/01/14 12:56, Tomi Valkeinen wrote:
> > Hi,
> > 
> > Here's version 3 of the DSS DT series.
> 
> Can you have a look at the arch/arm/ parts in the series and ack if
> they're ok, i.e, patches 1, 2, 32.

Patches 1, 2 & 32 look OK to me, so for those please feel free to add:

Acked-by: Tony Lindgren <tony@atomide.com>

There's a minor merge conflict in pdata-quirks.c, but that's trivial
so it should be OK for you to queue those along with the DSS patches.

> Then there are the .dts patches, 22-30, for which I haven't been able to
> get any acks. I'm not sure who I should get acks from for those, but I
> don't mind adding yours if you want to give it.
> 
> The .dts patches have had minor changes compared to the ones posted
> here, according to the DT bindings review comments, but nothing much has
> changed.

These will cause unnecessary merge conflicts all over the place:

Auto-merging arch/arm/boot/dts/omap4.dtsi
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap4.dtsi
Auto-merging arch/arm/boot/dts/omap4-sdp.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap4-sdp.dts
Auto-merging arch/arm/boot/dts/omap4-panda-common.dtsi
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap4-panda-common.dtsi
Auto-merging arch/arm/boot/dts/omap3.dtsi
Auto-merging arch/arm/boot/dts/omap3-n900.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap3-n900.dts
Auto-merging arch/arm/boot/dts/omap3-igep0020.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap3-igep0020.dts
Auto-merging arch/arm/boot/dts/omap3-beagle.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap3-beagle.dts
Auto-merging arch/arm/boot/dts/omap3-beagle-xm.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap3-beagle-xm.dts

How about do a pull request for just the .dts changes against current
omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
that just the .dts changes alone won't break anything.

Then make sure your series works both ways and maybe do a follow up
patch that flips things over after the dependencies are merged.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-03-07 16:49     ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-03-07 16:49 UTC (permalink / raw)
  To: linux-arm-kernel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140305 23:32]:
> Hi Tony,
> 
> On 21/01/14 12:56, Tomi Valkeinen wrote:
> > Hi,
> > 
> > Here's version 3 of the DSS DT series.
> 
> Can you have a look at the arch/arm/ parts in the series and ack if
> they're ok, i.e, patches 1, 2, 32.

Patches 1, 2 & 32 look OK to me, so for those please feel free to add:

Acked-by: Tony Lindgren <tony@atomide.com>

There's a minor merge conflict in pdata-quirks.c, but that's trivial
so it should be OK for you to queue those along with the DSS patches.

> Then there are the .dts patches, 22-30, for which I haven't been able to
> get any acks. I'm not sure who I should get acks from for those, but I
> don't mind adding yours if you want to give it.
> 
> The .dts patches have had minor changes compared to the ones posted
> here, according to the DT bindings review comments, but nothing much has
> changed.

These will cause unnecessary merge conflicts all over the place:

Auto-merging arch/arm/boot/dts/omap4.dtsi
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap4.dtsi
Auto-merging arch/arm/boot/dts/omap4-sdp.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap4-sdp.dts
Auto-merging arch/arm/boot/dts/omap4-panda-common.dtsi
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap4-panda-common.dtsi
Auto-merging arch/arm/boot/dts/omap3.dtsi
Auto-merging arch/arm/boot/dts/omap3-n900.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap3-n900.dts
Auto-merging arch/arm/boot/dts/omap3-igep0020.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap3-igep0020.dts
Auto-merging arch/arm/boot/dts/omap3-beagle.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap3-beagle.dts
Auto-merging arch/arm/boot/dts/omap3-beagle-xm.dts
CONFLICT (content): Merge conflict in arch/arm/boot/dts/omap3-beagle-xm.dts

How about do a pull request for just the .dts changes against current
omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
that just the .dts changes alone won't break anything.

Then make sure your series works both ways and maybe do a follow up
patch that flips things over after the dependencies are merged.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
  2014-03-07 16:49     ` Tony Lindgren
  (?)
@ 2014-03-10 13:22       ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-03-10 13:22 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: devicetree, linux-fbdev, Enric Balletbo Serra, Sebastian Reichel,
	Javier Martinez Canillas, Florian Vaussard, Darren Etheridge,
	Sebastian Reichel, Archit Taneja, Laurent Pinchart,
	Dr . H . Nikolaus Schaller, Marek Belisko, linux-omap,
	Robert Nelson, Stefan Roese, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1248 bytes --]

On 07/03/14 18:49, Tony Lindgren wrote:
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [140305 23:32]:
>> Hi Tony,
>>
>> On 21/01/14 12:56, Tomi Valkeinen wrote:
>>> Hi,
>>>
>>> Here's version 3 of the DSS DT series.
>>
>> Can you have a look at the arch/arm/ parts in the series and ack if
>> they're ok, i.e, patches 1, 2, 32.
> 
> Patches 1, 2 & 32 look OK to me, so for those please feel free to add:
> 
> Acked-by: Tony Lindgren <tony@atomide.com>

Thanks.

> How about do a pull request for just the .dts changes against current
> omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
> that just the .dts changes alone won't break anything.

Unfortunately they do break. At least pinmuxing is moved from the global
definitions to be handled by the respective display drivers, and there
are some regulator_name hacks that the DT patches remove.

I think those changes could be removed from my patches, and then added
back later when everything else has been merged.

The bigger issue is that suddenly there's lots of discussion about the
display DT bindings. If those are not resolved very soon, I guess I have
no choice but to again skip the merge window for the DSS DT changes.

 Tomi



[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-03-10 13:22       ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-03-10 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]

On 07/03/14 18:49, Tony Lindgren wrote:
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [140305 23:32]:
>> Hi Tony,
>>
>> On 21/01/14 12:56, Tomi Valkeinen wrote:
>>> Hi,
>>>
>>> Here's version 3 of the DSS DT series.
>>
>> Can you have a look at the arch/arm/ parts in the series and ack if
>> they're ok, i.e, patches 1, 2, 32.
> 
> Patches 1, 2 & 32 look OK to me, so for those please feel free to add:
> 
> Acked-by: Tony Lindgren <tony@atomide.com>

Thanks.

> How about do a pull request for just the .dts changes against current
> omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
> that just the .dts changes alone won't break anything.

Unfortunately they do break. At least pinmuxing is moved from the global
definitions to be handled by the respective display drivers, and there
are some regulator_name hacks that the DT patches remove.

I think those changes could be removed from my patches, and then added
back later when everything else has been merged.

The bigger issue is that suddenly there's lots of discussion about the
display DT bindings. If those are not resolved very soon, I guess I have
no choice but to again skip the merge window for the DSS DT changes.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-03-10 13:22       ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-03-10 13:22 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/03/14 18:49, Tony Lindgren wrote:
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [140305 23:32]:
>> Hi Tony,
>>
>> On 21/01/14 12:56, Tomi Valkeinen wrote:
>>> Hi,
>>>
>>> Here's version 3 of the DSS DT series.
>>
>> Can you have a look at the arch/arm/ parts in the series and ack if
>> they're ok, i.e, patches 1, 2, 32.
> 
> Patches 1, 2 & 32 look OK to me, so for those please feel free to add:
> 
> Acked-by: Tony Lindgren <tony@atomide.com>

Thanks.

> How about do a pull request for just the .dts changes against current
> omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
> that just the .dts changes alone won't break anything.

Unfortunately they do break. At least pinmuxing is moved from the global
definitions to be handled by the respective display drivers, and there
are some regulator_name hacks that the DT patches remove.

I think those changes could be removed from my patches, and then added
back later when everything else has been merged.

The bigger issue is that suddenly there's lots of discussion about the
display DT bindings. If those are not resolved very soon, I guess I have
no choice but to again skip the merge window for the DSS DT changes.

 Tomi


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140310/4aede038/attachment.sig>

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
  2014-03-10 13:22       ` Tomi Valkeinen
  (?)
@ 2014-03-10 15:41         ` Tony Lindgren
  -1 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-03-10 15:41 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Laurent Pinchart, Stefan Roese,
	Sebastian Reichel, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Sebastian Reichel, Javier Martinez Canillas,
	Enric Balletbo Serra, Florian Vaussard

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140310 06:26]:
> On 07/03/14 18:49, Tony Lindgren wrote:
> > * Tomi Valkeinen <tomi.valkeinen@ti.com> [140305 23:32]:
> >> Hi Tony,
> >>
> >> On 21/01/14 12:56, Tomi Valkeinen wrote:
> >>> Hi,
> >>>
> >>> Here's version 3 of the DSS DT series.
> >>
> >> Can you have a look at the arch/arm/ parts in the series and ack if
> >> they're ok, i.e, patches 1, 2, 32.
> > 
> > Patches 1, 2 & 32 look OK to me, so for those please feel free to add:
> > 
> > Acked-by: Tony Lindgren <tony@atomide.com>
> 
> Thanks.
> 
> > How about do a pull request for just the .dts changes against current
> > omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
> > that just the .dts changes alone won't break anything.
> 
> Unfortunately they do break. At least pinmuxing is moved from the global
> definitions to be handled by the respective display drivers, and there
> are some regulator_name hacks that the DT patches remove.

OK. Will that cause regressions for omap3 as that's still also booting
in legacy mode?
 
> I think those changes could be removed from my patches, and then added
> back later when everything else has been merged.

Or you could have a second branch that also merges in omap-for-v3.15/dt
branch that you can send later towards the merge window after the arm-soc
changes have been merged. If you want to do that, then feel free to add
my ack also for the .dts changes:

Acked-by: Tony Lindgren <tony@atomide.com>

If however those changes get postponed to v3.16, it's best that you'll
redo the branch as I'm sure we'll have other merge issues for v3.16.
 
> The bigger issue is that suddenly there's lots of discussion about the
> display DT bindings. If those are not resolved very soon, I guess I have
> no choice but to again skip the merge window for the DSS DT changes.

OK, some of these more bindings can take easily six months to reach
some kind of resolution. You may be able to use TI specific unstable
bindings meanwhile if that makese sense.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-03-10 15:41         ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-03-10 15:41 UTC (permalink / raw)
  To: linux-arm-kernel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140310 06:26]:
> On 07/03/14 18:49, Tony Lindgren wrote:
> > * Tomi Valkeinen <tomi.valkeinen@ti.com> [140305 23:32]:
> >> Hi Tony,
> >>
> >> On 21/01/14 12:56, Tomi Valkeinen wrote:
> >>> Hi,
> >>>
> >>> Here's version 3 of the DSS DT series.
> >>
> >> Can you have a look at the arch/arm/ parts in the series and ack if
> >> they're ok, i.e, patches 1, 2, 32.
> > 
> > Patches 1, 2 & 32 look OK to me, so for those please feel free to add:
> > 
> > Acked-by: Tony Lindgren <tony@atomide.com>
> 
> Thanks.
> 
> > How about do a pull request for just the .dts changes against current
> > omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
> > that just the .dts changes alone won't break anything.
> 
> Unfortunately they do break. At least pinmuxing is moved from the global
> definitions to be handled by the respective display drivers, and there
> are some regulator_name hacks that the DT patches remove.

OK. Will that cause regressions for omap3 as that's still also booting
in legacy mode?
 
> I think those changes could be removed from my patches, and then added
> back later when everything else has been merged.

Or you could have a second branch that also merges in omap-for-v3.15/dt
branch that you can send later towards the merge window after the arm-soc
changes have been merged. If you want to do that, then feel free to add
my ack also for the .dts changes:

Acked-by: Tony Lindgren <tony@atomide.com>

If however those changes get postponed to v3.16, it's best that you'll
redo the branch as I'm sure we'll have other merge issues for v3.16.
 
> The bigger issue is that suddenly there's lots of discussion about the
> display DT bindings. If those are not resolved very soon, I guess I have
> no choice but to again skip the merge window for the DSS DT changes.

OK, some of these more bindings can take easily six months to reach
some kind of resolution. You may be able to use TI specific unstable
bindings meanwhile if that makese sense.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-03-10 15:41         ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-03-10 15:41 UTC (permalink / raw)
  To: linux-arm-kernel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140310 06:26]:
> On 07/03/14 18:49, Tony Lindgren wrote:
> > * Tomi Valkeinen <tomi.valkeinen@ti.com> [140305 23:32]:
> >> Hi Tony,
> >>
> >> On 21/01/14 12:56, Tomi Valkeinen wrote:
> >>> Hi,
> >>>
> >>> Here's version 3 of the DSS DT series.
> >>
> >> Can you have a look at the arch/arm/ parts in the series and ack if
> >> they're ok, i.e, patches 1, 2, 32.
> > 
> > Patches 1, 2 & 32 look OK to me, so for those please feel free to add:
> > 
> > Acked-by: Tony Lindgren <tony@atomide.com>
> 
> Thanks.
> 
> > How about do a pull request for just the .dts changes against current
> > omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
> > that just the .dts changes alone won't break anything.
> 
> Unfortunately they do break. At least pinmuxing is moved from the global
> definitions to be handled by the respective display drivers, and there
> are some regulator_name hacks that the DT patches remove.

OK. Will that cause regressions for omap3 as that's still also booting
in legacy mode?
 
> I think those changes could be removed from my patches, and then added
> back later when everything else has been merged.

Or you could have a second branch that also merges in omap-for-v3.15/dt
branch that you can send later towards the merge window after the arm-soc
changes have been merged. If you want to do that, then feel free to add
my ack also for the .dts changes:

Acked-by: Tony Lindgren <tony@atomide.com>

If however those changes get postponed to v3.16, it's best that you'll
redo the branch as I'm sure we'll have other merge issues for v3.16.
 
> The bigger issue is that suddenly there's lots of discussion about the
> display DT bindings. If those are not resolved very soon, I guess I have
> no choice but to again skip the merge window for the DSS DT changes.

OK, some of these more bindings can take easily six months to reach
some kind of resolution. You may be able to use TI specific unstable
bindings meanwhile if that makese sense.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
  2014-03-10 15:41         ` Tony Lindgren
  (?)
@ 2014-03-11 10:15           ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-03-11 10:15 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: devicetree, linux-fbdev, Enric Balletbo Serra, Sebastian Reichel,
	Javier Martinez Canillas, Florian Vaussard, Darren Etheridge,
	Sebastian Reichel, Archit Taneja, Laurent Pinchart,
	Dr . H . Nikolaus Schaller, Marek Belisko, linux-omap,
	Robert Nelson, Stefan Roese, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 3067 bytes --]

On 10/03/14 17:41, Tony Lindgren wrote:

>>> How about do a pull request for just the .dts changes against current
>>> omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
>>> that just the .dts changes alone won't break anything.
>>
>> Unfortunately they do break. At least pinmuxing is moved from the global
>> definitions to be handled by the respective display drivers, and there
>> are some regulator_name hacks that the DT patches remove.
> 
> OK. Will that cause regressions for omap3 as that's still also booting
> in legacy mode?

No, I don't think so. The problems revolve around the pdata-quirks, with
current DSS support when booting with DT. It's rather difficult to split
the series so that it could be merged freely in multiple parts.

If I split the series into three parts: 1) .dts changes 2) main DSS DT
changes 3) removal of pdata-quirks etc, I run into problems. Both 1) and
2) work fine individually, but when both are merged, there are two
competing systems, the proper DT stuff and the pdata-quirks stuff. And I
haven't found out a simple way to manage that, as the whole display
support is split into multiple independent devices.

One option would be to combine 1) and 3), so that when they are merged,
there would be proper DT data, and the pdata-quirks would be removed so
that it wouldn't be messing everything up. But that would, of course,
mean that after merging 1+3, the display wouldn't work on those boards
that rely on pdata-quirks, until 2) is merged.

>> I think those changes could be removed from my patches, and then added
>> back later when everything else has been merged.
> 
> Or you could have a second branch that also merges in omap-for-v3.15/dt
> branch that you can send later towards the merge window after the arm-soc
> changes have been merged. If you want to do that, then feel free to add
> my ack also for the .dts changes:
> 
> Acked-by: Tony Lindgren <tony@atomide.com>
> 
> If however those changes get postponed to v3.16, it's best that you'll
> redo the branch as I'm sure we'll have other merge issues for v3.16.

Ok. At the moment I feel that the easiest option would be to keep the
DSS DT series as it is, but merge omap-for-v3.15/dt to it and solve the
conflicts. I'd keep that branch separate from the fbdev changes, so that
I could send the DSS DT pull request later, when arm-soc has been pulled.

>> The bigger issue is that suddenly there's lots of discussion about the
>> display DT bindings. If those are not resolved very soon, I guess I have
>> no choice but to again skip the merge window for the DSS DT changes.
> 
> OK, some of these more bindings can take easily six months to reach
> some kind of resolution. You may be able to use TI specific unstable
> bindings meanwhile if that makese sense.

Yep. I don't know... If the whole port/endpoint system that I currently
use is changed totally, it might be painful to support both the TI
specific bindings with the old format and the newer format.

 Tomi



[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-03-11 10:15           ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-03-11 10:15 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 3067 bytes --]

On 10/03/14 17:41, Tony Lindgren wrote:

>>> How about do a pull request for just the .dts changes against current
>>> omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
>>> that just the .dts changes alone won't break anything.
>>
>> Unfortunately they do break. At least pinmuxing is moved from the global
>> definitions to be handled by the respective display drivers, and there
>> are some regulator_name hacks that the DT patches remove.
> 
> OK. Will that cause regressions for omap3 as that's still also booting
> in legacy mode?

No, I don't think so. The problems revolve around the pdata-quirks, with
current DSS support when booting with DT. It's rather difficult to split
the series so that it could be merged freely in multiple parts.

If I split the series into three parts: 1) .dts changes 2) main DSS DT
changes 3) removal of pdata-quirks etc, I run into problems. Both 1) and
2) work fine individually, but when both are merged, there are two
competing systems, the proper DT stuff and the pdata-quirks stuff. And I
haven't found out a simple way to manage that, as the whole display
support is split into multiple independent devices.

One option would be to combine 1) and 3), so that when they are merged,
there would be proper DT data, and the pdata-quirks would be removed so
that it wouldn't be messing everything up. But that would, of course,
mean that after merging 1+3, the display wouldn't work on those boards
that rely on pdata-quirks, until 2) is merged.

>> I think those changes could be removed from my patches, and then added
>> back later when everything else has been merged.
> 
> Or you could have a second branch that also merges in omap-for-v3.15/dt
> branch that you can send later towards the merge window after the arm-soc
> changes have been merged. If you want to do that, then feel free to add
> my ack also for the .dts changes:
> 
> Acked-by: Tony Lindgren <tony@atomide.com>
> 
> If however those changes get postponed to v3.16, it's best that you'll
> redo the branch as I'm sure we'll have other merge issues for v3.16.

Ok. At the moment I feel that the easiest option would be to keep the
DSS DT series as it is, but merge omap-for-v3.15/dt to it and solve the
conflicts. I'd keep that branch separate from the fbdev changes, so that
I could send the DSS DT pull request later, when arm-soc has been pulled.

>> The bigger issue is that suddenly there's lots of discussion about the
>> display DT bindings. If those are not resolved very soon, I guess I have
>> no choice but to again skip the merge window for the DSS DT changes.
> 
> OK, some of these more bindings can take easily six months to reach
> some kind of resolution. You may be able to use TI specific unstable
> bindings meanwhile if that makese sense.

Yep. I don't know... If the whole port/endpoint system that I currently
use is changed totally, it might be painful to support both the TI
specific bindings with the old format and the newer format.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-03-11 10:15           ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-03-11 10:15 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/03/14 17:41, Tony Lindgren wrote:

>>> How about do a pull request for just the .dts changes against current
>>> omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
>>> that just the .dts changes alone won't break anything.
>>
>> Unfortunately they do break. At least pinmuxing is moved from the global
>> definitions to be handled by the respective display drivers, and there
>> are some regulator_name hacks that the DT patches remove.
> 
> OK. Will that cause regressions for omap3 as that's still also booting
> in legacy mode?

No, I don't think so. The problems revolve around the pdata-quirks, with
current DSS support when booting with DT. It's rather difficult to split
the series so that it could be merged freely in multiple parts.

If I split the series into three parts: 1) .dts changes 2) main DSS DT
changes 3) removal of pdata-quirks etc, I run into problems. Both 1) and
2) work fine individually, but when both are merged, there are two
competing systems, the proper DT stuff and the pdata-quirks stuff. And I
haven't found out a simple way to manage that, as the whole display
support is split into multiple independent devices.

One option would be to combine 1) and 3), so that when they are merged,
there would be proper DT data, and the pdata-quirks would be removed so
that it wouldn't be messing everything up. But that would, of course,
mean that after merging 1+3, the display wouldn't work on those boards
that rely on pdata-quirks, until 2) is merged.

>> I think those changes could be removed from my patches, and then added
>> back later when everything else has been merged.
> 
> Or you could have a second branch that also merges in omap-for-v3.15/dt
> branch that you can send later towards the merge window after the arm-soc
> changes have been merged. If you want to do that, then feel free to add
> my ack also for the .dts changes:
> 
> Acked-by: Tony Lindgren <tony@atomide.com>
> 
> If however those changes get postponed to v3.16, it's best that you'll
> redo the branch as I'm sure we'll have other merge issues for v3.16.

Ok. At the moment I feel that the easiest option would be to keep the
DSS DT series as it is, but merge omap-for-v3.15/dt to it and solve the
conflicts. I'd keep that branch separate from the fbdev changes, so that
I could send the DSS DT pull request later, when arm-soc has been pulled.

>> The bigger issue is that suddenly there's lots of discussion about the
>> display DT bindings. If those are not resolved very soon, I guess I have
>> no choice but to again skip the merge window for the DSS DT changes.
> 
> OK, some of these more bindings can take easily six months to reach
> some kind of resolution. You may be able to use TI specific unstable
> bindings meanwhile if that makese sense.

Yep. I don't know... If the whole port/endpoint system that I currently
use is changed totally, it might be painful to support both the TI
specific bindings with the old format and the newer format.

 Tomi


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140311/7eadf63a/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
  2014-03-11 10:15           ` Tomi Valkeinen
  (?)
@ 2014-03-11 16:28             ` Tony Lindgren
  -1 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-03-11 16:28 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Laurent Pinchart, Stefan Roese,
	Sebastian Reichel, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Sebastian Reichel, Javier Martinez Canillas,
	Enric Balletbo Serra, Florian Vaussard

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140311 03:19]:
> On 10/03/14 17:41, Tony Lindgren wrote:
> 
> >>> How about do a pull request for just the .dts changes against current
> >>> omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
> >>> that just the .dts changes alone won't break anything.
> >>
> >> Unfortunately they do break. At least pinmuxing is moved from the global
> >> definitions to be handled by the respective display drivers, and there
> >> are some regulator_name hacks that the DT patches remove.
> > 
> > OK. Will that cause regressions for omap3 as that's still also booting
> > in legacy mode?
> 
> No, I don't think so. The problems revolve around the pdata-quirks, with
> current DSS support when booting with DT. It's rather difficult to split
> the series so that it could be merged freely in multiple parts.
> 
> If I split the series into three parts: 1) .dts changes 2) main DSS DT
> changes 3) removal of pdata-quirks etc, I run into problems. Both 1) and
> 2) work fine individually, but when both are merged, there are two
> competing systems, the proper DT stuff and the pdata-quirks stuff. And I
> haven't found out a simple way to manage that, as the whole display
> support is split into multiple independent devices.
> 
> One option would be to combine 1) and 3), so that when they are merged,
> there would be proper DT data, and the pdata-quirks would be removed so
> that it wouldn't be messing everything up. But that would, of course,
> mean that after merging 1+3, the display wouldn't work on those boards
> that rely on pdata-quirks, until 2) is merged.

OK, best to keep the series together then.
 
> >> I think those changes could be removed from my patches, and then added
> >> back later when everything else has been merged.
> > 
> > Or you could have a second branch that also merges in omap-for-v3.15/dt
> > branch that you can send later towards the merge window after the arm-soc
> > changes have been merged. If you want to do that, then feel free to add
> > my ack also for the .dts changes:
> > 
> > Acked-by: Tony Lindgren <tony@atomide.com>
> > 
> > If however those changes get postponed to v3.16, it's best that you'll
> > redo the branch as I'm sure we'll have other merge issues for v3.16.
> 
> Ok. At the moment I feel that the easiest option would be to keep the
> DSS DT series as it is, but merge omap-for-v3.15/dt to it and solve the
> conflicts. I'd keep that branch separate from the fbdev changes, so that
> I could send the DSS DT pull request later, when arm-soc has been pulled.

OK makes sense to me.
 
> >> The bigger issue is that suddenly there's lots of discussion about the
> >> display DT bindings. If those are not resolved very soon, I guess I have
> >> no choice but to again skip the merge window for the DSS DT changes.
> > 
> > OK, some of these more bindings can take easily six months to reach
> > some kind of resolution. You may be able to use TI specific unstable
> > bindings meanwhile if that makese sense.
> 
> Yep. I don't know... If the whole port/endpoint system that I currently
> use is changed totally, it might be painful to support both the TI
> specific bindings with the old format and the newer format.

OK that's up you guys in the display land, I have not followed the
latest bindings discussion.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-03-11 16:28             ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-03-11 16:28 UTC (permalink / raw)
  To: linux-arm-kernel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140311 03:19]:
> On 10/03/14 17:41, Tony Lindgren wrote:
> 
> >>> How about do a pull request for just the .dts changes against current
> >>> omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
> >>> that just the .dts changes alone won't break anything.
> >>
> >> Unfortunately they do break. At least pinmuxing is moved from the global
> >> definitions to be handled by the respective display drivers, and there
> >> are some regulator_name hacks that the DT patches remove.
> > 
> > OK. Will that cause regressions for omap3 as that's still also booting
> > in legacy mode?
> 
> No, I don't think so. The problems revolve around the pdata-quirks, with
> current DSS support when booting with DT. It's rather difficult to split
> the series so that it could be merged freely in multiple parts.
> 
> If I split the series into three parts: 1) .dts changes 2) main DSS DT
> changes 3) removal of pdata-quirks etc, I run into problems. Both 1) and
> 2) work fine individually, but when both are merged, there are two
> competing systems, the proper DT stuff and the pdata-quirks stuff. And I
> haven't found out a simple way to manage that, as the whole display
> support is split into multiple independent devices.
> 
> One option would be to combine 1) and 3), so that when they are merged,
> there would be proper DT data, and the pdata-quirks would be removed so
> that it wouldn't be messing everything up. But that would, of course,
> mean that after merging 1+3, the display wouldn't work on those boards
> that rely on pdata-quirks, until 2) is merged.

OK, best to keep the series together then.
 
> >> I think those changes could be removed from my patches, and then added
> >> back later when everything else has been merged.
> > 
> > Or you could have a second branch that also merges in omap-for-v3.15/dt
> > branch that you can send later towards the merge window after the arm-soc
> > changes have been merged. If you want to do that, then feel free to add
> > my ack also for the .dts changes:
> > 
> > Acked-by: Tony Lindgren <tony@atomide.com>
> > 
> > If however those changes get postponed to v3.16, it's best that you'll
> > redo the branch as I'm sure we'll have other merge issues for v3.16.
> 
> Ok. At the moment I feel that the easiest option would be to keep the
> DSS DT series as it is, but merge omap-for-v3.15/dt to it and solve the
> conflicts. I'd keep that branch separate from the fbdev changes, so that
> I could send the DSS DT pull request later, when arm-soc has been pulled.

OK makes sense to me.
 
> >> The bigger issue is that suddenly there's lots of discussion about the
> >> display DT bindings. If those are not resolved very soon, I guess I have
> >> no choice but to again skip the merge window for the DSS DT changes.
> > 
> > OK, some of these more bindings can take easily six months to reach
> > some kind of resolution. You may be able to use TI specific unstable
> > bindings meanwhile if that makese sense.
> 
> Yep. I don't know... If the whole port/endpoint system that I currently
> use is changed totally, it might be painful to support both the TI
> specific bindings with the old format and the newer format.

OK that's up you guys in the display land, I have not followed the
latest bindings discussion.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 00/41] OMAPDSS: DT support v3
@ 2014-03-11 16:28             ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-03-11 16:28 UTC (permalink / raw)
  To: linux-arm-kernel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140311 03:19]:
> On 10/03/14 17:41, Tony Lindgren wrote:
> 
> >>> How about do a pull request for just the .dts changes against current
> >>> omap-for-v3.15/dt branch ASAP for me so I can pull it in? That is assuming
> >>> that just the .dts changes alone won't break anything.
> >>
> >> Unfortunately they do break. At least pinmuxing is moved from the global
> >> definitions to be handled by the respective display drivers, and there
> >> are some regulator_name hacks that the DT patches remove.
> > 
> > OK. Will that cause regressions for omap3 as that's still also booting
> > in legacy mode?
> 
> No, I don't think so. The problems revolve around the pdata-quirks, with
> current DSS support when booting with DT. It's rather difficult to split
> the series so that it could be merged freely in multiple parts.
> 
> If I split the series into three parts: 1) .dts changes 2) main DSS DT
> changes 3) removal of pdata-quirks etc, I run into problems. Both 1) and
> 2) work fine individually, but when both are merged, there are two
> competing systems, the proper DT stuff and the pdata-quirks stuff. And I
> haven't found out a simple way to manage that, as the whole display
> support is split into multiple independent devices.
> 
> One option would be to combine 1) and 3), so that when they are merged,
> there would be proper DT data, and the pdata-quirks would be removed so
> that it wouldn't be messing everything up. But that would, of course,
> mean that after merging 1+3, the display wouldn't work on those boards
> that rely on pdata-quirks, until 2) is merged.

OK, best to keep the series together then.
 
> >> I think those changes could be removed from my patches, and then added
> >> back later when everything else has been merged.
> > 
> > Or you could have a second branch that also merges in omap-for-v3.15/dt
> > branch that you can send later towards the merge window after the arm-soc
> > changes have been merged. If you want to do that, then feel free to add
> > my ack also for the .dts changes:
> > 
> > Acked-by: Tony Lindgren <tony@atomide.com>
> > 
> > If however those changes get postponed to v3.16, it's best that you'll
> > redo the branch as I'm sure we'll have other merge issues for v3.16.
> 
> Ok. At the moment I feel that the easiest option would be to keep the
> DSS DT series as it is, but merge omap-for-v3.15/dt to it and solve the
> conflicts. I'd keep that branch separate from the fbdev changes, so that
> I could send the DSS DT pull request later, when arm-soc has been pulled.

OK makes sense to me.
 
> >> The bigger issue is that suddenly there's lots of discussion about the
> >> display DT bindings. If those are not resolved very soon, I guess I have
> >> no choice but to again skip the merge window for the DSS DT changes.
> > 
> > OK, some of these more bindings can take easily six months to reach
> > some kind of resolution. You may be able to use TI specific unstable
> > bindings meanwhile if that makese sense.
> 
> Yep. I don't know... If the whole port/endpoint system that I currently
> use is changed totally, it might be painful to support both the TI
> specific bindings with the old format and the newer format.

OK that's up you guys in the display land, I have not followed the
latest bindings discussion.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
  2014-01-21 10:56   ` Tomi Valkeinen
  (?)
@ 2014-04-08  0:13     ` Tony Lindgren
  -1 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-08  0:13 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Laurent Pinchart, Stefan Roese,
	Sebastian Reichel, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Sebastian Reichel, Javier Martinez Canillas,
	Enric Balletbo Serra, Florian Vaussard

Tomi,

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140121 03:01]:
> Add DT support for panel-dpi.

Looks like this patch did not get merged or am I missing
something?

As you probably are aware, we have at least these boards
needing it before we can remove the omap3 legacy support:

board-am3517evm.c
board-cm-t35.c
board-devkit8000.c
board-ldp.c
board-overo.c

We could probably set the display timings based on the
compatible flag in the driver if that's an issue?

And then board-omap3pandora.c also needs support for
panel_tpo_td043mtea1_platform_data.
 
Regards,

Tony

> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>  drivers/video/omap2/displays-new/panel-dpi.c | 64 +++++++++++++++++++++++++++-
>  1 file changed, 63 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/video/omap2/displays-new/panel-dpi.c b/drivers/video/omap2/displays-new/panel-dpi.c
> index 5f8f7e7c81ef..b032daf0f407 100644
> --- a/drivers/video/omap2/displays-new/panel-dpi.c
> +++ b/drivers/video/omap2/displays-new/panel-dpi.c
> @@ -13,9 +13,12 @@
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
> +#include <linux/of.h>
> +#include <linux/of_gpio.h>
>  
>  #include <video/omapdss.h>
>  #include <video/omap-panel-data.h>
> +#include <video/of_display_timing.h>
>  
>  struct panel_drv_data {
>  	struct omap_dss_device dssdev;
> @@ -70,7 +73,8 @@ static int panel_dpi_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);
>  
>  	r = in->ops.dpi->enable(in);
> @@ -182,6 +186,52 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int panel_dpi_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;
> +	struct display_timing timing;
> +	struct videomode vm;
> +	int gpio;
> +
> +	gpio = of_get_gpio(node, 0);
> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> +		ddata->enable_gpio = gpio;
> +	} else {
> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> +		return gpio;
> +	}
> +
> +	gpio = of_get_gpio(node, 1);
> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> +		ddata->backlight_gpio = gpio;
> +	} else {
> +		dev_err(&pdev->dev, "failed to parse backlight gpio\n");
> +		return gpio;
> +	}
> +
> +	r = of_get_display_timing(node, "panel-timing", &timing);
> +	if (r) {
> +		dev_err(&pdev->dev, "failed to get video timing\n");
> +		return r;
> +	}
> +
> +	videomode_from_timing(&timing, &vm);
> +	videomode_to_omap_video_timings(&vm, &ddata->videomode);
> +
> +	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 panel_dpi_probe(struct platform_device *pdev)
>  {
>  	struct panel_drv_data *ddata;
> @@ -198,6 +248,10 @@ static int panel_dpi_probe(struct platform_device *pdev)
>  		r = panel_dpi_probe_pdata(pdev);
>  		if (r)
>  			return r;
> +	} else if (pdev->dev.of_node) {
> +		r = panel_dpi_probe_of(pdev);
> +		if (r)
> +			return r;
>  	} else {
>  		return -ENODEV;
>  	}
> @@ -254,12 +308,20 @@ static int __exit panel_dpi_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static const struct of_device_id panel_dpi_of_match[] = {
> +	{ .compatible = "omapdss,panel-dpi", },
> +	{},
> +};
> +
> +MODULE_DEVICE_TABLE(of, panel_dpi_of_match);
> +
>  static struct platform_driver panel_dpi_driver = {
>  	.probe = panel_dpi_probe,
>  	.remove = __exit_p(panel_dpi_remove),
>  	.driver = {
>  		.name = "panel-dpi",
>  		.owner = THIS_MODULE,
> +		.of_match_table = panel_dpi_of_match,
>  	},
>  };
>  
> -- 
> 1.8.3.2
> 

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-08  0:13     ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-08  0:13 UTC (permalink / raw)
  To: linux-arm-kernel

Tomi,

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140121 03:01]:
> Add DT support for panel-dpi.

Looks like this patch did not get merged or am I missing
something?

As you probably are aware, we have at least these boards
needing it before we can remove the omap3 legacy support:

board-am3517evm.c
board-cm-t35.c
board-devkit8000.c
board-ldp.c
board-overo.c

We could probably set the display timings based on the
compatible flag in the driver if that's an issue?

And then board-omap3pandora.c also needs support for
panel_tpo_td043mtea1_platform_data.
 
Regards,

Tony

> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>  drivers/video/omap2/displays-new/panel-dpi.c | 64 +++++++++++++++++++++++++++-
>  1 file changed, 63 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/video/omap2/displays-new/panel-dpi.c b/drivers/video/omap2/displays-new/panel-dpi.c
> index 5f8f7e7c81ef..b032daf0f407 100644
> --- a/drivers/video/omap2/displays-new/panel-dpi.c
> +++ b/drivers/video/omap2/displays-new/panel-dpi.c
> @@ -13,9 +13,12 @@
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
> +#include <linux/of.h>
> +#include <linux/of_gpio.h>
>  
>  #include <video/omapdss.h>
>  #include <video/omap-panel-data.h>
> +#include <video/of_display_timing.h>
>  
>  struct panel_drv_data {
>  	struct omap_dss_device dssdev;
> @@ -70,7 +73,8 @@ static int panel_dpi_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);
>  
>  	r = in->ops.dpi->enable(in);
> @@ -182,6 +186,52 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int panel_dpi_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;
> +	struct display_timing timing;
> +	struct videomode vm;
> +	int gpio;
> +
> +	gpio = of_get_gpio(node, 0);
> +	if (gpio_is_valid(gpio) || gpio = -ENOENT) {
> +		ddata->enable_gpio = gpio;
> +	} else {
> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> +		return gpio;
> +	}
> +
> +	gpio = of_get_gpio(node, 1);
> +	if (gpio_is_valid(gpio) || gpio = -ENOENT) {
> +		ddata->backlight_gpio = gpio;
> +	} else {
> +		dev_err(&pdev->dev, "failed to parse backlight gpio\n");
> +		return gpio;
> +	}
> +
> +	r = of_get_display_timing(node, "panel-timing", &timing);
> +	if (r) {
> +		dev_err(&pdev->dev, "failed to get video timing\n");
> +		return r;
> +	}
> +
> +	videomode_from_timing(&timing, &vm);
> +	videomode_to_omap_video_timings(&vm, &ddata->videomode);
> +
> +	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 panel_dpi_probe(struct platform_device *pdev)
>  {
>  	struct panel_drv_data *ddata;
> @@ -198,6 +248,10 @@ static int panel_dpi_probe(struct platform_device *pdev)
>  		r = panel_dpi_probe_pdata(pdev);
>  		if (r)
>  			return r;
> +	} else if (pdev->dev.of_node) {
> +		r = panel_dpi_probe_of(pdev);
> +		if (r)
> +			return r;
>  	} else {
>  		return -ENODEV;
>  	}
> @@ -254,12 +308,20 @@ static int __exit panel_dpi_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static const struct of_device_id panel_dpi_of_match[] = {
> +	{ .compatible = "omapdss,panel-dpi", },
> +	{},
> +};
> +
> +MODULE_DEVICE_TABLE(of, panel_dpi_of_match);
> +
>  static struct platform_driver panel_dpi_driver = {
>  	.probe = panel_dpi_probe,
>  	.remove = __exit_p(panel_dpi_remove),
>  	.driver = {
>  		.name = "panel-dpi",
>  		.owner = THIS_MODULE,
> +		.of_match_table = panel_dpi_of_match,
>  	},
>  };
>  
> -- 
> 1.8.3.2
> 

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-08  0:13     ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-08  0:13 UTC (permalink / raw)
  To: linux-arm-kernel

Tomi,

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140121 03:01]:
> Add DT support for panel-dpi.

Looks like this patch did not get merged or am I missing
something?

As you probably are aware, we have at least these boards
needing it before we can remove the omap3 legacy support:

board-am3517evm.c
board-cm-t35.c
board-devkit8000.c
board-ldp.c
board-overo.c

We could probably set the display timings based on the
compatible flag in the driver if that's an issue?

And then board-omap3pandora.c also needs support for
panel_tpo_td043mtea1_platform_data.
 
Regards,

Tony

> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>  drivers/video/omap2/displays-new/panel-dpi.c | 64 +++++++++++++++++++++++++++-
>  1 file changed, 63 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/video/omap2/displays-new/panel-dpi.c b/drivers/video/omap2/displays-new/panel-dpi.c
> index 5f8f7e7c81ef..b032daf0f407 100644
> --- a/drivers/video/omap2/displays-new/panel-dpi.c
> +++ b/drivers/video/omap2/displays-new/panel-dpi.c
> @@ -13,9 +13,12 @@
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
> +#include <linux/of.h>
> +#include <linux/of_gpio.h>
>  
>  #include <video/omapdss.h>
>  #include <video/omap-panel-data.h>
> +#include <video/of_display_timing.h>
>  
>  struct panel_drv_data {
>  	struct omap_dss_device dssdev;
> @@ -70,7 +73,8 @@ static int panel_dpi_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);
>  
>  	r = in->ops.dpi->enable(in);
> @@ -182,6 +186,52 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int panel_dpi_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;
> +	struct display_timing timing;
> +	struct videomode vm;
> +	int gpio;
> +
> +	gpio = of_get_gpio(node, 0);
> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> +		ddata->enable_gpio = gpio;
> +	} else {
> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> +		return gpio;
> +	}
> +
> +	gpio = of_get_gpio(node, 1);
> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> +		ddata->backlight_gpio = gpio;
> +	} else {
> +		dev_err(&pdev->dev, "failed to parse backlight gpio\n");
> +		return gpio;
> +	}
> +
> +	r = of_get_display_timing(node, "panel-timing", &timing);
> +	if (r) {
> +		dev_err(&pdev->dev, "failed to get video timing\n");
> +		return r;
> +	}
> +
> +	videomode_from_timing(&timing, &vm);
> +	videomode_to_omap_video_timings(&vm, &ddata->videomode);
> +
> +	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 panel_dpi_probe(struct platform_device *pdev)
>  {
>  	struct panel_drv_data *ddata;
> @@ -198,6 +248,10 @@ static int panel_dpi_probe(struct platform_device *pdev)
>  		r = panel_dpi_probe_pdata(pdev);
>  		if (r)
>  			return r;
> +	} else if (pdev->dev.of_node) {
> +		r = panel_dpi_probe_of(pdev);
> +		if (r)
> +			return r;
>  	} else {
>  		return -ENODEV;
>  	}
> @@ -254,12 +308,20 @@ static int __exit panel_dpi_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static const struct of_device_id panel_dpi_of_match[] = {
> +	{ .compatible = "omapdss,panel-dpi", },
> +	{},
> +};
> +
> +MODULE_DEVICE_TABLE(of, panel_dpi_of_match);
> +
>  static struct platform_driver panel_dpi_driver = {
>  	.probe = panel_dpi_probe,
>  	.remove = __exit_p(panel_dpi_remove),
>  	.driver = {
>  		.name = "panel-dpi",
>  		.owner = THIS_MODULE,
> +		.of_match_table = panel_dpi_of_match,
>  	},
>  };
>  
> -- 
> 1.8.3.2
> 

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
  2014-04-08  0:13     ` Tony Lindgren
  (?)
@ 2014-04-08  5:38       ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-04-08  5:38 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Laurent Pinchart, Stefan Roese,
	Sebastian Reichel, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Sebastian Reichel, Javier Martinez Canillas,
	Enric Balletbo Serra, Florian Vaussard

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]

On 08/04/14 03:13, Tony Lindgren wrote:
> Tomi,
> 
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [140121 03:01]:
>> Add DT support for panel-dpi.
> 
> Looks like this patch did not get merged or am I missing
> something?

Yes, I dropped it. None of the boards that I converted used panel-dpi.
There was so much discussions about the display bindings, so I thought
it's better to leave out all but the needed patches.

> As you probably are aware, we have at least these boards
> needing it before we can remove the omap3 legacy support:
> 
> board-am3517evm.c
> board-cm-t35.c
> board-devkit8000.c
> board-ldp.c
> board-overo.c
> 
> We could probably set the display timings based on the
> compatible flag in the driver if that's an issue?

The timings shouldn't be an issue. But there's the backlight GPIO,
currently handled by panel-dpi, which should be removed from the panel.
We should use gpio-backlight for that one.

> And then board-omap3pandora.c also needs support for
> panel_tpo_td043mtea1_platform_data.

Yep, there's still much to do for DSS DT support. Hopefully it will be
easier now that the core support is there. I'll continue working on the
remaining boards and panels. However, I don't have any of the remaining
boards, so help is of course appreciated.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-08  5:38       ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-04-08  5:38 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]

On 08/04/14 03:13, Tony Lindgren wrote:
> Tomi,
> 
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [140121 03:01]:
>> Add DT support for panel-dpi.
> 
> Looks like this patch did not get merged or am I missing
> something?

Yes, I dropped it. None of the boards that I converted used panel-dpi.
There was so much discussions about the display bindings, so I thought
it's better to leave out all but the needed patches.

> As you probably are aware, we have at least these boards
> needing it before we can remove the omap3 legacy support:
> 
> board-am3517evm.c
> board-cm-t35.c
> board-devkit8000.c
> board-ldp.c
> board-overo.c
> 
> We could probably set the display timings based on the
> compatible flag in the driver if that's an issue?

The timings shouldn't be an issue. But there's the backlight GPIO,
currently handled by panel-dpi, which should be removed from the panel.
We should use gpio-backlight for that one.

> And then board-omap3pandora.c also needs support for
> panel_tpo_td043mtea1_platform_data.

Yep, there's still much to do for DSS DT support. Hopefully it will be
easier now that the core support is there. I'll continue working on the
remaining boards and panels. However, I don't have any of the remaining
boards, so help is of course appreciated.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-08  5:38       ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-04-08  5:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/04/14 03:13, Tony Lindgren wrote:
> Tomi,
> 
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [140121 03:01]:
>> Add DT support for panel-dpi.
> 
> Looks like this patch did not get merged or am I missing
> something?

Yes, I dropped it. None of the boards that I converted used panel-dpi.
There was so much discussions about the display bindings, so I thought
it's better to leave out all but the needed patches.

> As you probably are aware, we have at least these boards
> needing it before we can remove the omap3 legacy support:
> 
> board-am3517evm.c
> board-cm-t35.c
> board-devkit8000.c
> board-ldp.c
> board-overo.c
> 
> We could probably set the display timings based on the
> compatible flag in the driver if that's an issue?

The timings shouldn't be an issue. But there's the backlight GPIO,
currently handled by panel-dpi, which should be removed from the panel.
We should use gpio-backlight for that one.

> And then board-omap3pandora.c also needs support for
> panel_tpo_td043mtea1_platform_data.

Yep, there's still much to do for DSS DT support. Hopefully it will be
easier now that the core support is there. I'll continue working on the
remaining boards and panels. However, I don't have any of the remaining
boards, so help is of course appreciated.

 Tomi


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140408/b23108fb/attachment.sig>

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
  2014-04-08  5:38       ` Tomi Valkeinen
  (?)
@ 2014-04-08 15:29         ` Tony Lindgren
  -1 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-08 15:29 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Laurent Pinchart, Stefan Roese,
	Sebastian Reichel, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Sebastian Reichel, Javier Martinez Canillas,
	Enric Balletbo Serra, Florian Vaussard

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140407 22:42]:
> On 08/04/14 03:13, Tony Lindgren wrote:
> > Tomi,
> > 
> > * Tomi Valkeinen <tomi.valkeinen@ti.com> [140121 03:01]:
> >> Add DT support for panel-dpi.
> > 
> > Looks like this patch did not get merged or am I missing
> > something?
> 
> Yes, I dropped it. None of the boards that I converted used panel-dpi.
> There was so much discussions about the display bindings, so I thought
> it's better to leave out all but the needed patches.

OK
 
> > As you probably are aware, we have at least these boards
> > needing it before we can remove the omap3 legacy support:
> > 
> > board-am3517evm.c
> > board-cm-t35.c
> > board-devkit8000.c
> > board-ldp.c
> > board-overo.c
> > 
> > We could probably set the display timings based on the
> > compatible flag in the driver if that's an issue?
> 
> The timings shouldn't be an issue. But there's the backlight GPIO,
> currently handled by panel-dpi, which should be removed from the panel.
> We should use gpio-backlight for that one.

Using gpio-backlight makes sense for sure.

FYI, in the case of the LDP there are four GPIOs to configure to
get things going:

gpio55		LCD RESET		panel-dpi?
gpio56		LCD QVGA		panel-dpi?
twl gpio7	LCD power		panel-dpi
twl gpio15	LCD backlight		gpio-backlight
 
> > And then board-omap3pandora.c also needs support for
> > panel_tpo_td043mtea1_platform_data.
> 
> Yep, there's still much to do for DSS DT support. Hopefully it will be
> easier now that the core support is there. I'll continue working on the
> remaining boards and panels. However, I don't have any of the remaining
> boards, so help is of course appreciated.

Yeah I can test at least the LDP here.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-08 15:29         ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-08 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140407 22:42]:
> On 08/04/14 03:13, Tony Lindgren wrote:
> > Tomi,
> > 
> > * Tomi Valkeinen <tomi.valkeinen@ti.com> [140121 03:01]:
> >> Add DT support for panel-dpi.
> > 
> > Looks like this patch did not get merged or am I missing
> > something?
> 
> Yes, I dropped it. None of the boards that I converted used panel-dpi.
> There was so much discussions about the display bindings, so I thought
> it's better to leave out all but the needed patches.

OK
 
> > As you probably are aware, we have at least these boards
> > needing it before we can remove the omap3 legacy support:
> > 
> > board-am3517evm.c
> > board-cm-t35.c
> > board-devkit8000.c
> > board-ldp.c
> > board-overo.c
> > 
> > We could probably set the display timings based on the
> > compatible flag in the driver if that's an issue?
> 
> The timings shouldn't be an issue. But there's the backlight GPIO,
> currently handled by panel-dpi, which should be removed from the panel.
> We should use gpio-backlight for that one.

Using gpio-backlight makes sense for sure.

FYI, in the case of the LDP there are four GPIOs to configure to
get things going:

gpio55		LCD RESET		panel-dpi?
gpio56		LCD QVGA		panel-dpi?
twl gpio7	LCD power		panel-dpi
twl gpio15	LCD backlight		gpio-backlight
 
> > And then board-omap3pandora.c also needs support for
> > panel_tpo_td043mtea1_platform_data.
> 
> Yep, there's still much to do for DSS DT support. Hopefully it will be
> easier now that the core support is there. I'll continue working on the
> remaining boards and panels. However, I don't have any of the remaining
> boards, so help is of course appreciated.

Yeah I can test at least the LDP here.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-08 15:29         ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-08 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140407 22:42]:
> On 08/04/14 03:13, Tony Lindgren wrote:
> > Tomi,
> > 
> > * Tomi Valkeinen <tomi.valkeinen@ti.com> [140121 03:01]:
> >> Add DT support for panel-dpi.
> > 
> > Looks like this patch did not get merged or am I missing
> > something?
> 
> Yes, I dropped it. None of the boards that I converted used panel-dpi.
> There was so much discussions about the display bindings, so I thought
> it's better to leave out all but the needed patches.

OK
 
> > As you probably are aware, we have at least these boards
> > needing it before we can remove the omap3 legacy support:
> > 
> > board-am3517evm.c
> > board-cm-t35.c
> > board-devkit8000.c
> > board-ldp.c
> > board-overo.c
> > 
> > We could probably set the display timings based on the
> > compatible flag in the driver if that's an issue?
> 
> The timings shouldn't be an issue. But there's the backlight GPIO,
> currently handled by panel-dpi, which should be removed from the panel.
> We should use gpio-backlight for that one.

Using gpio-backlight makes sense for sure.

FYI, in the case of the LDP there are four GPIOs to configure to
get things going:

gpio55		LCD RESET		panel-dpi?
gpio56		LCD QVGA		panel-dpi?
twl gpio7	LCD power		panel-dpi
twl gpio15	LCD backlight		gpio-backlight
 
> > And then board-omap3pandora.c also needs support for
> > panel_tpo_td043mtea1_platform_data.
> 
> Yep, there's still much to do for DSS DT support. Hopefully it will be
> easier now that the core support is there. I'll continue working on the
> remaining boards and panels. However, I don't have any of the remaining
> boards, so help is of course appreciated.

Yeah I can test at least the LDP here.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
  2014-01-21 10:56   ` Tomi Valkeinen
  (?)
@ 2014-04-18 15:51     ` Tony Lindgren
  -1 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-18 15:51 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Laurent Pinchart, Stefan Roese,
	Sebastian Reichel, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Sebastian Reichel, Javier Martinez Canillas,
	Enric Balletbo Serra, Florian Vaussard, Joachim Eastwood

Hi,

Just trying to summarize what has been discussed so far in
various threads regarding changes needed to this patch.

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140121 03:01]:
> --- a/drivers/video/omap2/displays-new/panel-dpi.c
> +++ b/drivers/video/omap2/displays-new/panel-dpi.c
> @@ -182,6 +186,52 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int panel_dpi_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;
> +	struct display_timing timing;
> +	struct videomode vm;
> +	int gpio;
> +
> +	gpio = of_get_gpio(node, 0);
> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> +		ddata->enable_gpio = gpio;
> +	} else {
> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> +		return gpio;
> +	}

We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
gpio_backlight_probe_dt is doing. 

Then do we really want to do the dev_err for each -EPROBE_DEFER here?

> +	gpio = of_get_gpio(node, 1);
> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> +		ddata->backlight_gpio = gpio;
> +	} else {
> +		dev_err(&pdev->dev, "failed to parse backlight gpio\n");
> +		return gpio;
> +	}

How about let's drop the backlight_gpio as discussed since it
can be handled with gpio-backlight?

Instead, let's add the panel specific reset_gpio as suggested by
Joachim. That seems common to some dpi using panels.

Then support for the other panel specific GPIOs can then be added
as a follow-up patch when we know how we want to handle them.

Oh, and this patch needs the related binding documentation too in
Documentation/devicetree/bindings.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-18 15:51     ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-18 15:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Just trying to summarize what has been discussed so far in
various threads regarding changes needed to this patch.

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140121 03:01]:
> --- a/drivers/video/omap2/displays-new/panel-dpi.c
> +++ b/drivers/video/omap2/displays-new/panel-dpi.c
> @@ -182,6 +186,52 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int panel_dpi_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;
> +	struct display_timing timing;
> +	struct videomode vm;
> +	int gpio;
> +
> +	gpio = of_get_gpio(node, 0);
> +	if (gpio_is_valid(gpio) || gpio = -ENOENT) {
> +		ddata->enable_gpio = gpio;
> +	} else {
> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> +		return gpio;
> +	}

We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
gpio_backlight_probe_dt is doing. 

Then do we really want to do the dev_err for each -EPROBE_DEFER here?

> +	gpio = of_get_gpio(node, 1);
> +	if (gpio_is_valid(gpio) || gpio = -ENOENT) {
> +		ddata->backlight_gpio = gpio;
> +	} else {
> +		dev_err(&pdev->dev, "failed to parse backlight gpio\n");
> +		return gpio;
> +	}

How about let's drop the backlight_gpio as discussed since it
can be handled with gpio-backlight?

Instead, let's add the panel specific reset_gpio as suggested by
Joachim. That seems common to some dpi using panels.

Then support for the other panel specific GPIOs can then be added
as a follow-up patch when we know how we want to handle them.

Oh, and this patch needs the related binding documentation too in
Documentation/devicetree/bindings.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-18 15:51     ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-18 15:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Just trying to summarize what has been discussed so far in
various threads regarding changes needed to this patch.

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140121 03:01]:
> --- a/drivers/video/omap2/displays-new/panel-dpi.c
> +++ b/drivers/video/omap2/displays-new/panel-dpi.c
> @@ -182,6 +186,52 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int panel_dpi_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;
> +	struct display_timing timing;
> +	struct videomode vm;
> +	int gpio;
> +
> +	gpio = of_get_gpio(node, 0);
> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> +		ddata->enable_gpio = gpio;
> +	} else {
> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> +		return gpio;
> +	}

We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
gpio_backlight_probe_dt is doing. 

Then do we really want to do the dev_err for each -EPROBE_DEFER here?

> +	gpio = of_get_gpio(node, 1);
> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> +		ddata->backlight_gpio = gpio;
> +	} else {
> +		dev_err(&pdev->dev, "failed to parse backlight gpio\n");
> +		return gpio;
> +	}

How about let's drop the backlight_gpio as discussed since it
can be handled with gpio-backlight?

Instead, let's add the panel specific reset_gpio as suggested by
Joachim. That seems common to some dpi using panels.

Then support for the other panel specific GPIOs can then be added
as a follow-up patch when we know how we want to handle them.

Oh, and this patch needs the related binding documentation too in
Documentation/devicetree/bindings.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
  2014-04-18 15:51     ` Tony Lindgren
  (?)
@ 2014-04-24  9:52       ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-04-24  9:52 UTC (permalink / raw)
  To: Tony Lindgren, Joachim Eastwood
  Cc: linux-arm-kernel, linux-omap, linux-fbdev, devicetree,
	Archit Taneja, Darren Etheridge, Laurent Pinchart, Stefan Roese,
	Sebastian Reichel, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Sebastian Reichel, Javier Martinez Canillas,
	Enric Balletbo Serra, Florian Vaussard


[-- Attachment #1.1: Type: text/plain, Size: 983 bytes --]

On 18/04/14 18:51, Tony Lindgren wrote:

>> +	gpio = of_get_gpio(node, 0);
>> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
>> +		ddata->enable_gpio = gpio;
>> +	} else {
>> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
>> +		return gpio;
>> +	}
> 
> We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
> gpio_backlight_probe_dt is doing. 

Instead of doing it with the old gpio API, and checking the 'active'
flag everywhere, I think we can use the new gpiod API which handles the
polarity automatically.

I attached prototype patches (based on -rc2) for panel dpi using that
approach. It's a bit messier than I'd like, because for non-DT boot we
need to request the gpio using the old API, and then convert it to
gpio_desc. We can remove that code when all the boards use DT.

I've compiled tested this only, as I don't have DPI panels I could use.
I did try similar approach for TFP410, and it seemed to work fine.

 Tomi


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-panel-dpi-use-gpiod-for-enable-gpio.patch --]
[-- Type: text/x-patch; name="0001-panel-dpi-use-gpiod-for-enable-gpio.patch", Size: 3048 bytes --]

From f2280114f0eb814370664f24eba8ffee8280c840 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Thu, 24 Apr 2014 12:36:52 +0300
Subject: [PATCH 1/3] panel-dpi: use gpiod for enable gpio

---
 drivers/video/fbdev/omap2/displays-new/panel-dpi.c | 32 +++++++++++++---------
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
index 5f8f7e7c81ef..d379dec3bd4a 100644
--- a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
+++ b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
@@ -25,8 +25,10 @@ struct panel_drv_data {
 
 	struct omap_video_timings videomode;
 
+	/* used for non-DT boot, to be removed */
 	int backlight_gpio;
-	int enable_gpio;
+
+	struct gpio_desc *enable_gpio;
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
@@ -77,8 +79,8 @@ static int panel_dpi_enable(struct omap_dss_device *dssdev)
 	if (r)
 		return r;
 
-	if (gpio_is_valid(ddata->enable_gpio))
-		gpio_set_value_cansleep(ddata->enable_gpio, 1);
+	if (ddata->enable_gpio)
+		gpiod_set_value_cansleep(ddata->enable_gpio, 1);
 
 	if (gpio_is_valid(ddata->backlight_gpio))
 		gpio_set_value_cansleep(ddata->backlight_gpio, 1);
@@ -96,8 +98,8 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev)
 	if (!omapdss_device_is_enabled(dssdev))
 		return;
 
-	if (gpio_is_valid(ddata->enable_gpio))
-		gpio_set_value_cansleep(ddata->enable_gpio, 0);
+	if (ddata->enable_gpio)
+		gpiod_set_value_cansleep(ddata->enable_gpio, 0);
 
 	if (gpio_is_valid(ddata->backlight_gpio))
 		gpio_set_value_cansleep(ddata->backlight_gpio, 0);
@@ -156,6 +158,7 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
 	struct panel_drv_data *ddata = platform_get_drvdata(pdev);
 	struct omap_dss_device *dssdev, *in;
 	struct videomode vm;
+	int r;
 
 	pdata = dev_get_platdata(&pdev->dev);
 
@@ -176,10 +179,20 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
 	dssdev = &ddata->dssdev;
 	dssdev->name = pdata->name;
 
-	ddata->enable_gpio = pdata->enable_gpio;
+	r = devm_gpio_request_one(&pdev->dev, pdata->enable_gpio,
+					GPIOF_OUT_INIT_LOW, "panel enable");
+	if (r)
+		goto err_gpio;
+
+	ddata->enable_gpio = gpio_to_desc(pdata->enable_gpio);
+
 	ddata->backlight_gpio = pdata->backlight_gpio;
 
 	return 0;
+
+err_gpio:
+	omap_dss_put_device(ddata->in);
+	return r;
 }
 
 static int panel_dpi_probe(struct platform_device *pdev)
@@ -202,13 +215,6 @@ static int panel_dpi_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	if (gpio_is_valid(ddata->enable_gpio)) {
-		r = devm_gpio_request_one(&pdev->dev, ddata->enable_gpio,
-				GPIOF_OUT_INIT_LOW, "panel enable");
-		if (r)
-			goto err_gpio;
-	}
-
 	if (gpio_is_valid(ddata->backlight_gpio)) {
 		r = devm_gpio_request_one(&pdev->dev, ddata->backlight_gpio,
 				GPIOF_OUT_INIT_LOW, "panel backlight");
-- 
1.9.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-OMAPDSS-panel-dpi-Add-DT-support.patch --]
[-- Type: text/x-patch; name="0002-OMAPDSS-panel-dpi-Add-DT-support.patch", Size: 3461 bytes --]

From fe2a85da34499fab70212c4cc5870378678da709 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Thu, 16 May 2013 15:14:16 +0300
Subject: [PATCH 2/3] OMAPDSS: panel-dpi: Add DT support

Add DT support for panel-dpi.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
---
 drivers/video/fbdev/omap2/displays-new/panel-dpi.c | 59 +++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
index d379dec3bd4a..dca6b10d1157 100644
--- a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
+++ b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
@@ -13,9 +13,12 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/of.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
+#include <video/of_display_timing.h>
 
 struct panel_drv_data {
 	struct omap_dss_device dssdev;
@@ -72,7 +75,8 @@ static int panel_dpi_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);
 
 	r = in->ops.dpi->enable(in);
@@ -195,6 +199,47 @@ err_gpio:
 	return r;
 }
 
+static int panel_dpi_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;
+	struct display_timing timing;
+	struct videomode vm;
+	struct gpio_desc *gpio;
+
+	gpio = devm_gpiod_get(&pdev->dev, "enable");
+	if (IS_ERR(gpio)) {
+		dev_err(&pdev->dev, "failed to parse enable gpio\n");
+		return PTR_ERR(gpio);
+	} else {
+		gpiod_direction_output(gpio, 0);
+		ddata->enable_gpio = gpio;
+	}
+
+	ddata->backlight_gpio = -ENOENT;
+
+	r = of_get_display_timing(node, "panel-timing", &timing);
+	if (r) {
+		dev_err(&pdev->dev, "failed to get video timing\n");
+		return r;
+	}
+
+	videomode_from_timing(&timing, &vm);
+	videomode_to_omap_video_timings(&vm, &ddata->videomode);
+
+	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 panel_dpi_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -211,6 +256,10 @@ static int panel_dpi_probe(struct platform_device *pdev)
 		r = panel_dpi_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = panel_dpi_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -260,12 +309,20 @@ static int __exit panel_dpi_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id panel_dpi_of_match[] = {
+	{ .compatible = "omapdss,panel-dpi", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, panel_dpi_of_match);
+
 static struct platform_driver panel_dpi_driver = {
 	.probe = panel_dpi_probe,
 	.remove = __exit_p(panel_dpi_remove),
 	.driver = {
 		.name = "panel-dpi",
 		.owner = THIS_MODULE,
+		.of_match_table = panel_dpi_of_match,
 	},
 };
 
-- 
1.9.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-24  9:52       ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-04-24  9:52 UTC (permalink / raw)
  To: linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 983 bytes --]

On 18/04/14 18:51, Tony Lindgren wrote:

>> +	gpio = of_get_gpio(node, 0);
>> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
>> +		ddata->enable_gpio = gpio;
>> +	} else {
>> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
>> +		return gpio;
>> +	}
> 
> We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
> gpio_backlight_probe_dt is doing. 

Instead of doing it with the old gpio API, and checking the 'active'
flag everywhere, I think we can use the new gpiod API which handles the
polarity automatically.

I attached prototype patches (based on -rc2) for panel dpi using that
approach. It's a bit messier than I'd like, because for non-DT boot we
need to request the gpio using the old API, and then convert it to
gpio_desc. We can remove that code when all the boards use DT.

I've compiled tested this only, as I don't have DPI panels I could use.
I did try similar approach for TFP410, and it seemed to work fine.

 Tomi


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-panel-dpi-use-gpiod-for-enable-gpio.patch --]
[-- Type: text/x-patch; name="0001-panel-dpi-use-gpiod-for-enable-gpio.patch", Size: 3048 bytes --]

From f2280114f0eb814370664f24eba8ffee8280c840 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Thu, 24 Apr 2014 12:36:52 +0300
Subject: [PATCH 1/3] panel-dpi: use gpiod for enable gpio

---
 drivers/video/fbdev/omap2/displays-new/panel-dpi.c | 32 +++++++++++++---------
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
index 5f8f7e7c81ef..d379dec3bd4a 100644
--- a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
+++ b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
@@ -25,8 +25,10 @@ struct panel_drv_data {
 
 	struct omap_video_timings videomode;
 
+	/* used for non-DT boot, to be removed */
 	int backlight_gpio;
-	int enable_gpio;
+
+	struct gpio_desc *enable_gpio;
 };
 
 #define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
@@ -77,8 +79,8 @@ static int panel_dpi_enable(struct omap_dss_device *dssdev)
 	if (r)
 		return r;
 
-	if (gpio_is_valid(ddata->enable_gpio))
-		gpio_set_value_cansleep(ddata->enable_gpio, 1);
+	if (ddata->enable_gpio)
+		gpiod_set_value_cansleep(ddata->enable_gpio, 1);
 
 	if (gpio_is_valid(ddata->backlight_gpio))
 		gpio_set_value_cansleep(ddata->backlight_gpio, 1);
@@ -96,8 +98,8 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev)
 	if (!omapdss_device_is_enabled(dssdev))
 		return;
 
-	if (gpio_is_valid(ddata->enable_gpio))
-		gpio_set_value_cansleep(ddata->enable_gpio, 0);
+	if (ddata->enable_gpio)
+		gpiod_set_value_cansleep(ddata->enable_gpio, 0);
 
 	if (gpio_is_valid(ddata->backlight_gpio))
 		gpio_set_value_cansleep(ddata->backlight_gpio, 0);
@@ -156,6 +158,7 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
 	struct panel_drv_data *ddata = platform_get_drvdata(pdev);
 	struct omap_dss_device *dssdev, *in;
 	struct videomode vm;
+	int r;
 
 	pdata = dev_get_platdata(&pdev->dev);
 
@@ -176,10 +179,20 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev)
 	dssdev = &ddata->dssdev;
 	dssdev->name = pdata->name;
 
-	ddata->enable_gpio = pdata->enable_gpio;
+	r = devm_gpio_request_one(&pdev->dev, pdata->enable_gpio,
+					GPIOF_OUT_INIT_LOW, "panel enable");
+	if (r)
+		goto err_gpio;
+
+	ddata->enable_gpio = gpio_to_desc(pdata->enable_gpio);
+
 	ddata->backlight_gpio = pdata->backlight_gpio;
 
 	return 0;
+
+err_gpio:
+	omap_dss_put_device(ddata->in);
+	return r;
 }
 
 static int panel_dpi_probe(struct platform_device *pdev)
@@ -202,13 +215,6 @@ static int panel_dpi_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	if (gpio_is_valid(ddata->enable_gpio)) {
-		r = devm_gpio_request_one(&pdev->dev, ddata->enable_gpio,
-				GPIOF_OUT_INIT_LOW, "panel enable");
-		if (r)
-			goto err_gpio;
-	}
-
 	if (gpio_is_valid(ddata->backlight_gpio)) {
 		r = devm_gpio_request_one(&pdev->dev, ddata->backlight_gpio,
 				GPIOF_OUT_INIT_LOW, "panel backlight");
-- 
1.9.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-OMAPDSS-panel-dpi-Add-DT-support.patch --]
[-- Type: text/x-patch; name="0002-OMAPDSS-panel-dpi-Add-DT-support.patch", Size: 3461 bytes --]

From fe2a85da34499fab70212c4cc5870378678da709 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Thu, 16 May 2013 15:14:16 +0300
Subject: [PATCH 2/3] OMAPDSS: panel-dpi: Add DT support

Add DT support for panel-dpi.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
---
 drivers/video/fbdev/omap2/displays-new/panel-dpi.c | 59 +++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
index d379dec3bd4a..dca6b10d1157 100644
--- a/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
+++ b/drivers/video/fbdev/omap2/displays-new/panel-dpi.c
@@ -13,9 +13,12 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/of.h>
+#include <linux/of_gpio.h>
 
 #include <video/omapdss.h>
 #include <video/omap-panel-data.h>
+#include <video/of_display_timing.h>
 
 struct panel_drv_data {
 	struct omap_dss_device dssdev;
@@ -72,7 +75,8 @@ static int panel_dpi_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);
 
 	r = in->ops.dpi->enable(in);
@@ -195,6 +199,47 @@ err_gpio:
 	return r;
 }
 
+static int panel_dpi_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;
+	struct display_timing timing;
+	struct videomode vm;
+	struct gpio_desc *gpio;
+
+	gpio = devm_gpiod_get(&pdev->dev, "enable");
+	if (IS_ERR(gpio)) {
+		dev_err(&pdev->dev, "failed to parse enable gpio\n");
+		return PTR_ERR(gpio);
+	} else {
+		gpiod_direction_output(gpio, 0);
+		ddata->enable_gpio = gpio;
+	}
+
+	ddata->backlight_gpio = -ENOENT;
+
+	r = of_get_display_timing(node, "panel-timing", &timing);
+	if (r) {
+		dev_err(&pdev->dev, "failed to get video timing\n");
+		return r;
+	}
+
+	videomode_from_timing(&timing, &vm);
+	videomode_to_omap_video_timings(&vm, &ddata->videomode);
+
+	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 panel_dpi_probe(struct platform_device *pdev)
 {
 	struct panel_drv_data *ddata;
@@ -211,6 +256,10 @@ static int panel_dpi_probe(struct platform_device *pdev)
 		r = panel_dpi_probe_pdata(pdev);
 		if (r)
 			return r;
+	} else if (pdev->dev.of_node) {
+		r = panel_dpi_probe_of(pdev);
+		if (r)
+			return r;
 	} else {
 		return -ENODEV;
 	}
@@ -260,12 +309,20 @@ static int __exit panel_dpi_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id panel_dpi_of_match[] = {
+	{ .compatible = "omapdss,panel-dpi", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, panel_dpi_of_match);
+
 static struct platform_driver panel_dpi_driver = {
 	.probe = panel_dpi_probe,
 	.remove = __exit_p(panel_dpi_remove),
 	.driver = {
 		.name = "panel-dpi",
 		.owner = THIS_MODULE,
+		.of_match_table = panel_dpi_of_match,
 	},
 };
 
-- 
1.9.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply related	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-24  9:52       ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-04-24  9:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 18/04/14 18:51, Tony Lindgren wrote:

>> +	gpio = of_get_gpio(node, 0);
>> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
>> +		ddata->enable_gpio = gpio;
>> +	} else {
>> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
>> +		return gpio;
>> +	}
> 
> We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
> gpio_backlight_probe_dt is doing. 

Instead of doing it with the old gpio API, and checking the 'active'
flag everywhere, I think we can use the new gpiod API which handles the
polarity automatically.

I attached prototype patches (based on -rc2) for panel dpi using that
approach. It's a bit messier than I'd like, because for non-DT boot we
need to request the gpio using the old API, and then convert it to
gpio_desc. We can remove that code when all the boards use DT.

I've compiled tested this only, as I don't have DPI panels I could use.
I did try similar approach for TFP410, and it seemed to work fine.

 Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-panel-dpi-use-gpiod-for-enable-gpio.patch
Type: text/x-patch
Size: 2954 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140424/be49b8c6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-OMAPDSS-panel-dpi-Add-DT-support.patch
Type: text/x-patch
Size: 3338 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140424/be49b8c6/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140424/be49b8c6/attachment.sig>

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
  2014-04-24  9:52       ` Tomi Valkeinen
  (?)
@ 2014-04-24 12:44           ` Laurent Pinchart
  -1 siblings, 0 replies; 192+ messages in thread
From: Laurent Pinchart @ 2014-04-24 12:44 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Tony Lindgren, Joachim Eastwood,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Archit Taneja,
	Darren Etheridge, Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

Hi Tomi,

On Thursday 24 April 2014 12:52:42 Tomi Valkeinen wrote:
> On 18/04/14 18:51, Tony Lindgren wrote:
> >> +	gpio = of_get_gpio(node, 0);
> >> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> >> +		ddata->enable_gpio = gpio;
> >> +	} else {
> >> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> >> +		return gpio;
> >> +	}
> > 
> > We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
> > gpio_backlight_probe_dt is doing.
> 
> Instead of doing it with the old gpio API, and checking the 'active'
> flag everywhere, I think we can use the new gpiod API which handles the
> polarity automatically.
> 
> I attached prototype patches (based on -rc2) for panel dpi using that
> approach. It's a bit messier than I'd like, because for non-DT boot we
> need to request the gpio using the old API, and then convert it to
> gpio_desc. We can remove that code when all the boards use DT.

Just FYI, you can use the gpiod API with non-DT platforms if you register GPIO 
lookup entries in board code with gpiod_add_lookup_table().

> I've compiled tested this only, as I don't have DPI panels I could use.
> I did try similar approach for TFP410, and it seemed to work fine.

-- 
Regards,

Laurent Pinchart

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-24 12:44           ` Laurent Pinchart
  0 siblings, 0 replies; 192+ messages in thread
From: Laurent Pinchart @ 2014-04-24 12:44 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

Hi Tomi,

On Thursday 24 April 2014 12:52:42 Tomi Valkeinen wrote:
> On 18/04/14 18:51, Tony Lindgren wrote:
> >> +	gpio = of_get_gpio(node, 0);
> >> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> >> +		ddata->enable_gpio = gpio;
> >> +	} else {
> >> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> >> +		return gpio;
> >> +	}
> > 
> > We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
> > gpio_backlight_probe_dt is doing.
> 
> Instead of doing it with the old gpio API, and checking the 'active'
> flag everywhere, I think we can use the new gpiod API which handles the
> polarity automatically.
> 
> I attached prototype patches (based on -rc2) for panel dpi using that
> approach. It's a bit messier than I'd like, because for non-DT boot we
> need to request the gpio using the old API, and then convert it to
> gpio_desc. We can remove that code when all the boards use DT.

Just FYI, you can use the gpiod API with non-DT platforms if you register GPIO 
lookup entries in board code with gpiod_add_lookup_table().

> I've compiled tested this only, as I don't have DPI panels I could use.
> I did try similar approach for TFP410, and it seemed to work fine.

-- 
Regards,

Laurent Pinchart

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-24 12:44           ` Laurent Pinchart
  0 siblings, 0 replies; 192+ messages in thread
From: Laurent Pinchart @ 2014-04-24 12:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tomi,

On Thursday 24 April 2014 12:52:42 Tomi Valkeinen wrote:
> On 18/04/14 18:51, Tony Lindgren wrote:
> >> +	gpio = of_get_gpio(node, 0);
> >> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> >> +		ddata->enable_gpio = gpio;
> >> +	} else {
> >> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> >> +		return gpio;
> >> +	}
> > 
> > We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
> > gpio_backlight_probe_dt is doing.
> 
> Instead of doing it with the old gpio API, and checking the 'active'
> flag everywhere, I think we can use the new gpiod API which handles the
> polarity automatically.
> 
> I attached prototype patches (based on -rc2) for panel dpi using that
> approach. It's a bit messier than I'd like, because for non-DT boot we
> need to request the gpio using the old API, and then convert it to
> gpio_desc. We can remove that code when all the boards use DT.

Just FYI, you can use the gpiod API with non-DT platforms if you register GPIO 
lookup entries in board code with gpiod_add_lookup_table().

> I've compiled tested this only, as I don't have DPI panels I could use.
> I did try similar approach for TFP410, and it seemed to work fine.

-- 
Regards,

Laurent Pinchart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140424/d48b2c9b/attachment.sig>

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
  2014-04-24 12:44           ` Laurent Pinchart
  (?)
@ 2014-04-24 13:12             ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-04-24 13:12 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Tony Lindgren, Joachim Eastwood, linux-arm-kernel, linux-omap,
	linux-fbdev, devicetree, Archit Taneja, Darren Etheridge,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

On 24/04/14 15:44, Laurent Pinchart wrote:

>> I attached prototype patches (based on -rc2) for panel dpi using that
>> approach. It's a bit messier than I'd like, because for non-DT boot we
>> need to request the gpio using the old API, and then convert it to
>> gpio_desc. We can remove that code when all the boards use DT.
> 
> Just FYI, you can use the gpiod API with non-DT platforms if you register GPIO 
> lookup entries in board code with gpiod_add_lookup_table().

Right, but as the board files are going away, I'd rather not touch them
at all if possible.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-24 13:12             ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-04-24 13:12 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

On 24/04/14 15:44, Laurent Pinchart wrote:

>> I attached prototype patches (based on -rc2) for panel dpi using that
>> approach. It's a bit messier than I'd like, because for non-DT boot we
>> need to request the gpio using the old API, and then convert it to
>> gpio_desc. We can remove that code when all the boards use DT.
> 
> Just FYI, you can use the gpiod API with non-DT platforms if you register GPIO 
> lookup entries in board code with gpiod_add_lookup_table().

Right, but as the board files are going away, I'd rather not touch them
at all if possible.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-24 13:12             ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-04-24 13:12 UTC (permalink / raw)
  To: linux-arm-kernel

On 24/04/14 15:44, Laurent Pinchart wrote:

>> I attached prototype patches (based on -rc2) for panel dpi using that
>> approach. It's a bit messier than I'd like, because for non-DT boot we
>> need to request the gpio using the old API, and then convert it to
>> gpio_desc. We can remove that code when all the boards use DT.
> 
> Just FYI, you can use the gpiod API with non-DT platforms if you register GPIO 
> lookup entries in board code with gpiod_add_lookup_table().

Right, but as the board files are going away, I'd rather not touch them
at all if possible.

 Tomi


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140424/d09b0579/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
  2014-04-24  9:52       ` Tomi Valkeinen
  (?)
@ 2014-04-25 23:53         ` Tony Lindgren
  -1 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-25 23:53 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Joachim Eastwood, linux-arm-kernel, linux-omap, linux-fbdev,
	devicetree, Archit Taneja, Darren Etheridge, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140424 02:53]:
> On 18/04/14 18:51, Tony Lindgren wrote:
> 
> >> +	gpio = of_get_gpio(node, 0);
> >> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> >> +		ddata->enable_gpio = gpio;
> >> +	} else {
> >> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> >> +		return gpio;
> >> +	}
> > 
> > We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
> > gpio_backlight_probe_dt is doing. 
> 
> Instead of doing it with the old gpio API, and checking the 'active'
> flag everywhere, I think we can use the new gpiod API which handles the
> polarity automatically.
> 
> I attached prototype patches (based on -rc2) for panel dpi using that
> approach. It's a bit messier than I'd like, because for non-DT boot we
> need to request the gpio using the old API, and then convert it to
> gpio_desc. We can remove that code when all the boards use DT.
> 
> I've compiled tested this only, as I don't have DPI panels I could use.
> I did try similar approach for TFP410, and it seemed to work fine.

Got these working by updating my test patch to use enable-gpios instead
of gpios, and had to change from GPIO_ACTIVE_LOW to GPIO_ACTIVE_HIGH.
Are we now also breaking legacy booting by reversing the polarity?

In any case, looks like we have some duplicate panel code.. Turns
out most panel dpi users for omap3 board-*.c files are just
sharp-ls037v7dw01 panels but configured in QVGA mode. At least for
EVM and and LDP based on looking at the pictures and the configuration
pins (using the names kernel):

QVGA = lcd MO
reset = lcd RESB
...

Then the enable_gpio should be just a GPIO controlled 3.3V regulator
in most cases. I suggest we move them over to ls037v7dw01 and allow
configuring them both for VGA and QVGA depending on the orientation.

I guess you do have some device with ls037v7dw01 since you've been
patching it?

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-25 23:53         ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-25 23:53 UTC (permalink / raw)
  To: linux-arm-kernel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140424 02:53]:
> On 18/04/14 18:51, Tony Lindgren wrote:
> 
> >> +	gpio = of_get_gpio(node, 0);
> >> +	if (gpio_is_valid(gpio) || gpio = -ENOENT) {
> >> +		ddata->enable_gpio = gpio;
> >> +	} else {
> >> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> >> +		return gpio;
> >> +	}
> > 
> > We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
> > gpio_backlight_probe_dt is doing. 
> 
> Instead of doing it with the old gpio API, and checking the 'active'
> flag everywhere, I think we can use the new gpiod API which handles the
> polarity automatically.
> 
> I attached prototype patches (based on -rc2) for panel dpi using that
> approach. It's a bit messier than I'd like, because for non-DT boot we
> need to request the gpio using the old API, and then convert it to
> gpio_desc. We can remove that code when all the boards use DT.
> 
> I've compiled tested this only, as I don't have DPI panels I could use.
> I did try similar approach for TFP410, and it seemed to work fine.

Got these working by updating my test patch to use enable-gpios instead
of gpios, and had to change from GPIO_ACTIVE_LOW to GPIO_ACTIVE_HIGH.
Are we now also breaking legacy booting by reversing the polarity?

In any case, looks like we have some duplicate panel code.. Turns
out most panel dpi users for omap3 board-*.c files are just
sharp-ls037v7dw01 panels but configured in QVGA mode. At least for
EVM and and LDP based on looking at the pictures and the configuration
pins (using the names kernel):

QVGA = lcd MO
reset = lcd RESB
...

Then the enable_gpio should be just a GPIO controlled 3.3V regulator
in most cases. I suggest we move them over to ls037v7dw01 and allow
configuring them both for VGA and QVGA depending on the orientation.

I guess you do have some device with ls037v7dw01 since you've been
patching it?

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-25 23:53         ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-25 23:53 UTC (permalink / raw)
  To: linux-arm-kernel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140424 02:53]:
> On 18/04/14 18:51, Tony Lindgren wrote:
> 
> >> +	gpio = of_get_gpio(node, 0);
> >> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> >> +		ddata->enable_gpio = gpio;
> >> +	} else {
> >> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> >> +		return gpio;
> >> +	}
> > 
> > We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
> > gpio_backlight_probe_dt is doing. 
> 
> Instead of doing it with the old gpio API, and checking the 'active'
> flag everywhere, I think we can use the new gpiod API which handles the
> polarity automatically.
> 
> I attached prototype patches (based on -rc2) for panel dpi using that
> approach. It's a bit messier than I'd like, because for non-DT boot we
> need to request the gpio using the old API, and then convert it to
> gpio_desc. We can remove that code when all the boards use DT.
> 
> I've compiled tested this only, as I don't have DPI panels I could use.
> I did try similar approach for TFP410, and it seemed to work fine.

Got these working by updating my test patch to use enable-gpios instead
of gpios, and had to change from GPIO_ACTIVE_LOW to GPIO_ACTIVE_HIGH.
Are we now also breaking legacy booting by reversing the polarity?

In any case, looks like we have some duplicate panel code.. Turns
out most panel dpi users for omap3 board-*.c files are just
sharp-ls037v7dw01 panels but configured in QVGA mode. At least for
EVM and and LDP based on looking at the pictures and the configuration
pins (using the names kernel):

QVGA = lcd MO
reset = lcd RESB
...

Then the enable_gpio should be just a GPIO controlled 3.3V regulator
in most cases. I suggest we move them over to ls037v7dw01 and allow
configuring them both for VGA and QVGA depending on the orientation.

I guess you do have some device with ls037v7dw01 since you've been
patching it?

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
  2014-04-25 23:53         ` Tony Lindgren
  (?)
@ 2014-04-28 10:43             ` Tomi Valkeinen
  -1 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-04-28 10:43 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Joachim Eastwood,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Archit Taneja,
	Darren Etheridge, Laurent Pinchart, Stefan Roese,
	Sebastian Reichel, Robert Nelson, Dr . H . Nikolaus Schaller,
	Marek Belisko, Sebastian Reichel, Javier Martinez Canillas,
	Enric Balletbo Serra, Florian Vaussard

[-- Attachment #1: Type: text/plain, Size: 2911 bytes --]

On 26/04/14 02:53, Tony Lindgren wrote:
> * Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org> [140424 02:53]:
>> On 18/04/14 18:51, Tony Lindgren wrote:
>>
>>>> +	gpio = of_get_gpio(node, 0);
>>>> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
>>>> +		ddata->enable_gpio = gpio;
>>>> +	} else {
>>>> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
>>>> +		return gpio;
>>>> +	}
>>>
>>> We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
>>> gpio_backlight_probe_dt is doing. 
>>
>> Instead of doing it with the old gpio API, and checking the 'active'
>> flag everywhere, I think we can use the new gpiod API which handles the
>> polarity automatically.
>>
>> I attached prototype patches (based on -rc2) for panel dpi using that
>> approach. It's a bit messier than I'd like, because for non-DT boot we
>> need to request the gpio using the old API, and then convert it to
>> gpio_desc. We can remove that code when all the boards use DT.
>>
>> I've compiled tested this only, as I don't have DPI panels I could use.
>> I did try similar approach for TFP410, and it seemed to work fine.
> 
> Got these working by updating my test patch to use enable-gpios instead
> of gpios, and had to change from GPIO_ACTIVE_LOW to GPIO_ACTIVE_HIGH.
> Are we now also breaking legacy booting by reversing the polarity?

I don't think so. The GPIOs should be active-high by default, if I'm not
mistaken, so the polarities should be the same for legacy boot with or
without those patches. Of course, I don't have the boards so I have no
idea if the polarities have been correct even before.

debugfs/gpio shows the actual value of the gpio, so you could check from
there what it is.

> In any case, looks like we have some duplicate panel code.. Turns
> out most panel dpi users for omap3 board-*.c files are just
> sharp-ls037v7dw01 panels but configured in QVGA mode. At least for
> EVM and and LDP based on looking at the pictures and the configuration

Hmm, true, board-ldp.c's panel looks very much like sharp-ls037v7dw01.

Which EVM are you talking about?

> pins (using the names kernel):
> 
> QVGA = lcd MO
> reset = lcd RESB
> ...
> 
> Then the enable_gpio should be just a GPIO controlled 3.3V regulator
> in most cases. I suggest we move them over to ls037v7dw01 and allow
> configuring them both for VGA and QVGA depending on the orientation.

Looking at the panel spec, it has the following pins:

RESB - reset
MO - VGA/QVGA
UD - vertical scanning direction
LR - horizontal scanning direction
INI - power on control

And it needs 3.3V power.

Are you saying that on some boards the gpio used for enable_gpio is
actually used to switch on a 3.3V regulator?

> I guess you do have some device with ls037v7dw01 since you've been
> patching it?

No, I don't have any boards with that panel.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-28 10:43             ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-04-28 10:43 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 2889 bytes --]

On 26/04/14 02:53, Tony Lindgren wrote:
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [140424 02:53]:
>> On 18/04/14 18:51, Tony Lindgren wrote:
>>
>>>> +	gpio = of_get_gpio(node, 0);
>>>> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
>>>> +		ddata->enable_gpio = gpio;
>>>> +	} else {
>>>> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
>>>> +		return gpio;
>>>> +	}
>>>
>>> We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
>>> gpio_backlight_probe_dt is doing. 
>>
>> Instead of doing it with the old gpio API, and checking the 'active'
>> flag everywhere, I think we can use the new gpiod API which handles the
>> polarity automatically.
>>
>> I attached prototype patches (based on -rc2) for panel dpi using that
>> approach. It's a bit messier than I'd like, because for non-DT boot we
>> need to request the gpio using the old API, and then convert it to
>> gpio_desc. We can remove that code when all the boards use DT.
>>
>> I've compiled tested this only, as I don't have DPI panels I could use.
>> I did try similar approach for TFP410, and it seemed to work fine.
> 
> Got these working by updating my test patch to use enable-gpios instead
> of gpios, and had to change from GPIO_ACTIVE_LOW to GPIO_ACTIVE_HIGH.
> Are we now also breaking legacy booting by reversing the polarity?

I don't think so. The GPIOs should be active-high by default, if I'm not
mistaken, so the polarities should be the same for legacy boot with or
without those patches. Of course, I don't have the boards so I have no
idea if the polarities have been correct even before.

debugfs/gpio shows the actual value of the gpio, so you could check from
there what it is.

> In any case, looks like we have some duplicate panel code.. Turns
> out most panel dpi users for omap3 board-*.c files are just
> sharp-ls037v7dw01 panels but configured in QVGA mode. At least for
> EVM and and LDP based on looking at the pictures and the configuration

Hmm, true, board-ldp.c's panel looks very much like sharp-ls037v7dw01.

Which EVM are you talking about?

> pins (using the names kernel):
> 
> QVGA = lcd MO
> reset = lcd RESB
> ...
> 
> Then the enable_gpio should be just a GPIO controlled 3.3V regulator
> in most cases. I suggest we move them over to ls037v7dw01 and allow
> configuring them both for VGA and QVGA depending on the orientation.

Looking at the panel spec, it has the following pins:

RESB - reset
MO - VGA/QVGA
UD - vertical scanning direction
LR - horizontal scanning direction
INI - power on control

And it needs 3.3V power.

Are you saying that on some boards the gpio used for enable_gpio is
actually used to switch on a 3.3V regulator?

> I guess you do have some device with ls037v7dw01 since you've been
> patching it?

No, I don't have any boards with that panel.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-28 10:43             ` Tomi Valkeinen
  0 siblings, 0 replies; 192+ messages in thread
From: Tomi Valkeinen @ 2014-04-28 10:43 UTC (permalink / raw)
  To: linux-arm-kernel

On 26/04/14 02:53, Tony Lindgren wrote:
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [140424 02:53]:
>> On 18/04/14 18:51, Tony Lindgren wrote:
>>
>>>> +	gpio = of_get_gpio(node, 0);
>>>> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
>>>> +		ddata->enable_gpio = gpio;
>>>> +	} else {
>>>> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
>>>> +		return gpio;
>>>> +	}
>>>
>>> We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
>>> gpio_backlight_probe_dt is doing. 
>>
>> Instead of doing it with the old gpio API, and checking the 'active'
>> flag everywhere, I think we can use the new gpiod API which handles the
>> polarity automatically.
>>
>> I attached prototype patches (based on -rc2) for panel dpi using that
>> approach. It's a bit messier than I'd like, because for non-DT boot we
>> need to request the gpio using the old API, and then convert it to
>> gpio_desc. We can remove that code when all the boards use DT.
>>
>> I've compiled tested this only, as I don't have DPI panels I could use.
>> I did try similar approach for TFP410, and it seemed to work fine.
> 
> Got these working by updating my test patch to use enable-gpios instead
> of gpios, and had to change from GPIO_ACTIVE_LOW to GPIO_ACTIVE_HIGH.
> Are we now also breaking legacy booting by reversing the polarity?

I don't think so. The GPIOs should be active-high by default, if I'm not
mistaken, so the polarities should be the same for legacy boot with or
without those patches. Of course, I don't have the boards so I have no
idea if the polarities have been correct even before.

debugfs/gpio shows the actual value of the gpio, so you could check from
there what it is.

> In any case, looks like we have some duplicate panel code.. Turns
> out most panel dpi users for omap3 board-*.c files are just
> sharp-ls037v7dw01 panels but configured in QVGA mode. At least for
> EVM and and LDP based on looking at the pictures and the configuration

Hmm, true, board-ldp.c's panel looks very much like sharp-ls037v7dw01.

Which EVM are you talking about?

> pins (using the names kernel):
> 
> QVGA = lcd MO
> reset = lcd RESB
> ...
> 
> Then the enable_gpio should be just a GPIO controlled 3.3V regulator
> in most cases. I suggest we move them over to ls037v7dw01 and allow
> configuring them both for VGA and QVGA depending on the orientation.

Looking at the panel spec, it has the following pins:

RESB - reset
MO - VGA/QVGA
UD - vertical scanning direction
LR - horizontal scanning direction
INI - power on control

And it needs 3.3V power.

Are you saying that on some boards the gpio used for enable_gpio is
actually used to switch on a 3.3V regulator?

> I guess you do have some device with ls037v7dw01 since you've been
> patching it?

No, I don't have any boards with that panel.

 Tomi


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140428/5f622a34/attachment.sig>

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
  2014-04-28 10:43             ` Tomi Valkeinen
  (?)
@ 2014-04-28 16:13               ` Tony Lindgren
  -1 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-28 16:13 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Joachim Eastwood, linux-arm-kernel, linux-omap, linux-fbdev,
	devicetree, Archit Taneja, Darren Etheridge, Laurent Pinchart,
	Stefan Roese, Sebastian Reichel, Robert Nelson,
	Dr . H . Nikolaus Schaller, Marek Belisko, Sebastian Reichel,
	Javier Martinez Canillas, Enric Balletbo Serra, Florian Vaussard

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140428 03:44]:
> On 26/04/14 02:53, Tony Lindgren wrote:
> > * Tomi Valkeinen <tomi.valkeinen@ti.com> [140424 02:53]:
> >> On 18/04/14 18:51, Tony Lindgren wrote:
> >>
> >>>> +	gpio = of_get_gpio(node, 0);
> >>>> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> >>>> +		ddata->enable_gpio = gpio;
> >>>> +	} else {
> >>>> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> >>>> +		return gpio;
> >>>> +	}
> >>>
> >>> We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
> >>> gpio_backlight_probe_dt is doing. 
> >>
> >> Instead of doing it with the old gpio API, and checking the 'active'
> >> flag everywhere, I think we can use the new gpiod API which handles the
> >> polarity automatically.
> >>
> >> I attached prototype patches (based on -rc2) for panel dpi using that
> >> approach. It's a bit messier than I'd like, because for non-DT boot we
> >> need to request the gpio using the old API, and then convert it to
> >> gpio_desc. We can remove that code when all the boards use DT.
> >>
> >> I've compiled tested this only, as I don't have DPI panels I could use.
> >> I did try similar approach for TFP410, and it seemed to work fine.
> > 
> > Got these working by updating my test patch to use enable-gpios instead
> > of gpios, and had to change from GPIO_ACTIVE_LOW to GPIO_ACTIVE_HIGH.
> > Are we now also breaking legacy booting by reversing the polarity?
> 
> I don't think so. The GPIOs should be active-high by default, if I'm not
> mistaken, so the polarities should be the same for legacy boot with or
> without those patches. Of course, I don't have the boards so I have no
> idea if the polarities have been correct even before.

OK
 
> debugfs/gpio shows the actual value of the gpio, so you could check from
> there what it is.

Yeah that should be checked.
 
> > In any case, looks like we have some duplicate panel code.. Turns
> > out most panel dpi users for omap3 board-*.c files are just
> > sharp-ls037v7dw01 panels but configured in QVGA mode. At least for
> > EVM and and LDP based on looking at the pictures and the configuration
> 
> Hmm, true, board-ldp.c's panel looks very much like sharp-ls037v7dw01.

Yes it seems so also based on the photos of the LCD panel. And 3430sdp
also seems to have something similar but it's upside down.
 
> Which EVM are you talking about?

The LogicPD omap3 EVMs TMDSEVM3530 and TMDSEVM3730. The am335x EVM
has a different larger panel.
 
> > pins (using the names kernel):
> > 
> > QVGA = lcd MO
> > reset = lcd RESB
> > ...
> > 
> > Then the enable_gpio should be just a GPIO controlled 3.3V regulator
> > in most cases. I suggest we move them over to ls037v7dw01 and allow
> > configuring them both for VGA and QVGA depending on the orientation.
> 
> Looking at the panel spec, it has the following pins:
> 
> RESB - reset
> MO - VGA/QVGA
> UD - vertical scanning direction
> LR - horizontal scanning direction
> INI - power on control
> 
> And it needs 3.3V power.
> 
> Are you saying that on some boards the gpio used for enable_gpio is
> actually used to switch on a 3.3V regulator?

The 3.3V GPIO regulator is needed in addition to the configurable pins,
I guess some ls037v7dw01 panels only have a subset of the pins
controllable by GPIOs, and the GPIO regulator may be used instead of
the INI. But that's hard to know without schematics.
 
> > I guess you do have some device with ls037v7dw01 since you've been
> > patching it?
> 
> No, I don't have any boards with that panel.

OK. I'll move my boards over to ls037v7dw01 and do a DT conversion
patch for it that just sets a standard gpios property for panel
ls037v7dw01. The gpios entry can have 0 entries in the middle
depending on wiring configuration and there should not be any need
to name each GPIO.

As far as I'm concerned, your panel-dpi patch is fine with me,
and we should not add more configuration to it for the ls037v7dw01
panels.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* Re: [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-28 16:13               ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-28 16:13 UTC (permalink / raw)
  To: linux-arm-kernel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140428 03:44]:
> On 26/04/14 02:53, Tony Lindgren wrote:
> > * Tomi Valkeinen <tomi.valkeinen@ti.com> [140424 02:53]:
> >> On 18/04/14 18:51, Tony Lindgren wrote:
> >>
> >>>> +	gpio = of_get_gpio(node, 0);
> >>>> +	if (gpio_is_valid(gpio) || gpio = -ENOENT) {
> >>>> +		ddata->enable_gpio = gpio;
> >>>> +	} else {
> >>>> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> >>>> +		return gpio;
> >>>> +	}
> >>>
> >>> We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
> >>> gpio_backlight_probe_dt is doing. 
> >>
> >> Instead of doing it with the old gpio API, and checking the 'active'
> >> flag everywhere, I think we can use the new gpiod API which handles the
> >> polarity automatically.
> >>
> >> I attached prototype patches (based on -rc2) for panel dpi using that
> >> approach. It's a bit messier than I'd like, because for non-DT boot we
> >> need to request the gpio using the old API, and then convert it to
> >> gpio_desc. We can remove that code when all the boards use DT.
> >>
> >> I've compiled tested this only, as I don't have DPI panels I could use.
> >> I did try similar approach for TFP410, and it seemed to work fine.
> > 
> > Got these working by updating my test patch to use enable-gpios instead
> > of gpios, and had to change from GPIO_ACTIVE_LOW to GPIO_ACTIVE_HIGH.
> > Are we now also breaking legacy booting by reversing the polarity?
> 
> I don't think so. The GPIOs should be active-high by default, if I'm not
> mistaken, so the polarities should be the same for legacy boot with or
> without those patches. Of course, I don't have the boards so I have no
> idea if the polarities have been correct even before.

OK
 
> debugfs/gpio shows the actual value of the gpio, so you could check from
> there what it is.

Yeah that should be checked.
 
> > In any case, looks like we have some duplicate panel code.. Turns
> > out most panel dpi users for omap3 board-*.c files are just
> > sharp-ls037v7dw01 panels but configured in QVGA mode. At least for
> > EVM and and LDP based on looking at the pictures and the configuration
> 
> Hmm, true, board-ldp.c's panel looks very much like sharp-ls037v7dw01.

Yes it seems so also based on the photos of the LCD panel. And 3430sdp
also seems to have something similar but it's upside down.
 
> Which EVM are you talking about?

The LogicPD omap3 EVMs TMDSEVM3530 and TMDSEVM3730. The am335x EVM
has a different larger panel.
 
> > pins (using the names kernel):
> > 
> > QVGA = lcd MO
> > reset = lcd RESB
> > ...
> > 
> > Then the enable_gpio should be just a GPIO controlled 3.3V regulator
> > in most cases. I suggest we move them over to ls037v7dw01 and allow
> > configuring them both for VGA and QVGA depending on the orientation.
> 
> Looking at the panel spec, it has the following pins:
> 
> RESB - reset
> MO - VGA/QVGA
> UD - vertical scanning direction
> LR - horizontal scanning direction
> INI - power on control
> 
> And it needs 3.3V power.
> 
> Are you saying that on some boards the gpio used for enable_gpio is
> actually used to switch on a 3.3V regulator?

The 3.3V GPIO regulator is needed in addition to the configurable pins,
I guess some ls037v7dw01 panels only have a subset of the pins
controllable by GPIOs, and the GPIO regulator may be used instead of
the INI. But that's hard to know without schematics.
 
> > I guess you do have some device with ls037v7dw01 since you've been
> > patching it?
> 
> No, I don't have any boards with that panel.

OK. I'll move my boards over to ls037v7dw01 and do a DT conversion
patch for it that just sets a standard gpios property for panel
ls037v7dw01. The gpios entry can have 0 entries in the middle
depending on wiring configuration and there should not be any need
to name each GPIO.

As far as I'm concerned, your panel-dpi patch is fine with me,
and we should not add more configuration to it for the ls037v7dw01
panels.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

* [PATCHv3 19/41] OMAPDSS: panel-dpi: Add DT support
@ 2014-04-28 16:13               ` Tony Lindgren
  0 siblings, 0 replies; 192+ messages in thread
From: Tony Lindgren @ 2014-04-28 16:13 UTC (permalink / raw)
  To: linux-arm-kernel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [140428 03:44]:
> On 26/04/14 02:53, Tony Lindgren wrote:
> > * Tomi Valkeinen <tomi.valkeinen@ti.com> [140424 02:53]:
> >> On 18/04/14 18:51, Tony Lindgren wrote:
> >>
> >>>> +	gpio = of_get_gpio(node, 0);
> >>>> +	if (gpio_is_valid(gpio) || gpio == -ENOENT) {
> >>>> +		ddata->enable_gpio = gpio;
> >>>> +	} else {
> >>>> +		dev_err(&pdev->dev, "failed to parse enable gpio\n");
> >>>> +		return gpio;
> >>>> +	}
> >>>
> >>> We should set the GPIO polarity based on the OF_GPIO_ACTIVE_LOW like
> >>> gpio_backlight_probe_dt is doing. 
> >>
> >> Instead of doing it with the old gpio API, and checking the 'active'
> >> flag everywhere, I think we can use the new gpiod API which handles the
> >> polarity automatically.
> >>
> >> I attached prototype patches (based on -rc2) for panel dpi using that
> >> approach. It's a bit messier than I'd like, because for non-DT boot we
> >> need to request the gpio using the old API, and then convert it to
> >> gpio_desc. We can remove that code when all the boards use DT.
> >>
> >> I've compiled tested this only, as I don't have DPI panels I could use.
> >> I did try similar approach for TFP410, and it seemed to work fine.
> > 
> > Got these working by updating my test patch to use enable-gpios instead
> > of gpios, and had to change from GPIO_ACTIVE_LOW to GPIO_ACTIVE_HIGH.
> > Are we now also breaking legacy booting by reversing the polarity?
> 
> I don't think so. The GPIOs should be active-high by default, if I'm not
> mistaken, so the polarities should be the same for legacy boot with or
> without those patches. Of course, I don't have the boards so I have no
> idea if the polarities have been correct even before.

OK
 
> debugfs/gpio shows the actual value of the gpio, so you could check from
> there what it is.

Yeah that should be checked.
 
> > In any case, looks like we have some duplicate panel code.. Turns
> > out most panel dpi users for omap3 board-*.c files are just
> > sharp-ls037v7dw01 panels but configured in QVGA mode. At least for
> > EVM and and LDP based on looking at the pictures and the configuration
> 
> Hmm, true, board-ldp.c's panel looks very much like sharp-ls037v7dw01.

Yes it seems so also based on the photos of the LCD panel. And 3430sdp
also seems to have something similar but it's upside down.
 
> Which EVM are you talking about?

The LogicPD omap3 EVMs TMDSEVM3530 and TMDSEVM3730. The am335x EVM
has a different larger panel.
 
> > pins (using the names kernel):
> > 
> > QVGA = lcd MO
> > reset = lcd RESB
> > ...
> > 
> > Then the enable_gpio should be just a GPIO controlled 3.3V regulator
> > in most cases. I suggest we move them over to ls037v7dw01 and allow
> > configuring them both for VGA and QVGA depending on the orientation.
> 
> Looking at the panel spec, it has the following pins:
> 
> RESB - reset
> MO - VGA/QVGA
> UD - vertical scanning direction
> LR - horizontal scanning direction
> INI - power on control
> 
> And it needs 3.3V power.
> 
> Are you saying that on some boards the gpio used for enable_gpio is
> actually used to switch on a 3.3V regulator?

The 3.3V GPIO regulator is needed in addition to the configurable pins,
I guess some ls037v7dw01 panels only have a subset of the pins
controllable by GPIOs, and the GPIO regulator may be used instead of
the INI. But that's hard to know without schematics.
 
> > I guess you do have some device with ls037v7dw01 since you've been
> > patching it?
> 
> No, I don't have any boards with that panel.

OK. I'll move my boards over to ls037v7dw01 and do a DT conversion
patch for it that just sets a standard gpios property for panel
ls037v7dw01. The gpios entry can have 0 entries in the middle
depending on wiring configuration and there should not be any need
to name each GPIO.

As far as I'm concerned, your panel-dpi patch is fine with me,
and we should not add more configuration to it for the ls037v7dw01
panels.

Regards,

Tony

^ permalink raw reply	[flat|nested] 192+ messages in thread

end of thread, other threads:[~2014-04-28 16:13 UTC | newest]

Thread overview: 192+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-21 10:56 [PATCHv3 00/41] OMAPDSS: DT support v3 Tomi Valkeinen
2014-01-21 10:56 ` Tomi Valkeinen
2014-01-21 10:56 ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 01/41] ARM: OMAP2+: add omapdss_init_of() Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 02/41] ARM: OMAP2+: DT 'compatible' tweak for displays Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 03/41] OMAPDSS: add 'label' support for DT Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
     [not found] ` <1390301833-24944-1-git-send-email-tomi.valkeinen-l0cyMroinI0@public.gmane.org>
2014-01-21 10:56   ` [PATCHv3 04/41] OMAPDSS: get dssdev->alias from DT alias Tomi Valkeinen
2014-01-21 10:56     ` Tomi Valkeinen
2014-01-21 10:56     ` Tomi Valkeinen
2014-01-21 10:56   ` [PATCHv3 09/41] OMAPDSS: Add DT support to DSS Tomi Valkeinen
2014-01-21 10:56     ` Tomi Valkeinen
2014-01-21 10:56     ` Tomi Valkeinen
2014-01-21 10:56   ` [PATCHv3 26/41] ARM: omap4-sdp.dts: add display information Tomi Valkeinen
2014-01-21 10:56     ` Tomi Valkeinen
2014-01-21 10:56     ` Tomi Valkeinen
2014-01-21 10:57   ` [PATCHv3 29/41] ARM: omap3-igep0020.dts: " Tomi Valkeinen
2014-01-21 10:57     ` Tomi Valkeinen
2014-01-21 10:57     ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 05/41] OMAPFB: clean up default display search Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 06/41] OMAPFB: search for default display with DT alias Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 07/41] OMAPDSS: add of helpers Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 08/41] OMAPDSS: Improve regulator names for DT Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 10/41] OMAPDSS: Add DT support to DISPC Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 11/41] OMAPDSS: Add DT support to HDMI Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 12/41] OMAPDSS: Add DT support to VENC Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 13/41] OMAPDSS: Add DT support to DSI Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 14/41] OMAPDSS: panel-dsi-cm: Add DT support Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 15/41] OMAPDSS: encoder-tfp410: " Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 16/41] OMAPDSS: connector-dvi: " Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 17/41] OMAPDSS: encoder-tpd12s015: " Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 18/41] OMAPDSS: hdmi-connector: " Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 19/41] OMAPDSS: panel-dpi: " Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-04-08  0:13   ` Tony Lindgren
2014-04-08  0:13     ` Tony Lindgren
2014-04-08  0:13     ` Tony Lindgren
2014-04-08  5:38     ` Tomi Valkeinen
2014-04-08  5:38       ` Tomi Valkeinen
2014-04-08  5:38       ` Tomi Valkeinen
2014-04-08 15:29       ` Tony Lindgren
2014-04-08 15:29         ` Tony Lindgren
2014-04-08 15:29         ` Tony Lindgren
2014-04-18 15:51   ` Tony Lindgren
2014-04-18 15:51     ` Tony Lindgren
2014-04-18 15:51     ` Tony Lindgren
2014-04-24  9:52     ` Tomi Valkeinen
2014-04-24  9:52       ` Tomi Valkeinen
2014-04-24  9:52       ` Tomi Valkeinen
     [not found]       ` <5358DEEA.1000506-l0cyMroinI0@public.gmane.org>
2014-04-24 12:44         ` Laurent Pinchart
2014-04-24 12:44           ` Laurent Pinchart
2014-04-24 12:44           ` Laurent Pinchart
2014-04-24 13:12           ` Tomi Valkeinen
2014-04-24 13:12             ` Tomi Valkeinen
2014-04-24 13:12             ` Tomi Valkeinen
2014-04-25 23:53       ` Tony Lindgren
2014-04-25 23:53         ` Tony Lindgren
2014-04-25 23:53         ` Tony Lindgren
     [not found]         ` <20140425235348.GH20807-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2014-04-28 10:43           ` Tomi Valkeinen
2014-04-28 10:43             ` Tomi Valkeinen
2014-04-28 10:43             ` Tomi Valkeinen
2014-04-28 16:13             ` Tony Lindgren
2014-04-28 16:13               ` Tony Lindgren
2014-04-28 16:13               ` Tony Lindgren
2014-01-21 10:56 ` [PATCHv3 20/41] OMAPDSS: connector-analog-tv: " Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 21/41] OMAPDSS: acx565akm: " Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 22/41] ARM: omap2.dtsi: add omapdss information Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 23/41] ARM: omap3.dtsi: " Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 24/41] ARM: omap4.dtsi: " Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 25/41] ARM: omap4-panda.dts: add display information Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56 ` [PATCHv3 27/41] ARM: omap3-beagle.dts: " Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:56   ` Tomi Valkeinen
2014-01-21 10:57 ` [PATCHv3 28/41] ARM: omap3-beagle-xm.dts: " Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57 ` [PATCHv3 30/41] ARM: omap3-n900.dts: " Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 15:26   ` Sebastian Reichel
2014-01-21 15:26     ` Sebastian Reichel
2014-01-21 15:26     ` Sebastian Reichel
2014-01-24 11:46     ` Tomi Valkeinen
2014-01-24 11:46       ` Tomi Valkeinen
2014-01-24 11:46       ` Tomi Valkeinen
2014-01-21 10:57 ` [PATCHv3 31/41] OMAPDSS: remove DT hacks for regulators Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57 ` [PATCHv3 32/41] ARM: OMAP2+: remove pdata quirks for displays Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57 ` [PATCHv3 33/41] Doc/DT: Add OMAP DSS DT Bindings Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57 ` [PATCHv3 34/41] Doc/DT: Add DT binding documentation for Analog TV Connector Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57 ` [PATCHv3 35/41] Doc/DT: Add DT binding documentation for DVI Connector Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57 ` [PATCHv3 36/41] Doc/DT: Add DT binding documentation for HDMI Connector Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57 ` [PATCHv3 37/41] Doc/DT: Add DT binding documentation for MIPI DPI Panel Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57 ` [PATCHv3 38/41] Doc/DT: Add DT binding documentation for MIPI DSI CM Panel Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57 ` [PATCHv3 39/41] Doc/DT: Add DT binding documentation for Sony acx565akm panel Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 15:28   ` Sebastian Reichel
2014-01-21 15:28     ` Sebastian Reichel
2014-01-21 15:28     ` Sebastian Reichel
2014-01-21 10:57 ` [PATCHv3 40/41] Doc/DT: Add DT binding documentation for TFP410 encoder Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57 ` [PATCHv3 41/41] Doc/DT: Add DT binding documentation for tpd12s015 encoder Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 10:57   ` Tomi Valkeinen
2014-01-21 21:29 ` [PATCHv3 00/41] OMAPDSS: DT support v3 Nishanth Menon
2014-01-21 21:29   ` Nishanth Menon
2014-01-21 21:29   ` Nishanth Menon
2014-01-22  8:41   ` Tomi Valkeinen
2014-01-22  8:41     ` Tomi Valkeinen
2014-01-22  8:41     ` Tomi Valkeinen
2014-01-26 23:07 ` Javier Martinez Canillas
2014-01-26 23:07   ` Javier Martinez Canillas
2014-01-26 23:07   ` Javier Martinez Canillas
2014-03-06  7:29 ` Tomi Valkeinen
2014-03-06  7:29   ` Tomi Valkeinen
2014-03-06  7:29   ` Tomi Valkeinen
2014-03-07 16:49   ` Tony Lindgren
2014-03-07 16:49     ` Tony Lindgren
2014-03-07 16:49     ` Tony Lindgren
2014-03-10 13:22     ` Tomi Valkeinen
2014-03-10 13:22       ` Tomi Valkeinen
2014-03-10 13:22       ` Tomi Valkeinen
2014-03-10 15:41       ` Tony Lindgren
2014-03-10 15:41         ` Tony Lindgren
2014-03-10 15:41         ` Tony Lindgren
2014-03-11 10:15         ` Tomi Valkeinen
2014-03-11 10:15           ` Tomi Valkeinen
2014-03-11 10:15           ` Tomi Valkeinen
2014-03-11 16:28           ` Tony Lindgren
2014-03-11 16:28             ` Tony Lindgren
2014-03-11 16:28             ` Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.