Is there a step-by-step guide or a devicetree example on how to get backlight PWM to work for a panel connected to DSI?
This is the DSI snippet (note that I’m using the wxga-14-0 panel):
dsi { /* dsi@15300000 */
nvidia,dsi-controller-vs = <DSI_VS_0>;
status = "okay";
nvidia,active-panel = <&panel_s_wuxga_8_0>;
dcss_disp0_mipi_dsi: mipi_dsi {
remote-endpoint = <&mipi_dsi_in>;
};
panel_s_wuxga_8_0: panel-s-wuxga-8-0 {
status = "okay";
compatible = "c,wxga-14-0";
nvidia,dsi-instance = <0>;
nvidia,dsi-n-data-lanes = <4>;
nvidia,dsi-pixel-format = <3>; /* 24 bit planar*/
nvidia,dsi-refresh-rate = <60>;
nvidia,dsi-video-data-type = <0>;
nvidia,dsi-video-clock-mode = <0>;
nvidia,dsi-video-burst-mode = <0>;
nvidia,dsi-ganged-type = <0>; /* 0= not used ?*/
nvidia,dsi-ganged-swap-links = <0>;
nvidia,dsi-ganged-write-to-all-links = <0>;
nvidia,dsi-controller-vs = <1>;
nvidia,dsi-virtual-channel = <0>;
nvidia,dsi-panel-reset = <1>;
nvidia,panel-bl-pwm-gpio = <&tegra_aon_gpio TEGRA_AON_GPIO(U, 0) 1>; /* PU0 */
nvidia,dsi-ulpm-not-support = <1>;
nvidia,dsi-suspend-stop-stream-late = <1>;
nvidia,dsi-power-saving-suspend = <1>;
nvidia,default_color_space = <1>;
pwms = <&tegra_pwm1 0 40161>;
disp-default-out {
nvidia,out-type = <2>;
nvidia,out-width = <220>;
nvidia,out-height = <180>;
nvidia,out-flags = <(0 << 3)>;
nvidia,out-xres = <800>;
nvidia,out-yres = <600>;
};
display-timings {
/delete-node/ 1200x1920-32-60Hz; /*remove existing resolution*/
800x600-32-60Hz {
clock-frequency = <40000000>;
hactive = <800>;
vactive = <600>;
hfront-porch = <220>;
hback-porch = <38>;
vfront-porch = <24>;
vback-porch = <4>;
hsync-len = <13>;
vsync-len = <2>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
nvidia,h-ref-to-sync = <1>;
nvidia,v-ref-to-sync = <11>;
};
};
};
};
backlight {
status = "okay";
panel-s-800x600-bl {
status="okay";
compatible = "c,wxga-14-0-bl";
pwms = <&tegra_pwm1 0 40161>;
max-brightness = <255>;
default-brightness = <200>;
bl-measured = <0x0 --- long text snipped --- 0xfe 0xff>;
};
};
If I setup the PWM1 / output0 manually using sysfs the backlight PWM is working so the hardware is OK. However I rather not resort to having to run a script to set the backlight for the display. On the embedded platforms I have used before there is an entry in /sys/class/backlight How do I get that same functionality on the TX2?