-
-
Notifications
You must be signed in to change notification settings - Fork 192
/
rpi-rf-mod.dts
97 lines (89 loc) · 2.9 KB
/
rpi-rf-mod.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
/dts-v1/;
/plugin/;
/*
** Device Tree Overlay for eQ-3 RPI-RF-MOD and
** HM-MOD-RPI-PCB for RaspberryPi
**
** Copyright (c) 2018-2023 Jens Maus <mail@jens-maus.de>
** Licensed under Apache 2.0
**
*/
/ {
compatible = "brcm,bcm2708";
// fragment to ensure we have the correct gpio pin
// setup for the RPI-RF-MOD
fragment@0 {
target = <&gpio>;
__overlay__ {
rpi_rf_mod_pins: rpi_rf_mod_pins {
brcm,pins = <19 18 12 16 20 21>; // 19=reset, 18=reset (HM-MOD), 12=button, 16=red, 20=green, 21=blue
brcm,pull = <0 0 2 0 0 0>; // 19,18=no-pullup, 12=pullup, 16,20,21=no-pullup
brcm,function = <0 0 0 1 1 1>; // 19,18,12=input, 16,20,21=output
};
};
};
// fragment to define dedicated led nodes for
// each separate led supported by the RPI-RF-MOD
fragment@1 {
target = <&leds>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&rpi_rf_mod_pins>;
rpi_rf_mod_red: rpi_rf_mod_red {
label = "rpi_rf_mod:red";
gpios = <&gpio 16 0>;
default-state = "keep";
linux,default-trigger = "none";
};
rpi_rf_mod_green: rpi_rf_mod_green {
label = "rpi_rf_mod:green";
gpios = <&gpio 20 0>;
default-state = "keep";
linux,default-trigger = "none";
};
rpi_rf_mod_blue: rpi_rf_mod_blue {
label = "rpi_rf_mod:blue";
gpios = <&gpio 21 0>;
default-state = "keep";
linux,default-trigger = "none";
};
};
};
// fragment to define settings for the rx8130 RTC clock
// of the RPI-RF-MOD
fragment@2 {
target = <&i2c1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
};
};
};
// fragment to define uart/serial dependencies for
// generic_raw_uart
fragment@3 {
target = <&uart0>;
__overlay__ {
compatible = "pivccu,pl011";
status = "okay";
pivccu,reset-gpios = <&gpio 18 0>, <&gpio 19 0>; // HM-MOD-RPI-PCB, RPI-RF-MOD
pivccu,led-gpios = <&gpio 16 0>, <&gpio 20 0>, <&gpio 21 0>; // RPI-RF-MOD
pivccu,rtc = <&rpi_rf_mod_rtc>; // RPI-RF-MOD
};
};
// fragment to make sure that stdout-path under chosen
// is empty so that the above uart0 fragment does not
// interfere with u-boot trying to access serial drivers.
fragment@4 {
target = <&chosen>;
__overlay__ {
stdout-path = "";
};
};
};