/* * Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd. * * SPDX-License-Identifier: Apache-2.0 */ #include #include &uart0 { current-speed = <4800>; }; &spi2 { /* Workaround to support WS2812 driver */ line-idle-low; led_strip: ws2812@0 { compatible = "worldsemi,ws2812-spi"; /* SPI */ reg = <0>; /* ignored, but necessary for SPI bindings */ spi-max-frequency = <6400000>; /* WS2812 */ chain-length = <1>; /* arbitrary; change at will */ spi-cpha; spi-one-frame = <0xf0>; /* 11110000: 625 ns high and 625 ns low */ spi-zero-frame = <0xc0>; /* 11000000: 312.5 ns high and 937.5 ns low */ color-mapping = ; }; }; &pinctrl { spim2_default: spim2_default { group2 { pinmux = ; }; }; ledc0_default: ledc0_default { group1 { pinmux = ; output-enable; }; }; }; / { aliases { led-strip = &led_strip; }; chosen { zephyr,vt-uart = &uart0; }; // chosen { // /delete-property/ zephyr,console; // }; uart_tx_enable: uart_tx_enable { compatible = "uart-tx-enable"; gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; }; leds { compatible = "gpio-leds"; led0: led0 { gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; }; led1: led1 { gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; }; led2: led2 { gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>; }; led3: led3 { gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; }; }; aliases { pwm-0 = &ledc0; pwm-beeper0 = &pwm_beeper; }; pwmbeepers { compatible = "pwm-leds"; pwm_beeper: pwm_led_gpio0_3 { label = "PWM BEEPER0"; /* ~2 KHz */ pwms = <&ledc0 0 40000000 PWM_POLARITY_NORMAL>; }; }; }; &ledc0 { pinctrl-0 = <&ledc0_default>; pinctrl-names = "default"; status = "okay"; #address-cells = <1>; #size-cells = <0>; channel0@0 { reg = <0x0>; timer = <0>; }; };