From patchwork Sat Aug 7 10:39:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 493448 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AF6DC4320E for ; Sat, 7 Aug 2021 10:40:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17BE361164 for ; Sat, 7 Aug 2021 10:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231866AbhHGKkQ (ORCPT ); Sat, 7 Aug 2021 06:40:16 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:36531 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231990AbhHGKkP (ORCPT ); Sat, 7 Aug 2021 06:40:15 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id D66245C00C2; Sat, 7 Aug 2021 06:39:57 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 07 Aug 2021 06:39:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=VEDE2BLIpf0ev X9WccmkC2h6O8pdz1/Qld9JBV1z04s=; b=nNP49X2VXp33QydZPgeUp57KbxgmK PY7YhsgbwLLP8LIjB434b9gxJQ7gWL0lIO6m16DjvbYLw7+HSrFVVAAmDjFl+kqg +Jd95NBlbzT1A3oIFhivvMKl7T0FUzcBZsGin/J6YjEH0pTXVwp6T3/v/OMJiSFo ms0e2cRejoz4m2fjyHzlBOINGGqENasMSiQKCXjBQYErgwcj0f/MNT9ORLBsijdL wpqncdXlvj0r07royBb7r7tydQijVNynq5ab6s13H/yFznGCNrBifOjvCIB55wMf sW5FA7NRy7CeMMrgg67jwb5l8xD1Q521cPtWcFnAJ+Jan6qJN3bC8Bzaw== 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= fm3; bh=VEDE2BLIpf0evX9WccmkC2h6O8pdz1/Qld9JBV1z04s=; b=c1+8fXdA ENgt8CN6n2wun7BNpjM7EgkH4I60XEkJRe1P9wF6qZrnGmMkIJIWiPT7NTcMfH9A MCbXo89Kmr9y2mu1cjtyra8hmDsvSlE+EpFxhHnL6Q25GoC34oKY8pvkviaAtPA8 s9sakCBxOT3RhZEdECA8FGs+ip7A0BFDbGVX8hPO/6SOPN2vCZ7Xw0gxZjNFeIRt uaIYaPWIiz6JVNQSJ2JSUyyE1Qamhh485uF64cTvyS9K+F1fvJNLBi8Dri/vBI8d viYkn7QGF8a9KUwoDC6Bh3V5ylG4JEamPywLNpacWrW+n5Riaz+57vcBn82BMSeD zbPBQPu8p3LMKg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepffdthffggefgle fgkeejhfekiefgleelfefhtefhheefteelgeeggefgfeffvddtnecuffhomhgrihhnpegu vghvihgtvghtrhgvvgdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 06:39:53 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v10 01/11] dt-bindings: mfd: Initial commit of silergy, sy7636a.yaml Date: Sat, 7 Aug 2021 20:39:30 +1000 Message-Id: <20210807103940.152-2-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210807103940.152-1-alistair@alistair23.me> References: <20210807103940.152-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Initial support for the Silergy SY7636A Power Management chip and regulator. Signed-off-by: Alistair Francis Reviewed-by: Rob Herring --- .../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 Sat Aug 7 10:39:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 493750 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBDEFC4338F for ; Sat, 7 Aug 2021 10:40:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C106C6115C for ; Sat, 7 Aug 2021 10:40:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231990AbhHGKkW (ORCPT ); Sat, 7 Aug 2021 06:40:22 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:33231 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230332AbhHGKkU (ORCPT ); Sat, 7 Aug 2021 06:40:20 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id A6BE45C00C2; Sat, 7 Aug 2021 06:40:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 07 Aug 2021 06:40:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=ogU9rvn58H76K bCYMD7NwPKqr7V2CMfGEVCJQIcAJsE=; b=B6NS1E85IpJZt8YMqCPTOkqQBb/xf ms/y78JLwUr343NgzgR6sZ1C8Q/BAAymDWU0ccaYQLnM9UEzhUMKHNncC0jQQsVj n64jQUNPjRW7vrenNt4s3IE236dnvF3ZCmRI0Po7jRWpmkOwKoWsFqSUR4a2Yvvj w5vE4wixUe+xnmhCU1pE1TrtzUOgSI5UDJMDXVr37erIVHSbAlsKtRGCbjpbbADL 5ntGw3X5vuoWfTrWoiEJ/hsGKuE8aAzP28kUEA0WpUWJQPkTuD8S6QeSggEY38Fx vQ3vzotmrS02SgJ7ZU8kNeCwNvK6I5xD3QixjuYUNcevxGf/Vksw7WHOA== 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= fm3; bh=ogU9rvn58H76KbCYMD7NwPKqr7V2CMfGEVCJQIcAJsE=; b=YVSRnAO2 aGh7wnqSJDcYVcLCycq+S4mInpt8fAxenq/Y6CwDI5efmtnO7dgsZY+gvcc763U6 OH+19wZ3MGtPvJKENR6qhKDsIES3eJdzhlLD0PQveLWs68EHj9rfaOR6P8Poxlbl flB8C9o8hrLM8eY/DaXEdg50V5K17r48bw7rSWUJnH3LU4i5GDhXq+1isY9j7RgD R1J2FX2RAgbLwArI+mx1UT+UZ9ydlKVNGnKaQGNxlbJef/Y54t1/u+CuDMryWcya nMHovtxSZ+5l1plZ6OJkP9c84QksknAE5F818iaHWGOeSxqGiMgmaivadVvOtLas LNr6G3lC7csY2w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 06:39:58 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v10 02/11] mfd: simple-mfd-i2c: Add a Kconfig name Date: Sat, 7 Aug 2021 20:39:31 +1000 Message-Id: <20210807103940.152-3-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210807103940.152-1-alistair@alistair23.me> References: <20210807103940.152-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Signed-off-by: Alistair Francis --- drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 6a3fd2d75f96..09a939f8b7ff 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1176,7 +1176,7 @@ config MFD_SI476X_CORE module will be called si476x-core. config MFD_SIMPLE_MFD_I2C - tristate + tristate "Simple MFD device" depends on I2C select REGMAP_I2C help From patchwork Sat Aug 7 10:39:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 493447 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EEBAC4320A for ; Sat, 7 Aug 2021 10:40:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85ACF61164 for ; Sat, 7 Aug 2021 10:40:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230332AbhHGKkY (ORCPT ); Sat, 7 Aug 2021 06:40:24 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:58187 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232050AbhHGKkX (ORCPT ); Sat, 7 Aug 2021 06:40:23 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 74C4C5C00E4; Sat, 7 Aug 2021 06:40:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 07 Aug 2021 06:40:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=Y+R86tHeDAExu pHL82StJkBXeuy0hLrNl1PAhb3tmnQ=; b=Vvpp7ryRq90TjFSFoUpKr03LH0bcR Z2DW/ooxF7+LZJvu4F+cEtmMLnDojdtZw/8OkMBRoNXixN4XJFLOeplGlXLIn0Ru j0gWZM1ViU4wB9/q2XBDub+oylZIliVkIKwxFwClv16C9J+HvdfWdHBLDMrV/kms im5qsMGt1+m7lONTXMMNL2rZA68nNPU+02/G3YmQ1F3r9fmJVp0qIqJ7DSEoY+XS FN8BssMfazcHnFlHvX4ksM9E4j+aJfJfCPirkC7A1Ah4PKPY6c6LuaoSvOyXqCgG +msd08GZKtOlIbdIzz87/NmoiyKhASbtFpui14IL5O6q73Zmm7xBN4/Fw== 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= fm3; bh=Y+R86tHeDAExupHL82StJkBXeuy0hLrNl1PAhb3tmnQ=; b=TO/OLZdB FDaqy+o6Ol+wMwTPxFG8b65YfKCJ7idNGFIw42w8XiYlF2y4L7pQuF0Ls9hvHtvJ luh5ryGAAD8cMLz/gQyAXL7HZuBjNvJ1rK2JArsB5A/C8AjeAVTRKvjshwoGjrtF Sl6eL90pAn6rspVlnLwGixyEn7r+0FIjeNv8qIkbW2PsqTm5O16Q+DxDZIVOJN0e AsXA/dYKpQYLaEvdgFB31etMvHD/aUxOkjZki9j/Esh40al7whvxrwi7OYUD3hg4 xflJA2mZAbDZjSxKhbrLzA6xalYZ0dMzzXt+NoTQxuihaXWxG8lX3mJ7CrjH4lX4 9vh4501IIB556A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepheffjeetteetke ffhfdvgefhgeevvddvueejheehfeevfedufeegiedtheeujeelnecuffhomhgrihhnpehr vghmrghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 06:40:02 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v10 03/11] mfd: simple-mfd-i2c: Enable support for the silergy, sy7636a Date: Sat, 7 Aug 2021 20:39:32 +1000 Message-Id: <20210807103940.152-4-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210807103940.152-1-alistair@alistair23.me> References: <20210807103940.152-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Signed-off-by: Alistair Francis Acked-for-MFD-by: Lee Jones --- drivers/mfd/simple-mfd-i2c.c | 12 +++++++++++ include/linux/mfd/sy7636a.h | 41 ++++++++++++++++++++++++++++++++++++ 2 files changed, 53 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 583e8c7924af..ce213c68b8cf 100644 --- a/drivers/mfd/simple-mfd-i2c.c +++ b/drivers/mfd/simple-mfd-i2c.c @@ -62,8 +62,20 @@ 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", }, + { .name = "sy7636a-thermal", }, +}; + +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..15caa54f0432 --- /dev/null +++ b/include/linux/mfd/sy7636a.h @@ -0,0 +1,41 @@ +/* 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 + +#include +#include +#include +#include + +#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 Sat Aug 7 10:39:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 493749 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0AC5C4338F for ; Sat, 7 Aug 2021 10:40:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D573E61104 for ; Sat, 7 Aug 2021 10:40:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232050AbhHGKka (ORCPT ); Sat, 7 Aug 2021 06:40:30 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48927 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232057AbhHGKk1 (ORCPT ); Sat, 7 Aug 2021 06:40:27 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7AFE75C00C2; Sat, 7 Aug 2021 06:40:10 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 07 Aug 2021 06:40:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=tmsLsa/eRaufF J8jRKvAmHCUqfWGYVXTYZw+tCYDWos=; b=hwMQKj39aHvYJor4Hv0WxCr9YbpZA VCTmXQZ18ehWgIQrscHgliXLT6n54VyU75ZOBFOhVDHyXMQoNk12pyZbfWnZslVO +B/mHrxtbfeHI84gZHttJAJM707aFM/1q3a3ii7gMJz2Cbo6IZaCFjuz9PhoqQfo 2SAZjRwguSz4kge1cnUEGDYFBXLAYKC/nAFMybgzWDA2VVOZwKVLMeJnnu8tsFy8 +NeK4ZXVeiFFHSPOQI4dtn/H1rpqdDzFs9P63p/caaLtmrqkcZxcpleB/mK2WRv+ SVmYoc4emISXw4eoPw25DoTJ8ve/+9buDF0jWU5NY2FGjtSgkq3dSd3Ag== 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= fm3; bh=tmsLsa/eRaufFJ8jRKvAmHCUqfWGYVXTYZw+tCYDWos=; b=wxXRI6iL FwISmxM5Imiah6ghMNCTI0UyjHApIiS+CbWWI/AysIZ431yJJGL2Uj2tEX2G0ct5 4kO8n31Cq47RzCAeORs3h7awz+qK9wxbOL7l/YhaBHyhvJeOt+k9hC0HDD6bV1jq Axq1NkPPNHjtYuTDhRug+Mw+/oblgJKIDGxwWACbKMNZaPSAWGZnCSbHTdV3iDxa jmufqI8R4/XrrmB5pz8whWJDG+krGWEnbRkLusmHsQo+xWe9Stz8rAZdgw08dcPi 9C0TEdZqMl5MkBD/j2MbVvPmidPf4GsKgo19FIn+I19YGq4QW/a3g9kNlfeLeMzN Gcg2x8gv5TSsqQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 06:40:06 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v10 04/11] regulator: sy7636a: Use the regmap directly Date: Sat, 7 Aug 2021 20:39:33 +1000 Message-Id: <20210807103940.152-5-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210807103940.152-1-alistair@alistair23.me> References: <20210807103940.152-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Signed-off-by: Alistair Francis --- drivers/regulator/sy7636a-regulator.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c index 37bf2a3c06b7..8360b3947ead 100644 --- a/drivers/regulator/sy7636a-regulator.c +++ b/drivers/regulator/sy7636a-regulator.c @@ -14,7 +14,7 @@ #include struct sy7636a_data { - struct sy7636a *sy7636a; + struct regmap *regmap; struct gpio_desc *pgood_gpio; }; @@ -70,14 +70,14 @@ static const struct regulator_desc desc = { static int sy7636a_regulator_probe(struct platform_device *pdev) { - struct sy7636a *sy7636a = dev_get_drvdata(pdev->dev.parent); + struct regmap *regmap = dev_get_drvdata(pdev->dev.parent); struct regulator_config config = { }; struct regulator_dev *rdev; struct gpio_desc *gdp; struct sy7636a_data *data; int ret; - if (!sy7636a) + if (!regmap) return -EPROBE_DEFER; gdp = devm_gpiod_get(pdev->dev.parent, "epd-pwr-good", GPIOD_IN); @@ -90,12 +90,12 @@ static int sy7636a_regulator_probe(struct platform_device *pdev) if (!data) return -ENOMEM; - data->sy7636a = sy7636a; + data->regmap = regmap; data->pgood_gpio = gdp; platform_set_drvdata(pdev, data); - ret = regmap_write(sy7636a->regmap, SY7636A_REG_POWER_ON_DELAY_TIME, 0x0); + ret = regmap_write(regmap, SY7636A_REG_POWER_ON_DELAY_TIME, 0x0); if (ret) { dev_err(pdev->dev.parent, "Failed to initialize regulator: %d\n", ret); return ret; @@ -103,8 +103,7 @@ static int sy7636a_regulator_probe(struct platform_device *pdev) config.dev = &pdev->dev; config.dev->of_node = pdev->dev.parent->of_node; - config.driver_data = sy7636a; - config.regmap = sy7636a->regmap; + config.regmap = regmap; rdev = devm_regulator_register(&pdev->dev, &desc, &config); if (IS_ERR(rdev)) { From patchwork Sat Aug 7 10:39:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 493446 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F27EDC432BE for ; Sat, 7 Aug 2021 10:40:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5D50611CA for ; Sat, 7 Aug 2021 10:40:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232161AbhHGKkd (ORCPT ); Sat, 7 Aug 2021 06:40:33 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:43187 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232030AbhHGKkc (ORCPT ); Sat, 7 Aug 2021 06:40:32 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id BD4645C00C2; Sat, 7 Aug 2021 06:40:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 07 Aug 2021 06:40:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=e6he+/Ctx/CNm IsbU2QMgTzDIo771ajT2nYYxlA1LyM=; b=bqIoMXnUOaher/RJW21cq4vAuNdi7 R2f0o0R7UAQtOFspGZOZ7K6HmbM6ucKTsxyFX4rma/SVYki1k1RbZqIYuc/B77w+ FaZcn7519ayBx/JkGgDvSVVqsH0NVNZ4uNb9sbzRiB0rSCzz3sVL+NUmJ5Di1en0 +3uZdrfLSpIj8QYqK67t1vlgfTo9DXKtYLbTB6v7f8z90eq2dewXcZhvq2bpS+yK KNjgsDZrOY5kVBJUNq6KXkVFZ5SVVv8k018N3tDT3KOIH3I5+T/r4YCu8BT6mEtp wcT1upJ/jGPN7/HyxSyismUU6bWud32VIT2+bNgzz/OgNDxNcuiWkSkmQ== 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= fm3; bh=e6he+/Ctx/CNmIsbU2QMgTzDIo771ajT2nYYxlA1LyM=; b=FcEZRYsJ qwikopfsTOhaN2pzLTiXFBoQTxHmh/eWm8xW+xoPQBYzDDIiEajZGvNl79tOLiPM R+gmLAH7xr871BXG8/ThpUlAEzLib8+FL77WVsoDaFH8iq5b2wR65q2vZUABTKVh UMdEYQF+ylLFGMBZk2VTgiF45DiYzrm4k0avrSAGJmvhY9hmUsMqKCElCSRUeIGK nU4OfVxDEyAk0C6jj6dx/lbxXJPEBvNCfa6ocmTOyMB/t8cgesIzGJ2JYfMIqoQ9 tdxmXS+58YoDHcLfn0ShWFtpG2NH5Fu/+3gMaBdEt1KrwNTmn5qVHf02tTGLujob fs1DJrzPk2GDrg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 06:40:10 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v10 05/11] regulator: sy7636a: Remove requirement on sy7636a mfd Date: Sat, 7 Aug 2021 20:39:34 +1000 Message-Id: <20210807103940.152-6-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210807103940.152-1-alistair@alistair23.me> References: <20210807103940.152-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Signed-off-by: Alistair Francis --- drivers/regulator/Kconfig | 1 - drivers/regulator/sy7636a-regulator.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 24ce9a17ab4f..54ba141d114a 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -1179,7 +1179,6 @@ config REGULATOR_STW481X_VMMC config REGULATOR_SY7636A tristate "Silergy SY7636A voltage regulator" - depends on MFD_SY7636A help This driver supports Silergy SY3686A voltage regulator. diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c index 8360b3947ead..22fddf868e4c 100644 --- a/drivers/regulator/sy7636a-regulator.c +++ b/drivers/regulator/sy7636a-regulator.c @@ -70,7 +70,7 @@ static const struct regulator_desc desc = { static int sy7636a_regulator_probe(struct platform_device *pdev) { - struct regmap *regmap = dev_get_drvdata(pdev->dev.parent); + struct regmap *regmap = dev_get_regmap(pdev->dev.parent, NULL); struct regulator_config config = { }; struct regulator_dev *rdev; struct gpio_desc *gdp; From patchwork Sat Aug 7 10:39:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 493747 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5ED8C4338F for ; Sat, 7 Aug 2021 10:40:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E483611C5 for ; Sat, 7 Aug 2021 10:40:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232126AbhHGKks (ORCPT ); Sat, 7 Aug 2021 06:40:48 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:43139 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232085AbhHGKkg (ORCPT ); Sat, 7 Aug 2021 06:40:36 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DE42D5C00E4; Sat, 7 Aug 2021 06:40:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 07 Aug 2021 06:40:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=O49nkM13Pyw7y jqsOXNKXTJZ6C6L1h91HccgIb6hk3M=; b=NKMhdYpv5lAM7yexVxcNX+eSeCX2j aSNLlPemHX73nVXD/1MQjsTLs4AvujgFZmbAv4UFzRcOcYICwoD4PqGgRlD08Q9E YRDNKMl07TbcHo/BQuJZKWtKTncW2HFcgveNfB+sF2rfMiYVZXysGSbh1mGmHeFz N6Ip6syC/Z5IbkOeVH9Gd+/39Cmk3UnwdHinf7+T9leFTecBbBaq+Et9XGdUVtXH +LvSVa4D/6RiL+139lRewIXdPPfwSIaxD2svGFUSul431vBV+BD/Z3WBCzV6QDEO ubF2CYEd3ei+YHiTqWXyDLCtvthbUBrd5mYx4fWUXMqQ3Mipd0AVX21VA== 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= fm3; bh=O49nkM13Pyw7yjqsOXNKXTJZ6C6L1h91HccgIb6hk3M=; b=iSoj4VQ0 XB3tJt9LBYXZ+k7n18++R07ydIj3nJbKuuwsCfRsgJjhz2++B0xZZKzrNoWM0Jzl Ru6OUwqNWbsxc+7oq6jH6BWhELYjjOHW3rQs3MxCLQ4ZBreebi8Hs6HilLNqcjbC HXy3tweJ6ftzgL6lWkawTuIW3r2UuhSStR8gIF0SO8a+QBx5fRhf15PbrBeJmcwI N/LhHm3n9qpQGq9JidjEEnQaLOpFFqFTeDjZ+cMjrGdSCSIxQvTyNDA7wu3VW8JS Pbye0js+wc0fROgz2oa3uQnQpHEm62dklBoxJWRGzhtwLt+lYV8Y4ToYXWVyVcBJ Y0UdDRvnm5dgqg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdeftdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepheffjeetteetke ffhfdvgefhgeevvddvueejheehfeevfedufeegiedtheeujeelnecuffhomhgrihhnpehr vghmrghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 06:40:15 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v10 06/11] thermal: sy7636a: Add thermal driver for sy7636a Date: Sat, 7 Aug 2021 20:39:35 +1000 Message-Id: <20210807103940.152-7-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210807103940.152-1-alistair@alistair23.me> References: <20210807103940.152-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add thermal driver to enable kernel based polling and shutdown of device for temperatures out of spec Signed-off-by: Alistair Francis --- drivers/thermal/Kconfig | 6 ++ drivers/thermal/Makefile | 1 + drivers/thermal/sy7636a_thermal.c | 91 +++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 drivers/thermal/sy7636a_thermal.c diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index d7f44deab5b1..6ee0e7de1b37 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -450,6 +450,12 @@ depends on (ARCH_STI || ARCH_STM32) && OF source "drivers/thermal/st/Kconfig" endmenu +config SY7636A_THERMAL + tristate "SY7636A thermal management" + help + Enable the sy7636a thermal driver, which supports the + temperature sensor embedded in Silabs SY7636A IC. + source "drivers/thermal/tegra/Kconfig" config GENERIC_ADC_THERMAL diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile index 82fc3e616e54..2e1aca8a0a09 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile @@ -51,6 +51,7 @@ obj-$(CONFIG_DA9062_THERMAL) += da9062-thermal.o obj-y += intel/ obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/ obj-y += st/ +obj-$(CONFIG_SY7636A_THERMAL) += sy7636a_thermal.o obj-$(CONFIG_QCOM_TSENS) += qcom/ obj-y += tegra/ obj-$(CONFIG_HISI_THERMAL) += hisi_thermal.o diff --git a/drivers/thermal/sy7636a_thermal.c b/drivers/thermal/sy7636a_thermal.c new file mode 100644 index 000000000000..0a34071580f1 --- /dev/null +++ b/drivers/thermal/sy7636a_thermal.c @@ -0,0 +1,91 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Functions to access SY3686A power management chip temperature +// +// Copyright (C) 2019 reMarkable AS - http://www.remarkable.com/ +// +// Authors: Lars Ivar Miljeteig +// Alistair Francis + +#include +#include +#include + +#include + +static int sy7636a_get_temp(void *arg, int *res) +{ + unsigned int reg_val, mode_ctr; + int ret; + struct regmap *regmap = arg; + bool isVoltageActive; + + ret = regmap_read(regmap, + SY7636A_REG_OPERATION_MODE_CRL, &mode_ctr); + if (ret) + return ret; + + isVoltageActive = mode_ctr & SY7636A_OPERATION_MODE_CRL_ONOFF; + + if (!isVoltageActive) { + ret = regmap_write(regmap, + SY7636A_REG_OPERATION_MODE_CRL, + mode_ctr | SY7636A_OPERATION_MODE_CRL_ONOFF); + if (ret) + return ret; + } + + ret = regmap_read(regmap, + SY7636A_REG_TERMISTOR_READOUT, ®_val); + if (ret) + return ret; + + if (!isVoltageActive) { + ret = regmap_write(regmap, + SY7636A_REG_OPERATION_MODE_CRL, + mode_ctr); + if (ret) + return ret; + } + + *res = reg_val * 1000; + + return ret; +} + +static const struct thermal_zone_of_device_ops ops = { + .get_temp = sy7636a_get_temp, +}; + +static int sy7636a_thermal_probe(struct platform_device *pdev) +{ + struct regmap *regmap = dev_get_regmap(pdev->dev.parent, NULL); + struct thermal_zone_device *thermal_zone_dev; + + thermal_zone_dev = devm_thermal_zone_of_sensor_register( + pdev->dev.parent, + 0, + regmap, + &ops); + + return PTR_ERR_OR_ZERO(thermal_zone_dev); +} + +static const struct platform_device_id sy7636a_thermal_id_table[] = { + { "sy7636a-thermal", }, + { } +}; +MODULE_DEVICE_TABLE(platform, sy7636a_thermal_id_table); + +static struct platform_driver sy7636a_thermal_driver = { + .driver = { + .name = "sy7636a-thermal", + }, + .probe = sy7636a_thermal_probe, + .id_table = sy7636a_thermal_id_table, +}; +module_platform_driver(sy7636a_thermal_driver); + +MODULE_AUTHOR("Lars Ivar Miljeteig "); +MODULE_DESCRIPTION("SY7636A thermal driver"); +MODULE_LICENSE("GPL v2"); From patchwork Sat Aug 7 10:39:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 493748 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1143DC4320A for ; Sat, 7 Aug 2021 10:40:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED642611F2 for ; Sat, 7 Aug 2021 10:40:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232165AbhHGKkq (ORCPT ); Sat, 7 Aug 2021 06:40:46 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:49663 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232178AbhHGKkk (ORCPT ); Sat, 7 Aug 2021 06:40:40 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id CF3E65C00E9; Sat, 7 Aug 2021 06:40:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 07 Aug 2021 06:40:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=j2qB+BfCroHm8 5dLaWC9AKvrZqzhF/dayLXgdrQMfi0=; b=GwrXT7lWj1C1HK0pMYa/nUxoovR0X 9U+N9Gsg7NfLpSBQK2SbT9cmEI42m/0B2tUnXAooqPfPj+cpkwClK5hiWPH6JZz/ 6h1g/7QrGZjd2IktF4G8/PreaSUfRCZ2I+B906WA6wq2Yr+h+3aQKhO0yg8Bny0C fn2Clvx0lU4Wv+6zeufg15g4FcCG1RqsgDnVaVotjkw+57qb5ADt8aX0gS0h+7tc pZ5FmwIu5YII9daAThjZGDzRji3K33f8JAIwK03LtmJgeCTb65CqwpFcYOf/ljIW LrAmCzxoDavuAqOa+ZLqS8ntr+9icl6/bPLB/evxxCrnp7/zOWWlTNBYA== 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= fm3; bh=j2qB+BfCroHm85dLaWC9AKvrZqzhF/dayLXgdrQMfi0=; b=tUt2js0j ExXTEeyb6pXqHwAaRmwbIxnC1rtpQRGEf56f9f55oGYkrwKLejAQ0Z62cHIDrUB9 2+4kpM6zCHOycAY2ivEuDVMRMxIVAysaenC0YE2fgb/lmX9bdCJzbcgeelcVWRlA ITxxaWwZkemgEJBtNhtHrgyIdx9J3cXrIyTs4RSoyA2o4j6WYslQzoLalcvtxA6H fUW/TCfZernJGO08mGBDzLZ5+n3gvY6WOwg//tJ6QbSRcGzy+a4zlvHfl4X8SA9Z 7iOpWG0BpgaWXPvLycpKRypT2eBmVxwgBmjKoFj/EqsUuzW+vfHE5rN7tLf6dWan /kjZkJU1A0E58Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepheffjeetteetke ffhfdvgefhgeevvddvueejheehfeevfedufeegiedtheeujeelnecuffhomhgrihhnpehr vghmrghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 06:40:19 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v10 07/11] hwmon: sy7636a: Add temperature driver for sy7636a Date: Sat, 7 Aug 2021 20:39:36 +1000 Message-Id: <20210807103940.152-8-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210807103940.152-1-alistair@alistair23.me> References: <20210807103940.152-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This is a multi-function device to interface with the sy7636a EPD PMIC chip from Silergy. Signed-off-by: Alistair Francis --- arch/arm/configs/imx_v6_v7_defconfig | 1 + drivers/hwmon/Kconfig | 10 ++++ drivers/hwmon/Makefile | 1 + drivers/hwmon/sy7636a-hwmon.c | 77 ++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 drivers/hwmon/sy7636a-hwmon.c diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 477dac1edc75..ef8c6dca1277 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -229,6 +229,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 diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index e3675377bc5d..6cae12de59cd 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -1631,6 +1631,16 @@ 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" + depends on I2C + 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 d712c61c1f5e..8b2e09e25b24 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -180,6 +180,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..2aec0875b031 --- /dev/null +++ b/drivers/hwmon/sy7636a-hwmon.c @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Functions to access SY3686A power management chip temperature + * + * Copyright (C) 2019 reMarkable AS - http://www.remarkable.com/ + * + * Authors: Lars Ivar Miljeteig + * Alistair Francis + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +static ssize_t show_temp(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned int reg_val; + struct regmap *regmap = dev_get_regmap(dev, NULL); + int ret; + + ret = regmap_read(regmap, + SY7636A_REG_TERMISTOR_READOUT, ®_val); + if (ret) + return ret; + + return snprintf(buf, PAGE_SIZE, "%d\n", reg_val); +} + +static SENSOR_DEVICE_ATTR(temp0, 0444, show_temp, NULL, 0); + +static struct attribute *sy7636a_attrs[] = { + &sensor_dev_attr_temp0.dev_attr.attr, + NULL +}; + +ATTRIBUTE_GROUPS(sy7636a); + +static int sy7636a_sensor_probe(struct platform_device *pdev) +{ + struct regmap *regmap = dev_get_regmap(pdev->dev.parent, NULL); + struct device *hwmon_dev; + int err; + + if (!regmap) + return -EPROBE_DEFER; + + hwmon_dev = devm_hwmon_device_register_with_groups(&pdev->dev, + "sy7636a_temperature", regmap, sy7636a_groups); + + if (IS_ERR(hwmon_dev)) { + err = PTR_ERR(hwmon_dev); + dev_err(&pdev->dev, "Unable to register hwmon device, returned %d", 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 Sat Aug 7 10:39:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 493445 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B004FC4338F for ; Sat, 7 Aug 2021 10:40:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 964B5610FC for ; Sat, 7 Aug 2021 10:40:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232186AbhHGKkr (ORCPT ); Sat, 7 Aug 2021 06:40:47 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:32951 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232194AbhHGKkn (ORCPT ); Sat, 7 Aug 2021 06:40:43 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 988645C00F3; Sat, 7 Aug 2021 06:40:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 07 Aug 2021 06:40:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=Vy2JXd+xDZiD5 L7+tWVvVGFaD+OJoxcOJYpYwczbUeE=; b=Aihi0esMeWrCMYTNbOH/Kj35WYYAW qmxri44EV4O7GXWVTkPHWWtI/Jx9nUl6tYY6thuQR6qvkrhTUHFP5KQMag4o7bSv 1gC7fG7Fjeg3BmwFngwxWfYCA2Uqi0ctbCWgdmA+hM1lR2yt1OAk00NiiabGELou Es/e1ZpZLT3jcMvXKwB34vu7aWTOdSVf/q7zK8SaEwGpp72+PRpu97hdB4VhZZ/f /UU1Pz1HIB0oYRH56sFx4RQ10RAlc7FukWOFi4DoRn2dsTPqjrW4NW5zaKDJkmwL /OTeX5l/c9c/Sh5E8kmfB1sBNJFV3GY7OtAJvDEt6GQOw97wO98/r52bQ== 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= fm3; bh=Vy2JXd+xDZiD5L7+tWVvVGFaD+OJoxcOJYpYwczbUeE=; b=R5n5brG4 6itbHImP2MzW4Q9dRJU4BsFz/LkM5xBCV2asry8am3QgRq7NBKehOj78YxHolZHD N7AO6LNnP/Jqt1xspJ3H2kGDCls5Q1C7nbL9C9VHJ233IqMI/t+fw9PnkMJ9GDMr L/pfFKltUimM2glo2pEX5pgyJXKCADFIDFlbxd5m88PS2PN7L/RxO2G4d50Gm0UR muDRdwmRupihZSuIR8DzW9N2eiWN6K4VGm9AFiJKCIYzLHdtn2gZHIHN7RB3V8Gf W/POwusweS4SrQukrRZ54oIpZOF8tdAih5FC8XPThNQ7sqaEGJnXD9J/bGFvxxl6 CsowHs/H4Mz85g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdeftdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 06:40:23 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v10 08/11] ARM: imx_v6_v7_defconfig: Enable silergy,sy7636a Date: Sat, 7 Aug 2021 20:39:37 +1000 Message-Id: <20210807103940.152-9-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210807103940.152-1-alistair@alistair23.me> References: <20210807103940.152-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 ef8c6dca1277..0ac7c61c6f3d 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -234,6 +234,7 @@ CONFIG_THERMAL_STATISTICS=y CONFIG_THERMAL_WRITABLE_TRIPS=y CONFIG_CPU_THERMAL=y CONFIG_IMX_THERMAL=y +CONFIG_SY7636A_THERMAL=y CONFIG_WATCHDOG=y CONFIG_DA9062_WATCHDOG=y CONFIG_DA9063_WATCHDOG=m @@ -249,6 +250,7 @@ CONFIG_MFD_RN5T618=y CONFIG_MFD_STMPE=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_MFD_SIMPLE_MFD_I2C=y CONFIG_REGULATOR_ANATOP=y CONFIG_REGULATOR_DA9052=y CONFIG_REGULATOR_DA9062=y @@ -258,6 +260,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 Sat Aug 7 10:39:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 493444 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39A98C4338F for ; Sat, 7 Aug 2021 10:40:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 21A4061158 for ; Sat, 7 Aug 2021 10:40:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232030AbhHGKkw (ORCPT ); Sat, 7 Aug 2021 06:40:52 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:33369 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232183AbhHGKkr (ORCPT ); Sat, 7 Aug 2021 06:40:47 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 4AE1D5C00E9; Sat, 7 Aug 2021 06:40:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 07 Aug 2021 06:40:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=UMe+3P4YUXxWD B9MuMuOzPb8/JlMM81hk5eWcH49tWQ=; b=ciUm3OtPkK5ydIeT5RkMHP2L0Igy5 QqXoId1lpanqcP/9KfYPqMKLV47Z5oi/4Ui0PEux9aa+Tl4XGqgqn7DI2vsb8cFQ KCAob/w3ZnZCFwqlqD2bW9MozoQgulO38H+Q0O6HVDL5vLyoIW7VsGR/TolAg8/g w7eIS62smhdld7sT+0NMxF/1/2YW21IQYj+B+tDPBSHF5e7N1pZGdvAbViqiTjQF Dw9Xlbco2WHeTunM9dIvCEgs+Ha1vKIaFDOCFrNFHcr2YbZw/7Mmhuzksf2Sm4BA B6cyHBO1rO9+7YADGH2krYNFxSDSMjCJF9pPAh4TnagRUU4PbXdFfbTcw== 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= fm3; bh=UMe+3P4YUXxWDB9MuMuOzPb8/JlMM81hk5eWcH49tWQ=; b=tUzJonKn WUCVDoGEq38tajjeb0unvDLig/zlfYrtE4RKjeGF9hAVXzPaX4x6Cv2QCxSNgOi1 ufGEmEUGl7L/ZGZ8NObWEuGW+Rp3NlMDoVZVdiCw1o9mVbNYWe+4BFQphG8HToEU 8epLVGVhjISUsd7h1lAiYUxO+3tnXyTfC25HTfiGorLdqOb18qIoV19fOA/wE6RF uATJeu72hSgbsPPO+bXvagoHxeLVpZS/AGMWk520M9O85VI5YWwQtoEbetcIpfls uRnfT3tKCQdVLJCq2FUUDBwYyPNa4EJ5tZFSpAGYw2FwGCg9+rcRjlFGVfdhcfva L1pbPTzQm9p+Ug== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdeftdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgepudenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 06:40:26 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v10 09/11] ARM: dts: imx7d: remarkable2: Enable silergy, sy7636a Date: Sat, 7 Aug 2021 20:39:38 +1000 Message-Id: <20210807103940.152-10-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210807103940.152-1-alistair@alistair23.me> References: <20210807103940.152-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Enable the silergy,sy7636a and silergy,sy7636a-regulator on the reMarkable2. Signed-off-by: Alistair Francis --- arch/arm/boot/dts/imx7d-remarkable2.dts | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-remarkable2.dts b/arch/arm/boot/dts/imx7d-remarkable2.dts index cc33b53ae6ba..2f0c4fda38a3 100644 --- a/arch/arm/boot/dts/imx7d-remarkable2.dts +++ b/arch/arm/boot/dts/imx7d-remarkable2.dts @@ -86,6 +86,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"; }; @@ -179,6 +206,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 @@ -186,6 +220,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 Sat Aug 7 10:39:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 493746 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CD0BC432BE for ; Sat, 7 Aug 2021 10:40:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 855B2610FC for ; Sat, 7 Aug 2021 10:40:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232154AbhHGKkz (ORCPT ); Sat, 7 Aug 2021 06:40:55 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:42787 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232210AbhHGKkv (ORCPT ); Sat, 7 Aug 2021 06:40:51 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5397C5C00E9; Sat, 7 Aug 2021 06:40:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 07 Aug 2021 06:40:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=D5XAa6mnxzOob ICi+NDfgLGr0+PRNm4JdFb6bI4vo6Q=; b=nby/EihaKX9ksoZtY6JH6tEIJhyuk d9E6Tqa+HCbbZF915agEWQ7X9NXmfXtenV0sqWwWdb9+Zj98foqkcyLfuEHJ9o6g XZXH17Omm1qkCLQQE9wJRVXxLO8DbsWNaFBrnqduRH7LFt2GOLy2RXQyI4ryExsZ 1BNWtmyfwwGZ9Na3/r9XF5I3oqgnnuaKeJ77BP3lJvQTy88Vnf04F6C3U9ukS6X1 o8dRzDwq4m2FA07A+PwI6plGS2e6/mA1T7V/sbcp2uxzD/8MdWRmRtOrkZOLtyno 8mXo9CsFSx08Klx+PMQnTWZ7loyyp6y4pnnDE5SLnUuZS9gBA0B2AbCWg== 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= fm3; bh=D5XAa6mnxzOobICi+NDfgLGr0+PRNm4JdFb6bI4vo6Q=; b=amaUbw6W YfO+szEq/BCfRuOQMS6dORXsuA/oL1xaMe2V6m0JCcR3Snr3f7+24QbXs0cbI4ad 9ltmrce1Q4yXFGrZCpXpmX1edl3n6DVUeKfboy/2GEJe0XalEkP4H831mZvUpsAj d7jOTtrwQrf2xihcZc32STQdPPlZUZZMevZzcw1N8fH4cEpZUilggdCM+pLcwRTN viv8gmxNlIy8RiYnm0mQgRz/jO37RDUMDfWC4CiHV93K7GcNPGshEP75gN5o+hnj RBCFyhPqGR9N/EjJMwobMxlXRQYqfp8yRc1+LZ3mgiJ2ADgLrWaeFInqPkudPDQ4 7TwDxApKVODoew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdeftdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgepudenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 06:40:30 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v10 10/11] ARM: imx_v6_v7_defconfig: Enable backlight class devices Date: Sat, 7 Aug 2021 20:39:39 +1000 Message-Id: <20210807103940.152-11-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210807103940.152-1-alistair@alistair23.me> References: <20210807103940.152-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The BACKLIGHT_CLASS_DEVICE config is required for the already enabled DRM_SIMPLE_PANEL to work so let's enable BACKLIGHT_CLASS_DEVICE. This allows the mxsfb probe to complete successfully on the reMarkable 2. Signed-off-by: Alistair Francis --- arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 0ac7c61c6f3d..486c59cdb174 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -300,6 +300,7 @@ CONFIG_FB_MODE_HELPERS=y CONFIG_LCD_CLASS_DEVICE=y CONFIG_LCD_L4F00242T03=y CONFIG_LCD_PLATFORM=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y CONFIG_BACKLIGHT_PWM=y CONFIG_BACKLIGHT_GPIO=y CONFIG_FRAMEBUFFER_CONSOLE=y From patchwork Sat Aug 7 10:39:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 493443 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B303EC4338F for ; Sat, 7 Aug 2021 10:40:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9278C61164 for ; Sat, 7 Aug 2021 10:40:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232149AbhHGKlA (ORCPT ); Sat, 7 Aug 2021 06:41:00 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:42885 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232168AbhHGKkz (ORCPT ); Sat, 7 Aug 2021 06:40:55 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 27B4C5C00C2; Sat, 7 Aug 2021 06:40:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 07 Aug 2021 06:40:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=Qp4VJj+NKIDSj eZFw5JMaaO480IDZOWJ/rCbso9rZuM=; b=n8n1OENGFMM1ISGNuNcKwEbG8abZS lf55xNEoeMegxfTCU15BVplWRYaNb9Ob3yvgJhaTnazmL9KNvNHj9DFdsJHzqose OxioFdc+LATtVJb2Icp843dpo762Q29lPrHcbvqgL0Mn6g5qftT4GDvLM79H7ABG rNgYynfB2ngV/9UhUcZIwf67KpODj8foAf7B9tS9XkvRXQhbdC+aaGgRNdqAUSzL BwkZADWaZIXpmU2nj5LSuJGdeQgp9Nu7zB9SNY1yMlGhjVopwswKxeMB5uRC27qi DvT10tOENuQlI4evGb8BEFwYZxhTAPA27+m3c2IFXIRsR1CpFd7fM4Ytw== 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= fm3; bh=Qp4VJj+NKIDSjeZFw5JMaaO480IDZOWJ/rCbso9rZuM=; b=POhy9Ilw 7zebkjLsSCxketXYd+mCSqIbBqQpc9QmhBwkbDhsesPgOR9rqI/zeTE8gAk8n8ie V7N3SMmqnbratUlfNf6LDdvo1vqpcbEhpeaplACi/AM27qYYzysaTE9ZVON6zeh3 rPhGQ77VJMx/FiKuklLsma5g85YtcJeo5KKJ/rmCml5Pn+Lo13wsYwjQG39PXtGt o4Yt2MkdCLppmCx58BJeJ0CCXTvmddNY3bbNBFugrUiOowj5KXA1MceIVRVFplD5 V6bVi11vMbdQQDjnE6TGFW9Y76cTNzg7dNTbRQxi0bvNiwlzp0jUwS0YHOnybrj0 kX5YnY2nrVraFg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeefgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgepudenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Aug 2021 06:40:34 -0400 (EDT) From: Alistair Francis To: lee.jones@linaro.org, robh+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, Alistair Francis Subject: [PATCH v10 11/11] ARM: dts: imx7d: remarkable2: Enable lcdif Date: Sat, 7 Aug 2021 20:39:40 +1000 Message-Id: <20210807103940.152-12-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210807103940.152-1-alistair@alistair23.me> References: <20210807103940.152-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 2f0c4fda38a3..f89945dfd541 100644 --- a/arch/arm/boot/dts/imx7d-remarkable2.dts +++ b/arch/arm/boot/dts/imx7d-remarkable2.dts @@ -47,6 +47,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"; @@ -55,6 +65,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 { @@ -113,6 +133,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"; }; @@ -227,6 +261,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