-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dtoverlays: Add an overlay for Waveshare's 800x480 4.3" DSI screen
It tried to be a clone of the Pi 7" display, but isn't, and gives corrupt images with the current timings. Add a new overlay for it. Signed-off-by: Dave Stevenson <[email protected]>
- Loading branch information
Showing
3 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 119 additions & 0 deletions
119
arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-800x480-overlay.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
/* | ||
* Device Tree overlay for Waveshare 4.3" 800x480 panel. | ||
* It tries to look like a Pi 7" panel, but fails with some of the timing | ||
* options. | ||
*/ | ||
|
||
/dts-v1/; | ||
/plugin/; | ||
|
||
#include "edt-ft5406.dtsi" | ||
|
||
/ { | ||
/* No compatible as it will have come from edt-ft5406.dtsi */ | ||
|
||
dsi_frag: fragment@0 { | ||
target = <&dsi1>; | ||
__overlay__ { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
port { | ||
dsi_out: endpoint { | ||
remote-endpoint = <&panel_dsi_port>; | ||
}; | ||
}; | ||
|
||
panel: panel-dsi-generic@0 { | ||
// See panel-dsi.yaml binding | ||
compatible = "waveshare,4-3-inch-dsi","panel-dsi"; | ||
reg = <0>; | ||
power-supply = <®_display>; | ||
backlight = <®_display>; | ||
dsi-color-format = "RGB888"; | ||
mode = "MODE_VIDEO"; | ||
width-mm = <0>; | ||
height-mm = <0>; | ||
|
||
port { | ||
panel_dsi_port: endpoint { | ||
data-lanes = <1>; | ||
remote-endpoint = <&dsi_out>; | ||
}; | ||
}; | ||
|
||
timing: panel-timing { | ||
clock-frequency = <27777000>; | ||
hactive = <840>; | ||
vactive = <480>; | ||
hfront-porch = <59>; | ||
hsync-len = <2>; | ||
hback-porch = <45>; | ||
vfront-porch = <7>; | ||
vsync-len = <2>; | ||
vback-porch = <22>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
fragment@1 { | ||
target-path = "/"; | ||
__overlay__ { | ||
reg_bridge: reg_bridge@1 { | ||
reg = <1>; | ||
compatible = "regulator-fixed"; | ||
regulator-name = "bridge_reg"; | ||
gpio = <®_display 0 0>; | ||
vin-supply = <®_display>; | ||
enable-active-high; | ||
}; | ||
}; | ||
}; | ||
|
||
i2c_frag: fragment@2 { | ||
target = <&i2c_csi_dsi>; | ||
__overlay__ { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
|
||
reg_display: reg_display@45 { | ||
compatible = "raspberrypi,7inch-touchscreen-panel-regulator"; | ||
reg = <0x45>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
}; | ||
}; | ||
}; | ||
|
||
fragment@3 { | ||
target = <&i2c0if>; | ||
__overlay__ { | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
fragment@4 { | ||
target = <&i2c0mux>; | ||
__overlay__ { | ||
status = "okay"; | ||
}; | ||
}; | ||
fragment@5 { | ||
target = <&ft5406>; | ||
__overlay__ { | ||
vcc-supply = <®_display>; | ||
reset-gpio = <®_display 1 1>; | ||
}; | ||
}; | ||
|
||
__overrides__ { | ||
dsi0 = <&dsi_frag>, "target:0=",<&dsi0>, | ||
<&i2c_frag>, "target:0=",<&i2c_csi_dsi0>, | ||
<&ts_i2c_frag>, "target:0=",<&i2c_csi_dsi0>, | ||
<®_bridge>, "reg:0=0", | ||
<®_bridge>, "regulator-name=bridge_reg_0"; | ||
disable_touch = <&ft5406>, "status=disabled"; | ||
}; | ||
}; |