Message ID | 20200209184745.20473-11-dariobin@libero.it |
---|---|
State | New |
Headers | show |
Series | Add DM/DTS support for omap video driver | expand |
On 10/02/20 12:17 AM, Dario Binacchi wrote: > Add the "u-boot,dm-pre-reloc" property to the "ti,tilcdc,panel" > compatible node. In this way the video-uclass module can allocate the > amount of memory needed to be assigned to the frame buffer. hmm..why do you need to add pre-reloc for allocating the memory? pre-reloc flag is needed only when probing before relocation. > > Signed-off-by: Dario Binacchi <dariobin at libero.it> $subject should be : arm: dts: am335x: > --- > > arch/arm/dts/am335x-brppt1-mmc.dts | 2 ++ > arch/arm/dts/am335x-brppt1-nand.dts | 2 ++ > arch/arm/dts/am335x-brppt1-spi.dts | 2 ++ > arch/arm/dts/am335x-brsmarc1.dts | 1 + > arch/arm/dts/am335x-brxre1.dts | 2 ++ > arch/arm/dts/am335x-evm.dts | 1 + > arch/arm/dts/am335x-evmsk.dts | 1 + > arch/arm/dts/am335x-guardian.dts | 1 + > arch/arm/dts/am335x-pdu001.dts | 1 + > arch/arm/dts/am335x-pxm50.dts | 1 + > arch/arm/dts/am335x-rut.dts | 1 + > arch/arm/dts/da850-evm.dts | 1 + > 12 files changed, 16 insertions(+) > > diff --git a/arch/arm/dts/am335x-brppt1-mmc.dts b/arch/arm/dts/am335x-brppt1-mmc.dts > index 9be34d9da0..6f919711f0 100644 > --- a/arch/arm/dts/am335x-brppt1-mmc.dts > +++ b/arch/arm/dts/am335x-brppt1-mmc.dts > @@ -53,6 +53,8 @@ > bkl-pwm = <&pwmbacklight>; > bkl-tps = <&tps_bl>; > > + u-boot,dm-pre-reloc; This is u-boot specific dt flag. Please use it under *-u-boot.dtsi file. Thanks and regards, Lokesh
On Mon, Feb 10, 2020 at 09:52:59AM +0530, Lokesh Vutla wrote: > > > On 10/02/20 12:17 AM, Dario Binacchi wrote: > > Add the "u-boot,dm-pre-reloc" property to the "ti,tilcdc,panel" > > compatible node. In this way the video-uclass module can allocate the > > amount of memory needed to be assigned to the frame buffer. > > hmm..why do you need to add pre-reloc for allocating the memory? pre-reloc flag > is needed only when probing before relocation. > > > > > Signed-off-by: Dario Binacchi <dariobin at libero.it> > > $subject should be : arm: dts: am335x: > > > --- > > > > arch/arm/dts/am335x-brppt1-mmc.dts | 2 ++ > > arch/arm/dts/am335x-brppt1-nand.dts | 2 ++ > > arch/arm/dts/am335x-brppt1-spi.dts | 2 ++ > > arch/arm/dts/am335x-brsmarc1.dts | 1 + > > arch/arm/dts/am335x-brxre1.dts | 2 ++ > > arch/arm/dts/am335x-evm.dts | 1 + > > arch/arm/dts/am335x-evmsk.dts | 1 + > > arch/arm/dts/am335x-guardian.dts | 1 + > > arch/arm/dts/am335x-pdu001.dts | 1 + > > arch/arm/dts/am335x-pxm50.dts | 1 + > > arch/arm/dts/am335x-rut.dts | 1 + > > arch/arm/dts/da850-evm.dts | 1 + > > 12 files changed, 16 insertions(+) > > > > diff --git a/arch/arm/dts/am335x-brppt1-mmc.dts b/arch/arm/dts/am335x-brppt1-mmc.dts > > index 9be34d9da0..6f919711f0 100644 > > --- a/arch/arm/dts/am335x-brppt1-mmc.dts > > +++ b/arch/arm/dts/am335x-brppt1-mmc.dts > > @@ -53,6 +53,8 @@ > > bkl-pwm = <&pwmbacklight>; > > bkl-tps = <&tps_bl>; > > > > + u-boot,dm-pre-reloc; > > This is u-boot specific dt flag. Please use it under *-u-boot.dtsi file. Note that these boards don't support Linux (VxWorks only) and as such we allow the u-boot, nodes here.
On Mon, Feb 10, 2020 at 10:15:27AM -0500, Tom Rini wrote: > On Mon, Feb 10, 2020 at 09:52:59AM +0530, Lokesh Vutla wrote: > > > > > > On 10/02/20 12:17 AM, Dario Binacchi wrote: > > > Add the "u-boot,dm-pre-reloc" property to the "ti,tilcdc,panel" > > > compatible node. In this way the video-uclass module can allocate the > > > amount of memory needed to be assigned to the frame buffer. > > > > hmm..why do you need to add pre-reloc for allocating the memory? pre-reloc flag > > is needed only when probing before relocation. > > > > > > > > Signed-off-by: Dario Binacchi <dariobin at libero.it> > > > > $subject should be : arm: dts: am335x: > > > > > --- > > > > > > arch/arm/dts/am335x-brppt1-mmc.dts | 2 ++ > > > arch/arm/dts/am335x-brppt1-nand.dts | 2 ++ > > > arch/arm/dts/am335x-brppt1-spi.dts | 2 ++ > > > arch/arm/dts/am335x-brsmarc1.dts | 1 + > > > arch/arm/dts/am335x-brxre1.dts | 2 ++ > > > arch/arm/dts/am335x-evm.dts | 1 + > > > arch/arm/dts/am335x-evmsk.dts | 1 + > > > arch/arm/dts/am335x-guardian.dts | 1 + > > > arch/arm/dts/am335x-pdu001.dts | 1 + > > > arch/arm/dts/am335x-pxm50.dts | 1 + > > > arch/arm/dts/am335x-rut.dts | 1 + > > > arch/arm/dts/da850-evm.dts | 1 + > > > 12 files changed, 16 insertions(+) > > > > > > diff --git a/arch/arm/dts/am335x-brppt1-mmc.dts b/arch/arm/dts/am335x-brppt1-mmc.dts > > > index 9be34d9da0..6f919711f0 100644 > > > --- a/arch/arm/dts/am335x-brppt1-mmc.dts > > > +++ b/arch/arm/dts/am335x-brppt1-mmc.dts > > > @@ -53,6 +53,8 @@ > > > bkl-pwm = <&pwmbacklight>; > > > bkl-tps = <&tps_bl>; > > > > > > + u-boot,dm-pre-reloc; > > > > This is u-boot specific dt flag. Please use it under *-u-boot.dtsi file. > > Note that these boards don't support Linux (VxWorks only) and as such we > allow the u-boot, nodes here. To clarify (after an off-list ping), I'm referring to the am335x-br* boards only here.
> Il 11 febbraio 2020 alle 5.11 Lokesh Vutla <lokeshvutla at ti.com> ha scritto: > > > > > On 11/02/20 1:49 AM, dariobin at libero.it wrote: > > Hi Lokesh > > > >> Il 10 febbraio 2020 alle 5.22 Lokesh Vutla <lokeshvutla at ti.com> ha scritto: > >> > >> > >> > >> > >> On 10/02/20 12:17 AM, Dario Binacchi wrote: > >>> Add the "u-boot,dm-pre-reloc" property to the "ti,tilcdc,panel" > >>> compatible node. In this way the video-uclass module can allocate the > >>> amount of memory needed to be assigned to the frame buffer. > >> > >> hmm..why do you need to add pre-reloc for allocating the memory? pre-reloc flag > >> is needed only when probing before relocation. > >> > > u-boot told me with an error message. > > Following the message I arrived at the video-uclass.c: > > > > /* Device tree node may need the 'u-boot,dm-pre-reloc' or > > * 'u-boot,dm-pre-proper' tag > > */ > > printf("Video device '%s' cannot allocate frame buffer memory -ensure the device is set up before relocation\n", > > dev->name); > > return -ENOSPC; > > When does your driver gets probed? The driver is probed in int board_late_init(void) { ret = uclass_get_device(UCLASS_VIDEO, 0, &dev); if (ret) printf("Unable to get VIDEO device (%d)\n", ret); ret = uclass_get_device(UCLASS_VIDEO_CONSOLE, 0, &con); if (ret) printf("Unable to get VIDEO CONSOLE device (%d)\n", ret); snprintf(buf, sizeof(buf), "%s\n%s\n", U_BOOT_VERSION, corp); vidconsole_position_cursor(con, 0, 0); for (s = buf; *s; s++) vidconsole_put_char(con, *s); } but, without the "u-boot,dm-pre-reloc" property, the error occurs early, during the video device post_binding. I enabled debug messages in : - drivers/core/device.c - drivers/core/uclass.c - drivers/video/video-uclass.c and this is what is displayed by u-boot console: U-Boot SPL 2018.11-rc2 (Feb 11 2020 - 17:34:58 +0100) Trying to boot from NAND ## Checking hash(es) for Image uboot ... sha1+ OK ## Checking hash(es) for Image fdt ... sha1+ OK U-Boot 2018.11-rc2 (Feb 11 2020 - 17:34:58 +0100) CPU : AM335X-GP rev 2.1 Model: TI AM335x DRAM: Video frame buffers from 8fff0000 to 8fff0000 256 MiB uclass_find_device_by_seq: 0 -1 uclass_find_device_by_seq: 0 0 - -1 -1 'root_driver' - not found Bound device mod_exp_sw to root_driver Bound device scm at 210000 to l4_wkup at 44c00000 Bound device l4_wkup at 44c00000 to ocp Bound device gpio at 44e07000 to ocp Bound device gpio at 4804c000 to ocp Bound device gpio at 481ac000 to ocp Bound device gpio at 481ae000 to ocp Bound device serial at 44e09000 to ocp Bound device serial at 48022000 to ocp Bound device serial at 48024000 to ocp Bound device serial at 481a6000 to ocp Bound device i2c at 44e0b000 to ocp Bound device i2c at 4802a000 to ocp Bound device mmc at 48060000 to ocp Bound device timer at 48040000 to ocp Bound device timer at 48042000 to ocp Bound device timer at 48044000 to ocp Bound device timer at 48046000 to ocp Bound device timer at 48048000 to ocp Bound device timer at 4804a000 to ocp Bound device usb at 47401000 to usb at 47400000 Bound device usb at 47401800 to usb at 47400000 Bound device usb at 47400000 to ocp Bound device ethernet at 4a100000 to ocp Bound device ocp to root_driver Video device 'panel' cannot allocate frame buffer memory -ensure the device is set up before relocation Error binding driver 'am335x_fb': -28 Some drivers failed to bind initcall sequence 8ffca898 failed at call 8080f71f (err=-28) ### ERROR ### Please RESET the board ### Thanks Best Regards Dario > > Thanks and regards, > Lokesh > > >>> > >>> Signed-off-by: Dario Binacchi <dariobin at libero.it> > >> > >> $subject should be : arm: dts: am335x: > > Ok. I will change it. > > > >> > >>> --- > >>> > >>> arch/arm/dts/am335x-brppt1-mmc.dts | 2 ++ > >>> arch/arm/dts/am335x-brppt1-nand.dts | 2 ++ > >>> arch/arm/dts/am335x-brppt1-spi.dts | 2 ++ > >>> arch/arm/dts/am335x-brsmarc1.dts | 1 + > >>> arch/arm/dts/am335x-brxre1.dts | 2 ++ > >>> arch/arm/dts/am335x-evm.dts | 1 + > >>> arch/arm/dts/am335x-evmsk.dts | 1 + > >>> arch/arm/dts/am335x-guardian.dts | 1 + > >>> arch/arm/dts/am335x-pdu001.dts | 1 + > >>> arch/arm/dts/am335x-pxm50.dts | 1 + > >>> arch/arm/dts/am335x-rut.dts | 1 + > >>> arch/arm/dts/da850-evm.dts | 1 + > >>> 12 files changed, 16 insertions(+) > >>> > >>> diff --git a/arch/arm/dts/am335x-brppt1-mmc.dts b/arch/arm/dts/am335x-brppt1-mmc.dts > >>> index 9be34d9da0..6f919711f0 100644 > >>> --- a/arch/arm/dts/am335x-brppt1-mmc.dts > >>> +++ b/arch/arm/dts/am335x-brppt1-mmc.dts > >>> @@ -53,6 +53,8 @@ > >>> bkl-pwm = <&pwmbacklight>; > >>> bkl-tps = <&tps_bl>; > >>> > >>> + u-boot,dm-pre-reloc; > >> > >> This is u-boot specific dt flag. Please use it under *-u-boot.dtsi file. > > Ok. I will fix it. > > > > --- > > Dario > >> > >> Thanks and regards, > >> Lokesh
diff --git a/arch/arm/dts/am335x-brppt1-mmc.dts b/arch/arm/dts/am335x-brppt1-mmc.dts index 9be34d9da0..6f919711f0 100644 --- a/arch/arm/dts/am335x-brppt1-mmc.dts +++ b/arch/arm/dts/am335x-brppt1-mmc.dts @@ -53,6 +53,8 @@ bkl-pwm = <&pwmbacklight>; bkl-tps = <&tps_bl>; + u-boot,dm-pre-reloc; + panel-info { ac-bias = <255>; ac-bias-intrpt = <0>; diff --git a/arch/arm/dts/am335x-brppt1-nand.dts b/arch/arm/dts/am335x-brppt1-nand.dts index 11bd5c551c..9d4340f591 100644 --- a/arch/arm/dts/am335x-brppt1-nand.dts +++ b/arch/arm/dts/am335x-brppt1-nand.dts @@ -53,6 +53,8 @@ bkl-pwm = <&pwmbacklight>; bkl-tps = <&tps_bl>; + u-boot,dm-pre-reloc; + panel-info { ac-bias = <255>; ac-bias-intrpt = <0>; diff --git a/arch/arm/dts/am335x-brppt1-spi.dts b/arch/arm/dts/am335x-brppt1-spi.dts index 01ab74be5e..c078af8fba 100644 --- a/arch/arm/dts/am335x-brppt1-spi.dts +++ b/arch/arm/dts/am335x-brppt1-spi.dts @@ -54,6 +54,8 @@ bkl-pwm = <&pwmbacklight>; bkl-tps = <&tps_bl>; + u-boot,dm-pre-reloc; + panel-info { ac-bias = <255>; ac-bias-intrpt = <0>; diff --git a/arch/arm/dts/am335x-brsmarc1.dts b/arch/arm/dts/am335x-brsmarc1.dts index a63fc2da22..7e9516e8f8 100644 --- a/arch/arm/dts/am335x-brsmarc1.dts +++ b/arch/arm/dts/am335x-brsmarc1.dts @@ -59,6 +59,7 @@ /*backlight = <&tps_bl>; */ compatible = "ti,tilcdc,panel"; status = "okay"; + u-boot,dm-pre-reloc; panel-info { ac-bias = <255>; diff --git a/arch/arm/dts/am335x-brxre1.dts b/arch/arm/dts/am335x-brxre1.dts index 33d8ab78d8..6091a12fb7 100644 --- a/arch/arm/dts/am335x-brxre1.dts +++ b/arch/arm/dts/am335x-brxre1.dts @@ -79,6 +79,8 @@ backlight = <&tps_bl>; + u-boot,dm-pre-reloc; + panel-info { ac-bias = <255>; ac-bias-intrpt = <0>; diff --git a/arch/arm/dts/am335x-evm.dts b/arch/arm/dts/am335x-evm.dts index 0bda4d4429..60e4991658 100644 --- a/arch/arm/dts/am335x-evm.dts +++ b/arch/arm/dts/am335x-evm.dts @@ -109,6 +109,7 @@ status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&lcd_pins_s0>; + u-boot,dm-pre-reloc; panel-info { ac-bias = <255>; ac-bias-intrpt = <0>; diff --git a/arch/arm/dts/am335x-evmsk.dts b/arch/arm/dts/am335x-evmsk.dts index 5762967cf7..3d713a6b88 100644 --- a/arch/arm/dts/am335x-evmsk.dts +++ b/arch/arm/dts/am335x-evmsk.dts @@ -172,6 +172,7 @@ pinctrl-0 = <&lcd_pins_default>; pinctrl-1 = <&lcd_pins_sleep>; status = "okay"; + u-boot,dm-pre-reloc; panel-info { ac-bias = <255>; ac-bias-intrpt = <0>; diff --git a/arch/arm/dts/am335x-guardian.dts b/arch/arm/dts/am335x-guardian.dts index 5ed2133e78..9e2b9d6b48 100644 --- a/arch/arm/dts/am335x-guardian.dts +++ b/arch/arm/dts/am335x-guardian.dts @@ -67,6 +67,7 @@ pinctrl-names = "default", "sleep"; pinctrl-0 = <&lcd_pins_default &lcd_disen_pins>; pinctrl-1 = <&lcd_pins_sleep>; + u-boot,dm-pre-reloc; display-timings { 320x240 { diff --git a/arch/arm/dts/am335x-pdu001.dts b/arch/arm/dts/am335x-pdu001.dts index ae43d61f4e..13085a7884 100644 --- a/arch/arm/dts/am335x-pdu001.dts +++ b/arch/arm/dts/am335x-pdu001.dts @@ -54,6 +54,7 @@ status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&lcd_pins_s0>; + u-boot,dm-pre-reloc; panel-info { ac-bias = <255>; ac-bias-intrpt = <0>; diff --git a/arch/arm/dts/am335x-pxm50.dts b/arch/arm/dts/am335x-pxm50.dts index f4e66d29d5..25601c2655 100644 --- a/arch/arm/dts/am335x-pxm50.dts +++ b/arch/arm/dts/am335x-pxm50.dts @@ -23,6 +23,7 @@ pinctrl-0 = <&lcd_pins_s0>; enable-gpios = <&gpio3 15 0>; status = "okay"; + u-boot,dm-pre-reloc; panel-info { ac-bias = <255>; diff --git a/arch/arm/dts/am335x-rut.dts b/arch/arm/dts/am335x-rut.dts index 145247344f..1617c57235 100644 --- a/arch/arm/dts/am335x-rut.dts +++ b/arch/arm/dts/am335x-rut.dts @@ -91,6 +91,7 @@ pinctrl-names = "default"; pinctrl-0 = <&lcd_pins_s0>; status = "okay"; + u-boot,dm-pre-reloc; /* FORMIKE_KWH043ST20_F01 */ panel-info { diff --git a/arch/arm/dts/da850-evm.dts b/arch/arm/dts/da850-evm.dts index f04bc3e153..2e1cf35c8d 100644 --- a/arch/arm/dts/da850-evm.dts +++ b/arch/arm/dts/da850-evm.dts @@ -53,6 +53,7 @@ */ status = "okay"; enable-gpios = <&gpio 40 GPIO_ACTIVE_HIGH>; /* lcd_panel_pwr */ + u-boot,dm-pre-reloc; panel-info { ac-bias = <255>;
Add the "u-boot,dm-pre-reloc" property to the "ti,tilcdc,panel" compatible node. In this way the video-uclass module can allocate the amount of memory needed to be assigned to the frame buffer. Signed-off-by: Dario Binacchi <dariobin at libero.it> --- arch/arm/dts/am335x-brppt1-mmc.dts | 2 ++ arch/arm/dts/am335x-brppt1-nand.dts | 2 ++ arch/arm/dts/am335x-brppt1-spi.dts | 2 ++ arch/arm/dts/am335x-brsmarc1.dts | 1 + arch/arm/dts/am335x-brxre1.dts | 2 ++ arch/arm/dts/am335x-evm.dts | 1 + arch/arm/dts/am335x-evmsk.dts | 1 + arch/arm/dts/am335x-guardian.dts | 1 + arch/arm/dts/am335x-pdu001.dts | 1 + arch/arm/dts/am335x-pxm50.dts | 1 + arch/arm/dts/am335x-rut.dts | 1 + arch/arm/dts/da850-evm.dts | 1 + 12 files changed, 16 insertions(+)