u-boot/arch/arm/mach-omap2
Dario Binacchi 96b109ba74 video: omap: add support for DM/DTS
Update the driver to support the device tree and the driver model.
Timings and panel parameters are now loaded from the device tree.

The DM code replaces the am335x_lcdpanel structure with
tilcdc_panel_info taken from the linux kernel, as well the management
of additional parameters not covered in the legacy code. In addition,
the am335x_lcdpanel structure contains parameters and operations that
were probably a requirement of the board for which this driver was
developed and which, however, were not developed in the linux kernel.
All this led to rewrite th DM controller initialization code, except
for the pixel clock setting that is executed in a function created in a
previous patch with code taken from the legacy am335xfb_init.

The patch has been tested on a custom board with u-boot 2018.11-rc2 and
the following device-tree configuration:

	panel {
		compatible = "ti,tilcdc,panel";
		pinctrl-names = "default";
		pinctrl-0 = <&lcd_enable_pins>;
		enable-gpios = <&gpio0 31 0>;
		backlight = <&backlight>;
		status = "okay";
		u-boot,dm-pre-reloc;
		panel-info {
			ac-bias           = <255>;
			ac-bias-intrpt    = <0>;
			dma-burst-sz      = <16>;
			bpp               = <16>;
			fdd               = <0x80>;
			sync-edge         = <0>;
			sync-ctrl         = <1>;
			raster-order      = <0>;
			fifo-th           = <0>;
		};
		display-timings {
			native-mode = <&timing0>;
			timing0: 800x480 {
				hactive         = <800>;
				vactive         = <480>;
				hback-porch     = <46>;
				hfront-porch    = <210>;
				hsync-len       = <20>;
				vback-porch     = <23>;
				vfront-porch    = <22>;
				vsync-len       = <10>;
				clock-frequency = <33000000>;
				hsync-active    = <0>;
				vsync-active    = <0>;
			};
		};
	};

Signed-off-by: Dario Binacchi <dariobin@libero.it>
Tested-by: Dario Binacchi <dariobin@libero.it>
2020-03-03 13:08:14 +05:30
..
am33xx video: omap: add support for DM/DTS 2020-03-03 13:08:14 +05:30
omap3 dm: gpio: Allow control of GPIO uclass in SPL 2019-12-15 08:52:29 +08:00
omap4 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
omap5 Merge tag '2020-01-20-ti-2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti 2020-01-20 14:54:55 -05:00
abb.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
boot-common.c Merge branch '2019-08-11-ti-imports' 2019-08-12 18:47:53 -04:00
clocks-common.c common: Move hang() to the same header as panic() 2020-01-17 17:53:40 -05:00
config.mk mach-omap2: Cleanup secure boot media generation 2017-01-24 10:35:56 -05:00
config_secure.mk SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
emif-common.c common: Move hang() to the same header as panic() 2020-01-17 17:53:40 -05:00
fdt-common.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
hwinit-common.c dra7: Allow selecting a new dtb after board detection. 2018-12-10 07:27:25 +01:00
Kconfig spl: Allow tiny printf() to be controlled in SPL and TPL 2019-10-08 13:57:45 +08:00
lowlevel_init.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile CONFIG_SPL_SYS_[DI]CACHE_OFF: add 2019-05-18 08:15:35 -04:00
mem-common.c mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NAND 2019-12-03 23:04:10 -05:00
omap-cache.c common: Move some cache and MMU functions out of common.h 2019-12-02 18:23:55 -05:00
pipe3-phy.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pipe3-phy.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
reset.c common: Move reset_cpu() to the CPU header 2020-01-17 14:02:31 -05:00
sata.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sec-common.c common: Move hang() to the same header as panic() 2020-01-17 17:53:40 -05:00
sysinfo-common.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
timer.c common: Move get_ticks() function out of common.h 2019-12-02 18:23:13 -05:00
u-boot-spl.lds linker: Modify linker scripts to be more generic 2019-01-26 22:55:53 -05:00
utils.c env: Drop environment.h header file where not needed 2019-08-11 16:43:41 -04:00
vc.c omap: Drop CONFIG_OMAP_VC_I2C_HS_MCODE 2017-05-15 10:40:03 -04:00