1/* 2 * Copyright (c) 2018 Diego Sueiro 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <silabs/efr32mg12p332f1024gl125.dtsi> 9#include "sltb004a-pinctrl.dtsi" 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "Silabs EFR32MG12 SLTB004A board (aka Thunderboard Sense 2)"; 14 compatible = "silabs,sltb004a", "silabs,efr32mg"; 15 16 /* These aliases are provided for compatibility with samples */ 17 aliases { 18 led0 = &led0; 19 led1 = &led1; 20 pwm-led0 = &pwm_led0; 21 sw0 = &button0; 22 sw1 = &button1; 23 watchdog0 = &wdog0; 24 watchdog1 = &wdog1; 25 }; 26 27 chosen { 28 zephyr,console = &usart0; 29 zephyr,shell-uart = &usart0; 30 zephyr,uart-pipe = &usart0; 31 zephyr,sram = &sram0; 32 zephyr,flash = &flash0; 33 }; 34 35 leds { 36 compatible = "gpio-leds"; 37 led0: led_0 { 38 gpios = <&gpiod 8 0>; 39 label = "LED 0"; 40 }; 41 led1: led_1 { 42 gpios = <&gpiod 9 0>; 43 label = "LED 1"; 44 }; 45 }; 46 47 buttons { 48 compatible = "gpio-keys"; 49 button0: button_0 { 50 /* gpio flags need validation */ 51 gpios = <&gpiod 14 GPIO_ACTIVE_LOW>; 52 label = "User Push Button 0"; 53 zephyr,code = <INPUT_KEY_0>; 54 }; 55 button1: button_1 { 56 /* gpio flags need validation */ 57 gpios = <&gpiod 15 GPIO_ACTIVE_LOW>; 58 label = "User Push Button 1"; 59 zephyr,code = <INPUT_KEY_1>; 60 }; 61 }; 62 63 pwmleds { 64 compatible = "pwm-leds"; 65 status = "okay"; 66 pwm_led0: pwm_led0 { 67 pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>; 68 }; 69 }; 70}; 71 72&cpu0 { 73 clock-frequency = <38400000>; 74}; 75 76&usart0 { 77 current-speed = <115200>; 78 pinctrl-0 = <&usart0_default>; 79 pinctrl-names = "default"; 80 status = "okay"; 81}; 82 83&usart2 { 84 compatible = "silabs,gecko-spi-usart"; 85 86 #address-cells = <1>; 87 #size-cells = <0>; 88 89 location-rx = <GECKO_LOCATION(30) GECKO_PORT_K GECKO_PIN(2)>; 90 location-tx = <GECKO_LOCATION(29) GECKO_PORT_K GECKO_PIN(0)>; 91 location-clk = <GECKO_LOCATION(18) GECKO_PORT_F GECKO_PIN(7)>; 92 93 cs-gpios = <&gpiok 1 GPIO_ACTIVE_LOW>; 94 95 status = "okay"; 96 97 mx25r80: mx25r8035f@0 { 98 compatible = "jedec,spi-nor"; 99 reg = <0>; 100 spi-max-frequency = <80000000>; 101 size = <0x800000>; 102 jedec-id = [c2 28 14]; 103 sfdp-bfp = [ 104 e5 20 f1 ff ff ff 7f 00 44 eb 08 6b 08 3b 04 bb 105 ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52 106 10 d8 00 ff 23 72 f5 00 82 ed 04 b7 44 83 38 44 107 30 b0 30 b0 f7 c4 d5 5c 00 be 29 ff f0 d0 ff ff 108 ]; 109 }; 110}; 111 112&leuart0 { 113 current-speed = <9600>; 114 location-rx = <GECKO_LOCATION(27) GECKO_PORT_F GECKO_PIN(4)>; 115 location-tx = <GECKO_LOCATION(27) GECKO_PORT_F GECKO_PIN(3)>; 116 status = "okay"; 117}; 118 119&pinctrl { 120 i2c0_default: i2c0_default { 121 group1 { 122 psels = <GECKO_PSEL(I2C_SDA, C, 10)>, 123 <GECKO_PSEL(I2C_SCL, C, 11)>, 124 <GECKO_LOC(I2C_SDA, 15)>, 125 <GECKO_LOC(I2C_SCL, 15)>; 126 }; 127 }; 128 129 i2c1_default: i2c1_default { 130 group1 { 131 psels = <GECKO_PSEL(I2C_SDA, B, 6)>, 132 <GECKO_PSEL(I2C_SCL, B, 7)>, 133 <GECKO_LOC(I2C_SDA, 6)>, 134 <GECKO_LOC(I2C_SCL, 6)>; 135 }; 136 }; 137}; 138 139&i2c0 { 140 pinctrl-0 = <&i2c0_default>; 141 pinctrl-names = "default"; 142 status = "okay"; 143}; 144 145&i2c1 { 146 /* This set selects for CCS811_I2C supporting CCS811 */ 147 pinctrl-0 = <&i2c1_default>; 148 pinctrl-names = "default"; 149 status = "okay"; 150 151 ccs811: ccs811@5a { 152 compatible = "ams,ccs811"; 153 reg = <0x5a>; 154 supply-gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>; 155 irq-gpios = <&gpiof 13 GPIO_ACTIVE_LOW>; 156 wake-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>; 157 }; 158 159 /* This set selects for ENV_I2C supporting Si7021, Si11330, BMP280 */ 160 /* 161 location-sda = <GECKO_LOCATION(17) GECKO_PORT_C GECKO_PIN(4)>; 162 location-scl = <GECKO_LOCATION(17) GECKO_PORT_C GECKO_PIN(5)>; 163 */ 164 165 /* This set selects for HALL_I2C supporting Si7210 */ 166 /* 167 location-sda = <GECKO_LOCATION(8) GECKO_PORT_B GECKO_PIN(8)>; 168 location-scl = <GECKO_LOCATION(8) GECKO_PORT_B GECKO_PIN(9)>; 169 */ 170}; 171 172&rtcc0 { 173 prescaler = <1>; 174 status = "okay"; 175}; 176 177&timer0 { 178 status = "okay"; 179 180 pwm0: pwm { 181 status = "okay"; 182 pin-location = <GECKO_LOCATION(17) GECKO_PORT_D GECKO_PIN(9)>; 183 prescaler = <1024>; 184 }; 185}; 186 187&gpio { 188 location-swo = <0>; 189 status = "okay"; 190}; 191 192&gpioa { 193 status = "okay"; 194}; 195 196&gpiod { 197 status = "okay"; 198}; 199 200&gpiof { 201 status = "okay"; 202}; 203 204&gpiok { 205 status = "okay"; 206}; 207 208&wdog0 { 209 status = "okay"; 210}; 211 212&wdog1 { 213 status = "okay"; 214}; 215 216&flash0 { 217 218 partitions { 219 compatible = "fixed-partitions"; 220 #address-cells = <1>; 221 #size-cells = <1>; 222 223 /* Set 6Kb of storage at the end of the 1024Kb of flash */ 224 storage_partition: partition@fe800 { 225 label = "storage"; 226 reg = <0x000fe800 0x00001800>; 227 }; 228 229 }; 230}; 231 232&trng0 { 233 status = "okay"; 234}; 235