blob: 303474ca04774dba1cb506a7c1d66f4f40913d9e [file] [log] [blame]
#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/led/led.h>
/ {
aliases {
led-strip = &led_strip;
};
leds {
/delete-node/ led_3;
led_red: led_3 {
label = "LED Red";
gpios = <&gpiob 6 GPIO_ACTIVE_HIGH>;
};
};
pwm_leds {
/delete-node/ pwm_led_0;
/delete-node/ pwm_led_1;
/delete-node/ pwm_led_2;
/delete-node/ pwm_led_3;
pwm_led0: pwm_led_0 {
pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
label = "PWM LED Blue";
};
pwm_led1: pwm_led_1 {
pwms = <&pwm0 3 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
label = "PWM LED Green";
};
pwm_led2: pwm_led_2 {
pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
label = "PWM LED Red";
};
pwm_led3: pwm_led_3 {
pwms = <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
label = "PWM IDENTIFY LED Green";
};
};
keys {
/delete-node/ button_1;
/delete-node/ button_4;
compatible = "gpio-keys";
key_1: button_1 {
gpios = <&gpiod 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
};
key_4: button_4 {
gpios = <&gpiod 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
};
};
led_strip: ws2812 {
compatible = "worldsemi,ws2812-gpio";
chain-length = <1>; /* arbitrary; change at will */
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
in-gpios = <&gpiob 4 0>;
};
};
&gpioc {
interrupts = <38 1>;
};
&gpiod {
interrupts = <37 1>;
status = "okay";
};
&pinctrl {
/* Define I2C pins: SCL(PE0), SDA(PC2) */
i2c_scl_pe0_default: i2c_scl_pe0_default {
pinmux = <B9x_PINMUX_SET(B9x_PORT_E, B9x_PIN_0, B91_FUNC_A)>;
};
i2c_sda_pc2_default: i2c_sda_pc2_default {
pinmux = <B9x_PINMUX_SET(B9x_PORT_C, B9x_PIN_2, B91_FUNC_A)>;
};
/* PWMs */
pwm_ch0_pe3_default: pwm_ch0_pe3_default {
pinmux = <B9x_PINMUX_SET(B9x_PORT_E, B9x_PIN_3, B91_FUNC_C)>;
};
pwm_ch1_pb5_default: pwm_ch1_pb5_default {
pinmux = <B9x_PINMUX_SET(B9x_PORT_B, B9x_PIN_5, B91_FUNC_C)>;
};
pwm_ch2_pe2_default: pwm_ch2_pe2_default {
pinmux = <B9x_PINMUX_SET(B9x_PORT_E, B9x_PIN_2, B91_FUNC_C)>;
};
pwm_ch4_pe4_default: pwm_ch4_pe4_default {
pinmux = <B9x_PINMUX_SET(B9x_PORT_E, B9x_PIN_4, B91_FUNC_C)>;
};
};
&i2c {
pinctrl-0 = <&i2c_scl_pe0_default &i2c_sda_pc2_default>;
sht3xd@44 {
compatible = "sensirion,sht3xd";
reg = <0x44>;
};
};
&pwm0 {
pinctrl-0 = <&pwm_ch0_pe3_default &pwm_ch1_pb5_default &pwm_ch2_pe2_default &pwm_ch4_pe4_default>;
};