|
| 1 | +/* |
| 2 | + * Copyright (c) 2020 Erik Larson |
| 3 | + * Copyright (c) 2020-2022 Jason Kridner, BeagleBoard.org Foundation |
| 4 | + * |
| 5 | + * SPDX-License-Identifier: Apache-2.0 |
| 6 | + */ |
| 7 | + |
| 8 | +/dts-v1/; |
| 9 | + |
| 10 | +#include <ti/cc1352r7.dtsi> |
| 11 | +#include "beagleconnect_freedom-pinctrl.dtsi" |
| 12 | + |
| 13 | +#define BTN_GPIO_FLAGS (GPIO_ACTIVE_LOW | GPIO_PULL_UP) |
| 14 | + |
| 15 | +/ { |
| 16 | + model = "BeagleConnect Freedom"; |
| 17 | + compatible = "beagle,beagleconnect-freedom"; |
| 18 | + |
| 19 | + aliases { |
| 20 | + led0 = &led0; |
| 21 | + sw0 = &button0; |
| 22 | + mcuboot-button0 = &button0; |
| 23 | + sensor0 = &light; |
| 24 | + sensor1 = &humidity; |
| 25 | + spi-flash0 = &spi_flash0; |
| 26 | + }; |
| 27 | + |
| 28 | + chosen { |
| 29 | + zephyr,sram = &sram0; |
| 30 | + zephyr,console = &uart0; |
| 31 | + zephyr,shell-uart = &uart0; |
| 32 | + zephyr,flash = &flash0; |
| 33 | + zephyr,ieee802154 = &ieee802154g; |
| 34 | + zephyr,code-partition = &slot0_partition; |
| 35 | + }; |
| 36 | + |
| 37 | + gpio_keys { |
| 38 | + compatible = "gpio-keys"; |
| 39 | + button0: button_0 { |
| 40 | + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; |
| 41 | + }; |
| 42 | + }; |
| 43 | + |
| 44 | + leds: leds { |
| 45 | + compatible = "gpio-leds"; |
| 46 | + led0: led_0 { |
| 47 | + gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>; // 2.4GHz TX/RX |
| 48 | + }; |
| 49 | + |
| 50 | + /* U.FL connector switch */ |
| 51 | + rf_sw: rf_sw { |
| 52 | + gpios = |
| 53 | + <&gpio0 29 GPIO_ACTIVE_HIGH>, // SubG TX +20dB |
| 54 | + <&gpio0 30 GPIO_ACTIVE_HIGH>; // SubG TX/RX 0dB |
| 55 | + }; |
| 56 | + }; |
| 57 | + |
| 58 | + sens_i2c: sensor-switch { |
| 59 | + status = "okay"; |
| 60 | + compatible = "ti,ts5a2066"; |
| 61 | + #address-cells = <1>; |
| 62 | + #size-cells = <0>; |
| 63 | + controller = <&i2c0>; |
| 64 | + gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; |
| 65 | + |
| 66 | + light: opt3001-light@44 { |
| 67 | + status = "okay"; |
| 68 | + compatible = "ti,opt3001"; |
| 69 | + reg = <0x44>; |
| 70 | + }; |
| 71 | + |
| 72 | + humidity: hdc2010-humidity@41 { |
| 73 | + status = "okay"; |
| 74 | + compatible = "ti,hdc2010"; |
| 75 | + reg = <0x41>; |
| 76 | + }; |
| 77 | + }; |
| 78 | + |
| 79 | + power-states { |
| 80 | + idle: idle { |
| 81 | + compatible = "zephyr,power-state"; |
| 82 | + power-state-name = "suspend-to-idle"; |
| 83 | + min-residency-us = <1000>; |
| 84 | + }; |
| 85 | + |
| 86 | + standby: standby { |
| 87 | + compatible = "zephyr,power-state"; |
| 88 | + power-state-name = "standby"; |
| 89 | + min-residency-us = <5000>; |
| 90 | + exit-latency-us = <240>; |
| 91 | + }; |
| 92 | + }; |
| 93 | +}; |
| 94 | + |
| 95 | +&flash0 { |
| 96 | + partitions { |
| 97 | + compatible = "fixed-partitions"; |
| 98 | + #address-cells = <1>; |
| 99 | + #size-cells = <1>; |
| 100 | + |
| 101 | + /* Allocate 128 KiB for mcuboot */ |
| 102 | + boot_partition: partition@0 { |
| 103 | + label = "mcuboot"; |
| 104 | + reg = <0x00000000 0x00020000>; |
| 105 | + }; |
| 106 | + |
| 107 | + /* Allocate 568 KiB for application (avoid touching CCFG) */ |
| 108 | + slot0_partition: partition@20000 { |
| 109 | + label = "image-0"; |
| 110 | + reg = <0x00020000 0x0008e000>; |
| 111 | + }; |
| 112 | + }; |
| 113 | +}; |
| 114 | + |
| 115 | +&cpu0 { |
| 116 | + clock-frequency = <48000000>; |
| 117 | + cpu-power-states = <&idle &standby>; |
| 118 | +}; |
| 119 | + |
| 120 | +&trng { |
| 121 | + status = "okay"; |
| 122 | +}; |
| 123 | + |
| 124 | +&gpio0 { |
| 125 | + status = "okay"; |
| 126 | +}; |
| 127 | + |
| 128 | +/* Side away from battery connector (with MSP430) */ |
| 129 | +&uart0 { |
| 130 | + status = "okay"; |
| 131 | + current-speed = <115200>; |
| 132 | + pinctrl-0 = <&uart0_rx_default &uart0_tx_default>; |
| 133 | + pinctrl-names = "default"; |
| 134 | +}; |
| 135 | + |
| 136 | +/* Side with battery connector (with CC1352 and not MSP430) */ |
| 137 | +&uart1 { |
| 138 | + status = "okay"; |
| 139 | + current-speed = <115200>; |
| 140 | + pinctrl-0 = <&uart1_rx_default &uart1_tx_default>; |
| 141 | + pinctrl-names = "default"; |
| 142 | +}; |
| 143 | + |
| 144 | +&i2c0 { |
| 145 | + status = "okay"; |
| 146 | + clock-frequency = <I2C_BITRATE_FAST>; |
| 147 | + pinctrl-0 = <&i2c0_scl_default &i2c0_sda_default>; |
| 148 | + pinctrl-1 = <&i2c0_scl_sleep &i2c0_sda_sleep>; |
| 149 | + pinctrl-names = "default", "sleep"; |
| 150 | + |
| 151 | + mcu: msp430-usbbridge@4 { |
| 152 | + compatible = "beagle,usbbridge"; |
| 153 | + reg = <0x4>; |
| 154 | + }; |
| 155 | +}; |
| 156 | + |
| 157 | +&spi0 { |
| 158 | + status = "okay"; |
| 159 | + pinctrl-0 = <&spi0_sck_default &spi0_mosi_default |
| 160 | + &spi0_miso_default &spi0_cs0_default |
| 161 | + &spi0_cs1_default &spi0_cs2_default>; |
| 162 | + pinctrl-names = "default"; |
| 163 | + cs-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>, // SPI flash |
| 164 | + <&gpio0 28 GPIO_ACTIVE_LOW>, // mikroBUS port 1 |
| 165 | + <&gpio0 27 GPIO_ACTIVE_LOW>; // mikroBUS port 2 |
| 166 | + |
| 167 | + spi_flash0: gd25q16c@0 { |
| 168 | + compatible = "jedec,spi-nor"; |
| 169 | + reg = <0>; |
| 170 | + spi-max-frequency = <2000000>; |
| 171 | + size = <0x200000>; |
| 172 | + //has-be32k; |
| 173 | + has-dpd; |
| 174 | + t-enter-dpd = <20000>; |
| 175 | + t-exit-dpd = <100000>; |
| 176 | + jedec-id = [c8 40 15]; |
| 177 | + |
| 178 | + partitions { |
| 179 | + compatible = "fixed-partitions"; |
| 180 | + #address-cells = <1>; |
| 181 | + #size-cells = <1>; |
| 182 | + |
| 183 | + /* Allocate 568 KiB for application */ |
| 184 | + slot1_partition: partition@0 { |
| 185 | + label = "image-1"; |
| 186 | + reg = <0x00000000 0x0008e000>; |
| 187 | + }; |
| 188 | + |
| 189 | + /* Allocate 128 KiB scratch for image swap */ |
| 190 | + scratch_partition: partition@8e000 { |
| 191 | + label = "image-scratch"; |
| 192 | + reg = <0x0008e000 0x00020000>; |
| 193 | + }; |
| 194 | + |
| 195 | + /* Allocate 1 MiB storage partition */ |
| 196 | + storage_partition: partition@ae000 { |
| 197 | + label = "storage"; |
| 198 | + reg = <0x000ae000 DT_SIZE_K(1024)>; |
| 199 | + }; |
| 200 | + }; |
| 201 | + }; |
| 202 | +}; |
| 203 | + |
| 204 | +&rtc { |
| 205 | + status = "okay"; |
| 206 | +}; |
| 207 | + |
| 208 | +&ieee802154 { |
| 209 | + status = "okay"; |
| 210 | +}; |
| 211 | + |
| 212 | +&ieee802154g { |
| 213 | + status = "okay"; |
| 214 | +}; |
0 commit comments