From patchwork Mon Oct 25 10:53:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12581413 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 EAD90C433EF for ; Mon, 25 Oct 2021 10:55:29 +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 B7A0560EBD for ; Mon, 25 Oct 2021 10:55:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B7A0560EBD 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=N+tj55PW2ZblUMLuP82Q+iqt2M3v+t0BFCXQutPxaas=; b=sbGDhrA9MNLmPp KbxNtr6xTJSf0EPzPVJuvroK2SMyAdgNoNWZN4jMWrErVryulhqnCxkZA6xqY98adOU8gGrrkzvzS /292cx/76T4gThRvCyMeAIG/XuRuyo6S2/jiUzrYpfkt2TeAG78yb89u3GmENI9IcbUlwaeNfurPY LJLRIXZIm+spWA77lInkeW6pyyNwfxdH/4H714AGZrr6/HWmL1HoAUv7DR0JtafyJg9XlM6TpuT+G voEXKPQ/Rb3EmmYDTi0xyZG2l+GipHU6D+pEOqT/JOSjpAaIdkjDwfHzfzkvWiwdBZgc7KBa+LO0o yScv+SbAFlELEyhQMv9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexby-00G8Q9-HV; Mon, 25 Oct 2021 10:53:50 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexbg-00G8Lt-JB for linux-arm-kernel@lists.infradead.org; Mon, 25 Oct 2021 10:53:34 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id E34F158045A; Mon, 25 Oct 2021 06:53:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 25 Oct 2021 06:53:31 -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=xPIOWPlEpcSPg VeMbUyqzIh0yquJ8UKRhzhIcmgwvNU=; b=MyMo3f0t/4hNgBQPbTN0Vfo5b0L2Y my6Ff2ag4qDoUP0xA7eFSf5OgI2rjk+gJTXfvUeUxomNKTfS9ZCzBDoeiUS77FHT zHAG27671eFMGvtPW14LGistc3Ljr20ZooC4MM+j+vmSLMbZVCAvN8mtAugI0KND zfrxBCdQcX3MbQgyVuu9k42JVIzyo2HqPKCXTa1YyXG3Eh7J5U7X6BujLWH/5tF/ FNvFIi08oTpPhvDW+D1owBeFt0eZO8DEz1SDPoTI0bLM0EXrgYIWKY1niP/Gd3FI IlKtG7P3ud6CP5WgeN3+0f2jyGtZSBQPgSBRPFdPyA39xxOSXC1/DiDtw== 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=xPIOWPlEpcSPgVeMbUyqzIh0yquJ8UKRhzhIcmgwvNU=; b=EzYtRWQB FIKNpZxoTZHUoaHAFA9x2FKhVJ+D0rXaoPk6/YiZGpDgajsE+eDB9kscZHtz9uZa aGi5eY7lyRku/EujHylPasBZN4xKiqLkUq+mOh/SXtcfWqP96sd4HttcTxXPKNGK q8vPLsdDNAhZdCIJ7YCOUqfsRl635lWOaXsKcFv9WTntSpmDv6OJwxH5pr2/JTN5 av/RoUl7vExbETbN3IvzC276XANCYLl/Q5mYu2hD5QGc+O2i7RTlqPwAGSUUk5+J uh+/FAF+6dyEeDm7YRIXDK0ANDvQ2zlWZgoi3AkhJPUWq8XnV8vxxT9rOn04+/ov QlI9VezkmrBUrg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetlhhishht rghirhcuhfhrrghntghishcuoegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg eqnecuggftrfgrthhtvghrnhepffdthffggefglefgkeejhfekiefgleelfefhtefhheef teelgeeggefgfeffvddtnecuffhomhgrihhnpeguvghvihgtvghtrhgvvgdrohhrghenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishht rghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 06:53:21 -0400 (EDT) From: Alistair Francis To: robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org, broonie@kernel.org Cc: s.hauer@pengutronix.de, rui.zhang@intel.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, amitk@kernel.org, shawnguo@kernel.org, alistair23@gmail.com, devicetree@vger.kernel.org, linux-imx@nxp.com, andreas@kemnade.info, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Alistair Francis , Rob Herring Subject: [PATCH v14 1/8] dt-bindings: mfd: Initial commit of silergy, sy7636a.yaml Date: Mon, 25 Oct 2021 20:53:02 +1000 Message-Id: <20211025105309.37942-2-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211025105309.37942-1-alistair@alistair23.me> References: <20211025105309.37942-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211025_035332_753224_29DAE07B X-CRM114-Status: GOOD ( 10.74 ) 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 Acked-for-MFD-by: Lee Jones --- .../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 Mon Oct 25 10:53:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12581415 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 18977C433F5 for ; Mon, 25 Oct 2021 10:55: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 D533260EBD for ; Mon, 25 Oct 2021 10:55:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D533260EBD 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=YQCvpFnv1/+yhqGr27ejD/XoO4VnVKdptSjgufPUY6U=; b=qHclTivIpi5hOG 432jjLcI5Riil7bNTI2ALKGu+MK+QZ6h28UvWJSrTy+LGY0O+8wpPJV5QZKhsag+g6AiFP5o453tC 2KXnZaA7lwNXMpVzYFARdSJMTRqZoA5zUoJ3xy5YUgzJAyccbC/WbaSRhxhNfrymPIT2ywmS/UWVn x0JefL9GKp7RdEXRF8IplJkDNdOs4lPOon7AX5CqhF3VfYHMHOd6MKYiMwQip0ouJclE5zLaF1n7/ bITZFpicP/F0sGX8CWka5+GR0/hYgjwRFHg3PvmFllkU7N4OwRNRZeh1+wpFG6TWoy6Fw+/XMwXmx qBEk7u2zU2/0m0mXbuzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexcH-00G8YD-7r; Mon, 25 Oct 2021 10:54:09 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexbr-00G8Og-3a for linux-arm-kernel@lists.infradead.org; Mon, 25 Oct 2021 10:53:44 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 7884E580477; Mon, 25 Oct 2021 06:53:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 25 Oct 2021 06:53:42 -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=24kmoyDbYZcI3 nFH0O+DrCAf+oLm5SYIeuUA5wksFuQ=; b=ke3WKIQBySjWDN3KKnVTAzfwLgVNR g7w2gxmedjdspecct7dRIKOfaTqWAMXHbMTGUr8mYTW+hiPllvT9Pj6WMsHcs2Hl q9Q53+Yml6t83Qum3DAsUsO8qZXuh9H5YSnJnpFwf3/ZcjndIThlVJHaMYR0aIiR a4xJiVwqq+RuY/7o2J0yIk4nxKFJioYI/z87i07oFzHlb7RlCDnhAHUhAUNlxinD LfbCxvNLyapAboVBKIMnYRitKnH3eQj13Mac4Y2mDEgit/0EsPkDc80xQhAiLy9i jWvayC6p3+rxUJrK52Vl6NPWp4mUeGqV72y88B3NOswUwoYvynkprgPxw== 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=24kmoyDbYZcI3nFH0O+DrCAf+oLm5SYIeuUA5wksFuQ=; b=XimBK2qT xehIbX/zIfXVa9bzs4aXPHZdDPM4XlFqb5BgMwDdaO8Cm7kgrvIorYagZg6hEp+G T7OisqgzwJQglAoIEymZaElqbVtu+y+BOLY0LYmo2t/dc8wLGydn7Ici7QPu3ZYm pw4qY7d00B4MEGVbc9KsDGrIkfrIFBDMUfy4XnrDrA4mZdNjIPBlun51jQsUcZNn hBLB5q+pCql63X1pFua84uyqr/9UVK8k3Y2GqiiMFz4AAZMjAFesYtXbhKel33kQ suLdHSVcGzl78yQu/Rp5SKJKYoocp0wsV6a1miK3xQLKJ14jZPkBLEtz61XFTdj9 Kg9qmDyqRfoeYQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 06:53:32 -0400 (EDT) From: Alistair Francis To: robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org, broonie@kernel.org Cc: s.hauer@pengutronix.de, rui.zhang@intel.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, amitk@kernel.org, shawnguo@kernel.org, alistair23@gmail.com, devicetree@vger.kernel.org, linux-imx@nxp.com, andreas@kemnade.info, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Alistair Francis Subject: [PATCH v14 2/8] mfd: simple-mfd-i2c: Add a Kconfig name Date: Mon, 25 Oct 2021 20:53:03 +1000 Message-Id: <20211025105309.37942-3-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211025105309.37942-1-alistair@alistair23.me> References: <20211025105309.37942-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211025_035343_368891_FF0C9546 X-CRM114-Status: UNSURE ( 9.06 ) 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 Acked-for-MFD-by: Lee Jones --- 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 Mon Oct 25 10:53:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12581417 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 678ABC433F5 for ; Mon, 25 Oct 2021 10:56: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 34C3560241 for ; Mon, 25 Oct 2021 10:56:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 34C3560241 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=6PxuAjQwYoGE8XmEIZqrRB5uzAqqAhrQ/JRUNGBwb04=; b=l8kLuXg2d8uTHW 3ry2VPHX02ntThrSiYyACfQdZNqdIE6plOL6qAni976rgH7IbSOhp2waVQfBAAmzLd/R4gQmWQHF6 C3ExV3SkbJuyzIY+JM6/wRCQPgbAyMaeMuKqZ0uHrs4CAMp3ASEsbCKVvHecRLIgKnil9mjrJAHvX ymbuU8FXIkXK6x9zrKN+9kZjUtM7GJ4t8EH4DadAcUSa1DwUy09nNwi4Dp6DsBKBaw4u5AJR2T9lU tLUZLpmu0A6hd9oFXGV8MeTha1N4F72k1daajr+RFwCR9vhHbUhzeIuPcOxsSBVsWvIzxonOxYB+b Ny1dWDvgmHnuQv50ICdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexcw-00G8n1-4k; Mon, 25 Oct 2021 10:54:50 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexc2-00G8So-GN for linux-arm-kernel@lists.infradead.org; Mon, 25 Oct 2021 10:53:56 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id C9D1858045A; Mon, 25 Oct 2021 06:53:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 25 Oct 2021 06:53:53 -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=LuBuJ51kAs683 zqagRQH/JKcv0PkL6c6myFxIpkwVuU=; b=ZCxLDnyWr0Pq9l9Mw18+UvpgAw/M6 OX7+WwBKykBmT7M/QH1mdxNy9pu+ZwZxHsDmS5VHmbOoAcdCbyKUTxVw3qKNLq0S usa5ev/O+JZCsJDm3aKfpij8xa3WJgnPNhmvKKXzOpZk7JTn36RZK1f5rRQ1LvCv grTQce5HfjmjGIAbk8HLEyFdO/pQdQ6RrVNZkr2DEwtE5bbjMILJjg2FttxiasYI t/QejmUdclpBOueSISOFhFF6nWExHgGfaiJamFAg79/qSe8oVoH7EoORna2Z4Tyc TTuXtDIe16VwVfCamwRJdMJSbLLVcx87yJnvj/BxtAwmXeUzykBJoFICg== 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=LuBuJ51kAs683zqagRQH/JKcv0PkL6c6myFxIpkwVuU=; b=fugy0bp1 b2e3mPjitpKoZTXVyM3KoeVF/oWhAH07La9tCmNddbnxM2nJG2LTYPC2/GWP5xlI 8bzL8K02ctWebjHh+4cEGATLO8nyO5lqfnb3291vy56iCm3Q/7hmEINtmtWuxi0u 1wjLPEv33fcrOafZRZjT+8TZscRgO+9glGgZWx3rhHDfzpSQSrnzy25xIuQOj/Wq ulKCMgUUxwkN9VvE8ryIfLJx+04u3VKIePqIQOiI1ZTea9WwPTgKcj5pPl4qz0Uw ApwLBXjGViyqSZ6uXdS5mamSkhRGXRagDijb4jaW6loji274eQxfx75acJBy8v04 lsQC/lRNbY7Fag== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeehffejteette ekfffhvdeghfegvedvvdeujeehheefveefudefgeeitdehueejleenucffohhmrghinhep rhgvmhgrrhhkrggslhgvrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 06:53:43 -0400 (EDT) From: Alistair Francis To: robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org, broonie@kernel.org Cc: s.hauer@pengutronix.de, rui.zhang@intel.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, amitk@kernel.org, shawnguo@kernel.org, alistair23@gmail.com, devicetree@vger.kernel.org, linux-imx@nxp.com, andreas@kemnade.info, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Alistair Francis Subject: [PATCH v14 3/8] mfd: simple-mfd-i2c: Enable support for the silergy, sy7636a Date: Mon, 25 Oct 2021 20:53:04 +1000 Message-Id: <20211025105309.37942-4-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211025105309.37942-1-alistair@alistair23.me> References: <20211025105309.37942-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211025_035354_653853_6B3D6BD9 X-CRM114-Status: GOOD ( 12.89 ) 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 | 11 +++++++++++ include/linux/mfd/sy7636a.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 47 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..f4c8fc3ee463 100644 --- a/drivers/mfd/simple-mfd-i2c.c +++ b/drivers/mfd/simple-mfd-i2c.c @@ -62,8 +62,19 @@ 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", }, +}; + +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..2797c22dabc2 --- /dev/null +++ b/include/linux/mfd/sy7636a.h @@ -0,0 +1,36 @@ +/* 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 + +#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 Mon Oct 25 10:53:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12581419 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 60432C433FE for ; Mon, 25 Oct 2021 10:56:45 +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 190D660241 for ; Mon, 25 Oct 2021 10:56:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 190D660241 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=i/Dq+HLg9ES+8eLsoICiu0iNzAJE+u/HkJYHTCG8ywk=; b=EsCcYf+h2eW3y3 axv0DnSXjuKJ2cDR1AFZwW8nuKLDNl6lY9zSjsuhh8lgUM16OECFdENNwkZ3x+lsUU045O/IY6u2/ 7N4cti2ULp/kWKIAR0GIvcZAixlWYO0HkHzfXO8WapY2oJrbrnvhqdjFKQ5AmfgX5JwrxQBxsVv8s EEN7BjcWU9+k583zNgcwbLI8ME0jxbI5UTbIHRjJfmKkGiMeQT96u7Sd7ho5b5RM+kFooRhXNLuw3 O36PX5MkZQGNhXwFTAxeGMwXaNkfVIwrt4xg/syAX9KDy+cTmw4nN4f9o+dMv/UaXa4TurQKia9Vr yVuuvuRv4at39OeOcIsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexdL-00G90K-KF; Mon, 25 Oct 2021 10:55:16 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexcB-00G8Wi-JL for linux-arm-kernel@lists.infradead.org; Mon, 25 Oct 2021 10:54:05 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id D693F58045A; Mon, 25 Oct 2021 06:54:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 25 Oct 2021 06:54:02 -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=qE6SMYoRQzVad KkaxPJOujbvaC++jF3gyfOey8v1upo=; b=Hoev4zvS9ET4XlsAfsLElP3S1h8/A pnK2HRnC0V7y60HoURLkek+NIkyjiCgyqLQPvrnCYevEzDn5bag2IiGsGtaCBFIO FUVDBWt1bvVTgSXOPSo37mFJ/MxbIGnbdSwkeAnjlb83R1QAj2H0nCAa4l+Nc4xF 7rQ92ugfNkePmnDi5eK5MisMhTaCh2c/0FTV5kGY96x+g+N7I8j2s8zkni8wX4EH Goq5+PezE2j24hoBXTT10DA1hULEA4BaNBxGj/DDq+H0RZrgqAk64+WycyvAVyAh kS2dPbwRgZdCHCvHqP1VAnABz6M1GGuMgXZtj3lDRTude8YtyUxoQ7xvQ== 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=qE6SMYoRQzVadKkaxPJOujbvaC++jF3gyfOey8v1upo=; b=kYznf7/6 TY/wCgYmnnRYUE417/4eqa6irsHlBEka7VUGHAaoU2fcpkeotmx25dQi84qQw+/6 JPKKtJVt1v5x1REhN4+19o3tG+cV2AX4iu/OMtqpseXilCQJuKlJtmcBj5rWkFiX ByIPXJ43nExftd/437UarJfNZmHoyuhv/7sM2RoNp/0rM/mnTGVYusIy5zpwJPgY 7yQrbU/b4hQ2tcRa06rX0Gv+sNa9vpExzyeUHfol3iyhLrKPDiDZxac8+WL8TWby QyyX/zc8BaklQxyjoowV64eGF9t4yt9o9p5O5+K8Sla1uKD+m+IUL75SbYtceBKZ bB2WfQbIoR5SiA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 06:53:54 -0400 (EDT) From: Alistair Francis To: robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org, broonie@kernel.org Cc: s.hauer@pengutronix.de, rui.zhang@intel.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, amitk@kernel.org, shawnguo@kernel.org, alistair23@gmail.com, devicetree@vger.kernel.org, linux-imx@nxp.com, andreas@kemnade.info, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Alistair Francis Subject: [PATCH v14 4/8] regulator: sy7636a: Remove requirement on sy7636a mfd Date: Mon, 25 Oct 2021 20:53:05 +1000 Message-Id: <20211025105309.37942-5-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211025105309.37942-1-alistair@alistair23.me> References: <20211025105309.37942-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211025_035403_747580_15645ECC X-CRM114-Status: GOOD ( 11.92 ) 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 | 9 ++++++--- 2 files changed, 6 insertions(+), 4 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..29fc27c2cda0 100644 --- a/drivers/regulator/sy7636a-regulator.c +++ b/drivers/regulator/sy7636a-regulator.c @@ -7,11 +7,14 @@ // Authors: Lars Ivar Miljeteig // Alistair Francis +#include +#include +#include #include #include +#include +#include #include -#include -#include struct sy7636a_data { struct regmap *regmap; @@ -70,7 +73,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 Mon Oct 25 10:53:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12581421 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 4F180C433EF for ; Mon, 25 Oct 2021 10:57:18 +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 0AE4B60273 for ; Mon, 25 Oct 2021 10:57:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0AE4B60273 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=KBGjhxCSLhc4hnTXXS45Kn0kQvlcmP+EI+eBh9PHMlo=; b=PFrCGZ7GK31djO F9B3keEXJA3PcAeBHPgNihGiOO46Thxhid7dAXBComChpuirSuBgp6uxBAyDL4TlRm88JqDAsVlva SLjzV/2mYoqZCCm1XGVLXr65zQxxbq1beQq2PW6H8tNxkDDyJ8RploGVxhlOA3DN1fAcq1aFS/wBW CW4r8npC+10sjOQmMSVX2rUQRCFahC4sI2em9ad3V42MdKpugC0sWKV2p1P589EYOCDPl9O+r2Ocs EVGmBW8tZ9rKGi1GgznrNzI9cTjlgEGV6L/MIwoOiINoHlsneKseUA8EP1FYu1LNtNw5vyEIOUpkG V2uduH/msrj+b/pxecYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexdj-00G9Cn-TM; Mon, 25 Oct 2021 10:55:40 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexcL-00G8at-L6 for linux-arm-kernel@lists.infradead.org; Mon, 25 Oct 2021 10:54:15 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 040A258045A; Mon, 25 Oct 2021 06:54:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 25 Oct 2021 06:54:13 -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=26mmE8gPTzxJk 4F657DbPbd4Vbe1ZwN4n5cX/C8l/bM=; b=mfaRE/Clbv5eQCOrq1oDd09LeSjMq eTNWy+r3epmcLze4BhIKE9mHyfC90KqY4rGOwftPuYf2iiqt+1IYCjTFuOYHGe70 WSCeQj7NLdhtt/5C2V1L0GFpOIVQ8yoU3TGHmnCe73hutjf5LYwXmWkAioiqPTl2 Dx3j2HDNyt9sDb2ch1gzuiuT1V/NwQXuSJ+2FHSqDDh9zj0/Z61M1dAXs0eNlNS6 OWSHAso5oONmwWSSwKQwJRzt2WjmPcLkIgV4rCdwkLmYHa7OKTNF9UpD/qh9Wp44 50DeETqkiFUBIPRhj97yX2H9D9ID3QMkTsTQ+XfqlWi86wsaiP7SitvGQ== 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=26mmE8gPTzxJk4F657DbPbd4Vbe1ZwN4n5cX/C8l/bM=; b=geYmhNEe UcMQgn+6jaRjqcf0b5jGxgVwCZhEtZnAURAmiw2iRh+v/Zgrz1kFcQgvnrTJTIZn 6ifP4untr/JVbdLiXInw6DtL3WsjhSJrKJhMIqA86QtgLmPaZYs9zo5tifpsA4gs AxCfjfH85IJTPYHup9Bcw+wyMs+U7W98w8/iQM9r88z8Wu823rvet84WKUDgKylJ 1V2CT465zMMqQecEdnWTwJv8qIDAYE0KZUCMjEjxWfTNVUA/8DZmr+yIB9eRLL7C wYaal4KhzPOxKmInEAbyvLprFrFnV0u0YxSBtuk/2QWbKTIpb7hl+H+rp5Fkw8C1 xopBd1K8iAFj9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeehffejteette ekfffhvdeghfegvedvvdeujeehheefveefudefgeeitdehueejleenucffohhmrghinhep rhgvmhgrrhhkrggslhgvrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 06:54:03 -0400 (EDT) From: Alistair Francis To: robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org, broonie@kernel.org Cc: s.hauer@pengutronix.de, rui.zhang@intel.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, amitk@kernel.org, shawnguo@kernel.org, alistair23@gmail.com, devicetree@vger.kernel.org, linux-imx@nxp.com, andreas@kemnade.info, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Alistair Francis Subject: [PATCH v14 5/8] hwmon: sy7636a: Add temperature driver for sy7636a Date: Mon, 25 Oct 2021 20:53:06 +1000 Message-Id: <20211025105309.37942-6-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211025105309.37942-1-alistair@alistair23.me> References: <20211025105309.37942-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211025_035413_803890_1B32CE49 X-CRM114-Status: GOOD ( 18.67 ) 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 | 114 ++++++++++++++++++++++++++ 4 files changed, 148 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..1727a5f2a2ea --- /dev/null +++ b/drivers/hwmon/sy7636a-hwmon.c @@ -0,0 +1,114 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Functions to access SY3686A power management chip temperature + * + * Copyright (C) 2021 reMarkable AS - http://www.remarkable.com/ + * + * Authors: Lars Ivar Miljeteig + * Alistair Francis + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +struct sy7636a_data { + struct regmap *regmap; + struct regulator *regulator; +}; + +static int sy7636a_read(struct device *dev, enum hwmon_sensor_types type, + u32 attr, int channel, long *temp) +{ + struct sy7636a_data *data = dev_get_drvdata(dev); + int ret, reg_val; + + ret = regulator_enable(data->regulator); + if (ret) + return ret; + + ret = regmap_read(data->regmap, + SY7636A_REG_TERMISTOR_READOUT, ®_val); + if (ret) + return ret; + + *temp = reg_val * 1000; + + return 0; +} + +static umode_t sy7636a_is_visible(const void *data, + enum hwmon_sensor_types type, + u32 attr, int channel) +{ + if (type != hwmon_temp) + return 0; + + if (attr != hwmon_temp_input) + return 0; + + return 0444; +} + +static const struct hwmon_ops sy7636a_hwmon_ops = { + .is_visible = sy7636a_is_visible, + .read = sy7636a_read, +}; + +static const struct hwmon_channel_info *sy7636a_info[] = { + HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), + HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT), + NULL +}; + +static const struct hwmon_chip_info sy7636a_chip_info = { + .ops = &sy7636a_hwmon_ops, + .info = sy7636a_info, +}; + +static int sy7636a_sensor_probe(struct platform_device *pdev) +{ + struct regmap *regmap = dev_get_regmap(pdev->dev.parent, NULL); + struct sy7636a_data *data; + struct device *hwmon_dev; + int err; + + if (!regmap) + return -EPROBE_DEFER; + + data = devm_kzalloc(&pdev->dev, sizeof(struct sy7636a_data), GFP_KERNEL); + if (!data) { + return -ENOMEM; + } + + data->regmap = regmap; + data->regulator = devm_regulator_get(&pdev->dev, "vcom"); + + hwmon_dev = devm_hwmon_device_register_with_info(&pdev->dev, + "sy7636a_temperature", regmap, &sy7636a_chip_info, NULL); + + 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 Mon Oct 25 10:53:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12581423 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 6EB43C433F5 for ; Mon, 25 Oct 2021 10:57:51 +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 37D4D60F46 for ; Mon, 25 Oct 2021 10:57:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 37D4D60F46 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=rTX4fW5U5bbdRVutWOHQMku9zKVFmP50q5iFXS7vTMk=; b=DJVbms8y/AQIjF M6r5Eu03Isc61ajMK2DQyKpEERZsFSNhEukq7jfN7URh7qy+N1hPQ46vL9eVNaw5xMVFX1bQO5bcX zHOfVwcq8tj/wVzCXpzc1da0Q7nxbOPwzDWxPc1MY6fBi6imeeFdto/u+pvFg4Lo4DqN6PhoHWp0b Agk/M0DxEA25lkyJ4541PT5M+rmljDG3bT+5zudClCwQyOm3WRjBeb0D1wyGZA24WuZbEkQxg/3Kj WWjMgI8afAANo1cCQtREXDfkxAWk//HltnAz/P7Dai4HnTMNrHTZMadCQLEUyQhsQWEkI+B274e79 z52U2GSUjokSEmbYBshw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexeB-00G9Q2-LE; Mon, 25 Oct 2021 10:56:08 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexcS-00G8dd-Nn for linux-arm-kernel@lists.infradead.org; Mon, 25 Oct 2021 10:54:22 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 126C158052B; Mon, 25 Oct 2021 06:54:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 25 Oct 2021 06:54:20 -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=9BJcSEnAQZ1JM Eh8K5qz9X3NSWkhPJwu0Qc49e7vu9I=; b=tSFm2b+nHqdU8/ZTylrrgx+150P4P bNF4JUuWWENp4UPFAwG/G+WNHMkg5QMSAuK+pmG/lsTsaJ5PJEqRzT7UZD7TSxpX dlmlCv7c9xDKQJBrRs/zRTSlwqcKJu7nA9md2A22LnN0RaBqq5s8yZeogTg6a+6t NydYmqPiW21a9uUP/DA+YSj7A+tWB57tqh4ssin+kkGm4crQZRTJ1hSLAsy0n5+b Ppu31F8wh7IOqDqhi2GqBZTsnCOZ5d7UIJ0ZQR8irVV1clFZPOQ+2xrcvrZmc/vR OfXEpGlhMC6MnaKrd2nnt0grorEt6KpkeX6NtkqqiUXuuwAPzf3KCMW0A== 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=9BJcSEnAQZ1JMEh8K5qz9X3NSWkhPJwu0Qc49e7vu9I=; b=mf5WIpwE 8PhijkI8VY66A6c4wWyBPnCMCUsoWZ+01BU5Z9E+dImi3gXxCr2mSlI9T712klI2 2kuQbOIJ8AdgD5WdvPQispcd/eiQm0z0kgVO4IrJwsHlo/xe59oFUJ4ZhJlgxsz0 Z+px2+3BV/3OBftqdZbvVo/AbdwAD8pIJeQZoDpow7D36M8lkJVLdogR3nf0xvzG fyf0Ovnh7oI7UWanj9S7Y1izXOcNAc3MdqcwQ8EpCvWwMkUxscoH9iOyv74wF+lU kPg4LGNbkR8oe55GlZmK1aBN7Y4ZSwX5aBl90z5neBG8PjkuyUB5PSPYVWnp20RV FFq5dK5w7CWBjQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 06:54:13 -0400 (EDT) From: Alistair Francis To: robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org, broonie@kernel.org Cc: s.hauer@pengutronix.de, rui.zhang@intel.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, amitk@kernel.org, shawnguo@kernel.org, alistair23@gmail.com, devicetree@vger.kernel.org, linux-imx@nxp.com, andreas@kemnade.info, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Alistair Francis Subject: [PATCH v14 6/8] ARM: imx_v6_v7_defconfig: Enable silergy,sy7636a Date: Mon, 25 Oct 2021 20:53:07 +1000 Message-Id: <20211025105309.37942-7-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211025105309.37942-1-alistair@alistair23.me> References: <20211025105309.37942-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211025_035420_924051_0474CC75 X-CRM114-Status: UNSURE ( 6.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 Enable the silergy,sy7636a and silergy,sy7636a-regulator for the reMarkable2. Signed-off-by: Alistair Francis --- arch/arm/configs/imx_v6_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 5e4128dadd8d..a0b7528d7378 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -228,6 +228,7 @@ 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 @@ -244,6 +245,7 @@ CONFIG_MFD_DA9063=y CONFIG_MFD_MC13XXX_SPI=y CONFIG_MFD_MC13XXX_I2C=y CONFIG_MFD_RN5T618=y +CONFIG_MFD_SIMPLE_MFD_I2C=y CONFIG_MFD_STMPE=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y @@ -257,6 +259,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 Mon Oct 25 10:53:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12581471 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 C7C6CC433EF for ; Mon, 25 Oct 2021 10:58:21 +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 906046054F for ; Mon, 25 Oct 2021 10:58:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 906046054F 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=l7YxOe1O9Dxaon 0dUQ60giGulvjI4pOlvpfos0GZrwowq0nia6kqNx9cfTLO+V0K9LJpoXbKuLOMxKZIWk6YYYQVt5a hnFQHJU05RuDmZcvTWhCD0rP0YmetDlUos/a1eqSvGWW9wD6cdLftvTI8rUa/qQZa+vO0sc/tnSGu evNyPk9pEOR2AqytEpfp1nGDNgmEfG6Ij2odYp+dRVeEj2AG+/4LSNxSzfYMr+l6Mh07cBOVHUaS0 BrWBpZHEhUUt9ywE+KP6jFP6z5l3xASl0/KLyrD/1upczNQi1+WGL8rvT3qIPXEf1+AFVjAMotkb6 W+yT2knyzac3QPlzZffA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexek-00G9fS-4o; Mon, 25 Oct 2021 10:56:42 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexcb-00G8hA-LH for linux-arm-kernel@lists.infradead.org; Mon, 25 Oct 2021 10:54:31 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id EBC5B58052B; Mon, 25 Oct 2021 06:54:28 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 25 Oct 2021 06:54:28 -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=B9RUgkzMkLn4rCLMAv+ZnQ7sIPOAE l9P3lw4VSJqlIwCaadlYLpKQYPtJ7TthgY30zoPu1QpEo5uxuqasIyvbbbucdpxE TqcROz8xTT6gxrPMJ88Ywb5uAXURlX46kb8lnyuWhgwFBaIMc626OssrlaHduZPz NJTpEhK7Xsr8LVFB7vV2i4FWEF6pyZoiBv4Z7Raq6bAP//XTOhPSjgYJLNFJBSmg O6O7FRufHGISlQiL2GSr3TqMsp9ysX1coF1cOFbBVl2R+iBuG8QqTUZau6vs9dmY WsId9O2k8x85Ez2B2EpLXErYviytaZ3aETQp0BG9Ecrcew30rquZBBvcg== 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=icaaKrvE VIW4jlwvE+NTDaViHcESPEvwprQkLV7zFNakg3u7XxlWF3LYeNya2rB8AP2rOPKM /0JjGpfiFqIhSwBJE+afdv2PH7jetISLn9biarIZvxMxwpgSUzvRlAV+TTX2h+/k QU3BgDQyRESvEcGJoVh6TxrXYd1ZnA60+AbhL7ohdbxHN689eyQCxRZwQDn6dCV1 LLb9g8G0qxICOVabSu3BZLdthO3XqXu2fqS9oZAh2mQhsqmkPbCdbSnerpQX0tdc aQ9d4XkUbvjYahaWAtWQRxtt1SFHgTUst2j0EsTsP0F6lfEZYcpRuLiSVrUkP/W7 IhCuk5iVOBgLGA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 06:54:20 -0400 (EDT) From: Alistair Francis To: robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org, broonie@kernel.org Cc: s.hauer@pengutronix.de, rui.zhang@intel.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, amitk@kernel.org, shawnguo@kernel.org, alistair23@gmail.com, devicetree@vger.kernel.org, linux-imx@nxp.com, andreas@kemnade.info, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Alistair Francis Subject: [PATCH v14 7/8] ARM: dts: imx7d: remarkable2: Enable silergy,sy7636a Date: Mon, 25 Oct 2021 20:53:08 +1000 Message-Id: <20211025105309.37942-8-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211025105309.37942-1-alistair@alistair23.me> References: <20211025105309.37942-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211025_035429_809140_C766B10A 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 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 Mon Oct 25 10:53:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12581473 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 798F5C433EF for ; Mon, 25 Oct 2021 10:59:20 +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 48D44604AC for ; Mon, 25 Oct 2021 10:59:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 48D44604AC 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=4byyXmXv3twJqi buzXAV8Ea21u6Ru3KCVFGdtVgnH71ELB9vyYIwTTnSblL02LWyHmASuXmikJi2JwX6IeGIumV1y/G IJSaxkg1epyNtdmzepXWFXaHoI5loij0+k7I3jo+SI/OQM9e8cN/4OfBt5Kvlka3OlCnYQtn3PjsK WT/F8dsJUliKKjjGHfjhr5g8ZEJGuvvFj1rqG2qmxGHuzZuPsFID4wdHKzMIRhFVmgvkIYOmuzvaR 4s8wE5XomExmHbgrV1V4fO7x/4Tgfqq6D42KfG2jA+FBvuBhWmId9cteHg4gI/nRaH2u4sm91FZlL MyeEAy7zZHJ0BZflelGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexfR-00GA27-OW; Mon, 25 Oct 2021 10:57:26 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mexcm-00G8kU-DW for linux-arm-kernel@lists.infradead.org; Mon, 25 Oct 2021 10:54:42 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id A271658052B; Mon, 25 Oct 2021 06:54:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 25 Oct 2021 06:54: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=2aOAXpeIPQR2x ghpp4OMQNId//edXUxPmx/LpQURmRg=; b=pZqD4+hi3r5C4z32xOCV/LV6iuzW0 5EkwSdxAjOffReaHSG6NkJqzNfL0NnJ/8HvvNmhjtsPuOMENApFhY5hgJ9iConUP mrbi3D2puYBScNKZDQs2Dl7CznXcNI/ZUF5jH4dWxpbCjWv/4uW9l4IZR3wM+r70 GsFWORLirDfQDEjy6H5bgd0Oekfr/TuHDfl3ZrqhtKbI7FrNlw8BiEvrR7jDsYiI FIZumTe5nlIwPL1ne6jlnjZhjjq0yAt56PACriDxm5YoPv6c6Xa1gyiRawOjzXDv 4Pidz/RuAUO8G18qX1mAxpX27ZJMpWbNR4BbcT5/ZYRxEB7bf7LNIQrDw== 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=D7h8Eqln LEwsr+YpBPdsOx+5GaFMFm/4R8ou7D5TNPtGn7R4AfpPLDUsJA0ewEXPEakkeuIr fx71waQuyhtlTq8Abaa5hI9Da6/hz9vYMgs6M8FkV4TPDYwmbe2VRIf0CQajNEsp rKwz9d/p423YMoTX4M8e16tAgylm2BcgRM3IPIodQXsfSaQdvDW/r4ElVOOwn0Wu AzJVhK95aEi21/H+5Dt9CRqphByjwiEnW2uo3+XQt4LFyy12bpoOq7z9D2OYNcUr o7XX6RMCXjZkicf9W6cHqzoTd+KgmC4Rmm/hyI8Akq3gn3X2r1yOTsbEMEqZkgoQ vpDGQNhcx6YZ8g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeggedtteejke eggeeugfehueevudegvdetjeeviedugedvtdekffekhedtteduhfenucevlhhushhtvghr ufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlih hsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 06:54:29 -0400 (EDT) From: Alistair Francis To: robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org, broonie@kernel.org Cc: s.hauer@pengutronix.de, rui.zhang@intel.com, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, amitk@kernel.org, shawnguo@kernel.org, alistair23@gmail.com, devicetree@vger.kernel.org, linux-imx@nxp.com, andreas@kemnade.info, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Alistair Francis Subject: [PATCH v14 8/8] ARM: dts: imx7d: remarkable2: Enable lcdif Date: Mon, 25 Oct 2021 20:53:09 +1000 Message-Id: <20211025105309.37942-9-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211025105309.37942-1-alistair@alistair23.me> References: <20211025105309.37942-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211025_035440_593285_383823C1 X-CRM114-Status: UNSURE ( 7.94 ) 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