-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TinyDRM ILI9486 overlay, and minor bcm2835-codec logging tweak #5588
Conversation
@@ -98,5 +100,7 @@ | |||
fps = <&piscreen>,"fps:0"; | |||
debug = <&piscreen>,"debug:0"; | |||
xohms = <&piscreen_ts>,"ti,x-plate-ohms;0"; | |||
drm = <&piscreen>,"compatible=waveshare,rpi-lcd-35", | |||
<&piscreen>,"reset-gpios:8=GPIO_ACTIVE_HIGH"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this works?:
$ dtmerge arch/arm/boot/dts/bcm2711-rpi-4-b.dtb base.dtb -
$ dtmerge base.dtb merged.dtb arch/arm/boot/dts/overlays/piscreen.dtbo drm
DTOVERLAY[error]: invalid override value 'GPIO_ACTIVE_HIGH' - ignored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right - my update script to push the change to the Pi obviously didn't for some reason (probably PEBKAC).
Actually there's a bigger problem. In the non-drm case (compatible
Presumably it's |
Sorry, missed this pseudo-question - yes, that is probably the cauase. Can we just disable the fbtft version? |
Not really unless we change the overlay to only supporting the DRM one. Both are mainline drivers, so probably worth reporting to mainline to see what they want to do. The fact that SPI has this secondary matching (and complaining if the SPI alias is missing) is really a bit ugly. |
In the same way that the fbtft driver uses |
Adds the DRM driver for the ILI9486. Signed-off-by: Dave Stevenson <[email protected]>
I'm not totally sure on how the spi_id table is used, except that the SPI core whinges if a compatible string device name isn't present in the spi_id table as well. So it complains on ili9486 as Easiest fix is
thus silencing the SPI core code on the mismatch, and removing the clash. Whilst at it I'll add the missing spi_device_id entries in ads7846 (the touchscreen driver) so at least with the DRM option the SPI core is happy. |
76dee20
to
f55eb6b
Compare
This also works, if you prefer:
but I'm happy to merge as is. |
Give me two mins to update to that - it's much nicer. |
Adds the option of selecting the DRM/KMS TinyDRM driver for this panel, rather than the deprecated FBTFT one. Signed-off-by: Dave Stevenson <[email protected]>
For "Really Good Reasons" [1] the SPI core requires a match between compatible device strings and the name in spi_device_id. The ili9486 driver uses compatible strings "waveshare,rpi-lcd-35" and "ozzmaker,piscreen", but "rpi-lcd-35" and "piscreen" are missing, so add them. Compatible string "ilitek,ili9486" is already used by staging/fbtft/fb_ili9486, therefore leaving it present in ili9486 as an spi_device_id causes the incorrect module to be loaded, therefore remove this id. [1] https://elixir.bootlin.com/linux/latest/source/drivers/spi/spi.c#L487 Signed-off-by: Dave Stevenson <[email protected]>
The SPI core logs error messages if a compatible string device name is not also present as an spi_device_id. No spi_device_id values are specified by the driver, therefore we get 4 log lines every time it is loaded: SPI driver ads7846 has no spi_device_id for ti,tsc2046 SPI driver ads7846 has no spi_device_id for ti,ads7843 SPI driver ads7846 has no spi_device_id for ti,ads7845 SPI driver ads7846 has no spi_device_id for ti,ads7873 Add the spi_device_id values for these devices. Signed-off-by: Dave Stevenson <[email protected]>
The debug message from bcm2835_codec_buf_prepare when the buffer size is incorrect can be a little spammy if the application isn't careful on how it drives it, therefore drop the priority of the message. Signed-off-by: Dave Stevenson <[email protected]>
f55eb6b
to
7674a76
Compare
kernel: configs: Raise 8250 UART limit to 5 on BCM2711 See: raspberrypi/linux#5590 kernel: drivers: irqchip: irq-bcm2835: Concurrency fix See: raspberrypi/linux#5589 kernel: TinyDRM ILI9486 overlay, and minor bcm2835-codec logging tweak See: raspberrypi/linux#5588
https://forums.raspberrypi.com/viewtopic.php?t=355484 for the TinyDRM overlay.
bcm2835-codec change for #5582