From patchwork Tue Jun 18 16:06:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 805453 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2123.outbound.protection.outlook.com [40.107.22.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC0D252F74; Tue, 18 Jun 2024 16:09:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.123 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718726999; cv=fail; b=TGVsZK/756SeYsBao3uY/5eDlLWqp4MLW5byHnKOFhbkTza1NStr0zk1mnaGp+BER9z1wiB5cCS3lD/qyX8VbR3QfoqH2yWL6/mj5TXW5qY+dCbyIiWP/HZaq0817bdq0z7TWDabf4dZuQb76+Eq73yF4E4ub13r9TYjEFHQKU0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718726999; c=relaxed/simple; bh=8l2URR3pIF6x05Xd/6FhcdJhOGXFxKSEmPT2xKP8XPU=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=ljg82347w2HGXRFYWnZWfyLwEluldaeXwV2ANmOWCOTuDP3kM+p8nyb4GtMgi4+xyock6Gsqq9mIicZ38A5GVjAg6MqNb2KUofxXuqlqRWufRWTq0m9mS1nZnS1anERjWxpwZtICpqcA+s6T6Cn8rijIhHE/uu/u12xdBA1uWY0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=cherry.de; spf=pass smtp.mailfrom=cherry.de; dkim=pass (1024-bit key) header.d=cherry.de header.i=@cherry.de header.b=cpv5e8Vh; arc=fail smtp.client-ip=40.107.22.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=cherry.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cherry.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cherry.de header.i=@cherry.de header.b="cpv5e8Vh" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XpnDsf6e8ytsU4iMTM+XfLNb1phE3OWHqMPLyPkl4ht4GKGYdQI12NGSZK/7Q5swgoa6EhYcqdmnCY6ooAd9YOuNZlGce6Bm2u79X9L93scFxdD8iIy1tUb3pDrV1hL53yX66/DUnYUQTorGYugLfVSfeZD7Dclcfu+U2OkUZEsv80RqvC3LcBrKiighICGYd+qOqxPz+EonE9LheauyEssHvTESsu9Pq/YEah7SYbQwD4btLVqdJygXzsX5QlmwLiHBgVK9ctyV44hTfjJniOnU6i75b6s6ChUzQ7ZPHj5HUbfwM3ZZJbIDA80aO3N9zH/QyKcz4NrhkF/7aTo/SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PnZwsozoI3H87NtXzhxmoYVOIrhnbDSoIu2s+sHSEGQ=; b=eXf1HMSWunStALSWGknylR88NjtkuGUKmg2IzFCozE004tDTIaNNmG0DoAvnUpkSszLlMxkYe+Zzt8mAC6HpUIv9p63XH2ezR0cfVbrl/Y51F7/YC7Xs41MQFJRiNNpFJ1q1uvKvUKSN3OALX/bxQ2x3wAgHnAEx4lo2I+CRSygA+4l0Z2DqjfepLsySuEvGDg3NCFH/A/bVsWYkuiqWAV+hmPvm9cWtihB+LM+C1HDbbCowfvEKF9cQjTWB35eLabhsdGC/Y6Xc38hH2khYRAIjot6oCfvoRymOPumUHYAsml2fh9E1vCsFZikWASLHVPjHbL40+MlEVe8uSwYGnA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cherry.de; dmarc=pass action=none header.from=cherry.de; dkim=pass header.d=cherry.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cherry.de; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PnZwsozoI3H87NtXzhxmoYVOIrhnbDSoIu2s+sHSEGQ=; b=cpv5e8VhfKXwVKjftMoVJAHwmlLxbzTO9XkgZgFdGUtDRMDqrgAkGJK24C7PTkt+1IusAeojiGrk+PLadogfWjWPSwEysgsBL90t6sD3j5b0/d4x43ETQNwob2vr10pblrgA0mjOv0zTZFYgNAXi81MbbKFnFaYWf/RiiIluAFM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cherry.de; Received: from VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) by VI2PR04MB10642.eurprd04.prod.outlook.com (2603:10a6:800:27f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Tue, 18 Jun 2024 16:09:49 +0000 Received: from VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::2a24:328:711:5cd6]) by VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::2a24:328:711:5cd6%5]) with mapi id 15.20.7677.030; Tue, 18 Jun 2024 16:09:49 +0000 From: Farouk Bouabid Date: Tue, 18 Jun 2024 18:06:46 +0200 Subject: [PATCH v4 4/9] i2c: muxes: add support for mule i2c multiplexer Message-Id: <20240618-dev-mule-i2c-mux-v4-4-5462d28354c8@cherry.de> References: <20240618-dev-mule-i2c-mux-v4-0-5462d28354c8@cherry.de> In-Reply-To: <20240618-dev-mule-i2c-mux-v4-0-5462d28354c8@cherry.de> To: Jean Delvare , Guenter Roeck , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Farouk Bouabid , Quentin Schulz , Peter Rosin , Heiko Stuebner Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.14.0 X-ClientProxiedBy: VI1PR07CA0286.eurprd07.prod.outlook.com (2603:10a6:800:130::14) To VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6382:EE_|VI2PR04MB10642:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ebda858-c65e-4c4a-0c6d-08dc8fb11456 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|52116011|7416011|376011|366013|1800799021|38350700011|921017; X-Microsoft-Antispam-Message-Info: =?utf-8?q?b/XNLMIO+6Vwip0dBeLPhXyZErEgWqc?= =?utf-8?q?xs3m+Q8RoY8J6XsSlbeEPYZYhnTz0eRVfwTaDj2tewLrsg2X42Uo1/AsAh/uULjlO?= =?utf-8?q?6+Dr7vCa0AKv8jPO5j1DGXPlg7wLhwD+9cHTESla2YzMx2Y8Po0/D/tf3zK3mR0bN?= =?utf-8?q?m50no7ELJfbevAsTv0x2qiokZB+ogEIJ0bHIDydN9totTDrg8fQD7264jhamQCwnO?= =?utf-8?q?lSMzZYBULTJ5pWBfdEC0MqW/L2sib3EpvcwnfQ+WxYW4fmrxBk989ViG957PhP2e7?= =?utf-8?q?M4/xxvWe3f0Dy2JCoqWCXS9nOGlmQRapr6BA8HLso1D8mVtt7eCVgrajHwxxzMI0e?= =?utf-8?q?ENnPNIXGI/lQeqC8aiOsG/yIN7OoPr3SL8BZBorQ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VbzOHcIfKj?= =?utf-8?q?admv6PJcHZ3bY2hBdVVeYaTFlCP4s0pbpZFz2bQhZRWO2uc/2G42cSUsilrONFbHC?= =?utf-8?q?eBAStDr5zCBF?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6382.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(52116011)(7416011)(376011)(366013)(1800799021)(38350700011)(921017); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?mkRT58t7yh7rnCyAos3mS+mpaTXU?= =?utf-8?q?gx1bMb0ArKZiU+3LyLEVNexNlcvfAVImgnf+YJ/yOEhGbgB8jGON6PIXFEJw2mogb?= =?utf-8?q?eFN6THOmfVmRBMd//rhGjSAN0OSdOyirl1jqonMaBljwg3evZQlIM/9Gg1fZCbeFx?= =?utf-8?q?XJk/Q+51Rxrfmg/sTnTIrhjcr+VqI9xcD1ETPYK9Ha7CzeirNfOW4G0Tymu5Fv3uP?= =?utf-8?q?ly5pNobRem9+apBAdi6PstKWWYXoe581Sj1N9WvQY43a58Z94OsoOiDTjVhoNQh8k?= =?utf-8?q?A+MseTahiq92upkOwoYOSLNQRO32iEm4YLey2UGL5VWMVGs5IR6hUFhGkIhycumxO?= =?utf-8?q?TgW/g6zJT6mKhXgTjPRnikXW4gWMUvra+0yh12DIWpI84Uxl4QzTnNbkiqBFq6BIY?= =?utf-8?q?3fSUCN3kT+ZACqI2K6PCvYkYxebL6AyYR9BFMCEQ61+wXf3TUKAhfHDgt/tfsbKDu?= =?utf-8?q?FpndYMfllPEAwTTH+dBrcUeT4FSdsLHJFb3l+xztbs2YWBQfXl9b+qm5ZMLHWiXJJ?= =?utf-8?q?T4eBf7Awh1Y6TZGGiR6pPKx9OjEPn7DkQPI+jBdZgp84fLgAYGVgCJzo7f+3yHfW0?= =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?utf-8?q?kLJhuhjLCUyx8WHn58MJI+wVPyc2rT1lu7k9smPo5YJzJ9HX03+/uayhznrqu6wK4?= =?utf-8?q?PVkcc1CjXLIqU7JuLeagj2uH4Kq6DOlQbA=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 3ebda858-c65e-4c4a-0c6d-08dc8fb11456 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2024 16:09:49.4913 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5e0e1b52-21b5-4e7b-83bb-514ec460677e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zRanaumrjH8pvLayHXDVSt+FZOlIN+nRlGHSxxLYAIjAJQpoLMqHmagBmUe+8prOQ9Ok3fdISFBCEevXl0n21dZQUNvwT3G1Xp1/AZW2eq8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10642 Mule is an MCU that emulates a set of I2C devices, among which devices that are reachable through an I2C-mux. The devices on the mux can be selected by writing the appropriate device number to an I2C config register. Signed-off-by: Farouk Bouabid --- drivers/i2c/muxes/Kconfig | 17 +++++ drivers/i2c/muxes/Makefile | 1 + drivers/i2c/muxes/i2c-mux-mule.c | 151 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 169 insertions(+) diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig index db1b9057612a..e535cd9ea712 100644 --- a/drivers/i2c/muxes/Kconfig +++ b/drivers/i2c/muxes/Kconfig @@ -119,4 +119,21 @@ config I2C_MUX_MLXCPLD This driver can also be built as a module. If so, the module will be called i2c-mux-mlxcpld. +config I2C_MUX_MULE + tristate "Mule I2C device multiplexer" + depends on OF + select MFD_SIMPLE_MFD_I2C + help + Mule is an MCU that emulates a set of I2C devices, among which devices + that are reachable through an I2C-mux. The devices on the mux can be + selected by writing the appropriate device number to an I2C config + register. + + If you say yes to this option, support will be included for a + Mule I2C device multiplexer. This driver provides access to + I2C devices connected on the Mule I2C mux. + + This driver can also be built as a module. If so, the module + will be called i2c-mux-mule. + endmenu diff --git a/drivers/i2c/muxes/Makefile b/drivers/i2c/muxes/Makefile index 6d9d865e8518..4b24f49515a7 100644 --- a/drivers/i2c/muxes/Makefile +++ b/drivers/i2c/muxes/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_I2C_MUX_GPIO) += i2c-mux-gpio.o obj-$(CONFIG_I2C_MUX_GPMUX) += i2c-mux-gpmux.o obj-$(CONFIG_I2C_MUX_LTC4306) += i2c-mux-ltc4306.o obj-$(CONFIG_I2C_MUX_MLXCPLD) += i2c-mux-mlxcpld.o +obj-$(CONFIG_I2C_MUX_MULE) += i2c-mux-mule.o obj-$(CONFIG_I2C_MUX_PCA9541) += i2c-mux-pca9541.o obj-$(CONFIG_I2C_MUX_PCA954x) += i2c-mux-pca954x.o obj-$(CONFIG_I2C_MUX_PINCTRL) += i2c-mux-pinctrl.o diff --git a/drivers/i2c/muxes/i2c-mux-mule.c b/drivers/i2c/muxes/i2c-mux-mule.c new file mode 100644 index 000000000000..530403adea50 --- /dev/null +++ b/drivers/i2c/muxes/i2c-mux-mule.c @@ -0,0 +1,151 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Mule I2C device multiplexer + * + * Copyright (C) 2024 Theobroma Systems Design und Consulting GmbH + */ + +#include +#include +#include +#include +#include +#include +#include + +#define MUX_CONFIG_REG 0xff +#define MUX_DEFAULT_DEV 0x0 + +struct mule_i2c_reg_mux { + struct regmap *regmap; +}; + +static inline int __mux_select(struct regmap *regmap, u32 dev) +{ + return regmap_write(regmap, MUX_CONFIG_REG, dev); +} + +static int mux_select(struct i2c_mux_core *muxc, u32 dev) +{ + struct mule_i2c_reg_mux *mux = muxc->priv; + + return __mux_select(mux->regmap, dev); +} + +static int mux_deselect(struct i2c_mux_core *muxc, u32 dev) +{ + return mux_select(muxc, MUX_DEFAULT_DEV); +} + +static void mux_remove(void *data) +{ + struct i2c_mux_core *muxc = data; + + i2c_mux_del_adapters(muxc); + + mux_deselect(muxc, MUX_DEFAULT_DEV); +} + +static int mule_i2c_mux_probe(struct platform_device *pdev) +{ + struct device *mux_dev = &pdev->dev; + struct mule_i2c_reg_mux *priv; + struct i2c_client *client; + struct i2c_mux_core *muxc; + struct device_node *dev; + unsigned int readback; + int ndev, ret; + bool old_fw; + + /* Count devices on the mux */ + ndev = of_get_child_count(mux_dev->of_node); + dev_dbg(mux_dev, "%d devices on the mux\n", ndev); + + client = to_i2c_client(mux_dev->parent); + + muxc = i2c_mux_alloc(client->adapter, mux_dev, ndev, sizeof(*priv), + I2C_MUX_LOCKED, mux_select, mux_deselect); + if (!muxc) + return -ENOMEM; + + priv = i2c_mux_priv(muxc); + + priv->regmap = dev_get_regmap(mux_dev->parent, NULL); + if (IS_ERR(priv->regmap)) + return dev_err_probe(mux_dev, PTR_ERR(priv->regmap), + "No parent i2c register map\n"); + + platform_set_drvdata(pdev, muxc); + + /* + * MUX_DEFAULT_DEV is guaranteed to exist on all old and new mule fw. + * mule fw without mux support will accept write ops to the + * config register, but readback returns 0xff (register not updated). + */ + ret = mux_select(muxc, MUX_DEFAULT_DEV); + if (ret) + return ret; + + ret = regmap_read(priv->regmap, MUX_CONFIG_REG, &readback); + if (ret) + return ret; + + old_fw = (readback != MUX_DEFAULT_DEV); + + ret = devm_add_action_or_reset(mux_dev, mux_remove, muxc); + if (ret) + return ret; + + /* Create device adapters */ + for_each_child_of_node(mux_dev->of_node, dev) { + u32 reg; + + ret = of_property_read_u32(dev, "reg", ®); + if (ret) + return dev_err_probe(mux_dev, ret, + "No reg property found for %s\n", + of_node_full_name(dev)); + + if (old_fw && reg != 0) { + dev_warn(mux_dev, + "Mux is not supported, please update Mule FW\n"); + continue; + } + + ret = mux_select(muxc, reg); + if (ret) { + dev_warn(mux_dev, + "Device %d not supported, please update Mule FW\n", reg); + continue; + } + + ret = i2c_mux_add_adapter(muxc, 0, reg); + if (ret) + return dev_err_probe(mux_dev, ret, + "Failed to add i2c mux adapter %d\n", reg); + } + + mux_deselect(muxc, MUX_DEFAULT_DEV); + + return 0; +} + +static const struct of_device_id mule_i2c_mux_of_match[] = { + {.compatible = "tsd,mule-i2c-mux",}, + {}, +}; +MODULE_DEVICE_TABLE(of, mule_i2c_mux_of_match); + +static struct platform_driver mule_i2c_mux_driver = { + .driver = { + .name = "mule-i2c-mux", + .of_match_table = mule_i2c_mux_of_match, + }, + .probe = mule_i2c_mux_probe, +}; + +module_platform_driver(mule_i2c_mux_driver); + +MODULE_AUTHOR("Farouk Bouabid "); +MODULE_DESCRIPTION("I2C mux driver for Mule"); +MODULE_LICENSE("GPL"); From patchwork Tue Jun 18 16:06:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 805451 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2116.outbound.protection.outlook.com [40.107.22.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8928113C9CF; Tue, 18 Jun 2024 16:10:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.116 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718727004; cv=fail; b=cNP9UQnTFV2RI4rIo+2/cTdMbD+SHm28qgQbfsbs7dEDzQI57uuNBempGCMCWjQXnFZaKC4n28JVjRd4V/6CTE3cfqT5KPqLO/77x9Eyuj34/GpXYXl3NAvzH3oZMd+pl45cDa2fKKG5y8X0KUFkhrQl0pIUOukA2wlyef3LP1I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718727004; c=relaxed/simple; bh=gPEggTVcyiCzVXhELuEmuf2BtpXmLnnN7oiGezUPSc4=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=M/nyrR23PO4JujFE8fkmsTyLhKSZeDspj/LhNbwgyInbqMolv4zTF8J1CwZMUmFjc9h24HBTgWwxrs330KxWWQMr72EXXURvih+6O37ECyZZ9SxSbNfraBJLXUROlRlpSoWqpBdRV8UonGESO/fyBenG2rMkMprLAO+TMe01y9E= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=cherry.de; spf=pass smtp.mailfrom=cherry.de; dkim=pass (1024-bit key) header.d=cherry.de header.i=@cherry.de header.b=krHicajR; arc=fail smtp.client-ip=40.107.22.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=cherry.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cherry.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cherry.de header.i=@cherry.de header.b="krHicajR" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wbn4rePg7DvEI8OJouaBzqKDsxmgiQPvbf8Pas8qpBsU1EEBg95Dajv6PqOCeBpgMRskzS445Tk7IeDXTonY7L4uYX1Ve4j8CKVCTPlal6kJ+j5siEh6M9FmgMn5ymX+ZrsV7SquUpNZcdhN0mKO2shQQWK//NMrenOlUxBGrWlpXFVUb0D0XEdfxJUAlwYuUowPHsNXr7SEN4e31/DLdbe5lFYENCP4aqlKHCFwCszRfoD3A/Xh72a51tgj7glTZ0jP6C0tjNmuQ1XANCt7cXbVnC0vIA89y4V/67rvyoWIAgvy9yYpiP+sJrK5cEJWvEjVTDTWOnX1CPo1yxCX1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HNzqLlROhiUaVRtvwgh2JlueytI+aFRy0b6MpZJr3HM=; b=IohSgKjv4OspN7ykKursZYc6zY6DHKvWKDMDTrSdMWgkQlxrkWtGehbm/XvcK7T81n6wnZfqga+4LlEAIHANszSGUA1VyH/p7A5eLrU5t/nbEaBogftw8/i8k9QB9e2f+jHL/PA/XIdo5aq3zdyx+1VCgVlF5gczGFn0GBq5ktYtixKhcZixoXoXWfaEu3H6pc6HqPcnj+iv2rqrfwWrlez33O0WZL9kB3Oj1VLJavPOx1lRAoiGXSzBQVtcUpNc6oY7PwDNV9edCtHoRv2D98aDet/kSW2+vzrHhJbGM1+Ho+WJwhzPCDCkIUi8bIbtyyh/XF6IJf7cXI6HfSTWSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cherry.de; dmarc=pass action=none header.from=cherry.de; dkim=pass header.d=cherry.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cherry.de; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HNzqLlROhiUaVRtvwgh2JlueytI+aFRy0b6MpZJr3HM=; b=krHicajRJ/i4D2ZijR82eHn/YR8p0nBi8yZiGvr3E2WS4kIz/i93zYF5O+KVQLVWufp7Cu9CkFXy2um+olf5TfEJltjxV6+ROzsQPNveXv+wk5TF+BGeUpSrhSg6Kx22Q48lTpCJ4PMqDbRw5M3WOSvxoZpIhRocNUs7vbQd7Fk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cherry.de; Received: from VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) by VI2PR04MB10642.eurprd04.prod.outlook.com (2603:10a6:800:27f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Tue, 18 Jun 2024 16:09:50 +0000 Received: from VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::2a24:328:711:5cd6]) by VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::2a24:328:711:5cd6%5]) with mapi id 15.20.7677.030; Tue, 18 Jun 2024 16:09:50 +0000 From: Farouk Bouabid Date: Tue, 18 Jun 2024 18:06:47 +0200 Subject: [PATCH v4 5/9] mfd: simple-mfd-i2c: Add support for tsd,mule Message-Id: <20240618-dev-mule-i2c-mux-v4-5-5462d28354c8@cherry.de> References: <20240618-dev-mule-i2c-mux-v4-0-5462d28354c8@cherry.de> In-Reply-To: <20240618-dev-mule-i2c-mux-v4-0-5462d28354c8@cherry.de> To: Jean Delvare , Guenter Roeck , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Farouk Bouabid , Quentin Schulz , Peter Rosin , Heiko Stuebner Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.14.0 X-ClientProxiedBy: VI1PR07CA0286.eurprd07.prod.outlook.com (2603:10a6:800:130::14) To VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6382:EE_|VI2PR04MB10642:EE_ X-MS-Office365-Filtering-Correlation-Id: 65597078-c78c-4f8e-62ab-08dc8fb11490 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|52116011|7416011|376011|366013|1800799021|38350700011|921017; X-Microsoft-Antispam-Message-Info: =?utf-8?q?LH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wf5MCg+uDoYwX6GKf80zxoe/jCG4?= =?utf-8?q?7FspDjKfxJn2QJHcWM/sjMkU4rlevPR+TzZQM7w0DTy0RPC08fDhKyVH2vPoewdCt?= =?utf-8?q?Inv/wAWVXV3sEdRugTMa0fMuD4KR8BwNI0RywtnDKHe9NC7MmvDPFaBPoLazC5Qzi?= =?utf-8?q?O835MNLNEEmLRUXX2iToK5c+HmFC68KpAnuIe0yU744JG7Yxa0B+v1s1ygA6lOdEV?= =?utf-8?q?QtYvgodNYMGjjxtaqJzRL45nL5TLjdYb2svFhSsrGt1ZUDWAFmTS0eBgjK8lQn6lz?= =?utf-8?q?8XEAV3GG8kTeM8GDuIaSG7xAmVpaWy9z1LNB+UsYv0Mqkq7hR6gCPZLJ16rV2iaUM?= =?utf-8?q?w0cpobPRGgcmlmqBuZ3+l1j+QW1zkMCQSNxKXV1NEk3ZsTbe9QsAaZNCt1Yyb1lPi?= =?utf-8?q?bs3XYhyBY3I5sdx8lx+Qj3WEotWRR69FcJYtz7+4KvFdgsTwEzfgL4Upm32WEs7pD?= =?utf-8?q?MMBytRe7d3cU?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6382.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(52116011)(7416011)(376011)(366013)(1800799021)(38350700011)(921017); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?TXB4xsVhgJ2kT8LrWmRnnvumY/zq?= =?utf-8?q?Rj/p4rb42snvcoba0MpaF3Vx5e1Xnk656OCcIB9im3/uBFjQdhQ5n4k0egqCVYaKp?= =?utf-8?q?zPDOBq+oduqTk3QcpKxw8iBwOqb7snwKI/yWclY2cDLOd8wxn2/YhWRE1V3DYT34e?= =?utf-8?q?BwiKw++UKxWeaJShSbHlXCqq84FAxvdJW6DwZV50atV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n6MONP5B7T+pNk5N6rdJclzVG?= =?utf-8?q?nLS9+tv7X9vaCfzKedmtZS2A1eddVn7F2xX3ryNEZ9PwbulLJtcVCLlT3FiuNy/1v?= =?utf-8?q?/Cw1SkkV4LdgchQUeQevqrYUV9TdlpxRT0Ki80Ff0PbgpPZwZQQhxx1E3YKqWkLnK?= =?utf-8?q?TEH2ylxhBkVFDb7vp+wdbm7lKj/HaJG2fN6NE1DkV6u9gxIndIbhAY7EInBybBlki?= =?utf-8?q?v4FOVPNIwttCV69HBY54l9qG9bRCKep8r4eXlHarqrqm6U0VEwhfyKfyJqMd9vAI7?= =?utf-8?q?rophFt6GUpQw6BO2P8abuDcLCuBjDvAKz6cTR1916G1HMof9eZylRsqX+TZ1JIKL2?= =?utf-8?q?NkbnIml2fFSAwRGu4R2BmRBf73dyXwMmAMUZUAywfBA9Dv4SaJGaDzq3/Cz7C9FvQ?= =?utf-8?q?HCRVCQnw0GhLHfjkQH544kG6/MJEY1rq8j3j94X/7jK76/amSc45Gp3LbcsfApHN9?= =?utf-8?q?mMMA4S3w81N5Rvsoxc/g1/qsqlvyPuOYYQ=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 65597078-c78c-4f8e-62ab-08dc8fb11490 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2024 16:09:49.7784 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5e0e1b52-21b5-4e7b-83bb-514ec460677e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gje6fofuReYxtTO73A4LPQBD/JKMApMbGEgrTn/2vLO/Autpo8uidGphK+NEnJJAF1FX1mDk0izu+Z6EyUuCxfj6zNL5fb3iaFmvXX6ZY3Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10642 Mule is an MCU that emulates a set of I2C devices, among which an amc6821 device and an I2C mux that exposes more emulated devices. These two devices share the same I2C address. Only the I2C mux uses register (0xff) as a config register. Add a simple-mfd-i2c driver support for these two sub-devices. Signed-off-by: Farouk Bouabid --- drivers/mfd/simple-mfd-i2c.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c index 6eda79533208..1c5853868022 100644 --- a/drivers/mfd/simple-mfd-i2c.c +++ b/drivers/mfd/simple-mfd-i2c.c @@ -88,6 +88,7 @@ static const struct of_device_id simple_mfd_i2c_of_match[] = { { .compatible = "silergy,sy7636a", .data = &silergy_sy7636a}, { .compatible = "maxim,max5970", .data = &maxim_max5970}, { .compatible = "maxim,max5978", .data = &maxim_max5970}, + { .compatible = "tsd,mule" }, {} }; MODULE_DEVICE_TABLE(of, simple_mfd_i2c_of_match); From patchwork Tue Jun 18 16:06:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 805450 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2116.outbound.protection.outlook.com [40.107.22.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA50514036D; Tue, 18 Jun 2024 16:10:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.116 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718727006; cv=fail; b=NFpSeose7V24XY7Ivyk4ooYU7kBE9VZFF2sLP2au+/l722o45LQL7XZG/35awwdftD3KC6e9dk3pPy21KcA8Owvp+L4uYrwFGShEsb29uhHqD/RqlgF0e95TDwlwptOKG79ePJ+fJ66o2viH5DjTGQlbkOyfa4cUhQomRVNtip4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718727006; c=relaxed/simple; bh=BdXnJ8QF+bCHgWxnWn1bv1gvouVxSAhBL02AzBG+kBU=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=YNsaxAMHzJVSmDaOwCbzQhlW1cEfaN1tOaRlsunsFi4BdtKZ0NHv8kTN+jV/LwQ7I9jTpXQfJIyG2CV2Rhw9LIuWRPogy3yjODDFrDnZU0WnfGiPZd0K4cQ4kuCOrZHTJT2Og5OfjTExjUv6SUAVYBfFALvBPznrBYSPqjRU1CI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=cherry.de; spf=pass smtp.mailfrom=cherry.de; dkim=pass (1024-bit key) header.d=cherry.de header.i=@cherry.de header.b=Wkvu7ccF; arc=fail smtp.client-ip=40.107.22.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=cherry.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cherry.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cherry.de header.i=@cherry.de header.b="Wkvu7ccF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g1ogDyRTqfDlXoKQX/UgONZNrTzjrXI8JzPvB1QTgCNfTCmvauogO0jSUrbHoZQLJr6p0bKs4xi2NjilPAfbGv5Ck7LUaaZO9uCf4BkqubguOW1HuaDf7nNd7ffHOaXEyveGBFb1bS5a0li0Ls9WaHGBP/0ZgU3m56XhMmRWqiYlXMT0VmacNHSQaepcN9opofEW78Wa3Ac2jYzqU893zeaP+jIjQIoy4wK1faZQ8xmRPP6gnM+EpL4cEGOOOcy8pCjfD89oG/AOrIj8vb51sOm9LWUBvavY9UTB8Ww4VmT9sjn6r6rvxmOKuakTfTJvmzyu1Dx0GHMgnxgYB3Ceww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DyJgtSIXL+qYOu8RbmMP/ysmghYyFQgrLVvUP/JGLno=; b=fkXfYwxj3BADWm7CYfQBtmlrwA5lHqWcLcBWyT9LduMjW0dd7m31cTzTPaNGRGsU+KVf8A6WuNHsDvLDM0O6Po43CtcBzr0uew0rs0hoNKrkE7BrU/ntTeJj8AuHKDBLzHMc4ItXbiMMiHYFLbcZ2rsIKpH2z3vFwlIyhAkt8L6opNFeijenr07OXsMiXENMBJfcMMDRAQCawk8X34PUQd5kjbqgoClvLoPfb5rDBBb3s+1mDYEvNXePMWFplmhS5YEc1rebues6DvG1NCjWY4E/ohGlz+dNKTqqJisiHVcAjjgABFLUR2W15ZBLhmMNRVEJmEeTfX7SEfdl8x6XOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cherry.de; dmarc=pass action=none header.from=cherry.de; dkim=pass header.d=cherry.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cherry.de; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DyJgtSIXL+qYOu8RbmMP/ysmghYyFQgrLVvUP/JGLno=; b=Wkvu7ccFlRgWRnO2lxWZ63/7Gln/+ba9mkGrJNVJFXBD8WcNykhs+O70JWr280+LrxDqgPeO4M1ENpGqCpUI4YlKGz9/9+AO7K2wT3kHcGvl23g6U81ypyRPiozzNSbJn+Cv1FeTarPR2/fk3dPgehEb52eFkK2EHuKfR067vYg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cherry.de; Received: from VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) by VI2PR04MB10642.eurprd04.prod.outlook.com (2603:10a6:800:27f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Tue, 18 Jun 2024 16:09:50 +0000 Received: from VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::2a24:328:711:5cd6]) by VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::2a24:328:711:5cd6%5]) with mapi id 15.20.7677.030; Tue, 18 Jun 2024 16:09:50 +0000 From: Farouk Bouabid Date: Tue, 18 Jun 2024 18:06:49 +0200 Subject: [PATCH v4 7/9] arm64: dts: rockchip: add mule mfd (0x18) on rk3399-puma Message-Id: <20240618-dev-mule-i2c-mux-v4-7-5462d28354c8@cherry.de> References: <20240618-dev-mule-i2c-mux-v4-0-5462d28354c8@cherry.de> In-Reply-To: <20240618-dev-mule-i2c-mux-v4-0-5462d28354c8@cherry.de> To: Jean Delvare , Guenter Roeck , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Farouk Bouabid , Quentin Schulz , Peter Rosin , Heiko Stuebner Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.14.0 X-ClientProxiedBy: VI1PR07CA0286.eurprd07.prod.outlook.com (2603:10a6:800:130::14) To VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6382:EE_|VI2PR04MB10642:EE_ X-MS-Office365-Filtering-Correlation-Id: 3bd627c3-7477-43df-dd1c-08dc8fb1150b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|52116011|7416011|376011|366013|1800799021|38350700011|921017; X-Microsoft-Antispam-Message-Info: =?utf-8?q?4lAvmzQ/YUGoBeJHNlkvWbzXrAKyY9H?= =?utf-8?q?TOW1oOGd2x+QC/rSSG8twUqWZAIfogpglhh4jEYBn3QmVxzPW+dniZaKm2XvnAhC5?= =?utf-8?q?6/TDnZYFdj5B7p73RDpXtAn7n3AWPrn45sEFYZk0k0nzXMNFUfCU6RKi6nYVGO9Bq?= =?utf-8?q?sFC6xA3ceo2PkWLuvgRyV9rRMzpPdfP/xvO7cHVXWdyJJXuJhtovf5qP3t479Q0Rd?= =?utf-8?q?BWOFS1Fl/RnzCHCY762yeLTLZA9u00B4mhtT6ChtqWKxbX0dKnW1f1VOIXxRDcGcK?= =?utf-8?q?Tg5EkpZ9blTiSyyswZHXlek2jB0aThWm6XQIsXJN7gfcCWCHaG5STvdjxZHJ1Kb38?= =?utf-8?q?5BpZbhEOBivXaV4V7YeyL7h7MtXpr98DHVW5aLplEJg/0eEd3Ijz0JiVmhYvuoK80?= =?utf-8?q?gBIoHjWW8kjzdeadVSGgVSw35mbKMxBo9BzbkO1Q5G1HILGoBWlzFhz9yfE0IPhep?= =?utf-8?q?lvoj2zlY2yUQ0S7wg8vxxWPPQhov9EwUxsSCJwp88oa4PBY1a1uNpnFhcF1o+bZ8Q?= =?utf-8?q?EDw6wiWWBOZ7MEPDwvvgijmG0EU3rXqSCOuA6ts/fH6+zEnqCxoPuuTp0SzAW7ltU?= =?utf-8?q?Doo3adLOZj0iw8Rqlktq7mcpkV8racQM/WAf9EphSh/ne/E8Xq9FLTWVUGQBtzsQx?= =?utf-8?q?VH/zq0xZ0LEaYIWKAUi6vcB/RvcWpxXzbx6XBDeZGwRK/qSN39lL7zVoDUodtYmzd?= =?utf-8?q?c5raUGhpbyBi8CGoczKEyl+3u/5moPtIIktRD0eiaFlj0of8lWnZYPbVZpHaGrMAy?= =?utf-8?q?H0xGCB9tQRPydvh1EbexGcwz3/swRSq/7Bdsj1ray+Uzr+GpdI8+5MTmrid6Ofg5q?= =?utf-8?q?9sqncnJQ1a9e8PrX18u94MQYXM1mdfABU7jiGok3/N8lOmtlWU16ZuOzQKbZ0G0Ax?= =?utf-8?q?aHp394oO4xPgeX1IJpTQFyWA+FuPXoyxgCumonR3NyiWi+adsEbTefZmJkpDxOiL2?= =?utf-8?q?FF8Ub6ruViJ77hk2GLAO9oByU3guQ6McPodIqXzdkvPaGdxbrWyOe9R4WNvy547ei?= =?utf-8?q?N1/ONNaOWFLIgXTm8IIaYmDo6VHWt9snscHGbAA5yo9pCbiYZowoA9D5hRfCsEotO?= =?utf-8?q?zLzGBfU+bdqwrb4vQcy+IJkdg6ueRqNQM7+LC0vhD4W6o/Q3ojxwG9+N4igl7F2nZ?= =?utf-8?q?gRp57NwPZwL2aF5HmSivA0GZt4HW0M/IoIcdTIPxyKdnRPsHi0X8/xWG2vEhJi5Fr?= =?utf-8?q?9VoQ7lmJLulHVNfIzYeZ/SOzmCGg8EN3TyMvT5UvxjFh8KycskX7r7ITBrYORyLqI?= =?utf-8?q?XWfMA/gYyJqNwUOAbdbKGCwfV/xHFopkRsdLgaYKunAoumqlGIHTEpU6Cjr3nQ33u?= =?utf-8?q?LOcsF7EkHQiy?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6382.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(52116011)(7416011)(376011)(366013)(1800799021)(38350700011)(921017); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0PVzV2W41gpmd/epojW2THaYyToq?= =?utf-8?q?WbZEYr5746YgiuFB3sMTvM5PhfOh5fGBF3tzXzTJ0YZnYpeYxAVJpXmSy5nWFQ4Ky?= =?utf-8?q?iNoyM6MHOWz4Yy2otzQ8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bpKIH+YEA13g7iddJcm9VlmVv0MqqFIzqxe9wiU0QDAy0c?= =?utf-8?q?GyhbcFsE6AJR6/lYXIkLkkLdKoQSGCOgqirjfhkBYgegriJWQ2KMuqR8ZtuGcOIF0?= =?utf-8?q?qEledPk7GifbNhdohnxwjDphljE5crZgz4O5HsQGnYc9XsT84TumikUTX1bKo8qIT?= =?utf-8?q?rpRrEmb5f6kzf4ubGGnPVE73FrShTEnAdWlXpg1QO1o15B1O7t1l8itmWQn9m991x?= =?utf-8?q?vFNHuNIQhN41dIqHTSPaOdWTrDycO1jJnL+ayGp/p9y+jquCRmSjRMdEyGXIVlwYf?= =?utf-8?q?2k64WmUkwV1zZDE/+OL4sFWryGJFgdTq/+QSRFPkUSNFk18Oa1Q3s33HwV0vptE/L?= =?utf-8?q?tJReS+6NZT1/4drGVo3aEouRf5nv6y9XR6cHVNM3RxHAiAbhxxrMcqU/q09q6h84c?= =?utf-8?q?uJNQj+rC7cWza8G7X81CZOOtVMqiRFdRVP0zhtpuZzzms+DsRrjcrqlVCY6wYOoEr?= =?utf-8?q?OKJFLfjh/DeKt9RG8dVEhO6USw6GKYab47dOopL3KVltyskTOka0kiY6jzpB0m4hy?= =?utf-8?q?fKvbeyvf3qI0+oFUBehevnOM1NFnMy8m3Q=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 3bd627c3-7477-43df-dd1c-08dc8fb1150b X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2024 16:09:50.5914 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5e0e1b52-21b5-4e7b-83bb-514ec460677e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vrfc+VCXVe3ccAuH1/4cGuGX7GXxXDcahyIwE7b9cvNdyrdfgR56hL4achGEi3urfoQC34AJjGq0e6qbX79Iw6K73IeUhnoydP1h9SBx6Bo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10642 Mule emulates amc6821 and an I2C mux (mfd:0x18). The isl1208 is exposed behind this mux. Add the mux node and isl1208 as a default device. Signed-off-by: Farouk Bouabid --- arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 33 +++++++++++++++++++++------ 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi index ccbe3a7a1d2c..052c01472c5a 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi @@ -10,6 +10,7 @@ / { aliases { ethernet0 = &gmac; + i2c10 = &i2c10; mmc0 = &sdhci; }; @@ -377,15 +378,33 @@ &i2c7 { status = "okay"; clock-frequency = <400000>; - fan: fan@18 { - compatible = "ti,amc6821"; + mule@18 { + compatible = "tsd,mule"; reg = <0x18>; - #cooling-cells = <2>; - }; + #address-cells = <1>; + #size-cells = <0>; + + fan: fan@18 { + compatible = "ti,amc6821"; + reg = <0x18>; + }; + + i2c-mux { + compatible = "tsd,mule-i2c-mux"; + #address-cells = <1>; + #size-cells = <0>; - rtc_twi: rtc@6f { - compatible = "isil,isl1208"; - reg = <0x6f>; + i2c10: i2c@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + rtc_twi: rtc@6f { + compatible = "isil,isl1208"; + reg = <0x6f>; + }; + }; + }; }; }; From patchwork Tue Jun 18 16:06:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 805449 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2116.outbound.protection.outlook.com [40.107.22.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B06350297; Tue, 18 Jun 2024 16:10:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.116 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718727009; cv=fail; b=dwL1WdHB2WM27ApR53BKaXKH4aKS1nVauUjJbgdnjM+3eP141XIWCd39PB8iYWTW76aV1j/xyf9P9GKjPMvEMzKbQA39eQv7YfWyMjBeuZKJf0p2UJL84x1ItCzI/yqxeqWOXUSQOvj6E9TyxmKRICtptOObRJMZ63Jg5OEygIA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718727009; c=relaxed/simple; bh=E7If3br4S8Uf2sF4XOo+1cQpwJ5a9s5Yad6QwfhILIQ=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=AUDlaiD1L7e7Plqky6BTlsipjCBuZNXgXQ8Kj5Hc8mx3dQeWzyU7Sxcx4gQpeBARJUAR1AqZyIUbKFyEJJtqtug0YHsHPMwJXHlPTdNLMJlyndEShj/j1CN7G5GEIse9bfh3ttkZiTUrmIXFypbLabKoZpEK1ZAZ3B0TPimUxVs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=cherry.de; spf=pass smtp.mailfrom=cherry.de; dkim=pass (1024-bit key) header.d=cherry.de header.i=@cherry.de header.b=iEDxVhEs; arc=fail smtp.client-ip=40.107.22.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=cherry.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cherry.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cherry.de header.i=@cherry.de header.b="iEDxVhEs" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JwbykTKDFaD4yEo5YzFvnKHubUs/XkvK6LQ+l66Jvzv883KPP8tZy6Mis4WyaqYfvrYn4lCU+8q2E0xPGzpkW9zSrPVP9yIkyxFifCPtiT8hHQtIEC37v8PgKBwucW7Qv26ayTQCoTSlAM1x2+MMwvbBybttfXHULzLUCpcIlmlZzyqFiQW+Jjjosty3QTSLrPl9h3timx0AFALUcHBJ8dyO6VucrFB/OOIFUgP0CaH9+dUSGhc4Ds7q/Os8bw0B2YBlqEgrPCpVS2oQMdbYMoFju7n/FO+DS1j33aZ2lvu+MyS98cO+ZAiZT97YD+hOqg4zlF/L8q0au5Z5H1gZ8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IH9XbuZw25y545jskZu/aOPTcM93uZ6UG+Rls/bNY74=; b=drcTPsu2OCXQYU/di9am+2/1JrfYeK0uG34StbQSB4C4DppE1SujNgzM80F5SyIcNzow1n+iy9hDVEssPqx9EU3qkKnkMesRZBhG3i9vvZeQ4RWQsAXDARAU5WDuYDHMMI95+l4x5HyGTyGR8jnAww9jVraGD3Ky1NAeMvNOnHVaZfdWlLRx4rqkbx2iia/tik4/6NU9uOxRorgBby5qXtUO94gFKfmfsKhuBpZlGTJxER/Djn2QbDzQ+GrnEmFi50b67q1KJWHtTKcRU7rLIfsl1x38DxmBOLvLgIPHB6LKhGvW5oCFv4A2AFsfJVBcjITQihjmEyKc8Mc5l+KdVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cherry.de; dmarc=pass action=none header.from=cherry.de; dkim=pass header.d=cherry.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cherry.de; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IH9XbuZw25y545jskZu/aOPTcM93uZ6UG+Rls/bNY74=; b=iEDxVhEs7mXDtcXUQthUZTH1af576QTrx5r1235Pa2mMOyQeD/O7w+XxEuTvNsEgfqhzShOY4YZXYxVzJL4a1/m0V1uUrFGMPr3tlgPOOQQR+G4Q7N+R5jAKJChU475/Kn2D4SS1NULFxFBpOseGzzqtAK+vSxffzAXxWFlFBew= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cherry.de; Received: from VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) by VI2PR04MB10642.eurprd04.prod.outlook.com (2603:10a6:800:27f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Tue, 18 Jun 2024 16:09:51 +0000 Received: from VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::2a24:328:711:5cd6]) by VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::2a24:328:711:5cd6%5]) with mapi id 15.20.7677.030; Tue, 18 Jun 2024 16:09:51 +0000 From: Farouk Bouabid Date: Tue, 18 Jun 2024 18:06:51 +0200 Subject: [PATCH v4 9/9] arm64: dts: rockchip: add mule mfd (0x18) on px30-ringneck Message-Id: <20240618-dev-mule-i2c-mux-v4-9-5462d28354c8@cherry.de> References: <20240618-dev-mule-i2c-mux-v4-0-5462d28354c8@cherry.de> In-Reply-To: <20240618-dev-mule-i2c-mux-v4-0-5462d28354c8@cherry.de> To: Jean Delvare , Guenter Roeck , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Farouk Bouabid , Quentin Schulz , Peter Rosin , Heiko Stuebner Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.14.0 X-ClientProxiedBy: VI1PR07CA0286.eurprd07.prod.outlook.com (2603:10a6:800:130::14) To VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6382:EE_|VI2PR04MB10642:EE_ X-MS-Office365-Filtering-Correlation-Id: 4a2af6d7-26d7-495d-7bbc-08dc8fb11573 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|52116011|7416011|376011|366013|1800799021|38350700011|921017; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Fot1XNkeVTzQbxSX44R4ip7fzkieqG+?= =?utf-8?q?vRZvQSQdxUj5/guyLKJ2aiO88k53zHS3nFg+R3M+a9Hx7kJu+UCQgBdixFBHkE7Zp?= =?utf-8?q?PXaKZXlHVZrR0wRUfhWv9Z1LNQrkA4n4A/poL808f+ExCFdMoxHcBIgsq3OBFlzV5?= =?utf-8?q?1cOhqZYuJqPi5GK5lemhpusCcTaYr8mOjggGyOPqXZsfwkGC+lnRGB1LXzlky0mJH?= =?utf-8?q?On1ltKRO5g+JlTUkKmM/2ki6ZRaaRc7XTvK5NsH9vJ5SFaV9yFh8WRF3JMxBtYgN5?= =?utf-8?q?2zOF/vyycGG413w2XRMegYM7TnAMJPxNHxhja/1sUZevRw6wnXSkFeN1gIlLdICC8?= =?utf-8?q?F5jpJu19mgpAqQQavtFhoV8t3kV7REDiioo9uweWIQmYhgZS5XxVDJJahczVTM2MY?= =?utf-8?q?picQDLWyjvA1G3okllebcMe0Irz3+4emdTT2eqU5kgruuwLV83oUFHDNotAYQ5Pwf?= =?utf-8?q?lc2jzYJHhDbXHKcfq8jQx48uerfQTL9WtmGxNOor9g6zvvBq6s0sROzmCbcDyLIH4?= =?utf-8?q?QN8xGO0ioSksiVp+111z6qmuJ51IGsUq6jMivofQDzeDGCJQPUHLuzuOCVCTpJ9IV?= =?utf-8?q?Epp+Fzo/ZvH3EquT67JCL5ng0PupkDfr5CqUbzY/7IPPuM+k3K5kx/eb2pSoHl+0T?= =?utf-8?q?VRye+rQasRsZ7AJxhxrztP40fhZxJHcujRfSg7F3TSh61vp1ywqBSBEFuH8L9IE0F?= =?utf-8?q?iv8V4CAIqlYhGNSwMr7hPGFcvU+iavaiCXvGCjdpJU6wV6q6JhyuUl4NiaWLHIQti?= =?utf-8?q?bF6PD4Pvqm+8A5iTyarUSsZYD03p6jruM5rWSK4zqS4W3lVw6ldiOwvHWDZXUMIK5?= =?utf-8?q?tyL0lK9GtYLMRGjjLqn7kobkC2Gf2ndVhofoTBd0yV808wuTzsstbeisDsuz/jLVG?= =?utf-8?q?brSKg0HYCOdnDfFrhX4gDFfc3MOlZjCsnofKJKfPCw/ZI7DQBNZKS3kMQDRTOaB7M?= =?utf-8?q?A8U66uY6r7n5WMDpMrf+m1nvkAokszE7SUctEUtaxLMqYPQ1lnOEKop5bh17u8XES?= =?utf-8?q?pU312MuQENJprfZz4IZPKIrJGfqDZ87okU1mBbkNgnNoUvU6me2m0xMyFPPzjEy/8?= =?utf-8?q?ZIj58uOaA3kmaZYladfSsHvyAcAq516/F+UVNTZorVbAtvOr6XW+cR6WB5AAujtYV?= =?utf-8?q?0g2QB8btQ9sGt6shHTpEztsEjIY3QN3gjrvTafN1Ox1kLUGBV3YN+ipOXt1NjexKi?= =?utf-8?q?/+lp2WmyYL0UMKk1/nfR5BbNzyimPRw3Mlb2i7UWMHPtFddNkYK0gTGfW8iGEqwsI?= =?utf-8?q?X1lzUksyZULgR0IjUUuVprFNzamTHG89O8DNXVfCII32LuIanwJ+st4nLgMgtC8Le?= =?utf-8?q?JoPSzr7dwSz6?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6382.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(52116011)(7416011)(376011)(366013)(1800799021)(38350700011)(921017); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?5tLI4FohCRd1XYR3nAZ+kIaP09K7?= =?utf-8?q?HAAkkWzBTtf6vX8+758iHi8bhq9GctBCyqxQuXYVhvuLzppIfdXDPJQ0Buocw/Kp2?= =?utf-8?q?P4m+86lBU8RYkAPzA0quEtIVgVt7G5OAk4+Zi6AYxO7Qq/4pJnPucKivAe8vD9q3B?= =?utf-8?q?FArig9MiRFPeaF1MJdS9Xe8zKaVxg+nQlQj+5KPU6rPzM2mt8Wy144HglQq02Kl3K?= =?utf-8?q?6udbCKSK5SGL1wgS+IEX6BVMpcw0G98EyFym55R+mW7yROiFq+SLuNuI40K4bY8EH?= =?utf-8?q?NPx0BR3LRniJ6J/cr4GSEG01QpUWMSq1DnS2TmkwbX/PwhWRbCg///0JoxkqsQVj4?= =?utf-8?q?W+VIOkUzQF9pUiI6jZK0ckgg0AElgAMEO/QixY1VvYU4fNlUeOB3DABz9C6C1o01K?= =?utf-8?q?Zn6VW8gyw3TVitxxRYmkaShvYS8FDjvGVWrb1HLjLIhOaI/gz3hbjqmSkOniQ0M42?= =?utf-8?q?wMzaihJO2WyDMDgWEUopiDj5LKSX97nrltkkkUoCn64AAIc3f4GAzG7OA4RBDNng+?= =?utf-8?q?C1h0iDBmK4gtf3GIhKzxNx1t9kcoRU6WaZj+q8voxTB9UnbEm/QLrQqVdZYbSbsfE?= =?utf-8?q?6pyTdqwUg7Ou/toRhBl3te5vtr9o/13zw9N+T2HUoIhP64tEQbvnVa/dYaHEy7hql?= =?utf-8?q?J55kngRe6atUn9DC6edgHLxIwwrOkhzjOUZkSeCLrSSlG8aW3w1ZfvfyPCkHapKEQ?= =?utf-8?q?65zptMc2W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6d7-26d7-495d-7bbc-08dc8fb11573 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2024 16:09:51.4973 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5e0e1b52-21b5-4e7b-83bb-514ec460677e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4OQnwMSj4S837q2UyAyogROOIqTC0478rrDBJhVRsfav5/e2R90uDD6JuulUvmjhzfowUMaz5tLCqxI5gFopHZrrqiz6RY3cr+6hC54Dy/g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10642 Mule emulates amc6821 and an I2C mux (mfd:0x18). The isl1208 is exposed behind this mux. Add the mux node and isl1208 as a default device. Signed-off-by: Farouk Bouabid --- arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi | 33 +++++++++++++++++++------ 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi b/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi index bb1aea82e666..cb84295f118d 100644 --- a/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi +++ b/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi @@ -9,6 +9,7 @@ / { aliases { + i2c10 = &i2c10; mmc0 = &emmc; mmc1 = &sdio; rtc0 = &rtc_twi; @@ -291,15 +292,33 @@ &i2c1 { /* SE05x is limited to Fast Mode */ clock-frequency = <400000>; - fan: fan@18 { - compatible = "ti,amc6821"; + mule@18 { + compatible = "tsd,mule"; reg = <0x18>; - #cooling-cells = <2>; - }; + #address-cells = <1>; + #size-cells = <0>; + + fan: fan@18 { + compatible = "ti,amc6821"; + reg = <0x18>; + }; + + i2c-mux { + compatible = "tsd,mule-i2c-mux"; + #address-cells = <1>; + #size-cells = <0>; - rtc_twi: rtc@6f { - compatible = "isil,isl1208"; - reg = <0x6f>; + i2c10: i2c@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + rtc_twi: rtc@6f { + compatible = "isil,isl1208"; + reg = <0x6f>; + }; + }; + }; }; };