Hello,
I designed a custom board based off of the OSD335x-SM. So, from the kernel perspective, the board looks a lot like the pocket beaglebone. In order to get the board to boot I did the following:
-
I reprogrammed the EEPROM so that U-Boot would boot
-
Installed the latest Beaglebone image on an SDCard
-
Configured the DTS to behave like a pocket beaglebone
-
Modified uEnv.txt to not load capes dynamically and use my DTS file
The board booted fine.
I used Kernel build repo developed by Robert C Nelson to get a build-able version of the kernel. I can now create a custom version of the kernel DTS.
Now I want to get the LCD screen working
I have an 5 Inch New Haven LCD screen attached to the board and I’ve connected only 16 of the 24-bit color in an RGB565 format.
I’ve modified my DTS file to include support for the LCD Panel following the instructions in:
-
/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt,
-
/Documentation/devicetree/bindings/display/tilcdc/panel.txt
The relevant portions of my DTS file are here:
`
/ {
lcd_backlight: backlight {
status = “okay”;
compatible = “gpio-backlight”;
//brightness-levels = <0 51 53 56 62 75 101 152 255>;
//default-brightness-level = <8>;
//default-brightness-level = <0>;
pinctrl-names = “default”;
pinctrl-0 = <&backlight_pin>;
gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
//default-on;
//default-off;
};
lcd0:panel {
compatible = “ti,tilcdc,panel”;
pinctrl-names = “default”;
pinctrl-0 = <&lcd_pins>;
enable-gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
backlight = <&lcd_backlight>;
status = “okay”;
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>;
//invert-pxl-clk;
};
display-timings {
native-mode=<&timing0>;
timing0: 800x480 {
clock-frequency = <45000000>;
hactive = <800>;
vactive = <480>;
hfront-porch = <40>;
hback-porch = <40>;
hsync-len = <48>;
vfront-porch = <13>;
vback-porch = <29>;
vsync-len = <3>;
hsync-active = <0>;
vsync-active = <0>;
//de-active = <1>;
//pixelclk-active = <1>;
};
};
};
};
&lcdc {
status = “okay”;
blue-and-red-wiring = “straight”;
};
`
Results:
-
I do not see anything on the LCD screen
-
I do not see a fb0 in /dev directory
-
I have verified that the devicetree has been read correctly by looking into /proc/devicetree/ocp/lcdc@4830e000 as well as /proc/devicetree/panel/ and everything looks correct.
Here is a dump of, what I think, is the most relevant parts of the kernel boot dmesg output (I’ve added some extra messages within /driver/gpu/tilcdc_drv.c to help me debug this:
`
…
[ 2.056859] [drm] Initialized vgem 1.0.0 20120112 for virtual device on minor 0
[ 2.064449] usbcore: registered new interface driver udl
[ 2.071783] OF: graph: no port node found in /ocp/lcdc@4830e000
[ 2.077961] OF: graph: no port node found in /ocp/lcdc@4830e000
[ 2.084831] tilcdc 4830e000.lcdc: Check if componentized
[ 2.090258] tilcdc 4830e000.lcdc: Not componentized
[ 2.095191] tilcdc 4830e000.lcdc: Look for remote node
[ 2.100384] OF: graph: no port node found in /ocp/lcdc@4830e000
[ 2.106356] tilcdc 4830e000.lcdc: Return 0!
[ 2.110583] tilcdc 4830e000.lcdc: no encoders/connectors found, failed to initialize
…
[ 2.713767] panel panel: found backlight
…
[ 2.745671] panel panel: found enable GPIO
…
`
(I can attach the full dmesg if requested)
Analysis:
It looks like the tilcdc which is the driver that, I think, should create the /dev/fb0 fails because it finds no ‘encoder/connectors’ I’m not sure what this means and I can’t find documentation on this.
Within the /Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt it makes a mention of the remote port but all the examples I’ve seen only make reference to HDMI as a remote endpoint, so I do not think I need to add a remote endpoint to the &lcdc entry. I’ve tried to add a remote port to my panel but it just causes a kernel panic. It seems like the tilcdc should automatically detect the panel and create an /dev/fb0.
Is there something I’m doing wrong?
Should the tilcdc be initialized after the panel. Perhaps using something like a deferred probe?
Any help would be greatly appreciated.
Dave