From 77ee9d299e6d69a75e9a3e15a1f09cd7c8f88ff0 Mon Sep 17 00:00:00 2001 From: "Luke D. Jones" Date: Fri, 30 Jun 2023 17:35:45 +1200 Subject: 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 Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230630053552.976579-2-luke@ljones.dev Signed-off-by: Hans de Goede --- include/linux/platform_data/x86/asus-wmi.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/platform_data') diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h index 28234dc9fa6a..f90cafe26af1 100644 --- a/include/linux/platform_data/x86/asus-wmi.h +++ b/include/linux/platform_data/x86/asus-wmi.h @@ -95,6 +95,9 @@ /* Keyboard dock */ #define ASUS_WMI_DEVID_KBD_DOCK 0x00120063 +/* Charging mode - 1=Barrel, 2=USB */ +#define ASUS_WMI_DEVID_CHARGE_MODE 0x0012006C + /* dgpu on/off */ #define ASUS_WMI_DEVID_EGPU 0x00090019 -- cgit v1.2.3 From 536fce82d72933b9c60f1f0873f75ef890d80679 Mon Sep 17 00:00:00 2001 From: "Luke D. Jones" Date: Fri, 30 Jun 2023 17:35:46 +1200 Subject: 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 Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230630053552.976579-3-luke@ljones.dev Signed-off-by: Hans de Goede --- include/linux/platform_data/x86/asus-wmi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/platform_data') diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h index f90cafe26af1..2c03bda7703f 100644 --- a/include/linux/platform_data/x86/asus-wmi.h +++ b/include/linux/platform_data/x86/asus-wmi.h @@ -80,6 +80,7 @@ #define ASUS_WMI_DEVID_FAN_CTRL 0x00110012 /* deprecated */ #define ASUS_WMI_DEVID_CPU_FAN_CTRL 0x00110013 #define ASUS_WMI_DEVID_GPU_FAN_CTRL 0x00110014 +#define ASUS_WMI_DEVID_MID_FAN_CTRL 0x00110031 #define ASUS_WMI_DEVID_CPU_FAN_CURVE 0x00110024 #define ASUS_WMI_DEVID_GPU_FAN_CURVE 0x00110025 -- cgit v1.2.3 From ee887807d05d3d6fb68917df59e450385fe630d3 Mon Sep 17 00:00:00 2001 From: "Luke D. Jones" Date: Fri, 30 Jun 2023 17:35:47 +1200 Subject: 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 Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230630053552.976579-4-luke@ljones.dev Signed-off-by: Hans de Goede --- include/linux/platform_data/x86/asus-wmi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/platform_data') diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h index 2c03bda7703f..329efc086993 100644 --- a/include/linux/platform_data/x86/asus-wmi.h +++ b/include/linux/platform_data/x86/asus-wmi.h @@ -83,6 +83,7 @@ #define ASUS_WMI_DEVID_MID_FAN_CTRL 0x00110031 #define ASUS_WMI_DEVID_CPU_FAN_CURVE 0x00110024 #define ASUS_WMI_DEVID_GPU_FAN_CURVE 0x00110025 +#define ASUS_WMI_DEVID_MID_FAN_CURVE 0x00110032 /* Power */ #define ASUS_WMI_DEVID_PROCESSOR_STATE 0x00120012 -- cgit v1.2.3 From d4eca58aafe241f68e9d7e015d262abe8c8507ac Mon Sep 17 00:00:00 2001 From: "Luke D. Jones" Date: Fri, 30 Jun 2023 17:35:48 +1200 Subject: 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 Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230630053552.976579-5-luke@ljones.dev Signed-off-by: Hans de Goede --- include/linux/platform_data/x86/asus-wmi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/linux/platform_data') diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h index 329efc086993..2034648f8cdf 100644 --- a/include/linux/platform_data/x86/asus-wmi.h +++ b/include/linux/platform_data/x86/asus-wmi.h @@ -100,7 +100,9 @@ /* Charging mode - 1=Barrel, 2=USB */ #define ASUS_WMI_DEVID_CHARGE_MODE 0x0012006C -/* dgpu on/off */ +/* epu is connected? 1 == true */ +#define ASUS_WMI_DEVID_EGPU_CONNECTED 0x00090018 +/* egpu on/off */ #define ASUS_WMI_DEVID_EGPU 0x00090019 /* dgpu on/off */ -- cgit v1.2.3 From abac4259fc0a2b691af6c3916e420f374f7fd900 Mon Sep 17 00:00:00 2001 From: "Luke D. Jones" Date: Fri, 30 Jun 2023 17:35:51 +1200 Subject: 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 Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230630053552.976579-8-luke@ljones.dev Signed-off-by: Hans de Goede --- include/linux/platform_data/x86/asus-wmi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/platform_data') diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h index 2034648f8cdf..ea80361ac6c7 100644 --- a/include/linux/platform_data/x86/asus-wmi.h +++ b/include/linux/platform_data/x86/asus-wmi.h @@ -66,6 +66,7 @@ #define ASUS_WMI_DEVID_CAMERA 0x00060013 #define ASUS_WMI_DEVID_LID_FLIP 0x00060062 #define ASUS_WMI_DEVID_LID_FLIP_ROG 0x00060077 +#define ASUS_WMI_DEVID_MINI_LED_MODE 0x0005001E /* Storage */ #define ASUS_WMI_DEVID_CARDREADER 0x00080013 -- cgit v1.2.3 From e0b278e7b5da62c3ebb156a8b7d76a739da2d953 Mon Sep 17 00:00:00 2001 From: "Luke D. Jones" Date: Fri, 30 Jun 2023 17:35:52 +1200 Subject: 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 Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230630053552.976579-9-luke@ljones.dev Signed-off-by: Hans de Goede --- include/linux/platform_data/x86/asus-wmi.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/linux/platform_data') diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h index ea80361ac6c7..16e99a1c37fc 100644 --- a/include/linux/platform_data/x86/asus-wmi.h +++ b/include/linux/platform_data/x86/asus-wmi.h @@ -86,6 +86,15 @@ #define ASUS_WMI_DEVID_GPU_FAN_CURVE 0x00110025 #define ASUS_WMI_DEVID_MID_FAN_CURVE 0x00110032 +/* Tunables for AUS ROG laptops */ +#define ASUS_WMI_DEVID_PPT_PL2_SPPT 0x001200A0 +#define ASUS_WMI_DEVID_PPT_PL1_SPL 0x001200A3 +#define ASUS_WMI_DEVID_PPT_APU_SPPT 0x001200B0 +#define ASUS_WMI_DEVID_PPT_PLAT_SPPT 0x001200B1 +#define ASUS_WMI_DEVID_PPT_FPPT 0x001200C1 +#define ASUS_WMI_DEVID_NV_DYN_BOOST 0x001200C0 +#define ASUS_WMI_DEVID_NV_THERM_TARGET 0x001200C2 + /* Power */ #define ASUS_WMI_DEVID_PROCESSOR_STATE 0x00120012 -- cgit v1.2.3 From 1b3aa9701bd2975f7e08aac6f13fbd75d1df8eac Mon Sep 17 00:00:00 2001 From: Henning Schild Date: Thu, 13 Jul 2023 13:56:38 +0200 Subject: 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 Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230713115639.16419-2-henning.schild@siemens.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- include/linux/platform_data/x86/simatic-ipc-base.h | 3 ++- include/linux/platform_data/x86/simatic-ipc.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'include/linux/platform_data') diff --git a/include/linux/platform_data/x86/simatic-ipc-base.h b/include/linux/platform_data/x86/simatic-ipc-base.h index 57d6a10dfc9e..68c455f5edad 100644 --- a/include/linux/platform_data/x86/simatic-ipc-base.h +++ b/include/linux/platform_data/x86/simatic-ipc-base.h @@ -2,7 +2,7 @@ /* * Siemens SIMATIC IPC drivers * - * Copyright (c) Siemens AG, 2018-2021 + * Copyright (c) Siemens AG, 2018-2023 * * Authors: * Henning Schild @@ -20,6 +20,7 @@ #define SIMATIC_IPC_DEVICE_127E 3 #define SIMATIC_IPC_DEVICE_227E 4 #define SIMATIC_IPC_DEVICE_227G 5 +#define SIMATIC_IPC_DEVICE_BX_21A 6 struct simatic_ipc_platform { u8 devmode; diff --git a/include/linux/platform_data/x86/simatic-ipc.h b/include/linux/platform_data/x86/simatic-ipc.h index a48bb5240977..1a8e4c1099e3 100644 --- a/include/linux/platform_data/x86/simatic-ipc.h +++ b/include/linux/platform_data/x86/simatic-ipc.h @@ -2,7 +2,7 @@ /* * Siemens SIMATIC IPC drivers * - * Copyright (c) Siemens AG, 2018-2021 + * Copyright (c) Siemens AG, 2018-2023 * * Authors: * Henning Schild @@ -34,6 +34,7 @@ enum simatic_ipc_station_ids { SIMATIC_IPC_IPC227G = 0x00000F01, SIMATIC_IPC_IPCBX_39A = 0x00001001, SIMATIC_IPC_IPCPX_39A = 0x00001002, + SIMATIC_IPC_IPCBX_21A = 0x00001101, }; static inline u32 simatic_ipc_get_station_id(u8 *data, int max_len) -- cgit v1.2.3 From 917f543407947a007052edf7f89854259e6be008 Mon Sep 17 00:00:00 2001 From: Henning Schild Date: Thu, 6 Jul 2023 17:48:31 +0200 Subject: 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 Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230706154831.19100-3-henning.schild@siemens.com Signed-off-by: Hans de Goede --- include/linux/platform_data/x86/simatic-ipc-base.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/platform_data') diff --git a/include/linux/platform_data/x86/simatic-ipc-base.h b/include/linux/platform_data/x86/simatic-ipc-base.h index 68c455f5edad..4ca21065c862 100644 --- a/include/linux/platform_data/x86/simatic-ipc-base.h +++ b/include/linux/platform_data/x86/simatic-ipc-base.h @@ -21,6 +21,7 @@ #define SIMATIC_IPC_DEVICE_227E 4 #define SIMATIC_IPC_DEVICE_227G 5 #define SIMATIC_IPC_DEVICE_BX_21A 6 +#define SIMATIC_IPC_DEVICE_BX_39A 7 struct simatic_ipc_platform { u8 devmode; -- cgit v1.2.3 From 8529673adc2b022d40917b202b17bdabeef8e37a Mon Sep 17 00:00:00 2001 From: Henning Schild Date: Thu, 13 Jul 2023 16:48:30 +0200 Subject: 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 Link: https://lore.kernel.org/r/20230713144832.26473-2-henning.schild@siemens.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- include/linux/platform_data/x86/simatic-ipc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/platform_data') diff --git a/include/linux/platform_data/x86/simatic-ipc.h b/include/linux/platform_data/x86/simatic-ipc.h index 1a8e4c1099e3..f2eafa43a605 100644 --- a/include/linux/platform_data/x86/simatic-ipc.h +++ b/include/linux/platform_data/x86/simatic-ipc.h @@ -32,6 +32,7 @@ enum simatic_ipc_station_ids { SIMATIC_IPC_IPC477E = 0x00000A02, SIMATIC_IPC_IPC127E = 0x00000D01, SIMATIC_IPC_IPC227G = 0x00000F01, + SIMATIC_IPC_IPC277G = 0x00000F02, SIMATIC_IPC_IPCBX_39A = 0x00001001, SIMATIC_IPC_IPCPX_39A = 0x00001002, SIMATIC_IPC_IPCBX_21A = 0x00001101, -- cgit v1.2.3 From b8af77951941e943434a76ef40fdc372bf95030e Mon Sep 17 00:00:00 2001 From: "xingtong.wu" Date: Mon, 31 Jul 2023 15:14:24 +0800 Subject: 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 Link: https://lore.kernel.org/r/20230731071424.4663-2-xingtong_wu@163.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- include/linux/platform_data/x86/simatic-ipc-base.h | 1 + include/linux/platform_data/x86/simatic-ipc.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'include/linux/platform_data') diff --git a/include/linux/platform_data/x86/simatic-ipc-base.h b/include/linux/platform_data/x86/simatic-ipc-base.h index 4ca21065c862..2d7f7120ba6b 100644 --- a/include/linux/platform_data/x86/simatic-ipc-base.h +++ b/include/linux/platform_data/x86/simatic-ipc-base.h @@ -22,6 +22,7 @@ #define SIMATIC_IPC_DEVICE_227G 5 #define SIMATIC_IPC_DEVICE_BX_21A 6 #define SIMATIC_IPC_DEVICE_BX_39A 7 +#define SIMATIC_IPC_DEVICE_BX_59A 8 struct simatic_ipc_platform { u8 devmode; diff --git a/include/linux/platform_data/x86/simatic-ipc.h b/include/linux/platform_data/x86/simatic-ipc.h index f2eafa43a605..8d8b3b919674 100644 --- a/include/linux/platform_data/x86/simatic-ipc.h +++ b/include/linux/platform_data/x86/simatic-ipc.h @@ -36,6 +36,8 @@ enum simatic_ipc_station_ids { SIMATIC_IPC_IPCBX_39A = 0x00001001, SIMATIC_IPC_IPCPX_39A = 0x00001002, SIMATIC_IPC_IPCBX_21A = 0x00001101, + SIMATIC_IPC_IPCBX_56A = 0x00001201, + SIMATIC_IPC_IPCBX_59A = 0x00001202, }; static inline u32 simatic_ipc_get_station_id(u8 *data, int max_len) -- cgit v1.2.3