/
0082-beaglebone-Add-nixie-cape-device-tree-entry.patch
183 lines (175 loc) · 4.44 KB
/
0082-beaglebone-Add-nixie-cape-device-tree-entry.patch
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
182
From 44672d4eb47cd81974f8ac453219ca92531853fe Mon Sep 17 00:00:00 2001
From: Matt Ranostay <mranostay@gmail.com>
Date: Tue, 22 Jan 2013 10:09:48 -0800
Subject: [PATCH 082/184] beaglebone: Add nixie cape device tree entry
Added nixie dt overlays, PWM, and leds definitions to am355x-bone-common
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
---
arch/arm/boot/dts/am335x-bone-common.dtsi | 19 ++++++
firmware/Makefile | 4 ++
firmware/capes/cape-bone-nixie-00A0.dts | 107 ++++++++++++++++++++++++++++++
3 files changed, 130 insertions(+)
create mode 100644 firmware/capes/cape-bone-nixie-00A0.dts
diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
index bf863bd..c45daa2 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -181,6 +181,17 @@
manufacturer = "Texas Instruments";
part-number = "BB-BONELT-HDMI";
};
+
+ /* Nixie cape version A0 without an EEPROM */
+ slot@7 {
+ ti,cape-override;
+ compatible = "kernel-command-line", "runtime";
+ board-name = "Bone-Nixie";
+ version = "00A0";
+ manufacturer = "Ranostay Industries";
+ part-number = "BB-BONE-NIXIE";
+ };
+
};
/* mapping between board names and dtb objects */
@@ -249,6 +260,14 @@
};
};
+ /* nixie cape */
+ cape@6 {
+ part-number = "BB-BONE-NIXIE";
+ version@00A0 {
+ version = "00A0";
+ dtbo = "cape-bone-nixie-00A0.dtbo";
+ };
+ };
};
};
};
diff --git a/firmware/Makefile b/firmware/Makefile
index f8c4a9e..efe2b90 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -150,6 +150,10 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \
fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \
cape-bone-geiger-00A0.dtbo
+# the nixie cape
+fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_NIXIE) += \
+ cape-bone-nixie-00A0.dtbo
+
# the weather cape
fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += cape-bone-weather-00A0.dtbo
diff --git a/firmware/capes/cape-bone-nixie-00A0.dts b/firmware/capes/cape-bone-nixie-00A0.dts
new file mode 100644
index 0000000..7ec2c46
--- /dev/null
+++ b/firmware/capes/cape-bone-nixie-00A0.dts
@@ -0,0 +1,107 @@
+/*
+* Copyright (C) 2013 Matt Ranostay <mranostay@gmail.com>
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License version 2 as
+* published by the Free Software Foundation.
+*/
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "ti,beaglebone", "ti,beaglebone-black";
+
+ /* identification */
+ part-number = "BB-BONE-NIXIE";
+ version = "00A0";
+
+ fragment@0 {
+ target = <&am33xx_pinmux>;
+ __overlay__ {
+
+ bone_nixie_cape_led_pins: pinmux_bone_nixie_cape_led_pins {
+ pinctrl-single,pins = <
+ 0x1ac 0x07 /* mcasp0_ahclkx.gpio3_21, MODE7 */
+ >;
+ };
+
+ bone_nixie_cape_pins: pinmux_bone_nixie_cape_pins {
+ pinctrl-single,pins = <
+ 0x0a0 0x03 /* lcd_data0.gpio2_6 | MODE3 */
+ 0x0a4 0x03 /* lcd_data1.gpio2_7 | MODE3 */
+ >;
+ };
+
+ pruss_pins: pinmux_pruss_pins {
+ pinctrl-single,pins = <
+ 0x190 0x05 /* mcasp0_aclkx.pr1_pru0_pru_r30_0, MODE5 | DATA */
+ 0x194 0x05 /* mcasp0_fsx.pr1_pru0_pru_r30_1, MODE5 | LATCH */
+ 0x1a4 0x05 /* mcasp0_fsr.pr1_pru1_pru_r30_5, MODE5 | CLK */
+ >;
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&epwmss2>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@1 {
+ target = <&ehrpwm2>;
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@3 {
+ target = <&ocp>;
+ __overlay__ {
+
+ /* avoid stupid warning */
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ gpio-leds-cape-nixie {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&bone_nixie_cape_led_pins>;
+
+ nixie-led0 {
+ label = "nixie:green:usr0";
+ gpios = <&gpio4 21 0>;
+ linux,default-trigger = "nixie-run";
+ default-state = "off";
+ };
+ };
+
+ bone-cape-nixie {
+ compatible = "bone-cape-nixie";
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&bone_nixie_cape_pins>;
+
+ pwms = <&ehrpwm2 0 500000 0>;
+ pwm-names = "bone-nixie-cape";
+
+ pwm-frequency = <9250>; /* 9.250KHz */
+ pwm-duty-cycle = <35>; /* 35% */
+
+ default-brightness = <35>; /* 35% */
+ };
+ };
+ };
+
+ fragment@4 {
+ target = <&pruss>;
+ __overlay__ {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pruss_pins>;
+ };
+ };
+};
--
1.8.2.1