blob: 0631ab89282107bb3649075f2ae33b0e99ba88d6 (
plain)
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
|
From 0dd9721f26df2b767f32042afb17bb7baf09c633 Mon Sep 17 00:00:00 2001
From: Dalon Westergreen <dwesterg@gmail.com>
Date: Sun, 12 Feb 2017 15:03:53 -0800
Subject: [PATCH 4/6] Add HDMI init to de10 env
This uses stand alone applications to probe the EDID data
of the connected monitor and uses that information to
setup the FPGA's HDMI pll as well as add the appropriate
devicetree node to the devicetree
Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
---
include/configs/socfpga_de10_nano.h | 94 +++++++++++++++++++------------------
1 file changed, 49 insertions(+), 45 deletions(-)
diff --git a/include/configs/socfpga_de10_nano.h b/include/configs/socfpga_de10_nano.h
index 1e57558..3a5f504 100644
--- a/include/configs/socfpga_de10_nano.h
+++ b/include/configs/socfpga_de10_nano.h
@@ -43,57 +43,61 @@
"ramdisk_addr_r=0x02300000\0" \
\
"fpga_cfg=" \
- "env exists fpga_files || setenv fpga_files " \
+ "env exists fpga_file || setenv fpga_file " \
"${board}.rbf; " \
- "for target in ${boot_targets}; do " \
- "run fpga_cfg_${target}; " \
- "done\0" \
- \
- "fpga_cfg_mmc0=" \
- "setenv devnum 0; " \
- "setenv devtype mmc; " \
- "run scan_dev_for_boot_part_fpga\0" \
- \
- "scan_dev_for_boot_part_fpga=" \
- "part list ${devtype} ${devnum} -bootable devplist; " \
- "env exists devplist || setenv devplist 1; " \
- "for distro_bootpart in ${devplist}; do " \
- "if fstype ${devtype} " \
- "${devnum}:${distro_bootpart} " \
- "bootfstype; then " \
- "run scan_dev_for_boot_fpga; " \
- "fi; " \
- "done\0" \
- \
- "scan_dev_for_boot_fpga=" \
- "echo Scanning ${devtype} " \
- "${devnum}:${distro_bootpart}...; " \
- "for prefix in ${boot_prefixes}; do " \
- "run scan_dev_for_fpga; " \
- "done\0" \
- \
- "scan_dev_for_fpga=" \
- "for file in ${fpga_files}; do " \
- "if test -e ${devtype} " \
- "${devnum}:${distro_bootpart} " \
- "${prefix}${file}; then " \
- "echo Found FPGA Configuration " \
- "${prefix}${file}; " \
- "load ${devtype} " \
- "${devnum}:${distro_bootpart} " \
- "${kernel_addr_r} " \
- "${prefix}${file}; " \
- "fpga load 0 ${kernel_addr_r} " \
- "${filesize}; " \
- "bridge enable; " \
- "fi; " \
- "done\0" \
+ "if test -e mmc 0:1 ${fpga_file}; then " \
+ "load mmc 0:1 ${kernel_addr_r} " \
+ "${fpga_file}; " \
+ "fpga load 0 ${kernel_addr_r} " \
+ "${filesize}; " \
+ "bridge enable; " \
+ "fi;\0" \
\
+ "hdmi_init=" \
+ "run hdmi_cfg; " \
+ "if test \"${HDMI_status}\" = \"complete\"; then " \
+ "run hdmi_fdt_mod; " \
+ "fi;\0" \
+ "hdmi_fdt_mod=" \
+ "load mmc 0:1 ${fdt_addr} " \
+ "socfpga_cyclone5_de10_nano.dtb; " \
+ "fdt addr ${fdt_addr}; " \
+ "fdt resize; " \
+ "fdt mknode /soc framebuffer@3F000000; " \
+ "setenv fdt_frag /soc/framebuffer@3F000000; " \
+ "fdt set ${fdt_frag} compatible \"simple-framebuffer\"; "\
+ "fdt set ${fdt_frag} reg <0x3F000000 8294400>; " \
+ "fdt set ${fdt_frag} format \"x8r8g8b8\"; " \
+ "fdt set ${fdt_frag} width <${HDMI_h_active_pix}>; " \
+ "fdt set ${fdt_frag} height <${HDMI_v_active_lin}>; " \
+ "fdt set ${fdt_frag} stride <${HDMI_stride}>; " \
+ "fdt set /soc stdout-path \"display0\"; " \
+ "fdt set /aliases display0 \"/soc/framebuffer@3F000000\";"\
+ "sleep 2;\0" \
+ "HDMI_enable_dvi=" \
+ "no\0" \
+ "hdmi_cfg=" \
+ "i2c dev 2; " \
+ "load mmc 0:1 0x0c300000 STARTUP.BMP; " \
+ "load mmc 0:1 0x0c100000 de10_nano_hdmi_config.bin; " \
+ "go 0x0C100001; " \
+ "dcache flush;" \
+ "if test \"${HDMI_enable_dvi}\" = \"yes\"; then " \
+ "i2c mw 0x39 0xAF 0x04 0x01; " \
+ "fi;\0" \
+ "hdmi_dump_regs=" \
+ "i2c dev 2;icache flush; " \
+ "load mmc 0:1 0x0c100000 dump_adv7513_regs.bin; " \
+ "go 0x0C100001; icache flush;\0" \
+ "hdmi_dump_edid=" \
+ "i2c dev 2;icache flush; " \
+ "load mmc 0:1 0x0c100000 dump_adv7513_edid.bin; " \
+ "go 0x0C100001; icache flush;\0" \
BOOTENV
#endif
-#define CONFIG_BOOTCOMMAND "run fpga_cfg; run distro_bootcmd"
+#define CONFIG_BOOTCOMMAND "run fpga_cfg; run hdmi_init; run distro_bootcmd"
/* The rest of the configuration is shared */
#include <configs/socfpga_common.h>
--
2.7.4
|