Commit Graph

17 Commits

Author SHA1 Message Date
Warner Losh
685dc743dc sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:36 -06:00
Vladimir Kondratyev
5adcec04b5 intelspi: Add support for ddb/kdb -compatible polled mode
Required for Apple and Microsoft -compatible HID-over-SPI drivers.

Most logic was already implemented in commit 3c08673438
"spibus: extend API: add cs_delay ivar, KEEP_CS and NO_SLEEP flags".
It dissallowed driver sleeps in the interrupt context. This commit
extends this feature to handle ddb/kdb context with following:
- Skip driver locking if SPI functions were called from kdb/ddb.
- Reinitialize controller if kdb/ddb initiated SPI transfer has
  interrupted another already running one. Does not work very
  reliable yet.

Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D41247
2023-08-03 19:10:50 +03:00
Vladimir Kondratyev
b109946d75 intelspi: Release LPSS reset on Sunrise Point controllers.
MacBookPro 14.1 SPI controller requires that to start functioning.

MFC after:	1 week
Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D41245
2023-08-03 19:10:50 +03:00
Vladimir Kondratyev
f56dbe7ad9 intelspi: Move ACPI/PCI ids table out of header file.
There is no reason to store it multiple times.

MFC after:	1 week
Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D41244
2023-08-03 19:10:50 +03:00
Vladimir Kondratyev
2a04c3a47b intelspi: Add generic resource methods to bus interface
That allows intelspi grandchildren to allocate IRQs

MFC after:	1 week
Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D41242
2023-08-03 19:10:50 +03:00
Vladimir Kondratyev
16ab2c318d intelspi: don't leak spibus on detach.
MFC after:      1 week
Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D41241
2023-08-03 19:10:49 +03:00
Vladimir Kondratyev
d101156ec6 intelspi(4): Add missing driver mutex unlock in NO_SLEEP mode
Fixes: 1f40866feb ("intelspi: add PCI attachment (Lynx/Wildcat/Sunrise Point)")

MFC after:	1 week
2023-07-31 17:30:24 +03:00
Val Packett
1f40866feb intelspi: add PCI attachment (Lynx/Wildcat/Sunrise Point)
Also adds fixups and cleanups:

- apply the child's mode/speed
- implement suspend/resume support
- use RF_SHAREABLE interrupts
- use bus_delayed_attach_children since the transfer can use interrupts
- add support for newly added spibus features (cs_delay and flags)

Operation tested on Broadwell (Wildcat Point) MacBookPro12,1.
Attachment also tested on Kaby Lake (Sunrise Point) Pixelbook.

Reviewed by:	wulf
MFC after:	1 month
Differential revision:	https://reviews.freebsd.org/D29249
2023-04-24 12:41:52 +03:00
John Baldwin
289b5607da pchtherm/intelspi: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-09 12:22:02 -07:00
Vladimir Kondratyev
6678e75e4f pchtherm: Add IDs for CannonLake-H, CometLake and Lewisburg controllers
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2021-04-14 13:15:19 +03:00
Michal Vanco
5084dde5f0 pchtherm: fix a wrong bit and a wrong register use
Probably just copy-paste errors that slipped in.

PR:		253915
Reported by:	Michal Vanco <michal.vanco@gmail.com>
MFC after:	1 week
2021-03-05 11:01:28 +02:00
Takanori Watanabe
e26b9046a0 Add Cannon Point PCH Thermal Controller Device ID.
PR:	249047
Reported by: Dries Michiels <driesm.michiels at gmail.com>
2020-09-01 15:33:57 +00:00
Takanori Watanabe
c30797873f Add Platform Controller Hub built-in thermal management device driver.
Differential Revision:	https://reviews.freebsd.org/D24077
2020-03-31 06:25:43 +00:00
Takanori Watanabe
5efca36fbd Distinguish _CID match and _HID match and make lower priority probe
when _CID match.

Reviewed by: jhb, imp
Differential Revision:https://reviews.freebsd.org/D16468
2018-10-26 00:05:46 +00:00
Konstantin Belousov
fc71a66be0 intelspi: don't leak spibus children on detach.
Submitted by:	Yuri Pankov
MFC after:	1 week
Approved by:	re (gjb)
Differential revision:	https://reviews.freebsd.org/D17076
2018-09-08 18:57:29 +00:00
Mark Johnston
9ef958c702 Specify the correct resource type in teardown paths.
Submitted by:	Yuri Pankov <yuripv@yuripv.net>
Approved by:	re (kib)
MFC after:	1 week
2018-09-07 21:12:37 +00:00
Oleksandr Tymoshenko
d786719d90 [intelspi] Add SPI driver for Intel BayTrail SoC
Add SPI mode (PIO-only) support for Intel Synchronous Serial Port that
can be found in several Intel's products starting from PXA family.
Most of implementations have slight differences in behavior and in
addresses for registers subset. This driver covers only BayTrail SoC
implementation for it's the only hardware I have to test it on.

Driver attaches to ACPI bus only and does not have PCI or FDT support
for now due to lack of hardware to test it on.

"intelspi" is the best name I've managed to come up with. Linux driver
name (spi-pxa2xx) does not make sense because current implementation
does not support actual PXA2xx SoCs. And as far as I know there is no
codename assigned to Intel SSP chip.

Reviewed by:	br, manu
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D8896
2016-12-27 22:37:24 +00:00