Tool/software:
Problem description:
When starting LVDS in dts, the backlight PWM has been unable to output. What could be the possible cause of this? Is it defconfig or dts exception?
My dts configuration:
#include <dt-bindings/pwm/pwm.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/irq.h> #include "k3-pinctrl.h" #include "k3-am62x-sk-common.dtsi" &{/} { backlight_lvds: backlight-lvds { compatible = "pwm-backlight"; pwms = <&epwm1 1 20000 0>; brightness-levels = < 0 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 >; default-brightness-level = <255>; }; panel_lvds: panel_lvds { compatible = "panel-lvds"; backlight = <&backlight_lvds>; lable = "LVDS"; data-mapping = "vesa-24"; width-mm = <229>; height-mm = <149>; panel-timing { clock-frequency = <71100000>; hactive = <1280>; vactive = <800>; hback-porch = <88>; hfront-porch = <70>; vback-porch = <21>; vfront-porch = <15>; hsync-len = <4>; vsync-len = <4>; hsync-active = <0>; vsync-active = <0>; de-active = <0>; pixelclk-active = <0>; }; port@0 { lvds_in0: endpoint { remote-endpoint = <&lvds_out0>; }; }; }; }; &dss_ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; lvds_out0: endpoint { remote-endpoint = <&lvds_in0>; }; }; }; &dss { pinctrl-names = "default"; pinctrl-0 = <&main_oldi0_pins_default &main_dss0_pins_default>; status = "okay"; }; &epwm1 { pinctrl-names = "default"; pinctrl-0 = <&main_epwm1_a_pins_default>; status = "okay"; }; &main_pmx0 { main_epwm1_a_pins_default: main-epwm1-a-pins-default { pinctrl-single,pins = < AM62X_IOPAD(0x19c, PIN_OUTPUT, 6) /* (B18) MCASP0_AXR1.EHRPWM1_A */ >; }; main_oldi0_pins_default: main-oldi0-pins-default { pinctrl-single,pins = < AM62X_IOPAD(0x0260, PIN_OUTPUT, 0) /* (AA5) OLDI0_A0N */ AM62X_IOPAD(0x025c, PIN_OUTPUT, 0) /* (Y6) OLDI0_A0P */ AM62X_IOPAD(0x0268, PIN_OUTPUT, 0) /* (AD3) OLDI0_A1N */ AM62X_IOPAD(0x0264, PIN_OUTPUT, 0) /* (AB4) OLDI0_A1P */ AM62X_IOPAD(0x0270, PIN_OUTPUT, 0) /* (Y8) OLDI0_A2N */ AM62X_IOPAD(0x026c, PIN_OUTPUT, 0) /* (AA8) OLDI0_A2P */ AM62X_IOPAD(0x0278, PIN_OUTPUT, 0) /* (AB6) OLDI0_A3N */ AM62X_IOPAD(0x0274, PIN_OUTPUT, 0) /* (AA7) OLDI0_A3P */ AM62X_IOPAD(0x0280, PIN_OUTPUT, 0) /* (AC6) OLDI0_A4N */ AM62X_IOPAD(0x027c, PIN_OUTPUT, 0) /* (AC5) OLDI0_A4P */ AM62X_IOPAD(0x0288, PIN_OUTPUT, 0) /* (AE5) OLDI0_A5N */ AM62X_IOPAD(0x0284, PIN_OUTPUT, 0) /* (AD6) OLDI0_A5P */ AM62X_IOPAD(0x0290, PIN_OUTPUT, 0) /* (AE6) OLDI0_A6N */ AM62X_IOPAD(0x028c, PIN_OUTPUT, 0) /* (AD7) OLDI0_A6P */ AM62X_IOPAD(0x0298, PIN_OUTPUT, 0) /* (AD8) OLDI0_A7N */ AM62X_IOPAD(0x0294, PIN_OUTPUT, 0) /* (AE7) OLDI0_A7P */ AM62X_IOPAD(0x02a0, PIN_OUTPUT, 0) /* (AD4) OLDI0_CLK0N */ AM62X_IOPAD(0x029c, PIN_OUTPUT, 0) /* (AE3) OLDI0_CLK0P */ AM62X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (AE4) OLDI0_CLK1N */ AM62X_IOPAD(0x02a4, PIN_OUTPUT, 0) /* (AD5) OLDI0_CLK1P */ >; }; };
系统log:
root@sbc7138:~# cat /sys/kernel/debug/gpio gpiochip2: GPIOs 344-367, parent: i2c/1-0022, 1-0022, can sleep: gpio-344 (GPIO_CPSW2_RST ) gpio-345 (GPIO_CPSW1_RST ) gpio-346 (PRU_DETECT ) gpio-347 (MMC1_SD_EN |regulator-3 ) out lo gpio-348 (VPP_LDO_EN ) gpio-349 (EXP_PS_3V3_En ) gpio-350 (EXP_PS_5V0_En ) gpio-351 (EXP_HAT_DETECT ) gpio-352 (GPIO_AUD_RSTn ) gpio-353 (GPIO_eMMC_RSTn ) gpio-354 (UART1_FET_BUF_EN ) gpio-355 (WL_LT_EN |regulator-6 ) out lo ACTIVE LOW gpio-356 (GPIO_HDMI_RSTn ) gpio-357 (CSI_GPIO1 ) gpio-358 (CSI_GPIO2 ) gpio-359 (PRU_3V3_EN ) gpio-360 (HDMI_INTn ) gpio-361 (PD_I2C_IRQ ) gpio-362 (MCASP1_FET_EN ) gpio-363 (MCASP1_BUF_BT_EN ) gpio-364 (MCASP1_FET_SEL ) gpio-365 (UART1_FET_SEL ) gpio-366 (TSINT# ) gpio-367 (IO_EXP_TEST_LED ) gpiochip1: GPIOs 368-419, parent: platform/601000.gpio, 601000.gpio: gpio-417 ( |heartbeat ) out lo gpiochip0: GPIOs 420-511, parent: platform/600000.gpio, 600000.gpio: gpio-451 ( |tlv71033 ) out lo gpio-491 ( |regulator-7 ) out lo root@sbc7138:~# root@sbc7138:~# root@sbc7138:~# cat /sys/kernel/debug/pinctrl/f4000.pinctrl-pinctrl-single/pinmux-pins | grep pwm pin 103 (PIN103): 23010000.pwm (GPIO UNCLAIMED) function main-epwm1-a-pins-default group main-epwm1-a-pins-default root@sbc7138:~# root@sbc7138:~# dmesg | grep pwm [ 17.659335] pwm-backlight backlight-lvds: supply power not found, using dummy regulator [ 18.450811] Modules linked in: videobuf2_dma_contig m_can_platform m_can rti_wdt(+) syscopyarea videobuf2_memops sysfillrect sysimgblt fb_sys_fops videobuf2_v4l2 ti_k3_m4_remoteproc(+) videobuf2_common v4l2_async ti_k3_common can_dev drm videodev snd_soc_davinci_mcasp snd_soc_tlv320aic3x_i2c snd_soc_ti_udma snd_soc_tlv320aic3x cdns_dphy_rx snd_soc_ti_edma pruss sa2ul mcrc drm_panel_orientation_quirks snd_soc_ti_sdma mc pwm_bl optee_rng rng_core pwm_tiehrpwm ip_tables x_tables ipv6 root@sbc7138:~#