1/*
2 * Copyright (c) 2019 Brett Witherspoon
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include <ti/cc1352r.dtsi>
10#include "boosterpack_connector.dtsi"
11#include "cc1352r1_launchxl-pinctrl.dtsi"
12#include <zephyr/dt-bindings/input/input-event-codes.h>
13
14#define BTN_GPIO_FLAGS (GPIO_ACTIVE_LOW | GPIO_PULL_UP)
15
16/ {
17	model = "TI CC1352R1 LaunchXL";
18	compatible = "ti,launchxl-cc1352r1";
19
20	aliases {
21		led0 = &led0;
22		led1 = &led1;
23		sw0 = &btn0;
24		sw1 = &btn1;
25		watchdog0 = &wdt0;
26		mcuboot-led0 = &led1;
27		mcuboot-button0 = &btn1;
28	};
29
30	chosen {
31		zephyr,sram = &sram0;
32		zephyr,flash = &flash0;
33		zephyr,console = &uart0;
34		zephyr,shell-uart = &uart0;
35		zephyr,ieee802154 = &ieee802154;
36		zephyr,code-partition = &slot0_partition;
37	};
38
39	leds {
40		compatible = "gpio-leds";
41		led0: led_0 {
42			gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
43			label = "Green LED";
44		};
45		led1: led_1 {
46			gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
47			label = "Red LED";
48		};
49	};
50
51	keys {
52		compatible = "gpio-keys";
53		btn0: btn_0 {
54			gpios = <&gpio0 15 BTN_GPIO_FLAGS>;
55			label = "Push button 1";
56			zephyr,code = <INPUT_KEY_0>;
57		};
58		btn1: btn_1 {
59			gpios = <&gpio0 14 BTN_GPIO_FLAGS>;
60			label = "Push button 2";
61			zephyr,code = <INPUT_KEY_1>;
62		};
63	};
64};
65
66&flash0 {
67	partitions {
68		/* 40 KiB (0xa000) for MCUboot */
69		boot_partition: partition@0 {
70			label = "mcuboot";
71			reg = <0x00000000 0x0000a000>;
72		};
73
74		/* 136 KiB (0x22000) per slot for application */
75		slot0_partition: partition@a000 {
76			label = "image-0";
77			reg = <0x0000a000 0x00022000>;
78		};
79
80		slot1_partition: partition@2c000 {
81			label = "image-1";
82			reg = <0x0002c000 0x00022000>;
83		};
84
85		/* 32 KiB (0x8000) for storage */
86		storage_partition: partition@4e000 {
87			label = "storage";
88			reg = <0x0004e000 0x00008000>;
89		};
90
91		/* CCFG (customer configuration area) is located in uppermost
92		 * flash sector (0x2000/8 KiB @ 0x56000), keep it unused.
93		 */
94	};
95};
96
97&cpu0 {
98	clock-frequency = <48000000>;
99};
100
101&trng {
102	status = "okay";
103};
104
105&gpio0 {
106	status = "okay";
107};
108
109&adc0 {
110	status = "okay";
111};
112
113&uart0 {
114	status = "okay";
115	current-speed = <115200>;
116	pinctrl-0 = <&uart0_rx_default &uart0_tx_default>;
117	pinctrl-names = "default";
118};
119
120&i2c0 {
121	status = "okay";
122	pinctrl-0 = <&i2c0_scl_default &i2c0_sda_default>;
123	pinctrl-1 = <&i2c0_scl_sleep &i2c0_sda_sleep>;
124	pinctrl-names = "default", "sleep";
125};
126
127&spi0 {
128	status = "okay";
129	pinctrl-0 = <&spi0_sck_default &spi0_mosi_default
130				 &spi0_miso_default &spi0_cs_default>;
131	pinctrl-names = "default";
132	cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
133};
134
135&radio {
136	status = "okay";
137};
138
139&ieee802154 {
140	status = "okay";
141};
142
143&ieee802154g {
144	status = "disabled";
145};
146
147&wdt0 {
148	status = "okay";
149};
150