fix: add DSI_INIT0 lane config to old panel init_sequence + fix mode_flags
This commit is contained in:
@@ -101,6 +101,13 @@
|
||||
boot.loader.raspberry-pi.bootloader = "kernel";
|
||||
}
|
||||
nixos-raspberrypi.nixosModules.nixpkgs-rpi
|
||||
# Fix old panel init_sequence: add DSI_INIT0 lane config, remove contradictory BURST flag
|
||||
({ lib, ... }: {
|
||||
boot.kernelPatches = [{
|
||||
name = "panel-cwu50-fix-lanes";
|
||||
patch = ./patches/0008-panel-cwu50-fix-init-seq1.patch;
|
||||
}];
|
||||
})
|
||||
nixos-raspberrypi.nixosModules.raspberry-pi-5.base
|
||||
nixos-raspberrypi.lib.inject-overlays
|
||||
nixos-raspberrypi.lib.inject-overlays-global
|
||||
|
||||
17
patches/0008-panel-cwu50-fix-init-seq1.patch
Normal file
17
patches/0008-panel-cwu50-fix-init-seq1.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
--- a/drivers/gpu/drm/panel/panel-cwu50.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-cwu50.c
|
||||
@@ -65,6 +65,8 @@ static void cwu50_init_sequence(struct cwu50 *ctx)
|
||||
dcs_write_seq(0x72,0x06);
|
||||
dcs_write_seq(0x75,0x03);
|
||||
+ /* DSI_INIT0: set 4 lanes (bits[1:0]=11) — fixes lane count default */
|
||||
+ dcs_write_seq(0x80,0x03);
|
||||
dcs_write_seq(0xE0,0x01);
|
||||
@@ -162,7 +164,7 @@ static int cwu50_probe(struct mipi_dsi_device *dsi)
|
||||
|
||||
dsi->lanes = 4;
|
||||
dsi->format = MIPI_DSI_FMT_RGB888;
|
||||
- dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
|
||||
+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
|
||||
|
||||
ctx->id_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_IN);
|
||||
if (IS_ERR(ctx->id_gpio)) {
|
||||
Reference in New Issue
Block a user