From patchwork Wed Nov 10 12:29:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12692157 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FB7DC433EF for ; Wed, 10 Nov 2021 12:31:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3ACCF6102A for ; Wed, 10 Nov 2021 12:31:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3ACCF6102A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=N+tj55PW2ZblUMLuP82Q+iqt2M3v+t0BFCXQutPxaas=; b=pmq52bs1xRrFjI jqiaYBINGSiox7Gr4ixNbdOgaRot+7ARy+yJ8G1Dpcm9ia5KfF9j0GTCFxTak/xEskcbmFtkQ7AjV o+rgodwNHearIY7lHtfvep7VoH4azclUNIEK4QFYAhDJLeP5slVC8Z773IO5Zb70ep65xoUJYECmt N7/WAXtHJdYemQSslm0oAmNNLr6fuPglIeKAprDbRY3MhDU2VVN+reVgZWJeEYj2bnhFuQyqkmReI aAyuD1BxqY3nMnmELaKIPZAxomM7Otu3dzemN/zVxR8yV32vwmmGI+0IPhodc9VGIbHholW9/Qy79 zpiTs8xX4s5iXvaCG/MQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmk5-005P1n-Ff; Wed, 10 Nov 2021 12:30:17 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmjs-005Oyj-IC for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 12:30:06 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id D6C9658086C; Wed, 10 Nov 2021 07:30:03 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 10 Nov 2021 07:30: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=xPIOWPlEpcSPg VeMbUyqzIh0yquJ8UKRhzhIcmgwvNU=; b=vGFIeCbcjdwHw05iRAS3FQRI0E3Gg Rx2hyhmX6ExPgKIx81LSzYsmfVaR5wuOqz515OtweVEZsbfrjYW0dpY9DLtTjeCP 9yr3gMPecNCczIOxyRMK7aMwNMke71sRP1XRSbjc/J6bdujIvn0pUq92J9jafz74 +2gRR7BzA4LL7j3NmyY3XQBUN27Nl9loJ9LcZZ6zIAxg0XJzFNLLuQDpAcFjGXhL LjxTMta0AfF+BSyKYTyvse/YXqfHuj8uEcFw6alJUYZNzrCW2/1vasQWZQL1T+tP mtm4O+xSPxg9KnmpDZBjquZeKUOG8m/9AoX/mm1Cs2aWScJfTTW0SGy+g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=xPIOWPlEpcSPgVeMbUyqzIh0yquJ8UKRhzhIcmgwvNU=; b=dcKRWJXD bi8qTwrHPoVvDQxbgtgcEtYijl46IUzPVSzM7bVAI6zOl9So1arSCPHIhDYSN4CS pfmhP0giK//p1sM0ZJhfyTCa7m/acfYOJZCQ+O4LuU708jJF/UkVq1E5jQg5GnGv BOrg2YjeEC/xg5CnG3dNvArCk040YKguXEsTuXFVApSMqqhXctZOamZousIjwMy0 zrUWgXvUvcyFuUVqc0mWNP1BAF2EE+HYqr3/JPsR8W9ArEqT9wyqPuykDHEmZlt0 LPKE17agECOZygyloLSk4K/+VZh01NhkJnOQEPcnBoZCEtWbsyQnH1eDJztoVnPb YJGHOMjefq35+Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudejgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomheptehlihhsthgr ihhrucfhrhgrnhgtihhsuceorghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgvqe enucggtffrrghtthgvrhhnpefftdfhgfeggfelgfekjefhkeeigfelleefhfethfehfeet leeggeeggfefffdvtdenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Nov 2021 07:29:57 -0500 (EST) From: Alistair Francis To: lee.jones@linaro.org, broonie@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org Cc: linux-kernel@vger.kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, s.hauer@pengutronix.de, linux-hwmon@vger.kernel.org, amitk@kernel.org, linux-pm@vger.kernel.org, linux-imx@nxp.com, alistair23@gmail.com, andreas@kemnade.info, shawnguo@kernel.org, Alistair Francis , Rob Herring Subject: [PATCH v15 1/8] dt-bindings: mfd: Initial commit of silergy, sy7636a.yaml Date: Wed, 10 Nov 2021 22:29:41 +1000 Message-Id: <20211110122948.188683-2-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110122948.188683-1-alistair@alistair23.me> References: <20211110122948.188683-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211110_043004_704496_950B1559 X-CRM114-Status: GOOD ( 11.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Initial support for the Silergy SY7636A Power Management chip and regulator. Signed-off-by: Alistair Francis Reviewed-by: Rob Herring Acked-for-MFD-by: Lee Jones --- .../bindings/mfd/silergy,sy7636a.yaml | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml diff --git a/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml b/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml new file mode 100644 index 000000000000..0566f9498e2f --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/silergy,sy7636a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: silergy sy7636a PMIC + +maintainers: + - Alistair Francis + +properties: + compatible: + const: silergy,sy7636a + + reg: + description: + I2C device address. + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + '#thermal-sensor-cells': + const: 0 + + epd-pwr-good-gpios: + description: + Specifying the power good GPIOs. + maxItems: 1 + + regulators: + type: object + + properties: + compatible: + const: silergy,sy7636a-regulator + + vcom: + type: object + $ref: /schemas/regulator/regulator.yaml# + properties: + regulator-name: + const: vcom + + additionalProperties: false + +required: + - compatible + - reg + - '#thermal-sensor-cells' + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@62 { + compatible = "silergy,sy7636a"; + reg = <0x62>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_epdpmic>; + #thermal-sensor-cells = <0>; + + regulators { + reg_epdpmic: vcom { + regulator-name = "vcom"; + regulator-boot-on; + }; + }; + }; + }; +... From patchwork Wed Nov 10 12:29:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12692159 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61152C433EF for ; Wed, 10 Nov 2021 12:32:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2ACEF6102A for ; Wed, 10 Nov 2021 12:32:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2ACEF6102A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wgvt0tXZKi+CwZ6mcyYjSDLP8Y0b019yx8MWzlB3Wxo=; b=12vt9/xSFu9H3e iQJ0nxTFZJx2eDH/tJEDtNca+uLzaQ8ZOL/lGhS49xkk4gaqBlFalEFDivqy0pK5f41TNBV/HjmKD 0zDBl5QOU+5D99bYZeWOlXnqYuMLyYcl1lrS+6wWJSKfux0vOWOOE4h3Nat5jUGAgTavVCem7EaQS h/tP3secvzvlh+/8UiU0hH/1lo2j+YlQ3uzseCrL4Ppp91m3wgxLkIiKxXBKxIG9ATi9SRYhebo/7 Oegg2qd18pLaKEYe6+29LgCTMKuPISHVoDMLmlSvOTMNozqAJfXWbODHMkEhqtlcq56rRLFqjlTOB NgaFQGlanNoJJ5dB/h9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmkG-005P3v-4S; Wed, 10 Nov 2021 12:30:28 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmjz-005P0H-3j for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 12:30:12 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 66A8C580861; Wed, 10 Nov 2021 07:30:10 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 10 Nov 2021 07:30:10 -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=ku0trG0+QwKBIi/X5vSbfI0chJffN XwkPf+wUILzcxhY8PNy6oQjTnqKmicNSACu4BQpF5jPXHuiQTFPaJzOy+8zDkGWT +VxOKPlEuyIfNPGTBGSoQoSVcKkZ92I9V6LF3gRwnFCBG2LslAaOtQEHNg8eGKnl Sm9pVA0zdFcELIrwFx/OA1HdUR4cdb0KhkGIDwWrh+VbyWmeKJZlVo3urxOALCs8 Jb3GRmI/VidKTnPsVTbSmlNBQfz2CsFI+DfmbENyTz8bh5wcsU68FefxtaG4Uyfb XdvBvCYy+G3GbcDSbyB/FWiwZrza6mmI9ubxsiXkTRhglQRG5mhPVaNtQ== 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=nyRb0eSF tZlmbcifmpVzSNB4kP07GVnCJgufp6QGhWYScyH08ZexkO2x3Gmne87JLxS769ah FEDoRCRbbUPDOei6PBsmjt4WL7vKaCaE3y2sKSgw+tpTAPXWX9LS+6y8Yu4Y8Tej J6yj6sNvuYjmPk3tC4wWnFxta5r+t/YSeJkS+OrdezTPRGg+kj96CnCFIbgcbWqY M5p9CDzz9YQxaEP8BgvpEBAeEGFwIL1Pc/ZhBJtgPw9wHayvonITrxjrLXEGPn/0 U0w8pb44pu3ti3XWr9RhhVwrJhaSwPV0NKlTRLBBZhY/1g9/g3VgjjR5LHDVOotu 3MKlfZygAV/jvg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudejgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Nov 2021 07:30:04 -0500 (EST) From: Alistair Francis To: lee.jones@linaro.org, broonie@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org Cc: linux-kernel@vger.kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, s.hauer@pengutronix.de, linux-hwmon@vger.kernel.org, amitk@kernel.org, linux-pm@vger.kernel.org, linux-imx@nxp.com, alistair23@gmail.com, andreas@kemnade.info, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v15 2/8] mfd: simple-mfd-i2c: Add a Kconfig name Date: Wed, 10 Nov 2021 22:29:42 +1000 Message-Id: <20211110122948.188683-3-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110122948.188683-1-alistair@alistair23.me> References: <20211110122948.188683-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211110_043011_260960_343C2F08 X-CRM114-Status: UNSURE ( 9.76 ) 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 Wed Nov 10 12:29:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12692160 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDC1EC433F5 for ; Wed, 10 Nov 2021 12:32:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8ABF6610CB for ; Wed, 10 Nov 2021 12:32:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8ABF6610CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6PxuAjQwYoGE8XmEIZqrRB5uzAqqAhrQ/JRUNGBwb04=; b=ORnHNv71bmweb9 U360qKHWAYLnPXgTjZlUkIxxz0jpX+6JrGHP6G+7xN14IVRbKoVKULRAjJPYVkAc/6ePrqoGfciOA 7xWpqGZNtFZqiyrF2Otq1M/zexdjCsIjYBrsoxjNNDtU2bJAnvqQlzaL2QUYaB7T/hr545bRJL8Lx N1EwE8aoBVdAl3JmISNmUQ0jAeCiXb4Mjy7uq2XXkE5EYHQ9NQfS+816D2ab41zzk326OZrVksYcY woIgNYTLCaBhddgNmgVvHT8Uz5sG8dVNl18foKpGuYjiWhfHJ7vpG9OU17WJMbE+7RA9FwPcIUJF7 0y9M5HsPLF/xSlJlnzSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmkT-005P6q-3O; Wed, 10 Nov 2021 12:30:41 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmk5-005P1t-Gl for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 12:30:19 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id CBBB4580867; Wed, 10 Nov 2021 07:30:16 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 10 Nov 2021 07:30:16 -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=LuBuJ51kAs683 zqagRQH/JKcv0PkL6c6myFxIpkwVuU=; b=WXqqYsLPWMrZFTi+OsHclSw1gfZ93 lKgMeeGpn+t/n5l7QFtDeqOnnEETnyPTSbVFmoliEZ0WVBgB5ZF1GpQ85IsAKuCZ RpG4Ou49VyjMHeJnCt6AG9BgmiG8/+9hU+QEyoglVw5x6V4yGviaaPBSw0Pa/qMC 6OheWgKn3zpLWfuHyiJCDlZrz1pgiJHHK2afUVxWkfOydO5A//lu5jRGhrw/pSpd 6o3TVk/WwYUt1EtZFILw0KnWfzjysj2mf8/5DZdluYV8Y+FCTBOqE5iOuZ80gxjf ubv+h2sXabu1qtmYLhrtQfQLwOUcRdzA5FDh6FsKsHnMwIkLOtt2RfRig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=LuBuJ51kAs683zqagRQH/JKcv0PkL6c6myFxIpkwVuU=; b=JXjigXYy 6YiwB1K4VPfRsQO8R3uJoLjF4r1VWJwEJeAAVcWx573qVvoIecA8K8W7NTbafrpa xSK6XWtapGILZM+0+iLPa5kzMvVmsK9MyQSjR/WnFxdWX1feUha5ga8tLPwbGzCz O7p6BbUYQ+r6jsxbVYZrc4wBhJqjJD5Axbb1xHBNs7W07o8616jPcrS9LjbEyI3P yFgi+xyFg1kRoRl4Hoh0ootxhBHreS4dhALw8nhQOSLKWmk/RsHpMIzN7YdxQ1Lc tu2rBJbGRufQwPFJGuMqoWHod63DMR74lRhzIsKbZtH1C6dF8lZKrU/8CewL+gnw vFEvbxJr8pGDrg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudejgdeflecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepheffjeetteetke ffhfdvgefhgeevvddvueejheehfeevfedufeegiedtheeujeelnecuffhomhgrihhnpehr vghmrghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Nov 2021 07:30:10 -0500 (EST) From: Alistair Francis To: lee.jones@linaro.org, broonie@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org Cc: linux-kernel@vger.kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, s.hauer@pengutronix.de, linux-hwmon@vger.kernel.org, amitk@kernel.org, linux-pm@vger.kernel.org, linux-imx@nxp.com, alistair23@gmail.com, andreas@kemnade.info, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v15 3/8] mfd: simple-mfd-i2c: Enable support for the silergy, sy7636a Date: Wed, 10 Nov 2021 22:29:43 +1000 Message-Id: <20211110122948.188683-4-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110122948.188683-1-alistair@alistair23.me> References: <20211110122948.188683-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211110_043017_680771_F3978146 X-CRM114-Status: GOOD ( 13.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Signed-off-by: Alistair Francis Acked-for-MFD-by: Lee Jones --- drivers/mfd/simple-mfd-i2c.c | 11 +++++++++++ include/linux/mfd/sy7636a.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 include/linux/mfd/sy7636a.h diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c index 51536691ad9d..f4c8fc3ee463 100644 --- a/drivers/mfd/simple-mfd-i2c.c +++ b/drivers/mfd/simple-mfd-i2c.c @@ -62,8 +62,19 @@ static int simple_mfd_i2c_probe(struct i2c_client *i2c) return ret; } +static const struct mfd_cell sy7636a_cells[] = { + { .name = "sy7636a-regulator", }, + { .name = "sy7636a-temperature", }, +}; + +static const struct simple_mfd_data silergy_sy7636a = { + .mfd_cell = sy7636a_cells, + .mfd_cell_size = ARRAY_SIZE(sy7636a_cells), +}; + static const struct of_device_id simple_mfd_i2c_of_match[] = { { .compatible = "kontron,sl28cpld" }, + { .compatible = "silergy,sy7636a", .data = &silergy_sy7636a}, {} }; MODULE_DEVICE_TABLE(of, simple_mfd_i2c_of_match); diff --git a/include/linux/mfd/sy7636a.h b/include/linux/mfd/sy7636a.h new file mode 100644 index 000000000000..2797c22dabc2 --- /dev/null +++ b/include/linux/mfd/sy7636a.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Functions to access SY3686A power management chip. + * + * Copyright (C) 2021 reMarkable AS - http://www.remarkable.com/ + */ + +#ifndef __MFD_SY7636A_H +#define __MFD_SY7636A_H + +#define SY7636A_REG_OPERATION_MODE_CRL 0x00 +#define SY7636A_OPERATION_MODE_CRL_VCOMCTL BIT(6) +#define SY7636A_OPERATION_MODE_CRL_ONOFF BIT(7) +#define SY7636A_REG_VCOM_ADJUST_CTRL_L 0x01 +#define SY7636A_REG_VCOM_ADJUST_CTRL_H 0x02 +#define SY7636A_REG_VCOM_ADJUST_CTRL_MASK 0x01ff +#define SY7636A_REG_VLDO_VOLTAGE_ADJULST_CTRL 0x03 +#define SY7636A_REG_POWER_ON_DELAY_TIME 0x06 +#define SY7636A_REG_FAULT_FLAG 0x07 +#define SY7636A_FAULT_FLAG_PG BIT(0) +#define SY7636A_REG_TERMISTOR_READOUT 0x08 + +#define SY7636A_REG_MAX 0x08 + +#define VCOM_MIN 0 +#define VCOM_MAX 5000 + +#define VCOM_ADJUST_CTRL_MASK 0x1ff +// Used to shift the high byte +#define VCOM_ADJUST_CTRL_SHIFT 8 +// Used to scale from VCOM_ADJUST_CTRL to mv +#define VCOM_ADJUST_CTRL_SCAL 10000 + +#define FAULT_FLAG_SHIFT 1 + +#endif /* __LINUX_MFD_SY7636A_H */ From patchwork Wed Nov 10 12:29:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12692161 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7F4AC433F5 for ; Wed, 10 Nov 2021 12:32:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 84EBF6102A for ; Wed, 10 Nov 2021 12:32:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 84EBF6102A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rEtCluzZXftJv1Cx+pDrB8fXqD+A/9mVILi+fE0UwG4=; b=d6AABIR/2eAxHl CQyJUD+XWRs9TlJsZgALrnNQfjo1+kU1lroqcFJpl10LqJf7l6Ji60qP31aO8ls2SfivKSZjHSNzA gnNVvMaf1d8a2jjxig2DAHn8P5qLnJ8jRwltvnuBYZW9fCbpvJDEKOMDHJfkuO36jh4AC4klYtWFt JaDr82kh3uV1fbsNA3bycufchx0ESZkWfbYpUq5rC9JKw6Y1n3LQOA0RUcDcM5Kqp17h92DP57S0S DekPIZksC89snKplbZz4iYyzolQJ8QSAk0xe22dFHxUw7D+l+9rlkNjLoGUS94yXpVlY/QJ/wJ3rO 1O89pTYJQvrLrRPs346A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmkj-005PDs-Q7; Wed, 10 Nov 2021 12:30:58 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmkB-005P3H-SC for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 12:30:25 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 2B1DA580869; Wed, 10 Nov 2021 07:30:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 10 Nov 2021 07:30:23 -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=gYLYvrAxI3X/3 c3mgOA/Ii05B95qk6fjjUUXWCEYze4=; b=pmP0n9tCtUd5+fmxb+wk4r2GCSahZ SQrrpwHfb3VmoZQ57cQB4s44KDOsWucev0maz7se0/iOJjVIipx33W42cAHKEo9B lnwT/Uh3Wfu4jsAh0Nre617VfL6nxvn4aF7kFwTLQKsot1JgbQm5zIiJGxI1PDdg e5/3gLCUWM9JzxLXrTAXDzBZsDGD8QS6/dBBHnl469V9K+55338CQCT2lHp6QQTc FhRyI14avHlAl8sS+U8mLxsN2ejvpA4QxAHeCy3umaR1lvejIVGhvj68Zjg1gJPY UPZnvhOVF1nUPmPQfzyfm9q21JHBpzhccNHf+Odpiodm0ZN3PPQ2JWsIw== 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=gYLYvrAxI3X/3c3mgOA/Ii05B95qk6fjjUUXWCEYze4=; b=eE6XjD0U Qmp6Jb9lg7cVtUSy649F7ycszzEbHpm1OviMPZQT59tAcpfTWabixqNdvxinI+sN h6W5DEXM2Mri11pEd/kWRgWz00/qjwCGHQqqmPfBgRfOCdNfqJuQSw4am1E1uRzx Inc/eeinJa08g0ixjbPgyLoeMvaLhQVE07PlhWoYVDnliWIZGYHVz3Pp2ppXJzeN v2fDpYApGlpSKSb3f8f3+dlrAXXH8FbvBcrpOfLoaVmTETArFdKXdnf/t0m5h4ir ILgfnZjj2oih24rQ+4HAfvYy0/XBrIoufAlEbISjaZdOVAlFiw3/6mg5Wmy+wrB7 JMamQRskMxCaPA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudejgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Nov 2021 07:30:17 -0500 (EST) From: Alistair Francis To: lee.jones@linaro.org, broonie@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org Cc: linux-kernel@vger.kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, s.hauer@pengutronix.de, linux-hwmon@vger.kernel.org, amitk@kernel.org, linux-pm@vger.kernel.org, linux-imx@nxp.com, alistair23@gmail.com, andreas@kemnade.info, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v15 4/8] regulator: sy7636a: Remove requirement on sy7636a mfd Date: Wed, 10 Nov 2021 22:29:44 +1000 Message-Id: <20211110122948.188683-5-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110122948.188683-1-alistair@alistair23.me> References: <20211110122948.188683-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211110_043024_015576_7B59BA8A X-CRM114-Status: UNSURE ( 9.24 ) 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 Wed Nov 10 12:29:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12692162 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B868FC433F5 for ; Wed, 10 Nov 2021 12:32:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D5BE6102A for ; Wed, 10 Nov 2021 12:32:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7D5BE6102A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cah1/awmcyX+s/Nx3aftdfJSfY3u4j1y3p0/owgAia8=; b=G9eNNnEqkV3WIU vkU3jjqJxsUj2bD+C5MGW0j6kz08f1/a7wzlhBFafHJFJMGNmjyp5NKsj9ghGEvtj6O5C/UvqViOi GgXWqFRXVDnO9edU5Fb7UpHiq4sA+gJczALWT5n6z6D9uCob8CX3OGzqLBiVfExFmBgH/Ny7vndVU zLGPqL6jAlAK8CpmDwMI6wVgSOVnoJEyRyBYXWZi4J0tHtLC7sYut7l0SuhJzIyTRCMtaFVPn8mB5 ARuUESBzyoU59YrClp4K2qy0BTponDyCip2yUQfEmi6xXFLb2uJBmKZiVb7r7w/m9B6X4/xzeFIbe 2nWExwGKlBiHoZYDjwOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkml2-005PNK-VE; Wed, 10 Nov 2021 12:31:17 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmkI-005P4R-5U for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 12:30:32 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 71BE7580867; Wed, 10 Nov 2021 07:30:29 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 10 Nov 2021 07:30: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=iy8l2/k4fz+dN nL088tkgbgbfdBttUJTxzjw7rleDEo=; b=xWQsnlnZlxznm6vfuRohPft92XRR7 MJbn8fNihM0yk1f1QhJVxL5h0n0tZWsGNJNxDXn7dRDQxbRf4Yh/1vm7aj6DwwsC C767MtdWkH+mOmQZze5xf6sqEtwJZ+OhL8RxCTOoG1FGX/7MaQvZUBF/vXNyu+6R P0y3XSrwFlKNTOtbKZYNlV/jWc8f0cmr4MzHGlai0oNTjDguZ/KYY4dqMMRtBc67 MoMudJ8cTRaTIfsJc21xxthboAyg/tG8JyO3semo1DcCarhdmW/zJ2F+yeKp3rYe FSIspqUSqMrZgMr6gU196zLDYhRnt+OKovi6aOhPaTLBGIrn4Sf8r//QQ== 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=iy8l2/k4fz+dNnL088tkgbgbfdBttUJTxzjw7rleDEo=; b=gvyEv7Ag ClQMe0xF7wNC8THXLcyh95Ec2JG+ivAES0rBps7AcFlVd0D/xnOo9onUwIRBaRsc yBsWA8D7cb1FTCycVxXUCJxbNblbUG6sSHzZsn7qDyBgx6o5PAN3zg5tThMTScEy oZYd+pLhW3hWHorNkk7oAxpgugNjvrgovV36xN/zwOm83V4zuGLyzwt/vosD1DFq /6kgX+kEfEKjoB+SePSd9ZRJ/TTyzVIgvoQhPBj4GcOHEeUuQvdHQ5VZVQAiuaRz VgeMB4xGSvIEq6f7Z1XnBCN1xvKtGXTSZtCnbyFHswl+pIZlZ+g9szdDfw1zBd7Z 9X4CSuo7iCRPkQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudejgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepheffjeetteetke ffhfdvgefhgeevvddvueejheehfeevfedufeegiedtheeujeelnecuffhomhgrihhnpehr vghmrghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Nov 2021 07:30:23 -0500 (EST) From: Alistair Francis To: lee.jones@linaro.org, broonie@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org Cc: linux-kernel@vger.kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, s.hauer@pengutronix.de, linux-hwmon@vger.kernel.org, amitk@kernel.org, linux-pm@vger.kernel.org, linux-imx@nxp.com, alistair23@gmail.com, andreas@kemnade.info, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v15 5/8] hwmon: sy7636a: Add temperature driver for sy7636a Date: Wed, 10 Nov 2021 22:29:45 +1000 Message-Id: <20211110122948.188683-6-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110122948.188683-1-alistair@alistair23.me> References: <20211110122948.188683-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211110_043030_317100_66D41B8C X-CRM114-Status: GOOD ( 19.46 ) 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 | 108 ++++++++++++++++++++++++++ 5 files changed, 143 insertions(+) create mode 100644 Documentation/hwmon/sy7636a-hwmon.rst create mode 100644 drivers/hwmon/sy7636a-hwmon.c diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst index 7046bf1870d9..a887308850cd 100644 --- a/Documentation/hwmon/index.rst +++ b/Documentation/hwmon/index.rst @@ -180,6 +180,7 @@ Hardware Monitoring Kernel Drivers smsc47m1 sparx5-temp stpddc60 + sy7636a-hwmon tc654 tc74 thmc50 diff --git a/Documentation/hwmon/sy7636a-hwmon.rst b/Documentation/hwmon/sy7636a-hwmon.rst new file mode 100644 index 000000000000..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..84ceaae3a404 --- /dev/null +++ b/drivers/hwmon/sy7636a-hwmon.c @@ -0,0 +1,108 @@ +// 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) { + regulator_put(regulator); + 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 Wed Nov 10 12:29:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12692163 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1B16C433EF for ; Wed, 10 Nov 2021 12:33:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9233D61152 for ; Wed, 10 Nov 2021 12:33:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9233D61152 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zw/YxF7IVE1qdXdVO1aWtffCmC53IV8CRGR4gBbSCOY=; b=ZAxUTr2/UohpvH CyPqLZnmsjhWjG5Bax5Q/IOHfihpYpaeSiay0x9IbUaITS6hqg+HRVIYR/QXaoK20lOz2RSNixoGJ gqAEIXcjU0Tsy6k+KvM+bzWz5M5+eHMoIjYhvpbgCrtk7ewh3A52G2WOYnXIY+OvzxLFfx9dbLITm 3dmAgxzAJ5g5gtIPoS1NvDvfoPlkAWy+kfPolWevV7kGC84jSvGqyNYv21L0CDyhY0VVL+eyMyICj cfsgnbk9VX46J4jBQ9+zs6G9UKXhM6IWbNUC271wHfxfg18FRln5FqJxjXdMCN1vr77HOpSSk7f+r WGSpn8A9Iq1o+jqZ0AWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmlP-005PX6-CQ; Wed, 10 Nov 2021 12:31:39 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmkO-005P5s-BL for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 12:30:37 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 99CD6580869; Wed, 10 Nov 2021 07:30:35 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 10 Nov 2021 07:30:35 -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=ZXw7OatydzINJDPuPGioAtcFRFMCD 1l6tiHfkkZjk1WQlh01tdyQ4GEEYW101PjLVbHIDjon1HC965eaMhA3ahxACNZW9 n//qfyl/H/r4/Gd6tScxiylzSSRLYGWXSCu+nThcKGhgGbRqKYo8XvXcVJt5nNap RY6HuMPfm9/L1jv0tu+My87bJr1Exri1Ld3xm+YGyjrG35WVq8XJpVXB28KQs/0y SqEfjHzpkEboAJr59ej6R6CrpsJ7724gc56nDb5dM9ej/YlhTuzJokcPDfZaBgCy JtN3gPmUC7KQQ1D1a9/qEpSpxDeHxOcu23b7ocew3VCOsPHS796MCqmXQ== 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=eITkGZlO h2kmKaoP8eEFbXEgVZEupvTbXLEPlH2YJP95AgyMwRYZhbKbDKG3TzUsLf1ErAwA BMsFTtYUWu8vXsV0Tr9D0U3x4jRyVG5ngrKZIdm6n5EAlmbW9S7vFs4kEpAjQFbi ZD7KOpIi9iqkzfx7t8/aPGilSxV54Pon3K5rXu6bO44LvuALMWZCEfXeCSqGQSe6 UaaHAl2HcXmbuiihI/UP+oLZwy1jr49vJRQjZ8/ZXQVJI86aHWUVHckJBZmsoNWN 6R76NYsjyTAoUbEEdYVRx8PKHT/KKr0FqDwn8vzG96eaj8ikJVLtsl4eq+C1yZ12 hVuW+wHBR53wEw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudejgdeflecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Nov 2021 07:30:29 -0500 (EST) From: Alistair Francis To: lee.jones@linaro.org, broonie@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org Cc: linux-kernel@vger.kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, s.hauer@pengutronix.de, linux-hwmon@vger.kernel.org, amitk@kernel.org, linux-pm@vger.kernel.org, linux-imx@nxp.com, alistair23@gmail.com, andreas@kemnade.info, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v15 6/8] ARM: imx_v6_v7_defconfig: Enable silergy,sy7636a Date: Wed, 10 Nov 2021 22:29:46 +1000 Message-Id: <20211110122948.188683-7-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110122948.188683-1-alistair@alistair23.me> References: <20211110122948.188683-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211110_043036_507985_BF1B3690 X-CRM114-Status: UNSURE ( 7.52 ) 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 Wed Nov 10 12:29:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12692164 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0200AC433EF for ; Wed, 10 Nov 2021 12:33:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C547E61105 for ; Wed, 10 Nov 2021 12:33:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C547E61105 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZSRPLr0F7SOT+3JaJ/z/IMN5KFEPXCYBL5bgrA+mn/w=; b=yhpTrRCzPdhKBs XnmEk5EHVXiHRLX4ug5rIiTBPCFUP2DMeIyWNSfgIoPkNex0okJlPtQAt2Trcmerem96UiNIj4VWb 360Kp90+etrFWUxGrSqK17FapfqNnak+4p1+r3JMDHVaxNt3YCaAFyn0dYGULZPkJGGTq6K5m+SiT 6jFLEXZxY23MmTrN2r6dBFPr7K3zYukHr9WXB99UUvql6GrlM5i14/79gI9rTfq0tbPglcIadFQtq 7lTHGBfYBdkXfHnag+uy2c9PZQJQdsoO+i47DoHYO0ofXOhpLRcHdKCLWBSfDPcMWrf1h0lplOZ+T nOnxZAdf3wfDvf6qNk2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmlv-005PmP-6r; Wed, 10 Nov 2021 12:32:12 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmkU-005P7k-Fu for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 12:30:43 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id BD41C580877; Wed, 10 Nov 2021 07:30:41 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 10 Nov 2021 07:30:41 -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=dh8VEtffq3LssMHNzjlV/I/EGGyYr zIg0QYHPO3O3lpv84cVukDSE5Arf4rHl+oCD8maXYgzX57JnUiE7A0A0jP9K5Fuu QWs867Wf+4b/cBMrtZ1xqr8jDcuBP9BnBGXGoSpFX49tuHAR7JUoTX7TZ1UoLM3U eLjKBgzPW9mPeM3bRCxrAGiZMaHVbIIfYVnlSzty1cCm6LaNU3rLFRmQ51xo/M73 qglq1DtnY7PU/7R94HFvaUIHqDbqEbnzMWbbLw2BUMpAG7Ncqx4eWfh/7mXrvzfz Qgq3hUPTTPfpU0Um21zbrej42ZMZi/eGC+CIYCUKUMi/w+gnMnutW10iA== 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=hm/gEbKG SI6NdvdpRlMwSwXXebD+u+W3BxBNCT4BWNEOd+pmaGyAKWQtEtncdLfR6Fke6JyN qrPTh1wdH9yR7mUnzZMXEMgoVGoJYDWDsP/buacUfY/Kn5V3l5i5WIbs5zVrd6FL ovolPe1qvMb1VZy961I0tn28zv2k5L6MorEle9q5HzKQyU40NVyMvn2wE/AVFu4o 2csq5enMnBWDA34b/bNoscPryef2VogpPn28K5PkzZJ9DNGNOKG3IccDfnBDBnHp cqh3qARa8Q+6NUg20AkLEmlACYMFRXu1vhHJQKo+xKunzZwqKEKDTEu4AB8NahKJ BSl+t/GTJQ7DBA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudejgdeflecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgepudenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Nov 2021 07:30:35 -0500 (EST) From: Alistair Francis To: lee.jones@linaro.org, broonie@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org Cc: linux-kernel@vger.kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, s.hauer@pengutronix.de, linux-hwmon@vger.kernel.org, amitk@kernel.org, linux-pm@vger.kernel.org, linux-imx@nxp.com, alistair23@gmail.com, andreas@kemnade.info, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v15 7/8] ARM: dts: imx7d: remarkable2: Enable silergy,sy7636a Date: Wed, 10 Nov 2021 22:29:47 +1000 Message-Id: <20211110122948.188683-8-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110122948.188683-1-alistair@alistair23.me> References: <20211110122948.188683-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211110_043042_654784_F69277CB X-CRM114-Status: UNSURE ( 9.51 ) 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 Wed Nov 10 12:29:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12692165 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63775C433EF for ; Wed, 10 Nov 2021 12:34:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2DE1361105 for ; Wed, 10 Nov 2021 12:34:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2DE1361105 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cfEbakCuNEBKTqqXl9wgAGqNnfYFSVFuVv6gnNzll6k=; b=GrMupTGuZ/SwCl JTSeuRwzghnUGh9Tbert5v5HhEsEH/cxcfYfASr0Prb50AvoiXKM2U6ErQE8DUTeu7uguA8SEYrhR xqPib7uLtjoaIkgym1pgWKJizqqoukJBDr/fWVUHYlt4lXU6NwAl1VTnjikTgObLeHnPYCfejYTY+ CMtrH7JCN1Pj9SYjfKnSLy2SnnUgW8jHmkrHKSVo+KQdKrfSLUKnEyY7QJDy27/XJMyMVaudhWkqw Tl3d6Mf4qofSbPASpsUqDtFocMV5PI/NIBuT+O2UUaajvu5gsgY4NzgKwVgdJZrvx/8ENlMLbqaNB A+IRqRxFPBNS7DaNjhvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmma-005Q7X-2r; Wed, 10 Nov 2021 12:32:52 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkmka-005PAN-W0 for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 12:30:50 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 4650F580867; Wed, 10 Nov 2021 07:30:48 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 10 Nov 2021 07:30:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=2aOAXpeIPQR2x ghpp4OMQNId//edXUxPmx/LpQURmRg=; b=rN0GozkZomARTM3Ae7lYEh5VRQjGq VhAWKWxdRL1/ppwHKv5zyJ8AYqu6Q5uC/d7/R8X1xfIGgKaacOnRf/gopaMgYsOR TE2LyW/gPulPE84/UCbJJIid0prt2OLQycvVrczeVlWjsxkyki/sm/zHfMTueyKc CN7UlgoUXi5zscfPn/cZJ0IpVwG6qVWNzbhHDwXzXOwUDN4AKh1keMOZL5LKLeq2 Sq/PR8p37TEv0g75x6qHgSXny/NNiNmMBfp608ZHcATSpYH7inGm5tyaFXKSujLD 7afc/dv8TOF4uZjsqc1XOvPcJv6DOp+w1dKQBXzL8ssqD0sPdoh+g/woQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=2aOAXpeIPQR2xghpp4OMQNId//edXUxPmx/LpQURmRg=; b=OmiOOc57 ZlacV5k9CDJH0jgZQ1uMTsazfKBe3x7dBXHDJlJjPmaqXdl9SWUo5eJCfw3HxdV7 2Eby8kW85EFSx18kZF9lVy2Ahb8jUEWvlgpoy+779IO7OC/jsAqgSL6UVBUKeJgz CA7HMLO0zmbDp1sxvO6Zyd1uq1BrbLmVehy2Xqlaj0Gi14R/NvNIGgri2GMtsV4z eHM4hnWFH03HqnIRa62L2PjxoR4s8ygwluLYn6HlPx0EHPzT6/e9ENuW9cVMy85a rn4c6sC2I/W7kR5bvLH+YVIZz39jGcYgGgLqafDSjssuA00DPTO36o671wXRcg8s QT4r3QAdW64tGw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudejgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Nov 2021 07:30:42 -0500 (EST) From: Alistair Francis To: lee.jones@linaro.org, broonie@kernel.org, kernel@pengutronix.de, lgirdwood@gmail.com, robh+dt@kernel.org Cc: linux-kernel@vger.kernel.org, rui.zhang@intel.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, s.hauer@pengutronix.de, linux-hwmon@vger.kernel.org, amitk@kernel.org, linux-pm@vger.kernel.org, linux-imx@nxp.com, alistair23@gmail.com, andreas@kemnade.info, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v15 8/8] ARM: dts: imx7d: remarkable2: Enable lcdif Date: Wed, 10 Nov 2021 22:29:48 +1000 Message-Id: <20211110122948.188683-9-alistair@alistair23.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211110122948.188683-1-alistair@alistair23.me> References: <20211110122948.188683-1-alistair@alistair23.me> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211110_043049_142760_12CFA1DC X-CRM114-Status: UNSURE ( 8.60 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Connect the dispaly on the reMarkable2. Signed-off-by: Alistair Francis --- arch/arm/boot/dts/imx7d-remarkable2.dts | 74 +++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-remarkable2.dts b/arch/arm/boot/dts/imx7d-remarkable2.dts index b66d28b30d75..fe68f6eaa2ec 100644 --- a/arch/arm/boot/dts/imx7d-remarkable2.dts +++ b/arch/arm/boot/dts/imx7d-remarkable2.dts @@ -55,6 +55,16 @@ reg_brcm: regulator-brcm { startup-delay-us = <150>; }; + reg_sdoe: regulator-sdoe { + compatible = "regulator-fixed"; + regulator-name = "SDOE"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&pinctrl_sdoe_reg>; + pinctrl-1 = <&pinctrl_sdoe_reg>; + gpio = <&gpio3 27 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; pinctrl-names = "default"; @@ -63,6 +73,16 @@ wifi_pwrseq: wifi_pwrseq { clocks = <&clks IMX7D_CLKO2_ROOT_DIV>; clock-names = "ext_clock"; }; + + panel { + compatible = "eink,vb3300-kca"; + + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; + }; }; &clks { @@ -99,6 +119,20 @@ reg_epdpmic: vcom { }; }; +&lcdif { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcdif>; + lcd-supply = <®_epdpmic>; + lcd2-supply = <®_sdoe>; + status = "okay"; + + port { + display_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; +}; + &snvs_pwrkey { status = "okay"; }; @@ -187,6 +221,46 @@ MX7D_PAD_I2C4_SCL__I2C4_SCL 0x4000007f >; }; + pinctrl_lcdif: lcdifgrp { + fsl,pins = < + MX7D_PAD_LCD_DATA00__LCD_DATA0 0x79 + MX7D_PAD_LCD_DATA01__LCD_DATA1 0x79 + MX7D_PAD_LCD_DATA02__LCD_DATA2 0x79 + MX7D_PAD_LCD_DATA03__LCD_DATA3 0x79 + MX7D_PAD_LCD_DATA04__LCD_DATA4 0x79 + MX7D_PAD_LCD_DATA05__LCD_DATA5 0x79 + MX7D_PAD_LCD_DATA06__LCD_DATA6 0x79 + MX7D_PAD_LCD_DATA07__LCD_DATA7 0x79 + MX7D_PAD_LCD_DATA08__LCD_DATA8 0x79 + MX7D_PAD_LCD_DATA09__LCD_DATA9 0x79 + MX7D_PAD_LCD_DATA10__LCD_DATA10 0x79 + MX7D_PAD_LCD_DATA11__LCD_DATA11 0x79 + MX7D_PAD_LCD_DATA12__LCD_DATA12 0x79 + MX7D_PAD_LCD_DATA13__LCD_DATA13 0x79 + MX7D_PAD_LCD_DATA14__LCD_DATA14 0x79 + MX7D_PAD_LCD_DATA15__LCD_DATA15 0x79 + + MX7D_PAD_LCD_DATA17__LCD_DATA17 0x79 + MX7D_PAD_LCD_DATA18__LCD_DATA18 0x79 + MX7D_PAD_LCD_DATA19__LCD_DATA19 0x79 + MX7D_PAD_LCD_DATA20__LCD_DATA20 0x79 + MX7D_PAD_LCD_DATA21__LCD_DATA21 0x79 + + MX7D_PAD_LCD_DATA23__LCD_DATA23 0x79 + MX7D_PAD_LCD_CLK__LCD_CLK 0x79 + MX7D_PAD_LCD_ENABLE__LCD_ENABLE 0x79 + MX7D_PAD_LCD_VSYNC__LCD_VSYNC 0x79 + MX7D_PAD_LCD_HSYNC__LCD_HSYNC 0x79 + MX7D_PAD_LCD_RESET__LCD_RESET 0x79 + >; + }; + + pinctrl_sdoe_reg: sdoereggrp { + fsl,pins = < + MX7D_PAD_LCD_DATA22__GPIO3_IO27 0x74 + >; + }; + pinctrl_uart1: uart1grp { fsl,pins = < MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX 0x79