Linus Torvalds
8c94ccc7cd
Merge tag 'usb-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
...
Pull USB / Thunderbolt updates from Greg KH:
"Here is the big set of USB and Thunderbolt changes for 6.8-rc1.
Included in here are the following:
- Thunderbolt subsystem and driver updates for USB 4 hardware and
issues reported by real devices
- xhci driver updates
- dwc3 driver updates
- uvc_video gadget driver updates
- typec driver updates
- gadget string functions cleaned up
- other small changes
All of these have been in the linux-next tree for a while with no
reported issues"
* tag 'usb-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (169 commits)
usb: typec: tipd: fix use of device-specific init function
usb: typec: tipd: Separate reset for TPS6598x
usb: mon: Fix atomicity violation in mon_bin_vma_fault
usb: gadget: uvc: Remove nested locking
usb: gadget: uvc: Fix use are free during STREAMOFF
usb: typec: class: fix typec_altmode_put_partner to put plugs
dt-bindings: usb: dwc3: Limit num-hc-interrupters definition
dt-bindings: usb: xhci: Add num-hc-interrupters definition
xhci: add support to allocate several interrupters
USB: core: Use device_driver directly in struct usb_driver and usb_device_driver
arm64: dts: mediatek: mt8195: Add 'rx-fifo-depth' for cherry
usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer
dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue
arm64: dts: qcom: msm8996: Remove PNoC clock from MSS
arm64: dts: qcom: msm8996: Remove AGGRE2 clock from SLPI
arm64: dts: qcom: msm8998: Remove AGGRE2 clock from SLPI
arm64: dts: qcom: msm8939: Drop RPM bus clocks
arm64: dts: qcom: sdm630: Drop RPM bus clocks
arm64: dts: qcom: qcs404: Drop RPM bus clocks
arm64: dts: qcom: msm8996: Drop RPM bus clocks
...
2024-01-18 11:43:55 -08:00
David E. Box
669f157fd7
platform/x86/intel/pmc: Add missing extern
...
Add missing extern for tgl_h_reg_map. Fixes sparse warning:
drivers/platform/x86/intel/pmc/tgl.c:213:26: warning: symbol 'tgl_h_reg_map' was not declared. Should it be static?
Fixes: 544f7b7f65 ("platform/x86/intel/pmc: Add regmap for Tiger Lake H PCH")
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Link: https://lore.kernel.org/r/20231223032548.1680738-9-david.e.box@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2024-01-02 13:26:31 +01:00
David E. Box
6f9fac5535
platform/x86/intel/pmc/lnl: Add GBE LTR ignore during suspend
...
Add the GBE LTR ignore suspend time fix for Lunar Lake.
Fixes: 119652b855e6 ("platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver")
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Link: https://lore.kernel.org/r/20231223032548.1680738-8-david.e.box@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2024-01-02 13:26:28 +01:00
David E. Box
10ed9ee0af
platform/x86/intel/pmc/arl: Add GBE LTR ignore during suspend
...
Add the GBE LTR ignore suspend time fix for Arrow Lake.
Fixes: f34dcf397286 ("platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver")
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Link: https://lore.kernel.org/r/20231223032548.1680738-7-david.e.box@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2024-01-02 13:26:20 +01:00
Hans de Goede
2ad815797e
Merge tag 'platform-drivers-x86-v6.7-6' into pdx86/for-next
...
Merge the 'platform-drivers-x86-v6.7-6' fixes into pdx86/for-next
so that the "Intel PMC GBE LTR regression" fixes can also be
applied to the new Arrow Lake and Lunar Lake platform support
code in pdx86/for-next .
2024-01-02 13:13:01 +01:00
Srinivas Pandruvada
27f2b08735
platform/x86: intel-uncore-freq: Add additional client processors
...
Add support for client processors starting from Kaby Lake.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com >
Link: https://lore.kernel.org/r/20231222203957.1348043-1-srinivas.pandruvada@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2024-01-01 16:19:09 +01:00
David E. Box
70681aa074
platform/x86/intel/pmc: Move GBE LTR ignore to suspend callback
...
Commit 804951203a ("platform/x86:intel/pmc: Combine core_init() and
core_configure()") caused a network performance regression due to the GBE
LTR ignore that it added at probe. This was needed in order to allow the
SoC to enter the deepest Package C state. To fix the regression and at
least support PC10 during suspend, move the LTR ignore from probe to the
suspend callback, and enable it again on resume. This solution will allow
PC10 during suspend but restrict Package C entry at runtime to no deeper
than PC8/9 while a network cable it attach to the PCH LAN.
Fixes: 804951203a ("platform/x86:intel/pmc: Combine core_init() and core_configure()")
Signed-off-by: "David E. Box" <david.e.box@linux.intel.com >
Link: https://lore.kernel.org/r/20231223032548.1680738-6-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2023-12-29 15:31:22 +02:00
David E. Box
6f9cc5c1f9
platform/x86/intel/pmc: Allow reenabling LTRs
...
Commit 804951203a ("platform/x86:intel/pmc: Combine core_init() and
core_configure()") caused a network performance regression due to the GBE
LTR ignore that it added during probe. The fix will move the ignore to
occur at suspend-time (so as to not affect suspend power). This will
require the ability to enable the LTR again on resume. Modify
pmc_core_send_ltr_ignore() to allow enabling an LTR.
Fixes: 804951203a ("platform/x86:intel/pmc: Combine core_init() and core_configure()")
Signed-off-by: "David E. Box" <david.e.box@linux.intel.com >
Link: https://lore.kernel.org/r/20231223032548.1680738-5-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2023-12-29 15:31:15 +02:00
David E. Box
7c13f365ae
platform/x86/intel/pmc: Add suspend callback
...
Add a suspend callback to struct pmc for performing platform specific tasks
before device suspend. This is needed in order to perform GBE LTR ignore on
certain platforms at suspend-time instead of at probe-time and replace the
GBE LTR ignore removal that was done in order to fix a bug introduced by
commit 804951203a ("platform/x86:intel/pmc: Combine core_init() and
core_configure()").
Fixes: 804951203a ("platform/x86:intel/pmc: Combine core_init() and core_configure()")
Signed-off-by: "David E. Box" <david.e.box@linux.intel.com >
Link: https://lore.kernel.org/r/20231223032548.1680738-4-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2023-12-29 15:31:08 +02:00
Rajvi Jingar
3748dfdae2
platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver
...
Add Lunar Lake M support in intel_pmc_core driver
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Link: https://lore.kernel.org/r/20231219042216.2592029-8-rajvi.jingar@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-28 10:06:44 +01:00
Rajvi Jingar
83f168a1a4
platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver
...
Add Arrow Lake S support in intel_pmc_core driver
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Link: https://lore.kernel.org/r/20231219042216.2592029-7-rajvi.jingar@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-28 10:06:44 +01:00
Rajvi Jingar
1d62ada48d
platform/x86/intel/pmc: Add ssram_init flag in PMC discovery in Meteor Lake
...
If PMC discovery using pmc_core_ssram_init() was unsuccessful for the
Meteor Lake platform, the legacy enumeration method is used. In this
case pci device struct for the PMC SSRAM is not available
and pmc_core_ssram_get_lpm_reqs() will not work. Add ssram_init flag to
indicate if the PMC SSRAM initialization was successful or not. Call
pmc_core_ssram_get_lpm_reqs() only if the ssram_init flag is set to true.
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Link: https://lore.kernel.org/r/20231219042216.2592029-6-rajvi.jingar@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-19 16:48:27 +01:00
Rajvi Jingar
d79c3c82ee
platform/x86/intel/pmc: Move common code to core.c
...
Functions like mtl_set_device_d3() and mtl_punit_pmt_init() were added for
Meteor Lake. To be able to use them in Arrow Lake and future platforms,
move them to core.c.
Also, to support different guids, add guid argument in
pmc_core_punit_pmt_init() and to support different PCI function numbers,
add func arg in pmc_core_ssram_init().
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Link: https://lore.kernel.org/r/20231219042216.2592029-5-rajvi.jingar@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-19 16:48:24 +01:00
Rajvi Jingar
d873f38052
platform/x86/intel/pmc: Add PSON residency counter for Alder Lake
...
Add PSON register offsets for Alder Lake PCH that provides an access to
PSON residency counter.
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Link: https://lore.kernel.org/r/20231219042216.2592029-4-rajvi.jingar@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-19 16:48:22 +01:00
Rajvi Jingar
544f7b7f65
platform/x86/intel/pmc: Add regmap for Tiger Lake H PCH
...
Tiger Lake H PCH is same as Tiger Lake LP PCH from the driver
perspective with the addition of the PSON residency counter. Add regmap
for TGP H to add PSON register offsets for Tiger Lake H PCH.
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Link: https://lore.kernel.org/r/20231219042216.2592029-3-rajvi.jingar@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-19 16:48:20 +01:00
Rajvi Jingar
b6258fa2c7
platform/x86/intel/pmc: Add PSON residency counter
...
Tiger Lake platform onwards, devices have the capability to track the
duration of time that their Power Supply Units (PSUs) are turned off
during S0ix. This patch adds a debugfs file `pson_residency_usec` to
provide access to this counter.
Signed-off-by: Michael Bottini <michael.a.bottini@linux.intel.com >
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Link: https://lore.kernel.org/r/20231219042216.2592029-2-rajvi.jingar@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-19 16:48:17 +01:00
Rajvi Jingar
1f5e56c9f6
platform/x86/intel/pmc: Fix in mtl_punit_pmt_init()
...
pci_get_domain_bus_and_slot() increases the reference count on the pci
device that is used to register the endpoint. In case of failure in
registration, decrease reference count using pci_dev_put(pcidev) before
returning.
Fixes: 6e79648553 ("platform/x86/intel/pmc: Show Die C6 counter on Meteor Lake")
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Link: https://lore.kernel.org/r/20231219042216.2592029-1-rajvi.jingar@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-19 16:48:05 +01:00
Rajvi Jingar
a92d307824
platform/x86/intel/pmc: Fix in pmc_core_ssram_get_pmc()
...
Passing PMC_IDX_MAIN in pmc_core_pmc_add() adds only primary pmc to pmcdev.
Use pmc_idx instead to add all available pmcs.
Fixes: a01486dc4b ("platform/x86/intel/pmc: Cleanup SSRAM discovery")
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231216011702.1976408-1-rajvi.jingar@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-18 15:01:19 +01:00
Rajvi Jingar
784a004746
platform/x86/intel/vsec: Add support for Lunar Lake M
...
Add Lunar Lake M PMT telemetry support.
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231216005146.1735455-1-rajvi.jingar@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-18 15:01:13 +01:00
Rajvi Jingar
fbcf67ce5a
platform/x86/intel/pmc: Fix hang in pmc_core_send_ltr_ignore()
...
For input value 0, PMC stays unassigned which causes crash while trying
to access PMC for register read/write. Include LTR index 0 in pmc_index
and ltr_index calculation.
Fixes: 2bcef45292 ("platform/x86:intel/pmc: Enable debugfs multiple PMC support")
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231216011650.1973941-1-rajvi.jingar@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2023-12-18 14:45:32 +02:00
Dmitry Baryshkov
0dbda97186
usb: typec: change altmode SVID to u16 entry
...
As stated in the changelog for the commit 7b458a4c5d ("usb: typec: Add
typec_port_register_altmodes()"), the code should be adjusted according
to the AltMode bindings. As the SVID is 16 bits wide (according to the
USB PD Spec), use fwnode_property_read_u16() to read it.
Acked-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20231204020303.2287338-3-dmitry.baryshkov@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-12-15 13:53:45 +01:00
Hans de Goede
23e652467d
Merge tag 'platform-drivers-x86-v6.7-3' into pdx86/for-next
...
Back merge pdx86 fixes into pdx86/for-next for further WMI work
depending on some of the fixes.
platform-drivers-x86 for v6.7-3
Highlights:
- asus-wmi: Solve i8042 filter resource handling, input, and
suspend issues
- wmi: Skip zero instance WMI blocks to avoid issues with
some laptops
- mlxbf-bootctl: Differentiate dev/production keys
- platform/surface: Correct serdev related return value to avoid
leaking errno into userspace
- Error checking fixes
The following is an automated shortlog grouped by driver:
asus-wmi:
- Change q500a_i8042_filter() into a generic i8042-filter
- disable USB0 hub on ROG Ally before suspend
- Filter Volume key presses if also reported via atkbd
- Move i8042 filter install to shared asus-wmi code
mellanox:
- Add null pointer checks for devm_kasprintf()
- Check devm_hwmon_device_register_with_groups() return value
mlxbf-bootctl:
- correctly identify secure boot with development keys
surface: aggregator:
- fix recv_buf() return value
wmi:
- Skip blocks with zero instances
2023-12-11 11:22:02 +01:00
Srinivas Pandruvada
b06458d1b1
platform/x86/intel-uncore-freq: Process read/write blocked feature status
...
When a feature is read blocked, don't continue to read uncore information
and register with uncore core.
When the feature is write blocked, continue to offer read interface but
block setting uncore limits.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231204221740.3645130-6-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-11 11:06:41 +01:00
Srinivas Pandruvada
8bed9ff7db
platform/x86: ISST: Process read/write blocked feature status
...
When a feature is read blocked, don't continue to read SST information
and register with SST core.
When the feature is write blocked, continue to offer read interface for
SST parameters, but don't allow any operation to change state. A state
change results from SST level change, feature change or class of service
change.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231204221740.3645130-5-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-11 11:06:41 +01:00
Srinivas Pandruvada
046d7be621
platform/x86/intel/tpmi: Move TPMI ID definition
...
Move TPMI ID definitions to common include file. In this way other
feature drivers don't have to redefine.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231204221740.3645130-4-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-11 11:06:41 +01:00
Srinivas Pandruvada
72dd14d241
platform/x86/intel/tpmi: Modify external interface to get read/write state
...
Modify the external interface tpmi_get_feature_status() to get read
and write blocked instead of locked and disabled. Since auxiliary device
is not created when disabled, no use of returning disabled state. Also
locked state is not useful as feature driver can't use locked state
in a meaningful way.
Using read and write state, feature driver can decide which operations
to restrict for that feature.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231204221740.3645130-3-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-11 11:06:41 +01:00
Srinivas Pandruvada
b87434f2e6
platform/x86/intel/tpmi: Don't create devices for disabled features
...
If some TPMI features are disabled, don't create auxiliary devices. In
this way feature drivers will not load.
While creating auxiliary devices, call tpmi_read_feature_status() to
check feature state and return if the feature is disabled without
creating a device.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231204221740.3645130-2-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-11 11:06:41 +01:00
Hans de Goede
14c200b7ca
platform/x86: intel-vbtn: Fix missing tablet-mode-switch events
...
2 issues have been reported on the Dell Inspiron 7352:
1. Sometimes the tablet-mode-switch stops reporting tablet-mode
change events.
Add a "VBDL" call to notify_handler() to work around this.
2. Sometimes the tablet-mode is incorrect after suspend/resume
Add a detect_tablet_mode() to resume() to fix this.
Reported-by: Arnold Gozum <arngozum@gmail.com >
Closes: https://lore.kernel.org/platform-driver-x86/87271a74-c831-4eec-b7a4-1371d0e42471@gmail.com/
Tested-by: Arnold Gozum <arngozum@gmail.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://lore.kernel.org/r/20231204150601.46976-1-hdegoede@redhat.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2023-12-08 12:56:26 +02:00
David E. Box
6e79648553
platform/x86/intel/pmc: Show Die C6 counter on Meteor Lake
...
Expose the Die C6 counter on Meteor Lake.
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-21-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
David E. Box
3621df43b0
platform/x86/intel/pmc: Add debug attribute for Die C6 counter
...
Add a "die_c6_us_show" debugfs attribute. Reads the counter value using
Intel Platform Monitoring Technology (PMT) driver API. This counter is
useful for determining the idle residency of CPUs in the compute tile.
Also adds a missing forward declaration for punit_ep which was declared in
an earlier upstream commit but only used for the first time in this one.
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-20-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
Xi Pardee
935b8211a3
platform/x86/intel/pmc: Read low power mode requirements for MTL-M and MTL-P
...
Add support to read the low power mode requirements for Meteor Lake M and
Meteor Lake P.
Signed-off-by: Xi Pardee <xi.pardee@intel.com >
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-19-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
Xi Pardee
4d621c3f02
platform/x86/intel/pmc: Retrieve LPM information using Intel PMT
...
On supported platforms, the low power mode (LPM) requirements for entering
each idle substate are described in Platform Monitoring Technology (PMT)
telemetry entries. Provide a function for platform code to attempt to find
and read the requirements from the telemetry entries.
Signed-off-by: Xi Pardee <xi.pardee@intel.com >
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-18-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
Rajvi Jingar
0f601dec18
platform/x86/intel/pmc: Display LPM requirements for multiple PMCs
...
Update the substate_requirements attribute to display the requirements for
all the PMCs on a package.
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com >
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-17-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
David E. Box
104f74943f
platform/x86/intel/pmc: Find and register PMC telemetry entries
...
The PMC SSRAM device contains counters that are structured in Intel
Platform Monitoring Technology (PMT) telemetry regions. Look for and
register these telemetry regions from the driver so that they may be read
using the Intel PMT ABI.
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-16-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
David E. Box
642dd26f58
platform/x86/intel/pmc/mtl: Use return value from pmc_core_ssram_init()
...
Instead of checking for a NULL regbase, use the return value from
pmc_core_ssram_init() to check if PMC discovery was successful. If not, use
the legacy enumeration method (which only works for the primary PMC).
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-15-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
David E. Box
a01486dc4b
platform/x86/intel/pmc: Cleanup SSRAM discovery
...
Clean up the code handling SSRAM discovery. Handle all resource allocation
and cleanup in pmc_core_ssram_get_pmc(). Return the error status from this
function but only fail the init if we fail to discover the primary PMC.
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-14-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
David E. Box
9512920a6b
platform/x86/intel/pmc: Allow pmc_core_ssram_init to fail
...
Currently, if the PMC SSRAM initialization fails, no error is returned and
the only indication is that a PMC device has not been created. Instead,
allow an error to be returned and handled directly by the caller.
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-13-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
Xi Pardee
2e35e3aa9f
platform/x86:intel/pmc: Call pmc_get_low_power_modes from platform init
...
In order to setup a table of low power mode requirements for Meteor Lake,
pmc_core_get_low_power_modes() will need to be run from platform init code
so that the enabled modes are known, allowing the use of the
pmc_for_each_mode helper. Make the function global and call it from the
platform init code.
Signed-off-by: Xi Pardee <xi.pardee@intel.com >
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-12-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
David E. Box
416eeb2e1f
platform/x86/intel/pmt: telemetry: Export API to read telemetry
...
Export symbols to allow access to Intel PMT Telemetry data on available
devices. Provides APIs to search, register, and read telemetry using a
kref managed pointer that serves as a handle to a telemetry endpoint.
To simplify searching for present devices, have the IDA start at 1
instead of 0 so that 0 can be used to indicate end of search.
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-11-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
David E. Box
4d1b7efee3
platform/x86/intel/pmt: Add header to struct intel_pmt_entry
...
The PMT header is passed to several functions. Instead, store the header in
struct intel_pmt_entry which is also passed to these functions and shorten
the argument list. This simplifies the calls in preparation for later
changes. While here also perform a newline cleanup.
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-10-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
David E. Box
e97ec7f621
platform/x86/intel/vsec: Add base address field
...
Some devices may emulate PCI VSEC capabilities in MMIO. In such cases the
BAR is not readable from a config space. Provide a field for drivers to
indicate the base address to be used.
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-9-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:43 +01:00
Gayatri Kammela
4edbd117ba
platform/x86/intel/vsec: Add intel_vsec_register
...
Add and export intel_vsec_register() to allow the registration of Intel
extended capabilities from other drivers. Add check to look for memory
conflicts before registering a new capability. Since the vsec provider
may not be a PCI device, add a parent field to
intel_vsec_platform_info() to allow specifying the parent device for
device managed cleanup.
Signed-off-by: Gayatri Kammela <gayatri.kammela@linux.intel.com >
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-8-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:30 +01:00
David E. Box
6dfc2514ac
platform/x86/intel/vsec: Assign auxdev parent by argument
...
Instead of checking for a NULL parent argument in intel_vsec_add_aux() and
then assigning it to the probed device, remove this check and just pass the
device in the call. Since this function is exported, return -EINVAL if the
parent is not specified.
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-7-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:29 +01:00
David E. Box
1d1b4770d4
platform/x86/intel/vsec: Use cleanup.h
...
Use cleanup.h helpers to handle cleanup of resources in
intel_vsec_add_dev() after failures.
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-6-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:29 +01:00
David E. Box
0a0a52abaa
platform/x86/intel/vsec: remove platform_info from vsec device structure
...
In preparation for exporting an API to register Intel Vendor Specific
Extended Capabilities (VSEC) from other drivers, remove the pointer to
platform_info from intel_vsec_device. This prevents a potential page fault
when auxiliary drivers probe and attempt to dereference this pointer to
access the needed quirks field. Instead, just add the quirks to
intel_vsec_device.
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-5-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:29 +01:00
David E. Box
dbc01b0c86
platform/x86/intel/vsec: Move structures to header
...
In preparation for exporting an API to register Intel Vendor Specific
Extended Capabilities (VSEC) from other drivers, move needed structures to
the header file.
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-4-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:29 +01:00
David E. Box
ace7b6f008
platform/x86/intel/vsec: Remove unnecessary return
...
In intel_vsec_add_aux(), just return from the last call to
devm_add_action_or_reset() instead of checking its return value.
Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-3-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-12-04 14:53:23 +01:00
David E. Box
8cbcc1dbf8
platform/x86/intel/vsec: Fix xa_alloc memory leak
...
Commit 936874b77d ("platform/x86/intel/vsec: Add PCI error recovery
support to Intel PMT") added an xarray to track the list of vsec devices to
be recovered after a PCI error. But it did not provide cleanup for the list
leading to a memory leak that was caught by kmemleak. Do xa_alloc() before
devm_add_action_or_reset() so that the list may be cleaned up with
xa_erase() in the release function.
Fixes: 936874b77d ("platform/x86/intel/vsec: Add PCI error recovery support to Intel PMT")
Signed-off-by: David E. Box <david.e.box@linux.intel.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Link: https://lore.kernel.org/r/20231129222132.2331261-2-david.e.box@linux.intel.com
[hdegoede@redhat.com: Add missing xa_erase() on error-exit
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-12-04 14:10:40 +01:00
Andy Shevchenko
a6584711e6
platform/x86: intel_telemetry: Fix kernel doc descriptions
...
LKP found issues with a kernel doc in the driver:
core.c:116: warning: Function parameter or member 'ioss_evtconfig' not described in 'telemetry_update_events'
core.c:188: warning: Function parameter or member 'ioss_evtconfig' not described in 'telemetry_get_eventconfig'
It looks like it were copy'n'paste typos when these descriptions
had been introduced. Fix the typos.
Reported-by: kernel test robot <lkp@intel.com >
Closes: https://lore.kernel.org/oe-kbuild-all/202310070743.WALmRGSY-lkp@intel.com/
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20231120150756.1661425-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2023-11-21 10:09:04 +02:00
Armin Wolf
2340f12023
platform/x86/intel/wmi: thunderbolt: Use bus-based WMI interface
...
Currently, the driver still uses the legacy GUID-based interface
to invoke WMI methods. Use the modern bus-based interface instead.
Tested on a Lenovo E51-80.
Signed-off-by: Armin Wolf <W_Armin@gmx.de >
Link: https://lore.kernel.org/r/20231103182526.3524-4-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2023-11-20 13:20:33 +01:00