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 status = "okay"; 75}; 76 77&rcc { 78 clocks = <&pll>; 79 clock-frequency = <DT_FREQ_M(84)>; 80 ahb-prescaler = <1>; 81 apb1-prescaler = <2>; 82 /* APB2 clock is fixed at 42MHz to prevent known SPI/I2S bug */ 83 apb2-prescaler = <2>; 84}; 85 86&usart1 { 87 pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; 88 pinctrl-names = "default"; 89 current-speed = <115200>; 90 status = "okay"; 91}; 92 93&spi1_nss_pa4 { slew-rate = "very-high-speed"; }; 94 95&spi1 { 96 pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 97 &spi1_miso_pa6 &spi1_mosi_pa7>; 98 pinctrl-names = "default"; 99 status = "okay"; 100}; 101 102&spi2_nss_pb12 { slew-rate = "very-high-speed"; }; 103 104&spi2 { 105 pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 106 &spi2_miso_pb14 &spi2_mosi_pb15>; 107 pinctrl-names = "default"; 108 status = "okay"; 109 110 /* ST Microelectronics LSM6DSL accel/gyro sensor */ 111 lsm6dsl: lsm6dsl@1 { 112 compatible = "st,lsm6dsl"; 113 reg = <1>; 114 spi-max-frequency = <1000000>; 115 irq-gpios = <&gpiob 1 GPIO_ACTIVE_HIGH>; 116 }; 117}; 118 119&dma2 { 120 status = "okay"; 121}; 122 123&i2s5 { 124 status = "okay"; 125 pinctrl-0 = <&i2s5_ck_pb0 &i2s5_sd_pb8>; 126 pinctrl-names = "default"; 127 128 mp34dt05@0 { 129 compatible = "st,mpxxdtyy"; 130 reg = <0>; 131 }; 132}; 133 134&i2c1 { 135 pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; 136 pinctrl-names = "default"; 137 status = "okay"; 138 clock-frequency = <I2C_BITRATE_FAST>; 139}; 140 141&i2c2 { 142 pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb9>; 143 pinctrl-names = "default"; 144 status = "okay"; 145 clock-frequency = <I2C_BITRATE_FAST>; 146 147 hts221@5f { 148 compatible = "st,hts221"; 149 reg = <0x5f>; 150 drdy-gpios = <&gpioa 2 GPIO_ACTIVE_HIGH>; 151 }; 152 153 lps22hb-press@5d { 154 compatible = "st,lps22hb-press"; 155 reg = <0x5d>; 156 }; 157 158 vl53l0x@29 { 159 compatible = "st,vl53l0x"; 160 reg = <0x29>; 161 }; 162}; 163 164&i2c3 { 165 pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_pb4>; 166 pinctrl-names = "default"; 167 status = "okay"; 168 clock-frequency = <I2C_BITRATE_FAST>; 169 170 lp3943@60 { 171 compatible = "ti,lp3943"; 172 reg = <0x60>; 173 }; 174}; 175 176&rtc { 177 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, 178 <&rcc STM32_SRC_LSI RTC_SEL(2)>; 179 status = "okay"; 180}; 181