I'm implementing the WS2812 driver on custom hardware and have some confusion around the hardware tuning parameters for the SPI implementation. The description of the device tree definition for my WS2812 implies that you can adjust the `spi-max-frequency`, `spi-one-frame`, and `spi-zero-frame` based on your specific hardware:
"Hardware specific tuning is required
using these properties:
- spi-max-frequency
- spi-zero-frame
- spi-one-frame."
However, I've tried a lot of different configurations with an oscilloscope on hand and can't seem to work out a pattern on which parameters control which properties of the waveform. It makes intuitive sense to me that the spi-zero-frame should modify the "off period" of the bit, while the spi-one-frame should modify the "on period" of the bit. But those assumptions don't seem to add up to what I'm seeing on my scope.
What is the implied method of configuring the timing for my hardware? Is there a quick calculation I can do to get the correct values for my setup?
I should note that my design has an inverting buffer that is throwing some strange timing into the mix. I thought simply swapping the spi-one-frame value with the spi-zero-frame value would suffice. But that doesn't seem to be the case. When I do that with the standard values, 1/13 LEDs don't turn on and 1/13 LEDs won't turn off. I am assuming this is a timing issue.