1/* 2 * Copyright (c) 2023 Antmicro <www.antmicro.com> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7#include <arm/armv7-m.dtsi> 8#include <zephyr/dt-bindings/gpio/gpio.h> 9#include <zephyr/dt-bindings/i2c/i2c.h> 10#include "gpio_gecko.h" 11 12/ { 13 chosen { 14 zephyr,entropy = &trng0; 15 zephyr,flash-controller = &msc; 16 }; 17 18 cpus { 19 #address-cells = <1>; 20 #size-cells = <0>; 21 22 cpu0: cpu@0 { 23 compatible = "arm,cortex-m4f"; 24 reg = <0>; 25 }; 26 }; 27 28 sram0: memory@20000000 { 29 compatible = "mmio-sram"; 30 }; 31 32 soc { 33 msc: flash-controller@40000000 { 34 compatible = "silabs,gecko-flash-controller"; 35 reg = <0x40000000 0x110>; 36 interrupts = <33 0>; 37 38 #address-cells = <1>; 39 #size-cells = <1>; 40 41 flash0: flash@0 { 42 compatible = "soc-nv-flash"; 43 write-block-size = <4>; 44 erase-block-size = <4096>; 45 }; 46 }; 47 48 rtcc0: rtcc@40062000 { /* RTCC0 */ 49 compatible = "silabs,gecko-rtcc"; 50 reg = <0x40062000 0x184>; 51 interrupts = <31 0>; 52 clock-frequency = <32768>; 53 prescaler = <1>; 54 status = "disabled"; 55 }; 56 57 uart0: uart@40014000 { /* UART0 */ 58 compatible = "silabs,gecko-uart"; 59 reg = <0x40014000 0x400>; 60 interrupts = <21 0 22 0>; 61 interrupt-names = "rx", "tx"; 62 peripheral-id = <0>; 63 status = "disabled"; 64 }; 65 66 uart1: uart@40014400 { /* UART1 */ 67 compatible = "silabs,gecko-uart"; 68 reg = <0x40014400 0x400>; 69 interrupts = <23 0 24 0>; 70 interrupt-names = "rx", "tx"; 71 peripheral-id = <1>; 72 status = "disabled"; 73 }; 74 75 usart0: usart@40010000 { /* USART0 */ 76 compatible = "silabs,gecko-usart"; 77 reg = <0x40010000 0x400>; 78 interrupts = <6 0 7 0>; 79 interrupt-names = "rx", "tx"; 80 peripheral-id = <0>; 81 status = "disabled"; 82 }; 83 84 usart1: usart@40010400 { /* USART1 */ 85 compatible = "silabs,gecko-usart"; 86 reg = <0x40010400 0x400>; 87 interrupts = <17 0 18 0>; 88 interrupt-names = "rx", "tx"; 89 peripheral-id = <1>; 90 status = "disabled"; 91 }; 92 93 usart2: usart@40010800 { /* USART2 */ 94 compatible = "silabs,gecko-usart"; 95 reg = <0x40010800 0x400>; 96 interrupts = <19 0 20 0>; 97 interrupt-names = "rx", "tx"; 98 peripheral-id = <2>; 99 status = "disabled"; 100 }; 101 102 usart3: usart@40010c00 { /* USART3 */ 103 compatible = "silabs,gecko-usart"; 104 reg = <0x40010c00 0x400>; 105 interrupts = <37 0 38 0>; 106 interrupt-names = "rx", "tx"; 107 peripheral-id = <3>; 108 status = "disabled"; 109 }; 110 111 usart4: usart@40011000 { /* USART4 */ 112 compatible = "silabs,gecko-usart"; 113 reg = <0x40011000 0x400>; 114 interrupts = <39 0 40 0>; 115 interrupt-names = "rx", "tx"; 116 peripheral-id = <4>; 117 status = "disabled"; 118 }; 119 120 leuart0: leuart@4006a000 { /* LEUART0 */ 121 compatible = "silabs,gecko-leuart"; 122 reg = <0x4006a000 0x400>; 123 interrupts = <25 0>; 124 peripheral-id = <0>; 125 status = "disabled"; 126 }; 127 128 leuart1: leuart@4006a400 { /* LEUART1 */ 129 compatible = "silabs,gecko-leuart"; 130 reg = <0x4006a400 0x400>; 131 interrupts = <26 0>; 132 peripheral-id = <1>; 133 status = "disabled"; 134 }; 135 136 i2c0: i2c@40089000 { 137 compatible = "silabs,gecko-i2c"; 138 clock-frequency = <I2C_BITRATE_STANDARD>; 139 #address-cells = <1>; 140 #size-cells = <0>; 141 reg = <0x40089000 0x400>; 142 interrupts = <11 0>; 143 status = "disabled"; 144 }; 145 146 i2c1: i2c@40089400 { 147 compatible = "silabs,gecko-i2c"; 148 clock-frequency = <I2C_BITRATE_STANDARD>; 149 #address-cells = <1>; 150 #size-cells = <0>; 151 reg = <0x40089400 0x400>; 152 interrupts = <12 0>; 153 status = "disabled"; 154 }; 155 156 gpio: gpio@40088400 { 157 compatible = "silabs,gecko-gpio"; 158 reg = <0x40088400 0xc00>; 159 interrupts = <3 2 13 2>; 160 interrupt-names = "GPIO_EVEN", "GPIO_ODD"; 161 162 ranges; 163 #address-cells = <1>; 164 #size-cells = <1>; 165 166 gpioa: gpio@40088000 { 167 compatible = "silabs,gecko-gpio-port"; 168 reg = <0x40088000 0x30>; 169 peripheral-id = <0>; 170 gpio-controller; 171 #gpio-cells = <2>; 172 status = "disabled"; 173 }; 174 175 gpiob: gpio@40088030 { 176 compatible = "silabs,gecko-gpio-port"; 177 reg = <0x40088030 0x30>; 178 peripheral-id = <1>; 179 gpio-controller; 180 #gpio-cells = <2>; 181 status = "disabled"; 182 }; 183 184 gpioc: gpio@40088060 { 185 compatible = "silabs,gecko-gpio-port"; 186 reg = <0x40088060 0x30>; 187 peripheral-id = <2>; 188 gpio-controller; 189 #gpio-cells = <2>; 190 status = "disabled"; 191 }; 192 193 gpiod: gpio@40088090 { 194 compatible = "silabs,gecko-gpio-port"; 195 reg = <0x40088090 0x30>; 196 peripheral-id = <3>; 197 gpio-controller; 198 #gpio-cells = <2>; 199 status = "disabled"; 200 }; 201 202 gpioe: gpio@400880c0 { 203 compatible = "silabs,gecko-gpio-port"; 204 reg = <0x400880c0 0x30>; 205 peripheral-id = <4>; 206 gpio-controller; 207 #gpio-cells = <2>; 208 status = "disabled"; 209 }; 210 211 gpiof: gpio@400880f0 { 212 compatible = "silabs,gecko-gpio-port"; 213 reg = <0x400880f0 0x30>; 214 peripheral-id = <5>; 215 gpio-controller; 216 #gpio-cells = <2>; 217 status = "disabled"; 218 }; 219 }; 220 221 trng0: trng@4001d000 { 222 compatible = "silabs,gecko-trng"; 223 reg = <0x4001d000 0x400>; 224 interrupts = <57 0>; 225 status = "disabled"; 226 }; 227 228 wdog0: wdog@40052000 { 229 compatible = "silabs,gecko-wdog"; 230 reg = <0x40052000 0x2C>; 231 peripheral-id = <0>; 232 interrupts = <1 0>; 233 status = "disabled"; 234 }; 235 236 wdog1: wdog@40052400 { 237 compatible = "silabs,gecko-wdog"; 238 reg = <0x40052400 0x2C>; 239 peripheral-id = <1>; 240 interrupts = <55 0>; 241 status = "disabled"; 242 }; 243 244 pinctrl: pin-controller { 245 /* Pin controller is a "virtual" device since SiLabs SoCs do pin 246 * control in a distributed way (GPIO registers and PSEL 247 * registers on each peripheral). 248 */ 249 compatible = "silabs,gecko-pinctrl"; 250 }; 251 }; 252}; 253 254&nvic { 255 arm,num-irq-priority-bits = <3>; 256}; 257