-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathnrf5340dk_nrf5340_cpuapp.overlay
181 lines (153 loc) · 3.27 KB
/
nrf5340dk_nrf5340_cpuapp.overlay
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
/ {
chosen {
nordic,pm-ext-flash = &mx25r64;
};
soc {
/* Add a flash controller which has the compatible
* 'zephyr,sim-flash'. This will ensure that the flash
* simulator can use it. None of the other properties in this
* node is used for anything.
*/
nordic_ram_flash_controller: nordic_ram-flash-controller@0 {
compatible = "zephyr,sim-flash";
reg = <0x00000000 DT_SIZE_K(40)>;
#address-cells = <1>;
#size-cells = <1>;
erase-value = <0xff>;
label = "nordic_ram_flash_flash_controller";
/* This node label must match that used in the flash
* simulator.
*/
flash_sim0: flash_sim@0 {
status = "okay";
compatible = "soc-nv-flash";
label = "simulated_flash";
erase-block-size = <4096>;
write-block-size = <4>;
reg = <0x00000000 DT_SIZE_K(256)>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* This partition must be defined for
* MCUboot to find the partition ID
* of the primary slot for image 1,
* which is stored in this partition.
*/
slot2_partition: partition@0 {
label = "image-2";
reg = <0x00000000 0x00000A000>;
};
};
};
};
};
};
&i2c1 {
compatible = "nordic,nrf-twim";
status = "okay";
sda-pin = < 35 >;
scl-pin = < 34 >;
clock-frequency = <I2C_BITRATE_STANDARD>;
bme280@76 {
compatible = "bosch,bme280";
reg = <0x76>;
label = "BME280";
};
lis3mdl@1E {
compatible = "st,lis3mdl-magn";
reg = <0x1E>;
label = "LIS3MDL";
};
icg20330: icg20330@68 {
compatible = "tdk,icg20330";
reg = <0x68>;
label = "ICG20330";
};
lis2dh@19 {
compatible = "st,lis2dh";
reg = <0x19>;
label = "LIS2DH";
};
ltr303: ltr303@29 {
compatible = "ltr,303als";
reg = <0x29>;
label = "LTR303";
};
// Its either bq27520 or bq27421 battery gauge
bq27520: bq27520@55 {
compatible = "ti,bq27520";
label = "BQ27520";
reg = <0x55>;
};
// Its either bq27520 or bq27421 battery gauge
bq27421@55 {
compatible = "ti,bq274xx";
label = "BQ274XX";
reg = <0x55>;
design-voltage = <3700>;
design-capacity = <1200>;
taper-current = <45>;
terminate-voltage = <3000>;
};
};
// console uart
&uart0 {
status = "okay";
current-speed = <115200>;
tx-pin = <25>;
rx-pin = <26>;
rts-pin = <27>;
cts-pin = <24>;
};
// MaxM10S uart
&uart3 {
status = "okay";
current-speed = <9600>;//38400
tx-pin = <45>;
rx-pin = <46>;
};
// Default configuration is set on the NINA-W156 pins, the same UART is also used by SARA-R5
&uart2 {
status = "okay";
current-speed = <115200>;
tx-pin = <31>;
rx-pin = <43>;
cts-pin = <30>;
rts-pin = <20>;
hw-flow-control;
};
// Buttons
&button0 {
gpios = <&gpio0 5 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Push button 1";
};
&button1 {
gpios = <&gpio0 28 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Push button 2";
};
//PWM for Led control brightness
&pwm0 {
status = "okay";
ch0-pin = <39>;
ch1-pin = <23>;
ch2-pin = <6>;
};
// Leds at PWM channels
/{
pwmleds {
compatible = "pwm-leds";
pwm_led0: pwm_led_0 {
pwms = <&pwm0 39>;
label = "Red Led";
};
pwm_led1: pwm_led_1 {
pwms = <&pwm0 23>;
label = "Green Led";
};
pwm_led2: pwm_led_2 {
pwms = <&pwm0 6>;
label = "Blue Led";
};
};
};