-
Notifications
You must be signed in to change notification settings - Fork 1
/
hivescale-dk.overlay
104 lines (87 loc) · 1.97 KB
/
hivescale-dk.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
/*
* Copyright (c) 2023 Achim Kraus CloudCoap.net
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http: //www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
/*
* Usage:
*
* west build -d build_nrf9160dk_nrf9160_ns -b nrf9160dk_nrf9160_ns --pristine -- \
* -DOVERLAY_CONFIG="hivescale-prj.conf" -DDTC_OVERLAY_FILE="hivescale-dk.overlay"
*/
#include "boards/nrf9160dk_nrf9160_ns.overlay"
&pinctrl {
i2c1_default: i2c1_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 23)>,
<NRF_PSEL(TWIM_SCL, 0, 24)>;
};
};
i2c1_sleep: i2c1_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 23)>,
<NRF_PSEL(TWIM_SCL, 0, 24)>;
low-power-enable;
};
};
};
/ {
/* Map the devices to the aliases of the application. */
aliases {
scale-a = &scale_a;
scale-b = &scale_b;
};
};
&uart1 {
status = "disabled";
};
&i2c1 {
compatible = "nordic,nrf-twim";
status = "okay";
pinctrl-0 = <&i2c1_default>;
pinctrl-1 = <&i2c1_sleep>;
pinctrl-names = "default", "sleep";
clock-frequency = <I2C_BITRATE_STANDARD>;
eeprom_a: eeprom@50 {
/* AT24HC04B (4 kbit eeprom 512x8 bit) */
compatible = "atmel,at24";
reg = <0x50>;
size = <512>;
pagesize = <16>;
address-width = <8>;
timeout = <5>;
};
scale_a: scale@2a {
compatible = "nau7802-scale";
reg = <0x2a>;
avref_mv = <2700>;
gain = <64>;
calibration_storage = <&eeprom_a>;
};
};
&i2c2 {
clock-frequency = <I2C_BITRATE_STANDARD>;
eeprom_b: eeprom@50 {
/* AT24HC04B (4 kbit eeprom 512x8 bit) */
compatible = "atmel,at24";
reg = <0x50>;
size = <512>;
pagesize = <16>;
address-width = <8>;
timeout = <5>;
};
scale_b: scale@2a {
compatible = "nau7802-scale";
reg = <0x2a>;
avref_mv = <2700>;
gain = <64>;
calibration_storage = <&eeprom_b>;
};
};