|
| 1 | +/* |
| 2 | + * Device Tree overlay for Waveshare 4.3" 800x480 panel. |
| 3 | + * It tries to look like a Pi 7" panel, but fails with some of the timing |
| 4 | + * options. |
| 5 | + */ |
| 6 | + |
| 7 | +/dts-v1/; |
| 8 | +/plugin/; |
| 9 | + |
| 10 | +#include "edt-ft5406.dtsi" |
| 11 | + |
| 12 | +/ { |
| 13 | + /* No compatible as it will have come from edt-ft5406.dtsi */ |
| 14 | + |
| 15 | + dsi_frag: fragment@0 { |
| 16 | + target = <&dsi1>; |
| 17 | + __overlay__ { |
| 18 | + #address-cells = <1>; |
| 19 | + #size-cells = <0>; |
| 20 | + status = "okay"; |
| 21 | + port { |
| 22 | + dsi_out: endpoint { |
| 23 | + remote-endpoint = <&panel_dsi_port>; |
| 24 | + }; |
| 25 | + }; |
| 26 | + |
| 27 | + panel: panel-dsi-generic@0 { |
| 28 | + // See panel-dsi.yaml binding |
| 29 | + compatible = "waveshare,4-3-inch-dsi","panel-dsi"; |
| 30 | + reg = <0>; |
| 31 | + power-supply = <®_display>; |
| 32 | + backlight = <®_display>; |
| 33 | + dsi-color-format = "RGB888"; |
| 34 | + mode = "MODE_VIDEO"; |
| 35 | + width-mm = <0>; |
| 36 | + height-mm = <0>; |
| 37 | + |
| 38 | + port { |
| 39 | + panel_dsi_port: endpoint { |
| 40 | + data-lanes = <1>; |
| 41 | + remote-endpoint = <&dsi_out>; |
| 42 | + }; |
| 43 | + }; |
| 44 | + |
| 45 | + timing: panel-timing { |
| 46 | + clock-frequency = <27777000>; |
| 47 | + hactive = <800>; |
| 48 | + vactive = <480>; |
| 49 | + hfront-porch = <59>; |
| 50 | + hsync-len = <2>; |
| 51 | + hback-porch = <45>; |
| 52 | + vfront-porch = <7>; |
| 53 | + vsync-len = <2>; |
| 54 | + vback-porch = <22>; |
| 55 | + }; |
| 56 | + }; |
| 57 | + }; |
| 58 | + }; |
| 59 | + |
| 60 | + fragment@1 { |
| 61 | + target-path = "/"; |
| 62 | + __overlay__ { |
| 63 | + reg_bridge: reg_bridge@1 { |
| 64 | + reg = <1>; |
| 65 | + compatible = "regulator-fixed"; |
| 66 | + regulator-name = "bridge_reg"; |
| 67 | + gpio = <®_display 0 0>; |
| 68 | + vin-supply = <®_display>; |
| 69 | + enable-active-high; |
| 70 | + }; |
| 71 | + }; |
| 72 | + }; |
| 73 | + |
| 74 | + i2c_frag: fragment@2 { |
| 75 | + target = <&i2c_csi_dsi>; |
| 76 | + __overlay__ { |
| 77 | + #address-cells = <1>; |
| 78 | + #size-cells = <0>; |
| 79 | + status = "okay"; |
| 80 | + |
| 81 | + reg_display: reg_display@45 { |
| 82 | + compatible = "raspberrypi,7inch-touchscreen-panel-regulator"; |
| 83 | + reg = <0x45>; |
| 84 | + gpio-controller; |
| 85 | + #gpio-cells = <2>; |
| 86 | + }; |
| 87 | + }; |
| 88 | + }; |
| 89 | + |
| 90 | + fragment@3 { |
| 91 | + target = <&i2c0if>; |
| 92 | + __overlay__ { |
| 93 | + status = "okay"; |
| 94 | + }; |
| 95 | + }; |
| 96 | + |
| 97 | + fragment@4 { |
| 98 | + target = <&i2c0mux>; |
| 99 | + __overlay__ { |
| 100 | + status = "okay"; |
| 101 | + }; |
| 102 | + }; |
| 103 | + fragment@5 { |
| 104 | + target = <&ft5406>; |
| 105 | + __overlay__ { |
| 106 | + vcc-supply = <®_display>; |
| 107 | + reset-gpio = <®_display 1 1>; |
| 108 | + }; |
| 109 | + }; |
| 110 | + |
| 111 | + __overrides__ { |
| 112 | + dsi0 = <&dsi_frag>, "target:0=",<&dsi0>, |
| 113 | + <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>, |
| 114 | + <&ts_i2c_frag>, "target:0=",<&i2c_csi_dsi0>, |
| 115 | + <®_bridge>, "reg:0=0", |
| 116 | + <®_bridge>, "regulator-name=bridge_reg_0"; |
| 117 | + disable_touch = <&ft5406>, "status=disabled"; |
| 118 | + }; |
| 119 | +}; |
0 commit comments