@@ -28,90 +28,95 @@ static struct quirk_entry quirk_spurious_8042 = {
2828 .spurious_8042 = true,
2929};
3030
31+ static struct quirk_entry quirk_s2idle_spurious_8042 = {
32+ .s2idle_bug_mmio = FCH_PM_BASE + FCH_PM_SCRATCH ,
33+ .spurious_8042 = true,
34+ };
35+
3136static const struct dmi_system_id fwbug_list [] = {
3237 {
3338 .ident = "L14 Gen2 AMD" ,
34- .driver_data = & quirk_s2idle_bug ,
39+ .driver_data = & quirk_s2idle_spurious_8042 ,
3540 .matches = {
3641 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
3742 DMI_MATCH (DMI_PRODUCT_NAME , "20X5" ),
3843 }
3944 },
4045 {
4146 .ident = "T14s Gen2 AMD" ,
42- .driver_data = & quirk_s2idle_bug ,
47+ .driver_data = & quirk_s2idle_spurious_8042 ,
4348 .matches = {
4449 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
4550 DMI_MATCH (DMI_PRODUCT_NAME , "20XF" ),
4651 }
4752 },
4853 {
4954 .ident = "X13 Gen2 AMD" ,
50- .driver_data = & quirk_s2idle_bug ,
55+ .driver_data = & quirk_s2idle_spurious_8042 ,
5156 .matches = {
5257 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
5358 DMI_MATCH (DMI_PRODUCT_NAME , "20XH" ),
5459 }
5560 },
5661 {
5762 .ident = "T14 Gen2 AMD" ,
58- .driver_data = & quirk_s2idle_bug ,
63+ .driver_data = & quirk_s2idle_spurious_8042 ,
5964 .matches = {
6065 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
6166 DMI_MATCH (DMI_PRODUCT_NAME , "20XK" ),
6267 }
6368 },
6469 {
6570 .ident = "T14 Gen1 AMD" ,
66- .driver_data = & quirk_s2idle_bug ,
71+ .driver_data = & quirk_s2idle_spurious_8042 ,
6772 .matches = {
6873 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
6974 DMI_MATCH (DMI_PRODUCT_NAME , "20UD" ),
7075 }
7176 },
7277 {
7378 .ident = "T14 Gen1 AMD" ,
74- .driver_data = & quirk_s2idle_bug ,
79+ .driver_data = & quirk_s2idle_spurious_8042 ,
7580 .matches = {
7681 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
7782 DMI_MATCH (DMI_PRODUCT_NAME , "20UE" ),
7883 }
7984 },
8085 {
8186 .ident = "T14s Gen1 AMD" ,
82- .driver_data = & quirk_s2idle_bug ,
87+ .driver_data = & quirk_s2idle_spurious_8042 ,
8388 .matches = {
8489 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
8590 DMI_MATCH (DMI_PRODUCT_NAME , "20UH" ),
8691 }
8792 },
8893 {
8994 .ident = "T14s Gen1 AMD" ,
90- .driver_data = & quirk_s2idle_bug ,
95+ .driver_data = & quirk_s2idle_spurious_8042 ,
9196 .matches = {
9297 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
9398 DMI_MATCH (DMI_PRODUCT_NAME , "20UJ" ),
9499 }
95100 },
96101 {
97102 .ident = "P14s Gen1 AMD" ,
98- .driver_data = & quirk_s2idle_bug ,
103+ .driver_data = & quirk_s2idle_spurious_8042 ,
99104 .matches = {
100105 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
101106 DMI_MATCH (DMI_PRODUCT_NAME , "20Y1" ),
102107 }
103108 },
104109 {
105110 .ident = "P14s Gen2 AMD" ,
106- .driver_data = & quirk_s2idle_bug ,
111+ .driver_data = & quirk_s2idle_spurious_8042 ,
107112 .matches = {
108113 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
109114 DMI_MATCH (DMI_PRODUCT_NAME , "21A0" ),
110115 }
111116 },
112117 {
113118 .ident = "P14s Gen2 AMD" ,
114- .driver_data = & quirk_s2idle_bug ,
119+ .driver_data = & quirk_s2idle_spurious_8042 ,
115120 .matches = {
116121 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
117122 DMI_MATCH (DMI_PRODUCT_NAME , "21A1" ),
@@ -152,39 +157,39 @@ static const struct dmi_system_id fwbug_list[] = {
152157 },
153158 {
154159 .ident = "IdeaPad 1 14AMN7" ,
155- .driver_data = & quirk_s2idle_bug ,
160+ .driver_data = & quirk_s2idle_spurious_8042 ,
156161 .matches = {
157162 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
158163 DMI_MATCH (DMI_PRODUCT_NAME , "82VF" ),
159164 }
160165 },
161166 {
162167 .ident = "IdeaPad 1 15AMN7" ,
163- .driver_data = & quirk_s2idle_bug ,
168+ .driver_data = & quirk_s2idle_spurious_8042 ,
164169 .matches = {
165170 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
166171 DMI_MATCH (DMI_PRODUCT_NAME , "82VG" ),
167172 }
168173 },
169174 {
170175 .ident = "IdeaPad 1 15AMN7" ,
171- .driver_data = & quirk_s2idle_bug ,
176+ .driver_data = & quirk_s2idle_spurious_8042 ,
172177 .matches = {
173178 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
174179 DMI_MATCH (DMI_PRODUCT_NAME , "82X5" ),
175180 }
176181 },
177182 {
178183 .ident = "IdeaPad Slim 3 14AMN8" ,
179- .driver_data = & quirk_s2idle_bug ,
184+ .driver_data = & quirk_s2idle_spurious_8042 ,
180185 .matches = {
181186 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
182187 DMI_MATCH (DMI_PRODUCT_NAME , "82XN" ),
183188 }
184189 },
185190 {
186191 .ident = "IdeaPad Slim 3 15AMN8" ,
187- .driver_data = & quirk_s2idle_bug ,
192+ .driver_data = & quirk_s2idle_spurious_8042 ,
188193 .matches = {
189194 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
190195 DMI_MATCH (DMI_PRODUCT_NAME , "82XQ" ),
@@ -193,7 +198,7 @@ static const struct dmi_system_id fwbug_list[] = {
193198 /* https://gitlab.freedesktop.org/drm/amd/-/issues/4434 */
194199 {
195200 .ident = "Lenovo Yoga 6 13ALC6" ,
196- .driver_data = & quirk_s2idle_bug ,
201+ .driver_data = & quirk_s2idle_spurious_8042 ,
197202 .matches = {
198203 DMI_MATCH (DMI_BOARD_VENDOR , "LENOVO" ),
199204 DMI_MATCH (DMI_PRODUCT_NAME , "82ND" ),
@@ -202,7 +207,7 @@ static const struct dmi_system_id fwbug_list[] = {
202207 /* https://gitlab.freedesktop.org/drm/amd/-/issues/2684 */
203208 {
204209 .ident = "HP Laptop 15s-eq2xxx" ,
205- .driver_data = & quirk_s2idle_bug ,
210+ .driver_data = & quirk_s2idle_spurious_8042 ,
206211 .matches = {
207212 DMI_MATCH (DMI_SYS_VENDOR , "HP" ),
208213 DMI_MATCH (DMI_PRODUCT_NAME , "HP Laptop 15s-eq2xxx" ),
@@ -285,6 +290,16 @@ void amd_pmc_quirks_init(struct amd_pmc_dev *dev)
285290{
286291 const struct dmi_system_id * dmi_id ;
287292
293+ /*
294+ * IRQ1 may cause an interrupt during resume even without a keyboard
295+ * press.
296+ *
297+ * Affects Renoir, Cezanne and Barcelo SoCs
298+ *
299+ * A solution is available in PMFW 64.66.0, but it must be activated by
300+ * SBIOS. If SBIOS is known to have the fix a quirk can be added for
301+ * a given system to avoid workaround.
302+ */
288303 if (dev -> cpu_id == AMD_CPU_ID_CZN )
289304 dev -> disable_8042_wakeup = true;
290305
@@ -295,6 +310,5 @@ void amd_pmc_quirks_init(struct amd_pmc_dev *dev)
295310 if (dev -> quirks -> s2idle_bug_mmio )
296311 pr_info ("Using s2idle quirk to avoid %s platform firmware bug\n" ,
297312 dmi_id -> ident );
298- if (dev -> quirks -> spurious_8042 )
299- dev -> disable_8042_wakeup = true;
313+ dev -> disable_8042_wakeup = dev -> quirks -> spurious_8042 ;
300314}
0 commit comments