-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmonarco-hat-4-9.dts
100 lines (87 loc) · 2.35 KB
/
monarco-hat-4-9.dts
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
/dts-v1/;
/plugin/;
/*
* Device Tree Overlay for the Monarco HAT version 4-9
*
* This overlay is flashed (units shipped since 2017/10) in the onboard EEPROM
* according to the HAT specification.
*
* Designed for Raspbian with Linux kernel 4.9 (changed serial* aliases paths).
*
* WARNING: Not compatible with Linux kernel 4.4 previously shipped with Raspbian,
* UART swapping and aliases are broken.
*
* Author: Vlastimil Setka
* REX Controls s.r.o.
* https://www.monarco.io
* https://github.com/monarco/
* https://www.rexcontrols.com
*/
/ {
compatible = "brcm,bcm2708";
/* Enable SPI for Monarco HAT */
fragment@1 {
target = <&spi0>;
__overlay__ {
status = "okay";
};
};
/* Enable I2C for Monarco HAT */
fragment@2 {
target = <&i2c_arm>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
mcp7941x@6f {
compatible = "microchip,mcp7941x";
reg = <0x6f>;
};
ds2482@18 {
compatible = "maxim,ds2482";
reg = <0x18>;
};
};
};
/* RPi3: switch uart0 (alias serial0) back to HAT pins, uart1 (alias serial1) for Bluetooth */
/* We can not reference &uart0_pins and &uart1_pins directly
as they are are not defined in dt before RPi 3, so we define them in &gpio */
fragment@3 {
target = <&gpio>;
__overlay__ {
uart0_pins: uart0_pins {
brcm,pins;
brcm,function;
brcm,pull;
};
uart1_pins: uart1_pins {
brcm,pins = <32 33>;
brcm,function = <2>;
brcm,pull = <0 2>;
};
};
};
fragment@4 {
target = <&uart0>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
status = "okay";
};
};
fragment@5 {
target = <&uart1>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
status = "okay";
};
};
fragment@6 {
target-path = "/aliases";
__overlay__ {
serial0 = "/soc/serial@7e201000";
serial1 = "/soc/serial@7e215040";
};
};
};