Skip to contentSkip to conversation

platform/x86: uniwill-laptop: Support the PCSpecialist Recoil 16 AMD

PATCH Superseded Mohamed Jouini 2 participants 5 messages Sep 27 – Oct 8

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover platform/x86: uniwill-laptop: Support the PCSpecialist Recoil 16 AMD

The PCSpecialist Recoil 16 AMD is a rebadged TUXEDO Stellaris 16 Gen7 AMD (board X6FR57TY), which the driver does not match today because of the different DMI vendor and board name.

Patch 1 adds it with the existing Stellaris 16 Gen7 AMD feature set. Patch 2 maps the "Sc" key (WMI event 0xD0) to KEY_ROTATE_DISPLAY.

Tested on the Recoil 16 AMD (BIOS N.1.39PCS10) with the driver from this series built against 7.2.7: the Sc key, the hwmon fan and temperature readings, and all three charging profiles. Charging from below 70%, with the charge counted from current_now:

  Profile    CV (4S)    per cell   stops at, of a Standard charge
  Standard   17.405 V   4.35 V     100%
  Long_Life  17.194 V   4.30 V     about 93%
  Trickle    16.818 V   4.20 V     about 90%

In every profile the EC then reports 100% / Full, as Armin said it would.

Changes in v2:
- Patch 1 uses the existing Stellaris 16 Gen7 AMD feature set (charging profiles) instead of the percentage charge limit (Armin).
- Dropped the platform profile patch for now (Armin).
- Added Armin's Reviewed-by to the Sc key patch. On whether TUXEDO knows more about event 0xD0: tuxedo-drivers (4.24.0) has no entry for it in its Uniwill keymap, so it only reaches the "Unknown code" debug message there.

Regarding EC_ADDR_CHARGE_CTRL from the v1 review: it needs no cleanup. It was 0 before v1 was ever loaded, and after a power cycle without the driver the EC had reset it to 0 on its own.

v1: https://lore.kernel.org/platform-driver-x86/[email protected]/

Mohamed Jouini (2):
platform/x86: uniwill-laptop: Add PCSpecialist Recoil 16 AMD platform/x86: uniwill-laptop: Map the screen rotation key

 drivers/platform/x86/uniwill/uniwill-acpi.c | 11 +++++++++++
 drivers/platform/x86/uniwill/uniwill-wmi.h  |  3 +++
 2 files changed, 14 insertions(+)

base-commit: f475845eaf3d749114a63270bf2efea459e14dd2

Signature · 1 line
2.55.0
#1 lore raw

PATCH v2 1/2 platform/x86: uniwill-laptop: Add PCSpecialist Recoil 16 AMD

The PCSpecialist Recoil 16 AMD is a rebadged TUXEDO Stellaris 16 Gen7 AMD but reports sys_vendor "PCSpecialist" and board name "X6FR57TY", so the existing entry does not match it. Use the Stellaris 16 Gen7 AMD feature set.

---
Changes in v2:
- Use the existing Stellaris 16 Gen7 AMD feature set (charging profiles) instead of a separate descriptor with the percentage charge limit.

 drivers/platform/x86/uniwill/uniwill-acpi.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/platform/x86/uniwill/uniwill-acpi.c +8 -0
index eeead0159..7d39e97fa 100644
@@ -3268,6 +3268,14 @@ static const struct dmi_system_id uniwill_dmi_table[] __initconst = {
 		},
 		.driver_data = &tux_featureset_4_nvidia_descriptor,
 	},
+	{
+		.ident = "PCSpecialist Recoil 16 AMD",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "PCSpecialist"),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "X6FR57TY"),
+		},
+		.driver_data = &tux_featureset_4_nvidia_descriptor,
+	},
 	{
 		.ident = "TUXEDO Stellaris 16 Gen7 Intel",
 		.matches = {
Signature · 1 line
2.55.0
#3 lore raw

PATCH v2 2/2 platform/x86: uniwill-laptop: Map the screen rotation key

In reply to Mohamed Jouini

The PCSpecialist Recoil 16 AMD / TUXEDO Stellaris 16 Gen7 chassis has an "Sc" key next to F12, meant to rotate the lay-flat screen by 180 degrees. It reports WMI event 0xD0, which is currently reported as KEY_UNKNOWN. Map it to KEY_ROTATE_DISPLAY.

---
Changes in v2:
- Added Reviewed-by. tuxedo-drivers (4.24.0) has no entry for event 0xD0 in its Uniwill keymap; there it only reaches the "Unknown code" debug message.

 drivers/platform/x86/uniwill/uniwill-acpi.c | 3 +++
 drivers/platform/x86/uniwill/uniwill-wmi.h  | 3 +++
 2 files changed, 6 insertions(+)
drivers/platform/x86/uniwill/uniwill-acpi.c +3 -0
index 7d39e97fa..2f440925d 100644
@@ -506,6 +506,9 @@ static const struct key_entry uniwill_keymap[] = {
 	/* Reported when the user wants to toggle the webcam */
 	{ KE_IGNORE,    UNIWILL_OSD_WEBCAM_TOGGLE,              { KEY_UNKNOWN }},
 
+	/* Reported when the user wants to rotate the (lay-flat) screen by 180 degrees */
+	{ KE_KEY,       UNIWILL_OSD_ROTATE_SCREEN,              { KEY_ROTATE_DISPLAY }},
+
 	{ KE_END }
 };
 
drivers/platform/x86/uniwill/uniwill-wmi.h +3 -0
index b25b2f312..1b6f650c4 100644
@@ -117,6 +117,9 @@
 
 #define UNIWILL_OSD_WEBCAM_TOGGLE		0xCF
 
+/* "Sc" key next to F12 on the PCSpecialist Recoil 16 / Stellaris 16 Gen7 */
+#define UNIWILL_OSD_ROTATE_SCREEN		0xD0
+
 #define UNIWILL_OSD_KBD_BACKLIGHT_CHANGED	0xF0
 
 struct device;
Signature · 1 line
2.55.0
maintainer
#2 lore raw

Re: [PATCH v2 1/2] platform/x86: uniwill-laptop: Add PCSpecialist Recoil 16 AMD

In reply to Mohamed Jouini
Quoted 19 lines · Mohamed Jouini

The PCSpecialist Recoil 16 AMD is a rebadged TUXEDO Stellaris 16 Gen7 AMD but reports sys_vendor "PCSpecialist" and board name "X6FR57TY", so the existing entry does not match it. Use the Stellaris 16 Gen7 AMD feature set.

---
Changes in v2:
- Use the existing Stellaris 16 Gen7 AMD feature set (charging profiles) instead of a separate descriptor with the percentage charge limit.

 drivers/platform/x86/uniwill/uniwill-acpi.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/platform/x86/uniwill/uniwill-acpi.c +0 -0
index eeead0159..7d39e97fa 100644

drivers/platform/x86/uniwill/uniwill-acpi.c static const struct dmi_system_id uniwill_dmi_table[] __initconst = { · line 3277

Quoted 10 lines
drivers/platform/x86/uniwill/uniwill-acpi.c +7 -0
@@ -3268,6 +3268,14 @@ static const struct dmi_system_id uniwill_dmi_table[] __initconst = {
 		},
 		.driver_data = &tux_featureset_4_nvidia_descriptor,
 	},
+	{
+		.ident = "PCSpecialist Recoil 16 AMD",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "PCSpecialist"),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "X6FR57TY"),
+		},
+		.driver_data = &tux_featureset_4_nvidia_descriptor,

Hi,

The descriptors were renamed by recent work so could you please rebase this on top of the for-next branch and send v3.

Signature · 1 line
 i.
maintainer
#4 lore raw
In reply to Mohamed Jouini
Quoted 8 lines · Mohamed Jouini

The PCSpecialist Recoil 16 AMD is a rebadged TUXEDO Stellaris 16 Gen7 AMD (board X6FR57TY), which the driver does not match today because of the different DMI vendor and board name.

Patch 1 adds it with the existing Stellaris 16 Gen7 AMD feature set. Patch 2 maps the "Sc" key (WMI event 0xD0) to KEY_ROTATE_DISPLAY.

[...]

Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.

FYI [if applicable to your patch], as per Linus' policy change, also fixes are mostly routed through for-next unless the fix is for a commit introduced in the most recent cycle or is clearly a regression fix.

The list of commits applied:
[1/2] platform/x86: uniwill-laptop: Add PCSpecialist Recoil 16 AMD

      commit: 99ee4a2405fafe9636cb1c834cc3753ef5705041
[2/2] platform/x86: uniwill-laptop: Map the screen rotation key
      commit: 37dcbefbcf314ab032ee6bb7f7363c1de5e886a7

--
i.