Hi, On 9/14/22 10:42, Tony Lindgren wrote: > On am625, pad c17 can be used either in gpio mode or pwm mode to control > the connected led. Let's change to use pwm-led for additional brighness > control. > > The pwm controller is dmtimer7 for pad C17. We configure it for 128 Hz > rate (1000000000 / 7812500) similar to what has been done elsewhere for > pwm-leds. > > Cc: Keerthy <j-keerthy@xxxxxx> > Cc: Nishanth Menon <nm@xxxxxx> > Cc: Vignesh Raghavendra <vigneshr@xxxxxx> > Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx> > --- > arch/arm64/boot/dts/ti/k3-am625-sk.dts | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) > > diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts > --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts > +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts > @@ -131,18 +131,25 @@ vdd_sd_dv: regulator-4 { > }; > > leds { > - compatible = "gpio-leds"; > - pinctrl-names = "default"; > - pinctrl-0 = <&usr_led_pins_default>; > + compatible = "pwm-leds"; > > led-0 { > label = "am62-sk:green:heartbeat"; > - gpios = <&main_gpio1 49 GPIO_ACTIVE_HIGH>; > + pwms = <&main_pwm7 0 7812500 0>; > + max-brightness = <255>; > linux,default-trigger = "heartbeat"; > function = LED_FUNCTION_HEARTBEAT; > default-state = "off"; > }; > }; > + > + main_pwm7: dmtimer-main-pwm-7 { > + pinctrl-0 = <&usr_led_pins_default>; > + pinctrl-names = "default"; > + compatible = "ti,omap-dmtimer-pwm"; > + #pwm-cells = <3>; > + ti,timers = <&main_timer7>; > + }; > }; > > &main_pmx0 { > @@ -203,7 +210,7 @@ AM62X_IOPAD(0x240, PIN_INPUT, 0) /* (D17) MMC1_SDCD */ > > usr_led_pins_default: usr-led-pins-default { > pinctrl-single,pins = < > - AM62X_IOPAD(0x244, PIN_OUTPUT, 7) /* (C17) MMC1_SDWP.GPIO1_49 */ > + AM62X_IOPAD(0x244, PIN_OUTPUT, 2) /* (C17) MMC1_SDWP.TIMER_IO7 */ > >; > }; > Looking good on SK-AM625 E3. Just for a reference, I also checked the PWM output for TIMER_IO2 (C15) and TIMER_IO3 (E15). Tested-by: Georgi Vlaev <g-vlaev@xxxxxx> -- Regards, Georgi