Home
last modified time | relevance | path

Searched +full:ls2k1000 +full:- +full:thermal (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/Documentation/devicetree/bindings/thermal/
H A Dloongson,ls2k-thermal.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/thermal/loongson,ls2k-thermal.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Thermal sensors on Loongson-2 SoCs
10 - zhanghongchen <zhanghongchen@loongson.cn>
11 - Yinbo Zhu <zhuyinbo@loongson.cn>
14 - $ref: /schemas/thermal/thermal-sensor.yaml#
19 - enum:
20 - loongson,ls2k1000-thermal
[all …]
/openbmc/linux/drivers/thermal/
H A Dloongson2_thermal.c1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright (C) 2022-2023 Loongson Technology Corporation Limited
14 #include <linux/thermal.h>
42 int reg_off = data->chip_data->thermal_sensor_sel * 2; in loongson2_thermal_set()
44 low = clamp(-40, low, high); in loongson2_thermal_set()
52 writew(reg_ctrl, data->regs + LOONGSON2_THSENS_CTRL_LOW_REG + reg_off); in loongson2_thermal_set()
56 writew(reg_ctrl, data->regs + LOONGSON2_THSENS_CTRL_HI_REG + reg_off); in loongson2_thermal_set()
66 reg_val = readl(data->regs + LOONGSON2_THSENS_OUT_REG); in loongson2_thermal_get_temp()
67 *temp = ((reg_val & LOONGSON2_THSENS_OUT_MASK) - HECTO) * KILO; in loongson2_thermal_get_temp()
77 writeb(LOONGSON2_THSENS_INT_LO | LOONGSON2_THSENS_INT_HIGH, data->regs + in loongson2_thermal_irq_thread()
[all …]