From patchwork Fri Oct 15 12:25:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12561261 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31C09C433F5 for ; Fri, 15 Oct 2021 12:27:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0494560F23 for ; Fri, 15 Oct 2021 12:27:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0494560F23 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=a10kolWcJd/xqd9OhB1NSowaut3lfO4/+hwgwwyD/0s=; b=hKzCTycIxf+NM6 hZjCm8P3BEuiHui282/Yem8pcnUHLldL4fLAtQYLX0mAosJ/dR6aon0dS7G1mP6Bh6TyTPCSyX4PT lm8ieyXauV/jTUFzpUgFWElOfU2kXzJHgJfZE7f8RPrt0TIaCoyShkPwOSx61mxnWiDh6pJE/qXQm s6kMUxIWJAwEtWbN4wf30qxgW1k4UDtILEBOmDFvbV2pWhrpVTM8mutT2kblR3MQNdCZHCd8ojeaC CbFRkBBFCstkwHf9/5hPkRr1eLcfUxj/plLrz7BKI5WFU8+88h1o1yNWpevOn8WGun+jRTSGrjYzD onGwoElnKvwNWMA0+W1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMI0-006sIt-BN; Fri, 15 Oct 2021 12:26:20 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMHp-006sGN-Us for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 12:26:11 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 56825580ECC; Fri, 15 Oct 2021 08:26:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 15 Oct 2021 08:26:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=DiwHj+vaHXUQK XyQ9BUo+GIG90hR4W/o3+wsmuFsT8o=; b=VkBYDutVyK0gALaDt0iiqbf1540eX ySJScIoE4EfPZesrMCGIKmtzjvV4G5VVJJ0Pd6PmUxoTCjbA55gWDbH2TxaAU0PB +L0mrGFGBUk2LBL+xs0A0ifDqNck7ajViMurpyOlo2E6pqCMin3FcyJ/hJsnoUmb bKqdcRfUda65DADU1gu0yuIOxiDQCEylz8IwIkPirB25CyOpgdkmwQS8RIlDjCHi w1ZMhe4D3Q4U4gikcuBzD8v4m6699IDPBc36vKsIObKoZqK6GpDFz8suBy2f5S3l oaLeOYSE1Yw4K/D+CpD0xndDGE5x2iW4EoD3glVTUDUY9IE5jiQUABrug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=DiwHj+vaHXUQKXyQ9BUo+GIG90hR4W/o3+wsmuFsT8o=; b=EwY4c9g0 jfACM9SX3iNRA1TDK7CnTctKOsZ108lcqcIEQAnqWSXWq7JchIGZoRib0OTIyMO/ MwJuSpexy3KPiL8Ck1XLVMcfnFr90TDUvfLpogOFEQ3egB0XUu24Qqpjnqvassgn tltY3CPQY9M5advqf4zP8o9K0z1qFYj/JrH5gMQlPIgQHjmXI8XEZdK6iLABgZdF rnn2m9I/lw9Jv8mhMMHrIaW7eyDCrXq//POP6yJYz0ujm+Qtg6q6QsLar2VnocEK vEfdPrU46W6JSC0J7kXu2Jy5Wjjj1Ddf+9SCKJDVcarJ8fqqJlSpRbdhMimxJV1t VaFdmDgzm6twUw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddugedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetlhhishht rghirhcuhfhrrghntghishcuoegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg eqnecuggftrfgrthhtvghrnhepffdthffggefglefgkeejhfekiefgleelfefhtefhheef teelgeeggefgfeffvddtnecuffhomhgrihhnpeguvghvihgtvghtrhgvvgdrohhrghenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishht rghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Oct 2021 08:26:03 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, kernel@pengutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, linux-imx@nxp.com, amitk@kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, Alistair Francis , Rob Herring Subject: [PATCH v13 1/9] dt-bindings: mfd: Initial commit of silergy, sy7636a.yaml Date: Fri, 15 Oct 2021 22:25:43 +1000 Message-Id: <20211015122551.38951-2-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211015122551.38951-1-alistair@alistair23.me> References: <20211015122551.38951-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_052610_118829_A365072B X-CRM114-Status: GOOD ( 10.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Initial support for the Silergy SY7636A Power Management chip and regulator. Signed-off-by: Alistair Francis Reviewed-by: Rob Herring --- .../bindings/mfd/silergy,sy7636a.yaml | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml diff --git a/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml b/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml new file mode 100644 index 000000000000..0566f9498e2f --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/silergy,sy7636a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: silergy sy7636a PMIC + +maintainers: + - Alistair Francis + +properties: + compatible: + const: silergy,sy7636a + + reg: + description: + I2C device address. + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + '#thermal-sensor-cells': + const: 0 + + epd-pwr-good-gpios: + description: + Specifying the power good GPIOs. + maxItems: 1 + + regulators: + type: object + + properties: + compatible: + const: silergy,sy7636a-regulator + + vcom: + type: object + $ref: /schemas/regulator/regulator.yaml# + properties: + regulator-name: + const: vcom + + additionalProperties: false + +required: + - compatible + - reg + - '#thermal-sensor-cells' + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@62 { + compatible = "silergy,sy7636a"; + reg = <0x62>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_epdpmic>; + #thermal-sensor-cells = <0>; + + regulators { + reg_epdpmic: vcom { + regulator-name = "vcom"; + regulator-boot-on; + }; + }; + }; + }; +... From patchwork Fri Oct 15 12:25:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12561303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC4DEC433F5 for ; Fri, 15 Oct 2021 12:28:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7A66560E05 for ; Fri, 15 Oct 2021 12:28:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7A66560E05 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EiS4KJEk5RGHdsqYHLmyXWSC0ZroqcT0F7jNNo6ztQs=; b=fPtuEWjvEgpEEs kdeTNWfs5GjXzuL8qTapYLZVHmitjswPqfr7jK2h1dzy3bZbu4l2sZCX6BjWoOpdjc1XmSUucXvzj 2rO7C0JnyZi3vvVY05Izoatrh4tj1hUloRxRWV4svWV/Zn8CR/MarWztm4oVW1AOhxuhnn/53rWNt XRK+sKP4DoQNO7GySw25PRQhfVzI1CPow1aZiorv6TdiKC0gu85yNSu11vihHId4bgxLXO6sUHywA yZcH3PCOQYRnTW5J1NlFuPVTDvSAULICqqSj4DafWZDxhnEV26xWBHMF14gSyUG9Md0+jPomzWVyI 5XeuJOH9cYVb1kwDrwWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMIB-006sLl-5J; Fri, 15 Oct 2021 12:26:31 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMHw-006sIF-14 for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 12:26:17 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 6892E580EC5; Fri, 15 Oct 2021 08:26:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 15 Oct 2021 08:26:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=yw1VucPUQqdpZ mHA25svfKcp/yBBqIjEZdlG3rBe/yc=; b=J+nVeIVh811zcJCO+1GXtUtwIeMyJ h84HRfb2BoZYwcGJn7nE0dXV2+IQe+QwI2OYEOIUlKHTDujKgs6/uE9Je4zPL7n9 gp1Fi8SbRV8SiKepsTg+NaevzZncxRYQ2dKwdZmqFuxh0YWjOktzoSKT6qURyVDe OVDVBYuQEEfJ29aSnHODVJTUgSd+9+xsShQvTWrxDEnCi69JCpP7MwKRLOD2DeN2 ayEeFWMP5rHbCySGFU/xp5jzAiORHlh0ejxLfUGPugWFvP5ggVtod0QWi3ksU2EC z2KgG7PyNdnpyPkMsbaz1J7bHFsoa1NiFg2YvLOQFV2dvC0DrtBkdLbFQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=yw1VucPUQqdpZmHA25svfKcp/yBBqIjEZdlG3rBe/yc=; b=ltgHftLN HZx0I9avF4+O5DGuf2s5T+9ED4Lz1+2KsdO5p0mLykbCW6sEj6lZE2ZXw8sPxQGE EKRg2H88STbvSCREcQPi4730DzS3clAX6+/aezKsXjUB6EIGLfvES1ohgocwSGtD rumIle3bDDrd/bhAV78bxq2OpYkcs/P3q9A5BLITZDyQJ/ykqQYOQG4gCPPsdEbV Hk2gEYnzohaiW0LqNaqUafdaWY/GffLf5Ul0La7LBaVe7hMVY8LEI3zsqId7VNel UbLta3XCMc7FcTosFx7SuBgB0PdQL4gdPG+58z7Hu2I2Vn3xyZLQiF7V1uUie7ho tEn3YZKbCg11mQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddugedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Oct 2021 08:26:09 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, kernel@pengutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, linux-imx@nxp.com, amitk@kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, Alistair Francis Subject: [PATCH v13 2/9] mfd: simple-mfd-i2c: Add a Kconfig name Date: Fri, 15 Oct 2021 22:25:44 +1000 Message-Id: <20211015122551.38951-3-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211015122551.38951-1-alistair@alistair23.me> References: <20211015122551.38951-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_052616_168393_982E3B35 X-CRM114-Status: UNSURE ( 8.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a Kconfig name to the "Simple Multi-Functional Device support (I2C)" device so that it can be enabled via menuconfig. Signed-off-by: Alistair Francis --- drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index ca0edab91aeb..e465ddd9ee77 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1192,7 +1192,7 @@ config MFD_SI476X_CORE module will be called si476x-core. config MFD_SIMPLE_MFD_I2C - tristate + tristate "Simple Multi-Functional Device support (I2C)" depends on I2C select REGMAP_I2C help From patchwork Fri Oct 15 12:25:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12561305 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D89ABC433F5 for ; Fri, 15 Oct 2021 12:28:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A429C60E05 for ; Fri, 15 Oct 2021 12:28:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A429C60E05 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Wj595IHIPizhjIksCLldxDESVR6apLsEtCqJFL1vJsE=; b=EYCBw3SiVSsdvi sFNNC4lfAUeZ+cWPvEKIqQVV4c3FhMIxE5a2dh8smi7xBC9b6MtzOBXEK67BH4utJEdRqa7TeljZY B8D5CMAj0yW7Xu4wK2wnXAm7uljTt/H8lhZcAKfMxNyxNU2pOaPO/Fmp8PH00jkK+giFwr3ZXLMXI Rr61nBFo4nLkgAtnc0fnTqJSLYD8o+iWwglfdzgbKWENLKft66slH0kBqi9GMDxXBKIyRWnbGf9Uw sJx5Z3mLpQtGhJwjdPgdaaX6C9wkat9mIbJFYBBMgD+q24gLgrA+8Cd240UAuf3tkyqP3jOUVeJ1q ogyT8NRQ43MQkfXw/sGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMIM-006sP6-Qb; Fri, 15 Oct 2021 12:26:43 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMI2-006sJi-4B for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 12:26:23 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 840BC580EC5; Fri, 15 Oct 2021 08:26:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 15 Oct 2021 08:26:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=FdDYT5Tp6YL1F JGtwpyXkf35bNWjV4edMJpysgQFfjE=; b=hLppTsDffI86hz6TPn+dR4g3RJoGW H8/ffy1O3qCAV7GlDD1bZTGgIazRagkOUb0dwKcUiCconpTWmr8AIGVxn3EXxJL3 bxKgCp0Tb2qrBfRWrQrn+plov5YqCuarcCjP5Wi3T3L7JNpureLRFY8ja/NblKDN pjLgYDU+dAXJ+0SVWnNGfpcYJyprhEZUACSQMkihX8ISDH70dCchdljKp/ygCP7g J0lMHCBA1SKHx+GXIb/EJs92fS4L9Sof6HWwf+chefvQh9FmZbJpJHwCbCFD90oP S9VVihnHJQNuLJ4bXReAFQzNe5TOIF4MZ9nZ/h2Ag6IfetA6CukrBNWPg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=FdDYT5Tp6YL1FJGtwpyXkf35bNWjV4edMJpysgQFfjE=; b=gAFlKV9S 9BSH4pVmNbU2bma0tWxzOedHUlnSX81cn9eV0iX5f3orbK3InqTTtuHtsRumUEPV TUr5y8rz5ZfDtXb/yKvbCfDkFSMIOfPaigyNk31FbumLHU0l/DvsXLbVuD07UYwR 2B3N2VJT2cWeKo+hGdaLF+Y9PC6PESPnKGYjbTSMsb5NgNVKZony3yMcYzqUPwP4 eMOVAPHbtu+sxu9o8cUioqCpO7+lj7vHs/aiDkYmHsRJi4DT7yoDgJROZdri/nlj pnHzUdi2KpU2SGX8Q8wsemtPVY3m/5Xu1fd5D2/U5Eaqi6stuC7umEWMtrxuLSP5 gnVs1dQ0xdYuog== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddugedghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeehffejteette ekfffhvdeghfegvedvvdeujeehheefveefudefgeeitdehueejleenucffohhmrghinhep rhgvmhgrrhhkrggslhgvrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Oct 2021 08:26:15 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, kernel@pengutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, linux-imx@nxp.com, amitk@kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, Alistair Francis Subject: [PATCH v13 3/9] mfd: simple-mfd-i2c: Enable support for the silergy, sy7636a Date: Fri, 15 Oct 2021 22:25:45 +1000 Message-Id: <20211015122551.38951-4-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211015122551.38951-1-alistair@alistair23.me> References: <20211015122551.38951-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_052622_264798_DFA67C62 X-CRM114-Status: GOOD ( 12.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Signed-off-by: Alistair Francis Acked-for-MFD-by: Lee Jones --- drivers/mfd/simple-mfd-i2c.c | 12 +++++++++++ include/linux/mfd/sy7636a.h | 41 ++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 include/linux/mfd/sy7636a.h diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c index 51536691ad9d..fbc6d6aed6c0 100644 --- a/drivers/mfd/simple-mfd-i2c.c +++ b/drivers/mfd/simple-mfd-i2c.c @@ -62,8 +62,20 @@ static int simple_mfd_i2c_probe(struct i2c_client *i2c) return ret; } +static const struct mfd_cell sy7636a_cells[] = { + { .name = "sy7636a-regulator", }, + { .name = "sy7636a-temperature", }, + { .name = "sy7636a-thermal", }, +}; + +static const struct simple_mfd_data silergy_sy7636a = { + .mfd_cell = sy7636a_cells, + .mfd_cell_size = ARRAY_SIZE(sy7636a_cells), +}; + static const struct of_device_id simple_mfd_i2c_of_match[] = { { .compatible = "kontron,sl28cpld" }, + { .compatible = "silergy,sy7636a", .data = &silergy_sy7636a}, {} }; MODULE_DEVICE_TABLE(of, simple_mfd_i2c_of_match); diff --git a/include/linux/mfd/sy7636a.h b/include/linux/mfd/sy7636a.h new file mode 100644 index 000000000000..15caa54f0432 --- /dev/null +++ b/include/linux/mfd/sy7636a.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Functions to access SY3686A power management chip. + * + * Copyright (C) 2021 reMarkable AS - http://www.remarkable.com/ + */ + +#ifndef __MFD_SY7636A_H +#define __MFD_SY7636A_H + +#include +#include +#include +#include + +#define SY7636A_REG_OPERATION_MODE_CRL 0x00 +#define SY7636A_OPERATION_MODE_CRL_VCOMCTL BIT(6) +#define SY7636A_OPERATION_MODE_CRL_ONOFF BIT(7) +#define SY7636A_REG_VCOM_ADJUST_CTRL_L 0x01 +#define SY7636A_REG_VCOM_ADJUST_CTRL_H 0x02 +#define SY7636A_REG_VCOM_ADJUST_CTRL_MASK 0x01ff +#define SY7636A_REG_VLDO_VOLTAGE_ADJULST_CTRL 0x03 +#define SY7636A_REG_POWER_ON_DELAY_TIME 0x06 +#define SY7636A_REG_FAULT_FLAG 0x07 +#define SY7636A_FAULT_FLAG_PG BIT(0) +#define SY7636A_REG_TERMISTOR_READOUT 0x08 + +#define SY7636A_REG_MAX 0x08 + +#define VCOM_MIN 0 +#define VCOM_MAX 5000 + +#define VCOM_ADJUST_CTRL_MASK 0x1ff +// Used to shift the high byte +#define VCOM_ADJUST_CTRL_SHIFT 8 +// Used to scale from VCOM_ADJUST_CTRL to mv +#define VCOM_ADJUST_CTRL_SCAL 10000 + +#define FAULT_FLAG_SHIFT 1 + +#endif /* __LINUX_MFD_SY7636A_H */ From patchwork Fri Oct 15 12:25:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12561307 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76308C433EF for ; Fri, 15 Oct 2021 12:28:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4461C6108E for ; Fri, 15 Oct 2021 12:28:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4461C6108E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Jt2N1zBB0xCFNd8HmGi019BDZbzB6M9ojXoLI7sxmp8=; b=05gZbDZtqD2GMT w3QRIB4vFvtvZlA9kRNlIMF5A7zkHJZlNN6rLPvR35eo9tWWed+CM+3Dww3qnq8qwJeIMg5chcz6Z oR66VuAYF5g+ll8fwn0g4WntdZ/KRfunpz1EkbXP/WWrvEx7oUH3JluJMm63iC9m+mtHt/su0B2kz mysQOD5wQtwV7S77CZajDtaO7BWilFz06FM0ACoYpsCmyLecVr7OIhho/l2NRr7BItlkN7/fy1pfu 66O51He6Vk3zxMrIFH2m4wYuc26FSHiyJZ1s98y0k15ba8sFUjre8bPVZU2XQofXZ+Npmzq80n8un IXnnPZ5HU/KOPSdpa3Dg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMIf-006sV0-8J; Fri, 15 Oct 2021 12:27:01 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMI8-006sKk-5d for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 12:26:30 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 88DBF580EC5; Fri, 15 Oct 2021 08:26:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 15 Oct 2021 08:26:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=VlKu10pGyqFtO YC6n8tkW4+yJlH9Ol1fiFnYlC1VoXk=; b=DH/yr1AgNO5iEXDyTbqI1RU30MYHU A0lhHMFFKK3erTNafah1MkGmx3xp2U+OWrUtqzI6733GmwR20hE17yWAPnLhrG7y W32yuZkWXXc3tqgAWVAL0oXwTEHRsyjrdQcCYXZuR72cxM+iXA3BDcWh1Gmop0Ho qsvTuw2rWJ+uvO4HGKKQw/hvy7t24d4k8k36/Vvn3sjZENPXo6Ejr8Ecnvaeu7nA I4WRiMe+rNeeKmg4yodiCEXQ7Ck00bIDDwtznJ9WmHA880D0yzLQECrIxiioiV9E 9d34hGQvTPXmhWPZs11HBqVkBU0cZqaFIKhlW8ii5LEs0lbXzbUZCqueQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=VlKu10pGyqFtOYC6n8tkW4+yJlH9Ol1fiFnYlC1VoXk=; b=ZDIYYqzq PXJQOJtaTLRnCCMJtSTjD98HkITAoQ9ke0wHvTWS1ZuPsLmHn+OHCzO43xJFUStA OFuwY7pbKJb+h2xW+1e0dLrjg1iYI99vGP/2qlAWxVUCXesYwj9Tvxa4V0mquP3I 0yFruL6J49FZNBEIPkC+NG6azUIVYSnEUP7gBf70aNHKyjH9IUG7Zj0SQlRYjku/ yXhoLl6Z9cVddgnP7BAw3NjPtISeMN/C4MxdzBFsGM6jdIpVt+X8J5qgx16ahjZF ZdAVBRhqiT8altCiCnXOyzVXqyVE36/UGY7GRWs6MEXYk5ek8BRsjtPLjwyR7Y6O 79vaa/Odhrqxvw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddugedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Oct 2021 08:26:21 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, kernel@pengutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, linux-imx@nxp.com, amitk@kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, Alistair Francis Subject: [PATCH v13 4/9] regulator: sy7636a: Remove requirement on sy7636a mfd Date: Fri, 15 Oct 2021 22:25:46 +1000 Message-Id: <20211015122551.38951-5-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211015122551.38951-1-alistair@alistair23.me> References: <20211015122551.38951-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_052628_306266_B6ACB1EF X-CRM114-Status: GOOD ( 11.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Signed-off-by: Alistair Francis --- drivers/regulator/Kconfig | 1 - drivers/regulator/sy7636a-regulator.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 4fd13b06231f..21077cb14625 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -1199,7 +1199,6 @@ config REGULATOR_STW481X_VMMC config REGULATOR_SY7636A tristate "Silergy SY7636A voltage regulator" - depends on MFD_SY7636A help This driver supports Silergy SY3686A voltage regulator. diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c index 8360b3947ead..22fddf868e4c 100644 --- a/drivers/regulator/sy7636a-regulator.c +++ b/drivers/regulator/sy7636a-regulator.c @@ -70,7 +70,7 @@ static const struct regulator_desc desc = { static int sy7636a_regulator_probe(struct platform_device *pdev) { - struct regmap *regmap = dev_get_drvdata(pdev->dev.parent); + struct regmap *regmap = dev_get_regmap(pdev->dev.parent, NULL); struct regulator_config config = { }; struct regulator_dev *rdev; struct gpio_desc *gdp; From patchwork Fri Oct 15 12:25:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12561309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28CAAC433EF for ; Fri, 15 Oct 2021 12:28:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC1C86108E for ; Fri, 15 Oct 2021 12:28:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EC1C86108E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XWw36l7xaYNFq8muQleXC3TcmYD1OxDW0VLNycPD8yg=; b=Rah6YWj2qyiF6K Jkuo9dzM81aGK0qsVtHuTU34/+cqLuswlhXcSbknF7JQ0Dq0pr9ylGvR+WisrQuvhKUVR3OrlIZRu 0a33oDySOxGAfesw9xAA8a0dJTVEMNr1gzB2gjT1+ffzN1kevKyxUGAPnf4VXprfwp8kbRre6U3Nd R7LSrvwWbqwRxPm1BtzMtakDLmZ6zq2MbZ9EaqzcLEUKYh2C39G8mPVI/gQ5/TtR510ol+IeVcNdh +02ckWk02y3HOXiXHiGDQL8GBOw/L0eZ4nbUuOONJDwlBiBg0onkNIXvofVkLjMSNWqNhDCJQLkv7 HEotFHkco5gxUuHgwVoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMJ0-006sf5-DB; Fri, 15 Oct 2021 12:27:22 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMIE-006sMk-0V for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 12:26:35 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 654FA580EC5; Fri, 15 Oct 2021 08:26:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 15 Oct 2021 08:26:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=pyVtUnZYzGrcH 1g1RkGLXUcs/0mV92qZW3HWmcKlct4=; b=dZFMq4xfKQ4Am6OK3U+fApc41+xjf o2hM1GyZz5nhcAPTDRYLQkP7tKLpv17INmT1I12lwZWDqiWTWBmOOQJCP4bt9uP0 T4Ho4GQIbUcbMtjZBviTQVQ1/SKJ7t1KD1R7o7zuuPWZPUy0j08O0P6ZgibYDXtr 7/5dFlkptH6X40UZg1GOzS3YWW3uqWePIiNbK3zJXMkUbGeVkeg+zZd8IJNHty8m FGjhdCSehsLM1hfazcXNV9QdEJhPDBULO7q204qHLlqex4QV5Aq5d+zemtxODoiC 6HvFdS31lyaQfdIo0wvqcI/IG4iKRg7T5xp9HY9jjCCqYDWWHABdqq9Fw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=pyVtUnZYzGrcH1g1RkGLXUcs/0mV92qZW3HWmcKlct4=; b=QtMx7mSW E0VGOVq4J33c970QF1mskQXPidpkyPCSt1+FqP4HlYJ9aZG2nSLfG1VNBMeVz9YE OhMjHjaVRkxBq6lTUNZE3st5TEnw5/Gvf7pzP/pncxXGQqr1ylpMGUvjlx4o3yQo OSHo4OdxQbnMTU5Y1dgHefFKZ4/MK5DCdniY7sfRJycajIFawCvDKKU9kgISMghp at+ofFzuu6JP1cM0boMn1nd03gox3trc6a9FjZS9+FarbWcsZIU123KxogA3DDyF gIEv+/stS177zQjYNnUT+iw6XtpSz9Rxzxu3d1SPP/250x4gVUSSHmt2tScHrbKu su8fr8YrPYiQaA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddugedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeehffejteette ekfffhvdeghfegvedvvdeujeehheefveefudefgeeitdehueejleenucffohhmrghinhep rhgvmhgrrhhkrggslhgvrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Oct 2021 08:26:27 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, kernel@pengutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, linux-imx@nxp.com, amitk@kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, Alistair Francis Subject: [PATCH v13 5/9] thermal: sy7636a: Add thermal driver for sy7636a Date: Fri, 15 Oct 2021 22:25:47 +1000 Message-Id: <20211015122551.38951-6-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211015122551.38951-1-alistair@alistair23.me> References: <20211015122551.38951-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_052634_153629_1E96535F X-CRM114-Status: GOOD ( 17.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add thermal driver to enable kernel based polling and shutdown of device for temperatures out of spec Signed-off-by: Alistair Francis --- drivers/thermal/Kconfig | 6 ++ drivers/thermal/Makefile | 1 + drivers/thermal/sy7636a_thermal.c | 94 +++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 drivers/thermal/sy7636a_thermal.c diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index d7f44deab5b1..6ee0e7de1b37 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -450,6 +450,12 @@ depends on (ARCH_STI || ARCH_STM32) && OF source "drivers/thermal/st/Kconfig" endmenu +config SY7636A_THERMAL + tristate "SY7636A thermal management" + help + Enable the sy7636a thermal driver, which supports the + temperature sensor embedded in Silabs SY7636A IC. + source "drivers/thermal/tegra/Kconfig" config GENERIC_ADC_THERMAL diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile index 82fc3e616e54..2e1aca8a0a09 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile @@ -51,6 +51,7 @@ obj-$(CONFIG_DA9062_THERMAL) += da9062-thermal.o obj-y += intel/ obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/ obj-y += st/ +obj-$(CONFIG_SY7636A_THERMAL) += sy7636a_thermal.o obj-$(CONFIG_QCOM_TSENS) += qcom/ obj-y += tegra/ obj-$(CONFIG_HISI_THERMAL) += hisi_thermal.o diff --git a/drivers/thermal/sy7636a_thermal.c b/drivers/thermal/sy7636a_thermal.c new file mode 100644 index 000000000000..9e58305ca3ce --- /dev/null +++ b/drivers/thermal/sy7636a_thermal.c @@ -0,0 +1,94 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Functions to access SY3686A power management chip temperature + * + * Copyright (C) 2019 reMarkable AS - http://www.remarkable.com/ + * + * Authors: Lars Ivar Miljeteig + * Alistair Francis + */ + +#include +#include +#include + +#include + +static int sy7636a_get_temp(void *arg, int *res) +{ + unsigned int mode_ctr; + int ret, reg_val; + struct regmap *regmap = arg; + bool isVoltageActive; + + ret = regmap_read(regmap, + SY7636A_REG_OPERATION_MODE_CRL, &mode_ctr); + if (ret) + return ret; + + isVoltageActive = mode_ctr & SY7636A_OPERATION_MODE_CRL_ONOFF; + + /* If operation mode isn't set to control, then let's set it. */ + if (!isVoltageActive) { + ret = regmap_write(regmap, + SY7636A_REG_OPERATION_MODE_CRL, + mode_ctr | SY7636A_OPERATION_MODE_CRL_ONOFF); + if (ret) + return ret; + } + + ret = regmap_read(regmap, + SY7636A_REG_TERMISTOR_READOUT, ®_val); + if (ret) + return ret; + + /* Restore the operation mode if it wasn't set */ + if (!isVoltageActive) { + ret = regmap_write(regmap, + SY7636A_REG_OPERATION_MODE_CRL, + mode_ctr); + if (ret) + return ret; + } + + *res = reg_val * 1000; + + return ret; +} + +static const struct thermal_zone_of_device_ops ops = { + .get_temp = sy7636a_get_temp, +}; + +static int sy7636a_thermal_probe(struct platform_device *pdev) +{ + struct regmap *regmap = dev_get_regmap(pdev->dev.parent, NULL); + struct thermal_zone_device *thermal_zone_dev; + + thermal_zone_dev = devm_thermal_zone_of_sensor_register( + pdev->dev.parent, + 0, + regmap, + &ops); + + return PTR_ERR_OR_ZERO(thermal_zone_dev); +} + +static const struct platform_device_id sy7636a_thermal_id_table[] = { + { "sy7636a-thermal", }, + { } +}; +MODULE_DEVICE_TABLE(platform, sy7636a_thermal_id_table); + +static struct platform_driver sy7636a_thermal_driver = { + .driver = { + .name = "sy7636a-thermal", + }, + .probe = sy7636a_thermal_probe, + .id_table = sy7636a_thermal_id_table, +}; +module_platform_driver(sy7636a_thermal_driver); + +MODULE_AUTHOR("Lars Ivar Miljeteig "); +MODULE_DESCRIPTION("SY7636A thermal driver"); +MODULE_LICENSE("GPL v2"); From patchwork Fri Oct 15 12:25:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12561311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B18AFC433EF for ; Fri, 15 Oct 2021 12:29:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 783F360E05 for ; Fri, 15 Oct 2021 12:29:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 783F360E05 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2Wb9LBIkpkfhmosoq+sD7mwPjG6DcfWaSGdQUEBLqGc=; b=URe6fuPVfp6Iig Tm5FnoOlk/CmK5H5N5R1mdr9P98Q68GFEeSMyol1LNwDo3flIyW+fDW0DnrprkKrfxByVT1eWPsyU A7daztMRirK5IByqfdUEI+W1efq2CYJmwFK1ursUA31/YE3mHeC1veB4yZSjmRiZkyvSG96cevHi4 NS2FrDjUoINygSX1hYma39AQhhgRivovPTyG+6eDqxiv32X1QFqmG7dStG+tYgCc/ZBzVRn18X0tW 12762db74AZ3Mankcvf/Ai2j8bYWKTRSKC/4HmUYS7SJ9yor3WRU0hoj1Tcmewda41DUmu8y7VS69 7qkUveeJ6V1jPEzfgHow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMJO-006spe-5U; Fri, 15 Oct 2021 12:27:46 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMIJ-006sOS-Um for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 12:26:41 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 569FA580ECC; Fri, 15 Oct 2021 08:26:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 15 Oct 2021 08:26:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=WsTwXpxrUZfoY qLUtmFGqHSYxMxsCAPXqbvqeGLZ/qI=; b=wTmJKsr5+ZOtqCXUQWBLnLN53Gpa4 MFP5CeGojjkoU0R3hRxvhXj27XuqzPz/3D5Z+X5g3z2FJfJILP1k9f7nyYxMI5Lg CtP1wyITvNm+nk+99kvWXUMedq9tEDw/5dSKrgvXyg/QCfkcQqgfYwnBNn8spNkE PSNSN0r2VlP73BHvjh/gjLZc85136I2vgD41dUt3yzYo97xHr/DCqtQMA0gbw1IF Iq9O4fE61uRCaJ3bofLQPB9722W/57cVQ9JkwHE16s/4FPtfv5AxY9eogtqovM2c j6OBEI4sLdtRZJDIzxBfvc1+Hd1oNMiXs20lQxThmlxgrfITxgpiSxzEA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=WsTwXpxrUZfoYqLUtmFGqHSYxMxsCAPXqbvqeGLZ/qI=; b=QBm0bj9p 6xP9xD48rbU6RYb5HRnMuIRSpboHCDVL9hsTvVwB5ZAM5W57VBlAwQH4K7XcDXbt XMpK54bclWWiNnytgdYuzN6CNWDeUfbb36xSaMFSwQ3o5i+WCPhEYaEl4g97Gusx IUJyxGC08dWll2jokMtPWwpMRYpvJuc9AaeMQvu5spHQXvlQbIQRqypvltUODM02 Tt/7uvuMCX2C01uHTazvTAjpn/5QTwgjEUELQGbfBL5bK+sfTpY0kUYg0fgez3vi NvTaVFl2FsKmNoK0t22+dmapVdflbSP13dYGu+kHrCJUsFMXunDsJL6v+RRUlpD6 8tTHTBTUYgpCwQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddugedghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeehffejteette ekfffhvdeghfegvedvvdeujeehheefveefudefgeeitdehueejleenucffohhmrghinhep rhgvmhgrrhhkrggslhgvrdgtohhmnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrg hmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Oct 2021 08:26:33 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, kernel@pengutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, linux-imx@nxp.com, amitk@kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, Alistair Francis Subject: [PATCH v13 6/9] hwmon: sy7636a: Add temperature driver for sy7636a Date: Fri, 15 Oct 2021 22:25:48 +1000 Message-Id: <20211015122551.38951-7-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211015122551.38951-1-alistair@alistair23.me> References: <20211015122551.38951-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_052640_089386_7F7F2758 X-CRM114-Status: GOOD ( 17.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a multi-function device to interface with the sy7636a EPD PMIC chip from Silergy. Signed-off-by: Alistair Francis --- Documentation/hwmon/sy7636a-hwmon.rst | 24 +++++++++ drivers/hwmon/Kconfig | 9 ++++ drivers/hwmon/Makefile | 1 + drivers/hwmon/sy7636a-hwmon.c | 75 +++++++++++++++++++++++++++ 4 files changed, 109 insertions(+) create mode 100644 Documentation/hwmon/sy7636a-hwmon.rst create mode 100644 drivers/hwmon/sy7636a-hwmon.c diff --git a/Documentation/hwmon/sy7636a-hwmon.rst b/Documentation/hwmon/sy7636a-hwmon.rst new file mode 100644 index 000000000000..6b3e36d028dd --- /dev/null +++ b/Documentation/hwmon/sy7636a-hwmon.rst @@ -0,0 +1,24 @@ +Kernel driver sy7636a-hwmon +========================= + +Supported chips: + + * Silergy SY7636A PMIC + + +Description +----------- + +This driver adds hardware temperature reading support for +the Silergy SY7636A PMIC. + +The following sensors are supported + + * Temperature + - SoC on-die temperature in milli-degree C + +sysfs-Interface +--------------- + +temp0_input + - SoC on-die temperature (milli-degree C) diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index c4578e8f34bb..d768b833b721 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -1651,6 +1651,15 @@ config SENSORS_SIS5595 This driver can also be built as a module. If so, the module will be called sis5595. +config SENSORS_SY7636A + tristate "Silergy SY7636A" + help + If you say yes here you get support for the thermistor readout of + the Silergy SY7636A PMIC. + + This driver can also be built as a module. If so, the module + will be called sy7636a-hwmon. + config SENSORS_DME1737 tristate "SMSC DME1737, SCH311x and compatibles" depends on I2C && !PPC diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index 162940270661..1355ffdb1481 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -181,6 +181,7 @@ obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o obj-$(CONFIG_SENSORS_SMSC47M192)+= smsc47m192.o obj-$(CONFIG_SENSORS_SPARX5) += sparx5-temp.o obj-$(CONFIG_SENSORS_STTS751) += stts751.o +obj-$(CONFIG_SENSORS_SY7636A) += sy7636a-hwmon.o obj-$(CONFIG_SENSORS_AMC6821) += amc6821.o obj-$(CONFIG_SENSORS_TC74) += tc74.o obj-$(CONFIG_SENSORS_THMC50) += thmc50.o diff --git a/drivers/hwmon/sy7636a-hwmon.c b/drivers/hwmon/sy7636a-hwmon.c new file mode 100644 index 000000000000..a59628f87ff3 --- /dev/null +++ b/drivers/hwmon/sy7636a-hwmon.c @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Functions to access SY3686A power management chip temperature + * + * Copyright (C) 2019 reMarkable AS - http://www.remarkable.com/ + * + * Authors: Lars Ivar Miljeteig + * Alistair Francis + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +static ssize_t show_temp(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned int reg_val; + struct regmap *regmap = dev_get_drvdata(dev); + int ret; + + ret = regmap_read(regmap, SY7636A_REG_TERMISTOR_READOUT, ®_val); + if (ret) + return ret; + + return snprintf(buf, PAGE_SIZE, "%d\n", reg_val); +} + +static SENSOR_DEVICE_ATTR(temp0, 0444, show_temp, NULL, 0); + +static struct attribute *sy7636a_attrs[] = { + &sensor_dev_attr_temp0.dev_attr.attr, + NULL +}; + +ATTRIBUTE_GROUPS(sy7636a); + +static int sy7636a_sensor_probe(struct platform_device *pdev) +{ + struct regmap *regmap = dev_get_regmap(pdev->dev.parent, NULL); + struct device *hwmon_dev; + int err; + + if (!regmap) + return -EPROBE_DEFER; + + hwmon_dev = devm_hwmon_device_register_with_info(&pdev->dev, + "sy7636a_temperature", regmap, NULL, sy7636a_groups); + + if (IS_ERR(hwmon_dev)) { + err = PTR_ERR(hwmon_dev); + dev_err(&pdev->dev, "Unable to register hwmon device, returned %d\n", err); + return err; + } + + return 0; +} + +static struct platform_driver sy7636a_sensor_driver = { + .probe = sy7636a_sensor_probe, + .driver = { + .name = "sy7636a-temperature", + }, +}; +module_platform_driver(sy7636a_sensor_driver); + +MODULE_DESCRIPTION("SY7636A sensor driver"); +MODULE_LICENSE("GPL"); From patchwork Fri Oct 15 12:25:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12561313 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 590B7C433F5 for ; Fri, 15 Oct 2021 12:30:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EA8960E05 for ; Fri, 15 Oct 2021 12:30:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1EA8960E05 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QHUpByiJHJRH1BdkLZyfjJ1N5v/WPwQ/76lx7Ixp1RM=; b=0H7cLD0qx8KOlp gqlajhReHr/O+BOjzZOfKMvVLn0j4Yg3Ya9ov14BnDVCgtBmRdzqo4v1H47l74dlUQ3Ve0eUUj6Kz lXkU2j/PSC3jM61tiz4W+eLJiAajEocntZ1r8dOxj91EllE4n9FFpxPJU8mFu+ESPjKCvLXKqlEz6 H3gMfEtbd67q7pta4xsyaf1DRviKSc4LfEYhsyUPONvyOoFwLcFSVwo3kXr9PVweJMCzUN2OIkTC+ Buo6to2TFRi9Y/7jRuCRu5/3i17CZxhjZTy/v61XDRM55nt9xdoXH3oaMl4aEFuKSir6IYhOPLtnu NvC2R6VRyCDAqCjXuZQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMJy-006t7u-G7; Fri, 15 Oct 2021 12:28:23 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMIQ-006sQR-3q for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 12:26:47 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 7FFBA580EC5; Fri, 15 Oct 2021 08:26:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 15 Oct 2021 08:26:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=gfpmKNzWonR92 QsaGahokwdIzQKNcF6Y0UVq38RYfWE=; b=pix9A8ezfvlwGqip+JGBA3rYX3vUe I00+cumWfNe4rZ6Uo7hNRa5wAwGaA+QQnIYOrb9dlqnuUMR10n+n7S+tVxZ9BMaz G3CtGaMJPATYNsLCM8Pe0Tobmx39eaIrp8YmG/qhyE5DuUckjTcMFb9D+K043pUC qLSOqT2hjW3K/hfVWRcyxJmy2B6rvcMlBE0wKWh/n41cxGo/RbQUd1O8Tjd3638Y lDpDA6Gts3DMTAib4r5TCUo2KHXDpyGnmCaU40UzUJxZa+DJUgIHfwiZ6QCRc38M y/oemYvgURK3KBVIlJ3lw5gQW0y1ZuM2/BNnIEoLt6ogQMO81cAw8tXVw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=gfpmKNzWonR92QsaGahokwdIzQKNcF6Y0UVq38RYfWE=; b=esaBt7em 4FKcav7XloA98WDg3rMFWNAGTOxW9X24KyoJqs0kHQS3526vDCAUGPhraYWF5BtB 3NV0ge0zCr65R0Xm2K9PyL3oLaBrK9gxrxubaYybqLwMHHq2ZGEnpXIDJinRrrtf gjkYX4vhDqNMLQxHCizrWHfz8pNeZNjGNtAd3A6cnwmTMrTEJMFznmyUWXB2NRCA LQf7XZkQVgmKoAY4k2O4pCX4b6cyp8nrHduOUpaFGMeDRyc94QmvebmPH0d5n+b5 YHCbY+9ftm6o/wF201QCOb/RkGVQoGptpmqWwJNReJkIDIcEryTordHKOpr7s2Z3 2sknaBc+HK1MUg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddugedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucevlhhushhtvghr ufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Oct 2021 08:26:39 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, kernel@pengutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, linux-imx@nxp.com, amitk@kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, Alistair Francis Subject: [PATCH v13 7/9] ARM: imx_v6_v7_defconfig: Enable silergy,sy7636a Date: Fri, 15 Oct 2021 22:25:49 +1000 Message-Id: <20211015122551.38951-8-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211015122551.38951-1-alistair@alistair23.me> References: <20211015122551.38951-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_052646_259954_6C64A1DE X-CRM114-Status: UNSURE ( 6.99 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Enable the silergy,sy7636a and silergy,sy7636a-regulator for the reMarkable2. Signed-off-by: Alistair Francis --- arch/arm/configs/imx_v6_v7_defconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 5e4128dadd8d..948494074de4 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -228,10 +228,12 @@ CONFIG_RN5T618_POWER=m CONFIG_SENSORS_MC13783_ADC=y CONFIG_SENSORS_GPIO_FAN=y CONFIG_SENSORS_IIO_HWMON=y +CONFIG_SENSORS_SY7636A=y CONFIG_THERMAL_STATISTICS=y CONFIG_THERMAL_WRITABLE_TRIPS=y CONFIG_CPU_THERMAL=y CONFIG_IMX_THERMAL=y +CONFIG_SY7636A_THERMAL=y CONFIG_WATCHDOG=y CONFIG_DA9062_WATCHDOG=y CONFIG_DA9063_WATCHDOG=m @@ -247,6 +249,7 @@ CONFIG_MFD_RN5T618=y CONFIG_MFD_STMPE=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_MFD_SIMPLE_MFD_I2C=y CONFIG_REGULATOR_ANATOP=y CONFIG_REGULATOR_DA9052=y CONFIG_REGULATOR_DA9062=y @@ -257,6 +260,7 @@ CONFIG_REGULATOR_MC13783=y CONFIG_REGULATOR_MC13892=y CONFIG_REGULATOR_PFUZE100=y CONFIG_REGULATOR_RN5T618=y +CONFIG_REGULATOR_SY7636A=y CONFIG_RC_CORE=y CONFIG_RC_DEVICES=y CONFIG_IR_GPIO_CIR=y From patchwork Fri Oct 15 12:25:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12561315 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DD25C433EF for ; Fri, 15 Oct 2021 12:30:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C85176108E for ; Fri, 15 Oct 2021 12:30:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C85176108E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZSRPLr0F7SOT+3JaJ/z/IMN5KFEPXCYBL5bgrA+mn/w=; b=xw/2lnCcy+oKlT /rx4z6e48cm8neoawUEmhC5Vpmaz4A/hzGiHXrhYErsE8WzcLzvXYJBIZSEbNd1zZZO/tA/8G5IT2 36PUiIDwgC3HyzvHDveBWk7zx90pmmUQ8TZ7CT3lIIv5WUTc0BFRfu9uOHzUhVtYCFEsX1KiX1bOl QFxa6YEixqQZW2cheXsTvyvuvyokBUhhYNeiHqtJPgzlCmR572bWR9Yn2xO7iKeXNFMQczKwMkM2i 0chZk1zIwfiFGidZ/JZA9SiAjRyyJ+mSehfg+4j/wXPP7L1AoJrWuKdRqyuKS/vQPJ9NnN2npB4Hm 8ar4ZQcHHRPQ2fJ73z6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMKh-006tRt-VQ; Fri, 15 Oct 2021 12:29:08 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMIW-006sSC-6c for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 12:26:53 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 8CF81580EC5; Fri, 15 Oct 2021 08:26:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 15 Oct 2021 08:26:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=716shbgGMma/V dWgBLnXtBaiv+CdVe32+vnXxmMr+Y0=; b=Ru6khllnQ4IuIBgA1VRdo19q6m679 DeRw2i2lYm/NMDK50+Xsj5c/y84rCmXBtfygTgxzbVACXtev5bstvCETSlL9Xs+L afwmcLr1rHqA64tt8OPXcxvItAki7ARlpi3scrZDP1+GPZdo5Zw7zfzQqgqC2GFo itucjKzuP14tkl8foWiKetBD+NWAvs8I01GAroBOWCuAmPg9JGKNHzATO6wcdMvg iOT7xBciLDyTX8UgYRsuMWUO+eZ3qDjdwNOQMzwEWzrHsePWaJktgcua6g6dPX5d smzZMNV6LV9J01zymG2DmQZhXCfp02Rin6JLxvIK8sVwnrv9QWCSbVP5w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=716shbgGMma/VdWgBLnXtBaiv+CdVe32+vnXxmMr+Y0=; b=B/0al/VE BMi5VtEJpSHPaAP9CfxFNJNikwRXZZb0TMWYCRBNSg2Mvmxv2vTNEKnU9MelOOId f00We1LXyztjhPgKRxdIwCRUHyaufNJWNNDDyIDtGw2fHBzU31hSTUpSGMqN5mJP 9lfCyhd2aaFvmsYiFK3tZ4cJPfrUGgdjJAbisMCnbDA1vqyYNXH39+Nom3/sdugm pGk6DEXfhsDIcMrFvcGTjTQz54ZoxFIjNJbrl1eNnNC8e5S/ihBponGfQoRNY1GO jR3zXLgxaD9+zMjkSSEWEbCmNu2iv5DX1PfqPCawZfxWHuv7xWT/S6PsLZLs5RVe 3t8HBZcKfbELRg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddugedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Oct 2021 08:26:45 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, kernel@pengutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, linux-imx@nxp.com, amitk@kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, Alistair Francis Subject: [PATCH v13 8/9] ARM: dts: imx7d: remarkable2: Enable silergy,sy7636a Date: Fri, 15 Oct 2021 22:25:50 +1000 Message-Id: <20211015122551.38951-9-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211015122551.38951-1-alistair@alistair23.me> References: <20211015122551.38951-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_052652_340037_6B0ACDB2 X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Enable the silergy,sy7636a and silergy,sy7636a-regulator on the reMarkable2. Signed-off-by: Alistair Francis --- arch/arm/boot/dts/imx7d-remarkable2.dts | 62 +++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-remarkable2.dts b/arch/arm/boot/dts/imx7d-remarkable2.dts index 89cbf13097a4..b66d28b30d75 100644 --- a/arch/arm/boot/dts/imx7d-remarkable2.dts +++ b/arch/arm/boot/dts/imx7d-remarkable2.dts @@ -22,6 +22,27 @@ memory@80000000 { reg = <0x80000000 0x40000000>; }; + thermal-zones { + epd-thermal { + thermal-sensors = <&epd_pmic>; + polling-delay-passive = <30000>; + polling-delay = <30000>; + trips { + trip0 { + temperature = <49000>; + hysteresis = <2000>; + type = "passive"; + }; + + trip1 { + temperature = <50000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; + reg_brcm: regulator-brcm { compatible = "regulator-fixed"; regulator-name = "brcm_reg"; @@ -51,6 +72,33 @@ &clks { assigned-clock-rates = <0>, <32768>; }; +&i2c4 { + clock-frequency = <100000>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&pinctrl_i2c4>; + pinctrl-1 = <&pinctrl_i2c4>; + status = "okay"; + + epd_pmic: sy7636a@62 { + compatible = "silergy,sy7636a"; + reg = <0x62>; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_epdpmic>; + #address-cells = <1>; + #size-cells = <0>; + #thermal-sensor-cells = <0>; + + epd-pwr-good-gpios = <&gpio6 21 GPIO_ACTIVE_HIGH>; + regulators { + reg_epdpmic: vcom { + regulator-name = "vcom"; + regulator-boot-on; + }; + }; + }; +}; + &snvs_pwrkey { status = "okay"; }; @@ -125,6 +173,20 @@ MX7D_PAD_SAI1_TX_BCLK__GPIO6_IO13 0x14 >; }; + pinctrl_epdpmic: epdpmicgrp { + fsl,pins = < + MX7D_PAD_SAI2_RX_DATA__GPIO6_IO21 0x00000074 + MX7D_PAD_ENET1_RGMII_TXC__GPIO7_IO11 0x00000014 + >; + }; + + pinctrl_i2c4: i2c4grp { + fsl,pins = < + MX7D_PAD_I2C4_SDA__I2C4_SDA 0x4000007f + MX7D_PAD_I2C4_SCL__I2C4_SCL 0x4000007f + >; + }; + pinctrl_uart1: uart1grp { fsl,pins = < MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX 0x79 From patchwork Fri Oct 15 12:25:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12561317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12A6AC433EF for ; Fri, 15 Oct 2021 12:31:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D803B6108E for ; Fri, 15 Oct 2021 12:31:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D803B6108E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cfEbakCuNEBKTqqXl9wgAGqNnfYFSVFuVv6gnNzll6k=; b=NDq4n2s604wOwM nNlzBUZ+/LeU+Smvi2KqhO0Q/ks4p0vmtMYgykiqvActJdZMebWAAhz9BbYqnU/WbXKuUP3nEqkX8 jcu++cy4NBzuYavx7Nrd1JwaVHRqlwsW2vaAn2xCcKYNWq53M/gxVaUUkLG5XL+6H6Z00r3VnNqEn ze1yb2H8ywceNj99V2ZseM8bEt1r5kSOXLwggCXVrE519bpojakDASIDuY0G1oQT2aPJsfEDXGZy/ OpwSGSNBWBA/5/+dCg/VQ0Xy4XcPhtR5h8AgM7jFw0EH2ZA7Dt5RjDLP1M0KWPHrXlh+3ZgHKK/aw Y/9LnRjL1wz2rvx0vKww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMLN-006tlV-6e; Fri, 15 Oct 2021 12:29:50 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbMIc-006sUC-7j for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 12:26:59 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 87ED5580EC5; Fri, 15 Oct 2021 08:26:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 15 Oct 2021 08:26:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=2aOAXpeIPQR2x ghpp4OMQNId//edXUxPmx/LpQURmRg=; b=c0PVLObD0yYrSxS+mmqlLJ/i4cRXt xmI3Y6zBJ3n4kXpGap7sIeiJ0WSiOThbwXOSKaLx1j0tFIClJHQ9T7lU/41AYHlM Y9+8CnrakMCxiMEn2bzlxu/VWIT4pn1UJIB1jKwgSiCY/dYK9HPT53EZvy7hmUeZ cxdNCnHA5O3Xh8CAxaVk9Ewtws+vYpnfLyyKkgWU5/xtEG/Rlf1YPA0B/C8H0L3y ZpaLGklLlyOWKMRxcDsiWQr+ItVxVg3kK6KwttgnxKQ7R4RvCUlqh+276QrTnoba 6giGPKS1FiACU4K+V1OMf6fc6bW4kq149kNmcV9lD8uq8y7dhNVJE6V9A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=2aOAXpeIPQR2xghpp4OMQNId//edXUxPmx/LpQURmRg=; b=iUtBto3Z OdloZKdcv/M2ZWVMRLFrA3GcAws9bWFsKHuUpmfxMijzKggwRuOMcQhA7dwBxnJd PXru1WfYweUvIfPiVQgl4PkjVsOfXZf6SFsVOdvC8jwD0yZchREXTk0xnw1ZOqF8 nTZ6A0w/PH1yII11WfPlwDE94EFN0ct01Sq2M9uvmWvU7EtXilCyEeohDIu/nKaE ismBNw6CsI9lNK0BW9MXDpS0rBzNsC1tf/x19xudePpyERd5V9lg9nGS/k4nAykO bcPnSrL0OWw1QJXLmYugIgSIBj4CmaTouimz/Ign4eOqRZXg401hvlX3KMayqhJC MiCJ0vOCR8/wlQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddugedghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Oct 2021 08:26:51 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, kernel@pengutronix.de Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, linux-imx@nxp.com, amitk@kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, Alistair Francis Subject: [PATCH v13 9/9] ARM: dts: imx7d: remarkable2: Enable lcdif Date: Fri, 15 Oct 2021 22:25:51 +1000 Message-Id: <20211015122551.38951-10-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211015122551.38951-1-alistair@alistair23.me> References: <20211015122551.38951-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_052658_397044_81509841 X-CRM114-Status: UNSURE ( 7.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Connect the dispaly on the reMarkable2. Signed-off-by: Alistair Francis --- arch/arm/boot/dts/imx7d-remarkable2.dts | 74 +++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-remarkable2.dts b/arch/arm/boot/dts/imx7d-remarkable2.dts index b66d28b30d75..fe68f6eaa2ec 100644 --- a/arch/arm/boot/dts/imx7d-remarkable2.dts +++ b/arch/arm/boot/dts/imx7d-remarkable2.dts @@ -55,6 +55,16 @@ reg_brcm: regulator-brcm { startup-delay-us = <150>; }; + reg_sdoe: regulator-sdoe { + compatible = "regulator-fixed"; + regulator-name = "SDOE"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&pinctrl_sdoe_reg>; + pinctrl-1 = <&pinctrl_sdoe_reg>; + gpio = <&gpio3 27 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; pinctrl-names = "default"; @@ -63,6 +73,16 @@ wifi_pwrseq: wifi_pwrseq { clocks = <&clks IMX7D_CLKO2_ROOT_DIV>; clock-names = "ext_clock"; }; + + panel { + compatible = "eink,vb3300-kca"; + + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; + }; }; &clks { @@ -99,6 +119,20 @@ reg_epdpmic: vcom { }; }; +&lcdif { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcdif>; + lcd-supply = <®_epdpmic>; + lcd2-supply = <®_sdoe>; + status = "okay"; + + port { + display_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; +}; + &snvs_pwrkey { status = "okay"; }; @@ -187,6 +221,46 @@ MX7D_PAD_I2C4_SCL__I2C4_SCL 0x4000007f >; }; + pinctrl_lcdif: lcdifgrp { + fsl,pins = < + MX7D_PAD_LCD_DATA00__LCD_DATA0 0x79 + MX7D_PAD_LCD_DATA01__LCD_DATA1 0x79 + MX7D_PAD_LCD_DATA02__LCD_DATA2 0x79 + MX7D_PAD_LCD_DATA03__LCD_DATA3 0x79 + MX7D_PAD_LCD_DATA04__LCD_DATA4 0x79 + MX7D_PAD_LCD_DATA05__LCD_DATA5 0x79 + MX7D_PAD_LCD_DATA06__LCD_DATA6 0x79 + MX7D_PAD_LCD_DATA07__LCD_DATA7 0x79 + MX7D_PAD_LCD_DATA08__LCD_DATA8 0x79 + MX7D_PAD_LCD_DATA09__LCD_DATA9 0x79 + MX7D_PAD_LCD_DATA10__LCD_DATA10 0x79 + MX7D_PAD_LCD_DATA11__LCD_DATA11 0x79 + MX7D_PAD_LCD_DATA12__LCD_DATA12 0x79 + MX7D_PAD_LCD_DATA13__LCD_DATA13 0x79 + MX7D_PAD_LCD_DATA14__LCD_DATA14 0x79 + MX7D_PAD_LCD_DATA15__LCD_DATA15 0x79 + + MX7D_PAD_LCD_DATA17__LCD_DATA17 0x79 + MX7D_PAD_LCD_DATA18__LCD_DATA18 0x79 + MX7D_PAD_LCD_DATA19__LCD_DATA19 0x79 + MX7D_PAD_LCD_DATA20__LCD_DATA20 0x79 + MX7D_PAD_LCD_DATA21__LCD_DATA21 0x79 + + MX7D_PAD_LCD_DATA23__LCD_DATA23 0x79 + MX7D_PAD_LCD_CLK__LCD_CLK 0x79 + MX7D_PAD_LCD_ENABLE__LCD_ENABLE 0x79 + MX7D_PAD_LCD_VSYNC__LCD_VSYNC 0x79 + MX7D_PAD_LCD_HSYNC__LCD_HSYNC 0x79 + MX7D_PAD_LCD_RESET__LCD_RESET 0x79 + >; + }; + + pinctrl_sdoe_reg: sdoereggrp { + fsl,pins = < + MX7D_PAD_LCD_DATA22__GPIO3_IO27 0x74 + >; + }; + pinctrl_uart1: uart1grp { fsl,pins = < MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX 0x79