From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4923C24DD15; Tue, 21 Jul 2026 12:25:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=114.242.206.163 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784636704; cv=none; b=EnZ4v76rVZMAFxEbM6ceFhRcJGVhAnTi7flFKp7rgJhtJQUiZEMg6cMLPtqV4LhQURk8pjeIxo8jLPB1v3XxpOxsie2xhRSj5WRYdtW4lppv9K6SBQQI760CMKgMC2ehhzOe7kwOk5R/m0j0OG9smcDQBIuyeL3Hvw9ZmlLyu2Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784636704; c=relaxed/simple; bh=4hN4hmPKPUnTu7oC1iEny9YOmWeIwosCRJq4ublZ9nU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BqygWid8cCCE4YoWEQtOWIB6nweXzpjRSkaBa/3W4Mi1hS6/vB3n+pAEtOcYY59xrWNNfpM6OsvulWBYFxKS0BZJPl6KmZS/77oscp2bpqYo95Kbo8ysih+6JyF2+Jtl/vD2jG30Bo0W/8dy3117x0Y6wjCK6HZO/YiyfPN8MJI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=loongson.cn; spf=pass smtp.mailfrom=loongson.cn; arc=none smtp.client-ip=114.242.206.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [223.64.68.205]) by gateway (Coremail) with SMTP id _____8BxmusbZV9qyqAFAA--.22059S3; Tue, 21 Jul 2026 20:24:59 +0800 (CST) Received: from kernelserver (unknown [223.64.68.205]) by front1 (Coremail) with SMTP id qMiowJCxq8QRZV9qRfsTAA--.52432S2; Tue, 21 Jul 2026 20:24:55 +0800 (CST) From: Binbin Zhou To: Binbin Zhou , Huacai Chen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Yinbo Zhu , zhanghongchen , "Rafael J . Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba Cc: Huacai Chen , Xuerui Wang , loongarch@lists.linux.dev, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, mfd@lists.linux.dev, Binbin Zhou Subject: [PATCH v2 0/4] thermal: loongson2: Add support for Loongson-2K0300 SoC Date: Tue, 21 Jul 2026 20:24:19 +0800 Message-ID: X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:qMiowJCxq8QRZV9qRfsTAA--.52432S2 X-CM-SenderInfo: p2kr3uplqex0o6or00hjvr0hdfq/1tbiAgEPCGpe+S4IbAAAsD X-Coremail-Antispam: 1Uk129KBj93XoWxJrW5CFy7JFy5Kr48GF13Jrc_yoW8Aw4kpa y5u3sxCF1DGFyUAws3Jw47AF4YvrnYqa9rXF4fGwn8uwn8GFyayrWUta15ZryxCrW09FW2 vr1vkrWDCF4kuFXCm3ZEXasCq-sJn29KB7ZKAUJUUUU7529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUBIb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2kKe7AKxVWUXVWUAwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07 AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWU AVWUtwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7V AKI48JMxkF7I0En4kS14v26r1q6r43MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY 6r1j6r4UMxCIbckI1I0E14v26r1Y6r17MI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7 xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVW8ZVWrXwCIc40Y0x0EwIxGrwCI42IY6xII jxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw2 0EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x02 67AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU8t3ktUUUUU== Hi all: This patch series adds thermal zone support for the Loongson-2K0300 SoC. The Loongson-2K0300's thermal sensor is generally compatible with the existing Loongson-2K series, but it features several key differences: 1. It has an independent CPU ID register for reading chip version information. 2. The raw temperature output field has been extended from 8 bits to 11 bits. 3. The temperature calculation formula has been updated to incorporate a correction factor based on the version information. To ensure robustness on older hardware revisions, a fallback mechanism is included: if the calculated temperature falls outside the valid range (-55 TO 125), the driver falls back to a simpler calculation and prints a warning. The patches have been validated on the Loongson-2K0300 development board. Thanks. Binbin ========= V2: Patch (1/4): - New patch form Sashiko; Patch (2/4): - New patch for adding chipid syscon compatible; Patch (3/4): - Use `loongson,chipid` phandle replace chipid reg property; Patch (3/4): - Refact `calib_offset` calculate routing; - Add LS2K0300_OLD_FUSE_FLAG flag. Link to V1: https://lore.kernel.org/all/cover.1783670011.git.zhoubinbin@loongson.cn/ Binbin Zhou (4): thermal/drivers/loongson2: Correct thermal sensor registration loop dt-bindings: mfd: syscon: Allow syscon compatible for Loongson-2K0300 chip id dt-bindings: thermal: loongson,ls2k-thermal: Add compatible for Loongson-2K0300 thermal/drivers/loongson2: Add support for Loongson-2K0300 .../devicetree/bindings/mfd/syscon.yaml | 2 + .../thermal/loongson,ls2k-thermal.yaml | 73 ++++++++--- drivers/thermal/loongson2_thermal.c | 120 +++++++++++++++--- 3 files changed, 162 insertions(+), 33 deletions(-) -- 2.52.0