1/*
2 * Copyright (c) 2019 Brett Witherspoon
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include <ti/cc2652r.dtsi>
10#include "boosterpack_connector.dtsi"
11#include "cc26x2r1_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 CC26x2R1 LaunchXL";
18	compatible = "ti,launchxl-cc26x2r1";
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,code-partition = &slot0_partition;
36	};
37
38	leds {
39		compatible = "gpio-leds";
40		led0: led_0 {
41			gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
42			label = "Green LED";
43		};
44		led1: led_1 {
45			gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
46			label = "Red LED";
47		};
48	};
49
50	keys {
51		compatible = "gpio-keys";
52		btn0: btn_0 {
53			gpios = <&gpio0 13 BTN_GPIO_FLAGS>;
54			label = "Push button 1";
55			zephyr,code = <INPUT_KEY_0>;
56		};
57		btn1: btn_1 {
58			gpios = <&gpio0 14 BTN_GPIO_FLAGS>;
59			label = "Push button 2";
60			zephyr,code = <INPUT_KEY_1>;
61		};
62	};
63};
64
65&flash0 {
66	partitions {
67		/* 40 KiB (0xa000) for MCUboot */
68		boot_partition: partition@0 {
69			label = "mcuboot";
70			reg = <0x00000000 0x0000a000>;
71		};
72
73		/* 136 KiB (0x22000) per slot for application */
74		slot0_partition: partition@a000 {
75			label = "image-0";
76			reg = <0x0000a000 0x00022000>;
77		};
78
79		slot1_partition: partition@2c000 {
80			label = "image-1";
81			reg = <0x0002c000 0x00022000>;
82		};
83
84		/* 32 KiB (0x8000) for storage */
85		storage_partition: partition@4e000 {
86			label = "storage";
87			reg = <0x0004e000 0x00008000>;
88		};
89
90		/* CCFG (customer configuration area) is located in uppermost
91		 * flash sector (0x2000/8 KiB @ 0x56000), keep it unused.
92		 */
93	};
94};
95
96&cpu0 {
97	clock-frequency = <48000000>;
98};
99
100&trng {
101	status = "okay";
102};
103
104&gpio0 {
105	status = "okay";
106};
107
108&adc0 {
109	status = "okay";
110};
111
112&uart0 {
113	status = "okay";
114	current-speed = <115200>;
115	pinctrl-0 = <&uart0_rx_default &uart0_tx_default>;
116	pinctrl-names = "default";
117};
118
119&i2c0 {
120	status = "okay";
121	pinctrl-0 = <&i2c0_scl_default &i2c0_sda_default>;
122	pinctrl-1 = <&i2c0_scl_sleep &i2c0_sda_sleep>;
123	pinctrl-names = "default", "sleep";
124};
125
126&spi0 {
127	status = "okay";
128	pinctrl-0 = <&spi0_sck_default &spi0_mosi_default
129				 &spi0_miso_default &spi0_cs_default>;
130	pinctrl-names = "default";
131
132	cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
133};
134
135&wdt0 {
136	status = "okay";
137};
138