xref: /freebsd/usr.sbin/fwget/pci/pci_video_amd (revision 12545b85834f32e0fdb831489503c3c4f6db715a)
1#-
2# SPDX-License-Identifier: BSD-2-Clause
3#
4# Copyright 2023 Beckhoff Automation GmbH & Co. KG
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted providing that the following conditions
8# are met:
9# 1. Redistributions of source code must retain the above copyright
10#    notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright
12#    notice, this list of conditions and the following disclaimer in the
13#    documentation and/or other materials provided with the distribution.
14#
15# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25# POSSIBILITY OF SUCH DAMAGE.
26
27pci_video_amd()
28{
29	# A table listing the required firmware versions for each GPU series
30	# is available at https://docs.kernel.org/gpu/amdgpu/driver-misc.html
31
32	case "$1" in
33		0x678*|0x679*)
34			addpkg "gpu-firmware-amd-kmod-tahiti"
35			;;
36		0x680*|0x681*)
37			addpkg "gpu-firmware-amd-kmod-pitcairn"
38			;;
39		0x660*|0x661*|0x662*|0x663*)
40			addpkg "gpu-firmware-amd-kmod-oland"
41			;;
42		0x682*|0x683*)
43			addpkg "gpu-firmware-amd-kmod-verde gpu-firmware-amd-kmod-si58"
44			;;
45		0x666*)
46			addpkg "gpu-firmware-amd-kmod-hainan"
47			;;
48		0x13*)
49			addpkg "gpu-firmware-amd-kmod-kaveri"
50			;;
51		0x664*|0x664*)
52			addpkg "gpu-firmware-amd-kmod-bonaire"
53			;;
54		0x67a*|0x67b*)
55			addpkg "gpu-firmware-amd-kmod-hawaii"
56			;;
57		0x983*)
58			addpkg "gpu-firmware-amd-kmod-kabini"
59			;;
60		0x985*)
61			addpkg "gpu-firmware-amd-kmod-mullins"
62			;;
63		0x690*)
64			addpkg "gpu-firmware-amd-kmod-topaz"
65			;;
66		0x692*|0x693*)
67			addpkg "gpu-firmware-amd-kmod-tonga"
68			;;
69		0x730*)
70			addpkg "gpu-firmware-amd-kmod-fiji"
71			;;
72		0x987*)
73			addpkg "gpu-firmware-amd-kmod-carrizo"
74			;;
75		0x98e4*)
76			addpkg "gpu-firmware-amd-kmod-stoney"
77			;;
78		0x67e*|0x67ff)
79			addpkg "gpu-firmware-amd-kmod-polaris11"
80			;;
81		0x67c*|0x67d*|0x6fdf)
82			addpkg "gpu-firmware-amd-kmod-polaris10"
83			;;
84		0x698*|0x699*)
85			addpkg "gpu-firmware-amd-kmod-polaris12"
86			;;
87		0x694*)
88			addpkg "gpu-firmware-amd-kmod-vegam"
89			;;
90		0x686*|0x687*)
91			addpkg "gpu-firmware-amd-kmod-vega10"
92			;;
93		0x69a*)
94			addpkg "gpu-firmware-amd-kmod-vega12"
95			;;
96		0x66a*)
97			addpkg "gpu-firmware-amd-kmod-vega20"
98			;;
99		0x15d*)
100			addpkg "gpu-firmware-amd-kmod-raven"
101			;;
102		0x738*|0x739*)
103			addpkg "gpu-firmware-amd-kmod-arcturus"
104			;;
105		0x731*)
106			addpkg "gpu-firmware-amd-kmod-navi10"
107			;;
108		0x734*)
109			addpkg "gpu-firmware-amd-kmod-navi14"
110			;;
111		0x15e7|0x1636|0x1638|0x164c)
112			addpkg "gpu-firmware-amd-kmod-renoir"
113			;;
114		0x736*)
115			addpkg "gpu-firmware-amd-kmod-navi12"
116			;;
117		0x73a*|0x73b*)
118			addpkg "gpu-firmware-amd-kmod-sienna-cichlid"
119			;;
120		0x163f)
121			addpkg "gpu-firmware-amd-kmod-vangogh"
122			;;
123		0x164d|0x1681)
124			addpkg "gpu-firmware-amd-kmod-yellow-carp"
125			;;
126		0x73c*|0x73d*)
127			addpkg "gpu-firmware-amd-kmod-navy-flounder"
128			;;
129		0x73e*|0x73f*)
130			addpkg "gpu-firmware-amd-kmod-dimgrey-cavefish"
131			;;
132		0x740*|0x741*)
133			addpkg "gpu-firmware-amd-kmod-aldebaran"
134			;;
135		0x13fe)
136			addpkg "gpu-firmware-amd-kmod-cyan-skillfish2"
137			;;
138		0x742*|0x743*)
139			addpkg "gpu-firmware-amd-kmod-beige-goby"
140			;;
141		0x744c)
142			addpkg "gpu-firmware-amd-kmod-dcn-3-2-0"
143			addpkg "gpu-firmware-amd-kmod-gc-11-0-0"
144			addpkg "gpu-firmware-amd-kmod-psp-13-0-0"
145			addpkg "gpu-firmware-amd-kmod-sdma-6-0-0"
146			addpkg "gpu-firmware-amd-kmod-smu-13-0-0"
147			addpkg "gpu-firmware-amd-kmod-vcn-4-0-0"
148			;;
149		0x15bf)
150			addpkg "gpu-firmware-amd-kmod-gc-11-0-1"
151			addpkg "gpu-firmware-amd-kmod-psp-13-0-4"
152			addpkg "gpu-firmware-amd-kmod-dcn-3-1-4"
153			addpkg "gpu-firmware-amd-kmod-sdma-6-0-1"
154			addpkg "gpu-firmware-amd-kmod-vcn-4-0-2"
155			;;
156		0x164e)
157			addpkg "gpu-firmware-amd-kmod-gc-10-3-6"
158			addpkg "gpu-firmware-amd-kmod-psp-13-0-5"
159			addpkg "gpu-firmware-amd-kmod-dcn-3-1-5"
160			addpkg "gpu-firmware-amd-kmod-sdma-5-2-6"
161			addpkg "gpu-firmware-amd-kmod-vcn-3-1-2"
162			;;
163	esac
164}
165