linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] add definitions for ROG ZENITH II EXTREME
@ 2022-07-10 20:26 Eugene Shalygin
  2022-07-10 20:26 ` [PATCH v2 1/1] hwmon: (asus-ec-sensors) " Eugene Shalygin
  0 siblings, 1 reply; 3+ messages in thread
From: Eugene Shalygin @ 2022-07-10 20:26 UTC (permalink / raw)
  To: eugene.shalygin
  Cc: Jean Delvare, Guenter Roeck, Jonathan Corbet, linux-hwmon,
	linux-doc, linux-kernel

Changes in v2:
 - Use the proper author name and email.

Urs Schroffenegger (1):
  hwmon: (asus-ec-sensors) add definitions for ROG ZENITH II EXTREME

 Documentation/hwmon/asus_ec_sensors.rst |  1 +
 drivers/hwmon/asus-ec-sensors.c         | 47 +++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

-- 
2.35.1


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

* [PATCH v2 1/1] hwmon: (asus-ec-sensors) add definitions for ROG ZENITH II EXTREME
  2022-07-10 20:26 [PATCH v2 0/1] add definitions for ROG ZENITH II EXTREME Eugene Shalygin
@ 2022-07-10 20:26 ` Eugene Shalygin
  2022-07-13 13:46   ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Eugene Shalygin @ 2022-07-10 20:26 UTC (permalink / raw)
  To: eugene.shalygin
  Cc: Urs Schroffenegger, Jean Delvare, Guenter Roeck, Jonathan Corbet,
	linux-hwmon, linux-doc, linux-kernel

From: Urs Schroffenegger <nabajour@lampshade.ch>

Add definitions for ROG ZENITH II EXTREME and some unknown yet
temperature sensors in the second EC bank. Details are available at
[1, 2].

[1] https://github.com/zeule/asus-ec-sensors/pull/26
[2] https://github.com/zeule/asus-ec-sensors/issues/16

Signed-off-by: Urs Schroffenegger <nabajour@lampshade.ch>
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
---
 Documentation/hwmon/asus_ec_sensors.rst |  1 +
 drivers/hwmon/asus-ec-sensors.c         | 47 +++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/Documentation/hwmon/asus_ec_sensors.rst b/Documentation/hwmon/asus_ec_sensors.rst
index 1e40c123db77..02f4ad314a1e 100644
--- a/Documentation/hwmon/asus_ec_sensors.rst
+++ b/Documentation/hwmon/asus_ec_sensors.rst
@@ -22,6 +22,7 @@ Supported boards:
  * ROG STRIX X570-F GAMING
  * ROG STRIX X570-I GAMING
  * ROG STRIX Z690-A GAMING WIFI D4
+ * ROG ZENITH II EXTREME
 
 Authors:
     - Eugene Shalygin <eugene.shalygin@gmail.com>
diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
index 625c2baa35ec..3049537130be 100644
--- a/drivers/hwmon/asus-ec-sensors.c
+++ b/drivers/hwmon/asus-ec-sensors.c
@@ -56,6 +56,8 @@ static char *mutex_path_override;
 
 #define ASUS_HW_ACCESS_MUTEX_RMTW_ASMX	"\\RMTW.ASMX"
 
+#define ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0 "\\_SB_.PCI0.SBRG.SIO1.MUT0"
+
 #define MAX_IDENTICAL_BOARD_VARIATIONS	3
 
 /* Moniker for the ACPI global lock (':' is not allowed in ASL identifiers) */
@@ -121,6 +123,18 @@ enum ec_sensors {
 	ec_sensor_temp_water_in,
 	/* "Water_Out" temperature sensor reading [℃] */
 	ec_sensor_temp_water_out,
+	/* "Water_Block_In" temperature sensor reading [℃] */
+	ec_sensor_temp_water_block_in,
+	/* "Water_Block_Out" temperature sensor reading [℃] */
+	ec_sensor_temp_water_block_out,
+	/* "T_sensor_2" temperature sensor reading [℃] */
+	ec_sensor_temp_t_sensor_2,
+	/* "Extra_1" temperature sensor reading [℃] */
+	ec_sensor_temp_sensor_extra_1,
+	/* "Extra_2" temperature sensor reading [℃] */
+	ec_sensor_temp_sensor_extra_2,
+	/* "Extra_3" temperature sensor reading [℃] */
+	ec_sensor_temp_sensor_extra_3,
 };
 
 #define SENSOR_TEMP_CHIPSET BIT(ec_sensor_temp_chipset)
@@ -136,6 +150,12 @@ enum ec_sensors {
 #define SENSOR_CURR_CPU BIT(ec_sensor_curr_cpu)
 #define SENSOR_TEMP_WATER_IN BIT(ec_sensor_temp_water_in)
 #define SENSOR_TEMP_WATER_OUT BIT(ec_sensor_temp_water_out)
+#define SENSOR_TEMP_WATER_BLOCK_IN BIT(ec_sensor_temp_water_block_in)
+#define SENSOR_TEMP_WATER_BLOCK_OUT BIT(ec_sensor_temp_water_block_out)
+#define SENSOR_TEMP_T_SENSOR_2 BIT(ec_sensor_temp_t_sensor_2)
+#define SENSOR_TEMP_SENSOR_EXTRA_1 BIT(ec_sensor_temp_sensor_extra_1)
+#define SENSOR_TEMP_SENSOR_EXTRA_2 BIT(ec_sensor_temp_sensor_extra_2)
+#define SENSOR_TEMP_SENSOR_EXTRA_3 BIT(ec_sensor_temp_sensor_extra_3)
 
 enum board_family {
 	family_unknown,
@@ -199,6 +219,18 @@ static const struct ec_sensor_info sensors_family_amd_500[] = {
 		EC_SENSOR("Water_In", hwmon_temp, 1, 0x01, 0x00),
 	[ec_sensor_temp_water_out] =
 		EC_SENSOR("Water_Out", hwmon_temp, 1, 0x01, 0x01),
+	[ec_sensor_temp_water_block_in] =
+		EC_SENSOR("Water_Block_In", hwmon_temp, 1, 0x01, 0x02),
+	[ec_sensor_temp_water_block_out] =
+		EC_SENSOR("Water_Block_Out", hwmon_temp, 1, 0x01, 0x03),
+	[ec_sensor_temp_sensor_extra_1] =
+		EC_SENSOR("Extra_1", hwmon_temp, 1, 0x01, 0x09),
+	[ec_sensor_temp_t_sensor_2] =
+		EC_SENSOR("T_sensor_2", hwmon_temp, 1, 0x01, 0x0a),
+	[ec_sensor_temp_sensor_extra_2] =
+		EC_SENSOR("Extra_2", hwmon_temp, 1, 0x01, 0x0b),
+	[ec_sensor_temp_sensor_extra_3] =
+		EC_SENSOR("Extra_3", hwmon_temp, 1, 0x01, 0x0c),
 };
 
 static const struct ec_sensor_info sensors_family_intel_300[] = {
@@ -231,6 +263,9 @@ static const struct ec_sensor_info sensors_family_intel_600[] = {
 #define SENSOR_SET_TEMP_CHIPSET_CPU_MB                                         \
 	(SENSOR_TEMP_CHIPSET | SENSOR_TEMP_CPU | SENSOR_TEMP_MB)
 #define SENSOR_SET_TEMP_WATER (SENSOR_TEMP_WATER_IN | SENSOR_TEMP_WATER_OUT)
+#define SENSOR_SET_WATER_BLOCK                                                 \
+	(SENSOR_TEMP_WATER_BLOCK_IN | SENSOR_TEMP_WATER_BLOCK_OUT)
+
 
 struct ec_board_info {
 	const char *board_names[MAX_IDENTICAL_BOARD_VARIATIONS];
@@ -378,6 +413,18 @@ static const struct ec_board_info board_info[] = {
 		.mutex_path = ASUS_HW_ACCESS_MUTEX_RMTW_ASMX,
 		.family = family_intel_600_series,
 	},
+	{
+		.board_names = {"ROG ZENITH II EXTREME"},
+		.sensors = SENSOR_SET_TEMP_CHIPSET_CPU_MB | SENSOR_TEMP_T_SENSOR |
+			SENSOR_TEMP_VRM | SENSOR_SET_TEMP_WATER |
+			SENSOR_FAN_CPU_OPT | SENSOR_FAN_CHIPSET | SENSOR_FAN_VRM_HS |
+			SENSOR_FAN_WATER_FLOW | SENSOR_CURR_CPU | SENSOR_IN_CPU_CORE |
+			SENSOR_SET_WATER_BLOCK |
+			SENSOR_TEMP_T_SENSOR_2 | SENSOR_TEMP_SENSOR_EXTRA_1 |
+			SENSOR_TEMP_SENSOR_EXTRA_2 | SENSOR_TEMP_SENSOR_EXTRA_3,
+		.mutex_path = ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0,
+		.family = family_amd_500_series,
+	},
 	{}
 };
 
-- 
2.35.1


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

* Re: [PATCH v2 1/1] hwmon: (asus-ec-sensors) add definitions for ROG ZENITH II EXTREME
  2022-07-10 20:26 ` [PATCH v2 1/1] hwmon: (asus-ec-sensors) " Eugene Shalygin
@ 2022-07-13 13:46   ` Guenter Roeck
  0 siblings, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2022-07-13 13:46 UTC (permalink / raw)
  To: Eugene Shalygin
  Cc: Urs Schroffenegger, Jean Delvare, Jonathan Corbet, linux-hwmon,
	linux-doc, linux-kernel

On Sun, Jul 10, 2022 at 10:26:39PM +0200, Eugene Shalygin wrote:
> From: Urs Schroffenegger <nabajour@lampshade.ch>
> 
> Add definitions for ROG ZENITH II EXTREME and some unknown yet
> temperature sensors in the second EC bank. Details are available at
> [1, 2].
> 
> [1] https://github.com/zeule/asus-ec-sensors/pull/26
> [2] https://github.com/zeule/asus-ec-sensors/issues/16
> 
> Signed-off-by: Urs Schroffenegger <nabajour@lampshade.ch>
> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>

Applied.

Thanks,
Guenter
> ---
>  Documentation/hwmon/asus_ec_sensors.rst |  1 +
>  drivers/hwmon/asus-ec-sensors.c         | 47 +++++++++++++++++++++++++
>  2 files changed, 48 insertions(+)
> 
> diff --git a/Documentation/hwmon/asus_ec_sensors.rst b/Documentation/hwmon/asus_ec_sensors.rst
> index 1e40c123db77..02f4ad314a1e 100644
> --- a/Documentation/hwmon/asus_ec_sensors.rst
> +++ b/Documentation/hwmon/asus_ec_sensors.rst
> @@ -22,6 +22,7 @@ Supported boards:
>   * ROG STRIX X570-F GAMING
>   * ROG STRIX X570-I GAMING
>   * ROG STRIX Z690-A GAMING WIFI D4
> + * ROG ZENITH II EXTREME
>  
>  Authors:
>      - Eugene Shalygin <eugene.shalygin@gmail.com>
> diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
> index 625c2baa35ec..3049537130be 100644
> --- a/drivers/hwmon/asus-ec-sensors.c
> +++ b/drivers/hwmon/asus-ec-sensors.c
> @@ -56,6 +56,8 @@ static char *mutex_path_override;
>  
>  #define ASUS_HW_ACCESS_MUTEX_RMTW_ASMX	"\\RMTW.ASMX"
>  
> +#define ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0 "\\_SB_.PCI0.SBRG.SIO1.MUT0"
> +
>  #define MAX_IDENTICAL_BOARD_VARIATIONS	3
>  
>  /* Moniker for the ACPI global lock (':' is not allowed in ASL identifiers) */
> @@ -121,6 +123,18 @@ enum ec_sensors {
>  	ec_sensor_temp_water_in,
>  	/* "Water_Out" temperature sensor reading [℃] */
>  	ec_sensor_temp_water_out,
> +	/* "Water_Block_In" temperature sensor reading [℃] */
> +	ec_sensor_temp_water_block_in,
> +	/* "Water_Block_Out" temperature sensor reading [℃] */
> +	ec_sensor_temp_water_block_out,
> +	/* "T_sensor_2" temperature sensor reading [℃] */
> +	ec_sensor_temp_t_sensor_2,
> +	/* "Extra_1" temperature sensor reading [℃] */
> +	ec_sensor_temp_sensor_extra_1,
> +	/* "Extra_2" temperature sensor reading [℃] */
> +	ec_sensor_temp_sensor_extra_2,
> +	/* "Extra_3" temperature sensor reading [℃] */
> +	ec_sensor_temp_sensor_extra_3,
>  };
>  
>  #define SENSOR_TEMP_CHIPSET BIT(ec_sensor_temp_chipset)
> @@ -136,6 +150,12 @@ enum ec_sensors {
>  #define SENSOR_CURR_CPU BIT(ec_sensor_curr_cpu)
>  #define SENSOR_TEMP_WATER_IN BIT(ec_sensor_temp_water_in)
>  #define SENSOR_TEMP_WATER_OUT BIT(ec_sensor_temp_water_out)
> +#define SENSOR_TEMP_WATER_BLOCK_IN BIT(ec_sensor_temp_water_block_in)
> +#define SENSOR_TEMP_WATER_BLOCK_OUT BIT(ec_sensor_temp_water_block_out)
> +#define SENSOR_TEMP_T_SENSOR_2 BIT(ec_sensor_temp_t_sensor_2)
> +#define SENSOR_TEMP_SENSOR_EXTRA_1 BIT(ec_sensor_temp_sensor_extra_1)
> +#define SENSOR_TEMP_SENSOR_EXTRA_2 BIT(ec_sensor_temp_sensor_extra_2)
> +#define SENSOR_TEMP_SENSOR_EXTRA_3 BIT(ec_sensor_temp_sensor_extra_3)
>  
>  enum board_family {
>  	family_unknown,
> @@ -199,6 +219,18 @@ static const struct ec_sensor_info sensors_family_amd_500[] = {
>  		EC_SENSOR("Water_In", hwmon_temp, 1, 0x01, 0x00),
>  	[ec_sensor_temp_water_out] =
>  		EC_SENSOR("Water_Out", hwmon_temp, 1, 0x01, 0x01),
> +	[ec_sensor_temp_water_block_in] =
> +		EC_SENSOR("Water_Block_In", hwmon_temp, 1, 0x01, 0x02),
> +	[ec_sensor_temp_water_block_out] =
> +		EC_SENSOR("Water_Block_Out", hwmon_temp, 1, 0x01, 0x03),
> +	[ec_sensor_temp_sensor_extra_1] =
> +		EC_SENSOR("Extra_1", hwmon_temp, 1, 0x01, 0x09),
> +	[ec_sensor_temp_t_sensor_2] =
> +		EC_SENSOR("T_sensor_2", hwmon_temp, 1, 0x01, 0x0a),
> +	[ec_sensor_temp_sensor_extra_2] =
> +		EC_SENSOR("Extra_2", hwmon_temp, 1, 0x01, 0x0b),
> +	[ec_sensor_temp_sensor_extra_3] =
> +		EC_SENSOR("Extra_3", hwmon_temp, 1, 0x01, 0x0c),
>  };
>  
>  static const struct ec_sensor_info sensors_family_intel_300[] = {
> @@ -231,6 +263,9 @@ static const struct ec_sensor_info sensors_family_intel_600[] = {
>  #define SENSOR_SET_TEMP_CHIPSET_CPU_MB                                         \
>  	(SENSOR_TEMP_CHIPSET | SENSOR_TEMP_CPU | SENSOR_TEMP_MB)
>  #define SENSOR_SET_TEMP_WATER (SENSOR_TEMP_WATER_IN | SENSOR_TEMP_WATER_OUT)
> +#define SENSOR_SET_WATER_BLOCK                                                 \
> +	(SENSOR_TEMP_WATER_BLOCK_IN | SENSOR_TEMP_WATER_BLOCK_OUT)
> +
>  
>  struct ec_board_info {
>  	const char *board_names[MAX_IDENTICAL_BOARD_VARIATIONS];
> @@ -378,6 +413,18 @@ static const struct ec_board_info board_info[] = {
>  		.mutex_path = ASUS_HW_ACCESS_MUTEX_RMTW_ASMX,
>  		.family = family_intel_600_series,
>  	},
> +	{
> +		.board_names = {"ROG ZENITH II EXTREME"},
> +		.sensors = SENSOR_SET_TEMP_CHIPSET_CPU_MB | SENSOR_TEMP_T_SENSOR |
> +			SENSOR_TEMP_VRM | SENSOR_SET_TEMP_WATER |
> +			SENSOR_FAN_CPU_OPT | SENSOR_FAN_CHIPSET | SENSOR_FAN_VRM_HS |
> +			SENSOR_FAN_WATER_FLOW | SENSOR_CURR_CPU | SENSOR_IN_CPU_CORE |
> +			SENSOR_SET_WATER_BLOCK |
> +			SENSOR_TEMP_T_SENSOR_2 | SENSOR_TEMP_SENSOR_EXTRA_1 |
> +			SENSOR_TEMP_SENSOR_EXTRA_2 | SENSOR_TEMP_SENSOR_EXTRA_3,
> +		.mutex_path = ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0,
> +		.family = family_amd_500_series,
> +	},
>  	{}
>  };
>  

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

end of thread, other threads:[~2022-07-13 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-10 20:26 [PATCH v2 0/1] add definitions for ROG ZENITH II EXTREME Eugene Shalygin
2022-07-10 20:26 ` [PATCH v2 1/1] hwmon: (asus-ec-sensors) " Eugene Shalygin
2022-07-13 13:46   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).