|
| 1 | +/* |
| 2 | + * Copyright (c) 2025 Lukas Woodtli |
| 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,flash-controller = &msc; |
| 15 | + }; |
| 16 | + |
| 17 | + cpus { |
| 18 | + #address-cells = <1>; |
| 19 | + #size-cells = <0>; |
| 20 | + |
| 21 | + cpu0: cpu@0 { |
| 22 | + compatible = "arm,cortex-m3"; |
| 23 | + reg = <0>; |
| 24 | + }; |
| 25 | + }; |
| 26 | + |
| 27 | + sram0: memory@20000000 { |
| 28 | + compatible = "mmio-sram"; |
| 29 | + }; |
| 30 | + |
| 31 | + soc { |
| 32 | + msc: flash-controller@400c0000 { |
| 33 | + compatible = "silabs,gecko-flash-controller"; |
| 34 | + reg = <0x400c0000 0x78>; |
| 35 | + interrupts = <21 0>; |
| 36 | + |
| 37 | + #address-cells = <1>; |
| 38 | + #size-cells = <1>; |
| 39 | + |
| 40 | + flash0: flash@0 { |
| 41 | + compatible = "soc-nv-flash"; |
| 42 | + write-block-size = <4>; |
| 43 | + erase-block-size = <512>; |
| 44 | + }; |
| 45 | + }; |
| 46 | + |
| 47 | + usart0: usart@4000c000 { /* USART0 */ |
| 48 | + compatible = "silabs,gecko-usart"; |
| 49 | + reg = <0x4000c000 0x400>; |
| 50 | + interrupts = <3 0>, <4 0>; |
| 51 | + interrupt-names = "rx", "tx"; |
| 52 | + peripheral-id = <0>; |
| 53 | + status = "disabled"; |
| 54 | + }; |
| 55 | + |
| 56 | + usart1: usart@4000c400 { /* USART1 */ |
| 57 | + compatible = "silabs,gecko-usart"; |
| 58 | + reg = <0x4000c400 0x400>; |
| 59 | + interrupts = <15 0>, <16 0>; |
| 60 | + interrupt-names = "rx", "tx"; |
| 61 | + peripheral-id = <1>; |
| 62 | + status = "disabled"; |
| 63 | + }; |
| 64 | + |
| 65 | + |
| 66 | + leuart0: leuart@40084000 { /* LEUART0 */ |
| 67 | + compatible = "silabs,gecko-leuart"; |
| 68 | + reg = <0x40084000 0x400>; |
| 69 | + interrupts = <24 0>; |
| 70 | + peripheral-id = <0>; |
| 71 | + status = "disabled"; |
| 72 | + }; |
| 73 | + |
| 74 | + leuart1: leuart@40084400 { /* LEUART1 */ |
| 75 | + compatible = "silabs,gecko-leuart"; |
| 76 | + reg = <0x40084400 0x400>; |
| 77 | + interrupts = <25 0>; |
| 78 | + peripheral-id = <1>; |
| 79 | + status = "disabled"; |
| 80 | + }; |
| 81 | + |
| 82 | + i2c0: i2c@4000a000 { |
| 83 | + compatible = "silabs,gecko-i2c"; |
| 84 | + clock-frequency = <I2C_BITRATE_STANDARD>; |
| 85 | + #address-cells = <1>; |
| 86 | + #size-cells = <0>; |
| 87 | + reg = <0x4000a000 0x400>; |
| 88 | + interrupts = <9 0>; |
| 89 | + status = "disabled"; |
| 90 | + }; |
| 91 | + |
| 92 | + gpio@40006100 { |
| 93 | + compatible = "silabs,gecko-gpio"; |
| 94 | + reg = <0x40006100 0xf00>; |
| 95 | + interrupts = <1 2 11 2>; |
| 96 | + interrupt-names = "GPIO_EVEN", "GPIO_ODD"; |
| 97 | + |
| 98 | + ranges; |
| 99 | + #address-cells = <1>; |
| 100 | + #size-cells = <1>; |
| 101 | + |
| 102 | + gpioa: gpio@40006000 { |
| 103 | + compatible = "silabs,gecko-gpio-port"; |
| 104 | + reg = <0x40006000 0x24>; |
| 105 | + peripheral-id = <0>; |
| 106 | + gpio-controller; |
| 107 | + #gpio-cells = <2>; |
| 108 | + status = "disabled"; |
| 109 | + }; |
| 110 | + |
| 111 | + gpiob: gpio@40006024 { |
| 112 | + compatible = "silabs,gecko-gpio-port"; |
| 113 | + reg = <0x40006024 0x24>; |
| 114 | + peripheral-id = <1>; |
| 115 | + gpio-controller; |
| 116 | + #gpio-cells = <2>; |
| 117 | + status = "disabled"; |
| 118 | + }; |
| 119 | + |
| 120 | + gpioc: gpio@40006048 { |
| 121 | + compatible = "silabs,gecko-gpio-port"; |
| 122 | + reg = <0x40006048 0x24>; |
| 123 | + peripheral-id = <2>; |
| 124 | + gpio-controller; |
| 125 | + #gpio-cells = <2>; |
| 126 | + status = "disabled"; |
| 127 | + }; |
| 128 | + |
| 129 | + gpiod: gpio@4000606c { |
| 130 | + compatible = "silabs,gecko-gpio-port"; |
| 131 | + reg = <0x4000606c 0x24>; |
| 132 | + peripheral-id = <3>; |
| 133 | + gpio-controller; |
| 134 | + #gpio-cells = <2>; |
| 135 | + status = "disabled"; |
| 136 | + }; |
| 137 | + |
| 138 | + gpioe: gpio@40006090 { |
| 139 | + compatible = "silabs,gecko-gpio-port"; |
| 140 | + reg = <0x40006090 0x24>; |
| 141 | + peripheral-id = <4>; |
| 142 | + gpio-controller; |
| 143 | + #gpio-cells = <2>; |
| 144 | + status = "disabled"; |
| 145 | + }; |
| 146 | + |
| 147 | + gpiof: gpio@400060b4 { |
| 148 | + compatible = "silabs,gecko-gpio-port"; |
| 149 | + reg = <0x400060b4 0x24>; |
| 150 | + peripheral-id = <5>; |
| 151 | + gpio-controller; |
| 152 | + #gpio-cells = <2>; |
| 153 | + status = "disabled"; |
| 154 | + }; |
| 155 | + }; |
| 156 | + |
| 157 | + pinctrl: pin-controller { |
| 158 | + /* Pin controller is a "virtual" device since SiLabs SoCs do pin |
| 159 | + * control in a distributed way (GPIO registers and PSEL |
| 160 | + * registers on each peripheral). |
| 161 | + */ |
| 162 | + compatible = "silabs,gecko-pinctrl"; |
| 163 | + }; |
| 164 | + }; |
| 165 | +}; |
| 166 | + |
| 167 | +&nvic { |
| 168 | + arm,num-irq-priority-bits = <3>; |
| 169 | +}; |
0 commit comments