<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/thermal/mediatek, branch update-toolchain</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/thermal/mediatek?h=update-toolchain</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/thermal/mediatek?h=update-toolchain'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2024-07-15T11:31:39Z</updated>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Provide default calibration data</title>
<updated>2024-07-15T11:31:39Z</updated>
<author>
<name>Chen-Yu Tsai</name>
<email>wenst@chromium.org</email>
</author>
<published>2024-06-20T09:23:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=a5d4afb92eca216b27f662d77e91f2d464345c6e'/>
<id>urn:sha1:a5d4afb92eca216b27f662d77e91f2d464345c6e</id>
<content type='text'>
On some pre-production hardware, the SoCs do not contain calibration
data for the thermal sensors. The downstream drivers provide default
values that sort of work, instead of having the thermal sensors not
work at all.

Port the default values to the upstream driver. These values are from
the ChromeOS kernels, which sadly do not cover the MT7988.

Signed-off-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20240620092306.2352606-1-wenst@chromium.org
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>dt-bindings: thermal: mediatek: Fix thermal zone definitions for MT8188</title>
<updated>2024-07-15T11:31:39Z</updated>
<author>
<name>Julien Panis</name>
<email>jpanis@baylibre.com</email>
</author>
<published>2024-06-03T10:50:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=be3e224ec502d49cf9017304286c14418b230fe6'/>
<id>urn:sha1:be3e224ec502d49cf9017304286c14418b230fe6</id>
<content type='text'>
Fix thermal zone names for consistency with the other SoCs:
- GPU0 must be used as the first GPU item.
- SOCx deal with audio DSP, video, and infra subsystems.

The naming must be fixed "atomically" so compilation does not break.
As a result, the change is made in the dt-bindings and in the LVTS
driver within a single commit, despite the checkpatch warning.

The definitions can be safely modified here because they are used only
in the LVTS driver, which is modified accordingly, and have not yet
been included in a released kernel.

Fixes: 78c88534e5e1 ("dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for MT8188")
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Acked-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
Signed-off-by: Julien Panis &lt;jpanis@baylibre.com&gt;
Link: https://lore.kernel.org/r/20240603-mtk-thermal-mt818x-dtsi-v7-2-8c8e3c7a3643@baylibre.com
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>dt-bindings: thermal: mediatek: Fix thermal zone definition for MT8186</title>
<updated>2024-07-15T11:31:39Z</updated>
<author>
<name>Julien Panis</name>
<email>jpanis@baylibre.com</email>
</author>
<published>2024-06-03T10:50:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6b04928e83f298d99359f3ba67187a328c223357'/>
<id>urn:sha1:6b04928e83f298d99359f3ba67187a328c223357</id>
<content type='text'>
Fix a thermal zone name for consistency with the other SoCs:
MFG contains GPU, the latter is more specific and must be used here.

The naming must be fixed "atomically" so compilation does not break.
As a result, the change is made in the dt-bindings and in the LVTS
driver within a single commit, despite the checkpatch warning.

The definition can be safely modified here because it is used only
in the LVTS driver, which is modified accordingly, and has not yet
been included in a released kernel.

Fixes: a2ca202350f9 ("dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for MT8186")
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Acked-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
Signed-off-by: Julien Panis &lt;jpanis@baylibre.com&gt;
Link: https://lore.kernel.org/r/20240603-mtk-thermal-mt818x-dtsi-v7-1-8c8e3c7a3643@baylibre.com
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Return error in case of invalid efuse data</title>
<updated>2024-06-12T17:07:34Z</updated>
<author>
<name>Julien Panis</name>
<email>jpanis@baylibre.com</email>
</author>
<published>2024-06-04T16:46:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=72cacd06e47d86d89b0e7179fbc9eb3a0f39cd93'/>
<id>urn:sha1:72cacd06e47d86d89b0e7179fbc9eb3a0f39cd93</id>
<content type='text'>
This patch prevents from registering thermal entries and letting the
driver misbehave if efuse data is invalid. A device is not properly
calibrated if the golden temperature is zero.

Fixes: f5f633b18234 ("thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver")
Signed-off-by: Julien Panis &lt;jpanis@baylibre.com&gt;
Reviewed-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20240604-mtk-thermal-calib-check-v2-1-8f258254051d@baylibre.com
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Remove filtered mode for mt8188</title>
<updated>2024-06-04T17:40:51Z</updated>
<author>
<name>Julien Panis</name>
<email>jpanis@baylibre.com</email>
</author>
<published>2024-05-16T10:44:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=d9fef76e89498bf99cdb03f77b7091d7e95d7edd'/>
<id>urn:sha1:d9fef76e89498bf99cdb03f77b7091d7e95d7edd</id>
<content type='text'>
Filtered mode is not supported on mt8188 SoC and is the source of bad
results. Move to immediate mode which provides good temperatures.

Fixes: f4745f546e60 ("thermal/drivers/mediatek/lvts_thermal: Add MT8188 support")
Reviewed-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Julien Panis &lt;jpanis@baylibre.com&gt;
Link: https://lore.kernel.org/r/20240516-mtk-thermal-mt8188-mode-fix-v2-1-40a317442c62@baylibre.com
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Fix wrong lvts_ctrl index</title>
<updated>2024-05-06T08:33:26Z</updated>
<author>
<name>Julien Panis</name>
<email>jpanis@baylibre.com</email>
</author>
<published>2024-05-03T15:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b66c079aabdff3954e93fdd7f52bd8f9ad6482c7'/>
<id>urn:sha1:b66c079aabdff3954e93fdd7f52bd8f9ad6482c7</id>
<content type='text'>
In 'lvts_should_update_thresh()' and 'lvts_ctrl_start()' functions,
the parameter passed to 'lvts_for_each_valid_sensor()' macro is always
'lvts_ctrl-&gt;lvts_data-&gt;lvts_ctrl'. In other words, the array index 0
is systematically passed as 'struct lvts_ctrl_data' type item, even
when another item should be consumed instead.

Hence, the 'valid_sensor_mask' value which is selected can be wrong
because unrelated to the 'struct lvts_ctrl_data' type item that should
be used. Hence, some thermal zone can be registered for a sensor 'i'
that does not actually exist. Because of the invalid address used
as 'lvts_sensor[i].msr', this situation ends up with a crash in
'lvts_get_temp()' function, where this 'msr' pointer is passed to
'readl_poll_timeout()' function. The following message is output:
"Unable to handle kernel NULL pointer dereference at virtual
address &lt;msr&gt;", with &lt;msr&gt; = 0.

This patch fixes the issue.

Fixes: 11e6f4c31447 ("thermal/drivers/mediatek/lvts_thermal: Allow early empty sensor slots")
Signed-off-by: Julien Panis &lt;jpanis@baylibre.com&gt;
Reviewed-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240503-mtk-thermal-lvts-ctrl-idx-fix-v1-2-f605c50ca117@baylibre.com
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Remove unused members from struct lvts_ctrl_data</title>
<updated>2024-05-06T08:33:26Z</updated>
<author>
<name>Julien Panis</name>
<email>jpanis@baylibre.com</email>
</author>
<published>2024-05-03T15:35:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e2d2266a2ac1da67a74c855c24ed3acb54a1e410'/>
<id>urn:sha1:e2d2266a2ac1da67a74c855c24ed3acb54a1e410</id>
<content type='text'>
In struct lvts_ctrl_data, num_lvts_sensor and cal_offset[] are not used.

Signed-off-by: Julien Panis &lt;jpanis@baylibre.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240503-mtk-thermal-lvts-ctrl-idx-fix-v1-1-f605c50ca117@baylibre.com
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Check NULL ptr on lvts_data</title>
<updated>2024-05-02T13:56:41Z</updated>
<author>
<name>Julien Panis</name>
<email>jpanis@baylibre.com</email>
</author>
<published>2024-05-02T13:46:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=a1191a77351e25ddf091bb1a231cae12ee598b5d'/>
<id>urn:sha1:a1191a77351e25ddf091bb1a231cae12ee598b5d</id>
<content type='text'>
Verify that lvts_data is not NULL before using it.

Signed-off-by: Julien Panis &lt;jpanis@baylibre.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240502-mtk-thermal-lvts-data-v1-1-65f1b0bfad37@baylibre.com
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Add MT8188 support</title>
<updated>2024-04-23T10:40:30Z</updated>
<author>
<name>Nicolas Pitre</name>
<email>npitre@baylibre.com</email>
</author>
<published>2024-04-02T03:25:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f4745f546e6077e3ed2bab90e931154519e96ae0'/>
<id>urn:sha1:f4745f546e6077e3ed2bab90e931154519e96ae0</id>
<content type='text'>
Various values extracted from the vendor's kernel driver.

Signed-off-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240402032729.2736685-15-nico@fluxnic.net
</content>
</entry>
<entry>
<title>thermal/drivers/mediatek/lvts_thermal: Allow early empty sensor slots</title>
<updated>2024-04-23T10:40:30Z</updated>
<author>
<name>Nicolas Pitre</name>
<email>npitre@baylibre.com</email>
</author>
<published>2024-04-02T03:25:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=11e6f4c3144743b2b2c26a5cd58ae3696379b3ab'/>
<id>urn:sha1:11e6f4c3144743b2b2c26a5cd58ae3696379b3ab</id>
<content type='text'>
Some systems don't always populate sensor controller slots starting
at slot 0. Use a bitmap instead of a count to indicate valid sensor
slots. Also create a pretty iterator for that.

About that iterator: it causes checkpatch to complain with "ERROR:
Macros with multiple statements should be enclosed in a do - while
loop". However this is not possible here. And many similar iterators
do exist using the same form in the tree already.

Signed-off-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20240402032729.2736685-12-nico@fluxnic.net
</content>
</entry>
</feed>
