zephyr/boards/alientek/pandora_stm32l475/pandora_stm32l475.dts

133 lines
2.5 KiB
Plaintext

/*
* Copyright (c) 2017 TsMax
*
* Based on stm32l475_pandora:
*
* Copyright (c) 2017 Tisilicon Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <st/l4/stm32l475Xe.dtsi>
#include <st/l4/stm32l475v(c-e-g)tx-pinctrl.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "STM32L475 Pandora Development Board";
compatible = "alientek,pandora_stm32l475";
aliases {
led0 = &red_led;
sw0 = &joy_up;
};
chosen {
zephyr,console = &usart1;
zephyr,shell-uart = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds {
compatible = "gpio-leds";
red_led: led_0 {
gpios = <&gpioe 7 GPIO_ACTIVE_HIGH>;
label = "User LED_R";
};
green_led: led_1 {
gpios = <&gpioe 8 GPIO_ACTIVE_HIGH>;
label = "User LED_G";
};
blue_led: led_2 {
gpios = <&gpioe 9 GPIO_ACTIVE_HIGH>;
label = "User LED_B";
};
};
gpio_keys {
compatible = "gpio-keys";
joy_up: joystick_up {
label = "joystick up";
gpios = <&gpioc 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
zephyr,code = <INPUT_KEY_UP>;
};
joy_down: joystick_down {
label = "joystick down";
gpios = <&gpiod 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_DOWN>;
};
joy_left: joystick_left {
label = "joystick left";
gpios = <&gpiod 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_LEFT>;
};
joy_right: joystick_right {
label = "joystick right";
gpios = <&gpiod 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_RIGHT>;
};
};
};
&quadspi {
pinctrl-0 = <&quadspi_clk_pe10 &quadspi_ncs_pe11
&quadspi_bk1_io0_pe12 &quadspi_bk1_io1_pe13
&quadspi_bk1_io2_pe14 &quadspi_bk1_io3_pe15>;
pinctrl-names = "default";
status = "okay";
w25q128jv: qspi-nor-flash@90000000 {
compatible = "st,stm32-qspi-nor";
reg = <0x90000000 DT_SIZE_M(16)>; /* 128 Mbits */
qspi-max-frequency = <80000000>;
jedec-id = [ef 40 18];
spi-bus-width = <4>;
status = "okay";
};
};
&clk_lsi {
status = "okay";
};
&clk_hsi {
status = "okay";
};
&pll {
div-m = <1>;
mul-n = <20>;
div-p = <7>;
div-q = <2>;
div-r = <4>;
clocks = <&clk_hsi>;
status = "okay";
};
&rcc {
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(80)>;
ahb-prescaler = <1>;
apb1-prescaler = <1>;
apb2-prescaler = <1>;
};
&usart1 {
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};
&rtc {
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
<&rcc STM32_SRC_LSI RTC_SEL(2)>;
status = "okay";
backup_regs {
status = "okay";
};
};