[PATCH] Gemini Lake SoC pcidevs and eMMC

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Gemini Lake SoC pcidevs and eMMC

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
    [hidden email]:/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: 19200000 Hz
acpimadt0 at acpi0 addr 0xfee00000: 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 0xfec00000, version 20, 120 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, 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: 0x00000000 0x00000011 0x00000001
"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
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev
3.00/1.00 addr 1
sdhc0 at pci0 dev 28 function 0 "Intel Gemini Lake eMMC" rev 0x03: apic
1 int 39
sdhc0: SDHC 3.0, 200 MHz base clock
sdmmc0 at sdhc0: 8-bit, sd high-speed, mmc high-speed, dma
pcib0 at pci0 dev 31 function 0 "Intel Gemini Lake LPC" rev 0x03
"Intel Gemini Lake SMBus" rev 0x03 at pci0 dev 31 function 1 not configured
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
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
wbsio0 at isa0 port 0x2e/2: W83627EHF rev 0x87
vmm0 at mainbus0: VMX/EPT (using slow L1TF mitigation)
efifb0 at mainbus0: 1366x768, 32bpp
wsdisplay0 at efifb0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
scsibus1 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus1 targ 1 lun 0: <Sandisk, DF4032, 0000> SCSI2 0/direct
removable
sd0: 29820MB, 512 bytes/sector, 61071360 sectors
urtwn0 at uhub0 port 2 configuration 1 interface 0 "Realtek 802.11n WLAN
Adapter" rev 2.00/2.00 addr 2
urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R, address
ugen0 at uhub0 port 5 "Realtek Bluetooth Radio" rev 1.10/1.10 addr 3
uvideo0 at uhub0 port 6 configuration 1 interface 0 "Chicony Electronics
Co.,Ltd. HP Webcam" rev 2.00/40.60 addr 4
video0 at uvideo0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (283133d7296536b2.a) swap on sd0b dump on sd0b

Index: dev/pci/pcidevs
===================================================================
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1873
diff -u -p -r1.1873 pcidevs
--- dev/pci/pcidevs 18 Dec 2018 04:25:16 -0000 1.1873
+++ dev/pci/pcidevs 2 Jan 2019 21:36:43 -0000
@@ -4384,6 +4384,36 @@ product INTEL RCU32 0x3092 RCU32 I2O RA
 product INTEL 3124 0x3124 3124 SATA
 product INTEL WL_3165_1 0x3165 Dual Band Wireless AC 3165
 product INTEL WL_3165_2 0x3166 Dual Band Wireless AC 3165
+product INTEL GEMINILAKE_IGD_1 0x3184 UHD Graphics 605
+product INTEL GEMINILAKE_IGD_2 0x3185 UHD Graphics 600
+product INTEL GEMINILAKE_DPTF 0x318c Gemini Lake DPTF
+product INTEL GEMINILAKE_GNA 0x3190 Gemini Lake GNA
+product INTEL GEMINILAKE_PMC 0x3194 Gemini Lake PMC
+product INTEL GEMINILAKE_HDA 0x3198 Gemini Lake HD Audio
+product INTEL GEMINILAKE_MEI 0x319a Gemini Lake MEI
+product INTEL GEMINILAKE_XHCI 0x31a8 Gemini Lake xHCI
+product INTEL GEMINILAKE_I2C_1 0x31ac Gemini Lake I2C
+product INTEL GEMINILAKE_UART_1 0x31bc Gemini Lake HSUART
+product INTEL GEMINILAKE_UART_2 0x31be Gemini Lake HSUART
+product INTEL GEMINILAKE_UART_3 0x31c0 Gemini Lake HSUART
+product INTEL GEMINILAKE_SPI_1 0x31c2 Gemini Lake SPI
+product INTEL GEMINILAKE_SPI_2 0x31c4 Gemini Lake SPI
+product INTEL GEMINILAKE_SPI_3 0x31c6 Gemini Lake SPI
+product INTEL GEMINILAKE_SD 0x31ca Gemini Lake SD/MMC
+product INTEL GEMINILAKE_EMMC 0x31cc Gemini Lake eMMC
+product INTEL GEMINILAKE_SDIO 0x31d0 Gemini Lake SDIO
+product INTEL GEMINILAKE_SMB 0x31d4 Gemini Lake SMBus
+product INTEL GEMINILAKE_PCIE_1 0x31d6 Gemini Lake PCIE
+product INTEL GEMINILAKE_PCIE_2 0x31d7 Gemini Lake PCIE
+product INTEL GEMINILAKE_PCIE_3 0x31d8 Gemini Lake PCIE
+product INTEL GEMINILAKE_PCIE_4 0x31d9 Gemini Lake PCIE
+product INTEL GEMINILAKE_PCIE_5 0x31da Gemini Lake PCIE
+product INTEL GEMINILAKE_PCIE_6 0x31db Gemini Lake PCIE
+product INTEL GEMINIlAKE_WL 0x31dc Gemini Lake CNVi
+product INTEL GEMINILAKE_AHCI 0x31e3 Gemini Lake AHCI
+product INTEL GEMINILAKE_LPC 0x31e8 Gemini Lake LPC
+product INTEL GEMINILAKE_UART_4 0x31ee Gemini Lake HSUART
+product INTEL GEMINILAKE_HOST 0x31f0 Gemini Lake Host
 product INTEL 31244 0x3200 31244 SATA
 product INTEL 82855PM_HB 0x3340 82855PM Host
 product INTEL 82855PM_AGP 0x3341 82855PM AGP

Index: dev/pci/sdhc_pci.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/sdhc_pci.c,v
retrieving revision 1.20
diff -u -p -r1.20 sdhc_pci.c
--- dev/pci/sdhc_pci.c 30 Apr 2016 11:32:23 -0000 1.20
+++ dev/pci/sdhc_pci.c 2 Jan 2019 23:17:39 -0000
@@ -127,6 +127,11 @@ sdhc_pci_attach(struct device *parent, s
     PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ENE_SDCARD)
  sc->sc.sc_flags |= SDHC_F_NOPWR0;

+ /* Some Intel eMMC controllers break if set to 0V bus power. */
+ if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_INTEL &&
+    PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_INTEL_GEMINILAKE_EMMC)
+ sc->sc.sc_flags |= SDHC_F_NOPWR0;
+
  /* Some RICOH controllers need to be bumped into the right mode. */
  if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_RICOH &&
     (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_RICOH_R5U822 ||

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Gemini Lake SoC pcidevs and eMMC

Patrick Wildt-3
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
>     [hidden email]:/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: 19200000 Hz
> acpimadt0 at acpi0 addr 0xfee00000: 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 0xfec00000, version 20, 120 pins
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xe0000000, 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: 0x00000000 0x00000011 0x00000001
> "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
> usb0 at xhci0: USB revision 3.0
> uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev
> 3.00/1.00 addr 1
> sdhc0 at pci0 dev 28 function 0 "Intel Gemini Lake eMMC" rev 0x03: apic
> 1 int 39
> sdhc0: SDHC 3.0, 200 MHz base clock
> sdmmc0 at sdhc0: 8-bit, sd high-speed, mmc high-speed, dma
> pcib0 at pci0 dev 31 function 0 "Intel Gemini Lake LPC" rev 0x03
> "Intel Gemini Lake SMBus" rev 0x03 at pci0 dev 31 function 1 not configured
> 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
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> wbsio0 at isa0 port 0x2e/2: W83627EHF rev 0x87
> vmm0 at mainbus0: VMX/EPT (using slow L1TF mitigation)
> efifb0 at mainbus0: 1366x768, 32bpp
> wsdisplay0 at efifb0 mux 1: console (std, vt100 emulation), using wskbd0
> wsdisplay0: screen 1-5 added (std, vt100 emulation)
> scsibus1 at sdmmc0: 2 targets, initiator 0
> sd0 at scsibus1 targ 1 lun 0: <Sandisk, DF4032, 0000> SCSI2 0/direct
> removable
> sd0: 29820MB, 512 bytes/sector, 61071360 sectors
> urtwn0 at uhub0 port 2 configuration 1 interface 0 "Realtek 802.11n WLAN
> Adapter" rev 2.00/2.00 addr 2
> urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R, address
> ugen0 at uhub0 port 5 "Realtek Bluetooth Radio" rev 1.10/1.10 addr 3
> uvideo0 at uhub0 port 6 configuration 1 interface 0 "Chicony Electronics
> Co.,Ltd. HP Webcam" rev 2.00/40.60 addr 4
> video0 at uvideo0
> vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> root on sd0a (283133d7296536b2.a) swap on sd0b dump on sd0b
>
> Index: dev/pci/pcidevs
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/pcidevs,v
> retrieving revision 1.1873
> diff -u -p -r1.1873 pcidevs
> --- dev/pci/pcidevs 18 Dec 2018 04:25:16 -0000 1.1873
> +++ dev/pci/pcidevs 2 Jan 2019 21:36:43 -0000
> @@ -4384,6 +4384,36 @@ product INTEL RCU32 0x3092 RCU32 I2O RA
>  product INTEL 3124 0x3124 3124 SATA
>  product INTEL WL_3165_1 0x3165 Dual Band Wireless AC 3165
>  product INTEL WL_3165_2 0x3166 Dual Band Wireless AC 3165
> +product INTEL GEMINILAKE_IGD_1 0x3184 UHD Graphics 605
> +product INTEL GEMINILAKE_IGD_2 0x3185 UHD Graphics 600
> +product INTEL GEMINILAKE_DPTF 0x318c Gemini Lake DPTF
> +product INTEL GEMINILAKE_GNA 0x3190 Gemini Lake GNA
> +product INTEL GEMINILAKE_PMC 0x3194 Gemini Lake PMC
> +product INTEL GEMINILAKE_HDA 0x3198 Gemini Lake HD Audio
> +product INTEL GEMINILAKE_MEI 0x319a Gemini Lake MEI
> +product INTEL GEMINILAKE_XHCI 0x31a8 Gemini Lake xHCI
> +product INTEL GEMINILAKE_I2C_1 0x31ac Gemini Lake I2C
> +product INTEL GEMINILAKE_UART_1 0x31bc Gemini Lake HSUART
> +product INTEL GEMINILAKE_UART_2 0x31be Gemini Lake HSUART
> +product INTEL GEMINILAKE_UART_3 0x31c0 Gemini Lake HSUART
> +product INTEL GEMINILAKE_SPI_1 0x31c2 Gemini Lake SPI
> +product INTEL GEMINILAKE_SPI_2 0x31c4 Gemini Lake SPI
> +product INTEL GEMINILAKE_SPI_3 0x31c6 Gemini Lake SPI
> +product INTEL GEMINILAKE_SD 0x31ca Gemini Lake SD/MMC
> +product INTEL GEMINILAKE_EMMC 0x31cc Gemini Lake eMMC
> +product INTEL GEMINILAKE_SDIO 0x31d0 Gemini Lake SDIO
> +product INTEL GEMINILAKE_SMB 0x31d4 Gemini Lake SMBus
> +product INTEL GEMINILAKE_PCIE_1 0x31d6 Gemini Lake PCIE
> +product INTEL GEMINILAKE_PCIE_2 0x31d7 Gemini Lake PCIE
> +product INTEL GEMINILAKE_PCIE_3 0x31d8 Gemini Lake PCIE
> +product INTEL GEMINILAKE_PCIE_4 0x31d9 Gemini Lake PCIE
> +product INTEL GEMINILAKE_PCIE_5 0x31da Gemini Lake PCIE
> +product INTEL GEMINILAKE_PCIE_6 0x31db Gemini Lake PCIE
> +product INTEL GEMINIlAKE_WL 0x31dc Gemini Lake CNVi
> +product INTEL GEMINILAKE_AHCI 0x31e3 Gemini Lake AHCI
> +product INTEL GEMINILAKE_LPC 0x31e8 Gemini Lake LPC
> +product INTEL GEMINILAKE_UART_4 0x31ee Gemini Lake HSUART
> +product INTEL GEMINILAKE_HOST 0x31f0 Gemini Lake Host
>  product INTEL 31244 0x3200 31244 SATA
>  product INTEL 82855PM_HB 0x3340 82855PM Host
>  product INTEL 82855PM_AGP 0x3341 82855PM AGP
>
> Index: dev/pci/sdhc_pci.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/sdhc_pci.c,v
> retrieving revision 1.20
> diff -u -p -r1.20 sdhc_pci.c
> --- dev/pci/sdhc_pci.c 30 Apr 2016 11:32:23 -0000 1.20
> +++ dev/pci/sdhc_pci.c 2 Jan 2019 23:17:39 -0000
> @@ -127,6 +127,11 @@ sdhc_pci_attach(struct device *parent, s
>      PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ENE_SDCARD)
>   sc->sc.sc_flags |= SDHC_F_NOPWR0;
>
> + /* Some Intel eMMC controllers break if set to 0V bus power. */
> + if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_INTEL &&
> +    PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_INTEL_GEMINILAKE_EMMC)
> + sc->sc.sc_flags |= SDHC_F_NOPWR0;
> +
>   /* Some RICOH controllers need to be bumped into the right mode. */
>   if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_RICOH &&
>      (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_RICOH_R5U822 ||
>

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Gemini Lake SoC pcidevs and eMMC

James Hastings
In reply to this post by James Hastings
On 2/4/20, Patrick Wildt <[hidden email]> 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 -0000 1.1915
+++ dev/pci/pcidevs 5 Feb 2020 04:48:02 -0000
@@ -4587,9 +4587,40 @@ product INTEL WL_3165_1 0x3165 Dual Ban
 product INTEL WL_3165_2 0x3166 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_1 0x31ac Gemini Lake I2C
+product INTEL GLK_I2C_2 0x31ae Gemini Lake I2C
+product INTEL GLK_I2C_3 0x31b0 Gemini Lake I2C
+product INTEL GLK_I2C_4 0x31b2 Gemini Lake I2C
+product INTEL GLK_I2C_5 0x31b4 Gemini Lake I2C
+product INTEL GLK_I2C_6 0x31b6 Gemini Lake I2C
+product INTEL GLK_I2C_7 0x31b8 Gemini Lake I2C
+product INTEL GLK_I2C_8 0x31ba 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_1 0x31c2 Gemini Lake SPI
+product INTEL GLK_SPI_2 0x31c4 Gemini Lake SPI
+product INTEL GLK_SPI_3 0x31c6 Gemini Lake SPI
 product INTEL GLK_SDMMC 0x31ca 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 31244 0x3200 31244 SATA
 product INTEL 82855PM_HB 0x3340 82855PM Host
 product INTEL 82855PM_AGP 0x3341 82855PM AGP