/* * Copyright (c) 2021 Tokita, Hiroshi * * SPDX-License-Identifier: Apache-2.0 */ / { chosen { zephyr,console = &usart0; zephyr,shell-uart = &usart0; zephyr,sram = &sram0; zephyr,flash = &flash0; sdhc0 = &sdhc0; }; leds { compatible = "gpio-leds"; led_red: led_red { gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; label = "LED_R"; }; led_green: led_green { gpios = <&gpioa 1 GPIO_ACTIVE_LOW>; label = "LED_G"; }; led_blue: led_blue { gpios = <&gpioa 2 GPIO_ACTIVE_LOW>; label = "LED_B"; }; }; gpio_keys { compatible = "gpio-keys"; button_boot0: button_boot0 { label = "BUTTON_BOOT0"; gpios = <&gpioa 8 GPIO_ACTIVE_HIGH>; }; }; pwmleds { compatible = "pwm-leds"; /* NOTE: bridge TIMER1_CH1 and LED_GREEN (PA1) */ pwm_led_green: pwm_led_green { pwms = <&pwm1 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; label = "PWM_LED_G"; }; /* NOTE: bridge TIMER1_CH2 and LED_BLUE (PA2) */ pwm_led_blue: pwm_led_blue { pwms = <&pwm1 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>; label = "PWM_LED_B"; }; }; aliases { led0 = &led_red; led1 = &led_green; led2 = &led_blue; pwm-led0 = &pwm_led_green; pwm-led1 = &pwm_led_blue; sw0 = &button_boot0; watchdog0 = &fwdgt; }; }; &gpioa { status = "okay"; }; &gpiob { status = "okay"; }; &gpioc { status = "okay"; }; &usart0 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&usart0_default>; pinctrl-names = "default"; }; &timer1 { status = "okay"; prescaler = <4096>; pwm1: pwm { status = "okay"; pinctrl-0 = <&pwm1_default>; pinctrl-names = "default"; }; }; &dac { status = "okay"; pinctrl-0 = <&dac_default>; pinctrl-names = "default"; }; &spi1 { status = "okay"; pinctrl-0 = <&spi1_default>; pinctrl-names = "default"; cs-gpios = <&gpiob 12 GPIO_ACTIVE_LOW>; sdhc0: sdhc@0 { compatible = "zephyr,sdhc-spi-slot"; reg = <0>; status = "okay"; spi-max-frequency = <24000000>; mmc { compatible = "zephyr,sdmmc-disk"; status = "okay"; }; }; }; &fwdgt { status = "okay"; };