Re: [U-Boot] [PATCH v3 4/5] colibri_t20: fix display configuration

2016-09-15 Thread Stephen Warren

On 09/15/2016 01:27 AM, Marcel Ziswiler wrote:

Without this patch the following error will be shown:

stdio_add_devices: Video device failed (ret=-22)

As commit ec5507707a1d1e84056a6c864338f95f6118d3ca (video: tegra: Move
to using simple-panel and pwm-backlight) states the Colibri T20 needs
updating too which this patch finally attempts doing.


I haven't looked at this in any detail at all, but the one thing that 
stood out to me before is fixed, so,


Acked-by: Stephen Warren 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 4/5] colibri_t20: fix display configuration

2016-09-15 Thread Marcel Ziswiler
Without this patch the following error will be shown:

stdio_add_devices: Video device failed (ret=-22)

As commit ec5507707a1d1e84056a6c864338f95f6118d3ca (video: tegra: Move
to using simple-panel and pwm-backlight) states the Colibri T20 needs
updating too which this patch finally attempts doing.

Signed-off-by: Marcel Ziswiler 

---

Changes in v3:
- Get rid of dummy N/C GPIO work around now as the fixed regulator
  properly honours optionality of enable GPIO.

Changes in v2:
- Rename dummy regulator to reg_3v3 as suggested by Stephen.
- Keep dummy N/C GPIO to work around bug in U-Boot regulator driver
  requiring such node despite its binding claiming it being optional.

 arch/arm/dts/tegra20-colibri.dts | 71 +---
 1 file changed, 51 insertions(+), 20 deletions(-)

diff --git a/arch/arm/dts/tegra20-colibri.dts b/arch/arm/dts/tegra20-colibri.dts
index 2cf24d3..5b803d9 100644
--- a/arch/arm/dts/tegra20-colibri.dts
+++ b/arch/arm/dts/tegra20-colibri.dts
@@ -21,12 +21,24 @@
};
 
host1x@5000 {
-   status = "okay";
dc@5420 {
-   status = "okay";
rgb {
status = "okay";
nvidia,panel = <&lcd_panel>;
+   display-timings {
+   timing@0 {
+   /* VESA VGA */
+   clock-frequency = <25175000>;
+   hactive = <640>;
+   vactive = <480>;
+   hback-porch = <48>;
+   hfront-porch = <16>;
+   hsync-len = <96>;
+   vback-porch = <31>;
+   vfront-porch = <11>;
+   vsync-len = <2>;
+   };
+   };
};
};
};
@@ -60,6 +72,10 @@
};
};
 
+   pwm@7000a000 {
+   status = "okay";
+   };
+
/*
 * GEN1_I2C: I2C_SDA/SCL on SODIMM pin 194/196 (e.g. RTC on carrier
 * board)
@@ -91,6 +107,18 @@
cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>;
};
 
+   backlight: backlight {
+   compatible = "pwm-backlight";
+
+   brightness-levels = <255 128 64 32 16 8 4 0>;
+   default-brightness-level = <6>;
+   /* BL_ON */
+   enable-gpios = <&gpio TEGRA_GPIO(T, 4) GPIO_ACTIVE_HIGH>;
+   power-supply = <®_3v3>;
+   /* PWM */
+   pwms = <&pwm 0 500>;
+   };
+
clocks {
compatible = "simple-bus";
#address-cells = <1>;
@@ -104,25 +132,28 @@
};
};
 
-   pwm: pwm@7000a000 {
-   status = "okay";
+   lcd_panel: panel {
+   /*
+* edt,et057090dhu: EDT 5.7" LCD TFT
+* edt,et070080dh6: EDT 7.0" LCD TFT
+*/
+   compatible = "edt,et057090dhu", "simple-panel";
+
+   backlight = <&backlight>;
};
 
-   lcd_panel: panel {
-   clock = <25175000>;
-   xres = <640>;
-   yres = <480>;
-   left-margin = <48>; /* horizontal back porch */
-   right-margin = <16>;/* horizontal front porch */
-   hsync-len = <96>;
-   lower-margin = <11>;/* vertical front porch */
-   upper-margin = <31>;/* vertical back porch */
-   vsync-len = <2>;
-   hsync-active-high;
-   vsync-active-high;
-   nvidia,bits-per-pixel = <16>;
-   nvidia,pwm = <&pwm 0 0>;
-   nvidia,backlight-enable-gpios = <&gpio TEGRA_GPIO(T, 4) 
GPIO_ACTIVE_HIGH>;
-   nvidia,panel-timings = <0 0 0 0>;
+   regulators {
+   compatible = "simple-bus";
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   reg_3v3: regulator@0 {
+   compatible = "regulator-fixed";
+   reg = <0>;
+   regulator-name = "+V3.3";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   regulator-always-on;
+   };
};
 };
-- 
2.5.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot