1# Copyright (c) 2023, TOKITA Hiroshi 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 The pio node configured for ws2812. 6 7compatible: "worldsemi,ws2812-rpi_pico-pio" 8 9include: pinctrl-device.yaml 10 11properties: 12 bit-waveform: 13 type: array 14 description: | 15 This property defines the waveform for sending 1-bit data. 16 The program uses the first three elements of the array. 17 The T0 is equal to T0H in the datasheet. 18 The T2 is equal to T1L in the datasheet. 19 The T1 is equal to (T1H-T0H) or (T0L-T1L) in the datasheet. 20 21 Code-0 22 +------+ +--- 23 | | | 24 | T0 | T1+T2 | 25 | | | 26 ---+ +-----------------+ 27 28 Code-1 29 +---------------+ +--- 30 | | | 31 | T0+T1 | T2 | 32 | | | 33 ---+ +--------+ 34 35 36 The frequency determines the wave period. 37 The T0~T2 means ratio in one period. 38 39 For example, T0=3, T1=3, T2=4 and the frequency is 800kHz case, 40 T0H is 41 (1 / 800kHz) * (3/10) = 375ns 42 T0L is 43 (1 / 800kHz) * ((4+3)/10) = 875ns 44 45child-binding: 46 description: | 47 Worldsemi WS2812 or compatible LED strip driver based on RaspberryPi Pico's PIO 48 The LED strip node can put up to 4 instances under a single PIO node. 49 50 include: ws2812-gpio.yaml 51 52 properties: 53 gpios: 54 description: | 55 Inherited from ws2812-gpio.yaml. 56 57 Note: This driver does not configure the output pin. 58 You need to configure the pin with pinctrl that is in the parent node configuration 59 for use by PIO. This property only uses the GPIO pin number and ignores flags. 60 61 frequency: 62 type: int 63 description: | 64 Specify the number of times a waveform representing 1 bit is 65 transmitted per second. It is same meaning as bit-per-seconds. 66 WS2812 works with 800000. Set the value 400000 if use with WS2811. 67