Skip to content

Commit 3ca5133

Browse files
TekkamanVesmil
authored andcommitted
riscv: dts: Add JH7100 and BeagleV Starlight support
This is the device tree from https://github.com/starfive-tech/u-boot/ Rearranged, cleanups, fixes and TPS65086 added by Emil. Cleanups, fixes and LED added by Geert. Signed-off-by: yanhong.wang <[email protected]> Signed-off-by: Huan.Feng <[email protected]> Signed-off-by: ke.zhu <[email protected]> Signed-off-by: yiming.li <[email protected]> Signed-off-by: jack.zhu <[email protected]> Signed-off-by: Samin Guo <[email protected]> Signed-off-by: Chenjieqin <[email protected]> Signed-off-by: bo.li <[email protected]> Signed-off-by: Emil Renner Berthing <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 3f82ffa commit 3ca5133

File tree

5 files changed

+1168
-1
lines changed

5 files changed

+1168
-1
lines changed

arch/riscv/boot/dts/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
subdir-y += sifive
2+
subdir-y += sifive starfive
33
subdir-$(CONFIG_SOC_CANAAN_K210_DTB_BUILTIN) += canaan
44

55
obj-$(CONFIG_BUILTIN_DTB) := $(addsuffix /, $(subdir-y))

arch/riscv/boot/dts/starfive/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
dtb-$(CONFIG_SOC_STARFIVE_VIC7100) += jh7100-starlight.dtb
Lines changed: 366 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,366 @@
1+
/dts-v1/;
2+
#include "jh7100.dtsi"
3+
#include <dt-bindings/starfive_fb.h>
4+
#include <dt-bindings/gpio/gpio.h>
5+
#include <dt-bindings/leds/common.h>
6+
7+
/ {
8+
#address-cells = <2>;
9+
#size-cells = <2>;
10+
compatible = "beagle,beaglev-starlight-jh7100";
11+
model = "BeagleV Starlight Beta";
12+
13+
aliases {
14+
serial0 = &uart3;
15+
serial1 = &uart0;
16+
};
17+
18+
chosen {
19+
stdout-path = "serial0:115200";
20+
};
21+
22+
cpus {
23+
timebase-frequency = <6250000>;
24+
};
25+
26+
leds {
27+
compatible = "gpio-leds";
28+
29+
led-ack {
30+
gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
31+
color = <LED_COLOR_ID_GREEN>;
32+
function = LED_FUNCTION_HEARTBEAT;
33+
linux,default-trigger = "heartbeat";
34+
label = "ack";
35+
};
36+
};
37+
};
38+
39+
&uart0 {
40+
status = "okay";
41+
};
42+
43+
&uart3 {
44+
status = "okay";
45+
};
46+
47+
&usb3 {
48+
dr_mode = "host";
49+
status = "okay";
50+
};
51+
52+
&i2c0 {
53+
imx219@10 {
54+
compatible = "imx219";
55+
reg = <0x10>;
56+
reset-gpio = <&gpio 58 0>;
57+
};
58+
59+
tps65086@5e {
60+
compatible = "ti,tps65086";
61+
reg = <0x5e>;
62+
/*
63+
interrupt-parent = <&gpio1>;
64+
interrupts = <28 IRQ_TYPE_LEVEL_LOW>;
65+
interrupt-controller;
66+
#interrupt-cells = <2>;
67+
*/
68+
gpio-controller;
69+
#gpio-cells = <2>;
70+
};
71+
72+
tda998x@70 {
73+
compatible = "nxp,tda998x";
74+
reg = <0x70>;
75+
};
76+
};
77+
78+
&i2c2 {
79+
seeed_plane_i2c@45 {
80+
compatible = "seeed_panel";
81+
reg = <0x45>;
82+
};
83+
};
84+
85+
&qspi {
86+
nor_flash: nor-flash@0 {
87+
compatible = "spi-flash";
88+
reg = <0>;
89+
spi-max-frequency = <31250000>;
90+
page-size = <256>;
91+
block-size = <16>;
92+
cdns,read-delay = <4>;
93+
cdns,tshsl-ns = <1>;
94+
cdns,tsd2d-ns = <1>;
95+
cdns,tchsh-ns = <1>;
96+
cdns,tslch-ns = <1>;
97+
spi-tx-bus-width = <1>;
98+
spi-rx-bus-width = <1>;
99+
};
100+
101+
nand_flash: nand-flash@1 {
102+
compatible = "spi-flash-nand";
103+
reg = <1>;
104+
spi-max-frequency = <31250000>;
105+
page-size = <2048>;
106+
block-size = <17>;
107+
cdns,read-delay = <4>;
108+
cdns,tshsl-ns = <1>;
109+
cdns,tsd2d-ns = <1>;
110+
cdns,tchsh-ns = <1>;
111+
cdns,tslch-ns = <1>;
112+
spi-tx-bus-width = <1>;
113+
spi-rx-bus-width = <1>;
114+
};
115+
};
116+
117+
&spi2 {
118+
status = "okay";
119+
120+
spi_dev0: spi@0 {
121+
compatible = "rohm,dh2228fv";
122+
spi-max-frequency = <10000000>;
123+
reg = <0>;
124+
};
125+
};
126+
127+
/*
128+
&sdio1 {
129+
bcmdhd_wlan: bcmdhd_wlan@1 {
130+
compatible = "android,bcmdhd_wlan";
131+
gpios = <&gpio 26 0>;
132+
};
133+
};
134+
*/
135+
136+
&sfivefb {
137+
/*
138+
pp1 {
139+
pp-id = <1>;
140+
fifo-out;
141+
src-format = <COLOR_YUV420_NV21>;
142+
src-width = <800>;
143+
src-height = <480>;
144+
dst-format = <COLOR_RGB888_ARGB>;
145+
dst-width = <800>;
146+
dst-height = <480>;
147+
};
148+
*/
149+
150+
tda_998x_1080p {
151+
compatible = "starfive,display-dev";
152+
panel_name = "tda_998x_1080p";
153+
panel_lcd_id = <22>; /* 1080p */
154+
interface_info = "rgb_interface";
155+
refresh_en = <1>;
156+
bits-per-pixel = <16>;
157+
physical-width = <62>;
158+
physical-height = <114>;
159+
panel-width = <1920>;
160+
panel-height = <1080>;
161+
pixel-clock = <78000000>;
162+
/*dyn_fps;*/ /*dynamic frame rate support*/
163+
164+
/*.flags = PREFER_CMD_SEND_MONOLITHIC | CE_CMD_SEND_MONOLITHIC | RESUME_WITH_PREFER | RESUME_WITH_CE*/
165+
/*gamma-command-monolithic;*/
166+
/*ce-command-monolithic;*/
167+
/*resume-with-gamma;*/
168+
/*resume-with-ce;*/
169+
170+
/*mipi info*/
171+
mipi-byte-clock = <78000>;
172+
mipi-escape-clock = <13000>;
173+
lane-no = <4>;
174+
display_mode = "video_mode"; /*video_mode, command_mode*/
175+
176+
/*
177+
auto_stop_clklane_en;
178+
im_pin_val;*/
179+
180+
color_bits = <COLOR_CODE_24BIT>;
181+
/*is_18bit_loosely;*/
182+
183+
/*video mode info*/
184+
h-pulse-width = <44>;
185+
h-back-porch = <148>;
186+
h-front-porch = <88>;
187+
v-pulse-width = <5>;
188+
v-back-porch = <36>;
189+
v-front-porch = <4>;
190+
status = "okay";
191+
sync_pol = "vsync_high_act"; /*vsync_high_act, hsync_high_act*/
192+
lp_cmd_en;
193+
/*lp_hfp_en;*/
194+
/*lp_hbp_en;*/
195+
/*lp_vact_en;*/
196+
lp_vfp_en;
197+
lp_vbp_en;
198+
lp_vsa_en;
199+
traffic-mode = "burst_with_sync_pulses"; /*non_burst_with_sync_pulses, non_burst_with_sync_events*/
200+
201+
/*phy info*/
202+
data_tprepare = /bits/ 8 <0>;
203+
data_hs_zero = /bits/ 8 <0>;
204+
data_hs_exit = /bits/ 8 <0>;
205+
data_hs_trail = /bits/ 8 <0>;
206+
207+
/*te info*/
208+
te_source = "external_pin"; /*external_pin, dsi_te_trigger*/
209+
te_trigger_mode = "rising_edge"; /*rising_edge, high_1000us*/
210+
te_enable = <0>;
211+
cm_te_effect_sync_enable = <0>; /*used in command mode*/
212+
te_count_per_sec = <64>; /*used in esd*/
213+
214+
/*ext info*/
215+
/*
216+
crc_rx_en;
217+
ecc_rx_en;
218+
eotp_rx_en;
219+
*/
220+
eotp_tx_en;
221+
222+
dev_read_time = <0x7fff>;
223+
/*type cmd return_count return_code*/
224+
/*id_read_cmd_info = [];*/
225+
/*pre_id_cmd = [];*/
226+
/*esd_read_cmd_info = [DCS_CMD 0A 01 9C];*/
227+
/*pre_esd_cmd = [];*/
228+
/*panel-on-command = [];*/
229+
/*panel-off-command = [];*/
230+
/*reset-sequence = <1 5>, <0 10>, <1 30>;*/
231+
/*
232+
panel-gamma-warm-command = [
233+
234+
];
235+
panel-gamma-nature-command = [
236+
237+
];
238+
panel-gamma-cool-command = [
239+
240+
];
241+
242+
panel-ce-std-command = [
243+
244+
];
245+
panel-ce-vivid-command = [
246+
247+
];
248+
*/
249+
};
250+
251+
seeed_5_inch {
252+
compatible = "starfive,display-dev";
253+
panel_name = "seeed_5_inch";
254+
panel_lcd_id = <22>; /* 480p */
255+
interface_info = "mipi_interface";
256+
refresh_en = <1>;
257+
bits-per-pixel = <24>;
258+
physical-width = <62>;
259+
physical-height = <114>;
260+
panel-width = <800>;
261+
panel-height = <480>;
262+
pixel-clock = <27500000>;
263+
/*dyn_fps;*/ /*dynamic frame rate support*/
264+
fps = <50>;
265+
/*.flags = PREFER_CMD_SEND_MONOLITHIC | CE_CMD_SEND_MONOLITHIC | RESUME_WITH_PREFER | RESUME_WITH_CE*/
266+
/*gamma-command-monolithic;*/
267+
/*ce-command-monolithic;*/
268+
/*resume-with-gamma;*/
269+
/*resume-with-ce;*/
270+
271+
/*mipi info*/
272+
mipi-byte-clock = <78000>;
273+
mipi-escape-clock = <13000>;
274+
lane-no = <1>;
275+
display_mode = "video_mode"; /*video_mode, command_mode*/
276+
277+
/*
278+
auto_stop_clklane_en;
279+
im_pin_val;
280+
*/
281+
282+
color_bits = <COLOR_CODE_24BIT>;
283+
/*is_18bit_loosely;*/
284+
285+
/*video mode info*/
286+
h-pulse-width = <10>;
287+
h-back-porch = <20>;
288+
h-front-porch = <50>;
289+
v-pulse-width = <5>;
290+
v-back-porch = <5>;
291+
v-front-porch = <135>;
292+
293+
/*seeed panel mode info*/
294+
dphy_bps = <700000000>;
295+
dsi_burst_mode = <0>;
296+
dsi_sync_pulse = <1>;
297+
// bytes
298+
dsi_hsa = <30>;
299+
dsi_hbp = <211>;
300+
dsi_hfp = <159>;
301+
// lines
302+
dsi_vsa = <5>;
303+
dsi_vbp = <5>;
304+
dsi_vfp = <134>;
305+
306+
status = "okay";
307+
sync_pol = "vsync_high_act"; /*vsync_high_act, hsync_high_act*/
308+
lp_cmd_en;
309+
/*lp_hfp_en;*/
310+
/*lp_hbp_en;*/
311+
/*lp_vact_en;*/
312+
lp_vfp_en;
313+
lp_vbp_en;
314+
lp_vsa_en;
315+
traffic-mode = "burst_with_sync_pulses"; /*non_burst_with_sync_pulses, non_burst_with_sync_events*/
316+
317+
/*phy info*/
318+
data_tprepare = /bits/ 8 <0>;
319+
data_hs_zero = /bits/ 8 <0>;
320+
data_hs_exit = /bits/ 8 <0>;
321+
data_hs_trail = /bits/ 8 <0>;
322+
323+
/*te info*/
324+
te_source = "external_pin"; /*external_pin, dsi_te_trigger*/
325+
te_trigger_mode = "rising_edge"; /*rising_edge, high_1000us*/
326+
te_enable = <0>;
327+
cm_te_effect_sync_enable = <0>; /*used in command mode*/
328+
te_count_per_sec = <64>; /*used in esd*/
329+
330+
/*ext info*/
331+
/*
332+
crc_rx_en;
333+
ecc_rx_en;
334+
eotp_rx_en;
335+
*/
336+
eotp_tx_en;
337+
338+
dev_read_time = <0x7fff>;
339+
/*type cmd return_count return_code*/
340+
/*id_read_cmd_info = [];*/
341+
/*pre_id_cmd = [];*/
342+
/*esd_read_cmd_info = [DCS_CMD 0A 01 9C];*/
343+
/*pre_esd_cmd = [];*/
344+
/*panel-on-command = [];*/
345+
/*panel-off-command = [];*/
346+
/*reset-sequence = <1 5>, <0 10>, <1 30>;*/
347+
/*
348+
panel-gamma-warm-command = [
349+
350+
];
351+
panel-gamma-nature-command = [
352+
353+
];
354+
panel-gamma-cool-command = [
355+
356+
];
357+
358+
panel-ce-std-command = [
359+
360+
];
361+
panel-ce-vivid-command = [
362+
363+
];
364+
*/
365+
};
366+
};

0 commit comments

Comments
 (0)