Re: [PATCH v7 23/28] video: omap: add panel driver

2020-12-28 Thread Lokesh Vutla



On 24/12/20 1:04 pm, Dario Binacchi wrote:
> The previous version of am335x-fb.c contained the functionalities of two
> drivers that this patch has split. It was a video type driver that used
> the same registration compatible string that now registers a panel type
> driver. The proof of this is that two compatible strings were referred
> to within the same driver.
> There are now two drivers, each with its own compatible string,
> functions and API.
> Furthermore, the panel driver, in addition to decoding the display
> timings, is now also able to manage the backlight.
> 
> Signed-off-by: Dario Binacchi 
> Reviewed-by: Simon Glass 
> 
> ---
> 
> (no changes since v4)
> 
> Changes in v4:
> - Include device_compat.h header for dev_xxx macros.
> - Add Simon Glass review.
> 
> Changes in v3:
> - Update the DTS lcdc node of the am335x boards because of the
>   am33xx.dtsi resynced with Linux 5.9-rc7.
> 
>  arch/arm/dts/am335x-brppt1-mmc.dts   |  17 +-
>  arch/arm/dts/am335x-brppt1-nand.dts  |  17 +-
>  arch/arm/dts/am335x-brppt1-spi.dts   |  17 +-
>  arch/arm/dts/am335x-brsmarc1.dts |  20 +-
>  arch/arm/dts/am335x-brxre1.dts   |  21 +-
>  arch/arm/dts/am335x-evm-u-boot.dtsi  |  15 +-
>  arch/arm/dts/am335x-evmsk-u-boot.dtsi|  14 +-
>  arch/arm/dts/am335x-guardian-u-boot.dtsi |  18 +-
>  arch/arm/dts/am335x-pdu001-u-boot.dtsi   |  18 +-
>  arch/arm/dts/am335x-pxm50-u-boot.dtsi|  14 +-
>  arch/arm/dts/am335x-rut-u-boot.dtsi  |  14 +-
>  arch/arm/dts/da850-evm-u-boot.dtsi   |  18 +-

Changes to da850 is causing build error.
https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/jobs/194241

Can you take a look? Also can you try building all arm32 platforms before 
posting?

Thanks and regards,
Lokesh



[PATCH v7 23/28] video: omap: add panel driver

2020-12-23 Thread Dario Binacchi
The previous version of am335x-fb.c contained the functionalities of two
drivers that this patch has split. It was a video type driver that used
the same registration compatible string that now registers a panel type
driver. The proof of this is that two compatible strings were referred
to within the same driver.
There are now two drivers, each with its own compatible string,
functions and API.
Furthermore, the panel driver, in addition to decoding the display
timings, is now also able to manage the backlight.

Signed-off-by: Dario Binacchi 
Reviewed-by: Simon Glass 

---

(no changes since v4)

Changes in v4:
- Include device_compat.h header for dev_xxx macros.
- Add Simon Glass review.

Changes in v3:
- Update the DTS lcdc node of the am335x boards because of the
  am33xx.dtsi resynced with Linux 5.9-rc7.

 arch/arm/dts/am335x-brppt1-mmc.dts   |  17 +-
 arch/arm/dts/am335x-brppt1-nand.dts  |  17 +-
 arch/arm/dts/am335x-brppt1-spi.dts   |  17 +-
 arch/arm/dts/am335x-brsmarc1.dts |  20 +-
 arch/arm/dts/am335x-brxre1.dts   |  21 +-
 arch/arm/dts/am335x-evm-u-boot.dtsi  |  15 +-
 arch/arm/dts/am335x-evmsk-u-boot.dtsi|  14 +-
 arch/arm/dts/am335x-guardian-u-boot.dtsi |  18 +-
 arch/arm/dts/am335x-pdu001-u-boot.dtsi   |  18 +-
 arch/arm/dts/am335x-pxm50-u-boot.dtsi|  14 +-
 arch/arm/dts/am335x-rut-u-boot.dtsi  |  14 +-
 arch/arm/dts/da850-evm-u-boot.dtsi   |  18 +-
 drivers/video/Makefile   |   1 +
 drivers/video/am335x-fb.c| 255 ++-
 drivers/video/am335x-fb.h|  31 +++
 drivers/video/tilcdc-panel.c | 172 +++
 drivers/video/tilcdc-panel.h |  14 ++
 17 files changed, 478 insertions(+), 198 deletions(-)
 create mode 100644 drivers/video/tilcdc-panel.c
 create mode 100644 drivers/video/tilcdc-panel.h

diff --git a/arch/arm/dts/am335x-brppt1-mmc.dts 
b/arch/arm/dts/am335x-brppt1-mmc.dts
index 6f919711f0..bd2f6c2e3e 100644
--- a/arch/arm/dts/am335x-brppt1-mmc.dts
+++ b/arch/arm/dts/am335x-brppt1-mmc.dts
@@ -53,8 +53,6 @@
bkl-pwm = <>;
bkl-tps = <_bl>;
 
-   u-boot,dm-pre-reloc;
-
panel-info {
ac-bias = <255>;
ac-bias-intrpt  = <0>;
@@ -238,8 +236,19 @@
status = "okay";
 };
 
- {
-   status = "disabled";
+_per {
+
+   segment@30 {
+
+   target-module@e000 {
+   u-boot,dm-pre-reloc;
+
+   lcdc: lcdc@0 {
+   u-boot,dm-pre-reloc;
+   status = "disabled";
+   };
+   };
+   };
 };
 
  {
diff --git a/arch/arm/dts/am335x-brppt1-nand.dts 
b/arch/arm/dts/am335x-brppt1-nand.dts
index 9d4340f591..67c609739f 100644
--- a/arch/arm/dts/am335x-brppt1-nand.dts
+++ b/arch/arm/dts/am335x-brppt1-nand.dts
@@ -53,8 +53,6 @@
bkl-pwm = <>;
bkl-tps = <_bl>;
 
-   u-boot,dm-pre-reloc;
-
panel-info {
ac-bias = <255>;
ac-bias-intrpt  = <0>;
@@ -228,8 +226,19 @@
status = "disabled";
 };
 
- {
-   status = "disabled";
+_per {
+
+   segment@30 {
+
+   target-module@e000 {
+   u-boot,dm-pre-reloc;
+
+   lcdc: lcdc@0 {
+   u-boot,dm-pre-reloc;
+   status = "disabled";
+   };
+   };
+   };
 };
 
  {
diff --git a/arch/arm/dts/am335x-brppt1-spi.dts 
b/arch/arm/dts/am335x-brppt1-spi.dts
index c078af8fba..ce3dce204d 100644
--- a/arch/arm/dts/am335x-brppt1-spi.dts
+++ b/arch/arm/dts/am335x-brppt1-spi.dts
@@ -54,8 +54,6 @@
bkl-pwm = <>;
bkl-tps = <_bl>;
 
-   u-boot,dm-pre-reloc;
-
panel-info {
ac-bias = <255>;
ac-bias-intrpt  = <0>;
@@ -259,8 +257,19 @@
status = "okay";
 };
 
- {
-   status = "disabled";
+_per {
+
+   segment@30 {
+
+   target-module@e000 {
+   u-boot,dm-pre-reloc;
+
+   lcdc: lcdc@0 {
+   u-boot,dm-pre-reloc;
+   status = "disabled";
+   };
+   };
+   };
 };
 
  {
diff --git a/arch/arm/dts/am335x-brsmarc1.dts b/arch/arm/dts/am335x-brsmarc1.dts
index 7e9516e8f8..25cdb11164 100644
--- a/arch/arm/dts/am335x-brsmarc1.dts
+++ b/arch/arm/dts/am335x-brsmarc1.dts
@@ -59,7 +59,6 @@
/*backlight = <_bl>; */
compatible = "ti,tilcdc,panel";
status = "okay";
-   u-boot,dm-pre-reloc;
 
panel-info {
ac-bias = <255>;
@@ -298,10 +297,21 @@
status = "okay";
 };
 
- {