Vadim Pasternak [Tue, 22 Aug 2023 11:34:37 +0000 (11:34 +0000)]
platform: mellanox: Add field upgrade capability register
Add new register to indicate the method of FPGA/CPLD field upgrade
supported on the specific system.
Currently two masks are available:
b00 - field upgrade through LPC gateway (new method introduced to
accelerate field upgrade process).
b11 - field upgrade through CPU GPIO pins (old method).
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Michael Shych <michaelsh@nvidia.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/20230822113451.13785-3-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Vadim Pasternak [Tue, 22 Aug 2023 11:34:36 +0000 (11:34 +0000)]
platform: mellanox: Add new attributes
Add new attribute:
"lid_open" - to indicate system intrusion detection.
"reset_long_pwr_pb" - to indicate that system has been reset due to
long press of power button.
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Michael Shych <michaelsh@nvidia.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/20230822113451.13785-2-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
David Thompson [Mon, 21 Aug 2023 18:39:39 +0000 (14:39 -0400)]
mlxbf-bootctl: Support sysfs entries for MFG fields
This patch extends the mlxbf-bootctl driver's sysfs entries
to support read and write access for the manufacturing (MFG)
fields in the board-level EEPROM. The MFG fields are set
once during the board manufacturing phase, and then the MFG
fields are write-protected.
Signed-off-by: David Thompson <davthompson@nvidia.com>
Reviewed-by: Shravan Kumar Ramani <shravankr@nvidia.com>
Link: https://lore.kernel.org/r/20230821183939.3229-1-davthompson@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Shyam Sundar S K [Fri, 11 Aug 2023 11:21:13 +0000 (16:51 +0530)]
platform/x86/amd/pmc: Move PMC driver to separate directory
With latest commits having PMC code spread across multiple files, it would
be easier to maintain them in a separate directory under amd/pmc.
Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20230811112116.2279419-2-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Wed, 23 Aug 2023 15:30:50 +0000 (17:30 +0200)]
Merge remote-tracking branch 'pdx86/fixes' into pdx86/for-next
Merge pdx86/fixes into pdx86/for-next because there are some
pdx86 patches pending for the next release which build on top
of some of the fixes.
Shih-Yi Chen [Mon, 21 Aug 2023 15:06:27 +0000 (11:06 -0400)]
platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifications
rshim console does not show all entries of dmesg.
Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification.
Signed-off-by: Shih-Yi Chen <shihyic@nvidia.com>
Reviewed-by: Liming Sung <limings@nvidia.com>
Reviewed-by: David Thompson <davthompson@nvidia.com>
Link: https://lore.kernel.org/r/20230821150627.26075-1-shihyic@nvidia.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Jorge Lopez [Mon, 21 Aug 2023 14:42:05 +0000 (09:42 -0500)]
platform/x86: hp-bioscfg: Update steps order list elements are evaluated
Update steps how order list elements data and elements size are
evaluated.
Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230821144205.13529-1-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Luke D. Jones [Tue, 15 Aug 2023 01:42:09 +0000 (13:42 +1200)]
platform/x86: asus-wmi: Fix support for showing middle fan RPM
After the addition of the mid fan custom curve functionality various
incorrect behaviour was uncovered. This commit fixes these areas.
- Ensure mid fan attributes actually use the correct fan ID
- Correction to a bit mask for selecting the correct fan data
- Refactor the curve show/store functions to be cleaner and
match each others layout
Fixes:
536fce82d729 ("platform/x86: asus-wmi: add support for showing middle fan RPM")
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230815014209.44903-1-luke@ljones.dev
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Andy Shevchenko [Fri, 11 Aug 2023 13:13:30 +0000 (16:13 +0300)]
platform/x86/amd/pmf: Use str_on_off() helper
We have a common helper to represent a boolean value as "on"/"off"
string. Use it for the sake of the unified style.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Link: https://lore.kernel.org/r/20230811131330.71263-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Ruan Jinjie [Thu, 10 Aug 2023 12:20:12 +0000 (20:20 +0800)]
platform/x86: thinkpad_acpi: Switch to memdup_user_nul() helper
Use memdup_user_nul() helper instead of open-coding to simplify the code.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230810122012.2110410-1-ruanjinjie@huawei.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
André Apitzsch [Sat, 19 Aug 2023 07:12:15 +0000 (09:12 +0200)]
platform/x86: ideapad-laptop: Add support for new hotkeys found on ThinkBook 14s Yoga ITL
The Lenovo Thinkbook 14s Yoga ITL has 4 new symbols/shortcuts on their
F9-F11 and PrtSc keys:
F9: Has a symbol of a head with a headset, the manual says "Service key"
F10: Has a symbol of a telephone horn which has been picked up from the
receiver, the manual says: "Answer incoming calls"
F11: Has a symbol of a telephone horn which is resting on the receiver,
the manual says: "Reject incoming calls"
PrtSc: Has a symbol of a siccor and a dashed ellipse, the manual says:
"Open the Windows 'Snipping' Tool app"
This commit adds support for these 4 new hkey events.
Signed-off-by: André Apitzsch <git@apitzsch.eu>
Link: https://lore.kernel.org/r/20230819-lenovo_keys-v1-1-9d34eac88e0a@apitzsch.eu
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Swapnil Devesh [Fri, 18 Aug 2023 12:39:47 +0000 (18:09 +0530)]
platform/x86: lenovo-ymc: Add Lenovo Yoga 7 14ACN6 to ec_trigger_quirk_dmi_table
This adds my laptop Lenovo Yoga 7 14ACN6, with Product Name: 82N7
(from `dmidecode -t1 | grep "Product Name"`) to
the ec_trigger_quirk_dmi_table, have tested that this is required
for the YMC driver to work correctly on this model.
Signed-off-by: Swapnil Devesh <me@sidevesh.com>
Reviewed-by: Gergő Köteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/18a08a8b173.895ef3b250414.1213194126082324071@sidevesh.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Mon, 14 Aug 2023 14:37:19 +0000 (16:37 +0200)]
Merge remote-tracking branch 'pdx86/platform-drivers-x86-simatic-ipc' into review-hans
Arnd Bergmann [Mon, 14 Aug 2023 07:38:50 +0000 (09:38 +0200)]
watchdog: simatic: add PCI dependency
The simatic-ipc driver no longer depends on PCI, but its watchdog portion
still needs it, otherwise P2SB runs into a build failure:
WARNING: unmet direct dependencies detected for P2SB
Depends on [n]: PCI [=n] && X86 [=y]
Selected by [m]:
- SIEMENS_SIMATIC_IPC_WDT [=m] && WATCHDOG [=y] && SIEMENS_SIMATIC_IPC [=y]
drivers/platform/x86/p2sb.c:121:3: error: call to undeclared function 'pci_bus_write_config_dword'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
pci_bus_write_config_dword(bus, devfn_p2sb, P2SBC, 0);
Add back the minimum dependendency to make it build in random
configurations again.
Fixes:
b72da71ce24b ("platform/x86: simatic-ipc: drop PCI runtime depends and header")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230814073924.1066390-1-arnd@kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Gerd Haeussler [Mon, 14 Aug 2023 07:31:14 +0000 (09:31 +0200)]
MAINTAINERS: Add entries for Siemens IPC modules
There are different IPC driver modules in the kernel that are actively
maintained by Siemens but not yet listed in the MAINTAINERS file.
Add the missing entries.
Signed-off-by: Gerd Haeussler <gerd.haeussler.ext@siemens.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230814073114.2885-1-haeussler.gerd@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Sat, 12 Aug 2023 14:48:18 +0000 (16:48 +0200)]
platform/x86: lenovo-ymc: Only bind on machines with a convertible DMI chassis-type
The lenovo-ymc driver is causing the keyboard + touchpad to stop working
on some regular laptop models such as the Lenovo ThinkBook 13s G2 ITL 20V9.
The problem is that there are YMC WMI GUID methods in the ACPI tables
of these laptops, despite them not being Yogas and lenovo-ymc loading
causes libinput to see a SW_TABLET_MODE switch with state 1.
This in turn causes libinput to ignore events from the builtin keyboard
and touchpad, since it filters those out for a Yoga in tablet mode.
Similar issues with false-positive SW_TABLET_MODE=1 reporting have
been seen with the intel-hid driver.
Copy the intel-hid driver approach to fix this and only bind to the WMI
device on machines where the DMI chassis-type indicates the machine
is a convertible.
Add a 'force' module parameter to allow overriding the chassis-type check
so that users can easily test if the YMC interface works on models which
report an unexpected chassis-type.
Fixes:
e82882cdd241 ("platform/x86: Add driver for Yoga Tablet Mode switch")
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2229373
Cc: André Apitzsch <git@apitzsch.eu>
Cc: stable@vger.kernel.org
Tested-by: Andrew Kallmeyer <kallmeyeras@gmail.com>
Tested-by: Gergő Köteles <soyer@irl.hu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230812144818.383230-1-hdegoede@redhat.com
Vadim Pasternak [Sun, 13 Aug 2023 08:37:35 +0000 (08:37 +0000)]
platform: mellanox: Change register offset addresses
Move debug register offsets to different location due to hardware changes.
Fixes:
dd635e33b5c9 ("platform: mellanox: Introduce support of new Nvidia L1 switch")
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Michael Shych <michaelsh@nvidia.com>
Link: https://lore.kernel.org/r/20230813083735.39090-5-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Vadim Pasternak [Sun, 13 Aug 2023 08:37:34 +0000 (08:37 +0000)]
platform: mellanox: mlx-platform: Modify graceful shutdown callback and power down mask
Use kernel_power_off() instead of kernel_halt() to pass through
machine_power_off() -> pm_power_off(), otherwise axillary power does
not go off.
Change "power down" bitmask.
Fixes:
dd635e33b5c9 ("platform: mellanox: Introduce support of new Nvidia L1 switch")
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Michael Shych <michaelsh@nvidia.com>
Link: https://lore.kernel.org/r/20230813083735.39090-4-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Vadim Pasternak [Sun, 13 Aug 2023 08:37:33 +0000 (08:37 +0000)]
platform: mellanox: mlx-platform: Fix signals polarity and latch mask
Change polarity of chassis health and power signals and fix latch reset
mask for L1 switch.
Fixes:
dd635e33b5c9 ("platform: mellanox: Introduce support of new Nvidia L1 switch")
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Michael Shych <michaelsh@nvidia.com>
Link: https://lore.kernel.org/r/20230813083735.39090-3-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Vadim Pasternak [Sun, 13 Aug 2023 08:37:32 +0000 (08:37 +0000)]
platform: mellanox: Fix order in exit flow
Fix exit flow order: call mlxplat_post_exit() after
mlxplat_i2c_main_exit() in order to unregister main i2c driver before
to "mlxplat" driver.
Fixes:
0170f616f496 ("platform: mellanox: Split initialization procedure")
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Michael Shych <michaelsh@nvidia.com>
Link: https://lore.kernel.org/r/20230813083735.39090-2-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Thu, 10 Aug 2023 09:13:00 +0000 (11:13 +0200)]
Merge remote-tracking branch 'intel-speed-select/intel-sst' into review-hans
Asmaa Mnebhi [Wed, 9 Aug 2023 16:28:57 +0000 (12:28 -0400)]
mlxbf-bootctl: Support setting the ARM boot state to "OS up"
The BlueField has internal registers to store the ARM boot states.
Support setting the BlueField ARM boot state to "OS up".
Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20230809162857.21243-3-asmaa@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Asmaa Mnebhi [Wed, 9 Aug 2023 16:28:56 +0000 (12:28 -0400)]
mlxbf-bootctl: Support the large icmc write/read
Enable reading and writing the size of the memory region associated
with the large ICM carveout.
The max size of the large ICM carveout is 1TB, has a granularity
of 128MB and will be passed and printed in hex. The size unit is MB.
Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20230809162857.21243-2-asmaa@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
xingtong.wu [Wed, 2 Aug 2023 17:35:15 +0000 (01:35 +0800)]
platform/x86/siemens: simatic-ipc-batt: fix logical error for BX-59A
The variable "priv.devmode" is missing from if statement that leads
to a logical error. Add the missing variable to the if condition.
Fixes:
c56beff20375 ("platform/x86/siemens: simatic-ipc-batt: add support for module BX-59A")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202308010001.BGYCSQrl-lkp@intel.com/
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: xingtong.wu <xingtong.wu@siemens.com>
Link: https://lore.kernel.org/r/20430802173844.2483-1-xingtong_wu@163.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
xingtong.wu [Wed, 2 Aug 2023 17:35:15 +0000 (01:35 +0800)]
platform/x86/siemens: simatic-ipc: fix logical error for BX-59A
The variable "ledmode" is missing from if statement that leads to
a logical error. Add the missing variable to the if condition.
Fixes:
b8af77951941 ("platform/x86/siemens: simatic-ipc: add new models BX-56A/BX-59A")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202307312322.Aa8upHWK-lkp@intel.com/
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: xingtong.wu <xingtong.wu@siemens.com>
Link: https://lore.kernel.org/r/20430802173515.2363-2-xingtong_wu@163.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Yang Yingliang [Wed, 9 Aug 2023 08:12:27 +0000 (16:12 +0800)]
platform/x86/siemens: simatic-ipc-batt: fix wrong pointer pass to PTR_ERR()
Fix wrong pointer pass to PTR_ERR() if devm_gpiod_get_index() fails.
Fixes:
917f54340794 ("platform/x86: simatic-ipc: add CMOS battery monitoring")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20230809081227.1221267-1-yangyingliang@huawei.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Srinivas Pandruvada [Tue, 8 Aug 2023 17:43:59 +0000 (10:43 -0700)]
platform/x86: ISST: Reduce noise for missing numa information in logs
On platforms with no numa support and with several CPUs, logs have lots
of noise for message "Fail to get numa node for CPU:.."
Change pr_info() to pr_info_once() as one print is enough to show the
issue.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20230808174359.50602-1-srinivas.pandruvada@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Jean Delvare [Sat, 5 Aug 2023 08:10:10 +0000 (10:10 +0200)]
platform/x86: msi-ec: Fix the build
The msi-ec driver fails to build for me (gcc 7.5):
CC [M] drivers/platform/x86/msi-ec.o
drivers/platform/x86/msi-ec.c:72:6: error: initializer element is not constant
{ SM_ECO_NAME, 0xc2 },
^~~~~~~~~~~
drivers/platform/x86/msi-ec.c:72:6: note: (near initialization for ‘CONF0.shift_mode.modes[0].name’)
drivers/platform/x86/msi-ec.c:73:6: error: initializer element is not constant
{ SM_COMFORT_NAME, 0xc1 },
^~~~~~~~~~~~~~~
drivers/platform/x86/msi-ec.c:73:6: note: (near initialization for ‘CONF0.shift_mode.modes[1].name’)
drivers/platform/x86/msi-ec.c:74:6: error: initializer element is not constant
{ SM_SPORT_NAME, 0xc0 },
^~~~~~~~~~~~~
drivers/platform/x86/msi-ec.c:74:6: note: (near initialization for ‘CONF0.shift_mode.modes[2].name’)
(...)
Don't try to be smart, just use defines for the constant strings. The
compiler will recognize it's the same string and will store it only
once in the data section anyway.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes:
392cacf2aa10 ("platform/x86: Add new msi-ec driver")
Cc: stable@vger.kernel.org
Cc: Nikita Kravets <teackot@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mark Gross <markgross@kernel.org>
Link: https://lore.kernel.org/r/20230805101010.54d49e91@endymion.delvare
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Armin Wolf [Sat, 5 Aug 2023 05:36:10 +0000 (07:36 +0200)]
platform/x86: dell-sysman: Fix reference leak
If a duplicate attribute is found using kset_find_obj(),
a reference to that attribute is returned. This means
that we need to dispose it accordingly. Use kobject_put()
to dispose the duplicate attribute in such a case.
Compile-tested only.
Fixes:
e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20230805053610.7106-1-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Srinivas Pandruvada [Tue, 8 Aug 2023 21:37:02 +0000 (14:37 -0700)]
tools/power/x86/intel-speed-select: v1.17 release
This version addresses issues with:
- CPU count display for power domain != 0
- Support more than 8 sockets
- Error on max CPU count exceeds in one request
- Prevent trying CPU 0 hotplug for kernel version 6.5 or later
- Change mem-frequency display to max-mem-frequency
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Srinivas Pandruvada [Wed, 9 Aug 2023 15:53:04 +0000 (08:53 -0700)]
tools/power/x86/intel-speed-select: Change mem-frequency display name
The mem-frequency displayed by each profile is not the actual memory
frequency of DIMMs, but the maximum the CPU can support.
Change the mem-frequency field to max-mem-frequency.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Srinivas Pandruvada [Tue, 8 Aug 2023 21:12:01 +0000 (14:12 -0700)]
tools/power/x86/intel-speed-select: Prevent CPU 0 offline
Kernel 6.5 version deprecated CPU 0 hotplug. This will cause all
requests to fail to offline CPU 0. Check version number of kernel
and ignore CPU 0 hotplug request with debug aid to use cgroup
isolation feature for CPU 0.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Srinivas Pandruvada [Tue, 8 Aug 2023 20:08:03 +0000 (13:08 -0700)]
tools/power/x86/intel-speed-select: Error on CPU count exceed in request
There is a limit on number of CPUs in one request. This is set to 256.
Currently tool silently ignores request for count over 256. Give an
error message to indicate this.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Frank Ramsay [Thu, 20 Jul 2023 16:08:03 +0000 (11:08 -0500)]
tools/power/x86/intel-speed-select: Support more than 8 sockets.
MAX_PACKAGE_COUNT limits the intel-speed-select to systems with 8 sockets or fewer.
On a system with more than 8 sockets intel-speed-select silently ignores everything
beyond the 8th socket, rendering the tool useless for those systems.
Increase MAX_PACKAGE_COUNT to support systems with up to 32 sockets.
Signed-off-by: Frank Ramsay <frank.ramsay@hpe.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Srinivas Pandruvada [Thu, 15 Jun 2023 23:18:15 +0000 (16:18 -0700)]
tools/power/x86/intel-speed-select: Fix CPU count display
Fix CPU count display for power domain != 0. In the function
punit_id is always 0, so it never incremented cpu count for power
domain id != 0.
Update punit_id after call to update_punit_cpu_info() to what is
actually received from the kernel.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Li Zetao [Thu, 3 Aug 2023 03:20:27 +0000 (11:20 +0800)]
platform/x86: hp-bioscfg: Use kmemdup() to replace kmalloc + memcpy
There are some warnings reported by coccinelle:
./drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c:317:35-42:
WARNING opportunity for kmemdup
./drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c:270:40-47:
WARNING opportunity for kmemdup
./drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c:233:36-43:
WARNING opportunity for kmemdup
Use kmemdup rather than duplicating its implementation.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Reviewed-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230803032027.3044851-1-lizetao1@huawei.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Jorge Lopez [Mon, 31 Jul 2023 20:31:41 +0000 (15:31 -0500)]
platform/x86: hp-bioscfg: Remove duplicate use of variable in inner loop
Replace use of same variable in inner loop.
Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230731203141.30044-9-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Jorge Lopez [Mon, 31 Jul 2023 20:31:40 +0000 (15:31 -0500)]
platform/x86: hp-bioscfg: Change how password encoding size is evaluated
Update steps how password encoding size is evaluated
Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230731203141.30044-8-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Jorge Lopez [Mon, 31 Jul 2023 20:31:39 +0000 (15:31 -0500)]
platform/x86: hp-bioscfg: Change how enum possible values size is evaluated
Updates steps how enum possible values size is evaluated
Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230731203141.30044-7-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Jorge Lopez [Mon, 31 Jul 2023 20:31:38 +0000 (15:31 -0500)]
platform/x86: hp-bioscfg: Change how order list size is evaluated
Update steps how order list size is evaluated
Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230731203141.30044-6-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Jorge Lopez [Mon, 31 Jul 2023 20:31:37 +0000 (15:31 -0500)]
platform/x86: hp-bioscfg: Change how prerequisites size is evaluated
Update steps taken to evaluate prerequisites size value
Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230731203141.30044-5-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Jorge Lopez [Mon, 31 Jul 2023 20:31:36 +0000 (15:31 -0500)]
platform/x86: hp-bioscfg: Replace the word HACK from source code
Replace the word 'HACK' with 'step' from source code
Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230731203141.30044-4-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Jorge Lopez [Mon, 31 Jul 2023 20:31:35 +0000 (15:31 -0500)]
platform/x86: hp-bioscfg: Fix uninitialized variable errors
Fix uninitialized variable errors.
Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230731203141.30044-3-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Jorge Lopez [Mon, 31 Jul 2023 20:31:34 +0000 (15:31 -0500)]
platform/x86: hp-bioscfg: Fix memory leaks in attribute packages
Address memory leaks while handling elements in packages.
Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230731203141.30044-2-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Armin Wolf [Sun, 30 Jul 2023 20:45:50 +0000 (22:45 +0200)]
platform/x86: wmi-bmof: Update MAINTAINERS entry
The WMI Binary MOF driver is important for the development
of modern WMI drivers, i am willing to maintain it.
Also fix the mailing list address.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20230730204550.3402-3-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Armin Wolf [Sun, 30 Jul 2023 20:45:49 +0000 (22:45 +0200)]
platform/x86: wmi-bmof: Simplify read_bmof()
Replace offset handling code with a single call
to memory_read_from_buffer() to simplify read_bmof().
Tested on a ASUS PRIME B650-PLUS.
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20230730204550.3402-2-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Armin Wolf [Sun, 30 Jul 2023 20:45:48 +0000 (22:45 +0200)]
platform/x86: wmi-bmof: Use device_create_bin_file()
Use device_create_bin_file() instead of sysfs_create_bin_file()
to avoid having to access the device kobject.
Tested on a ASUS PRIME B650-PLUS.
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20230730204550.3402-1-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Mon, 31 Jul 2023 14:05:44 +0000 (16:05 +0200)]
Merge tag 'ib-pdx86-simatic-v6.6-2' into review-hans
Immutable branch between pdx86 simatic branch and LED due for the v6.6 merge window
ib-pdx86-simatic-v6.6-2: v6.5-rc1 + ib-pdx86-simatic-v6.6 +
more recent pdx86 simatic-ipc patches for merging into
the LED subsystem for v6.6.
Simon Trimmer [Fri, 28 Jul 2023 11:13:45 +0000 (12:13 +0100)]
ACPI: scan: Create platform device for CS35L56
The ACPI device CSC3556 is a Cirrus Logic CS35L56 mono amplifier which
is used in multiples, and can be connected either to I2C or SPI.
There will be multiple instances under the same Device() node. Add it
to ignore_serial_bus_ids and handle it in the serial-multi-instantiate
driver.
There can be a 5th I2cSerialBusV2, but this is an alias address and doesn't
represent a real device. Ignore this by having a dummy 5th entry in the
serial-multi-instantiate instance list with the name of a non-existent
driver, on the same pattern as done for bsg2150.
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20230728111345.7224-1-rf@opensource.cirrus.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Yang Li [Thu, 27 Jul 2023 01:43:15 +0000 (09:43 +0800)]
platform/x86/amd/pmf: Fix unsigned comparison with less than zero
The return value from the call to amd_pmf_get_pprof_modes() is int.
However, the return value is being assigned to an unsigned char
variable 'mode', so making 'mode' an int.
silence the warning:
./drivers/platform/x86/amd/pmf/sps.c:183:5-9: WARNING: Unsigned expression compared with zero: mode < 0
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5995
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230727014315.51375-1-yang.lee@linux.alibaba.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
xingtong.wu [Mon, 31 Jul 2023 07:21:48 +0000 (15:21 +0800)]
platform/x86/siemens: simatic-ipc-batt: add support for module BX-59A
This is used for the Siemens Simatic IPC BX-59A, which
can monitor the voltage of the CMOS battery with two bits
that indicate low or empty state
Signed-off-by: xingtong.wu <xingtong.wu@siemens.com>
Link: https://lore.kernel.org/r/20230731072148.4781-1-xingtong_wu@163.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
xingtong.wu [Mon, 31 Jul 2023 07:14:24 +0000 (15:14 +0800)]
platform/x86/siemens: simatic-ipc: add new models BX-56A/BX-59A
This adds support for the Siemens Simatic IPC models BX-56A/BX-59A,
led/watchdog/battery on these models are same, actual drivers for
models will be sent in separate patches.
Signed-off-by: xingtong.wu <xingtong.wu@siemens.com>
Link: https://lore.kernel.org/r/20230731071424.4663-2-xingtong_wu@163.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Henning Schild [Tue, 25 Jul 2023 09:31:13 +0000 (11:31 +0200)]
platform/x86/siemens: Kconfig: adjust help text
There was a copy and paste mistake where the module name was not
correct.
Fixes:
917f54340794 ("platform/x86: simatic-ipc: add CMOS battery monitoring")
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Link: https://lore.kernel.org/r/20230725093113.9739-3-henning.schild@siemens.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
xingtong.wu [Fri, 28 Jul 2023 08:36:51 +0000 (10:36 +0200)]
platform/x86/siemens: simatic-ipc-batt: fix bat reading in BX_21A
There was a case missing in a switch statement which lead to that model
not actually reading the GPIOs. That switch statement got simplified
now. Additionally on that model we need to initialize one pin
differently. As a drive-by finding also add a missing newline.
Fixes:
917f54340794 ("platform/x86: simatic-ipc: add CMOS battery monitoring")
Reported-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: xingtong.wu <xingtong.wu@siemens.com>
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Link: https://lore.kernel.org/r/20230728083651.19747-1-henning.schild@siemens.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Henning Schild [Wed, 19 Jul 2023 15:35:18 +0000 (17:35 +0200)]
platform/x86: Move all simatic ipc drivers to the subdirectory siemens
With more files around move everything to a subdirectory. Users will
only see the several options once they enable the main one.
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230719153518.13073-4-henning.schild@siemens.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Henning Schild [Wed, 19 Jul 2023 15:35:17 +0000 (17:35 +0200)]
leds: simatic-ipc-leds: default config switch to platform switch
If a user did choose to enable Siemens Simatic platform support they
likely want the LED drivers to be enabled without having to flip more
config switches. So we make the LED drivers config switch default to
the platform driver switches value.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230719153518.13073-3-henning.schild@siemens.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Henning Schild [Wed, 19 Jul 2023 15:35:16 +0000 (17:35 +0200)]
watchdog: make Siemens Simatic watchdog driver default on platform
If a user did choose to enable Siemens Simatic platform support they
likely want that driver to be enabled without having to flip more config
switches. So we make the watchdog driver config switch default to the
platform driver switches value.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230719153518.13073-2-henning.schild@siemens.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Dan Carpenter [Tue, 18 Jul 2023 07:06:26 +0000 (10:06 +0300)]
platform/x86: hp-bioscfg: fix error reporting in hp_add_other_attributes()
Return a negative error code instead of returning success.
Fixes:
a34fc329b189 ("platform/x86: hp-bioscfg: bioscfg")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/138641cc-52c0-41a5-8176-ad01c7e28c67@moroto.mountain
Reviewed-by: Jorge Lopez <jorge.lopez2@hp.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Dan Carpenter [Tue, 18 Jul 2023 07:05:34 +0000 (10:05 +0300)]
platform/x86: hp-bioscfg: prevent a small buffer overflow
This function escapes certain special characters like \n. So if the
last character in the string is a '\n' then it gets changed into two
characters '\' and '\n'. But maybe we only have space for the '\' so
we need to check for that.
The "conv_dst_size" variable is always less than or to equal the "size"
variable. It's easier to just check "conv_dst_size" instead of checking
both.
Fixes:
a34fc329b189 ("platform/x86: hp-bioscfg: bioscfg")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/b4950310-e65f-412f-8d2b-90bb074a6572@moroto.mountain
Reviewed-by: Jorge Lopez <jorge.lopez2@hp.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Dan Carpenter [Tue, 18 Jul 2023 07:05:05 +0000 (10:05 +0300)]
platform/x86: hp-bioscfg: fix a signedness bug in hp_wmi_perform_query()
The error handling won't work if "mid" is unsigned. "ret" is used to
store negative error codes and declaring it as a u32 won't cause a bug
but it's ugly. The "actual_outsize" variable is a number between 0-4096
so it can be declared as int as well.
Fixes:
69ea03e38f24 ("platform/x86: hp-bioscfg: biosattr-interface")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/ad0a6ad9-099b-40a4-ae91-b9dca622ff4e@moroto.mountain
Reviewed-by: Jorge Lopez <jorge.lopez2@hp.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tim Crawford [Wed, 19 Jul 2023 18:13:24 +0000 (12:13 -0600)]
platform/x86: system76: Handle new KBLED ACPI methods
System76 EC since system76/ec@
9ac513128ad9 detects if the keyboard is
white or RGB backlit via `RGBKB-DET#` at run-time instead of being set
at compile-time. As part of this, the brightness of white-only backlit
keyboards was also changed to behave more like the RGB-backlit
keyboards: a value between 0 and 255 instead of a firmware-defined
level.
The EC ACPI methods in coreboot have been updated for this new
functionality only, removing the old behavior.
This should preserve behavior as we roll out new firmware with these
changes included and users update to it.
Link: https://github.com/system76/ec/pull/357
Link: https://review.coreboot.org/c/coreboot/+/76152
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Link: https://lore.kernel.org/r/20230719181324.47035-1-tcrawford@system76.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Rob Herring [Fri, 14 Jul 2023 17:49:09 +0000 (11:49 -0600)]
platform: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20230714174909.4062739-1-robh@kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Konstantin Shelekhin [Sat, 22 Jul 2023 15:59:20 +0000 (18:59 +0300)]
platform/x86: huawei-wmi: Silence ambient light sensor
Currently huawei-wmi causes a lot of spam in dmesg on my
Huawei MateBook X Pro 2022:
...
[36409.328463] input input9: Unknown key pressed, code: 0x02c1
[36411.335104] input input9: Unknown key pressed, code: 0x02c1
[36412.338674] input input9: Unknown key pressed, code: 0x02c1
[36414.848564] input input9: Unknown key pressed, code: 0x02c1
[36416.858706] input input9: Unknown key pressed, code: 0x02c1
...
Fix that by ignoring events generated by ambient light sensor.
This issue was reported on GitHub and resolved with the following merge
request:
https://github.com/aymanbagabas/Huawei-WMI/pull/70
I've contacted the mainter of this repo and he gave me the "go ahead" to
send this patch to the maling list.
Signed-off-by: Konstantin Shelekhin <k.shelekhin@ftml.net>
Link: https://lore.kernel.org/r/20230722155922.173856-1-k.shelekhin@ftml.net
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Maxim Mikityanskiy [Fri, 21 Jul 2023 14:54:23 +0000 (17:54 +0300)]
platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100
Only the HW rfkill state is toggled on laptops with quirks->ec_read_only
(so far only MSI Wind U90/U100). There are, however, a few issues with
the implementation:
1. The initial HW state is always unblocked, regardless of the actual
state on boot, because msi_init_rfkill only sets the SW state,
regardless of ec_read_only.
2. The initial SW state corresponds to the actual state on boot, but it
can't be changed afterwards, because set_device_state returns
-EOPNOTSUPP. It confuses the userspace, making Wi-Fi and/or Bluetooth
unusable if it was blocked on boot, and breaking the airplane mode if
the rfkill was unblocked on boot.
Address the above issues by properly initializing the HW state on
ec_read_only laptops and by allowing the userspace to toggle the SW
state. Don't set the SW state ourselves and let the userspace fully
control it. Toggling the SW state is a no-op, however, it allows the
userspace to properly toggle the airplane mode. The actual SW radio
disablement is handled by the corresponding rtl818x_pci and btusb
drivers that have their own rfkills.
Tested on MSI Wind U100 Plus, BIOS ver 1.0G, EC ver 130.
Fixes:
0816392b97d4 ("msi-laptop: merge quirk tables to one")
Fixes:
0de6575ad0a8 ("msi-laptop: Add MSI Wind U90/U100 support")
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Link: https://lore.kernel.org/r/20230721145423.161057-1-maxtram95@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Kristian Angelov [Thu, 20 Jul 2023 15:29:50 +0000 (18:29 +0300)]
platform/x86: asus-wmi: Fix setting RGB mode on some TUF laptops
This patch fixes setting the cmd values to 0xb3 and 0xb4.
This is necessary on some TUF laptops in order to set the RGB mode.
Closes: https://lore.kernel.org/platform-driver-x86/
443078148.491022.
1677576298133@nm83.abv.bg
Signed-off-by: Kristian Angelov <kristiana2000@abv.bg>
Reviewed-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/ZLlS7o6UdTUBkyqa@wyvern.localdomain
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Wang Ming [Mon, 17 Jul 2023 10:11:02 +0000 (18:11 +0800)]
platform/x86: think-lmi: Use kfree_sensitive instead of kfree
key might contain private part of the key, so better use
kfree_sensitive to free it.
Signed-off-by: Wang Ming <machel@vivo.com>
Link: https://lore.kernel.org/r/20230717101114.18966-1-machel@vivo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Maxim Mikityanskiy [Sun, 16 Jul 2023 18:32:13 +0000 (21:32 +0300)]
platform/x86/intel/hid: Add HP Dragonfly G2 to VGBS DMI quirks
HP Elite Dragonfly G2 (a convertible laptop/tablet) has a reliable VGBS
method. If VGBS is not called on boot, the firmware sends an initial
0xcd event shortly after calling the BTNL method, but only if the device
is booted in the laptop mode. However, if the device is booted in the
tablet mode and VGBS is not called, there is no initial 0xcc event, and
the input device for SW_TABLET_MODE is not registered up until the user
turns the device into the laptop mode.
Call VGBS on boot on this device to get the initial state of
SW_TABLET_MODE in a reliable way.
Tested with BIOS 1.13.1.
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Link: https://lore.kernel.org/r/20230716183213.64173-1-maxtram95@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Sat, 15 Jul 2023 18:15:16 +0000 (20:15 +0200)]
platform/x86: intel: hid: Always call BTNL ACPI method
On a HP Elite Dragonfly G2 the 0xcc and 0xcd events for SW_TABLET_MODE
are only send after the BTNL ACPI method has been called.
Likely more devices need this, so make the BTNL ACPI method unconditional
instead of only doing it on devices with a 5 button array.
Note this also makes the intel_button_array_enable() call in probe()
unconditional, that function does its own priv->array check. This makes
the intel_button_array_enable() call in probe() consistent with the calls
done on suspend/resume which also rely on the priv->array check inside
the function.
Reported-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Closes: https://lore.kernel.org/platform-driver-x86/
20230712175023.31651-1-maxtram95@gmail.com/
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230715181516.5173-1-hdegoede@redhat.com
Shyam Sundar S K [Fri, 14 Jul 2023 14:44:35 +0000 (20:14 +0530)]
platform/x86/amd/pmf: Notify OS power slider update
APMF fn8 can notify EC about the OS slider position change. Add this
capability to the PMF driver so that it can call the APMF fn8 based on
the changes in the Platform profile events.
Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20230714144435.1239776-2-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Shyam Sundar S K [Fri, 14 Jul 2023 14:44:34 +0000 (20:14 +0530)]
platform/x86/amd/pmf: reduce verbosity of apmf_get_system_params
apmf_get_system_params() failure is not a critical event, reduce its
verbosity from dev_err to dev_dbg.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20230714144435.1239776-1-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
David Xu [Thu, 13 Jul 2023 13:35:28 +0000 (21:35 +0800)]
platform/x86: serial-multi-instantiate: Auto detect IRQ resource for CSC3551
The current code assumes that the CSC3551(multiple cs35l41) always have
its interrupt pin connected to GPIO thus the IRQ can be acquired with
acpi_dev_gpio_irq_get. However on some newer laptop models this is no
longer the case as they have the CSC3551's interrupt pin connected to
APIC. This causes smi_i2c_probe to fail on these machines.
To support these machines, a new macro IRQ_RESOURCE_AUTO was introduced
for cs35l41 smi_node, and smi_get_irq function was modified so it tries
to get GPIO irq resource first and if failed, tries to get
APIC irq resource for cs35l41.
This patch affects only the cs35l41's probing and brings no negative
influence on machines that indeed have the cs35l41's interrupt pin
connected to GPIO.
Signed-off-by: David Xu <xuwd1@hotmail.com>
Link: https://lore.kernel.org/r/SY4P282MB18350CD8288687B87FFD2243E037A@SY4P282MB1835.AUSP282.PROD.OUTLOOK.COM
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Tue, 11 Jul 2023 09:59:20 +0000 (11:59 +0200)]
platform/x86/amd: pmc: Use release_mem_region() to undo request_mem_region_muxed()
Muxed (mem) regions will wait in request_mem_region_muxed() if the region
is busy (in use by another consumer) during the call.
In order to wake-up possibly waiting other consumers of the region,
it must be released by a release_mem_region() call, which will actually
wake up any waiters.
release_mem_region() also frees the resource created by
request_mem_region_muxed(), avoiding the need for the unmatched kfree().
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20230711095920.264308-1-hdegoede@redhat.com
Thomas GENTY [Fri, 14 Jul 2023 10:51:17 +0000 (12:51 +0200)]
platform/x86: touchscreen_dmi.c: small changes for Archos 101 Cesium Educ tablet
Fix the axes and add home button support as suggested by Hans de Goede.
Signed-off-by: Thomas GENTY <tomlohave@gmail.com>
Link: https://lore.kernel.org/r/20230714105117.192938-1-tomlohave@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Robert Joslyn [Thu, 13 Jul 2023 03:48:52 +0000 (20:48 -0700)]
platform/x86: Add SEL-3350 platform driver
Add a driver for Schweitzer Engineering Laboratories SEL-3350 computers
front LEDs and power supplies. LED and power supply status is provided
by the Intel SoC GPIO.
Signed-off-by: Robert Joslyn <robert.joslyn@redrectangle.org>
Link: https://lore.kernel.org/r/20230713035714.807819-1-robert.joslyn@redrectangle.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Srinivas Pandruvada [Wed, 12 Jul 2023 22:59:50 +0000 (15:59 -0700)]
doc: TPMI: Add debugfs documentation
Describe fields in the TPMI debugfs folder.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230712225950.171326-4-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Srinivas Pandruvada [Wed, 12 Jul 2023 22:59:49 +0000 (15:59 -0700)]
platform/x86/intel/tpmi: Add debugfs interface
Add debugfs interface for debugging TPMI configuration and register
contents. This shows PFS (PM Feature structure) for each TPMI device.
For each feature, show full register contents and allow to modify
register at an offset.
This debugfs interface is not present on locked down kernel with no
DEVMEM access and without CAP_SYS_RAWIO permission.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230712225950.171326-3-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Srinivas Pandruvada [Wed, 12 Jul 2023 22:59:48 +0000 (15:59 -0700)]
platform/x86/intel/tpmi: Read feature control status
Some of the PM features can be locked or disabled. In that case, write
interface can be locked.
This status is read via a mailbox. There is one TPMI ID which provides
base address for interface and data register for mail box operation.
The mailbox operations is defined in the TPMI specification. Refer to
https://github.com/intel/tpmi_power_management/ for TPMI specifications.
An API is exposed to feature drivers to read feature control status.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230712225950.171326-2-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Fri, 14 Jul 2023 13:21:53 +0000 (15:21 +0200)]
Merge tag 'ib-pdx86-simatic-v6.6' into review-hans
Immutable branch between pdx86 simatic branch and LED due for the v6.6 merge window
v6.5-rc1 + recent pdx86 simatic-ipc patches for
merging into the LED subsystem for v6.6.
Henning Schild [Thu, 13 Jul 2023 14:48:32 +0000 (16:48 +0200)]
platform/x86: simatic-ipc: use extra module loading for watchdog
We recently introduced a way to name additional modules to load for each
device. Use that instead of wdtmode to load the watchdog module. This
patch does not change behaviour, it is just style.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Link: https://lore.kernel.org/r/20230713144832.26473-4-henning.schild@siemens.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Henning Schild [Thu, 13 Jul 2023 14:48:31 +0000 (16:48 +0200)]
platform/x86: simatic-ipc: add auto-loading of hwmon modules
In order to know which hwmon modules to load one would have to usually
first probe from user-land i.e. with sensors-detect and create a config
for each machine. But here we know exactly what machines we are dealing
with, so we can request those howmon modules without user-mode detection
and config files.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Link: https://lore.kernel.org/r/20230713144832.26473-3-henning.schild@siemens.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Henning Schild [Thu, 13 Jul 2023 14:48:30 +0000 (16:48 +0200)]
platform/x86: simatic-ipc: add another model
This is the panel variant of a device we already did have. All the same,
just no LEDs.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Link: https://lore.kernel.org/r/20230713144832.26473-2-henning.schild@siemens.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Henning Schild [Thu, 6 Jul 2023 16:10:39 +0000 (18:10 +0200)]
platform/x86: simatic-ipc: drop PCI runtime depends and header
We do not use PCI any longer since
commit
446f0cf9e08b ("platform/x86: simatic-ipc: drop custom P2SB bar code")'
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Link: https://lore.kernel.org/r/20230706161040.21152-2-henning.schild@siemens.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Henning Schild [Thu, 6 Jul 2023 15:48:31 +0000 (17:48 +0200)]
platform/x86: simatic-ipc: add CMOS battery monitoring
Siemens Simatic Industrial PCs can monitor the voltage of the CMOS
battery with two bits that indicate low or empty state. This can be GPIO
or PortIO based.
Here we model that as a hwmon voltage. The core driver does the PortIO
and provides boilerplate for the GPIO versions. Which are split out to
model runtime dependencies while allowing fine-grained kernel
configuration.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230706154831.19100-3-henning.schild@siemens.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Henning Schild [Thu, 6 Jul 2023 15:48:30 +0000 (17:48 +0200)]
watchdog: simatic-ipc-wdt: make IO region access of one model muxed
The IO region used for the watchdog also hold CMOS battery monitoring
information. Make the access muxed so that a hwmon driver can use the
region as well.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230706154831.19100-2-henning.schild@siemens.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Henning Schild [Thu, 13 Jul 2023 11:56:38 +0000 (13:56 +0200)]
platform/x86: simatic-ipc: add another model BX-21A
This adds support for the Siemens Simatic IPC model BX-21A. Actual
drivers for that model will be sent in separate patches.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230713115639.16419-2-henning.schild@siemens.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Thomas Weißschuh [Tue, 4 Jul 2023 21:03:18 +0000 (23:03 +0200)]
platform/x86: thinkpad_acpi: use lockdep annotations
Instead of relying on free-form comments to document locking
requirements use well-known lockdep annotations.
These can also be validated at runtime make sure the invariants are not
violated.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20230704-thinkpad_acpi-lockdep-v1-2-60129548a738@weissschuh.net
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Thomas Weißschuh [Tue, 4 Jul 2023 21:03:17 +0000 (23:03 +0200)]
platform/x86: thinkpad_acpi: take mutex for hotkey_mask_{set,get}
hotkey_mask_set() and hotkey_mask_get() expect hotkey_mutex to be held.
While it should not matter during initialization a following patch will
enable lockdep for hotkey_mutex which would produce warnings here.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20230704-thinkpad_acpi-lockdep-v1-1-60129548a738@weissschuh.net
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Luke D. Jones [Fri, 30 Jun 2023 05:35:52 +0000 (17:35 +1200)]
platform/x86: asus-wmi: expose dGPU and CPU tunables for ROG
Expose various CPU and dGPU tunables that are available on many ASUS
ROG laptops. The tunables shown in sysfs will vary depending on the CPU
and dGPU vendor.
All of these variables are write only and there is no easy way to find
what the defaults are. In general they seem to default to the max value
the vendor sets for the CPU and dGPU package - this is not the same as
the min/max writable value. Values written to these variables that are
beyond the capabilities of the CPU are ignored by the laptop.
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230630053552.976579-9-luke@ljones.dev
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Luke D. Jones [Fri, 30 Jun 2023 05:35:51 +0000 (17:35 +1200)]
platform/x86: asus-wmi: support setting mini-LED mode
Support changing the mini-LED mode on some of the newer ASUS laptops.
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230630053552.976579-8-luke@ljones.dev
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Luke D. Jones [Fri, 30 Jun 2023 05:35:50 +0000 (17:35 +1200)]
platform/x86: asus-wmi: add safety checks to gpu switching
Add safety checking to dgpu_disable, egpu_enable, gpu_mux_mode.
These checks prevent users from doing such things as:
- disabling the dGPU while is muxed to drive the internal screen
- enabling the eGPU which also disables the dGPU, while muxed to
the internal screen
- switching the MUX to dGPU while the dGPU is disabled
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230630053552.976579-7-luke@ljones.dev
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Luke D. Jones [Fri, 30 Jun 2023 05:35:49 +0000 (17:35 +1200)]
platform/x86: asus-wmi: don't allow eGPU switching if eGPU not connected
Check the ASUS_WMI_DEVID_EGPU_CONNECTED method for eGPU connection
before allowing the ASUS_WMI_DEVID_EGPU method to run.
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230630053552.976579-6-luke@ljones.dev
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Luke D. Jones [Fri, 30 Jun 2023 05:35:48 +0000 (17:35 +1200)]
platform/x86: asus-wmi: add WMI method to show if egpu connected
Exposes the WMI method which tells if the eGPU is properly connected
on the devices that support it.
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230630053552.976579-5-luke@ljones.dev
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Luke D. Jones [Fri, 30 Jun 2023 05:35:47 +0000 (17:35 +1200)]
platform/x86: asus-wmi: support middle fan custom curves
Adds support for fan curves defined for the middle fan which
is available on some ASUS ROG laptops.
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230630053552.976579-4-luke@ljones.dev
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Luke D. Jones [Fri, 30 Jun 2023 05:35:46 +0000 (17:35 +1200)]
platform/x86: asus-wmi: add support for showing middle fan RPM
Some newer ASUS ROG laptops now have a middle/center fan in addition
to the CPU and GPU fans. This new fan typically blows across the
heatpipes and VRMs betweent eh CPU and GPU.
This commit exposes that fan to PWM control plus showing RPM.
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230630053552.976579-3-luke@ljones.dev
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Luke D. Jones [Fri, 30 Jun 2023 05:35:45 +0000 (17:35 +1200)]
platform/x86: asus-wmi: add support for showing charger mode
Expose a WMI method in sysfs platform for showing which connected
charger the laptop is currently using.
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230630053552.976579-2-luke@ljones.dev
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Thomas GENTY [Fri, 7 Jul 2023 14:14:25 +0000 (16:14 +0200)]
platform/x86: touchscreen_dmi: Add info for the Archos 101 Cesium Educ tablet
Add info for the Archos 101 Cesium Educ tablet
It was tested using gslx680_ts_acpi module
PR at https://github.com/onitake/gsl-firmware/pull/210 for the firmware
Signed-off-by: Thomas GENTY <tomlohave@gmail.com>
Link: https://lore.kernel.org/r/20230707141425.21473-1-tomlohave@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Armin Wolf [Fri, 7 Jul 2023 01:03:33 +0000 (03:03 +0200)]
platform/x86: dell-ddv: Fix mangled list in documentation
Add missing empty line necessary for sphinx to recognize
the list. Also reword the first entry a little bit.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20230707010333.12954-2-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Armin Wolf [Fri, 7 Jul 2023 01:03:32 +0000 (03:03 +0200)]
platform/x86: dell-ddv: Improve error handling
If for some reason a external function returns -ENODEV,
no error message is being displayed because the driver
assumes that -ENODEV can only be returned internally if
no sensors, etc where found.
Fix this by explicitly returning 0 in such a case since
missing hardware is no error. Also remove the now obsolete
check for -ENODEV.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20230707010333.12954-1-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Shyam Sundar S K [Tue, 11 Jul 2023 10:09:03 +0000 (15:39 +0530)]
platform/x86/amd: pmf: Add new ACPI ID AMDI0103
Add new ACPI ID AMDI0103 used by upcoming AMD platform to the PMF
supported list of devices.
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20230711100903.384151-1-Shyam-sundar.S-k@amd.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Shyam Sundar S K [Tue, 11 Jul 2023 10:03:44 +0000 (15:33 +0530)]
platform/x86/amd: pmc: Add new ACPI ID AMDI000A
Add new ACPI ID AMDI000A used by upcoming AMD platform to the pmc
supported list of devices
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20230711100344.383948-1-Shyam-sundar.S-k@amd.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>