All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Devicetree Discuss <devicetree-discuss@lists.ozlabs.org>,
	Jerry Van Baren <vanbaren@cideas.com>,
	Tom Warren <twarren@nvidia.com>
Subject: [PATCH v2 07/19] tegra: fdt: Add LCD definitions for Tegra
Date: Wed, 13 Jun 2012 09:19:43 -0700	[thread overview]
Message-ID: <1339604395-6621-8-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1339604395-6621-1-git-send-email-sjg@chromium.org>

Add LCD definitions and also a proposed binding for LCD displays.

The PWFM is in progress on the device-tree-discuss list, so only a
very basic binding is offered here.

I am not sure if it is better to have the lcd within the display
controller as with i2c/spi, or a separate node. From a hardware point
of view the LCD is certainly connected to the display controller, so
perhaps this version makes most sense. We could have a stand-alone
top-level lcd node with a phandle pointing to the display controller,
but these doesn't seem to be an obvious advantage to that approach.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v2:
- Add nvidia prefix to device tree properties

 arch/arm/dts/tegra20.dtsi                       |   25 +++++++
 doc/device-tree-bindings/video/nvidia-video.txt |   88 +++++++++++++++++++++++
 2 files changed, 113 insertions(+), 0 deletions(-)
 create mode 100644 doc/device-tree-bindings/video/nvidia-video.txt

diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
index f95be58..4e59e9b 100644
--- a/arch/arm/dts/tegra20.dtsi
+++ b/arch/arm/dts/tegra20.dtsi
@@ -204,4 +204,29 @@
 		compatible = "nvidia,tegra20-kbc";
 		reg = <0x7000e200 0x0078>;
 	};
+
+	pwfm0: pwm@7000a000 {
+		compatible = "nvidia,tegra20-pwfm";
+		reg = <0x7000a000 0x4>;
+	};
+
+	pwfm1: pwm@7000a010 {
+		compatible = "nvidia,tegra20-pwfm";
+		reg = <0x7000a010 0x4>;
+	};
+
+	pwfm2: pwm@7000a020 {
+		compatible = "nvidia,tegra20-pwfm";
+		reg = <0x7000a020 0x4>;
+	};
+
+	pwfm3: pwm@7000a030 {
+		compatible = "nvidia,tegra20-pwfm";
+		reg = <0x7000a030 0x4>;
+	};
+
+	display1: display@0x54200000 {
+		compatible = "nvidia,tegra20-display";
+		reg = <0x54200000 0x40000>;
+	};
 };
diff --git a/doc/device-tree-bindings/video/nvidia-video.txt b/doc/device-tree-bindings/video/nvidia-video.txt
new file mode 100644
index 0000000..2e1b999
--- /dev/null
+++ b/doc/device-tree-bindings/video/nvidia-video.txt
@@ -0,0 +1,88 @@
+LCD Display
+-----------
+
+(there isn't yet a generic binding in Linux, so this describes what is in
+U-Boot)
+
+The device node for a display device is as described in the document
+"Open Firmware Recommended Practice : Universal Serial Bus" with the
+following modifications and additions :
+
+Required properties :
+ - compatible : Should be "nvidia,tegra20-display"
+ - nvidia,pwfm: phandle of PWFM to use for backlight
+
+Note: This is just a phande and provides no information, nor a backlight
+node. The PWM is still under discussion I think:
+	http://patchwork.ozlabs.org/patch/132386/
+
+We don't support any parameters as yet - the setting is hard-coded.
+
+ - nvidia,width: width of display in pixels
+ - nvidia,height: height of display in pixels
+ - nvidia,bits-per-pixel: number of bits per pixel (depth)
+ - nvidia,pixel-clock : Pixel clock in Hz
+ - nvidia,horiz-timing; horizontal timing: ref_to_sync, sync_width. back_porch,
+	front_porch
+ - nvidia,vert-timing; vertical timing: ref_to_sync, sync_width. back_porch,
+	front_porch
+
+This node should sit inside its controller.
+
+
+Nvidia Tegra2x Display Controller
+---------------------------------
+
+The device node for a NAND flash controller is as described in the document
+"Open Firmware Recommended Practice : Universal Serial Bus" with the
+following modifications and additions :
+
+Required properties:
+ - compatible: should be "tegra20-display"
+ - panel-timings: 4 cells containing required timings in ms:
+	* delay between panel_vdd-rise and data-rise
+	* delay between data-rise and backlight_vdd-rise
+	* delay between backlight_vdd and pwm-rise
+	* delay between pwm-rise and backlight_en-rise
+
+(should we use us here, or perhaps call it panel-timings-ms?)
+
+Optional properties:
+ - nvidia,frame-buffer: address of frame buffer (if omitted it will be
+		calculated)
+	- This may be useful to share an address between U-Boot and Linux and
+		avoid boot-time corruption / flicker
+
+Optional GPIO properies all have (phandle, GPIO number, flags):
+ - nvidia,backlight-enable-gpios: backlight enable GPIO
+ - nvidia,lvds-shutdown-gpios: LVDS power shutdown GPIO
+ - nvidia,backlight-vdd-gpios: backlight power GPIO
+ - nvidia,panel-vdd-gpios: panel power GPIO
+
+(Perhap use polariy bit so that lvds-shutdown becomes lvds-enable?)
+
+I have put these into the display controller since I don't think they are
+generic enough to go in the lcd node.
+
+Example:
+
+display@0x54200000 {
+	nvidia,pwfm = <&pwfm2>;
+	nvidia,frame-buffer = <0x2f680000>;
+	nvidia,backlight-enable-gpios = <&gpio 28 0>;	/* PD4 */
+	nvidia,lvds-shutdown-gpios = <&gpio 10 0>;	/* PB2 */
+	nvidia,backlight-vdd-gpios = <&gpio 176 0>;	/* PW0 */
+	nvidia,panel-vdd-gpios = <&gpio 22 0>;		/* PC6 */
+	nvidia,panel-timings = <4 203 17 15>;
+
+	lcd {
+		compatible = "nvidia,lcd";
+		nvidia,width = <1366>;
+		nvidia,height = <768>;
+		nvidia,bits-per-pixel = <16>;
+		nvidia,pixel-clock = <70600000>;
+
+		nvidia,horiz-timing = <11 58 58 58>;
+		nvidia,vert-timing = <1 4 4 4>;
+	};
+};
-- 
1.7.7.3

WARNING: multiple messages have this Message-ID (diff)
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 07/19] tegra: fdt: Add LCD definitions for Tegra
Date: Wed, 13 Jun 2012 09:19:43 -0700	[thread overview]
Message-ID: <1339604395-6621-8-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1339604395-6621-1-git-send-email-sjg@chromium.org>

Add LCD definitions and also a proposed binding for LCD displays.

The PWFM is in progress on the device-tree-discuss list, so only a
very basic binding is offered here.

I am not sure if it is better to have the lcd within the display
controller as with i2c/spi, or a separate node. From a hardware point
of view the LCD is certainly connected to the display controller, so
perhaps this version makes most sense. We could have a stand-alone
top-level lcd node with a phandle pointing to the display controller,
but these doesn't seem to be an obvious advantage to that approach.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v2:
- Add nvidia prefix to device tree properties

 arch/arm/dts/tegra20.dtsi                       |   25 +++++++
 doc/device-tree-bindings/video/nvidia-video.txt |   88 +++++++++++++++++++++++
 2 files changed, 113 insertions(+), 0 deletions(-)
 create mode 100644 doc/device-tree-bindings/video/nvidia-video.txt

diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
index f95be58..4e59e9b 100644
--- a/arch/arm/dts/tegra20.dtsi
+++ b/arch/arm/dts/tegra20.dtsi
@@ -204,4 +204,29 @@
 		compatible = "nvidia,tegra20-kbc";
 		reg = <0x7000e200 0x0078>;
 	};
+
+	pwfm0: pwm at 7000a000 {
+		compatible = "nvidia,tegra20-pwfm";
+		reg = <0x7000a000 0x4>;
+	};
+
+	pwfm1: pwm at 7000a010 {
+		compatible = "nvidia,tegra20-pwfm";
+		reg = <0x7000a010 0x4>;
+	};
+
+	pwfm2: pwm at 7000a020 {
+		compatible = "nvidia,tegra20-pwfm";
+		reg = <0x7000a020 0x4>;
+	};
+
+	pwfm3: pwm at 7000a030 {
+		compatible = "nvidia,tegra20-pwfm";
+		reg = <0x7000a030 0x4>;
+	};
+
+	display1: display at 0x54200000 {
+		compatible = "nvidia,tegra20-display";
+		reg = <0x54200000 0x40000>;
+	};
 };
diff --git a/doc/device-tree-bindings/video/nvidia-video.txt b/doc/device-tree-bindings/video/nvidia-video.txt
new file mode 100644
index 0000000..2e1b999
--- /dev/null
+++ b/doc/device-tree-bindings/video/nvidia-video.txt
@@ -0,0 +1,88 @@
+LCD Display
+-----------
+
+(there isn't yet a generic binding in Linux, so this describes what is in
+U-Boot)
+
+The device node for a display device is as described in the document
+"Open Firmware Recommended Practice : Universal Serial Bus" with the
+following modifications and additions :
+
+Required properties :
+ - compatible : Should be "nvidia,tegra20-display"
+ - nvidia,pwfm: phandle of PWFM to use for backlight
+
+Note: This is just a phande and provides no information, nor a backlight
+node. The PWM is still under discussion I think:
+	http://patchwork.ozlabs.org/patch/132386/
+
+We don't support any parameters as yet - the setting is hard-coded.
+
+ - nvidia,width: width of display in pixels
+ - nvidia,height: height of display in pixels
+ - nvidia,bits-per-pixel: number of bits per pixel (depth)
+ - nvidia,pixel-clock : Pixel clock in Hz
+ - nvidia,horiz-timing; horizontal timing: ref_to_sync, sync_width. back_porch,
+	front_porch
+ - nvidia,vert-timing; vertical timing: ref_to_sync, sync_width. back_porch,
+	front_porch
+
+This node should sit inside its controller.
+
+
+Nvidia Tegra2x Display Controller
+---------------------------------
+
+The device node for a NAND flash controller is as described in the document
+"Open Firmware Recommended Practice : Universal Serial Bus" with the
+following modifications and additions :
+
+Required properties:
+ - compatible: should be "tegra20-display"
+ - panel-timings: 4 cells containing required timings in ms:
+	* delay between panel_vdd-rise and data-rise
+	* delay between data-rise and backlight_vdd-rise
+	* delay between backlight_vdd and pwm-rise
+	* delay between pwm-rise and backlight_en-rise
+
+(should we use us here, or perhaps call it panel-timings-ms?)
+
+Optional properties:
+ - nvidia,frame-buffer: address of frame buffer (if omitted it will be
+		calculated)
+	- This may be useful to share an address between U-Boot and Linux and
+		avoid boot-time corruption / flicker
+
+Optional GPIO properies all have (phandle, GPIO number, flags):
+ - nvidia,backlight-enable-gpios: backlight enable GPIO
+ - nvidia,lvds-shutdown-gpios: LVDS power shutdown GPIO
+ - nvidia,backlight-vdd-gpios: backlight power GPIO
+ - nvidia,panel-vdd-gpios: panel power GPIO
+
+(Perhap use polariy bit so that lvds-shutdown becomes lvds-enable?)
+
+I have put these into the display controller since I don't think they are
+generic enough to go in the lcd node.
+
+Example:
+
+display at 0x54200000 {
+	nvidia,pwfm = <&pwfm2>;
+	nvidia,frame-buffer = <0x2f680000>;
+	nvidia,backlight-enable-gpios = <&gpio 28 0>;	/* PD4 */
+	nvidia,lvds-shutdown-gpios = <&gpio 10 0>;	/* PB2 */
+	nvidia,backlight-vdd-gpios = <&gpio 176 0>;	/* PW0 */
+	nvidia,panel-vdd-gpios = <&gpio 22 0>;		/* PC6 */
+	nvidia,panel-timings = <4 203 17 15>;
+
+	lcd {
+		compatible = "nvidia,lcd";
+		nvidia,width = <1366>;
+		nvidia,height = <768>;
+		nvidia,bits-per-pixel = <16>;
+		nvidia,pixel-clock = <70600000>;
+
+		nvidia,horiz-timing = <11 58 58 58>;
+		nvidia,vert-timing = <1 4 4 4>;
+	};
+};
-- 
1.7.7.3

  parent reply	other threads:[~2012-06-13 16:19 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 16:19 [U-Boot] [PATCH v2 0/19] tegra: Add display driver and LCD support for Seaboard Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 01/19] Add gpio_request() to asm-generic header Simon Glass
2012-09-21 19:30   ` Anatolij Gustschin
2012-09-27 20:58     ` Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 05/19] tegra: Use const for pinmux_config_pingroup/table() Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 06/19] tegra: Add display support to funcmux Simon Glass
2012-06-14 23:24   ` Stephen Warren
2012-07-11  3:48     ` Simon Glass
2012-06-13 16:19 ` Simon Glass [this message]
2012-06-13 16:19   ` [U-Boot] [PATCH v2 07/19] tegra: fdt: Add LCD definitions for Tegra Simon Glass
2012-06-14 23:32   ` Stephen Warren
2012-06-14 23:32     ` [U-Boot] " Stephen Warren
2012-07-11  4:44     ` Simon Glass
2012-07-11  4:44       ` [U-Boot] " Simon Glass
2012-07-11  5:48       ` Thierry Reding
2012-07-11  5:48         ` [U-Boot] " Thierry Reding
2012-07-12  8:21         ` Simon Glass
2012-07-12  8:21           ` [U-Boot] " Simon Glass
2012-07-12  8:40           ` Thierry Reding
2012-07-12  8:40             ` [U-Boot] " Thierry Reding
2012-07-12  9:22             ` Alex Courbot
2012-07-12  9:22               ` [U-Boot] " Alex Courbot
2012-06-13 16:19 ` [U-Boot] [PATCH v2 08/19] tegra: Add support for PWFM Simon Glass
2012-06-14 23:35   ` Stephen Warren
2012-07-11  4:45     ` Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 09/19] tegra: Add SOC support for display/lcd Simon Glass
2012-06-14 23:39   ` Stephen Warren
     [not found]     ` <CAPnjgZ2bqPx+dHD9m+NuFrAbBeP1PQxHokLMwvD1-3OnC6ZHtg@mail.gmail.com>
2012-07-11  5:12       ` Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 10/19] tegra: Add LCD driver Simon Glass
2012-06-14 23:45   ` Stephen Warren
2012-07-11  4:56     ` Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 11/19] tegra: Add LCD support to Nvidia boards Simon Glass
2012-06-14 23:47   ` Stephen Warren
2012-07-11  4:58     ` Simon Glass
2012-07-23 20:25       ` Stephen Warren
2012-09-27 19:15         ` Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 12/19] arm: Add control over cachability of memory regions Simon Glass
2012-06-14 23:49   ` Stephen Warren
2012-07-11  5:01     ` Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 13/19] lcd: Add CONFIG_LCD_ALIGNMENT to select frame buffer alignment Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 14/19] lcd: Add support for flushing LCD fb from dcache after update Simon Glass
2012-06-14 23:51   ` Stephen Warren
2012-07-11  5:06     ` Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 15/19] tegra: Align LCD frame buffer to section boundary Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 16/19] tegra: Support control of cache settings for LCD Simon Glass
     [not found] ` <1339604395-6621-1-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-06-13 16:19   ` [PATCH v2 02/19] fdt: Add debugging to fdtdec_get_int/addr() Simon Glass
2012-06-13 16:19     ` [U-Boot] " Simon Glass
2012-09-21 19:39     ` Anatolij Gustschin
2012-09-21 19:56       ` Anatolij Gustschin
2012-06-13 16:19   ` [PATCH v2 03/19] fdt: Add function to look up a phandle's register address Simon Glass
2012-06-13 16:19     ` [U-Boot] " Simon Glass
2012-06-14 23:17     ` Stephen Warren
2012-06-14 23:17       ` [U-Boot] " Stephen Warren
2012-07-11  5:10       ` Simon Glass
2012-07-11  5:10         ` [U-Boot] " Simon Glass
2012-06-13 16:19   ` [PATCH v2 04/19] fdt: Add header guard to fdtdec.h Simon Glass
2012-06-13 16:19     ` [U-Boot] " Simon Glass
2012-06-13 16:19   ` [PATCH v2 17/19] tegra: fdt: Add LCD definitions for Seaboard Simon Glass
2012-06-13 16:19     ` [U-Boot] " Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 18/19] lcd: Add CONSOLE_SCROLL_LINES option to speed console Simon Glass
2012-06-13 16:19 ` [U-Boot] [PATCH v2 19/19] tegra: Enable display/lcd support on Seaboard Simon Glass
2012-06-13 22:57 ` [U-Boot] [PATCH v2 0/19] tegra: Add display driver and LCD support for Seaboard Stephen Warren
2012-06-13 23:03   ` Stephen Warren
2012-06-13 23:09     ` Stephen Warren
2012-06-25 21:03   ` Tom Warren
2012-06-27  5:11     ` Simon Glass
2012-07-11 10:04       ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1339604395-6621-8-git-send-email-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=twarren@nvidia.com \
    --cc=u-boot@lists.denx.de \
    --cc=vanbaren@cideas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.