From patchwork Thu Dec 16 12:25:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12696460 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4970BC433EF for ; Thu, 16 Dec 2021 12:53:08 +0000 (UTC) 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=nhTxwGjpXIzrmAq2sOIbwo8M2mEJ7St6N9FUUG+0M1w=; b=x9yw9GQsgKv05g HB9QIobgyMEUanVbLb3Bs7DFk/nh1SaUXaKmqQC5iHnDjaqwLHFX/UDn64PF0CJEt55k+pO18e1Fd hdkL9Gz/ebkG5xEJPpgs11uHhDC8wiRxN4iXvh1eZSKmFJEFb43KnHcXyb8//RHpeRYABw0ZcoA02 HcXo1/l2va9lCc5oi9ndvqbuj20ab9nZqUByQND2P2FEzFCzoDjb1tc9GMRFqw+CRzF7Ic+OtTNLC OCBIZfKCQ2HK0fD1sSMWA+80lSGGQnfIZHXZRELmFsk0a7PZT0esaydE521hPGqpgw9IxWdwiVH6F JRzJiAYhywuKWcTiNZZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxqEE-005Xnq-0s; Thu, 16 Dec 2021 12:51: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 1mxppP-005PzN-9z for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 12:25:45 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 90AD55805FA; Thu, 16 Dec 2021 07:25:42 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 16 Dec 2021 07:25:42 -0500 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=dIamJe71dG+Zo x+zSJ91KvmhrQ+mqndeaCChM+4h6+0=; b=IH/Xa6a9z8IuMsSVSFtfKSSjcE2g1 fu0qGIIxWw0WuBwZQe+RkXz+D6kV8BhAOYwnkTW/dNjKV8HjzlF3//V6EreR1Xsk 6Rf2QfEbmMx+2wSy7hPcm81xZ7Dc/9crSADkK+QzUj4GF96x+gEtfVX9vgRVthhY 4LiRkSNYdrtxWJDAx8z0DHWC8mM5/Ze3j4kvA29e/4egn7sOol5QeNHWT2xKSVfb ftRaHYNjWZqD+xoTah0HCcrBsNnon91cJSq3UmS0qGJksaOiy4rDmEVj19WquEqp YsZoltTQQQy5TCkpF+n7Xeu89sVnlJppYAFC/ASBwGCgBnWjeWnOGBDjA== 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=dIamJe71dG+Zox+zSJ91KvmhrQ+mqndeaCChM+4h6+0=; b=nRElCAnP JmWDUmZRcoUHMOPy9f5LA7tGM9ym2LyUTtapkMWkymB4KHuFqY4UovfptowO4LIO wg7dIvgYjkoxn2Vu8ULwxD1B+xEez+Cor9exEECo5ITeLQsuKoxvK3XuuUIyLheu d8JCQ/y/O4JCewblFVreV3H25Uju7oWs0+4nWlcUumkLE/NXn2QTG/GDvfvbiKAo uV9/+BH1Bu+LpgS20X1KHJoPsQwTdjW7lMvU8x8uHLryqqM2ZecTczpgbneeXGke wa5dgclorg1U1n9ATvEp/fyjzo5msxfYbPvYoOqeEsoPeat1zoF8UUe1ZlLzl5d3 MGQab/RAPs6+jw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrleeggdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomheptehlihhsthgr ihhrucfhrhgrnhgtihhsuceorghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgvqe enucggtffrrghtthgvrhhnpefftdfhgfeggfelgfekjefhkeeigfelleefhfethfehfeet leeggeeggfefffdvtdenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Dec 2021 07:25:36 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org, lee.jones@linaro.org, broonie@kernel.org Cc: linux-imx@nxp.com, devicetree@vger.kernel.org, s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, linux-hwmon@vger.kernel.org, alistair23@gmail.com, amitk@kernel.org, shawnguo@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com, Alistair Francis , Rob Herring Subject: [PATCH v17 1/8] dt-bindings: mfd: Initial commit of silergy, sy7636a.yaml Date: Thu, 16 Dec 2021 22:25:18 +1000 Message-Id: <20211216122525.136139-2-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211216122525.136139-1-alistair@alistair23.me> References: <20211216122525.136139-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_042543_463650_535C8C58 X-CRM114-Status: GOOD ( 10.80 ) 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 | 82 +++++++++++++++++++ 1 file changed, 82 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..6de74c701635 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml @@ -0,0 +1,82 @@ +# 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# + description: + The regulator for the compenstation voltage. Enabling/disabling this + enables/disables the entire device. + 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 Thu Dec 16 12:25:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12696461 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 99FA2C433EF for ; Thu, 16 Dec 2021 12:54:15 +0000 (UTC) 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=wgvt0tXZKi+CwZ6mcyYjSDLP8Y0b019yx8MWzlB3Wxo=; b=133UVToSPmHaUk QNVTBe8i48GxQg8NiMKxkYO8EbodI0Qyn1Ln3M1SwexN3C1omh4G5hi2WgZS9opdXGXm1HMaiMGFr X5avfJ61hHIIFff5qL4rUvey/GJEV9hHcJphyeq1ZUTC0PzDt3KTigB/dM0Ftc/pmPB8sXWONbFV/ HOX0KzyTqFu5XgHRQ+qUhkGTki7xVzT14OSumNJmDJEUO3mWe5pdjPN2Mx+T71leX+8nRn1MovzCJ hvGQ/TkUkK/TEuEKtF20AVAMne5MBpIJFSsFl2TYSeg4ABWI9Kys7VIYkWjNB5xTBMV3PlRpvMmaM g9vTh98oC6mAWBUtZ/wA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxqFS-005YBd-Cd; Thu, 16 Dec 2021 12:52:40 +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 1mxppV-005Q1T-Eu for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 12:25:50 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id C82505805C9; Thu, 16 Dec 2021 07:25:48 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 16 Dec 2021 07:25:48 -0500 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=mo4lDbGJIutF/ EfV6ESK2Jau5DqaSfJJnyr+9T7QDB0=; b=DPRr2mIEGraDdvHaP53C5c7dnC6tp h6WN41XUue4Kw/HLiNSMmKGvCWSMR/vBnN0oN1tJEyFbqG+25d/bWEMuP/i+ePBw XUINPdpWlGXZw4KekOMZAaBNymDWibV1K80TNHTdcVTgotzzLvKbWYq9SED9LzwM n7eXSLBT/mD2IdtintGyXft0Qi6wUV8fvmmTqmQZarEgHCXqlYHQTblqM20E0bmh C0a0tO15OCp4S6646Q0okc39kyPiDIqmcOGEZaqZvl7Iq2EHQsDljmj4BtRcawhc 50I+iJ4QSmhyQj9aMS+xwcEwDrzY2rLujPkMYdzrBctCq3fx/Au/Es9PQ== 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=mo4lDbGJIutF/EfV6ESK2Jau5DqaSfJJnyr+9T7QDB0=; b=cVbjrnCt kf8t3duB2D32OuiWddoai+r05zCXR0p6Sq5H4M17nGjLylymQ8zk6BwOxz2sfOkW NOzQk31P0HOWvaed5DIz+mfjzPvKZ6Z9t8xqLXkZai5V1d6WYt1P15MrCj7/1tKI OhbGIRMjysbdQTE9r10ZvveROXYpMfZ9WYaAWbpsvZei4sXAuTSOIeW7oe6RlLB5 L5jkFXT2T7MNjyMZSYr8lEvD4ILa/D6Rde8WWib47Yh8+0Ui7MK5msCWUnCOf0uv SekQYekEmdVycufAd60f+Nn78P86VjImxYUvKWK0catYuZjjR9IYDWRVAvbiQYXK j9woyUALJ6Ox/A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrleeggdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Dec 2021 07:25:42 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org, lee.jones@linaro.org, broonie@kernel.org Cc: linux-imx@nxp.com, devicetree@vger.kernel.org, s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, linux-hwmon@vger.kernel.org, alistair23@gmail.com, amitk@kernel.org, shawnguo@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com, Alistair Francis Subject: [PATCH v17 2/8] mfd: simple-mfd-i2c: Add a Kconfig name Date: Thu, 16 Dec 2021 22:25:19 +1000 Message-Id: <20211216122525.136139-3-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211216122525.136139-1-alistair@alistair23.me> References: <20211216122525.136139-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_042549_623761_5A24EF05 X-CRM114-Status: UNSURE ( 8.84 ) 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 3fb480818599..97976ea83fdf 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1194,7 +1194,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 MFD_CORE select REGMAP_I2C From patchwork Thu Dec 16 12:25:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12696462 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B1E81C433EF for ; Thu, 16 Dec 2021 12:55:22 +0000 (UTC) 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=rB6ccvs6A+DDokyhi/HoCh1UUitCHvR6q6Sb8cB53H8=; b=RUnhSAJocYk8u+ vCGvc4/NpEZvEw1w60kmgEbcPB/QUmvsmrFne6g2GCRvi3ib8fG7lm8x7tQ/1gXTv4oyR+eADpUBk H10+I5It1ipj1o0/qGtIZvNZX+WptRaHUIJmAak29i0ec1t3zq9Rsj5peadKLMe4Z9ATjKacn2y7d q/HIUpMzTglETSoVmvZcHWUAodz3PxWbZnACGQcAZ+j/9vxktRMZ2rq848Zxz384i5lEqr34/9Jhe +o8zL3yQV33dRQZF6r+bV3GRtT5qrMdCU0NjvjaGfn20CNSBf0oD/t9xe9kr+R4wJq30r/+9AN0Bh zBFejj/knZVEIGxpHbyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxqGN-005YTO-80; Thu, 16 Dec 2021 12:53:36 +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 1mxppb-005Q3b-MF for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 12:25:57 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 0BA575805C9; Thu, 16 Dec 2021 07:25:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 16 Dec 2021 07:25:55 -0500 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=iCdKz1fAS9RSq r6MdMDps0wFHMwgQu8juRHJqY1g5io=; b=GChqi+D8cj4gCtS9IhMGdER0Zo9Kp 3kCnbrN4osG7pFZzDsXzqhaY971aXRRCMl/vYHiZ6rQiwg/HMu18eKFWBXSlJP3g r9nHvdkPq8BzzCIuXHeSSCzLLR/u6ZsdjhEtFWMm+SZls7QbcubbOFrw5HLYeJOL GN3xJWNQgaLxaG317tTaM2d6D7vunPbkuoROGmBt3DrOcI1g98RM9egtOzOYcoFL FKcl9QSVWl3ABgXyKSDr9eueilLld7Y122iZenlgO83Cx9T+6Rc4gG01v4LPWu5L Fi+1vOz4XkVA3DT71fhCDdz4SnNoF4xnaEInQ09hBselts5VLMmNgSvnw== 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=iCdKz1fAS9RSqr6MdMDps0wFHMwgQu8juRHJqY1g5io=; b=VS9mYzdG glPWYoGDjXw91bOZe+zh3xvXJGYaW1OwjSwFHEzBCb+DjH+uv2RuiBfBnHDT9nxu LdIyEZ2kWMek6yQXgjKTd3UZsRymywB7MRcf+3OJlmFEjOv+EkHpJwUY0yS4jMmP QAiq4wdQy0hFCUXRhz6C4bOYKReARdsozwfb78fp/EWNqwTegORJV2eSVmoP+8Ia 3jT2mslW4MCGpM65dRkL1jCImiW+MZr+mRUbRmk5DPpqFkUWj8S5nuFABqpkw339 Z453VaFfk5OoItF8PyIkZsfUaKy7s0rG9F4gXTBpQt9K/jF1YMDewjPlKCRBqEdz LLo9Jl1OvMDLKA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrleeggdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepheffjeetteetke ffhfdvgefhgeevvddvueejheehfeevfedufeegiedtheeujeelnecuffhomhgrihhnpehr vghmrghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Dec 2021 07:25:49 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org, lee.jones@linaro.org, broonie@kernel.org Cc: linux-imx@nxp.com, devicetree@vger.kernel.org, s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, linux-hwmon@vger.kernel.org, alistair23@gmail.com, amitk@kernel.org, shawnguo@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com, Alistair Francis Subject: [PATCH v17 3/8] mfd: simple-mfd-i2c: Enable support for the silergy, sy7636a Date: Thu, 16 Dec 2021 22:25:20 +1000 Message-Id: <20211216122525.136139-4-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211216122525.136139-1-alistair@alistair23.me> References: <20211216122525.136139-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_042555_848550_0BE07B98 X-CRM114-Status: GOOD ( 13.45 ) 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 | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 45 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..22f03b2f851e --- /dev/null +++ b/include/linux/mfd/sy7636a.h @@ -0,0 +1,34 @@ +/* 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 +/* It is set if a gpio is used to control the regulator */ +#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_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 Thu Dec 16 12:25:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12696463 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E5EBAC4332F for ; Thu, 16 Dec 2021 12:56:23 +0000 (UTC) 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=BXLaplGrHmLU3HVvlCgNkpW1cHBMDQ5T1ltPdHuH3dw=; b=YOISn7nYAL1Rtm Wxypi/d9xbZIwQYeXqGnaGv2LY2ik2U1Vvi7Yhen5l7LTVlAOH5zCq3jtbpY1EqhJwy7lYpdcrpje qel9wNIaEuA62UA//rs7PcTjfwDxvSguFRhx8qtxMrulu8q2kQ5Qo3kGtz6u8g3ONZXw5FvpFgyPK rHUf0V6Pec/YhaCIlFFNY266Ixz2CzYEP/KHhWFlbaRA0vm0oiwVEko9yug5AdB78ipJOIUQj54Bi sJv3FOfn2jTj4GznoqPdFm584oogJImwBu+bupINtSr/JmEJtsKFlo+5b4b3l7LQlHaDg+eST9/wI uJUtJZFWHSoxh7KW0Vbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxqHH-005YlJ-Em; Thu, 16 Dec 2021 12:54:32 +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 1mxppi-005Q5l-1Y for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 12:26:03 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 4AC925805C9; Thu, 16 Dec 2021 07:26:01 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 16 Dec 2021 07:26:01 -0500 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=gp4qntKo27gpb 4ncTJpcYD5+aSMDhGRkVYBCdPvwrYs=; b=ni/FssW9YPh/WaRsu6P9ocZhTsSNk im0s+qe3g6tQ3u2/ejXE5H/juFXEAb0N8jBdJbRtt5gS+NhvRnKneoL4jSH/5L59 lob/CWg7QPTDDFaIB4r+6G8e1zko12GXqXBeNhb32qjBEMQ8DkjkkdwmqdVOJR6+ qHcJY4URr+3lR8f3yhOxxXjoDMEzOoN4EdOc7aiPb5xrlH+AauP0sCbxFAPyn/Ie 3b6YPCvXjp4sXNO0brj+SFz7uMqqgxrndBERfgyRGUqK3AtMgsnoLPslSNA/dLip Ha0qQ0sOZSZp5kwZUNPnAB2YOAQc+ZtvVWIu9DT6Qh0WSeB4+9Fm4KoZA== 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=gp4qntKo27gpb4ncTJpcYD5+aSMDhGRkVYBCdPvwrYs=; b=CKh7jhUg twm6fn/a4DaerJpOOflr1n80x/9eROOsGCFWfYog1rsZvmX40T5CgOvrF/thj72Z EQXUV7IfAblkYCfOJL00rsTjVxePCTYlPW3uEaBYbdBnDmbRkwmZpCME9BLzcUYE tluRdL5RzU+d7hq5fVxtJv8oraUg/0O171TBmkPeWgMcea/vvtKXXrRKsCIakgmu LElmv6QZx51BHyp+VmKO7nZxBQKJ8v0Rr6Jx6E3XYaVA//yHQVE3jhiPvf0y5vAj VAHKxhsq602zOqSFmlCTjGOG8UImQyUSggE0uBJyaSlk9OHIN21PaOANBjTXfrym MuzELQFQN314tg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrleeggdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Dec 2021 07:25:55 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org, lee.jones@linaro.org, broonie@kernel.org Cc: linux-imx@nxp.com, devicetree@vger.kernel.org, s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, linux-hwmon@vger.kernel.org, alistair23@gmail.com, amitk@kernel.org, shawnguo@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com, Alistair Francis Subject: [PATCH v17 4/8] regulator: sy7636a: Remove requirement on sy7636a mfd Date: Thu, 16 Dec 2021 22:25:21 +1000 Message-Id: <20211216122525.136139-5-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211216122525.136139-1-alistair@alistair23.me> References: <20211216122525.136139-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_042602_206470_472C211A X-CRM114-Status: UNSURE ( 8.49 ) 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 Signed-off-by: Alistair Francis Acked-by: Mark Brown --- drivers/regulator/Kconfig | 1 - drivers/regulator/sy7636a-regulator.c | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 6be9b1c8a615..3e515a3fae73 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 22fddf868e4c..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; From patchwork Thu Dec 16 12:25:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12696464 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4B236C433F5 for ; Thu, 16 Dec 2021 12:57:26 +0000 (UTC) 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=m45jVwZo7CM6QMU3J5bFou1ebecuzLr31datZWmWkOo=; b=Cacasmd61lCFs/ Xh4JZ0wIUrtFww3kJM5VPCSrFVIL1089ZPZrLvbBRARgOuSFXrcECXpHpL/y5Oj/+Dl80kkf5RSmH tGVuPkXkVSMDtOD8QQzkdiRXX0he9D6oeYTOjGCIj0K1GkOfdvFlmu1Qftlt9+fPEp9NNAv3Ue2cA PQIIk/GH87PqdeBVhnKt5mg1t8lQhuMvoyQPNFqAgtNBh4cE+uJdCGxu5z3wukGTalPaQirM67/Fw RTh/VGWWQPlDDgleDVXIaSRprb4kaXiSSgXSzeQY6Au0ksBzfTlSqatA01VeJNWSe6OqZFz2t95fx jANO4UMDcnV7PkQA0ctg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxqIR-005Z9I-HM; Thu, 16 Dec 2021 12:55:45 +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 1mxppo-005Q7X-C3 for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 12:26:10 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 7C80F5805EC; Thu, 16 Dec 2021 07:26:07 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 16 Dec 2021 07:26:07 -0500 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=byYZ5MvJCFlLl K5cmfT2zkFtFxLckB6GsY07XdYC0qc=; b=bcUfPCDJWmohMNXD/nXMn2nGoUlpf WOviKH6uq7bWX3tvwDfchxAh1my7b/yr4aynxwmsrPPT+E3Xa5PTko4bBRaGiIvU I4EaL6O1K7iqNOTJB10nR6aJrd+BqLPThxoimaP7eiVPaADsaFAqHDq0B93h+EVn m4bU4nsFrn/SVDmmxpJ2timIV9vjnn5KcK+l5F32Wlq2gycWU1gl3gt5xedYBkxn 3HyIqLsX/ASCF6W1MXaKFTz0cvNFybWjertNb6ImWX9nEHUi3bIBMVuFeEuLBbCb PQ3k193iwJiiR8NuAMXjqkU/MZEslTi+WKO6aqJ5HzkZ0ZrJbcM5Z3quA== 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=byYZ5MvJCFlLlK5cmfT2zkFtFxLckB6GsY07XdYC0qc=; b=VII134dx SCnrJ1Y7alvtp8EmqSLLkJOdPKs+KyKFa7LO2hZEROpLvamW/ZHJpqpelxJ7VwKB Y59jPejlU3ufNYb/GHnXZgl5Lzu+2l9WlqdbUjEoyHMwC9iiTw826/JrXtRVG+3R h36vrpuV+0nUGGFVfC5E53FLiDkMIeXopvumJWgyXLwfogQKHKQ4ehAqFVvtnPkn d93sd5sFg1T2qXNB+sLuzesYWLp7GSsNDkgpSXvko7AnJu0fj2MX7fgCUXOa7MYm cAAJ/SJMsQoLDhltR1JTE+yaz/j0T7je9gPEVP/yfA1WrGDqr86+v957JN49ilFz KY2kN6lT+l7/wQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrleeggdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepheffjeetteetke ffhfdvgefhgeevvddvueejheehfeevfedufeegiedtheeujeelnecuffhomhgrihhnpehr vghmrghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Dec 2021 07:26:01 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org, lee.jones@linaro.org, broonie@kernel.org Cc: linux-imx@nxp.com, devicetree@vger.kernel.org, s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, linux-hwmon@vger.kernel.org, alistair23@gmail.com, amitk@kernel.org, shawnguo@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com, Alistair Francis Subject: [PATCH v17 5/8] hwmon: sy7636a: Add temperature driver for sy7636a Date: Thu, 16 Dec 2021 22:25:22 +1000 Message-Id: <20211216122525.136139-6-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211216122525.136139-1-alistair@alistair23.me> References: <20211216122525.136139-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_042608_526760_2E9A96DB X-CRM114-Status: GOOD ( 18.07 ) 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 Acked-by: Guenter Roeck --- Documentation/hwmon/index.rst | 1 + Documentation/hwmon/sy7636a-hwmon.rst | 26 +++++++ drivers/hwmon/Kconfig | 9 +++ drivers/hwmon/Makefile | 1 + drivers/hwmon/sy7636a-hwmon.c | 106 ++++++++++++++++++++++++++ 5 files changed, 143 insertions(+) create mode 100644 Documentation/hwmon/sy7636a-hwmon.rst create mode 100644 drivers/hwmon/sy7636a-hwmon.c diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst index 7046bf1870d9..a887308850cd 100644 --- a/Documentation/hwmon/index.rst +++ b/Documentation/hwmon/index.rst @@ -180,6 +180,7 @@ Hardware Monitoring Kernel Drivers smsc47m1 sparx5-temp stpddc60 + sy7636a-hwmon tc654 tc74 thmc50 diff --git a/Documentation/hwmon/sy7636a-hwmon.rst b/Documentation/hwmon/sy7636a-hwmon.rst new file mode 100644 index 000000000000..5612079397d5 --- /dev/null +++ b/Documentation/hwmon/sy7636a-hwmon.rst @@ -0,0 +1,26 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +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 64bd3dfba2c4..3139a286c35a 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -1662,6 +1662,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 baee6a8d4dd1..8f8da52098d1 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -182,6 +182,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..6dd9c2a0f0e0 --- /dev/null +++ b/drivers/hwmon/sy7636a-hwmon.c @@ -0,0 +1,106 @@ +// 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 + +static int sy7636a_read(struct device *dev, enum hwmon_sensor_types type, + u32 attr, int channel, long *temp) +{ + struct regmap *regmap = dev_get_drvdata(dev); + int ret, reg_val; + + ret = regmap_read(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 regulator *regulator; + struct device *hwmon_dev; + int err; + + if (!regmap) + return -EPROBE_DEFER; + + regulator = devm_regulator_get(&pdev->dev, "vcom"); + if (IS_ERR(regulator)) + return PTR_ERR(regulator); + + err = regulator_enable(regulator); + if (err) + return err; + + 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 Thu Dec 16 12:25:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12696465 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 88AAEC433EF for ; Thu, 16 Dec 2021 12:58:41 +0000 (UTC) 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=zw/YxF7IVE1qdXdVO1aWtffCmC53IV8CRGR4gBbSCOY=; b=U/1p0zfMYXdB29 7XpU0TxKKoI3uJlevt8RYlxe1+CFW+M112WD2GeL3uyJISzYSI5Qz/1A6qf5EeyqVXxrsaZpyvQF9 +EqpSyCWS6ndY5iSRtm+xdxwMzzwx3iCHUgD5jlxJp9NxN7LbbcE+LHl9NQcTVT+iOA6mf6FoX+H6 4GWDAV8PQNmD1EtUkl6kztTyKPCGSQaVBWscw8A1ens9QGQ1EtvTbNoWBTK32mlyPHT0Z1zYVcy2M f6k04XmE6sYfXB7sFQObNEc38t/NoY0370/pSEC6jK1rd5T5bWmPd0WjomX2TvMLql35AFct+Smfk rsw3Zap1Rq06n58JXWgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxqJT-005ZZJ-Ew; Thu, 16 Dec 2021 12:56:49 +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 1mxppv-005Q9h-0P for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 12:26:16 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 1D14A5805EC; Thu, 16 Dec 2021 07:26:14 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 16 Dec 2021 07:26:14 -0500 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=V8tCZDVlOk3rk cprQ+2KQBwTR6cMGYHthIRm9/6DahY=; b=JcdhJljj22Ojqqdqv2/SQjsMI935v tEYQLIoT+nEKg1O7Y1gmx8Wnbcpc2XEGNsS0pdDU52dY4Y7fEog85niQr6cBK+LX 9DRtGlJ3sTV+qYzUoyP5awjdEXi6wGTAhtu6SmnyGGZwg4pZpmGYIdcNS/+dLf34 EzYFoOLv/fJn2/fra/KUvm6RjDobaZ4O4ZA9ZQI2eU+BzgKCgaurBWBZmpuYk2ZY 3vh6WRx1bADiGl/+DPQ7iHIKH4vpCeZW6eCBRNj7Fv0lCXv8Qj4qoTf4u5X67yzF mMPMuLhev74ACZ0GUWIcrG6ViWqGOeXkIeWjLpXQIFwsw8ZGMICrLOHdw== 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=V8tCZDVlOk3rkcprQ+2KQBwTR6cMGYHthIRm9/6DahY=; b=E4r/O9fH GVwWJ9gSpW9KLQ1lL4eEPrIQvN6/zO8bEFx2q8siTgAlUbt2eOtZzRV1UUrG+5w+ uJTm7LTsgAs+H7iRFHUT7xqazl4Uvp4aKMi84W94TpkMmPGE72BOTOU27UrMdl6J 0MyqA6rpo0OVubvBRouqIXFnGOP2OodhMvdKci06y6EiHMB+ZGPJVxViYV6jBIC3 JSLInE2vvKqpR/3PD+8ltK0o70j+iyQcyf0S4VqS7VAmgC/0DssDRDhPGtDXxcHH OaDybTe/5Z2hTBPh8T2EeHTy/8zLePgQXuYDIVz29Vvpx23kcr0MhUoA9vfcJc8P y6+P37lwJw0EIg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrleeggdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Dec 2021 07:26:07 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org, lee.jones@linaro.org, broonie@kernel.org Cc: linux-imx@nxp.com, devicetree@vger.kernel.org, s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, linux-hwmon@vger.kernel.org, alistair23@gmail.com, amitk@kernel.org, shawnguo@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com, Alistair Francis Subject: [PATCH v17 6/8] ARM: imx_v6_v7_defconfig: Enable silergy,sy7636a Date: Thu, 16 Dec 2021 22:25:23 +1000 Message-Id: <20211216122525.136139-7-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211216122525.136139-1-alistair@alistair23.me> References: <20211216122525.136139-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_042615_205362_51D8D85D X-CRM114-Status: UNSURE ( 6.60 ) 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 1fbb8e45e604..6add186e189e 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -223,6 +223,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 @@ -239,6 +240,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_FIXED_VOLTAGE=y CONFIG_REGULATOR_ANATOP=y @@ -251,6 +253,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 Thu Dec 16 12:25:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12696466 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 00A51C433F5 for ; Thu, 16 Dec 2021 12:59:45 +0000 (UTC) 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=nExFrR0WMyc64nODf3XuDkJ9h183b56Zgym5HJbOau0=; b=ayAUot2BCWeooq UyJeJojV6/Q0MHO++PWi2tXTrhbVgEoGl1D2G5Mh+6o0DQmtz4FMB0iDYZqFsD0hdWyfGIpvmXNt2 0pdo8nd6a4xP2lR+cn9aWr7kbhRJq/h5uk7SrlVUgCA0lAfyiTFBGil5DhdEkju5HM6emkN8jDMDs ukTmPdDkOC0NY58SqUwPMe3r5o4NWx6GvgVBWZsjyemVIqYlf91wIXxfK9l4Z6/1vwBxLJnBhF7rm SQyFqmVx7sv1HceACkOEyzcBX8O0NKsbS+u84cBUhfdoeLLt9fUJeLBXcrokkOJsPHVdVfFZ2xUHl pSIWVTsKh/C5AOcOJHjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxqKV-005Zzw-6Y; Thu, 16 Dec 2021 12:57:52 +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 1mxpq1-005QCV-JW for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 12:26:23 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 957BC5805EC; Thu, 16 Dec 2021 07:26:20 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 16 Dec 2021 07:26:20 -0500 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=cz/W+o1QaYv6K IuV4GCrT7jbxJ0xS3lwdZjaIKs47tY=; b=rMvhDDSTPeQkF93YkxffldS9Nx2pN yUY4GdHY53zCO3hs04TWvgr0zlGXn0Iu38m3y8AZpwa+iIC5vQ9La5Uj6e+EY6x7 S4Vi/mJMskyIIgw6MQJKikEOIhYMFrf0YYfUnBIjfJiv9YcYC+eGM12oWb1j0kHo MNaTkakMsp9Q9OlxKz2F850bx7zF4cbVR6CAJYKFbbAD70FzGrnyLLL7/bRMl9+j F8L2pqeZBWfFEsQekdvULAEBWf9uO3ZtxC8Ou9qaHTkt52HfopD+p852jivG7ZFI R0/JtPvKeCYmEkjGFB9NPj3fUPUYBsWRynlclsSui2T+uNStYlOZdcEHw== 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=cz/W+o1QaYv6KIuV4GCrT7jbxJ0xS3lwdZjaIKs47tY=; b=nN+gG9wF oL0t/12sNotGBPoMwm60vzRn1U/IXCGj/q3+eQtQJzhMXJjtjSGEXFQZRZpKs6X3 ePeXvrDW1CXj89cxc2KMke2bR/GNtQFFpA1BEO2puRjbziKq0HoNwHDw6+GSomm0 9Iyf2iMpRcxI6e0aj5wdf0JgOLhn/QOdX9lCNpT7UyJ0xqYLCB+KUymyF7eNbPhe 9IDFl9oAkheoSl28Q0Y1foJpKVk4NFlAdWfB96UuIVx4tWwHLaxRYcBiw38wUn1l lbO3JXXV/YPVwrSfeJut3OFjuHsUS/k5A50jYBWPWJRG2G6Q9iTkvFZ/D+tzWxTu ZEERDTmvLHloWQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrleeggdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Dec 2021 07:26:14 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org, lee.jones@linaro.org, broonie@kernel.org Cc: linux-imx@nxp.com, devicetree@vger.kernel.org, s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, linux-hwmon@vger.kernel.org, alistair23@gmail.com, amitk@kernel.org, shawnguo@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com, Alistair Francis Subject: [PATCH v17 7/8] ARM: dts: imx7d-remarkable2: Enable silergy,sy7636a Date: Thu, 16 Dec 2021 22:25:24 +1000 Message-Id: <20211216122525.136139-8-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211216122525.136139-1-alistair@alistair23.me> References: <20211216122525.136139-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_042621_793300_BD92E5E2 X-CRM114-Status: UNSURE ( 9.09 ) 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 a2a91bfdd98e..99ac0d242936 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"; @@ -84,6 +105,33 @@ wacom_digitizer: digitizer@9 { }; }; +&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"; }; @@ -177,6 +225,13 @@ 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_i2c1: i2c1grp { fsl,pins = < MX7D_PAD_I2C1_SDA__I2C1_SDA 0x4000007f @@ -184,6 +239,13 @@ MX7D_PAD_I2C1_SCL__I2C1_SCL 0x4000007f >; }; + 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 Thu Dec 16 12:25:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12696467 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 99D85C433F5 for ; Thu, 16 Dec 2021 13:00:50 +0000 (UTC) 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=8ttsjSD301pzSdXCoZRUFvQhWNfLtCHDIDbVMQYtlCw=; b=pgNpMliwb81w6V MPT5dnYsh91p5HM61U/rnbcjzl6NDHdv+fUOWy44NAdsFbq2FRtznEyrBGRYiDa+/H3viOgnhoUWw 58NRNpKo/F6ebqQuMRB7vMxkj+w1OQSeme16vy6bKz6zMb3KzA3dwmoOzAl31IZp+oS5GO1pIfhtz OoBQalO1ITECgruF0fup/aYBGQWrWc1nTl3L0cYkIWe5xg5BZf7eLXzyVV3jX8fTYqTqkBaWybopF RHxKaxnXBPDrl6eylrhtTYjzTNYHB+PF5oGmxPjTDLWSCRXnluwRVES/4/oBz9Pn6s2PDySAQwAGP 6sEitEBLIzRcNwPstH3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxqLk-005aSu-Bq; Thu, 16 Dec 2021 12:59: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 1mxpq7-005QEl-JP for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 12:26:29 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id E976B5805EC; Thu, 16 Dec 2021 07:26:26 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 16 Dec 2021 07:26:26 -0500 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=iFE30ZBYJvCyN kM0bB9sCSLWOJ+dFFVmxcQv5U8f2Ek=; b=Yhc/6u5mcB+c/p6khbrfYTfsL6Vjn 9+bB/+NB2KwLSam6vyE0vgq3ASnKjcnylyLxoFaEnGatRtIDLG1OWziHHXUZ40Yl VfRnumVe/Ur3sZTKqWnxuCXtcch5ylIUTeKBJhXAvnsYpodRFCoJVI6YL1bEun50 EItlij+sB8Uu+/rtMxo64aY+6avfq/+4WeqJWhOvfqBXQ01AYhb2Be4zFj27Cz+M lSR0Dpe2k5NiEjEf8QO7dXyk24KCETjMZmBWv48Gp6mM3rocOw2qF0y07z+XjJ7Q hGqn8IYfOO0IWFSPjMy9Vnk3+uipqXdqh2jsqKXllm4VAwGezC6nGZjVw== 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=iFE30ZBYJvCyNkM0bB9sCSLWOJ+dFFVmxcQv5U8f2Ek=; b=kZhc30Ok dFcQKhc3ZgZ6254jtlNUCEDF3q8E1z6zxqFVlCcFNjFqB2cZGukKIB60ZUv3UNGn sbxNjptr7Vg3wnryYbPd/MgMaTUgr0+1k59texia98ff8h3nH+jko45lNwyCGJOc ZAY4vLxex6d8U9HUDh1/7IjWw3FC0oF5xRAe0p91kxfroJvlcJk2I+xZQ5ZKyswB 39Qet54s2cT2gexsPeAL4lKt8M39WNH5elZ0uosa1H0znYA5kT18m/0nPodGQIMk LRQHHrLTNyQvBziHlc45hCK70OOyYJpt0Ung4PLgHCl55LNih6B1SAZbd2xci+E0 b5ChBK9NhnwYWw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrleeggdegudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgepudenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Dec 2021 07:26:20 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org, lee.jones@linaro.org, broonie@kernel.org Cc: linux-imx@nxp.com, devicetree@vger.kernel.org, s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, linux-hwmon@vger.kernel.org, alistair23@gmail.com, amitk@kernel.org, shawnguo@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com, Alistair Francis Subject: [PATCH v17 8/8] ARM: dts: imx7d-remarkable2: Enable lcdif Date: Thu, 16 Dec 2021 22:25:25 +1000 Message-Id: <20211216122525.136139-9-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211216122525.136139-1-alistair@alistair23.me> References: <20211216122525.136139-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_042627_763407_9A323242 X-CRM114-Status: UNSURE ( 7.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 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 99ac0d242936..03a4029e1e57 100644 --- a/arch/arm/boot/dts/imx7d-remarkable2.dts +++ b/arch/arm/boot/dts/imx7d-remarkable2.dts @@ -68,6 +68,16 @@ reg_digitizer: regulator-digitizer { startup-delay-us = <100000>; /* 100 ms */ }; + 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"; @@ -76,6 +86,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 { @@ -132,6 +152,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"; }; @@ -246,6 +280,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