From patchwork Mon Jan 24 12:10:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12721911 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 72EAEC433F5 for ; Mon, 24 Jan 2022 12:12:35 +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=ZJ4xYZgHJ5rl53 sUIUzB7k/ravmcN+rObfQLuQ+bvlRP6vnL1eg3gsRH1jBeQ81gfYr3owFiihfUCUwrXNySx9mRSDG c7LLYQ8dp+HFPPusbjQ7RCjw8bE7CJ4zWQL13ZReKtjDDVfmfklsfAMDRGBvOi//3SxMKA8aEmKP/ /KCEiaDfiW60GIsDn4mQeb2+2c0ffId5k0g/a7ipQOAnHHSO+nVVKbnPRi6D0t4lOZ/LYHuAIRRi5 YeC2ll5v71M94dr1ZijIMaUz1zr74cHORs2Fk2GcG9Ty9VZlFsIOiJmGRlvmhf9Y0FrLDAlrERAJK ziFtTPrU8rTxkay0WM7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByBU-003ABb-3g; Mon, 24 Jan 2022 12:10:57 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByAz-0039sL-1T for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 12:10:26 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 5965B58035C; Mon, 24 Jan 2022 07:10:24 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 24 Jan 2022 07:10:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=dIamJe71dG+Zox +zSJ91KvmhrQ+mqndeaCChM+4h6+0=; b=WDYQKVYH+ZiKUwKq8iAnWtalF2X8JA 1oHvo9ex0o/zEHl710TxdhfaPhj9zpQTNFDf6rnCSOxejGqKJs8yIt5mVwnSMiEX FgqG8k8/UjJIhXc5JwmV57gYBASt18F0FAMh8rPO0/AxM2rl6nwa0/uZVGV3a0sO 9m6ax5igUoGBuBmK8sCGVCERiB5W03BT7dycn8dHdsBQELaYbsoDhVEHTTpvCQix X/6ZeWCQxYvszf6WfZ0N39SIZ6ZAz1GDsjlPGD4Uy9QUWVF3qTeYUqQItRm5zQSU rA/EcKDsAea3eTuSRHz/mWkelID9ycSgXke5Cq8tH4M9yR1DThpHm4Ow== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=dIamJe 71dG+Zox+zSJ91KvmhrQ+mqndeaCChM+4h6+0=; b=iCDmk0rcRelouNrStnu2YI U54JakfTuK/+vTEUVtRYWyO9c9PDNDW6k4mvr0RhzTgboFlKTmODFcVQxpiCjH2E fqAMPm0k2fDCoM7OCQZhCZRdinYqldw195wck8tew4Z4zWQiAnqKTDh7Wx7BJqO6 zwR3zI5eQr1LnNvwcWhT/m0kp76dyCRLATvgQbnOS0PnNBGS3/OlUbOX7fwCYK3+ ri8uga8asxncW/B8uWvWFOAG1dOn1BrnI47PYoKBhlSjWev3Va2ytwrW7sga9l6V pIOO4+/V9IHD7BunTz9ytdJRo7oCx5sK7htF9KrqIr4HWbQFnI6e7DpBZAaBEqVg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdeigdefkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomheptehlihhsthgr ihhrucfhrhgrnhgtihhsuceorghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgvqe enucggtffrrghtthgvrhhnpefftdfhgfeggfelgfekjefhkeeigfelleefhfethfehfeet leeggeeggfefffdvtdenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Jan 2022 07:10:18 -0500 (EST) From: Alistair Francis To: broonie@kernel.org, robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org Cc: linux-pm@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-imx@nxp.com, rui.zhang@intel.com, alistair23@gmail.com, amitk@kernel.org, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, shawnguo@kernel.org, Alistair Francis , Rob Herring Subject: [PATCH v18 1/8] dt-bindings: mfd: Initial commit of silergy, sy7636a.yaml Date: Mon, 24 Jan 2022 22:10:02 +1000 Message-Id: <20220124121009.108649-2-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220124121009.108649-1-alistair@alistair23.me> References: <20220124121009.108649-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_041025_216582_B2081446 X-CRM114-Status: GOOD ( 11.19 ) 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 Mon Jan 24 12:10:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12721912 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 8B800C433F5 for ; Mon, 24 Jan 2022 12:13:00 +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=VmOUn27RkGXrRG88UMhVmsoxKSlzlfJMiCPt33Jp8hk=; b=aVTDrqWY4Gil6Q bh+bkJaIAa8smteLgT5dJ2uAni6zyF6Cjv4pnXZLBeFrTxyTFGUfoSVLdqkNj9I9M96/9M7F7Z/Ym Py0JtMRceTiPp4w+vxZY5RnucN4whzhsG2y9omMJ5GzGbW3OPwtsqfrnlenWrsq8be22/q7BRhDJi iTZ5GIGJyUakuHuiy+iYeGbLHgWT9aYgcd0yXDe1zz8AqCD1WitRiBDrA2VFd05g0gQRSkNOBPADJ en4g8J+SOsOEWUAmF6mnV0QB6tixS36hsyjOBLT1d1LcsPMib2Ay6+7ItUexBPi0/zSgXDEmp50O9 WhZNe3otbQ4Uvn65QGjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByC0-003ATx-V3; Mon, 24 Jan 2022 12:11:29 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByB5-0039wI-B8 for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 12:10:32 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id A294258035E; Mon, 24 Jan 2022 07:10:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 24 Jan 2022 07:10:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=1+O+BD4KhhqplV X1DfTshC/FNHBhlW8RmbwpMMquOa8=; b=nYBg0sVH4ERV/xBNz6d59OaKrPQpyc iydArtR3CWU8U58qb3Wbil9xHsdKSMH6U8W4vr4QJj6uTq/pMaa4LQDPKeXx+hE6 LcNFr6+jkGOfj9MNSgxCHo7apaynr/QGw2RfJL79IdCwylGWuvpx9lv+NcSuQ2Rh ryEOT13BkrzM31CFIHvhw4JwL3MkM6vj2qTNUe23awF5kEFcHcP0aaIQ7PRWhlFr D/Mu6jyuqZ9Xp6MLlvX4YA49Npn9d1LL9ogh4KBO31yfokF2ktREPCaXR2ayKs68 s1WUSgWfVKatZLhCMKWx6l+hx+Zfd9nmFMaNlefRRt/YyGbeQa/3PZjw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=1+O+BD 4KhhqplVX1DfTshC/FNHBhlW8RmbwpMMquOa8=; b=GJQN8NyXRTlp29mWRRs+75 wFVrdTHU2pkQNAFz6z3BcgRl8kn4sZm59saeGqiD5o9pGEqVJcJKZgi2O8EOgXqW zatRnyRQ0Xjy9zHVelvIaqv61R/TUtRkSbWSaRyv3sFJ96f1ke7df9S3orAkuX0/ nbQ/jsg7PyD80Q7K7BconJAhYj7qE9ky+wfLfo0PmL8Bt4gnrhbVv9MPtvctk7Hg tIAAZ1Nsq92R0Xttv1wuQB8ac/TOZv+DbVvRE8QdRH2YhLAvkz2UIOgW28rXtvh2 ZTTZZ0VeaBwLLYfMomPxCwmX5rqqa9u7kcNMr7nqvXvfWG+Ut6XKLtXLYlDEQDtQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdeigdefjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Jan 2022 07:10:24 -0500 (EST) From: Alistair Francis To: broonie@kernel.org, robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org Cc: linux-pm@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-imx@nxp.com, rui.zhang@intel.com, alistair23@gmail.com, amitk@kernel.org, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v18 2/8] mfd: simple-mfd-i2c: Add a Kconfig name Date: Mon, 24 Jan 2022 22:10:03 +1000 Message-Id: <20220124121009.108649-3-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220124121009.108649-1-alistair@alistair23.me> References: <20220124121009.108649-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_041031_509986_DADF27F5 X-CRM114-Status: UNSURE ( 9.22 ) 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 ba0b3eb131f1..e0d2fcb10a0c 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1188,7 +1188,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 Mon Jan 24 12:10:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12721979 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 03BFBC433FE for ; Mon, 24 Jan 2022 12:13:27 +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=dx2sa9CD88EocM Hm+xxorVMViobGjoDUZ7w5u5y6QWK5I2UifyWLeuc78yZ+J6NvJXv6h0txV9K3TrFW2Av9gYSX9St /31xRzzCOsrx7h/xzLQJAodeePcr/OIncgtJenMY6f/gAjRDMOAH4mBuS+Lg+I1DFbaL3FrXW8frb NqrQXB1R2l5Rz4vsW8WX3heO4uokm5hRos3/EyfaZ0oXi70ZUsjNLsrhg03aifx3G4bxJ/3NcQ54+ h7CzAIMMpJswR/EF0yZkzHNBo3yxOOprEkc77KwtVOLaRU9RnlywUfjpreG+nK9YerEWCdAUZwFW0 1NIU36LO/xvNYdG2rrcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByCJ-003Aea-Kg; Mon, 24 Jan 2022 12:11:48 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByBC-003A1J-1X for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 12:10:39 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 49142580355; Mon, 24 Jan 2022 07:10:37 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 24 Jan 2022 07:10:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=iCdKz1fAS9RSqr 6MdMDps0wFHMwgQu8juRHJqY1g5io=; b=tC9OKnSnl/fhfkdwHftdcxVStMD3qw 0AqfNaq2gXfJuefS/XgoWGknnXkjt2IevzUl6TneM6B6jQeZVQ88BUHlgEK+Ka1t jxGjqXu27D5JNd8jlVcPqBRY2suN1JwzLRb41SHQOvuLwPAF0VQsDtcZ3japcdJ7 0r1qt3CnPlsQknHzLTUl84b6YIAdv6Ro+4b1eVex9YSAsqgmsxwUxTZ7chSnpL0z MGlfMEXkkgQxluOS8vgwcXQOQNx9MUnVC6OmFK5CTLML4eIyA8rWeQe81ExS+l8H i49gSPhdWc2xvRs32FriNF/AmxJ7YF6vYyGxI3SWFq6wFwmeNuRlzzBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=iCdKz1 fAS9RSqr6MdMDps0wFHMwgQu8juRHJqY1g5io=; b=MjhIC3VlaI5jQlDUqsjtsa DJZxRG5NWiZ1tzlaP5ZY3KrKe1SM60m/1uFbav9DhGuEKETLOdX9hfsUQVdSU1lo yzpFNAr674IPCPQiyzjKczaGUK9u8SRz7l6VUCwhaHfn8DCOPs8V2G584JO6j31z 5Aor3pq65XacT7pKzjabb27LNuvo1K+Bttb4op1CqdonYX1ZSQlJ3Xi7ozhT9eRb cPrgNwtUAFJEjakDBF+uqON9G2h4S2bfhE2bXoG/8I2tIcLNmsJa5BIC5FiPnlwp psNXjeAx+eV5xVnrQQGI+57SUcNKxFPkUggYWEwPm0Kz8cotf/SgnG2FkPQRlC9Q == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdeigdefjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepheffjeetteetke ffhfdvgefhgeevvddvueejheehfeevfedufeegiedtheeujeelnecuffhomhgrihhnpehr vghmrghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Jan 2022 07:10:30 -0500 (EST) From: Alistair Francis To: broonie@kernel.org, robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org Cc: linux-pm@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-imx@nxp.com, rui.zhang@intel.com, alistair23@gmail.com, amitk@kernel.org, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v18 3/8] mfd: simple-mfd-i2c: Enable support for the silergy, sy7636a Date: Mon, 24 Jan 2022 22:10:04 +1000 Message-Id: <20220124121009.108649-4-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220124121009.108649-1-alistair@alistair23.me> References: <20220124121009.108649-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_041038_212002_7ABC19D8 X-CRM114-Status: GOOD ( 13.75 ) 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 Mon Jan 24 12:10:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12721980 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 074A6C43217 for ; Mon, 24 Jan 2022 12:13:57 +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=M1WBrxXf+/NEIPB80bFuEkAMHL+q4i37oMCqsAd4fcQ=; b=C0ICRPKCCA1N/9 7Fp1oZ4cWiKq6CZSFaJQyRmHdbsNSNFjMOqvbn5hgSkbiYwbjMMyjqCWddU33g/nxudM6WTfGJzrq P9ZiCaqqf9yX6dWDo+I0F71CJGVG0cJdfIkYu36Lx91U/nX24GtsstE1ODfkO26YEjKqgOruJfTnB jWqO12/mZMLgEQ805QtLpKsOt8O4GzHYwP5rF1cxk7mzg712g7fEJIBNLUvFCV383RUQlkOX9+8/9 dL1xDIv01f0JSsLPeabEoE3xZFmg/M1MwFfsYs366n3zm7EIz9E+G8ojwAaVy4cexa8elequVI26j H8ujJRztFOj7w9nxL7zg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByCl-003At3-I4; Mon, 24 Jan 2022 12:12:16 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByBI-003A5c-D5 for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 12:10:45 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id B93F158035C; Mon, 24 Jan 2022 07:10:43 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 24 Jan 2022 07:10:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=2vNSWDzHD+EnJU o4FEA3VIpc1U/nFYsPa1ZA7cxtu88=; b=i2PzK9/i2SitTFv6E0z3aBq22vgSfy QL6pmz3mzaYdK0JVbeUKrPQJtxsUVjqTjf+BHv6P9l30KuP0ZCtcKxe5CggA1/cr nn0taX5gx1cgVELGBHsXwqBT7eRz2VbHIUJAR+nAStkZXiVarpYtsRYo5GCbkM5X gAsmS86pJjmUN1rIA6mLa6kQHwF3Q1x33HDzRzxGwrFCbhGXksQ1HoJriUsQboQt eqW8j6l5Ks4IQz7ejjrDReozzP6MLeEQV6LPP7uLHTdC1OTe3TZ0vQ09gt6dw4Gh SaCjqNEQRcFsui9d7GCb5DHUt9OvdrD5tVLNENrld6MNreGrTIiaVcEg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=2vNSWD zHD+EnJUo4FEA3VIpc1U/nFYsPa1ZA7cxtu88=; b=A0WqUx8993EeYj9IVN0ETV nArUMGFnS9KkWvAxw718Vy69EwXKRtBNW+QZMgpTOfW7ypZs7PzzF8n2JJryARpz kmElmzpUmqhLNivs8Ms/Pi7NwBZcWvqFwatFdYFEnyNiion4M9V2uvTZbTGO8wHS bO/AWJ8umOjowikJhubGi+CuyqKvx5oEFNKbRASkk8Sju+9T5yHiY2NV1z4yvBlE YncURa1/yUnq7JqWX9nipd3oYe5BhDQB9sQrGOHuiCqrXe4TqYVAe1Si5fEpTfxd 9sks6FYNf/icKzZS4qERAWV1KgP8r9K8Cc2MIEMzYHwI4xw9ES4fhFwRML8TGYZQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdeigdefjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Jan 2022 07:10:37 -0500 (EST) From: Alistair Francis To: broonie@kernel.org, robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org Cc: linux-pm@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-imx@nxp.com, rui.zhang@intel.com, alistair23@gmail.com, amitk@kernel.org, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v18 4/8] regulator: sy7636a: Remove requirement on sy7636a mfd Date: Mon, 24 Jan 2022 22:10:05 +1000 Message-Id: <20220124121009.108649-5-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220124121009.108649-1-alistair@alistair23.me> References: <20220124121009.108649-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_041044_557638_43F89010 X-CRM114-Status: UNSURE ( 8.80 ) 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 1c35fed20d34..25ae5f087ff9 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -1208,7 +1208,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 Mon Jan 24 12:10:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12721981 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 66C6AC433F5 for ; Mon, 24 Jan 2022 12:14:37 +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=J15h/7W8ciLyy6l2imsCVgFqGji3ICQDGpGfNbJCK8g=; b=1Y+QgSYcw62uAE /KCF7h18eJWfDlR7+jKG9wUQeULA/xR6A8EJwuDapNJn5SuZtoGRhZJ6oKpwv/xpm7T9JisCXF+jN oktAApXx6vSMZUw31l8754mqqtdV9rP9rMc9cPeAEmfUf8Do+IW34StCfpG7nAfMUkqJ/BUxBbjbZ 3LRFBKm4iAuRPDwCza/G5rX5AopJwk6lepwRjiiDmJ7q20imnnjAIB9kmMKjEM2E0L7g7Ow2Hbsq8 uI0T7W/YfIga1MarfcbMCCsX4siMqB7jwOaHSx1wGszMkehveQTRRvP//livjjS4JE4HC+XbIpPIA nwwfxTSXK3KoNjIKbHFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByDG-003B7Z-0C; Mon, 24 Jan 2022 12:12:46 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByBP-003A9t-7F for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 12:10:53 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 7E41C5800C6; Mon, 24 Jan 2022 07:10:50 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 24 Jan 2022 07:10:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=CIetouW3Bv/ITY QwDW70ifSsbnf+csJT+kKRfO1FjHg=; b=K4OvP8x6lYz3KZ4HKpNRLCzupVqB62 oFoR5Uq9MEI1An+Pw+HEZJWeB0Dq4wRjytPCesv/fPsbf8vBSU2m0941wiEPhLbX 3sXlhx1Ki6dB5K2dpzYykmV7IYMKnQYFl8pg4eucA3b0+BrOps8ZoitYSc7RBEMr l4oWrtu0dIQs7qBXqQvhoYiAaz9WJQZKDlv4Q3khbi/OVneFCsnXzanx2uXecbn+ lo0g6n7xcIPOT3Ae2dyO49OEZ7s3MefkNMrByLXTKJktZv2dhqh/FzfBtTEgu+sX WmH4hgraMu89ozjqJGUYREOoM/VAt8bQusHvU3T31jRAStzKi0AVJK2w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=CIetou W3Bv/ITYQwDW70ifSsbnf+csJT+kKRfO1FjHg=; b=IxBojMH28Gdt021hq9FJMP bCead0ALTM3Vib3cLGS7fvTutwjRDkl5ejMdMPtUPSA/mnGJ+tOr7gg0m4ke+nkI S3bPMydsrf/7TKcHxhj9nbWfENt5Kgixv0dcU7R0iT493n0qY0BVeSDbW1Iat1nY vrso02rmTEaRQGAnM6maSKNnLj7Mxxt+WYXkc7ePc6XkzFXi903nKVsAGduGFxeQ fBFbe40+apdoD4dUcL2XGy91HNadPBJp1GhAVVzu0hrS2uFq+n22dKMBISF12qF6 oiQNtpUdCdIeuI88PhILY4HF0JxFoGBjQRq2lbgOi7LRVHIvxeYtw/Vm5uEYuYOQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdeigdefkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepheffjeetteetke ffhfdvgefhgeevvddvueejheehfeevfedufeegiedtheeujeelnecuffhomhgrihhnpehr vghmrghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Jan 2022 07:10:44 -0500 (EST) From: Alistair Francis To: broonie@kernel.org, robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org Cc: linux-pm@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-imx@nxp.com, rui.zhang@intel.com, alistair23@gmail.com, amitk@kernel.org, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, shawnguo@kernel.org, Alistair Francis , Guenter Roeck Subject: [PATCH v18 5/8] hwmon: sy7636a: Add temperature driver for sy7636a Date: Mon, 24 Jan 2022 22:10:06 +1000 Message-Id: <20220124121009.108649-6-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220124121009.108649-1-alistair@alistair23.me> References: <20220124121009.108649-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_041051_400299_75D19711 X-CRM114-Status: GOOD ( 18.36 ) 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 df20022c741f..6e0906ef5d25 100644 --- a/Documentation/hwmon/index.rst +++ b/Documentation/hwmon/index.rst @@ -185,6 +185,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 8df25f1079ba..aa5785e657a4 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -1672,6 +1672,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 185f946d698b..fe54a3dfdb03 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -186,6 +186,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 Mon Jan 24 12:10:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12721982 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 3BC8DC433EF for ; Mon, 24 Jan 2022 12:15:19 +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=x4jRT35bSXC8HOIDL65ROIB3MCeZpQ/Hwx8TR4mgaMU=; b=iiwl3DPNgn9o0n qpqnLEe85ajTvtG9XfzfAQv+q+dVxM/GhJm7sXyEK9HmqVAmL1em6xxJB7iCvClj4F+B3Ot9LksZL 6j3Fv0oqxkyKKdQyphr5Y7Ifsq5PPKmbS6ce8YsDmdY4gxKozJ4QcRhf2raiaGjF37Efktdy4lF0W zTHMLZVrv3bIOQcdDeMYUqtSWg6J1Dt0YjdtY1wFM60iGMUID+L4sCHbO3PSMo7HCoJuCQy4N7iJ1 Yc+QAx7Zck7zVS6IQV+3+YPgL0itcitAt5+hz1ZZswrVEPxLOZVLLZFGaxoP1SIv+s4yorJt7744U 7le66hmiZJg1wcwun6qA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByE5-003BTg-Bs; Mon, 24 Jan 2022 12:13:38 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByBV-003ACu-EF for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 12:10:58 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id AEA8158018C; Mon, 24 Jan 2022 07:10:56 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 24 Jan 2022 07:10:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=mRrQFEjNbkGy0s JZ9IwlrTMAQp56obpeO5eszroii5o=; b=SM/WKMXdz7mOiS4UnlIQUNCV1n7MjN ZppMuaxyKZUqXyouBiBypy0/44fkXdqXf09oIH8a8OsAuZR8qwC9+FzrYG2y4uRK iUX+oadLsyneMgif6IQUlGYRIfZbwYJ25U4ey8efYubVEeTDGe5HhhdUwrYDk+SL PUdJ9F8V/UND9GrWpmfy76ziBeQj6yJmNq/ivfGxJZP0Zv/ecKc8NUqx4QnIYCp3 ln9FiziEArdoR0l3rr9HjuC6+vd/4JYzfpCR5rRtpSBLVe9nrH9AxSXQt1E8K0vD 4bHli5RIAijHYMOkguq/OqEASOQPuCyh4Ts8/AuTd6bCbyEsuVaSQwlg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=mRrQFE jNbkGy0sJZ9IwlrTMAQp56obpeO5eszroii5o=; b=UppeTISKUbay0q0KKvNEkv bfDqGk0kZfYqiUqfDAtBNeVUmEx7fv+IvbX+6dFFIjhsu//PzYtazrWJP7ox6K44 A1YLojsiXQ6Ec28IV5vr0ZWHTp1k1vxCKViHWfXaMLnWuMwjR5a8zQNTkv6EI0ck xhWVFGaFYSpBneNkRfw2OFi6TgjJMTDjiXB5FoFXVmG0eRwZ/KalHeXhhDASxDQ3 cwgb/nnsFQEje4sbow/YwkCf8rS4eOOrwyLLYmEp5YA3kcMBjumPgdQT+X2FtrO2 C4rIOJfLMS9KkB+/dSN23+4+1XGGxlcebIVTulw4vcpmFHDC2lakaCx1q0D6nt7g == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdeigdefkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Jan 2022 07:10:50 -0500 (EST) From: Alistair Francis To: broonie@kernel.org, robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org Cc: linux-pm@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-imx@nxp.com, rui.zhang@intel.com, alistair23@gmail.com, amitk@kernel.org, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v18 6/8] ARM: imx_v6_v7_defconfig: Enable silergy,sy7636a Date: Mon, 24 Jan 2022 22:10:07 +1000 Message-Id: <20220124121009.108649-7-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220124121009.108649-1-alistair@alistair23.me> References: <20220124121009.108649-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_041057_609467_75D3A155 X-CRM114-Status: UNSURE ( 7.19 ) 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 f7498df08dfe..37ec95fce3be 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 Mon Jan 24 12:10:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12721983 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 5A087C433EF for ; Mon, 24 Jan 2022 12:16:16 +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=MbQxoOuehMERx1 MHjLk1qGNgMMjpemYL0ZLQs5JYx46XXpjK3IUWa1/U6YX356h0XbbSBle2Ky8LPkWWZErBCGpVLDD icSrcU41gpDqEYQ4ta+qo6pIKaBaTHR/tvZh1xQWt4qvwkbIGNfNJAcTZC3L6KWJpvGiT88hGPEqH QpElBOXmkLJYqndRVwzZNkUYo9NvcRufI1YJRcTGlDBaRYmqLeczIUVaSEwMYNBYjytsH6Uet8osj Ro4nkn9ZYFb3RaMrkhuLEtDm/cPWSA0M4kxi30Gy1Fx5RYF+dszlIVLpkMQp2u9WbQ3Lvh2COC/vl TyUzDNykWBrcYg7D9KJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByEd-003BoC-V0; Mon, 24 Jan 2022 12:14:13 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByBb-003AGa-OL for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 12:11:05 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 1AF045800C6; Mon, 24 Jan 2022 07:11:03 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 24 Jan 2022 07:11:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=cz/W+o1QaYv6KI uV4GCrT7jbxJ0xS3lwdZjaIKs47tY=; b=zkKju1Exn64yUuWCtIhztzVSDwhS23 Q6eBc7UO3MhoRDh4c+jxoCNJRn+qJzBEZ5f/7auA2uDjcJG4uK+I2KCuEvrriaLJ 6aN/clPy41yd42vTXH1HUBIotWkfNm6GSP5ORAr3/0ddjDIVA+AxYbRV81QcVdDN eDqlDRXEbvEsimJqQ67bBPml50iCX+3PZUYSQ0lXZWDzuaB0WZuH7e8JbwyA5aNc aUSFiPO4QM9ALp7ONFWDqFAL93dSQdgRrDEZKlDfLNgKMCAiYNyr+NB5X/F1B912 OeUt31qo0Cvjrc8FuwH50O5Io/wfSW6outHV76Srobe1XG/Hdmz8sM2A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=cz/W+o 1QaYv6KIuV4GCrT7jbxJ0xS3lwdZjaIKs47tY=; b=F+eMxLXY17mxzbLPbfbNT2 q8DzLgrNG6/CG/HpNbrdxNdzuf5KrDxYbojqyfogGf0aMFvrKmgxJi/erLaCdjOT d2Y+i+pXrH0ddb2qG5RbQYsw+e+QK6BXcss/sx6bY8WH1Dw/pZoMxkgb3Nn8RMAz j9zirzcft7L9bp9Ly+fX0uzNVXzYw2Rye6WwGznD8+qUssjy1GwTHLYTMGIRx52n TgOlAWgPJPUWX28/9R2V58iB0Lwrvkm26A+lwjA3xN7FBnnY6s8Ze58OwGMw7F+a mm60YR/A/BZA5iGK1YKkmMTKDa8cr2J5Z2MsIyVHgmk3EgsLAbP2kkchw0q7vV+Q == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdeigdefjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Jan 2022 07:10:57 -0500 (EST) From: Alistair Francis To: broonie@kernel.org, robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org Cc: linux-pm@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-imx@nxp.com, rui.zhang@intel.com, alistair23@gmail.com, amitk@kernel.org, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v18 7/8] ARM: dts: imx7d-remarkable2: Enable silergy,sy7636a Date: Mon, 24 Jan 2022 22:10:08 +1000 Message-Id: <20220124121009.108649-8-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220124121009.108649-1-alistair@alistair23.me> References: <20220124121009.108649-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_041103_940444_BD35E6DC 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 Mon Jan 24 12:10:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12721984 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 43CBDC433F5 for ; Mon, 24 Jan 2022 12:16:49 +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=BV8I5nP+5MRqPl HnovLwomoMMpaCU5ng75gbdUFjTJ63GEF9i+kCfT+uKGo/cu4gKvZlCXWEU2oIUWU1HwJTaFmblOt 3jgV+posSs2S8gT1PW7wbEWIK49YHNtTBf+IRUwBDKUOtKgFRFju756ISe2eoxxdyVSZ0UKP8wyE7 sktvhnWjBnIDuLGhLEkNF/J+Qtp5I6BF/zJj9ofhlQd2sWqrIguoUsq6iSub8H2YDNg+BGJaHNTrk UFZPW3NlBdWyf0J7Lu6zruaP8ljFYLG20ofejFwSX31FpthesImvdzeNzXPqh3h6XCLjuvX1mV+3p K788iWAKOmqmLPbRgE1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByFY-003CHP-AE; Mon, 24 Jan 2022 12:15:09 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nByBi-003AK3-8r for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 12:11:12 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 8198C58018C; Mon, 24 Jan 2022 07:11:09 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 24 Jan 2022 07:11:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=iFE30ZBYJvCyNk M0bB9sCSLWOJ+dFFVmxcQv5U8f2Ek=; b=sFaJZbgtUeLAWxocb1HvewYSWmgi1J Re1ZdEuZzL/938sA+qmN8/V9uqSF0L0vNex+CnpmYcNX7FQv5Ab+4EsQWhgwYyS2 BxBRjkarT13aS94OAP7CA5+ZtFovRlo781V9mXCY0+2naEz2uqm+thCrqRRTjP3C +8i8adF5ILCqVpjdpmFXgJbcxkt92Hao8M++0wm+u3kSM3nNe7kFR3T5pAqhSVPI NHrGxktbZFDL9myBRd1SKz9DtxHXVr6I9e+GSntdBdwhR6d92bXLqO7AqkBe1XC1 vQn27LWHTajONUzwk7ri/UDXb2+eoaaiapnBgFuf9r5OKtkIAAfJPC6A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=iFE30Z BYJvCyNkM0bB9sCSLWOJ+dFFVmxcQv5U8f2Ek=; b=SxrHIhM9QqCGIGebAZRtTh YexoR8oVDJ5lzGLRIsbH0rfne1ycAoMdqmKWdIiKzg2sA+KPuIZPzIgprJlWMzp3 BkGCC5TZ6heQU7KhS5Mdu1nzti/9e4oeCVvl1lD+vN4q5jPJmJ132dLU2Ind1aVT 3l1PnYZ2oJYPOKC8HG/N9WdJcA2pxZ0GfoaWpAwUUXDkqFDdAxYRWFw80esffR7u qX8Z00KRPR8nOoWgvEIPbnjW2IPIchNYxZvpRk9+jJCoPphrDkb+ZNit7qenWDLS 6+L/tk4zNltJR5PTU419W3ecZgTL4Ahcmlwm6rhHe6lrqyWJiLJxLr/mli+pWRMQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdeigdefkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgepudenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Jan 2022 07:11:03 -0500 (EST) From: Alistair Francis To: broonie@kernel.org, robh+dt@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, lee.jones@linaro.org Cc: linux-pm@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-imx@nxp.com, rui.zhang@intel.com, alistair23@gmail.com, amitk@kernel.org, linux-arm-kernel@lists.infradead.org, andreas@kemnade.info, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v18 8/8] ARM: dts: imx7d-remarkable2: Enable lcdif Date: Mon, 24 Jan 2022 22:10:09 +1000 Message-Id: <20220124121009.108649-9-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220124121009.108649-1-alistair@alistair23.me> References: <20220124121009.108649-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_041110_458183_446CEEB2 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 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