public inbox for platform-driver-x86@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86: oxpec: add support for OneXPlayer Super X
@ 2026-03-29 21:53 Alexander Egorov
  2026-03-29 22:33 ` Derek J. Clark
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Alexander Egorov @ 2026-03-29 21:53 UTC (permalink / raw)
  To: Antheas Kapenekakis, Derek John Clark,
	Joaquín Ignacio Aramendía
  Cc: platform-driver-x86, ps1x

From: ps1x <ps1x@users.noreply.github.com>

OneXPlayer Super X identifies itself via DMI as:

  board vendor: ONE-NETBOOK
  board name:   ONEXPLAYER SUPER X
  product name: ONEXPLAYER SUPER X

Current mainline oxpec does not contain a matching DMI entry for this
system, so the in-tree driver is not auto-loaded.

On the tested Super X device, the working EC layout matches the
following handling:

- fan RPM is read from OXP_SENSOR_FAN_REG (0x76)
- pwm1_enable uses OXP_SENSOR_PWM_ENABLE_REG (0x4A)
- pwm1 uses OXP_SENSOR_PWM_REG (0x4B) with direct 0-255 writes
- turbo toggle uses OXP_TURBO_SWITCH_REG (0xF1)
- charge-limit / charge-behaviour uses the same battery extension path
  as the X1 family

Add a dedicated oxp_superx board id, a DMI match for OneXPlayer Super X,
and route the fan, PWM, turbo-toggle, and battery-extension paths
through the validated Super X handling.

Tested-on: OneXPlayer Super X
Signed-off-by: ps1x <ps1x@users.noreply.github.com>
---
 drivers/platform/x86/oxpec.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/platform/x86/oxpec.c b/drivers/platform/x86/oxpec.c
index 6d4a53a2e..d366c398d 100644
--- a/drivers/platform/x86/oxpec.c
+++ b/drivers/platform/x86/oxpec.c
@@ -48,6 +48,7 @@ enum oxp_board {
 	oxp_mini_amd_a07,
 	oxp_mini_amd_pro,
 	oxp_x1,
+	oxp_superx,
 	oxp_g1_i,
 	oxp_g1_a,
 };
@@ -282,6 +283,13 @@ static const struct dmi_system_id dmi_table[] = {
 		},
 		.driver_data = (void *)oxp_x1,
 	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER SUPER X"),
+		},
+		.driver_data = (void *)oxp_superx,
+	},
 	{},
 };
 
@@ -336,6 +344,7 @@ static umode_t tt_toggle_is_visible(struct kobject *kobj,
 	case oxp_mini_amd_a07:
 	case oxp_mini_amd_pro:
 	case oxp_x1:
+	case oxp_superx:
 	case oxp_g1_i:
 	case oxp_g1_a:
 		return attr->mode;
@@ -366,6 +375,7 @@ static ssize_t tt_toggle_store(struct device *dev,
 	case aok_zoe_a1:
 	case oxp_fly:
 	case oxp_mini_amd_pro:
+	case oxp_superx:
 	case oxp_g1_a:
 		reg = OXP_TURBO_SWITCH_REG;
 		mask = OXP_TURBO_TAKE_VAL;
@@ -412,6 +422,7 @@ static ssize_t tt_toggle_show(struct device *dev,
 	case aok_zoe_a1:
 	case oxp_fly:
 	case oxp_mini_amd_pro:
+	case oxp_superx:
 	case oxp_g1_a:
 		reg = OXP_TURBO_SWITCH_REG;
 		mask = OXP_TURBO_TAKE_VAL;
@@ -507,6 +518,7 @@ static bool oxp_psy_ext_supported(void)
 {
 	switch (board) {
 	case oxp_x1:
+	case oxp_superx:
 	case oxp_g1_i:
 	case oxp_g1_a:
 	case oxp_fly:
@@ -640,6 +652,7 @@ static int oxp_pwm_enable(void)
 	case oxp_mini_amd_a07:
 	case oxp_mini_amd_pro:
 	case oxp_x1:
+	case oxp_superx:
 	case oxp_g1_i:
 	case oxp_g1_a:
 		return write_to_ec(OXP_SENSOR_PWM_ENABLE_REG, PWM_MODE_MANUAL);
@@ -660,6 +673,7 @@ static int oxp_pwm_disable(void)
 	case oxp_mini_amd_a07:
 	case oxp_mini_amd_pro:
 	case oxp_x1:
+	case oxp_superx:
 	case oxp_g1_i:
 	case oxp_g1_a:
 		return write_to_ec(OXP_SENSOR_PWM_ENABLE_REG, PWM_MODE_AUTO);
@@ -717,6 +731,7 @@ static int oxp_pwm_fan_speed(long *val)
 	case oxp_mini_amd:
 	case oxp_mini_amd_a07:
 	case oxp_mini_amd_pro:
+	case oxp_superx:
 	case oxp_g1_a:
 		return read_from_ec(OXP_SENSOR_FAN_REG, 2, val);
 	default:
@@ -749,6 +764,7 @@ static int oxp_pwm_input_write(long val)
 	case aok_zoe_a1:
 	case oxp_fly:
 	case oxp_mini_amd_pro:
+	case oxp_superx:
 	case oxp_g1_a:
 		return write_to_ec(OXP_SENSOR_PWM_REG, val);
 	default:
@@ -788,6 +804,7 @@ static int oxp_pwm_input_read(long *val)
 	case aok_zoe_a1:
 	case oxp_fly:
 	case oxp_mini_amd_pro:
+	case oxp_superx:
 	case oxp_g1_a:
 	default:
 		ret = read_from_ec(OXP_SENSOR_PWM_REG, 1, val);
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-06 10:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-29 21:53 [PATCH] platform/x86: oxpec: add support for OneXPlayer Super X Alexander Egorov
2026-03-29 22:33 ` Derek J. Clark
2026-03-30  7:04 ` Antheas Kapenekakis
2026-03-30 10:10 ` [PATCH v2] " Alexander Egorov
2026-04-01  8:13   ` Antheas Kapenekakis
2026-04-06 10:25 ` [PATCH v3] Remove outdated upstream contact note Alexander Egorov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox