On Sun, Feb 25, 2018 at 06:27:11PM -0800, Carlos Cardenas wrote:
> Howdy.
> 
> Attached is a patch for pcidevs for thinkpad e475 with an
> AMD A10-9600P R5 (Carrizo) along with the dmesg output.
> Items added:
> * O2 Micro SD/MMC
> * various AMD 15h/6xh devs
> * Carrizo video

A10-9600P is 'Bristol Ridge' which seems to be a tweaked Carrizo design.
Most of the devices mentioned would have first appeared in Carrizo
so it is right to use that name instead.

And just to confuse things Carrizo-L is a quite different family 16h apu...

> 
> Comments? Ok?
> 
> +--+
> Carlos

> OpenBSD 6.2-current (GENERIC.MP) #0: Sun Feb 25 15:32:13 PST 2018
>     los@bjorn.castle:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 16524206080 (15758MB)
> avail mem = 16016396288 (15274MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xdb225000 (58 entries)
> bios0: vendor LENOVO version "R0EET44W (1.18 )" date 11/17/2017
> bios0: LENOVO 20H4CTO1WW
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP UEFI HPET APIC MCFG SBST MSDM BATB SSDT IVRS CRAT 
> TPM2 SSDT SSDT SSDT SSDT FPDT SSDT UEFI
> acpi0: wakeup devices GPP0(S4) GPP1(S4) GPP2(S4) GPP3(S4) GPP4(S4) GFX0(S4) 
> GFX1(S4) GFX2(S4) GFX3(S4) GFX4(S4) XHC0(S3) EHC1(S3) SBAZ(S4) LID_(S3) 
> SLPB(S3)
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpihpet0 at acpi0: 14318180 Hz
> acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> cpu0 at mainbus0: apid 16 (boot processor)
> cpu0: AMD A10-9600P RADEON R5, 10 COMPUTE CORES 4C+6G, 2395.80 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,TCE,NODEID,TBM,CPCTR,DBKP,PERFTSC,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2
> cpu0: 96KB 64b/line 3-way I-cache, 32KB 64b/line 8-way D-cache, 1MB 64b/line 
> 16-way L2 cache
> cpu0: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative
> cpu0: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
> acpihpet0: recalibrated TSC frequency 2395505539 Hz
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, IBE
> cpu1 at mainbus0: apid 17 (application processor)
> cpu1: AMD A10-9600P RADEON R5, 10 COMPUTE CORES 4C+6G, 2395.51 MHz
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,TCE,NODEID,TBM,CPCTR,DBKP,PERFTSC,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2
> cpu1: 96KB 64b/line 3-way I-cache, 32KB 64b/line 8-way D-cache, 1MB 64b/line 
> 16-way L2 cache
> cpu1: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative
> cpu1: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 18 (application processor)
> cpu2: AMD A10-9600P RADEON R5, 10 COMPUTE CORES 4C+6G, 2395.51 MHz
> cpu2: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,TCE,NODEID,TBM,CPCTR,DBKP,PERFTSC,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2
> cpu2: 96KB 64b/line 3-way I-cache, 32KB 64b/line 8-way D-cache, 1MB 64b/line 
> 16-way L2 cache
> cpu2: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative
> cpu2: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 19 (application processor)
> cpu3: AMD A10-9600P RADEON R5, 10 COMPUTE CORES 4C+6G, 2395.51 MHz
> cpu3: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,TCE,NODEID,TBM,CPCTR,DBKP,PERFTSC,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2
> cpu3: 96KB 64b/line 3-way I-cache, 32KB 64b/line 8-way D-cache, 1MB 64b/line 
> 16-way L2 cache
> cpu3: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative
> cpu3: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
> cpu3: smt 0, core 3, package 0
> ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 21, 24 pins
> , remapped to apid 4
> ioapic1 at mainbus0: apid 5 pa 0xfec01000, version 21, 32 pins
> , remapped to apid 5
> acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (GPP0)
> acpiprt2 at acpi0: bus 1 (GPP1)
> acpiprt3 at acpi0: bus 3 (GPP2)
> acpiprt4 at acpi0: bus 4 (GPP3)
> acpiprt5 at acpi0: bus -1 (GPP4)
> acpiprt6 at acpi0: bus -1 (GFX0)
> acpiprt7 at acpi0: bus -1 (GFX1)
> acpiprt8 at acpi0: bus -1 (GFX2)
> acpiprt9 at acpi0: bus -1 (GFX3)
> acpiprt10 at acpi0: bus -1 (GFX4)
> acpiec0 at acpi0
> acpicpu0 at acpi0: C2(0@400 io@0x814), C1(@1 halt!), PSS
> acpicpu1 at acpi0: C2(0@400 io@0x814), C1(@1 halt!), PSS
> acpicpu2 at acpi0: C2(0@400 io@0x814), C1(@1 halt!), PSS
> acpicpu3 at acpi0: C2(0@400 io@0x814), C1(@1 halt!), PSS
> acpipwrres0 at acpi0: PUBS
> acpipwrres1 at acpi0: P0U3, resource for XHC0
> acpipwrres2 at acpi0: P3U3, resource for XHC0
> acpipwrres3 at acpi0: P0U2, resource for EHC1
> acpipwrres4 at acpi0: P3U2, resource for EHC1
> acpipwrres5 at acpi0: P0SD, resource for SDIO
> acpipwrres6 at acpi0: P3SD, resource for SDIO
> acpipwrres7 at acpi0: P0ST, resource for SATA
> acpipwrres8 at acpi0: P3ST, resource for SATA
> acpibtn0 at acpi0: PWRB
> acpibat0 at acpi0: BAT0 model "01AV412" serial  5254 type LiP oem "LGC"
> acpiac0 at acpi0: AC unit offline
> acpithinkpad0 at acpi0
> "LEN0071" at acpi0 not configured
> "LEN2043" at acpi0 not configured
> "SMB0001" at acpi0 not configured
> acpibtn1 at acpi0: LID_
> acpibtn2 at acpi0: SLPB
> "PNP0C14" at acpi0 not configured
> "PNP0C14" at acpi0 not configured
> "PNP0C14" at acpi0 not configured
> "AMD0030" at acpi0 not configured
> "MSFT0101" at acpi0 not configured
> acpivideo0 at acpi0: VGA_
> acpivideo1 at acpi0: VGA_
> cpu0: 2395 MHz: speeds: 2400 2000 1500 1200 MHz
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "AMD AMD64 15h Root Complex" rev 0x00
> "AMD AMD64 15/6xh IOMMU" rev 0x00 at pci0 dev 0 function 2 not configured
> "ATI Carrizo" rev 0xca at pci0 dev 1 function 0 not configured
> azalia0 at pci0 dev 1 function 1 "ATI Radeon HD Audio" rev 0x00: msi
> azalia0: no supported codecs
> pchb1 at pci0 dev 2 function 0 "AMD AMD64 15h Host" rev 0x00
> ppb0 at pci0 dev 2 function 2 "AMD AMD64 15h PCIE" rev 0x00: msi
> pci1 at ppb0 bus 1
> re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x10: RTL8168GU/8111GU 
> (0x5080), msi, address 8c:16:45:11:17:eb
> rgephy0 at re0 phy 7: RTL8251 PHY, rev. 0
> ppb1 at pci0 dev 2 function 3 "AMD AMD64 15h PCIE" rev 0x00: msi
> pci2 at ppb1 bus 3
> sdhc0 at pci2 dev 0 function 0 "O2 Micro SD/MMC" rev 0x01: apic 5 int 16
> sdhc0: SDHC 4.0, 50 MHz base clock
> sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed, dma
> ppb2 at pci0 dev 2 function 4 "AMD AMD64 15h PCIE" rev 0x00: msi
> pci3 at ppb2 bus 4
> iwm0 at pci3 dev 0 function 0 "Intel Dual Band Wireless AC 7260" rev 0xbb, msi
> pchb2 at pci0 dev 3 function 0 "AMD AMD64 15h Host" rev 0x00
> "AMD AMD64 PSP 2.0" rev 0x00 at pci0 dev 8 function 0 not configured
> pchb3 at pci0 dev 9 function 0 vendor "AMD", unknown product 0x157d rev 0x00
> azalia1 at pci0 dev 9 function 2 "AMD AMD64 15h HD Audio" rev 0x00: apic 5 
> int 22
> azalia1: codecs: Conexant/0x5111
> audio0 at azalia1
> xhci0 at pci0 dev 16 function 0 "AMD Carrizo xHCI" rev 0x20: msi
> usb0 at xhci0: USB revision 3.0
> uhub0 at usb0 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 
> addr 1
> ahci0 at pci0 dev 17 function 0 "AMD Carrizo SATA" rev 0x49: msi, AHCI 1.3
> ahci0: port 0: 6.0Gb/s
> scsibus1 at ahci0: 32 targets
> sd0 at scsibus1 targ 0 lun 0: <ATA, SanDisk SD9TB8W2, X610> SCSI3 0/direct 
> fixed naa.5001b448b6548cd6
> sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
> ehci0 at pci0 dev 18 function 0 "AMD Carrizo USB2" rev 0x49: apic 4 int 18
> usb1 at ehci0: USB revision 2.0
> uhub1 at usb1 configuration 1 interface 0 "AMD EHCI root hub" rev 2.00/1.00 
> addr 1
> "AMD Carrizo SMBus" rev 0x4a at pci0 dev 20 function 0 not configured
> pcib0 at pci0 dev 20 function 3 "AMD Carrizo LPC" rev 0x11
> pchb4 at pci0 dev 24 function 0 "AMD AMD64 15h Link Cfg" rev 0x00
> pchb5 at pci0 dev 24 function 1 "AMD AMD64 15h Address Map" rev 0x00
> pchb6 at pci0 dev 24 function 2 "AMD AMD64 15h DRAM Cfg" rev 0x00
> pchb7 at pci0 dev 24 function 3 "AMD AMD64 15h Misc Cfg" rev 0x00
> pchb8 at pci0 dev 24 function 4 "AMD AMD64 15h CPU Power" rev 0x00
> pchb9 at pci0 dev 24 function 5 "AMD AMD64 15h Misc Cfg" rev 0x00
> isa0 at pcib0
> isadma0 at isa0
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> pckbd0 at pckbc0 (kbd slot)
> wskbd0 at pckbd0: console keyboard
> pms0 at pckbc0 (aux slot)
> wsmouse0 at pms0 mux 0
> wsmouse1 at pms0 mux 0
> pms0: Synaptics clickpad, firmware 8.2, 0x1e2b1 0x943300
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> vmm0 at mainbus0: SVM/RVI
> efifb0 at mainbus0: 1366x768, 32bpp
> wsdisplay0 at efifb0 mux 1: console (std, vt100 emulation), using wskbd0
> wsdisplay0: screen 1-5 added (std, vt100 emulation)
> uhub2 at uhub1 port 1 configuration 1 interface 0 "Advanced Micro Devices 
> product 0x7900" rev 2.00/0.18 addr 2
> uvideo0 at uhub2 port 3 configuration 1 interface 0 "Chicony Electronics 
> Co.,Ltd. Integrated Camera" rev 2.00/0.05 addr 3
> video0 at uvideo0
> vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006> SCSI2 0/direct fixed
> sd1: 244197MB, 512 bytes/sector, 500116577 sectors
> root on sd1a (42dd05e0410f8a49.a) swap on sd1b dump on sd1b
> iwm0: hw rev 0x140, fw ver 16.242414.0, address 90:2e:1c:90:1b:68

> Index: pcidevs
> ===================================================================
> RCS file: /home/los/cvs/src/sys/dev/pci/pcidevs,v
> retrieving revision 1.1836
> diff -u -p -r1.1836 pcidevs
> --- pcidevs   23 Feb 2018 07:04:57 -0000      1.1836
> +++ pcidevs   26 Feb 2018 02:24:17 -0000
> @@ -395,6 +395,7 @@ product O2MICRO OZ7134            0x7134  OZ711MP1 
>  product O2MICRO OZ7135               0x7135  OZ711EZ1 CardBus
>  product O2MICRO OZ7136               0x7136  OZ711SP1 CardBus
>  product O2MICRO OZ7223               0x7223  OZ711E0 CardBus
> +product O2MICRO OZ8621               0x8621  SD/MMC

'OZ8621 SD/MMC' perhaps?

>  
>  /* 3Com Products */
>  product 3COM 3C985           0x0001  3c985
> @@ -732,6 +733,18 @@ product AMD AMD64_16_HB          0x1536  AMD64 16
>  product AMD CCP                      0x1537  CCP
>  product AMD AMD64_16_3X_RC   0x1566  AMD64 16h Root Complex
>  product AMD AMD64_16_3X_HB   0x156b  AMD64 16h Host
> +product AMD AMD64_15_6X_LINK 0x1570  AMD64 15h Link Cfg
> +product AMD AMD64_15_6X_ADDR 0x1571  AMD64 15h Address Map
> +product AMD AMD64_15_6X_DRAM 0x1572  AMD64 15h DRAM Cfg
> +product AMD AMD64_15_6X_MISC 0x1573  AMD64 15h Misc Cfg
> +product AMD AMD64_15_6X_CPU_PM       0x1574  AMD64 15h CPU Power
> +product AMD AMD64_15_6X_MISC_2       0x1575  AMD64 15h Misc Cfg
> +product AMD AMD64_15_6X_RC   0x1576  AMD64 15h Root Complex
> +product AMD AMD64_15_6x_IOMMU        0x1577  AMD64 15/6xh IOMMU

You are mixing styles here

AMD64_15_6X_* 'AMD64 15h ' vs
AMD64_15_6x_* 'AMD64 15/6xh '

> +product AMD AMD64_15_6x_PSP  0x1578  AMD64 PSP 2.0
> +product AMD AMD64_15_6X_AUDIO        0x157a  AMD64 15h HD Audio
> +product AMD AMD64_15_6X_HB   0x157b  AMD64 15h Host
> +product AMD AMD64_15_PCIE_1  0x157c  AMD64 15h PCIE

You're missing the 0x157d Host Bridge that shows up in the dmesg.

product AMD AMD64_15_6X_HB_2    0x157d  AMD64 15h Host

>  product AMD AMD64_16_3X_LINK 0x1580  AMD64 16h Link Cfg
>  product AMD AMD64_16_3X_ADDR 0x1581  AMD64 16h Address Map
>  product AMD AMD64_16_3X_DRAM 0x1582  AMD64 16h DRAM Cfg
> @@ -843,6 +856,15 @@ product AMD HUDSON2_PCI          0x780f  Hudson-2
>  product AMD HUDSON2_XHCI     0x7812  Hudson-2 xHCI
>  product AMD BOLTON_SDMMC     0x7813  Bolton SD/MMC
>  product AMD BOLTON_XHCI              0x7814  Bolton xHCI
> +product AMD CARRIZO_SATA_1   0x7900  Carrizo SATA
> +product AMD CARRIZO_SATA_2   0x7901  Carrizo SATA
> +product AMD CARRIZO_SATA_3   0x7902  Carrizo SATA
> +product AMD CARRIZO_SATA_4   0x7903  Carrizo SATA
> +product AMD CARRIZO_SATA_5   0x7904  Carrizo SATA

This is mixing up the different modes, to match other pcidevs entries:

7900 SATA
7901 AHCI
7902 RAID
7903 RAID
7904 AHCI

The 15h BKDG document has

7900h  SATA in IDE mode
7901h  SATA in AHCI mode with MS driver
7904h  SATA in AHCI mode with AMD driver

> +product AMD CARRIZO_EHCI     0x7908  Carrizo USB2
> +product AMD CARRIZO_SMB              0x790b  Carrizo SMBus

Support for this can be added to piixpm(4) later.

> +product AMD CARRIZO_LPC              0x790e  Carrizo LPC
> +product AMD CARRIZO_XHCI     0x7914  Carrizo xHCI
>  product AMD RS780_HB         0x9600  RS780 Host
>  product AMD RS880_HB         0x9601  RS880 Host
>  product AMD RS780_PCIE_1     0x9602  RS780 PCIE
> @@ -1782,6 +1804,11 @@ product ATI RADEON_HD7310      0x9809  Radeon 
>  product ATI RADEON_HD7290    0x980a  Radeon HD 7290
>  product ATI RADEON_HDA               0x9840  Radeon HD Audio
>  product ATI MULLINS_1                0x9854  Mullins
> +product ATI CARRIZO_1                0x9870  Carrizo
> +product ATI CARRIZO_2                0x9874  Carrizo
> +product ATI CARRIZO_3                0x9875  Carrizo
> +product ATI CARRIZO_4                0x9876  Carrizo
> +product ATI CARRIZO_5                0x9877  Carrizo
>  product ATI ARUBA_1          0x9900  Aruba
>  product ATI RADEON_HD7660D   0x9901  Radeon HD 7660D
>  product ATI RADEON_HD7640G_1 0x9903  Radeon HD 7640G

Reply via email to