Re: [PATCH] Gemini Lake SoC pcidevs and eMMC

2020-02-05 Thread James Hastings
On 2/4/20, Patrick Wildt  wrote:
> On Wed, Jan 02, 2019 at 08:11:25PM -0500, James Hastings wrote:
>> Hello tech@
>> 
>> I would like to add PCI devices for latest Intel SoC (Gemini Lake).
>> 
>> Included a patch for sdhc(4) too that depends on this to enable eMMC.
>> The Intel eMMC controller does not like bus power going to 0V. There
>> may be other systems (Apollo Lake) that need this quirk too.
>> 
>> With both patches I am booting from internal eMMC on HP Stream 14.
>> 
>> Comments? ok?
> 
> Looks like we forgot this one year old diff.  I think the pcidevs
> change is probably fine.  I will cross-check it and put it in.
> 
> For the sdhc change the diff doesn't apply anymore since we added
> the same if-condition for 100series and apollo lake already.  I
> guess it's time to add gemini lake there as well.
> 

Thanks patrick@ for picking this up.

sdhc(4) changes for gemini lake have already been made.

Rebased diff with additional I2C devices.


Index: dev/pci/pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1915
diff -u -p -r1.1915 pcidevs
--- dev/pci/pcidevs 23 Jan 2020 04:33:54 -  1.1915
+++ dev/pci/pcidevs 5 Feb 2020 04:48:02 -
@@ -4587,9 +4587,40 @@ product INTEL WL_3165_1  0x3165  Dual Ban
 product INTEL WL_3165_20x3166  Dual Band Wireless AC 3165
 product INTEL GLK_UHD_605  0x3184  UHD Graphics 605
 product INTEL GLK_UHD_600  0x3185  UHD Graphics 600
+product INTEL GLK_DPTF 0x318c  Gemini Lake DPTF
+product INTEL GLK_GNA  0x3190  Gemini Lake GNA
+product INTEL GLK_PMC  0x3194  Gemini Lake PMC
+product INTEL GLK_HDA  0x3198  Gemini Lake HD Audio
+product INTEL GLK_XHCI 0x31a8  Gemini Lake xHCI
+product INTEL GLK_I2C_10x31ac  Gemini Lake I2C
+product INTEL GLK_I2C_20x31ae  Gemini Lake I2C
+product INTEL GLK_I2C_30x31b0  Gemini Lake I2C
+product INTEL GLK_I2C_40x31b2  Gemini Lake I2C
+product INTEL GLK_I2C_50x31b4  Gemini Lake I2C
+product INTEL GLK_I2C_60x31b6  Gemini Lake I2C
+product INTEL GLK_I2C_70x31b8  Gemini Lake I2C
+product INTEL GLK_I2C_80x31ba  Gemini Lake I2C
+product INTEL GLK_UART_1   0x31bc  Gemini Lake HSUART
+product INTEL GLK_UART_2   0x31be  Gemini Lake HSUART
+product INTEL GLK_UART_3   0x31c0  Gemini Lake HSUART
+product INTEL GLK_SPI_10x31c2  Gemini Lake SPI
+product INTEL GLK_SPI_20x31c4  Gemini Lake SPI
+product INTEL GLK_SPI_30x31c6  Gemini Lake SPI
 product INTEL GLK_SDMMC0x31ca  Gemini Lake SD/MMC
 product INTEL GLK_EMMC 0x31cc  Gemini Lake eMMC
 product INTEL GLK_SDIO 0x31d0  Gemini Lake SDIO
+product INTEL GLK_SMB  0x31d4  Gemini Lake SMBus
+product INTEL GLK_PCIE_1   0x31d6  Gemini Lake PCIE
+product INTEL GLK_PCIE_2   0x31d7  Gemini Lake PCIE
+product INTEL GLK_PCIE_3   0x31d8  Gemini Lake PCIE
+product INTEL GLK_PCIE_4   0x31d9  Gemini Lake PCIE
+product INTEL GLK_PCIE_5   0x31da  Gemini Lake PCIE
+product INTEL GLK_PCIE_6   0x31db  Gemini Lake PCIE
+product INTEL GLK_WL   0x31dc  Gemini Lake CNVi
+product INTEL GLK_AHCI 0x31e3  Gemini Lake AHCI
+product INTEL GLK_LPC  0x31e8  Gemini Lake LPC
+product INTEL GLK_UART_4   0x31ee  Gemini Lake HSUART
+product INTEL GLK_PCI_HB   0x31f0  Gemini Lake Host
 product INTEL 312440x3200  31244 SATA
 product INTEL 82855PM_HB   0x3340  82855PM Host
 product INTEL 82855PM_AGP  0x3341  82855PM AGP



Re: [PATCH] Gemini Lake SoC pcidevs and eMMC

2020-02-04 Thread Patrick Wildt
On Wed, Jan 02, 2019 at 08:11:25PM -0500, James Hastings wrote:
> Hello tech@
> 
> I would like to add PCI devices for latest Intel SoC (Gemini Lake).
> 
> Included a patch for sdhc(4) too that depends on this to enable eMMC.
> The Intel eMMC controller does not like bus power going to 0V. There
> may be other systems (Apollo Lake) that need this quirk too.
> 
> With both patches I am booting from internal eMMC on HP Stream 14.
> 
> Comments? ok?

Looks like we forgot this one year old diff.  I think the pcidevs
change is probably fine.  I will cross-check it and put it in.

For the sdhc change the diff doesn't apply anymore since we added
the same if-condition for 100series and apollo lake already.  I
guess it's time to add gemini lake there as well.

Patrick

> OpenBSD 6.4-current (GENERIC.MP) #22: Wed Jan  2 13:36:31 EST 2019
> ti...@sandisk.my.domain:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 4102090752 (3912MB)
> avail mem = 3968520192 (3784MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x75e02000 (36 entries)
> bios0: vendor Insyde version "F.02" date 05/23/2018
> bios0: HP HP Stream Laptop 14-cb1XX
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP UEFI IHIS UEFI SSDT TPM2 SSDT SSDT MSDM BDAT
> DBG2 DBGP HPET LPIT APIC MCFG NPKT PRAM WSMT SSDT SSDT SSDT SSDT SSDT
> SSDT SSDT FPDT WDAT BGRT
> acpi0: wakeup devices PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4)
> RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) XHC_(S4)
> HDAS(S3)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 1920 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Celeron(R) N4000 CPU @ 1.10GHz, 1097.30 MHz, 06-7a-01
> cpu0:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SGX,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
> cpu0: 4MB 64b/line 16-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 19MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.0.2.4.2.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Celeron(R) N4000 CPU @ 1.10GHz, 1096.98 MHz, 06-7a-01
> cpu1:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SGX,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
> cpu1: 4MB 64b/line 16-way L2 cache
> cpu1: smt 0, core 1, package 0
> ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 120 pins
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xe000, bus 0-63
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (RP01)
> acpiprt2 at acpi0: bus -1 (RP02)
> acpiprt3 at acpi0: bus -1 (RP03)
> acpiprt4 at acpi0: bus -1 (RP04)
> acpiprt5 at acpi0: bus 1 (RP05)
> acpiprt6 at acpi0: bus -1 (RP06)
> acpiec0 at acpi0
> ### AML PARSE ERROR (0x4cd5): Undefined name: SMA4
> error evaluating: \\_SB_.PCI0.LPCB.EC0_._REG
> acpiec _REG failed, broken BIOS
> acpipwrres0 at acpi0: DRST
> acpipwrres1 at acpi0: DRST
> acpipwrres2 at acpi0: DRST
> acpipwrres3 at acpi0: DRST
> acpipwrres4 at acpi0: DRST
> acpipwrres5 at acpi0: DRST
> acpicpu0 at acpi0: C3(10@150 mwait.1@0x60), C2(10@50 mwait.1@0x21),
> C1(1000@1 mwait.1@0x1), PSS
> acpicpu1 at acpi0: C3(10@150 mwait.1@0x60), C2(10@50 mwait.1@0x21),
> C1(1000@1 mwait.1@0x1), PSS
> acpitz0 at acpi0: critical temperature is 210 degC
> acpiac0 at acpi0: AC unit offline
> acpibtn0 at acpi0: LID0
> acpibtn1 at acpi0: PWRB
> acpibat0 at acpi0: BAT0 model "Primary" serial   type LION oem "HP"
> acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
> "HPQ6001" at acpi0 not configured
> "HPIC0003" at acpi0 not configured
> "*ETD0742" at acpi0 not configured
> acpicmos0 at acpi0
> "INT3453" at acpi0 not configured
> "INT33A1" at acpi0 not configured
> "MSFT0101" at acpi0 not configured
> "PNP0C14" at acpi0 not configured
> "INT3400" at acpi0 not configured
> "INT3403" at acpi0 not configured
> acpivideo0 at acpi0: GFX0
> acpivout0 at acpivideo0: DD1F
> cpu0: Enhanced SpeedStep 1097 MHz: speeds: 1101, 1100, 1000, 900, 800 MHz
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel Gemini Lake Host" rev 0x03
> "Intel Gemini Lake DPTF" rev 0x03 at pci0 dev 0 function 1 not configured
> "Intel Gemini Lake GNA" rev 0x03 at pci0 dev 0 

[PATCH] Gemini Lake SoC pcidevs and eMMC

2019-01-02 Thread James Hastings
Hello tech@

I would like to add PCI devices for latest Intel SoC (Gemini Lake).

Included a patch for sdhc(4) too that depends on this to enable eMMC.
The Intel eMMC controller does not like bus power going to 0V. There
may be other systems (Apollo Lake) that need this quirk too.

With both patches I am booting from internal eMMC on HP Stream 14.

Comments? ok?


OpenBSD 6.4-current (GENERIC.MP) #22: Wed Jan  2 13:36:31 EST 2019
ti...@sandisk.my.domain:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4102090752 (3912MB)
avail mem = 3968520192 (3784MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x75e02000 (36 entries)
bios0: vendor Insyde version "F.02" date 05/23/2018
bios0: HP HP Stream Laptop 14-cb1XX
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP UEFI IHIS UEFI SSDT TPM2 SSDT SSDT MSDM BDAT
DBG2 DBGP HPET LPIT APIC MCFG NPKT PRAM WSMT SSDT SSDT SSDT SSDT SSDT
SSDT SSDT FPDT WDAT BGRT
acpi0: wakeup devices PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4)
RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) XHC_(S4)
HDAS(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 1920 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Celeron(R) N4000 CPU @ 1.10GHz, 1097.30 MHz, 06-7a-01
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SGX,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 19MHz
cpu0: mwait min=64, max=64, C-substates=0.2.0.2.4.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Celeron(R) N4000 CPU @ 1.10GHz, 1096.98 MHz, 06-7a-01
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,SGX,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 120 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (RP01)
acpiprt2 at acpi0: bus -1 (RP02)
acpiprt3 at acpi0: bus -1 (RP03)
acpiprt4 at acpi0: bus -1 (RP04)
acpiprt5 at acpi0: bus 1 (RP05)
acpiprt6 at acpi0: bus -1 (RP06)
acpiec0 at acpi0
### AML PARSE ERROR (0x4cd5): Undefined name: SMA4
error evaluating: \\_SB_.PCI0.LPCB.EC0_._REG
acpiec _REG failed, broken BIOS
acpipwrres0 at acpi0: DRST
acpipwrres1 at acpi0: DRST
acpipwrres2 at acpi0: DRST
acpipwrres3 at acpi0: DRST
acpipwrres4 at acpi0: DRST
acpipwrres5 at acpi0: DRST
acpicpu0 at acpi0: C3(10@150 mwait.1@0x60), C2(10@50 mwait.1@0x21),
C1(1000@1 mwait.1@0x1), PSS
acpicpu1 at acpi0: C3(10@150 mwait.1@0x60), C2(10@50 mwait.1@0x21),
C1(1000@1 mwait.1@0x1), PSS
acpitz0 at acpi0: critical temperature is 210 degC
acpiac0 at acpi0: AC unit offline
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpibat0 at acpi0: BAT0 model "Primary" serial   type LION oem "HP"
acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
"HPQ6001" at acpi0 not configured
"HPIC0003" at acpi0 not configured
"*ETD0742" at acpi0 not configured
acpicmos0 at acpi0
"INT3453" at acpi0 not configured
"INT33A1" at acpi0 not configured
"MSFT0101" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"INT3400" at acpi0 not configured
"INT3403" at acpi0 not configured
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 1097 MHz: speeds: 1101, 1100, 1000, 900, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Gemini Lake Host" rev 0x03
"Intel Gemini Lake DPTF" rev 0x03 at pci0 dev 0 function 1 not configured
"Intel Gemini Lake GNA" rev 0x03 at pci0 dev 0 function 3 not configured
"Intel UHD Graphics 600" rev 0x03 at pci0 dev 2 function 0 not configured
azalia0 at pci0 dev 14 function 0 "Intel Gemini Lake HD Audio" rev 0x03: msi
azalia0: codecs: Realtek ALC282, Intel/0x280d, using Realtek ALC282
audio0 at azalia0
"Intel Gemini Lake MEI" rev 0x03 at pci0 dev 15 function 0 not configured
ppb0 at pci0 dev 19 function 0 "Intel Gemini Lake PCIE" rev 0xf3: msi
pci1 at ppb0 bus 1
"Realtek 8822BE" rev 0x00 at pci1 dev 0 function 0 not configured
xhci0 at pci0 dev 21 function 0 "Intel Gemini Lake xHCI" rev 0x03: msi,
xHCI 1.0