Skip to content
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

Merged
merged 5 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -3245,6 +3245,9 @@ Params: speed Display SPI bus speed

xohms Touchpanel sensitivity (X-plate resistance)

drm Select the DRM/KMS driver instead of the FBTFT
one


Name: piscreen2r
Info: PiScreen 2 with resistive TP display by OzzMaker.com
Expand Down
10 changes: 7 additions & 3 deletions arch/arm/boot/dts/overlays/piscreen-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>

/ {
compatible = "brcm,bcm2835";

Expand Down Expand Up @@ -59,9 +61,9 @@
fps = <30>;
buswidth = <8>;
regwidth = <16>;
reset-gpios = <&gpio 25 1>;
dc-gpios = <&gpio 24 0>;
led-gpios = <&gpio 22 0>;
reset-gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
led-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
debug = <0>;

init = <0x10000b0 0x00
Expand Down Expand Up @@ -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>;
};
};
1 change: 1 addition & 0 deletions arch/arm/configs/bcm2709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,7 @@ CONFIG_DRM_PANEL_MIPI_DBI=m
CONFIG_TINYDRM_HX8357D=m
CONFIG_TINYDRM_ILI9225=m
CONFIG_TINYDRM_ILI9341=m
CONFIG_TINYDRM_ILI9486=m
CONFIG_TINYDRM_MI0283QT=m
CONFIG_TINYDRM_REPAPER=m
CONFIG_TINYDRM_ST7586=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@ CONFIG_DRM_PANEL_MIPI_DBI=m
CONFIG_TINYDRM_HX8357D=m
CONFIG_TINYDRM_ILI9225=m
CONFIG_TINYDRM_ILI9341=m
CONFIG_TINYDRM_ILI9486=m
CONFIG_TINYDRM_MI0283QT=m
CONFIG_TINYDRM_REPAPER=m
CONFIG_TINYDRM_ST7586=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/bcmrpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,7 @@ CONFIG_DRM_PANEL_MIPI_DBI=m
CONFIG_TINYDRM_HX8357D=m
CONFIG_TINYDRM_ILI9225=m
CONFIG_TINYDRM_ILI9341=m
CONFIG_TINYDRM_ILI9486=m
CONFIG_TINYDRM_MI0283QT=m
CONFIG_TINYDRM_REPAPER=m
CONFIG_TINYDRM_ST7586=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,7 @@ CONFIG_DRM_PANEL_MIPI_DBI=m
CONFIG_TINYDRM_HX8357D=m
CONFIG_TINYDRM_ILI9225=m
CONFIG_TINYDRM_ILI9341=m
CONFIG_TINYDRM_ILI9486=m
CONFIG_TINYDRM_MI0283QT=m
CONFIG_TINYDRM_REPAPER=m
CONFIG_TINYDRM_ST7586=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/bcmrpi3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@ CONFIG_DRM_PANEL_MIPI_DBI=m
CONFIG_TINYDRM_HX8357D=m
CONFIG_TINYDRM_ILI9225=m
CONFIG_TINYDRM_ILI9341=m
CONFIG_TINYDRM_ILI9486=m
CONFIG_TINYDRM_MI0283QT=m
CONFIG_TINYDRM_REPAPER=m
CONFIG_TINYDRM_ST7586=m
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/tiny/ili9486.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ static const struct of_device_id ili9486_of_match[] = {
MODULE_DEVICE_TABLE(of, ili9486_of_match);

static const struct spi_device_id ili9486_id[] = {
{ "ili9486", 0 },
{ "rpi-lcd-35", 0 },
{ "piscreen", 0 },
{ }
};
MODULE_DEVICE_TABLE(spi, ili9486_id);
Expand Down
12 changes: 12 additions & 0 deletions drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,17 @@ static const struct of_device_id ads7846_dt_ids[] = {
};
MODULE_DEVICE_TABLE(of, ads7846_dt_ids);

static const struct spi_device_id ads7846_spi_ids[] = {
{ "tsc2046", 0 },
{ "ads7843", 0 },
{ "ads7843", 0 },
{ "ads7845", 0 },
{ "ads7846", 0 },
{ "ads7873", 0 },
{ }
};
MODULE_DEVICE_TABLE(spi, ads7846_spi_ids);

static const struct ads7846_platform_data *ads7846_probe_dt(struct device *dev)
{
struct ads7846_platform_data *pdata;
Expand Down Expand Up @@ -1424,6 +1435,7 @@ static struct spi_driver ads7846_driver = {
.pm = &ads7846_pm,
.of_match_table = of_match_ptr(ads7846_dt_ids),
},
.id_table = ads7846_spi_ids,
.probe = ads7846_probe,
.remove = ads7846_remove,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2883,7 +2883,7 @@ static int bcm2835_codec_buf_prepare(struct vb2_buffer *vb)
}

if (vb2_plane_size(vb, 0) < q_data->sizeimage) {
v4l2_err(&ctx->dev->v4l2_dev, "%s data will not fit into plane (%lu < %lu)\n",
v4l2_dbg(1, debug, &ctx->dev->v4l2_dev, "%s data will not fit into plane (%lu < %lu)\n",
__func__, vb2_plane_size(vb, 0),
(long)q_data->sizeimage);
return -EINVAL;
Expand Down