From patchwork Thu Dec 2 12:07:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12694510 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 35E2AC433EF for ; Thu, 2 Dec 2021 12:12:02 +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=TBNxBRpYeKvsae KDRHz4uKx4oXkNwSZE2jXv8ju5+jeyAloluYSu5YZpAtYCuchw6K1VjwoZn6mWWxbpUmu6QyubHFb 2KQpokk5u9C4r/miV4aCM+Zf0k7Ns/wCQRVfn/FqIRjt3pI7Z4HgJntFol8b3HuklBsy1vtyIJwc4 Vm+x7kuH8J1Bv2uBsGKeTq0Nynqw9wr3M/7v7fvC3QX23fKD6bvY9fdGbEeeUZMRAQi7Q1r2OB+n+ mFVSDixYA2q1twSoOnRN2/VoMOc9NtspG9zisdA0OpCmMCyFvBVM73IcdqEHyBb4nCC2Toj1Z59Ze 2glBrMJ7GaJ4kncyYFQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mskuS-00CBAG-1B; Thu, 02 Dec 2021 12:09:57 +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 1msksq-00CAdB-6w for linux-arm-kernel@lists.infradead.org; Thu, 02 Dec 2021 12:08:19 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 7FF6558030B; Thu, 2 Dec 2021 07:08:15 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 02 Dec 2021 07:08:15 -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=zW41Y/YnE9CIHwf01atEo654jDB34 NuuZBBwVgAt03eRGXwVLexK+ADFmazHAtmskpWeyDjfk7KwjgCsaLEaN7MV4Q5Ms Q/BUbsHsqlzkixGPgRVp6wpryzYkN5YWgK4fNWYePYQlo/zs0TtyEros5fsBb4Bh bpj0QrWMqR4xFDZoe2L5Eqd9CTYMgUGnBx6ZDCPngc6J4JcXADVzYPgkJM6IWIau wBnNDurS+US7aaaPz0gG34B1LFTgj8fw2GALmBk/ealKOHQ0KmN4W7NM85jIVL7J Ya54h8P5QVo/7qj+kBq3Q7jgfdojPq0Lr8/KBubpnxXVy7YzaadSClfQg== 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=gnbWBAkA cYmf4yw0oPWQpsZeRyuTpgH4tpxfwK6X7/LwCslhj4aq6O5tdXw4NlYn3cTurfrL y/xUG8UM2F4+TKakQTKVja2vhtBAcroJKxru5yZgOaRl2eUYAa/Iug0yVVzXjCVi NN5tjXrojXKRNq+QgmYhEIbGKfxW6ow1VlW79QA9Mg/uFxdnOJAJmPSNoMgZBQZd rfIirUCoojI7GCRzEElXxS5JpjUwkj0i0w24XUOF8Ugswgebtz2iLvuK/60CaFUD cF5Ckq9dLhje4OsFUz0ZcOhCWc5n9WOfcJILR7wtwupmniE+DqUr8XGUAGYFDMOq eVOkiG4agXw5UA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieehgdefiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomheptehlihhsthgr ihhrucfhrhgrnhgtihhsuceorghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgvqe enucggtffrrghtthgvrhhnpefftdfhgfeggfelgfekjefhkeeigfelleefhfethfehfeet leeggeeggfefffdvtdenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Dec 2021 07:08:08 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, robh+dt@kernel.org, lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org Cc: linux-arm-kernel@lists.infradead.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, linux-imx@nxp.com, devicetree@vger.kernel.org, amitk@kernel.org, shawnguo@kernel.org, Alistair Francis , Rob Herring Subject: [PATCH v16 1/8] dt-bindings: mfd: Initial commit of silergy, sy7636a.yaml Date: Thu, 2 Dec 2021 22:07:51 +1000 Message-Id: <20211202120758.41478-2-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211202120758.41478-1-alistair@alistair23.me> References: <20211202120758.41478-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211202_040816_383063_01DC9DD8 X-CRM114-Status: GOOD ( 11.32 ) 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 2 12:07:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12694511 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 4A3EAC433F5 for ; Thu, 2 Dec 2021 12:12:44 +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=J9WyzeNp0xPe6m ArdJgLmQc66IZGMiz7URcJdlvmgMlUg1qapOie+53BYNXCYC5u8vUQC5MpFTHJj8Mk8QmrnQVVBXL SnuBbXdy2Ff//Wwq4gbGfLkUG31My5fQw8cq7kab4iEPw+HXG4w1cp6Rshh2M57oxCvqPZqI6VzIA 3jxgHVCpOlvBjUatkFsyqqHXwCG/FMeL5K3A+2YQTczJ+IoNfPqNixaTh0KZJ49EVMTcBzirm8/xK opHN2YRj3tQ8GWPNzcZzXCcYNgsmyAdDK/A0S3x7RdlQqDCHq2M5yQ7rRbR22n6IdEeGzIB6kbhen ELVLjP5sTRjRIBUAVhgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mskvH-00CBUo-6M; Thu, 02 Dec 2021 12:10: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 1msksz-00CAfw-7L for linux-arm-kernel@lists.infradead.org; Thu, 02 Dec 2021 12:08:26 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id CFB5D580342; Thu, 2 Dec 2021 07:08:22 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 02 Dec 2021 07:08:22 -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=zYRuf3VN1cYLsg/L56uY8EQ5PMFWr XEcrKecOoPWRJce9fLYLZ3s4aJi5VnWeffX+b7cyS1Oq42ASfGVavmxxeF6J+fJD IM4pNwaghcADZF3uOqWZWna1HD6GqYqUfnhL6tkmsvYzYbVwJDAG3LDnLmnkP8t8 zH71yMo9ZhLIbcEZKmbqR3i8RXg4n5cZHyiTnKLR4M8+hagg8TAHLA2MMPiBEmW5 c5sg3Fgv4h6Yh6/c6FBD7KM4IJJtI/Q+EFXSb/VkFxgq+/w7/BjnAuNJ4jWDnrmX ikZG1PjuVrBUUyFZsEWW4d39x+yaGrjAaEV0fcdyQ9+O+NnExbR4n68+w== 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=kkN1goKM 9UwCzQNtb5ETeZxtX+16wvoCvDITMZO+rZnM9/r2cP1/1GhHXONEtlSiibbHThjI kcgI0J0OD8CB1wd+Ck1QJE6RFQND8TLTVE1Qf6/nxB/AqvrdzRnvDwnk3zab9syH w9QXr8OIuV15x1A8eUL+dmuTfxmtOtvOKNcYgsPLDvrC20JKidfN4CaGLET4GKkc C6Tg92urA/iScmfqN/wH59OTdsqIKdPOYsBF9YSLQh4FbdMbiDetA0a3Db/mqH7/ wQ37cc49tZVXACQ0xCgXWdKmIo5zBrX6Txc29Xgzc5x5INXzsuVWFnE91B5OFY8W +6nylGkXUTUZjQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieehgdefiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Dec 2021 07:08:15 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, robh+dt@kernel.org, lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org Cc: linux-arm-kernel@lists.infradead.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, linux-imx@nxp.com, devicetree@vger.kernel.org, amitk@kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v16 2/8] mfd: simple-mfd-i2c: Add a Kconfig name Date: Thu, 2 Dec 2021 22:07:52 +1000 Message-Id: <20211202120758.41478-3-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211202120758.41478-1-alistair@alistair23.me> References: <20211202120758.41478-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211202_040825_385714_C86524C2 X-CRM114-Status: UNSURE ( 9.37 ) 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 2 12:07:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12694512 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 AAF24C433EF for ; Thu, 2 Dec 2021 12:13:43 +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=LATzsdKG5XXapW O3mhjPbgZiQGxQjD1yOAN2XV7gMV0Pdg8rGmc+byzYvLZUxp1I2M5rJJhxqF/FokoZWJ6kXgYpgXx Z3VYr/2lhkNf5I+ZqqYez+1WC4NZhyp9+bT+AVgmWMYvdPsDYrT+qoKayD99bpp0fB7Gcb3acRAHB 0btPOQMc3uRhbd9m2WSLSF+DmmH0TOw0+XnRaXLunHsH85YimRdcOKf5kgXWbDQi6HX1ubsUv1eqC 7Z57ptlM/0uXd5aPtX1sFXIU9ODwd6ckmnO86NKOGviOJrK22M+4RaDeKj9zHkwWJmwsZGnrGv5ZJ h5OzWwi2n4UMQ+KIl6SQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mskw6-00CBqi-44; Thu, 02 Dec 2021 12:11:39 +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 1mskt4-00CAie-8I for linux-arm-kernel@lists.infradead.org; Thu, 02 Dec 2021 12:08:31 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 83EF858032F; Thu, 2 Dec 2021 07:08:29 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 02 Dec 2021 07:08:29 -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=NwLVO+RJDjkGrc2KeKaXNOe+m7rop SQWwBCb31Iw0pvd7GP7a7ZjXodsKotr4l5N6jmLxwoxgay4Ye8WvaBJFhjM0bLQt B+RrDGpTNUsP/mMai+slumi2KRi0/mUdnQj1zt7UuK/Nx+SFVfR7WeKBGT5rkuiF FVk0I4OZ9tlsgmwl8RajGs0K2UCYYWkQ49CbFxR1tZk6Kd1An2TM2kRYQZutJP9w kUG+cTmRwxbP8pjZ2m7O+XuTdSmpUa1leBeiH/OB3cCqdnDgcHFIwP5tibfDwZ79 YbyxuiHfM1qCp//ri13fOnZ+kX4EGdzSKxziZ3gYd52HJZHOucZgxmCBA== 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=eylTYX9R 1oZQjgdC+6yoYSVMdCaiNsTpW/v7UZMEgrcIKa2MzYzqCGEDFtsYn0UGxH07188c JslPKQmQTiffva7fN+lFZ+IYmyp4N0JbyC48wHAt1zqxLaSIzH0KKRZ7QnmzpRwO S2J0abt7qClZEqEoLD8VzSxCjD8lrCUlV4njjIEjLgiGYnkVBOLIc1+x12qDa37j joAdCAfTX0Bf990xsBwFCtCBM6swXJidSH9KkRfoN0rqh39STodu8a/CmzPkiTrW xeOQPvLffkuK+Iytvm9o7/Ul2sZik/VAd7z52SOOfbFIhwXz0vl6OOP7AltKhgva 6fUF9J5RvPWLYA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieehgdefiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepheffjeetteetke ffhfdvgefhgeevvddvueejheehfeevfedufeegiedtheeujeelnecuffhomhgrihhnpehr vghmrghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Dec 2021 07:08:23 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, robh+dt@kernel.org, lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org Cc: linux-arm-kernel@lists.infradead.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, linux-imx@nxp.com, devicetree@vger.kernel.org, amitk@kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v16 3/8] mfd: simple-mfd-i2c: Enable support for the silergy, sy7636a Date: Thu, 2 Dec 2021 22:07:53 +1000 Message-Id: <20211202120758.41478-4-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211202120758.41478-1-alistair@alistair23.me> References: <20211202120758.41478-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211202_040830_416251_75CB72BC X-CRM114-Status: GOOD ( 13.77 ) 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 2 12:07:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12694513 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 C7EFAC433EF for ; Thu, 2 Dec 2021 12:14: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=BXLaplGrHmLU3HVvlCgNkpW1cHBMDQ5T1ltPdHuH3dw=; b=nWsRBH1P5z/cll D2VKd9CAp8hTXBhgG4AHY5LXHT4gRAvKqA0sUM39N7neiixUTHe9odIKjUHdWglaBIeJlOS3HWBFP Np4qz4D2JVNQ2P+ZYxzHpRLkDMRwtvOb9e4Y31SnMR6L7w9b8zTq5QOb+Jd+3ga7acq9bAZE/Nykh eTws5NBLPDMYPy+DUNuhnEawCRX6coY9hg3t/OiOpacMgrFpQNl7hO70lvD6wHA/AsDCG1cXPW4k3 klsUyQvRaQg7TXYim2UhwESH+cCyC13pxvdhaH+iHxBYwc6xGRfUnxRn9VTKdxK1FNJ4pnc9I2ps0 K+100K/nBYiUvKXqyMnw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mskxE-00CCLC-VU; Thu, 02 Dec 2021 12:12:51 +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 1msktA-00CAl6-Vc for linux-arm-kernel@lists.infradead.org; Thu, 02 Dec 2021 12:08:38 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 392D1580337; Thu, 2 Dec 2021 07:08:36 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 02 Dec 2021 07:08:36 -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=cxT3cWkS4BBDHHStro6DyzZmBnvaw Ex6s9FadPrpBaCpP2DrvDjq/54QJtMafiRDFpjh9bDY6C9X5CQRLMzDZ3GkfliPV xDeRBT1nKw/MOST2CzpstZzLpuGPkM+Xmqligrz8OEYqF5ByRDM5fApdJ6MQx04q BC26gw6V1gRP2xJXI7XYcSgHltawbRvoToWAo4SavJevJpWRsJzPOGuYpxS2XSDz Xjb5eAs6z5sdIz/v/ovwR/jlyHEJVaudXolg1cg443W2UnFPtEEad7PeU80cFTRC ZdukK39Om+jcNmDnM4LwfztaeI6wbHo+Xgo1+pzcvSsQ9eMfroTIPoLYQ== 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=Z9SPO82Q FtRUDOypvZPynhYZPqA7BY2yEIhbbL1KlSutQlLhXfxUV0+cIgK9Zz5DKVovohrP 25mja0XRYK+uleJICNTRSQotZaf8hCCyyMS/R5x3i+At5F6ci7MyTy0mcm9EkvHc KvkNNbpmRv5DbQaXN8WINBgJ4adrRw6rnVRv1YVpjB8sdr2Cz6pLf+2CoIt7UPRV W9M1z2Q+xKAo5BKiPeaTAfeoLnSC4VyLNpglT79ujHuz73GL5htEjwgZYub8jifa 7FQ2qgUHy7lUj87ainnmCPoVJ13CvuRE0Gl2gHEtAlPjMa9KbV9JDm+DO2wJ9TEb tMajDyYzgrGowg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieehgdefiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Dec 2021 07:08:29 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, robh+dt@kernel.org, lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org Cc: linux-arm-kernel@lists.infradead.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, linux-imx@nxp.com, devicetree@vger.kernel.org, amitk@kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v16 4/8] regulator: sy7636a: Remove requirement on sy7636a mfd Date: Thu, 2 Dec 2021 22:07:54 +1000 Message-Id: <20211202120758.41478-5-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211202120758.41478-1-alistair@alistair23.me> References: <20211202120758.41478-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211202_040837_144933_0156E051 X-CRM114-Status: UNSURE ( 8.91 ) 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 2 12:07:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12694514 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 AAEB2C433F5 for ; Thu, 2 Dec 2021 12:15:56 +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=QHwj3811lEK0WX18Wyl07LeT2T1EdHWfQ7nMraMh9cI=; b=T+TN2t+NsEPLvk k4ikjKe3EPZOz08GqPoKLp9o1bmMBZMnDy2uX3sIr+82HWIGJSqGcvKtKdVRg/5RId/Tb726ubClc QZAfWYPMY5NSx4PBTWOGsmE3JBUfFIk5dR1Yt5fdRv2Or+H5Y9vMqYCvS1WH7JU3L1nnOiDE784iz txAyoNqKZnUXaQqiNnzp4PF18fGHWDC/c4fJzqNebH0eWN+1HfilE/qKvE/+4iMiI3Diq5Zbxhxbi 6dHcxsXjMso4lfcIEjEnTbnqIS4FpZ2hqi0NUfxri9KVWuI0STF+h+5DVmgRUE3fgw3/sXc1HZP6i sDIJ7+I6d2tTyhQkocxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mskyC-00CCkX-Ie; Thu, 02 Dec 2021 12:13: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 1msktH-00CAnG-DY for linux-arm-kernel@lists.infradead.org; Thu, 02 Dec 2021 12:08:45 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id A22E458030B; Thu, 2 Dec 2021 07:08:42 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 02 Dec 2021 07:08: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=Nn32EltN97YJ2 S3XzbMtS7Wpo5H9KIt2l6pkIEsGN34=; b=CwCF4z8HN8wy+lDS/71D3gF60OXb5 YBzE1TlyKdj42LSy5ifX+ktGpBWpTGioqvkhXqEmxtfUrKUVjtDKUrs55OfJtl/U wWErnTD4hPyfjHSSC9FF7Kw/k1XQf/MSGRvUMr4yk9il+Cxb5sQGx3cogsHvT8ou 4lLdD1DHBWCHcdWQ0G7ldEdr9v8pJAJ8RVuo+dNu7vWATeOHfzs9EO/ggI/4nnaS vgDsA1J3z8KtcxnXWxf7xMfmsNMlOj0XAfMWqvT7NnGn1ZotIPhqKG5A5zYYOuWQ 7Vmnw9590SGloyGlEdF+3gJF24fPPA7pq8CyraIUD0NO3gtyetHuEKnNQ== 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=Nn32EltN97YJ2S3XzbMtS7Wpo5H9KIt2l6pkIEsGN34=; b=ODQOAU+F cAM1A5aYRG/zvHYOdEXAedHERmbHCmmiBAz195MLblSP3WAqOOPiR3RdydK9v5F1 1A0m6nF1OqNobl0du7erPPsUS2dGYcR3XJSUc9izek2lWWG9XioZxw+rRRHeYYI+ ScMK5219YTuhfgmRVpqlgMudX80vDHQhj/onhnbB1jqZdHwlWHPUm8Egr7slpBNh VPeTcRGzCBCDAH3m+CQ/N78wAteI/ZUdolDd4c1D9QDuaH7Ion94AoQzUxqPLnR0 pxa+1vxTUhkU5eQlxoysVl8YPm0dlsiTnMGRXZuwQEA6BKlUPW5DR+EL5Jc8wDlH usI62koK68Luow== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieehgdefiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepheffjeetteetke ffhfdvgefhgeevvddvueejheehfeevfedufeegiedtheeujeelnecuffhomhgrihhnpehr vghmrghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Dec 2021 07:08:36 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, robh+dt@kernel.org, lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org Cc: linux-arm-kernel@lists.infradead.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, linux-imx@nxp.com, devicetree@vger.kernel.org, amitk@kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v16 5/8] hwmon: sy7636a: Add temperature driver for sy7636a Date: Thu, 2 Dec 2021 22:07:55 +1000 Message-Id: <20211202120758.41478-6-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211202120758.41478-1-alistair@alistair23.me> References: <20211202120758.41478-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211202_040843_609147_C27F01AC X-CRM114-Status: GOOD ( 18.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a multi-function device to interface with the sy7636a EPD PMIC chip from Silergy. Signed-off-by: Alistair Francis --- Documentation/hwmon/index.rst | 1 + Documentation/hwmon/sy7636a-hwmon.rst | 24 ++++++ drivers/hwmon/Kconfig | 9 +++ drivers/hwmon/Makefile | 1 + drivers/hwmon/sy7636a-hwmon.c | 107 ++++++++++++++++++++++++++ 5 files changed, 142 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..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 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..3cc3afcdfb2d --- /dev/null +++ b/drivers/hwmon/sy7636a-hwmon.c @@ -0,0 +1,107 @@ +// 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 2 12:07:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12694515 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 086C3C433F5 for ; Thu, 2 Dec 2021 12:16:38 +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=VggyfIv9SSeilQ FctlHxHa4gCfTfWdFgSBLLprp+t+nWGB78Sn+Ua+7gR+9hFAR9Eqt2lJONRpvj6RxEDgRHmNZVLbF vnSsf12G/tKcYA/7KWSJhZP21SlEMMLeSlz52sjGpwYgx4Ol5flUSkWXUfhNliW5t5+BqosLAV49E Ieq7bpW6jKeEXO3LGQ7bynOW2l1uWDtmipnsr3E8Cm3iFB1r3KmUutC9uQT8IPNPui4TnGETL7I63 e7iOXtKke8KcVCsTS+EUNzn6zepHLeDcZ+nUjwTVFLeimiiTUS7XCouho9hCzvd8PQowGb5yZkN0Q Tx6rgFkpXygMGFEI00Lw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mskyw-00CCzt-Ig; Thu, 02 Dec 2021 12:14:35 +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 1msktO-00CApH-E8 for linux-arm-kernel@lists.infradead.org; Thu, 02 Dec 2021 12:08:51 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id A2838580342; Thu, 2 Dec 2021 07:08:49 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 02 Dec 2021 07:08:49 -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=njqRf0mgDUyDEY4VuVpSXS4eKCwlL dGCvwl1rctqeYjiRIa2Yzt3GCNEDSVMUahMEvwzBF6+lDuMqp5/eA6mHPEp6aqY4 phc0c/Nxl4I/xDQN6kWzH0LyZpPkjn9lwZUTGlQPhoCiPZiBOv3Rvqh2xxfNZpkN kxn5ivc5ScaDGlwMqB930xLuXqLe8Mrkpcjl0om4PKPArOuuaBF0Yn1AOF8WWDkj vxnlXnbqDDinht9TJwfItGt+duuR2ssIctFqNWiiLDpTDaYsY0N2OTqF950TgnTq GdKyRDFItqgHN2Wk2zLEMq2iwUkPGmO4OpSdjiCzpNpEf5rBwAUr8t13A== 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=bXjl+zBR rePqBEN4nkXy5Pwv7ZQPkPv2IJ0NI2Du8DZBrKCa0Jpyh+TDD8DqqtisLNgXMr8y x00QrzR8lylgQJc0o3nUZebCyPnWhWdGiwstdKTB51fmJXr+zfs5zZaQLmvH+tlx o6DYWqX36uOcsH1ywUKbKmvdoGLcMuSLdkT5FMymOivXaq1ChzAOa6W0XeJjdZAt Vvcc4lM5mUl7wr/htK2u/GEVu93AsWL3i4E9dLTYIUagzGj9lI5skTnEH3zUBBjE NFpilBdwdawJPQpCS1ERlfPRUXj1HURJXLh54sTxihkb84aNgI7VjiOjTXltBSkI ay8SwxfrZazf8Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieehgdefjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Dec 2021 07:08:42 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, robh+dt@kernel.org, lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org Cc: linux-arm-kernel@lists.infradead.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, linux-imx@nxp.com, devicetree@vger.kernel.org, amitk@kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v16 6/8] ARM: imx_v6_v7_defconfig: Enable silergy,sy7636a Date: Thu, 2 Dec 2021 22:07:56 +1000 Message-Id: <20211202120758.41478-7-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211202120758.41478-1-alistair@alistair23.me> References: <20211202120758.41478-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211202_040850_603747_42020D99 X-CRM114-Status: UNSURE ( 7.02 ) 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 2 12:07:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12694516 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 1063AC433F5 for ; Thu, 2 Dec 2021 12:17:44 +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=ZSRPLr0F7SOT+3JaJ/z/IMN5KFEPXCYBL5bgrA+mn/w=; b=FR26t1WfGP3Bvg OXtwrjrfVRXlrbzCXZjTNxvhKRYgP5gkNzrkAZr3XR9yhfiYpGwjHJcjHG8NiOgygAZ4JsbewJsAN RF+uarmGZQ1AiK3revYLU8x33gF6gR2/ZOWsbC2OqAQ78UB0BI/i2nBq3AhioI3h5IWokWcDh3aui ZQ2J7f6LHKj/ox5ZC4w9IcVT6/FavVJHIexO+QWBiQ67qTo5G+bhAbA7Y1mCoM4zPeMV+m/E/xIs0 QSbhJWRg2soo9OLNsQP/hBvQF7HLYqisxR58FRyE4JMjg9/q5wyaokVOKrGG1OPW7FZcuHQMmPp43 f458/l7MFKtyLUCUc83A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mskzw-00CDOG-BK; Thu, 02 Dec 2021 12:15:38 +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 1msktV-00CArp-1T for linux-arm-kernel@lists.infradead.org; Thu, 02 Dec 2021 12:08:58 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 52446580344; Thu, 2 Dec 2021 07:08:56 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 02 Dec 2021 07:08:56 -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=716shbgGMma/V dWgBLnXtBaiv+CdVe32+vnXxmMr+Y0=; b=Lp9iW0g7V7nLLt8Fbve+x8Kg1gWDW ecrUu2OpH0KFYnj/qIMuMawBzf7+tis9g/iiujXhgBttke7tgEhS8jYAs1s11/rs 4sYFP5QWirkI6objMT/NG5IiejwxOSIH2Cz3mAQjFvB6Pccst+FltDvfPfUCphm2 8Gfm3WiYQHRWbOHZjhAMjiPyvZBZ8UKtVcWDPIHxKq2kVI/1xq8u0N3SMyUYWvJZ MOD44QER5yq5HeNo2CKQGYZbPznDvUx5O/j0/Y1S6JonwKjkDVG4jqekfvN4tX2m VtWGAGMP5BuyDbkFDaqTgVpMePWmjed9E4/CQlCgCvM4ZlXGBtnDtcSMA== 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=feuY2GyV j4+EsQciszLIoFVghl/1Wm/HaXrHqDV3Dua5TocNN7eYR+Hx+Ut/AnjIrUAF59B5 unsycWILCgTgT0h2Q730z3VWY5AuhqLucQwMReX0p/MlNm6cq8IC6bqXEf6Jh2Pm B0vh/gDPuWfZ7mtOXgY+4s23tcE2Va6K4jgKp+u+IpM7PNkGrjlGEEg9XnyXOUQ0 ePjP/kJ2dZor1ug3QpuHR7fxG48uo18/KFE/km5XrfnpV1gglCx9XEec+WAbzwqu Nt8XbiqeMLPmiaZpLaw4ZcPnfIWGy0GFVS9kajDxtPeAJ9EQG/6Zvv/uGHNa4cpl 5QdnZmXh0c+QXA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieehgdefjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Dec 2021 07:08:50 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, robh+dt@kernel.org, lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org Cc: linux-arm-kernel@lists.infradead.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, linux-imx@nxp.com, devicetree@vger.kernel.org, amitk@kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v16 7/8] ARM: dts: imx7d: remarkable2: Enable silergy,sy7636a Date: Thu, 2 Dec 2021 22:07:57 +1000 Message-Id: <20211202120758.41478-8-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211202120758.41478-1-alistair@alistair23.me> References: <20211202120758.41478-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211202_040857_239244_9331C3CE X-CRM114-Status: UNSURE ( 9.01 ) 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 Thu Dec 2 12:07:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12694517 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 22A92C433F5 for ; Thu, 2 Dec 2021 12:18:31 +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=+Bfs8OxAER7fuXZr40k2uSx1tgunEXnEdxQ/WOhZBI4=; b=JO0d8mQ9FW700s D+lamEfHXlvHWDi3IyyFI2RWEp9Jp9Ct4vwEh4cI4fUKg7uMpUGnVAJIJjGVq1hrAOkacXDeqJNsg n+ZLI1jYAb26sbF9FmV9jXOiu6v9pWtKrfmGiVBorVgG5GEKCKLxfdbzh23teCEwZK7do7Oh15B3f 1sTiyK2F1ovgOs840hH71C4c2civ9eWoYUZq4Bx3askU3efx7nCOauNz8zUKT+xEjorwHhIRRTQO9 WPE9OCYI0dWt2ckavExyInG1nwOs2/NEkNL60CTj07kzhmqVjZBJhDiJedStBSs6bQdJ1/hdPBuEa GzXQmuVQbW4miVpCVLKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msl0x-00CDoo-Ug; Thu, 02 Dec 2021 12:16:41 +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 1msktc-00CAup-6K for linux-arm-kernel@lists.infradead.org; Thu, 02 Dec 2021 12:09:05 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 6F928580346; Thu, 2 Dec 2021 07:09:03 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 02 Dec 2021 07:09:03 -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=32JyItZSdYBSY vdc2EFe1YZlvFuGaAU0KeruUJYhokQ=; b=xx+fXatmV8jWgJwgzwd0JUdAL8LQk L2cpYKX3GH+Q+2Ryf2VDRvef/JV8vyioOHT88eizW8mewwEhCPqufNqWMOXXLSIG kDMU4DN4uduLfS3zNha+LffWwshK6sa0+d+Xw/K0ZdR2xqGwSBehFS15C4YXIxj6 Sc4uXcGFPPJiNa7ALHNEjajN1KgzCSkM7PUD5LTOuZqVqvns1/s8qBuVMzl/3pSf U4pJvzBxtlNklUUi3enZiT+2lGSiJP3pwFk2FgPJjsJGS6So9NgpLhfIUrN4zyGk LzmLWz0yE0rkU9c3r2yip4/dABtcqUMocdtE9Don2QpYgqYh8LDmAyyKA== 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=32JyItZSdYBSYvdc2EFe1YZlvFuGaAU0KeruUJYhokQ=; b=FFbJ8+eJ H6GSbMBxQU+F8flJxZz3w7Yu0ZaYk+veymwXD7FW8eHIWoNMjbE4yiLj9dA3axkB etbtviEtREZwa6+jzadrCKa30aClPjnFx6S9FFjHNDXTCQTuKTXF3NMBM98qG6Qi oQzRsqa0aIcjmWcbg4r9/clmzhkxy0NEiZl2Fej8k9/xGOsfHj8dGiQGM/frrD4e ODSJ4OqJFQMTOz5rFNasttynvSnauWdblnNfQo57vA80sAjvSzUBMR9+m/dakIIr SuSFzIJwPaTYK/tX6b+0pH5ZMlk/7WEeh7zzhhbwmmP16hVKszhUdbejw7EFS6kL HCBtmZ03Q58O8w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieehgdefiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgepudenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Dec 2021 07:08:56 -0500 (EST) From: Alistair Francis To: kernel@pengutronix.de, robh+dt@kernel.org, lee.jones@linaro.org, lgirdwood@gmail.com, broonie@kernel.org Cc: linux-arm-kernel@lists.infradead.org, alistair23@gmail.com, linux-hwmon@vger.kernel.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, linux-imx@nxp.com, devicetree@vger.kernel.org, amitk@kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v16 8/8] ARM: dts: imx7d: remarkable2: Enable lcdif Date: Thu, 2 Dec 2021 22:07:58 +1000 Message-Id: <20211202120758.41478-9-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211202120758.41478-1-alistair@alistair23.me> References: <20211202120758.41478-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211202_040904_353349_8B245136 X-CRM114-Status: UNSURE ( 8.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 Connect the dispaly on the reMarkable2. Signed-off-by: Alistair Francis Reported-by: kernel test robot Reported-by: kernel test robot --- arch/arm/boot/dts/imx7d-remarkable2.dts | 73 +++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-remarkable2.dts b/arch/arm/boot/dts/imx7d-remarkable2.dts index b66d28b30d75..bb0c68d24583 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,45 @@ 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 + >; + }; + + fsl,pins = < + MX7D_PAD_LCD_DATA22__GPIO3_IO27 0x74 + >; + }; + pinctrl_uart1: uart1grp { fsl,pins = < MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX 0x79