I am trying to get both LVDS and HDMI output in both U-boot
Assuming you are talking about our downstream U-Boot it only supports parallel RGB. HDMI is not supported. Mainline U-Boot would not support any graphics on T30 at all.
and Linux mainline 4.14.x Kernel. I am not using X11 in Linux, just framebuffer with QT as per tezi, as I don’t need accelerated graphics.
From this, I have: Display Output, Resolution and Timings (Linux) | Toradex Developer Center
vidargs=video=tegrafb0:1024x600-16@60 video=tegrafb1:1024x768-16@60
Unfortunately, in mainline the configuration is done slightly differently via so-called modesetting e.g. as may be seen here:
http://git.toradex.com/cgit/u-boot-toradex.git/tree/board/toradex/apalis_t30/apalis_t30.c?h=2016.11-toradex#n68
For parallel RGB use LVDS-1
(see ls /sys/kernel/debug/dri/0/
) rather than HDMI-A-1
.
That works to turn on the HDMI after the kernel boots, but doesn’t turn on LVDS.
HDMI actually uses DDC/EDID by default while parallel RGB uses the following simple-panel:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/boot/dts/tegra30-apalis-eval.dts?h=linux-4.14.y#n213
So I tried exporting the GPIO as noted here, and setting the pins: Linux Kernel 4.6.2 LVDS Display - Technical Support - Toradex Community That didn’t turn on the LVDS display.
As per above it should default to VESA VGA. However, your display may or may not like that at all.
At this point, I’ll guess I need to edit a custom U-boot
Yes, in U-Boot it would be here:
http://git.toradex.com/cgit/u-boot-toradex.git/tree/arch/arm/dts/tegra30-apalis.dts?h=2016.11-toradex#n72
However, you would need toggling the LVDS GPIOs as well but that could even be done using gpio
commands.
and kernel device tree to support my display.
First, find out whether or not there is already a simple-panel specification for it e.g.:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/panel/panel-simple.c?h=linux-4.14.y#n1995
Which approach should I take for this LCD, provided I want HDMI and LVDS both to come on right away in U-boot
As mentioned above, U-Boot won’t support HDMI.
and with mainline kernel? Ive attached the equivalent WEC7 LVDS settings and display manual below.
I don’t know nothing about any such proprietary WEC stuff.
Also, I noted that in my WEC7 build, I had to turn off audio over HDMI. Is there a setting for that on Linux as well, or is that WEC7 specific? If I didn’t do that on WEC, I couldn’t get the speaker/sound to work.
I am not sure what exactly you are talking about here but in Linux audio via HDMI and regular I2S audio are handled by two completely independent sound cards, so I don’t see why this should matter at all.
And lastly, my backlight is sort of custom control. I have to send a string of hex bytes out a serial port to set the brightness. I should probably do this for the LVDS display in the bootloader, as we don’t typically have HDMI or console access in the field. Not sure the best place to put this?
You mean a SPI or a UART? Some backlight drivers may be found here:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/video/backlight?h=linux-4.14.y
I’ve attached my equivalent T30-WEC7 registry settings that work, and user manual for the LCD.
I quickly glanced through the manual but could not find any mentioning of the backlight other than there being some kind of an ADJ pin which usually gets connected to some PWM or the like. As for the display timing, that one looks close:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/panel/panel-simple.c?h=linux-4.14.y#n1859