plan44 / plan44-feed

OpenWrt feed containing plan44 packages
29 stars 9 forks source link

p44-ledchain MT7628AN not effect WS2812 chip. #8

Open halidaltuner opened 4 months ago

halidaltuner commented 4 months ago

Hello,

I was having a compilation problem with the issue below and I solved it. I am trying to enable p44-ledchain with an example configuration.

ledchain0, non-inverted, led count, ws2812 IC

insmod p44-ledchain ledchain0=0,4,1

dmesg output;

[ 1440.518084] ledchain: pwm_base=0xB0005000
[ 1440.526283] ledchain: v8 - Device: /dev/ledchain0
[ 1440.535594] ledchain: - PWM channel    : 0
[ 1440.543741] ledchain: - PWM buffer size: 48
[ 1440.552023] ledchain: - Number of LEDs : 4
[ 1440.560142] ledchain: - Inverted       : 0
[ 1440.568252] ledchain: - LED type       : WS2812 GRB
[ 1440.577909] ledchain: - Max retries    : 3
[ 1440.586021] ledchain: - Max Tpassive   : 0 nS (0=chip default)

I'm trying to try, but unfortunately the LEDs are not responding. What am I missing?

plan44 commented 4 months ago

I was having a compilation problem with the issue below and I solved it.

👍

I am trying to enable p44-ledchain with an example configuration.

I guess you need to configure the output mux in the MT7628 to actually output the PWM signal on one of the pins that support it. That could probably be done by customizing the device tree, but don't ask me how 😉

On the Omega2, there is a convenient utility omega2-ctrl that allows adjusting all the pin functions in the MT7688. Probably it will compile and work on the MT7628 as well. It is in Onion's public feed using the source from here

If you have devmem utility enabled in your build, you can also switch the gpio mux by changing register values according to the MT7628 datasheet