Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4542149rwb; Wed, 17 Aug 2022 01:37:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Ve1DyavgHfx5edxZ5I7phNjDsIrZwhJ1DhEYnnxe14SjSXTe4+g6+ji17cGUR4BGrJyQd X-Received: by 2002:a17:906:dc8d:b0:739:df2d:3400 with SMTP id cs13-20020a170906dc8d00b00739df2d3400mr1971245ejc.561.1660725457372; Wed, 17 Aug 2022 01:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660725457; cv=none; d=google.com; s=arc-20160816; b=x6bIgGeqjW9BGcJXVjag1I2Sm32QqucnLrQxMll3lKDgEujQj5yjEuE93WVc9MOVbP X6jVoYuzhfJ5oksfoOSacY0Ooz3rHppwP/ZX7hFaDyamCMP4/r5razrARpjufuNAJ1me +HLbYGDP7GVfRsfqizShAPmKOGCbR31Z4HavDakO5O3CKXNW5X9T9dFJav6qiuQFHj9y Jnp+W/0Fflmi/V9ma2209QIEmjDIOwEINiy6xP+MxIHx21nrDJesPC8OowYLYZ9qS20U ntspD53XMktYeI/BBlPzdFc85ZrcKgcp8f8VrNwHgn+CZrpH1oj9PB2RZw6ySSjnv1wk qt7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VWXG1e9/DRSLvY5QEUtPtlLQfPC+KRrU45gKoV7pXAc=; b=ZiFOlrgLKSWxVnzUPnm7G5YhfTa1dqZqBj7NelJO7XN22CMgiwR7nouspWBvMN+Hbg AnPCayF4nBANEblRpN+8Jkbo/IHTpC+62LFqEn+D0hkhIitrssvd3FtwqCzNTgx72Vyj 9vryRhbZr1BIM5HNC6QDvOTOEkQvLSonqpN3rVGkEAR244Mhi5qdAz7l3fgdlTbymI1d t6Pd3AuzvSDiFNa8TMadRJc88Xzcgb9EeHj+pKIGNPZJtQZ4pIdrYGrc3O8yT2DgAbYm 8vIzn2KAZB/AagzXu76+JueDttg6fZPhYV80+nIOQa19bt9clQp8tORuMEoi6p+qUamR RxRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=NmM9L1Pa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j10-20020a05640211ca00b0043de3215579si1313361edw.12.2022.08.17.01.37.12; Wed, 17 Aug 2022 01:37:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=NmM9L1Pa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234109AbiHQIJC (ORCPT + 99 others); Wed, 17 Aug 2022 04:09:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230402AbiHQIIp (ORCPT ); Wed, 17 Aug 2022 04:08:45 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 413594E63F for ; Wed, 17 Aug 2022 01:08:39 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id n4so15266125wrp.10 for ; Wed, 17 Aug 2022 01:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=VWXG1e9/DRSLvY5QEUtPtlLQfPC+KRrU45gKoV7pXAc=; b=NmM9L1PaffPpCsm/C4/QFhphpWYhLPEMeeIXMsHVx+Gx6cwHyUbPB+W5EQHS5EJ82y X/wINA6ev0mpTwDayZwDE6yvvRlTgM1lbaWx8aHtMnHbFEKSMDWQ0ReaD4GMoRNh4naT 3WNlCO7ZqEOehjoUs2RHdyj/jHRF/5wCPuOum7W8n+mwDwGQTsAYo/4WyPgBN1DlHohP JPqcaJ+/Gt3ntySPDCiXHkJiMCsSwaoblu88SOG4VmJn4Kgr/ZXn0XOoMCS3p60ogBnl D5LL0QVWUWn/cKMzPW/Oj+PqUtsyrgBgf/fqpBOSX783sp9tUInUxHELxusOUgt7etgL BoYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=VWXG1e9/DRSLvY5QEUtPtlLQfPC+KRrU45gKoV7pXAc=; b=TukhulMCE9/CeM+8QqiEfgUEOrmUUV+r+ok2pKVMAAi0UFFBWO2YEa2PIWurRPyrMM i0/0EUbt6qep3QVPWNoSf3EfhvOI/Il8Z0En2mn+kOt6ZshOTqMlJliNu7ixJ2bH9XGd IfL2FYmXm9iPahniK4Bh3tay6RWn+qLP3dnfjzycUb8A6kihbOB8Cni+35QsKzTcZvCr /bmLXInCky2ozqcBjIs2hafX0pXiVso+jezYrQuEDYtjMih9xbNYBmXb+eUXPjV3d+lN krEucJSUP/U08BbwpPTE+y/NjtNMDhZEmXrFgNUtHvAcDnBXgmUtWh4MmjE35bCLFzte ja6g== X-Gm-Message-State: ACgBeo2GUx2oCcyRQLWrkjv8RZnjSLwOySmt+C9Lh9CeuQCZ76KbTS5L WIcDU9IPFVyOQMHlMCh4zFUYJw== X-Received: by 2002:adf:e44b:0:b0:220:5bc5:e942 with SMTP id t11-20020adfe44b000000b002205bc5e942mr13366911wrm.179.1660723717790; Wed, 17 Aug 2022 01:08:37 -0700 (PDT) Received: from Balsam-ThinkPad-T480.civfrance.com (58.188.158.77.rev.sfr.net. [77.158.188.58]) by smtp.gmail.com with ESMTPSA id u15-20020a05600c19cf00b003a54d610e5fsm1391992wmq.26.2022.08.17.01.08.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 01:08:37 -0700 (PDT) From: bchihi@baylibre.com To: rafael@kernel.org, rui.zhang@intel.com, daniel.lezcano@linaro.org, amitk@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@baylibre.com, mka@chromium.org, robh+dt@kernel.org, krzk+dt@kernel.org, matthias.bgg@gmail.com, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, james.lo@mediatek.com, fan.chen@mediatek.com, louis.yu@mediatek.com, rex-bc.chen@mediatek.com, abailon@baylibre.com Subject: [PATCH v9,2/7] dt-bindings: thermal: Add dt-binding document for LVTS thermal controllers Date: Wed, 17 Aug 2022 10:07:52 +0200 Message-Id: <20220817080757.352021-3-bchihi@baylibre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220817080757.352021-1-bchihi@baylibre.com> References: <20220817080757.352021-1-bchihi@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandre Bailon Add dt-binding document for mt8192 and mt8195 LVTS thermal controllers. Signed-off-by: Alexandre Bailon Co-developed-by: Balsam CHIHI Signed-off-by: Balsam CHIHI --- .../thermal/mediatek,lvts-thermal.yaml | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml diff --git a/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml b/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml new file mode 100644 index 000000000000..31d9e220513a --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml @@ -0,0 +1,152 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/mediatek,lvts-thermal.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek SoC LVTS thermal controller + +maintainers: + - Yu-Chia Chang + - Ben Tseng + +description: | + LVTS (Low Voltage Thermal Sensor). + The architecture will be first used on mt8192 and mt8195. + +properties: + compatible: + enum: + - mediatek,mt8192-lvts-ap + - mediatek,mt8192-lvts-mcu + - mediatek,mt8195-lvts-ap + - mediatek,mt8195-lvts-mcu + + "#thermal-sensor-cells": + const: 1 + + reg: + maxItems: 1 + description: LVTS instance registers. + + interrupts: + maxItems: 1 + description: LVTS instance interrupts. + + clocks: + maxItems: 1 + description: LVTS instance clock. + + resets: + maxItems: 1 + description: | + LVTS instance SW reset for HW AP/MCU domain to clean temporary data + on HW initialization/resume. + + nvmem-cells: + minItems: 1 + maxItems: 2 + description: Calibration efuse data for LVTS + + nvmem-cell-names: + minItems: 1 + maxItems: 2 + description: Calibration efuse cell names for LVTS + +allOf: + - $ref: thermal-sensor.yaml# + + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8192-lvts-ap + - mediatek,mt8192-lvts-mcu + then: + properties: + nvmem-cells: + items: + - description: Calibration efuse data for LVTS + + nvmem-cell-names: + items: + - const: lvts_calib_data1 + + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8195-lvts-ap + - mediatek,mt8195-lvts-mcu + then: + properties: + nvmem-cells: + items: + - description: Calibration efuse data 1 for LVTS + - description: Calibration efuse data 2 for LVTS + + nvmem-cell-names: + items: + - const: lvts_calib_data1 + - const: lvts_calib_data2 + +required: + - compatible + - '#thermal-sensor-cells' + - reg + - interrupts + - clocks + - resets + - nvmem-cells + - nvmem-cell-names + +additionalProperties: false + +examples: + - | + #include + #include + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + lvts_ap: thermal-sensor@1100b000 { + compatible = "mediatek,mt8192-lvts-ap"; + #thermal-sensor-cells = <1>; + reg = <0 0x1100b000 0 0x1000>; + interrupts = ; + clocks = <&infracfg CLK_INFRA_THERM>; + resets = <&infracfg MT8192_INFRA_RST0_THERM_CTRL_SWRST>; + nvmem-cells = <&lvts_e_data1>; + nvmem-cell-names = "lvts_calib_data1"; + }; + + lvts_mcu: thermal-sensor@11278000 { + compatible = "mediatek,mt8192-lvts-mcu"; + #thermal-sensor-cells = <1>; + reg = <0 0x11278000 0 0x1000>; + interrupts = ; + clocks = <&infracfg CLK_INFRA_THERM>; + resets = <&infracfg MT8192_INFRA_RST4_THERM_CTRL_MCU_SWRST>; + nvmem-cells = <&lvts_e_data1>; + nvmem-cell-names = "lvts_calib_data1"; + }; + }; + + thermal_zones: thermal-zones { + cpu0-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu 0>; + }; + + vpu1-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap 0>; + }; + }; -- 2.34.1