From patchwork Thu Nov 29 02:37:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10703877 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3D8A13BF for ; Thu, 29 Nov 2018 03:32:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B67F32E8A8 for ; Thu, 29 Nov 2018 03:32:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A95B52E8AE; Thu, 29 Nov 2018 03:32:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 50E832E8A8 for ; Thu, 29 Nov 2018 03:32:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vQEOwWe19rtZsLsBFSeVQlRPkufDGGghT9nHUgfpx+I=; b=lKhYTAFXqAdBdd +NIsscDVt1TGcgfKMlJRHvKpiPCdQbWHg7W35vcvfSEA27nyN0XbqaaBLVrRFVAaT5T12zZsb9xfV RLC/n9FFiZNJ7OViYBmb1uoKsKNh0iw+CPskPIdpgQtqvzlxMFYWA4WtRWR8VVQzPfBuZ9w0yeGXb OT/vvhMCN7Xr54IlsxsMnMRDwQbVTH+7E8JYueZXnf2YglgywbVrZCK+ofmGdSxNbTTUwLycwfebE aeRrdBELZqwt7l3YO7b9D6m6AvXQymL+hTXOPCIg15W+B9VCF8zk1vFFGFSJW089Av3p40LAB+4Yj AgCyZeUWq2Uj5Rtl15DQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSD3Z-0004jm-NS; Thu, 29 Nov 2018 03:32:01 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSD32-0004FP-Dd for linux-arm-kernel@bombadil.infradead.org; Thu, 29 Nov 2018 03:31:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=MIME-Version:Content-Transfer-Encoding: Content-Type:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vkysKFRfhAVL5uj3S4K47Mc3bgqAAhKc7eiq25Qgxpk=; b=Y0vlGrURoLL6ZdpMzNR43iUrFD nip5vuuV70O9QXPwnSeaeHULEi244djNb/7PWPGR1LYucjk5vRgt6Oa4tkI/EiM9JSnfrmmYKTFMd sS1ikcVri6aT6sjwnE8H2CDZAlxkkICg5XYPSDghnGJNikTV1szQaWWba4CqCPJFsBfPaOB65I+kV CM/8G8alErtzEeO2yJ4kJBGgnTb4hCi59htdghkRLWxseNJNsVKrSGnTcTBDq6c3yK7Wc4XSV3sY+ MCpw0aA70saJe3An4eGn4lmXqh1CL0C3RJyY0nf0rBKxHjC3dHQGgb9CZQR/drpF/T/C0K1sObwUd EHwuBV4w==; Received: from mail-eopbgr20085.outbound.protection.outlook.com ([40.107.2.85] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSCCq-0004Ls-VV for linux-arm-kernel@lists.infradead.org; Thu, 29 Nov 2018 02:37:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vkysKFRfhAVL5uj3S4K47Mc3bgqAAhKc7eiq25Qgxpk=; b=vcmCYSrMpCsgdnN4qle+okLPbcieHkp1SVrYR4AFrhjFWc7oLaxu5X2IlqtbNntYqhjAMoXx+YSFdysxmWlRkTfexqn+Eod4eq4q69xhd4Pj8pgQIuTNNNDJMdmHGplD9p63jV7TrljkcEqPZytRFPJfQ3Sw1m+cLabNzSXhkCg= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3946.eurprd04.prod.outlook.com (52.134.72.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.19; Thu, 29 Nov 2018 02:37:16 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::adf8:f49d:deb4:58fd]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::adf8:f49d:deb4:58fd%2]) with mapi id 15.20.1361.019; Thu, 29 Nov 2018 02:37:16 +0000 From: Anson Huang To: "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Aisheng DONG , Andy Gross , "heiko@sntech.de" , "horms+renesas@verge.net.au" , "arnd@arndb.de" , "amit.kucheria@linaro.org" , "enric.balletbo@collabora.com" , "ezequiel@collabora.com" , "olof@lixom.net" , "bjorn.andersson@linaro.org" , "shawnguo@kernel.org" , "LW@KARO-electronics.de" , "linux-pm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: [PATCH V4 0/4] Add i.MX System Controller thermal driver support Thread-Topic: [PATCH V4 0/4] Add i.MX System Controller thermal driver support Thread-Index: AQHUh4xxVvFI4zIfIUemJwHdzamWzA== Date: Thu, 29 Nov 2018 02:37:16 +0000 Message-ID: <1543458696-4741-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR04CA0011.apcprd04.prod.outlook.com (2603:1096:203:36::23) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0402MB3946; 6:umCH2iTWW0m5gJemsBB9ZPXZhsi0IZQvG02/y/UInp2rbV5RcvMj5VHeT+fpchlXFUMineuDX/cKze3sViWewMaPrzcciOa/jNuG5lbRziOKwOw0N2uSgpCdgL+Bd9qtw5/Xj1RQB0Rs5J8zHeg3+PvlFSC7tVtntWY2RbFzSb+Jsz+Z0ogxBc4b4HnXz5UiufIrwNS9aM3nvZWDumX0jR76/jDZ2jG9rdVGW9Q6PQEJCgLgwkUWFcjcA8uS5NQaCaVSjKbnKj8iCm2HI0nJ8TuMavsxdBPw4HgSsJsjVDTxiUgjaskQJz/rpBFxPmXtikXybQUepHTI60jz1LThv0YVmU9EHIDNSX1EtL+pEPif0NcEMsSQDY/eHDpZpsRFsmSOfylvjjb9gKPO4Jz6fDwRvTcbAdwyspFuOqjf783iHbwJFs12NkX2p/zhBQaX9lClcyghvLUy7I+ySh18iw==; 5:7tqxjaoh9Np0q5LrZEGMbcCbOBEkHSt/DMa48U+tBKps9mE7LeBszWteyShKKWf1cfuoMBqeLcm8hWwz2TdiToMUTJ2OIlbR8Z7ArUiC2pR4cFmUvgdV5bA+At0Q5jJdByT40gUb7rX2Cwj5Y2ktVfYWVIAxxytpOfJyuwLEIjo=; 7:kG7qm9zzsffYWXBWPN27U5UquBtYGBwKGnNseNkuumBfZ+fLkzhA0TlmusirMvug9uoiDuQjaFMVLBDloAnPaSlM3Q3xJk6QABmW4GHgjhffSLuKJ2hbd4AhPPEZdGDEYCHINWvAVjudCBT3eRoDog== x-ms-office365-filtering-correlation-id: 551ca580-3aeb-40c2-6651-08d655a3938c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DB3PR0402MB3946; x-ms-traffictypediagnostic: DB3PR0402MB3946: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231453)(999002)(944501410)(52105112)(93006095)(93001095)(3002001)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:DB3PR0402MB3946; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0402MB3946; x-forefront-prvs: 0871917CDA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(376002)(396003)(136003)(366004)(199004)(189003)(25786009)(50226002)(966005)(99286004)(3846002)(6116002)(478600001)(8936002)(14454004)(2201001)(52116002)(316002)(102836004)(106356001)(86362001)(110136005)(186003)(2906002)(26005)(81166006)(81156014)(8676002)(386003)(6506007)(68736007)(6512007)(6306002)(7736002)(6486002)(6436002)(4326008)(66066001)(71190400001)(53936002)(39060400002)(36756003)(2501003)(71200400001)(305945005)(256004)(97736004)(105586002)(486006)(2616005)(476003)(7416002)(5660300001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0402MB3946; H:DB3PR0402MB3916.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: yppHZjpMOyaxamsiJlv0ZTlFe5mZ10Nc7lElYXCVuU51JWu6s+mQsiIPc4vINqGoxhtcnqpyx/qhP+StBhWHno6zikdMEa3DHezwY76VPdYh1BktYinPE4jR5UFsKPxZ2ZPFvFC5iQqEvP5kDOiEWYIk2Mo+ZYvT0Pd70Psk82TDqy9EqoczNjHSOGGyBxFr1kP2bHFf69nlERawNgcDugt0/GFHJPRpWe1G1QuWD1GIpk42ftkgHRl6eX7vhXAeoOEs//fecEDWl/A1Qayr8FlpRHwbDk1E9VR9a3Ki7fOcIt6Vn0W314C/HvoPadaW5dpjfIJkKQ/U7usHPI+aduyHffUs124xoEV8R+DDvMU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 551ca580-3aeb-40c2-6651-08d655a3938c X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2018 02:37:16.7048 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3946 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_213733_084813_6005AA44 X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dl-linux-imx Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP i.MX8QXP is an ARMv8 SoC which has a Cortex-M4 system controller inside, the system controller is in charge of controlling power, clock and thermal sensors etc.. This patch adds i.MX system controller thermal driver support, Linux kernel has to communicate with system controller via MU (message unit) IPC to get each thermal sensor's temperature, it supports multiple sensors which are passed from device tree, please see the binding doc for details. Note that this patch set is based on [V4,4/4] ARM64: dts: imx: add i.MX8QXP system controller RTC support, https://patchwork.kernel.org/patch/10703779/ Anson Huang (4): dt-bindings: thermal: add binding doc for i.MX system controller thermal driver thermal: imx_sc: add i.MX system controller thermal support defconfig: arm64: add i.MX system controller thermal support ARM64: dts: imx: add i.MX8QXP thermal support .../devicetree/bindings/thermal/imx-sc-thermal.txt | 33 ++++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 27 +++ arch/arm64/configs/defconfig | 1 + drivers/thermal/Kconfig | 11 ++ drivers/thermal/Makefile | 1 + drivers/thermal/imx_sc_thermal.c | 201 +++++++++++++++++++++ 6 files changed, 274 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/imx-sc-thermal.txt create mode 100644 drivers/thermal/imx_sc_thermal.c