1- From 24b8fcfccef31fbb95bc1dd308180f57d5cdb64c Mon Sep 17 00:00:00 2001
1+ From 91be4b39e6c32463b506097f916352f6795800cd Mon Sep 17 00:00:00 2001
22From: =?UTF-8?q?Micha=C5=82=20=C5=BBygowski?= <michal.zygowski@3mdeb.com>
33Date: Mon, 19 Jun 2023 09:36:52 +0200
4- Subject: [PATCH] Add RaptorPoint PCH support
4+ Subject: [PATCH] ichspi: Add RaptorPoint PCH support
55MIME-Version: 1.0
66Content-Type: text/plain; charset=UTF-8
77Content-Transfer-Encoding: 8bit
@@ -11,40 +11,40 @@ Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
1111---
1212 chipset_enable.c | 20 ++++++++++++++++++-
1313 ich_descriptors.c | 9 +++++++++
14- ichspi.c | 8 +++++++-
14+ ichspi.c | 7 +++++++
1515 include/programmer.h | 1 +
1616 .../ich_descriptors_tool.c | 2 ++
17- 5 files changed, 38 insertions(+), 2 deletions (-)
17+ 5 files changed, 38 insertions(+), 1 deletion (-)
1818
1919diff --git a/chipset_enable.c b/chipset_enable.c
20- index d6103c13b..3a07d6093 100644
20+ index facf29e500..6b1c1b5c99 100644
2121--- a/chipset_enable.c
2222+++ b/chipset_enable.c
23- @@ -607 ,6 +607 ,7 @@ static enum chipbustype enable_flash_ich_report_gcs(
23+ @@ -606 ,6 +606 ,7 @@ static enum chipbustype enable_flash_ich_report_gcs(
2424 case CHIPSET_400_SERIES_COMET_POINT:
2525 case CHIPSET_500_SERIES_TIGER_POINT:
2626 case CHIPSET_600_SERIES_ALDER_POINT:
2727+ case CHIPSET_700_SERIES_RAPTOR_POINT:
2828 case CHIPSET_METEOR_LAKE:
29+ case CHIPSET_PANTHER_LAKE:
2930 case CHIPSET_ELKHART_LAKE:
30- case CHIPSET_APOLLO_LAKE:
3131@@ -714,6 +715,7 @@ static enum chipbustype enable_flash_ich_report_gcs(
3232 break;
3333 case CHIPSET_500_SERIES_TIGER_POINT:
3434 case CHIPSET_600_SERIES_ALDER_POINT:
3535+ case CHIPSET_700_SERIES_RAPTOR_POINT:
36+ case CHIPSET_C740_SERIES_EMMITSBURG:
3637 case CHIPSET_METEOR_LAKE:
37- boot_straps = boot_straps_pch500;
38- break;
39- @@ -749,6 +751,7 @@ static enum chipbustype enable_flash_ich_report_gcs(
38+ case CHIPSET_PANTHER_LAKE:
39+ @@ -751,6 +753,7 @@ static enum chipbustype enable_flash_ich_report_gcs(
4040 case CHIPSET_400_SERIES_COMET_POINT:
4141 case CHIPSET_500_SERIES_TIGER_POINT:
4242 case CHIPSET_600_SERIES_ALDER_POINT:
4343+ case CHIPSET_700_SERIES_RAPTOR_POINT:
4444 case CHIPSET_METEOR_LAKE:
45+ case CHIPSET_PANTHER_LAKE:
4546 case CHIPSET_APOLLO_LAKE:
46- case CHIPSET_GEMINI_LAKE:
47- @@ -1009,6 +1012,11 @@ static int enable_flash_pch600(const struct programmer_cfg *cfg, struct pci_dev
47+ @@ -1017,6 +1020,11 @@ static int enable_flash_pch600(const struct programmer_cfg *cfg, struct pci_dev
4848 return enable_flash_pch100_or_c620(cfg, dev, name, 0x1f, 5, CHIPSET_600_SERIES_ALDER_POINT);
4949 }
5050
@@ -56,7 +56,7 @@ index d6103c13b..3a07d6093 100644
5656 static int enable_flash_mtl(const struct programmer_cfg *cfg, struct pci_dev *const dev, const char *const name)
5757 {
5858 return enable_flash_pch100_or_c620(cfg, dev, name, 0x1f, 5, CHIPSET_METEOR_LAKE);
59- @@ -2175 ,9 +2183 ,19 @@ const struct penable chipset_enables[] = {
59+ @@ -2190 ,9 +2198 ,19 @@ const struct penable chipset_enables[] = {
6060 {0x8086, 0x7a83, B_S, NT, "Intel", "Q670", enable_flash_pch600},
6161 {0x8086, 0x7a84, B_S, DEP, "Intel", "Z690", enable_flash_pch600},
6262 {0x8086, 0x7a88, B_S, NT, "Intel", "W680", enable_flash_pch600},
@@ -75,155 +75,154 @@ index d6103c13b..3a07d6093 100644
7575+ {0x8086, 0x7a14, B_S, NT, "Intel", "C262", enable_flash_pch700},
7676+ {0x8086, 0x7a13, B_S, NT, "Intel", "C266", enable_flash_pch700},
7777 {0x8086, 0x7e23, B_S, DEP, "Intel", "Meteor Lake-P/M", enable_flash_mtl},
78- #endif
79- {0 },
78+ {0x8086, 0xe323, B_S, DEP, "Intel", "Panther Lake-U/H 12Xe", enable_flash_ptl},
79+ {0x8086, 0xe423, B_S, DEP, "Intel", "Panther Lake-H 4Xe", enable_flash_ptl },
8080diff --git a/ich_descriptors.c b/ich_descriptors.c
81- index b37ce6d51..416b610cc 100644
81+ index eaf44b0693..c436fabd37 100644
8282--- a/ich_descriptors.c
8383+++ b/ich_descriptors.c
84- @@ -48 ,6 +48 ,7 @@ ssize_t ich_number_of_regions(const enum ich_chipset cs, const struct ich_desc_c
84+ @@ -49 ,6 +49 ,7 @@ ssize_t ich_number_of_regions(const enum ich_chipset cs, const struct ich_desc_c
8585 case CHIPSET_400_SERIES_COMET_POINT:
8686 case CHIPSET_500_SERIES_TIGER_POINT:
8787 case CHIPSET_600_SERIES_ALDER_POINT:
8888+ case CHIPSET_700_SERIES_RAPTOR_POINT:
8989 case CHIPSET_METEOR_LAKE:
90+ case CHIPSET_PANTHER_LAKE:
9091 case CHIPSET_ELKHART_LAKE:
91- case CHIPSET_JASPER_LAKE:
92- @@ -77,6 +78,7 @@ ssize_t ich_number_of_masters(const enum ich_chipset cs, const struct ich_desc_c
93- case CHIPSET_C620_SERIES_LEWISBURG:
92+ @@ -80,6 +81,7 @@ ssize_t ich_number_of_masters(const enum ich_chipset cs, const struct ich_desc_c
93+ case CHIPSET_C740_SERIES_EMMITSBURG:
9494 case CHIPSET_APOLLO_LAKE:
9595 case CHIPSET_600_SERIES_ALDER_POINT:
9696+ case CHIPSET_700_SERIES_RAPTOR_POINT:
9797 case CHIPSET_METEOR_LAKE:
98+ case CHIPSET_PANTHER_LAKE:
9899 case CHIPSET_GEMINI_LAKE:
99- case CHIPSET_JASPER_LAKE:
100- @@ -215,6 +217,7 @@ static const char *pprint_density(enum ich_chipset cs, const struct ich_descript
100+ @@ -221,6 +223,7 @@ static const char *pprint_density(enum ich_chipset cs, const struct ich_descript
101101 case CHIPSET_400_SERIES_COMET_POINT:
102102 case CHIPSET_500_SERIES_TIGER_POINT:
103103 case CHIPSET_600_SERIES_ALDER_POINT:
104104+ case CHIPSET_700_SERIES_RAPTOR_POINT:
105105 case CHIPSET_METEOR_LAKE:
106+ case CHIPSET_PANTHER_LAKE:
106107 case CHIPSET_APOLLO_LAKE:
107- case CHIPSET_GEMINI_LAKE:
108- @@ -313,6 +316,7 @@ static const char *pprint_freq(enum ich_chipset cs, uint8_t value)
108+ @@ -320,6 +323,7 @@ static const char *pprint_freq(enum ich_chipset cs, uint8_t value)
109109 return freq_str[2][value];
110110 case CHIPSET_500_SERIES_TIGER_POINT:
111111 case CHIPSET_600_SERIES_ALDER_POINT:
112112+ case CHIPSET_700_SERIES_RAPTOR_POINT:
113+ case CHIPSET_C740_SERIES_EMMITSBURG:
113114 case CHIPSET_METEOR_LAKE:
114- return freq_str[3][value];
115- case CHIPSET_ELKHART_LAKE:
116- @@ -361,6 +365,7 @@ void prettyprint_ich_descriptor_component(enum ich_chipset cs, const struct ich_
115+ case CHIPSET_PANTHER_LAKE:
116+ @@ -371,6 +375,7 @@ void prettyprint_ich_descriptor_component(enum ich_chipset cs, const struct ich_
117117 case CHIPSET_400_SERIES_COMET_POINT:
118118 case CHIPSET_500_SERIES_TIGER_POINT:
119119 case CHIPSET_600_SERIES_ALDER_POINT:
120120+ case CHIPSET_700_SERIES_RAPTOR_POINT:
121121 case CHIPSET_METEOR_LAKE:
122+ case CHIPSET_PANTHER_LAKE:
122123 case CHIPSET_APOLLO_LAKE:
123- case CHIPSET_GEMINI_LAKE:
124- @@ -489,6 +494,7 @@ void prettyprint_ich_descriptor_master(const enum ich_chipset cs, const struct i
124+ @@ -512,6 +517,7 @@ void prettyprint_ich_descriptor_master(const enum ich_chipset cs, const struct i
125125 cs == CHIPSET_400_SERIES_COMET_POINT ||
126126 cs == CHIPSET_500_SERIES_TIGER_POINT ||
127127 cs == CHIPSET_600_SERIES_ALDER_POINT ||
128128+ cs == CHIPSET_700_SERIES_RAPTOR_POINT ||
129- cs == CHIPSET_JASPER_LAKE || cs == CHIPSET_METEOR_LAKE) {
130- const char *const master_names[] = {
131- "BIOS", "ME", "GbE", "unknown", "EC",
132- @@ -1087 ,6 +1093 ,7 @@ static enum ich_chipset guess_ich_chipset(const struct ich_desc_content *const c
129+ cs == CHIPSET_C740_SERIES_EMMITSBURG ||
130+ cs == CHIPSET_JASPER_LAKE ||
131+ cs == CHIPSET_METEOR_LAKE ||
132+ @@ -1115 ,6 +1121 ,7 @@ static enum ich_chipset guess_ich_chipset(const struct ich_desc_content *const c
133133 case CHIPSET_400_SERIES_COMET_POINT:
134134 case CHIPSET_500_SERIES_TIGER_POINT:
135135 case CHIPSET_600_SERIES_ALDER_POINT:
136136+ case CHIPSET_700_SERIES_RAPTOR_POINT:
137137 case CHIPSET_METEOR_LAKE:
138+ case CHIPSET_PANTHER_LAKE:
138139 case CHIPSET_GEMINI_LAKE:
139- case CHIPSET_JASPER_LAKE:
140- @@ -1246,6 +1253,7 @@ int getFCBA_component_density(enum ich_chipset cs, const struct ich_descriptors
140+ @@ -1277,6 +1284,7 @@ int getFCBA_component_density(enum ich_chipset cs, const struct ich_descriptors
141141 case CHIPSET_400_SERIES_COMET_POINT:
142142 case CHIPSET_500_SERIES_TIGER_POINT:
143143 case CHIPSET_600_SERIES_ALDER_POINT:
144144+ case CHIPSET_700_SERIES_RAPTOR_POINT:
145145 case CHIPSET_METEOR_LAKE:
146+ case CHIPSET_PANTHER_LAKE:
146147 case CHIPSET_APOLLO_LAKE:
147- case CHIPSET_GEMINI_LAKE:
148- @@ -1291,6 +1299,7 @@ static uint32_t read_descriptor_reg(enum ich_chipset cs, uint8_t section, uint16
148+ @@ -1324,6 +1332,7 @@ static uint32_t read_descriptor_reg(enum ich_chipset cs, uint8_t section, uint16
149149 case CHIPSET_400_SERIES_COMET_POINT:
150150 case CHIPSET_500_SERIES_TIGER_POINT:
151151 case CHIPSET_600_SERIES_ALDER_POINT:
152152+ case CHIPSET_700_SERIES_RAPTOR_POINT:
153153 case CHIPSET_METEOR_LAKE:
154+ case CHIPSET_PANTHER_LAKE:
154155 case CHIPSET_APOLLO_LAKE:
155- case CHIPSET_GEMINI_LAKE:
156156diff --git a/ichspi.c b/ichspi.c
157- index c94d9971f..f50654784 100644
157+ index f74fb05c9e..9718600b91 100644
158158--- a/ichspi.c
159159+++ b/ichspi.c
160- @@ -1884 ,6 +1884 ,7 @@ static void init_chipset_properties(struct swseq_data *swseq, struct hwseq_data
160+ @@ -2106 ,6 +2106 ,7 @@ static void init_chipset_properties(struct swseq_data *swseq, struct hwseq_data
161161 case CHIPSET_400_SERIES_COMET_POINT:
162162 case CHIPSET_500_SERIES_TIGER_POINT:
163163 case CHIPSET_600_SERIES_ALDER_POINT:
164164+ case CHIPSET_700_SERIES_RAPTOR_POINT:
165- case CHIPSET_METEOR_LAKE:
166165 case CHIPSET_APOLLO_LAKE:
167166 case CHIPSET_GEMINI_LAKE:
168- @@ -1923,6 +1924,7 @@ static void init_chipset_properties(struct swseq_data *swseq, struct hwseq_data
167+ case CHIPSET_JASPER_LAKE:
168+ @@ -2147,6 +2148,8 @@ static void init_chipset_properties(struct swseq_data *swseq, struct hwseq_data
169169 case CHIPSET_400_SERIES_COMET_POINT:
170170 case CHIPSET_500_SERIES_TIGER_POINT:
171171 case CHIPSET_600_SERIES_ALDER_POINT:
172172+ case CHIPSET_700_SERIES_RAPTOR_POINT:
173- case CHIPSET_METEOR_LAKE:
173+ + case CHIPSET_METEOR_LAKE:
174174 case CHIPSET_APOLLO_LAKE:
175175 case CHIPSET_GEMINI_LAKE:
176- @@ -1984,6 +1986,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
176+ case CHIPSET_JASPER_LAKE:
177+ @@ -2210,6 +2213,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
177178 case CHIPSET_400_SERIES_COMET_POINT:
178179 case CHIPSET_500_SERIES_TIGER_POINT:
179180 case CHIPSET_600_SERIES_ALDER_POINT:
180181+ case CHIPSET_700_SERIES_RAPTOR_POINT:
181- case CHIPSET_METEOR_LAKE:
182182 case CHIPSET_APOLLO_LAKE:
183183 case CHIPSET_GEMINI_LAKE:
184- @@ -2064,6 +2067,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
184+ case CHIPSET_JASPER_LAKE:
185+ @@ -2291,6 +2295,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
185186 case CHIPSET_400_SERIES_COMET_POINT:
186187 case CHIPSET_500_SERIES_TIGER_POINT:
187188 case CHIPSET_600_SERIES_ALDER_POINT:
188189+ case CHIPSET_700_SERIES_RAPTOR_POINT:
189- case CHIPSET_METEOR_LAKE:
190190 case CHIPSET_APOLLO_LAKE:
191191 case CHIPSET_GEMINI_LAKE:
192- @@ -2103,6 +2107,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
192+ case CHIPSET_JASPER_LAKE:
193+ @@ -2332,6 +2337,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
193194 case CHIPSET_400_SERIES_COMET_POINT:
194195 case CHIPSET_500_SERIES_TIGER_POINT:
195196 case CHIPSET_600_SERIES_ALDER_POINT:
196197+ case CHIPSET_700_SERIES_RAPTOR_POINT:
197- case CHIPSET_METEOR_LAKE:
198198 case CHIPSET_APOLLO_LAKE:
199199 case CHIPSET_GEMINI_LAKE:
200- @@ -2140,7 +2145,8 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
201- ich_gen == CHIPSET_300_SERIES_CANNON_POINT ||
200+ case CHIPSET_JASPER_LAKE:
201+ @@ -2371,6 +2377,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
202202 ich_gen == CHIPSET_400_SERIES_COMET_POINT ||
203203 ich_gen == CHIPSET_500_SERIES_TIGER_POINT ||
204- - ich_gen == CHIPSET_600_SERIES_ALDER_POINT)) {
205- + ich_gen == CHIPSET_600_SERIES_ALDER_POINT ||
204+ ich_gen == CHIPSET_600_SERIES_ALDER_POINT ||
206205+ ich_gen == CHIPSET_700_SERIES_RAPTOR_POINT)) {
206+ ich_gen == CHIPSET_C740_SERIES_EMMITSBURG)) {
207207 msg_pdbg("Enabling hardware sequencing by default for 100+ series PCH.\n");
208208 ich_spi_mode = ich_hwseq;
209- }
210209diff --git a/include/programmer.h b/include/programmer.h
211- index 1c5d82096..c64dbac7a 100644
210+ index a90624b13c..0210038892 100644
212211--- a/include/programmer.h
213212+++ b/include/programmer.h
214- @@ -376 ,6 +376 ,7 @@ enum ich_chipset {
213+ @@ -357 ,6 +357 ,7 @@ enum ich_chipset {
215214 CHIPSET_400_SERIES_COMET_POINT,
216215 CHIPSET_500_SERIES_TIGER_POINT,
217216 CHIPSET_600_SERIES_ALDER_POINT,
218217+ CHIPSET_700_SERIES_RAPTOR_POINT,
219- CHIPSET_METEOR_LAKE,
220218 CHIPSET_APOLLO_LAKE,
221219 CHIPSET_GEMINI_LAKE,
220+ CHIPSET_JASPER_LAKE,
222221diff --git a/util/ich_descriptors_tool/ich_descriptors_tool.c b/util/ich_descriptors_tool/ich_descriptors_tool.c
223- index a5a59ad29..44af49b6a 100644
222+ index 09587f7528..d5289b9534 100644
224223--- a/util/ich_descriptors_tool/ich_descriptors_tool.c
225224+++ b/util/ich_descriptors_tool/ich_descriptors_tool.c
226- @@ -238 ,6 +238 ,8 @@ int main(int argc, char *argv[])
225+ @@ -239 ,6 +239 ,8 @@ int main(int argc, char *argv[])
227226 cs = CHIPSET_500_SERIES_TIGER_POINT;
228227 else if (strcmp(csn, "600") == 0)
229228 cs = CHIPSET_600_SERIES_ALDER_POINT;
@@ -232,3 +231,6 @@ index a5a59ad29..44af49b6a 100644
232231 else if (strcmp(csn, "apollo") == 0)
233232 cs = CHIPSET_APOLLO_LAKE;
234233 else if (strcmp(csn, "gemini") == 0)
234+ - -
235+ 2.39.2
236+
0 commit comments