1/* 2 * Copyright (c) 2018 STMicroelectronics 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/f4/stm32f412Xg.dtsi> 9#include <st/f4/stm32f412c(e-g)ux-pinctrl.dtsi> 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "Tocoding Argonkey 96boards"; 14 compatible = "tocoding,argonkey"; 15 16 chosen { 17 zephyr,console = &usart1; 18 zephyr,shell-uart = &usart1; 19 zephyr,sram = &sram0; 20 zephyr,flash = &flash0; 21 }; 22 23 leds { 24 compatible = "gpio-leds"; 25 green_led_0: led_0 { 26 gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; 27 label = "USR0 LED"; 28 }; 29 green_led_1: led_1 { 30 gpios = <&gpiob 2 GPIO_ACTIVE_HIGH>; 31 label = "USR1 LED"; 32 }; 33 }; 34 35 gpio_keys { 36 compatible = "gpio-keys"; 37 user_button: button { 38 label = "User"; 39 gpios = <&gpioa 2 GPIO_ACTIVE_LOW>; 40 zephyr,code = <INPUT_KEY_0>; 41 }; 42 }; 43 44 aliases { 45 led0 = &green_led_0; 46 led1 = &green_led_1; 47 sw0 = &user_button; 48 accel0 = &lsm6dsl; 49 }; 50}; 51 52&clk_lsi { 53 status = "okay"; 54}; 55 56&clk_hse { 57 clock-frequency = <DT_FREQ_M(16)>; 58 status = "okay"; 59}; 60 61&pll { 62 div-m = <8>; 63 mul-n = <84>; 64 div-p = <2>; 65 div-q = <8>; 66 clocks = <&clk_hse>; 67 status = "okay"; 68}; 69 70&plli2s { 71 div-m = <8>; 72 mul-n = <192>; 73 div-r = <3>; 74 div-q = <4>; 75 clocks = <&clk_hse>; 76 status = "okay"; /* 48MHz on PLLI2SQ */ 77}; 78 79&rcc { 80 clocks = <&pll>; 81 clock-frequency = <DT_FREQ_M(84)>; 82 ahb-prescaler = <1>; 83 apb1-prescaler = <2>; 84 /* APB2 clock is fixed at 42MHz to prevent known SPI/I2S bug */ 85 apb2-prescaler = <2>; 86}; 87 88&usart1 { 89 pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; 90 pinctrl-names = "default"; 91 current-speed = <115200>; 92 status = "okay"; 93}; 94 95&spi1_nss_pa4 { slew-rate = "very-high-speed"; }; 96 97&spi1 { 98 pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 99 &spi1_miso_pa6 &spi1_mosi_pa7>; 100 pinctrl-names = "default"; 101 status = "okay"; 102}; 103 104&spi2_nss_pb12 { slew-rate = "very-high-speed"; }; 105 106&spi2 { 107 pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 108 &spi2_miso_pb14 &spi2_mosi_pb15>; 109 pinctrl-names = "default"; 110 status = "okay"; 111 112 /* ST Microelectronics LSM6DSL accel/gyro sensor */ 113 lsm6dsl: lsm6dsl@1 { 114 compatible = "st,lsm6dsl"; 115 reg = <1>; 116 spi-max-frequency = <1000000>; 117 irq-gpios = <&gpiob 1 GPIO_ACTIVE_HIGH>; 118 }; 119}; 120 121&dma2 { 122 status = "okay"; 123}; 124 125&i2s5 { 126 status = "okay"; 127 pinctrl-0 = <&i2s5_ck_pb0 &i2s5_sd_pb8>; 128 pinctrl-names = "default"; 129 130 mp34dt05@0 { 131 compatible = "st,mpxxdtyy"; 132 reg = <0>; 133 }; 134}; 135 136&i2c1 { 137 pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; 138 pinctrl-names = "default"; 139 status = "okay"; 140 clock-frequency = <I2C_BITRATE_FAST>; 141}; 142 143&i2c2 { 144 pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb9>; 145 pinctrl-names = "default"; 146 status = "okay"; 147 clock-frequency = <I2C_BITRATE_FAST>; 148 149 hts221@5f { 150 compatible = "st,hts221"; 151 reg = <0x5f>; 152 drdy-gpios = <&gpioa 2 GPIO_ACTIVE_HIGH>; 153 }; 154 155 lps22hb-press@5d { 156 compatible = "st,lps22hb-press"; 157 reg = <0x5d>; 158 }; 159 160 vl53l0x@29 { 161 compatible = "st,vl53l0x"; 162 reg = <0x29>; 163 }; 164}; 165 166&i2c3 { 167 pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_pb4>; 168 pinctrl-names = "default"; 169 status = "okay"; 170 clock-frequency = <I2C_BITRATE_FAST>; 171 172 lp3943@60 { 173 compatible = "ti,lp3943"; 174 reg = <0x60>; 175 }; 176}; 177 178&rtc { 179 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, 180 <&rcc STM32_SRC_LSI RTC_SEL(2)>; 181 status = "okay"; 182}; 183