Я пытаюсь заставить свой ШИМ работать на специальной плате am33x (та же самая черная мишень). По какой-то причине я не вижу проверяемого драйвера pwm-backlight
и, следовательно, не вижу ШИМ, как указано в моем прицеле. Вот мои соответствующие исходные файлы:
фрагмент dts:
/dts-v1/;
#include "am33xx.dtsi"
#include <dt-bindings/interrupt-controller/irq.h>
/ {
model = "test";
compatible = "ti,am33xx";
chosen {
stdout-path = &uart0;
};
backlight: backlight {
status = "okay";
compatible = "pwm-backlight";
pwms = <&ehrpwm1 0 10000 0>;
brightness-levels = <0 10 20 30 40 50 60 70 80 90 99>;
default-brightness-level = <6>;
};
};
&am33xx_pinmux {
ehrpwm1_pins: pinmux-ehrpwm1-pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE6) /* gpmc_a2.ehrpwm1a */
>;
};
};
&ehrpwm1 {
u-boot,dm-spl;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&ehrpwm1_pins>;
};
defconfig
CONFIG_DM=y
CONFIG_CMD_DM=y
CONFIG_DM_VIDEO=y
CONFIG_DM_PWM=y
CONFIG_BACKLIGHT_PWM=y
информация о драйвере pwm-backlight
config BACKLIGHT_PWM
bool "Generic PWM based Backlight Driver"
depends on DM_VIDEO && DM_PWM
default y
help
If you have a LCD backlight adjustable by PWM, say Y to enable
this driver.
This driver can be use with "simple-panel" and
it understands the standard device tree
(leds/backlight/pwm-backlight.txt)
( linux версия) https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt
и когда я прерываю u-boot и использую dm tree
, вы можете видеть, что это не проверено. Почему?
=> dm tree
Class Index Probed Driver Name
-----------------------------------------------------------
root 0 [ + ] root_driver root_driver
simple_bus 0 [ + ] generic_simple_bus |-- ocp
simple_bus 1 [ ] generic_simple_bus | |-- l4_wkup@44c00000
simple_bus 2 [ ] generic_simple_bus | | |-- prcm@200000
simple_bus 3 [ ] generic_simple_bus | | `-- scm@210000
syscon 0 [ ] syscon | | `-- scm_conf@0
gpio 0 [ ] gpio_omap | |-- gpio@44e07000
gpio 1 [ ] gpio_omap | |-- gpio@4804c000
gpio 2 [ ] gpio_omap | |-- gpio@481ac000
gpio 3 [ ] gpio_omap | |-- gpio@481ae000
serial 0 [ + ] omap_serial | |-- serial@44e09000
mmc 0 [ + ] omap_hsmmc | |-- mmc@481d8000
timer 0 [ + ] omap_timer | |-- timer@48040000
timer 1 [ ] omap_timer | |-- timer@48042000
timer 2 [ ] omap_timer | |-- timer@48044000
timer 3 [ ] omap_timer | |-- timer@48046000
timer 4 [ ] omap_timer | |-- timer@48048000
timer 5 [ ] omap_timer | |-- timer@4804a000
misc 0 [ + ] ti-musb-wrapper | `-- usb@47400000
usb 0 [ + ] ti-musb-peripheral | `-- usb@47401000
eth 0 [ + ] usb_ether | `-- usb_ether
backlight 0 [ ] pwm_backlight `-- backlight