From patchwork Thu Jul 8 11:57:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 471469 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=-16.2 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, UNWANTED_LANGUAGE_BODY,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 DAEBDC07E96 for ; Thu, 8 Jul 2021 11:58:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2B766143E for ; Thu, 8 Jul 2021 11:58:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231472AbhGHMA7 (ORCPT ); Thu, 8 Jul 2021 08:00:59 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:60095 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231347AbhGHMA7 (ORCPT ); Thu, 8 Jul 2021 08:00:59 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2CE215C0041; Thu, 8 Jul 2021 07:58:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 08 Jul 2021 07:58:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=pRIPB83la3iKOmVVHMgSN8VS8y +Ff25CtnJH129lD38=; b=XHdw/n2X0QPHhk5Rk29wFDa/p/xkS59o/mc2SeDavS 3HukKqfZkR7YE/KafMUaT7+v431Tf9/nfa7M+xgzu1jYE3f3sdnPVfbiJAj7Ow8W gk86tgDL8W9Bdo5eI1y2tM0KivP9sAWh9mORZkD0VAk7IAT9RiIRUtoSZFtTXI3r 0MJQv0fJd5i01ZlqGbbeYHVBXHM5gV4ojFXvXMG+BpUoZAc90bfYLT1un9TpDm9z JhId10gbVqt5CVRwBn0XjXuSN2BbrOTu7PPWd/+qGhluzBsf1OSFqfu7EdHPqfHy nncPVm89f+m+v47eAy8SmD8EmU+wDVmCKbjCM7PpylAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=pRIPB83la3iKOmVVH MgSN8VS8y+Ff25CtnJH129lD38=; b=s/iUt8VeVjzPozum6CJNWV6Xn3GrOETvg DshS8wObJ82OBV8qXoTx2S2ALniOjn4WccVTD/xksmrsxsOuXbbZFhJvSJ6F4kFV 9wlZ86/MycnGXIHawyrhd/SRArdHbym9O+pIeVs0wQg8v2VLrMDPUj+qwA1bI2vf fy5OknMGFe5jkOSaKO4wrdrp6/RvUefmp58utwYo3974tPNMXCkvPkXxefcKetNf VPrNPTF99cCxB7lkKlCNYa7Uwjky3jiNDTM4rJC9Qbkm3jAwW2NUpm4JS9As9YOI GCOZDTwV3nUaykgTqBsYy8qHOKzXF4ItNdURLG6tW2P208GQLz/DA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrtdeggdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertdertd dtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghirhes rghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepkeduveffffefffefve fhudejfeefiedugfeltdegueehhfejkedvudeltdeihedtnecuffhomhgrihhnpehrvghm rghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Jul 2021 07:58:13 -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 v7 1/6] mfd: sy7636a: Initial commit Date: Thu, 8 Jul 2021 21:57:59 +1000 Message-Id: <20210708115804.212-1-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Initial support for the Silergy SY7636A Power Management chip. Signed-off-by: Alistair Francis --- drivers/mfd/Kconfig | 9 +++++ drivers/mfd/Makefile | 1 + drivers/mfd/sy7636a.c | 81 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/sy7636a.h | 47 +++++++++++++++++++++ 4 files changed, 138 insertions(+) create mode 100644 drivers/mfd/sy7636a.c create mode 100644 include/linux/mfd/sy7636a.h diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 6a3fd2d75f96..7b59aa0fd3f2 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1352,6 +1352,15 @@ config MFD_SYSCON Select this option to enable accessing system control registers via regmap. +config MFD_SY7636A + tristate "Silergy SY7636A Power Management chip" + select MFD_CORE + select REGMAP_I2C + depends on I2C + help + Select this option to enable support for the Silergy SY7636A + Power Management chip. + config MFD_DAVINCI_VOICECODEC tristate select MFD_CORE diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 8116c19d5fd4..cbe581e87fa9 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -266,6 +266,7 @@ obj-$(CONFIG_MFD_KHADAS_MCU) += khadas-mcu.o obj-$(CONFIG_MFD_ACER_A500_EC) += acer-ec-a500.o obj-$(CONFIG_MFD_QCOM_PM8008) += qcom-pm8008.o +obj-$(CONFIG_MFD_SY7636A) += sy7636a.o obj-$(CONFIG_SGI_MFD_IOC3) += ioc3.o obj-$(CONFIG_MFD_SIMPLE_MFD_I2C) += simple-mfd-i2c.o obj-$(CONFIG_MFD_INTEL_M10_BMC) += intel-m10-bmc.o diff --git a/drivers/mfd/sy7636a.c b/drivers/mfd/sy7636a.c new file mode 100644 index 000000000000..345892e11221 --- /dev/null +++ b/drivers/mfd/sy7636a.c @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// MFD parent driver for SY7636A chip +// +// Copyright (C) 2021 reMarkable AS - http://www.remarkable.com/ +// +// Authors: Lars Ivar Miljeteig +// Alistair Francis +// +// Based on the lp87565 driver by Keerthy + +#include +#include +#include +#include + +#include + +static const struct regmap_config sy7636a_regmap_config = { + .reg_bits = 8, + .val_bits = 8, +}; + +static const struct mfd_cell sy7636a_cells[] = { + { .name = "sy7636a-regulator", }, + { .name = "sy7636a-temperature", }, + { .name = "sy7636a-thermal", }, +}; + +static const struct of_device_id of_sy7636a_match_table[] = { + { .compatible = "silergy,sy7636a", }, + {} +}; +MODULE_DEVICE_TABLE(of, of_sy7636a_match_table); + +static int sy7636a_probe(struct i2c_client *client, + const struct i2c_device_id *ids) +{ + struct sy7636a *sy7636a; + int ret; + + sy7636a = devm_kzalloc(&client->dev, sizeof(*sy7636a), GFP_KERNEL); + if (!sy7636a) + return -ENOMEM; + + sy7636a->dev = &client->dev; + + sy7636a->regmap = devm_regmap_init_i2c(client, &sy7636a_regmap_config); + if (IS_ERR(sy7636a->regmap)) { + ret = PTR_ERR(sy7636a->regmap); + dev_err(sy7636a->dev, + "Failed to initialize register map: %d\n", ret); + return ret; + } + + i2c_set_clientdata(client, sy7636a); + + return devm_mfd_add_devices(sy7636a->dev, PLATFORM_DEVID_AUTO, + sy7636a_cells, ARRAY_SIZE(sy7636a_cells), + NULL, 0, NULL); +} + +static const struct i2c_device_id sy7636a_id_table[] = { + { "sy7636a", 0 }, + { }, +}; +MODULE_DEVICE_TABLE(i2c, sy7636a_id_table); + +static struct i2c_driver sy7636a_driver = { + .driver = { + .name = "sy7636a", + .of_match_table = of_sy7636a_match_table, + }, + .probe = sy7636a_probe, + .id_table = sy7636a_id_table, +}; +module_i2c_driver(sy7636a_driver); + +MODULE_AUTHOR("Lars Ivar Miljeteig "); +MODULE_DESCRIPTION("Silergy SY7636A Multi-Function Device Driver"); +MODULE_LICENSE("GPL v2"); diff --git a/include/linux/mfd/sy7636a.h b/include/linux/mfd/sy7636a.h new file mode 100644 index 000000000000..b6845a3572b8 --- /dev/null +++ b/include/linux/mfd/sy7636a.h @@ -0,0 +1,47 @@ +/* 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 + +struct sy7636a { + struct device *dev; + struct regmap *regmap; + struct gpio_desc *pgood_gpio; +}; + +#endif /* __LINUX_MFD_SY7636A_H */ From patchwork Thu Jul 8 11:58:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 471215 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp207005jao; Thu, 8 Jul 2021 04:58:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyciHI9X92WFDuCTqXaXCE7N2QUYLWcsSeL/NzNDrmweJH3A39G8jYoWbvszWRzioM3oPms X-Received: by 2002:a17:906:a843:: with SMTP id dx3mr29473765ejb.487.1625745506894; Thu, 08 Jul 2021 04:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625745506; cv=none; d=google.com; s=arc-20160816; b=OLXoEdHNEG/9mNwNH13R3logQOUkZxrZELZoBWNLARAgsFHybDnw9m6sUYpgk3+Iqf P37gxKJn0eH1sunUR/pSilnSqRe95dD+D5RRIoHFJAo9Av3kv8nxlLbvS3Vd26l/OqPi YOP0/I4g56gRbPM1AooAlrDeEDG3oJJmjfw4YwavITi0oVjMXoQsUSUuXzaz4JArdE31 auo0srCch0bW/iP3ZmI+tz+YLYewHDYDVFgGf6h84jwr+t3SAQOR8kVMfwEB68cVMuPT TB2C8bdIL+hA/dsJXKJlsgKIwlZxq3t2xTBEqDJKeu4y+kqzIQPYmvWvcyGlGeLMhTO4 xUKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=+CJTfInSHFK2BaVPjtCvIlAEU6b/iEqjuBkVjoLMTG8=; b=XXsFPtJmzgEY6SXgzh0bgCoLN3t6quFM5D1PbJdLUuK5dcI0miyTBWxwnDOFUBe031 FSK0y1jhTHKBOa7H2PR0gHZFWihsCOYyf6no5IJ4ieDO+OS4RrNfv1LsSi+3jdQsaD6j 0/VBP5wQwiA8hpbTwpXNWwUG+1Q586XpCRu1hYssON9IR0o+FwwkdpQ6IhisVGLMgKwh 6FiXobpGU8TvhOXthupO7ecGo7ZNv1x/JDqOMRY063jOKf5vUziRBDLe28xnPElVvPuo hqr46Henuf5sz40LQoN2Lxi6Sh6y23wYhPnz7JFoG3bGuT5TD/n/sxinVwZ880YoF3/j coZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alistair23.me header.s=fm1 header.b="ZYhnU/f5"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=XbqkpFGD; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb8si3573040ejc.168.2021.07.08.04.58.26; Thu, 08 Jul 2021 04:58:26 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alistair23.me header.s=fm1 header.b="ZYhnU/f5"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=XbqkpFGD; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231520AbhGHMBE (ORCPT + 7 others); Thu, 8 Jul 2021 08:01:04 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:47163 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231347AbhGHMBD (ORCPT ); Thu, 8 Jul 2021 08:01:03 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id F081B58057A; Thu, 8 Jul 2021 07:58:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 08 Jul 2021 07:58:21 -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=+CJTfInSHFK2B aVPjtCvIlAEU6b/iEqjuBkVjoLMTG8=; b=ZYhnU/f5dKm1VnShTylYVHC23dGyU y1wuxEmolojBe85xbDBCAAeKNfDFw2BVGYC3PRDiArXdja+qvMTje3kht77Y1dQT NuLrCMMWAJz/5cxl9IlIMerqoqjkOKXrPpdIK/PQDSF05HllavdDtp3FxPZ+Vap0 +qkxMM0lWzEwBBVetYVZjzDYcjefQr64QEbbEMcqfsqYITkmmck/0hcJK4ZNeO7l sN0vYSt8e4GrcbV6xLHwiiqpPt4s3H8I29fod2AsvyB4n65G3ajZv0ldVSs+aC0A 0Rou3B9/AXHh4aL2MwzDYlzNPGoos115Zd+Kbh9ldGfZ1knsqYn9gRe7Q== 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=+CJTfInSHFK2BaVPjtCvIlAEU6b/iEqjuBkVjoLMTG8=; b=XbqkpFGD Or48Fd3/pBtGw3pDeqfnT9YhI17uLEwSkfG9KjpHeysM76G8ymsOdvXDABsdnMmU aAOnAbBfLHQjVsvh2G5Q7CGUeGamNjlo4jS70Ymv/NDS6ljSoZckCIOVUxyzdAxy UWh22ZhYaEc0mD+x1F1Md5FomAUNVvKzqfe2ZRyIoQmnB3zKHTeINVAll58PgHvP GCYm1y7gXi0PzIiPRCulFNZ0gpRuLLSVWG9v1fN8pa6faO3JcjkfEJEtpfpJth5/ beeGFZprbnGrKoa75IKBpi5n9pTa4jHVL2VMZBLT44xkvSctQi10N9eqIhIRnmc/ rpA0wl9lnPNL4A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrtdeggdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomheptehlihhsthgr ihhrucfhrhgrnhgtihhsuceorghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgvqe enucggtffrrghtthgvrhhnpeehffejteetteekfffhvdeghfegvedvvdeujeehheefveef udefgeeitdehueejleenucffohhmrghinheprhgvmhgrrhhkrggslhgvrdgtohhmnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Jul 2021 07:58:17 -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, Lars Ivar Miljeteig , Alistair Francis Subject: [PATCH v7 2/6] thermal: sy7636a: Add thermal driver for sy7636a Date: Thu, 8 Jul 2021 21:58:00 +1000 Message-Id: <20210708115804.212-2-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210708115804.212-1-alistair@alistair23.me> References: <20210708115804.212-1-alistair@alistair23.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Lars Ivar Miljeteig 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 | 7 ++ drivers/thermal/Makefile | 1 + drivers/thermal/sy7636a_thermal.c | 107 ++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 drivers/thermal/sy7636a_thermal.c -- 2.31.1 diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index d7f44deab5b1..7112c63d9021 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -450,6 +450,13 @@ depends on (ARCH_STI || ARCH_STM32) && OF source "drivers/thermal/st/Kconfig" endmenu +config SY7636A_THERMAL + tristate "SY7636A thermal management" + depends on MFD_SY7636A + help + Enable the sy7636a thermal driver, which supports the + temperature sensor embedded in Silabs SY7636A chip. + 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..705a16fb1045 --- /dev/null +++ b/drivers/thermal/sy7636a_thermal.c @@ -0,0 +1,107 @@ +// 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 + +struct sy7636a_data { + struct sy7636a *sy7636a; + struct thermal_zone_device *thermal_zone_dev; +}; + +static int sy7636a_get_temp(void *arg, int *res) +{ + unsigned int reg_val, mode_ctr; + int ret; + struct sy7636a_data *data = arg; + bool isVoltageActive; + + ret = regmap_read(data->sy7636a->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(data->sy7636a->regmap, + SY7636A_REG_OPERATION_MODE_CRL, + mode_ctr | SY7636A_OPERATION_MODE_CRL_ONOFF); + if (ret) + return ret; + } + + ret = regmap_read(data->sy7636a->regmap, + SY7636A_REG_TERMISTOR_READOUT, ®_val); + if (ret) + return ret; + + if (!isVoltageActive) { + ret = regmap_write(data->sy7636a->regmap, + SY7636A_REG_OPERATION_MODE_CRL, + mode_ctr); + if (ret) + return ret; + } + + *res = *((signed char*)®_val); + *res *= 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 sy7636a *sy7636a = dev_get_drvdata(pdev->dev.parent); + struct sy7636a_data *data; + + if (!sy7636a) + return -EPROBE_DEFER; + + data = devm_kzalloc(&pdev->dev, sizeof(struct sy7636a_data), GFP_KERNEL); + if (!data) + return -ENOMEM; + + platform_set_drvdata(pdev, data); + + data->sy7636a = sy7636a; + data->thermal_zone_dev = devm_thermal_zone_of_sensor_register( + pdev->dev.parent, + 0, + data, + &ops); + + return PTR_ERR_OR_ZERO(data->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 Thu Jul 8 11:58:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 471468 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=-19.0 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 C6F2CC07E96 for ; Thu, 8 Jul 2021 11:58:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7CA46141D for ; Thu, 8 Jul 2021 11:58:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231561AbhGHMBK (ORCPT ); Thu, 8 Jul 2021 08:01:10 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:39241 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231643AbhGHMBI (ORCPT ); Thu, 8 Jul 2021 08:01:08 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 044F55C01AF; Thu, 8 Jul 2021 07:58:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 08 Jul 2021 07:58: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=mMRofIIaWixit VOGeCjP7KV97Cr9IHTUhF1XMo380tI=; b=e2wy2+ps5ozzPyeXVEho4iJl+kKqh wb3Xfjpt+hGRpdZGKLS18sQH7AUwoM3KXNicuZoxwoJ1m6JnZ6ceKV5fVBkMMA67 qqRx1f0w/kMaZj9cD50BpPe7mZQCmAx7L9a9n7nxxsB58FIAKgx8YbSvjpQFh3FT 2hG3WHmFoARCeZNg+47Nc/i46zxJrZF7e+brAjmS8NQEymbtAiJO11z47CuedaOZ kDqwulNjk2UhZO1UtvwhiiDU1Q9WnW2+wW+gr2KQ8PsRvNY4v+C71x/XRzkuHMni e8Xq3LCZ65eX0TB7LBPbkBJN1ivQT17wa3rdEdxVhY0MRphxu+WWrL0NA== 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=mMRofIIaWixitVOGeCjP7KV97Cr9IHTUhF1XMo380tI=; b=em1aGke9 HEAn9ajrA1rAg9ewwcXZrZdrICB+vtV/QllfS0jWpwgY/YguS+Eq5crOu6Jxod5h nS6LcSu9mgZQ626zTXpte+Ly/0qCMfR/PTXZR+c9ynLVY+A94SSSVpp7QxiGAKv9 kgtFYiRDUoj60et7NXPeuHIowaGCLzA2Y3usIu/8T1e/JnsAzXiK6SuTLxPgeyR0 HIJuC6DgCBK1zw56qzYgwU9XzPAe2vngoWUqloWu1KgwNhrE6G2Dc57KoBzrkVLz YNR5/aLUPXnPDbvJSCDp1J+VzDln5xIhaVlCE/itM3lczWE3Gq0L1A/ojUt0yhID P8/S8d6LNqdIvQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrtdeggdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepheffjeetteetke ffhfdvgefhgeevvddvueejheehfeevfedufeegiedtheeujeelnecuffhomhgrihhnpehr vghmrghrkhgrsghlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Jul 2021 07:58:22 -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 v7 3/6] hwmon: sy7636a: Add temperature driver for sy7636a Date: Thu, 8 Jul 2021 21:58:01 +1000 Message-Id: <20210708115804.212-3-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210708115804.212-1-alistair@alistair23.me> References: <20210708115804.212-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 | 106 +++++++++++++++++++++++++++ 4 files changed, 118 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 cd80e85d37cf..e9c0be5629c6 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -227,6 +227,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..4edbee99b693 --- /dev/null +++ b/drivers/hwmon/sy7636a-hwmon.c @@ -0,0 +1,106 @@ +/* + * Functions to access SY3686A power management chip temperature + * + * Copyright (C) 2019 reMarkable AS - http://www.remarkable.com/ + * + * Author: Lars Ivar Miljeteig + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +struct sy7636a_data { + struct sy7636a *sy7636a; + struct device *hwmon_dev; +}; + +static ssize_t show_temp(struct device *dev, + struct device_attribute *attr, char *buf) +{ + unsigned int reg_val; + signed char temp; + int ret; + struct sy7636a_data *data = dev_get_drvdata(dev); + + ret = regmap_read(data->sy7636a->regmap, + SY7636A_REG_TERMISTOR_READOUT, ®_val); + if (ret) + return ret; + + temp = *((signed char*)®_val); + + return snprintf(buf, PAGE_SIZE, "%d\n", temp); +} + +static SENSOR_DEVICE_ATTR(temp0, S_IRUGO, 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 sy7636a *sy7636a = dev_get_drvdata(pdev->dev.parent); + struct sy7636a_data *data; + int err; + + if (!sy7636a) + return -EPROBE_DEFER; + + data = devm_kzalloc(&pdev->dev, sizeof(struct sy7636a_data), GFP_KERNEL); + if (!data) { + return -ENOMEM; + } + + data->sy7636a = sy7636a; + data->hwmon_dev = devm_hwmon_device_register_with_groups(&pdev->dev, + "sy7636a_temperature", data, sy7636a_groups); + if (IS_ERR(data->hwmon_dev)) { + err = PTR_ERR(data->hwmon_dev); + dev_err(&pdev->dev, "Unable to register hwmon device, returned %d", err); + return err; + } + + return 0; +} + +static const struct platform_device_id sy7636a_sensor_id[] = { + { "sy7636a-temperature", 0}, + { }, +}; +MODULE_DEVICE_TABLE(platform, sy7636a_sensor_id); + +static struct platform_driver sy7636a_sensor_driver = { + .probe = sy7636a_sensor_probe, + .id_table = sy7636a_sensor_id, + .driver = { + .name = "sy7636a-temperature", + }, +}; +module_platform_driver(sy7636a_sensor_driver); + +MODULE_DESCRIPTION("SY7636A sensor driver"); +MODULE_LICENSE("GPL"); + From patchwork Thu Jul 8 11:58:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair X-Patchwork-Id: 471467 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=-19.0 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 5AF7DC07E96 for ; Thu, 8 Jul 2021 11:58:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3481E6146E for ; Thu, 8 Jul 2021 11:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231679AbhGHMBT (ORCPT ); Thu, 8 Jul 2021 08:01:19 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52065 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231643AbhGHMBQ (ORCPT ); Thu, 8 Jul 2021 08:01:16 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 46FA75C0196; Thu, 8 Jul 2021 07:58:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 08 Jul 2021 07:58: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=r7v2sGI6eutla 1HtTgIVdJ8GS0/nq7Ix9Yt0KrGBTXQ=; b=gfUYCm1hzJR6IhXPObijuOPQ5h5d9 KV13qtppDAcRcu6nSxBXpAzW8eBhQGka0yIj5aXvF1eELHlUR/AFISrQzi6bTDEJ kdOwUXjYub9f3eYy0kiLwA1dZgcIhxbQF92cPDlZ3v+JceUkD3+tzecUTgto9hr4 cFhtD/oWXVHDDq4F1Df0wBP/0VAZK0fpis6fd4MX2Tfn4bA3yk6ligwNu2QClDbE Z8jRxLakzlZiqlObR9vFqUrhGLOFqdmiIZTvZDwmWZ/P1HSNtggPhxyQHmQcpgRg bdTI1g5qLZojvuu9s8oz8h3DslCFR7/KFv8aXVxcTD/HzSIcr5HJu+/oA== 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=r7v2sGI6eutla1HtTgIVdJ8GS0/nq7Ix9Yt0KrGBTXQ=; b=D685+eF4 Pfvy7s5Qgc1aSS2mGv2Jh38i5XYNU/ukKv9x+8/fBZJjkAyM/VOgCkq25umhHlHb ZssfP5H69fzFod9NtDdk/JsfNEjrO4qQJWpUjDuqQ1YH0LU8ig/Vv9SRMl02nyEr kN5dfWZ1rqOPN7VNXv1wEFeyqbbasHvq4CYykVVGxFyprNU3biQ8Ymzv0v6lT0jM dpMv6X+Rlypk8pocITW/9feRq19jEj5GTqJgA+3tP3Bpjsa9ozJ5UTvNU4U/XUFd GOBMJ+G7jcJdr0pdQvRSyx/aBTanymDtHt2/RO4eiV38ShiWjnDceAwTpk74jg8R ESsXadMcPgaVKA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrtdeggdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepgeegtdetjeekge eguefgheeuvedugedvteejveeiudegvddtkeffkeehtdetudfhnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhish htrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Jul 2021 07:58: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 v7 5/6] ARM: dts: imx7d: remarkable2: Enable silergy, sy7636a Date: Thu, 8 Jul 2021 21:58:03 +1000 Message-Id: <20210708115804.212-5-alistair@alistair23.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210708115804.212-1-alistair@alistair23.me> References: <20210708115804.212-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 | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-remarkable2.dts b/arch/arm/boot/dts/imx7d-remarkable2.dts index cc33b53ae6ba..9bdae1c1236e 100644 --- a/arch/arm/boot/dts/imx7d-remarkable2.dts +++ b/arch/arm/boot/dts/imx7d-remarkable2.dts @@ -86,6 +86,34 @@ 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 { + compatible = "silergy,sy7636a-regulator"; + reg_epdpmic: vcom { + regulator-name = "vcom"; + regulator-boot-on; + }; + }; + }; +}; + &snvs_pwrkey { status = "okay"; }; @@ -179,6 +207,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 +221,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