Skip to content

Commit

Permalink
overlays: example overlay for using panel-dsi on RPi
Browse files Browse the repository at this point in the history
Analog to the generic panel-dpi overlay to use panel-dsi with dtparam
to not require a panel specific overlay for simple use cases that
do not require setting more niche DSI modes.

Signed-off-by: Timon Skerutsch <[email protected]>
  • Loading branch information
Timon Skerutsch committed Nov 20, 2023
1 parent 1779fb5 commit 2022162
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
waveshare-can-fd-hat-mode-a.dtbo \
waveshare-can-fd-hat-mode-b.dtbo \
wittypi.dtbo \
wm8960-soundcard.dtbo
wm8960-soundcard.dtbo \
panel-dsi-generic.dtbo

targets += dtbs dtbs_install
targets += $(dtbo-y)
Expand Down
113 changes: 113 additions & 0 deletions arch/arm/boot/dts/overlays/panel-dsi-generic-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2835";

dsi_frag: fragment@0 {
target = <&dsi1>;
__overlay__{
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
port {
dsi_out:endpoint {
remote-endpoint = <&panel_dsi_port>;
};
};
panel: panel-dsi-generic@0 {
// See panel-dsi.yaml binding
compatible = "panel-dsi";
reg = <0>;
power-supply = <0>;
backlight = <0>;
dsi-color-format = "RGB888";
mode = "";
width-mm = <0>;
height-mm = <0>;

port {
panel_dsi_port: endpoint {
data-lanes = <1>;
remote-endpoint = <&dsi_out>;
};
};

timing: panel-timing {
clock-frequency = <30000000>;
hactive = <840>;
vactive = <480>;
hback-porch = <44>;
hfront-porch = <46>;
hsync-len = <2>;
vback-porch = <18>;
vfront-porch = <16>;
vsync-len = <2>;
};
};
};
};

fragment@1 {
target = <&panel_dsi_port>;
__dormant__ {
data-lanes = <1>;
};
};

fragment@2 {
target = <&panel_dsi_port>;
__dormant__ {
data-lanes = <1 2>;
};
};

fragment@3 {
target = <&panel_dsi_port>;
__dormant__ {
data-lanes = <1 2 3>;
};
};

fragment@4 {
target = <&panel_dsi_port>;
__dormant__ {
data-lanes = <1 2 3 4>;
};
};

fragment@5 {
target = <&panel>;
__dormant__ {
mode = "MODE_VIDEO";
};
};

__overrides__ {
dsi0 = <&dsi_frag>, "target:0=",<&dsi0>;

clock-frequency = <&timing>, "clock-frequency:0";
hactive = <&timing>, "hactive:0";
hfp = <&timing>, "hfront-porch:0";
hsync = <&timing>, "hsync-len:0";
hbp = <&timing>, "hback-porch:0";
vactive = <&timing>, "vactive:0";
vfp = <&timing>, "vfront-porch:0";
vsync = <&timing>, "vsync-len:0";
vbp = <&timing>, "vback-porch:0";

width-mm = <&panel>, "width-mm:0";
height-mm = <&panel>, "height-mm:0";

rgb565 = <&panel>, "dsi-color-format=RGB565";
rgb666p = <&panel>, "dsi-color-format=RGB666_PACKED";
rgb666 = <&panel>, "dsi-color-format=RGB666";
rgb888 = <&panel>, "dsi-color-format=RGB888";
one_lane = <0>,"+1";
two_lane = <0>,"+2";
three_lane = <0>,"+3";
four_lane = <0>,"+4";
mode_video = <0>,"+5";
};

};

0 comments on commit 2022162

Please sign in to comment.