From patchwork Mon Sep 2 16:38:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 824739 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2042.outbound.protection.outlook.com [40.107.20.42]) (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 063F01A3026; Mon, 2 Sep 2024 16:38:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725295124; cv=fail; b=F3L9TAII8s0GOinyxmpHORzc/mXRVqhOFPPch2WQzR9Gku9CqWIxYkImUqonT6WwiBxV0itUqi+V6NuloSfoxxfk1e7Nuc0JXBMCqBPZ6PfNQ7DP+GdmLDwXVI1dPu0jCUUGUkiNvsxQMb2AfKi9NGXqq3IQNX/uaS4CR4hosdo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725295124; c=relaxed/simple; bh=fC7wtRjMw2WUSRvtwur4bVVqzmDSHraDrnKTddTLH2E=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=XCvSpG3OwjjtwJrFZ8roIaL92mVN5Fhhbfp1tBmHDUqxoetHf9ZdPKZZ/0zek6ok1mUmXlxJJ9LBRgsNo9YPBQMyi8V56GzunTAzd0r7t6KPPhNDap+WpS1L3UGtV3SK8grIKjzaCc6CSYMf4lSFYOkNCZBCQgsEeamW5Gy0g24= 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=DeATiyKY; arc=fail smtp.client-ip=40.107.20.42 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="DeATiyKY" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H/Dh5RV+5nJF8BXFSx4h5BMbjF1bAas0LVw5W0LczmA/SBJTO+j1+jmIf/DRP7W2vRoCHPXmE3M1/nUO1XIkuAna8uswVbq0E/FrJC69TxckDdp892bgTEG/VNEI2hXzA77Pv6ub/18fg9AgecNPZ1ALSCZXQHc3monzro7vlCQb4vQmnxDjjBWIYh9hbQfmPscwDJYmZyxf6GGXuUjCL6GgBJEsZkO9F7ECaK0LJ3YhvQlcu9h//6ivv3UZ3karZU1/eyIiMw9gFPW6/N0Ha+rWTdeoZ7GQdTD+K3MvD2qCZeqWBhmZJJnKsGjvJaJSXuYgim5Zf2bF2gRs8U9JUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=UcCuFOjTGlWzlp1gGW8rLBBx1JsJ8UOIW0H4v78wFv0=; b=gz5NeNChUoMKXgzg93I1pFPKj+R50UtKml1K1aWMRBKzzO6p4hxJCRxIS3Vk0rZjCdIGlkUMFTL4FdIX0F5NBKZ5cctVRwlazwbBDop9lMnqTxAYIlRVUPDrAhVlipQDtsYGfaRiZHR+I6l7IysvSmbGQ1aI8PuSYc9lf7xGkktJhfmvcLnTl0UV7yXqJ4dMoDswaaDhCs/GIbxunyOBdZS8GuSoStarJLIS0XGgZ+0+qMMpB/Q7CeJYKqSDPRjO5emxoz+YmHtHbwHvU4PiGNca9GvVpqvX6aJiyEXdoq8xztMk984tiyIgGoDGjUdyb1/HkiIQaft0pLcwMWrGyA== 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=UcCuFOjTGlWzlp1gGW8rLBBx1JsJ8UOIW0H4v78wFv0=; b=DeATiyKYhi5USasD+4f1AwUsTGQn3nlbA76rCn9VAxn1LmUfdZmX/tmZDwlLl7fbMsvXjJgvzmqWArtQ7yTlm5Mqt5ERTCu3WOtBvKHkEYkku0rMnx+PV/xUf2KaHZ/vAHFlaVEZAZiukWCmXKltcRqVLLp5yYXIOcfZcjB3g+o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cherry.de; Received: from DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) by DB9PR04MB9645.eurprd04.prod.outlook.com (2603:10a6:10:309::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.24; Mon, 2 Sep 2024 16:38:34 +0000 Received: from DU0PR04MB9562.eurprd04.prod.outlook.com ([fe80::ad4d:8d53:1663:d181]) by DU0PR04MB9562.eurprd04.prod.outlook.com ([fe80::ad4d:8d53:1663:d181%6]) with mapi id 15.20.7918.020; Mon, 2 Sep 2024 16:38:34 +0000 From: Farouk Bouabid Date: Mon, 02 Sep 2024 18:38:15 +0200 Subject: [PATCH v7 2/8] i2c: muxes: add support for tsd,mule-i2c multiplexer Message-Id: <20240902-dev-mule-i2c-mux-v7-2-bf7b8f5385ed@cherry.de> References: <20240902-dev-mule-i2c-mux-v7-0-bf7b8f5385ed@cherry.de> In-Reply-To: <20240902-dev-mule-i2c-mux-v7-0-bf7b8f5385ed@cherry.de> To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Peter Rosin , Jean Delvare , Guenter Roeck , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Wolfram Sang X-Mailer: b4 0.15-dev-99b12 X-ClientProxiedBy: VI1PR0502CA0001.eurprd05.prod.outlook.com (2603:10a6:803:1::14) To DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) 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: DU0PR04MB9562:EE_|DB9PR04MB9645:EE_ X-MS-Office365-Filtering-Correlation-Id: 90a4fc52-cf83-429c-855e-08dccb6db022 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?hxAZ7qrczwoKD5lQ02L+FG1Mi32nMdB?= =?utf-8?q?CKXbeJN49g52XL25BtdAzxDH5wxlXE5bD1e338fMd2Z1QPZrGXXYgQbDPhgYHjawS?= =?utf-8?q?YSbTSQ4cxV5MQVN7yFg4Q910nhQMYlGfpmxWrvocaGT0VXUOhNE9/hFN9kxwfA9h2?= =?utf-8?q?PU2oNy1FojcioyTfXPwdz19vQHVNpWzTkx89N9YQFv5Z5jmJVUNyK/Pt0ZnFE/7Oe?= =?utf-8?q?Ix7WuTw3sX0HiKyVgCS2KNhv3Xl0QZ4p7YaE1QEGq6Y1seIEEby0gyBjieljRJ1p1?= =?utf-8?q?mbu82Bgzd94l/+NSvbvfTX6BibJajb2OVDwUJ8BOfOGZQG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Q03hsNFCUJAXSko?= =?utf-8?q?EGx6kSyoldLYxELrR1Isjuv0sQZlx7WK7KA6JBtyXgWImHK3C8VLX9TEBIhsr5ctG?= =?utf-8?q?2yOwL8pIch9U2G+ITG4map7YFCDlAndbJThxNkKpxN/Y92Ip8al6D0MDTAfeotZv9?= =?utf-8?q?8cUHU9JQjqGtFw+/kWuiTJcngZRMWDn++Y4z8oSqtXsJs+1ETkT/qn4=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9562.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(52116014)(7416014)(376014)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?qujqCShsAau/7wl6UaKnPBiezH4L?= =?utf-8?q?E9a4n812Lj7hk61GoF+nDj2x1XiL/Q82DRp6bY9aizdT19nbXeXCeXo6SZ3njKB+j?= =?utf-8?q?Mz5LSZpCNRyuik12cyGFTRVRDBdM6TIQZKKiHVoVMa2N0G5LQe9NASzN3d3gnLht5?= =?utf-8?q?o88QaOTu64fdhtedZ5GNhDC0m+Qe0rSWtahXk3Y8WouSjzMxTqVB4jtHTPSWgq2D7?= =?utf-8?q?G90qRicEhf0EKsER8YB/+cdc9WdXDGk/4F/TuO7gz7xC16CHAkNi6HccNk1VwLB+n?= =?utf-8?q?1kQ+2lSKfkoWE2gCai0FNrjWLn5lqDgbVs7z+qo1AKMmJbpM2vuXyPN3K0u6t1+49?= =?utf-8?q?nljnw0acfaDbslE+bRe7QA/rYgK/tMigKOw230+guJuxoiz7nHHkL2uyJLcOx4LFy?= =?utf-8?q?9cRn/LPttLUT6u2v9UbG4G3eMFCBtreqdSujrfTLii8VfmnQPBxFTvamufTkb0+Ve?= =?utf-8?q?7ww75epEBn2UvbqTIJNt8dUu4my6U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j2HVyYhf82//LPC4Wj7B5Jul?= =?utf-8?q?4kDGWWzPK8zV7aXkode+vezCcOr9SNi+lGWT2fICHS5aFZ1k2lR13pQvpgnW45Lx9?= =?utf-8?q?6fl6iCemscYW+GWjHmeQvkQgqoYCuyEfKSas+K1n1tCnTcI8zM1EkLl6N8uYfEzaF?= =?utf-8?q?D33BMPYmKEZG+WFEk0BJDaxCa803o8S30A=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 90a4fc52-cf83-429c-855e-08dccb6db022 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9562.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2024 16:38:34.7390 (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: MG/k6KYgv1p2b0xrhmOcHTlu4pP3aerFH2U8ZAHyk9woyjn2vowOrqgLlR8zdXakGuTKxe23MUTY3+gT30qxhP4ttO9QWoFsozXht07M01Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9645 Theobroma Systems Mule is an MCU that emulates a set of I2C devices, among which an amc6821 and 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 (amc6821 reg 0xff). This driver is expected to be probed as a platform device with amc6821 as its parent i2c device. Add support for the mule-i2c-mux platform driver. The amc6821 driver support for the mux will be added in a later commit. Reviewed-by: Wolfram Sang Signed-off-by: Farouk Bouabid --- drivers/i2c/muxes/Kconfig | 16 +++++ drivers/i2c/muxes/Makefile | 1 + drivers/i2c/muxes/i2c-mux-mule.c | 148 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 165 insertions(+) diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig index db1b9057612a..6d2f66810cdc 100644 --- a/drivers/i2c/muxes/Kconfig +++ b/drivers/i2c/muxes/Kconfig @@ -119,4 +119,20 @@ 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 "Theobroma Systems Mule I2C device multiplexer" + depends on OF && SENSORS_AMC6821 + 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 + configuration register. + + If you say yes to this option, support will be included for a + Theobroma Systems Mule I2C multiplexer. This driver provides access to + I2C devices connected on this 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..e4e8992d4a09 --- /dev/null +++ b/drivers/i2c/muxes/i2c-mux-mule.c @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Theobroma Systems 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 int mux_select(struct i2c_mux_core *muxc, u32 dev) +{ + struct mule_i2c_reg_mux *mux = muxc->priv; + + return regmap_write(mux->regmap, MUX_CONFIG_REG, 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 dev_err_probe(mux_dev, ret, + "Failed to write config register\n"); + + ret = regmap_read(priv->regmap, MUX_CONFIG_REG, &readback); + if (ret) + return dev_err_probe(mux_dev, ret, + "Failed to read config register\n"); + + old_fw = (readback != MUX_DEFAULT_DEV); + + ret = devm_add_action_or_reset(mux_dev, mux_remove, muxc); + if (ret) + return dev_err_probe(mux_dev, ret, + "Failed to register mux remove\n"); + + /* 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 ret; + } + + 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 Theobroma Systems Mule"); +MODULE_LICENSE("GPL"); From patchwork Mon Sep 2 16:38:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 824738 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2042.outbound.protection.outlook.com [40.107.20.42]) (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 9C91F1AB6DE; Mon, 2 Sep 2024 16:38:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725295126; cv=fail; b=lePJKddzrdB9uc4RincziGf+ce6A8ybNtEAnHsmBQ6DC5dowVOusWx1CMkGBW/U6MmbtTNdzNUpfroyNUBkaAWApCxNFPzpYzO0BZGpd02LNegsmOZod0PDipVVtMzjDuzj6zCuDSAQ2fUkRebf9zDpt9Tw00HdXVAxYpookq+Q= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725295126; c=relaxed/simple; bh=GGGzzx4ZW0A16uCMEUJBkPezYZy6d2rraWET88P/LQo=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=RSkTEmJ/640ufjUloJsBZf0oUxIdCjVWL9u025213Ti0MvIhotd7mjnXkrkAyNvba4lFcPgJgkWvUG+3qapBAhxPai/G8TIG3NiXxLJaVxk6WE84ikbM6jVTk0fwJXRr4bIEJ2+WSNVVJ95FxRQJtyLoc6m+JyM7OcmBDXMlbyY= 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=eAiQEdNH; arc=fail smtp.client-ip=40.107.20.42 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="eAiQEdNH" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ntW+LTJXvrzpfjiCkSuVlnGV7d7sO7SAGAdNGeWV923UqwBQZljDPdLZ8HE+p80eVB29n3n2qA+TeSWLbCdc8c08WIMSewdRrLDASXfNIfm038HaHvujnANVbDkyPQxur7unqKpvEOOj/W6JNOHlduHYh+DXqvNcEbzglgRp1OkVUZ6aucN61rnN/mzbnI1lp8VY3cQJe65nYPaocwno0fzVP8lzNFe/0HLDHt34uk7xVNV+1lMSrxROdo0TnYTtHOoyKo5DQYv59rNl6ApMgTrYxW1yA0IoWOn8h70I5A/bb8bHaBGlVTrKgG0r9WsDCK2zjJf2AWuqeWABjUvSGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=u+d8kkbjE30ReXzbzXlDkTY6YH4knVAS4Xf0qwtzQOI=; b=Hyv/aNhZOExo/Bqd9L7OFjhcwWN5Ws9kcIl4Crb37lnKJsB2+hGIz5lDPINhFbsd8QgjTHNfvEsd32nRD67dteyna5ed5ekmALMMXCflzm8295cNXMdyvZG9dUw5/EFGegxM2689AqgtJA8i8PgNUjaIXxOKpIBUP5hKUCAttirDs53qsUpz/+oy6gIUx0QzZk0me8O1drigQ5l90U7uuA0JGLAZcSU6aC4CsN15nC1VtkxccFgp7SUC3CTiw56JoynPW8QqFY4klaJx2YVeOniCERl1BtS5OF1nwf8lfCVn7i8moNndWDjzJxa1QksKBbmPirLJG8/eAGh7lRNSXA== 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=u+d8kkbjE30ReXzbzXlDkTY6YH4knVAS4Xf0qwtzQOI=; b=eAiQEdNHkAo3+WyhNTrx4mLv1WazR8uXHxzO/pd8jtCNMY6TcTGh/QDxeAd8R52XGVH7/xnxoSyk+5ROaFaPskzE0S1WHJeLB//PVwIrLaejJ97YaKeZVCtCojPo1r7L19K0sOx8fmiNqcqswHMKq2i6SYuabc1JvMwM4eMkQ2Y= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cherry.de; Received: from DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) by DB9PR04MB9645.eurprd04.prod.outlook.com (2603:10a6:10:309::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.24; Mon, 2 Sep 2024 16:38:35 +0000 Received: from DU0PR04MB9562.eurprd04.prod.outlook.com ([fe80::ad4d:8d53:1663:d181]) by DU0PR04MB9562.eurprd04.prod.outlook.com ([fe80::ad4d:8d53:1663:d181%6]) with mapi id 15.20.7918.020; Mon, 2 Sep 2024 16:38:35 +0000 From: Farouk Bouabid Date: Mon, 02 Sep 2024 18:38:16 +0200 Subject: [PATCH v7 3/8] dt-bindings: hwmon: add support for ti,amc6821 Message-Id: <20240902-dev-mule-i2c-mux-v7-3-bf7b8f5385ed@cherry.de> References: <20240902-dev-mule-i2c-mux-v7-0-bf7b8f5385ed@cherry.de> In-Reply-To: <20240902-dev-mule-i2c-mux-v7-0-bf7b8f5385ed@cherry.de> To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Peter Rosin , Jean Delvare , Guenter Roeck , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.15-dev-99b12 X-ClientProxiedBy: VI1PR0502CA0001.eurprd05.prod.outlook.com (2603:10a6:803:1::14) To DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) 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: DU0PR04MB9562:EE_|DB9PR04MB9645:EE_ X-MS-Office365-Filtering-Correlation-Id: 14ea14d0-5290-4bfc-ee77-08dccb6db09f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?zeE+vQTCBeIy2JDcQYhdSm3LzrdxA5r?= =?utf-8?q?hdR+B56wke9DCqw78bLFq7toMqdIpS3LvdPeAEViZWTNGPu68UKFS1bQk2orUchlK?= =?utf-8?q?GFp9BrJkheVUAMl+ixzz0YOI4aAGCRbTRBhQGHD/gdd9RIvojASVigmVek0GoD1ao?= =?utf-8?q?Y7iRmHsUKS1c52SgiaPdTo9K6uCpLN0WubnDCBeRl3jVA/K9K7SzwP22wYTs+64i3?= =?utf-8?q?ZldEykz1Wz0N1ILQaNblInepUvW1fTRiPW6azOjYNyK1JyYLFQdrt5/o+esgMp4be?= =?utf-8?q?KpwK6KyWBh8LGhKqqqSrDFuUHuWn5HidbaBkLaWp+veGHaUI1gqpEZPreDESQ1a9i?= =?utf-8?q?9tFV9E4FRyizAZ7CqmhJK6tfBMyokgq/U2Lp6jen60oKCBnBuT0C9+EeQ2456OAkz?= =?utf-8?q?wRJxxJuLOlJ2HauGVlMuuD0oca+98ktKRNsvoj1mxo5+UwFSHL+smQL7qjJbZ4MUv?= =?utf-8?q?b4+JaIgoEBY0b7Wb5PqFe49DtHZ6NRisnMf13xc6D9q+C3t8XOQyp+YlVCcUDpYCQ?= =?utf-8?q?U2YsKIVGBp4otiQt2DVqLUtqnSUZ04WxlcxjjvoDwR4K9M8Hkhcg3bOAqmA8oNB1R?= =?utf-8?q?YFgjqRSTDEGQHLT3sWokMBXb5IUATIti9LY2a72VmBs96Zd7RCLzfw1FlisNET3Pb?= =?utf-8?q?IJdBZlKABdYt+KEsaLJ5UYfmsYgifRIpD25yEf/nuMJE732oslO683oeRLspQGh6g?= =?utf-8?q?ROdJXl8Hcwl0l1sHp6Y6dHdmLi+qfwdc4dRGwfyjm6Eb3kqjtx+eN97Fpm1PEecpY?= =?utf-8?q?9MWRAqLZMC9WO2Ak7VlPAJRg8xmGBBsDnvYWlUx6JgGOxUoCRWYu9uUbRJZzL6Yw4?= =?utf-8?q?kR8ZgnmIgQusWoBvEqKQ8sfPeXWE21EGVs8Y+4fLYl47h6LQumbv4+6WJuvrM81qe?= =?utf-8?q?9Vd5tiwMho+22at/YbpKAfZ8d6PFHA9WyvPJLlvvSAjXRqPGHmfvV6oJN2A2ql2s8?= =?utf-8?q?3TGJ71bettWJvwsUNIfIg42pnU8q+h7iwtxxH4FrU5ZEYqMMj/TpmzRhE5whfu0jR?= =?utf-8?q?GvdQ3vju8tVI11yz9w/L9K6rukbuGKyQdfjNlk2pB8yBNuRoDW9k1imgvcPOKkZb6?= =?utf-8?q?/PMNgISOC2JoiLe+H+h7y7XJ7g+KmoaDYDBW2iylydcEfSejQ0tymcG3QpQIlPjrV?= =?utf-8?q?TIcdVRBVEPf16xPqDW1fgKqiixVJgcYEn3MEGcxAbwYtTFg/sIm/1xt8/a9XCkDuu?= =?utf-8?q?ukCfv+ZSYcDuEj4RAbOzbLEQsXCVQLM5kDYm38BcqXsYd5vSEqVBKPD2Ko0MKJO5+?= =?utf-8?q?TpJwwujm//AuL0YlezI1Bsr1eAne8FV1Nxj3M4i6oAKiZeQGgqvIkkhLSzxnIImXD?= =?utf-8?q?zQ415NcJGssj?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9562.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(52116014)(7416014)(376014)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0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vz7ZWzTq6UbpCCVwompTDt/DvZveK7XeJ?= =?utf-8?q?yP9/dWx8aOwV26ClIngZUpIFxeLTsNL7ZOB1yRrdH2ZtIPqp+tWGDhJS4WhLVFdku?= =?utf-8?q?6mRqBDYl4hGBlOP97dxmAaQ/5Fq36OTLZaqkBcG0Q2QWvICXNb9M1TqfU7zCu/+7p?= =?utf-8?q?k0Gww1TdV+5/p7KuxQ3zwv45FKZVMp9q3iJVROgFUlrs+54P7GqjcSsi2vK1pzPox?= =?utf-8?q?IWEavUeZ9jpIFUMJQ0OJNQz6/fx3nku0rLJu8UE+WXwJVZv2QoRZn6X2Yjd58MXUb?= =?utf-8?q?G9ziFbV1ov3/9oDmYucRww8vFxa9vAZvCSM5oq5N+c/yywFT0yX3pWJoHK+8nR3x+?= =?utf-8?q?B+mjeLbdsOTFSMaVa+K1lr5p52O1TTHHVygDIElvrog/vhbAHN25cbaBfXJK2MoDo?= =?utf-8?q?/XGpglrqOuEpKQrzCQ0S6yusb0In2kJdFrwh7/GrmkzuTeeNR6znea56BoSytzEFV?= =?utf-8?q?LvzjcXq+HSiLyICO0usmPVHKhQorMX5Nyu/WfTtG5M28xjsa+X+7SvjFYCW2BEpck?= =?utf-8?q?YE6000XuyAoYc2wOtbA2tiVyPahDCZph9WvMp3cVq4j7lt+nwLYT1d6NfzmWKQdMk?= =?utf-8?q?BFn2V0wIFw4FE1EaUiB2b0tNKb4361I1Ik/ob3cKegndxsRF+aSb94Cyt5JbJFOpW?= =?utf-8?q?B6iegTkzW/6TXe5664U/pVYZNIDy7n+qYA=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 14ea14d0-5290-4bfc-ee77-08dccb6db09f X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9562.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2024 16:38:35.5496 (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: B4Era+LE0+AgF7gV9IjayVGttwHIVACbNXkOG0Z9Ml4UxbagzZ7vjBcJ3e0hzkf4lhxPRAE5dby5azLpTn0Tyrq6i0P9P5JH5v8sXvW5cLk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9645 Add dt-bindings for amc6821 intelligent temperature monitor and pulse-width modulation (PWM) fan controller. Reviewed-by: Rob Herring (Arm) Signed-off-by: Farouk Bouabid --- Notes: Merge after patch 1 .../devicetree/bindings/hwmon/ti,amc6821.yaml | 86 ++++++++++++++++++++++ .../devicetree/bindings/trivial-devices.yaml | 2 - 2 files changed, 86 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/hwmon/ti,amc6821.yaml b/Documentation/devicetree/bindings/hwmon/ti,amc6821.yaml new file mode 100644 index 000000000000..5d33f1a23d03 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/ti,amc6821.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/ti,amc6821.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AMC6821 Intelligent Temperature Monitor and PWM Fan Controller + +maintainers: + - Farouk Bouabid + - Quentin Schulz + +description: + Intelligent temperature monitor and pulse-width modulation (PWM) fan + controller. + +properties: + compatible: + oneOf: + - items: + - const: tsd,mule + - const: ti,amc6821 + - const: ti,amc6821 + + reg: + maxItems: 1 + + i2c-mux: + type: object + +required: + - compatible + - reg + +if: + properties: + compatible: + contains: + const: tsd,mule + +then: + required: + - i2c-mux + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + fan@18 { + compatible = "ti,amc6821"; + reg = <0x18>; + }; + }; + + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + fan@18 { + compatible = "tsd,mule", "ti,amc6821"; + reg = <0x18>; + + i2c-mux { + compatible = "tsd,mule-i2c-mux"; + #address-cells = <1>; + #size-cells = <0>; + + i2c@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + rtc@6f { + compatible = "isil,isl1208"; + reg = <0x6f>; + }; + }; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 7913ca9b6b54..8ba53cc2672b 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -370,8 +370,6 @@ properties: - swir,mangoh-iotport-spi # Ambient Light Sensor with SMBUS/Two Wire Serial Interface - taos,tsl2550 - # Temperature Monitoring and Fan Control - - ti,amc6821 # Temperature and humidity sensor with i2c interface - ti,hdc1000 # Temperature and humidity sensor with i2c interface From patchwork Mon Sep 2 16:38:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 824737 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2042.outbound.protection.outlook.com [40.107.20.42]) (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 EEF671C62B8; Mon, 2 Sep 2024 16:38:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725295128; cv=fail; b=Nra9OJr8wkzrmMD+3olFhp9qhn+/vkPlVVYlwxnV3ePwx/I/qtp0dUSfIbufMZDsZM96Z+tx8MTtC1US1EYV06NFySA027BB3NyWTn+BRgdMwwd5McR7x6qrtTn7QmnEVlbOILFgeSH+Lbqyz4M4s4sJXpMMvulIOpzPkdAGiRQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725295128; c=relaxed/simple; bh=S7s9qDoMVXGaFywXlkhz+h2UHx51YfqZuzNCpBeo5no=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=mNF+QeRcalRtqPkszOW8ZEbq2hhw9bzHAbTWa3j30I7gSzvDoLXJCc9fmy8/YV/N57aoXkO+CHssSp65c/Iri9QbJDbptj38RUSvGkxwFpu2N8ElLgt2DVya7+tDF1M9bqDKNyE5tA2cDiVlOjcs39FjidDTJ7ow09WLDZHe7N0= 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=H7pI6ddo; arc=fail smtp.client-ip=40.107.20.42 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="H7pI6ddo" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bvW1t7WVBF/N1dCcQdKVx5F9YNKYLsaYCyLbPqbtySgqgh/LY7U2JxaJUU64JvkiyuHaUVVYl4oAHJjGjpHn88HKC1IU6k0kKGLud2eS70T7N0wqD5o4vN6vVsMd/hoX/17eP5tR+WWxCdQQzA6n7UKAfKxmiR9667JG6tmY1ndc5VsE6O4tSbRDyMjghNH9v6YuiPn0R1t3Q5n/K9gnGWUoi2aE0+LBmaTMQmLx3vVMCs3jT48qQ8VuuqeByriLkXAbrqiFA4Kv9fAodvIOKBoFE+Y8HeOyZ0/w+eIHvCW5u5UQw/0ouVW1Bi1g23N8mXZWOePjsmNPKE72Tqi9bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=25dGd0E5AtCR8zFuoAAzxvVQNaW8OT1xvILoEmM433I=; b=aJ0wt7Hi8JE8hmOXwgwr4EyCNxj10DaRaMUhaRD6kX9fr3pxXlXcoBtljkjyRLdAHIJjNgtALsH1jz8a+dNs7O8jAiE3av9+2J46UOhq+E5VlIPzaGHqIbHPHB3xoipWKJVzSiz/OoIy/7fJ6/1aGeTx3G87FMYtvUH7jGGYSTmejVJRTVlwj5ttvN/yi1m07bXxNH3ZLpA1NQ9gnAYcuVCRfhduJ8qXYdXKebQJ56v3LWJGc1lD7bodRsDvnhatPHV1Hz9p5wdVPfukoDzFlNTkuQsR3XF6MKRNXNYgz3wrFk1meH3kl/tG2E/d2KOF5B+eV9v65ySbcdNQQqt0tw== 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=25dGd0E5AtCR8zFuoAAzxvVQNaW8OT1xvILoEmM433I=; b=H7pI6ddo4MGggt8gJjF6Jg5u0EMEyAyZAfH3Q3yF72k5alUGBlblPAbPrBStHceIe5NBQ+U7BhzC4ZnsVPpaYsb9Mp39CZExB4Ertjxsx8qWJG9jOIWsBkp5w6XpyUALRJa3TL2jV4ZKYRHX0iwebxlo6068KIVaE+lAadAHRds= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cherry.de; Received: from DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) by DB9PR04MB9645.eurprd04.prod.outlook.com (2603:10a6:10:309::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.24; Mon, 2 Sep 2024 16:38:37 +0000 Received: from DU0PR04MB9562.eurprd04.prod.outlook.com ([fe80::ad4d:8d53:1663:d181]) by DU0PR04MB9562.eurprd04.prod.outlook.com ([fe80::ad4d:8d53:1663:d181%6]) with mapi id 15.20.7918.020; Mon, 2 Sep 2024 16:38:37 +0000 From: Farouk Bouabid Date: Mon, 02 Sep 2024 18:38:18 +0200 Subject: [PATCH v7 5/8] arm64: dts: rockchip: add tsd,mule-i2c-mux on rk3588-jaguar Message-Id: <20240902-dev-mule-i2c-mux-v7-5-bf7b8f5385ed@cherry.de> References: <20240902-dev-mule-i2c-mux-v7-0-bf7b8f5385ed@cherry.de> In-Reply-To: <20240902-dev-mule-i2c-mux-v7-0-bf7b8f5385ed@cherry.de> To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Peter Rosin , Jean Delvare , Guenter Roeck , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.15-dev-99b12 X-ClientProxiedBy: VI1PR0502CA0001.eurprd05.prod.outlook.com (2603:10a6:803:1::14) To DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) 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: DU0PR04MB9562:EE_|DB9PR04MB9645:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a88b850-c54e-4e3f-f59e-08dccb6db19f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?/cg9Zp1zdg9+lyU+1jzVLNBKhAy2EWD?= =?utf-8?q?+kVgIR99DtcqafJokoKghOUOb8yrwOv+Gn9mHAKd8cKN1CFixt1YQ5QODjlGoLKHe?= =?utf-8?q?qgd0a8VBMyRVaXhR3kkmhHIuQq5Y7WoAs0OeF+BXySFONetw64es30rqWZgAy7B5y?= =?utf-8?q?zvsPaey3cfDPhGzr3Ae4FT7jnjNa94o69P4s97JEZNC7yMXPXwWNlDrPpAHGTdQss?= =?utf-8?q?ZCkB6DbXfqyvExhAViNr877FR16ClbS3tybWd0GlRrrVadBQeRB3pHXXRYfaZv6el?= =?utf-8?q?H/8CqceA60yHCsBzAp5qg7tkKvqDlHqhdFRhwv+QX+HGnZIXWPbTmrQc92TLPi5hi?= =?utf-8?q?FmD8D6xBUirxwJs7eDXr7a0gbV8/tsfdrIkByBBWxd3LJP3POTJCglLUOT/P0+m87?= =?utf-8?q?HzHKjARKgPsRikeIBgY3v+UhrVsGAXPaFmw8IaBXWoxhN0P0/sOAtV9P4WXPxZNui?= =?utf-8?q?QZg70hVF3jL9T7L+KE0hF2k9Ug1+12/LYqgMK0nnmQvqsDgNlP0ONHuE6a7jb42pB?= =?utf-8?q?Z5PsGNm6+Kk5kE8QhK+O0NLp4GNbhHudeSj/1ITSSjSU4wG2LB6msjGIGhNh1FdAJ?= =?utf-8?q?Q3MoKSyK7LwfVUb6d7MtZBlxypgRs+CkZEKmNtj+HtfY6QKE2Sz8LJ+hU/Af2OFJq?= =?utf-8?q?J2XR3oBGbVKKA1A9opqKfH6WsYkgZXDNV/6GCNYpgENGInSgukGpd1s1E6S6fe65V?= =?utf-8?q?cakeJ+RtJ2w1KD4W204FLPtBp3nf4DTjhTmrEs+F7Tz9BxiiektKUI7wRlNZDnIOq?= =?utf-8?q?Ql9MbIbXZ5Azfc05OjBL0dCG4T+/61nyorF8QMxFIM903AsaVWw0pKbvQb0WcB1cs?= =?utf-8?q?AOSFhQQdaSn6emLCSL6CKPJsTdNkwP6vzdBUDbdGOt5+Iu/SXL6KLTfh8HBP+cRWo?= =?utf-8?q?5s2Iwt0bO24s7gOI6owZKNxjhycUHmoF6EQ3r2ky2aAExbbEjDf3ti54aK/no+T1x?= =?utf-8?q?m+23h4FIIXTmweRMRpXXXtE2UfLFCtJeKCfqJUi+4xZJAbquKwvARt+XKp+80UO5P?= =?utf-8?q?Pi7NsjLWoQW1HCnBsybDk2eypsadDxZ42JpV2ZvoTKee7ZoIsOLLqWmJ7UJd2tNMO?= =?utf-8?q?9m7OqpLcyninTxTTzj27u/sN/NL8TZB0R77XuP1cdh+/skcdHVD27rYuUDlQmOdhK?= =?utf-8?q?GWV2YmQbkP5RK2vkQyGG+07evtceHG2o1oVaBUdxyfROs+8EAh/X1EaJlVz4TsgPj?= =?utf-8?q?bXgrOP78GOMxSua7/w9rtWz/mS9YTf2DQ85GItMjRUTrVd1eb9f5hbwrXrchhqpIN?= =?utf-8?q?wRn1Rq+5B86h7SBUao2AFywvnm/GOa4k0DqI00RNUiNRZr3IHoAAzuWMQIOwq2biy?= =?utf-8?q?+wcC246okk/oIN3DmLIEFha0hVzKUEqlo+Q0w6ZuCtaVawm0V14FJvY=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9562.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(52116014)(7416014)(376014)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xhIg4PN8Up5KFrQT1DKxRp3JpOMN?= =?utf-8?q?idwwoX/RgeJCkuRfk0EJGSixhoBa83b+qtKT9q4j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HvCBbCatDj?= =?utf-8?q?1/w3YXdmSHRAZg+y2xsoy417xvHfnLBC0vE6FTUbaaYcPNrb3qS25V74/udL6ZAz+?= =?utf-8?q?rxuTe1PAVCLoFdev+CWPcK7Sng2pJgBgM6O0n8GayGmVGIo3UtKk2tBwHjw2yqsAm?= =?utf-8?q?yquQuHdp4IoC/15MOHBUl1z2GD5Uv2bPEAqvxVgGqrRCJA/rnxfq6d2TMPNDaKig0?= =?utf-8?q?3ncTZJrcNLhc/gfWs9x9oTBXA6dgulRXBmGBQLQikLyXLct+Au+X8PwuIceBL/Scg?= =?utf-8?q?b+3sTqDQPxbLiBvJriWT6rNk/RQ8nbptmisdloyCb851c/NqS2Up5TSM+RTWluWgk?= =?utf-8?q?4Gfw4w4BHES6p9sbQ22vcKRfrkoyFppEvYeDipcwHE4V9nS/IoI4hxUXAPcXxotCE?= =?utf-8?q?Hx7yEta6OZ+w20a6YnZdW6G6hCLL69Wwm4NKEiig9Ql1r5l8rHEOariJMtwdCHbW3?= =?utf-8?q?OH0KcxvZyqYpuPTlos+jxFPIJIC3r5VOqpYMJ0DYzyfgen5O5DU9Q0yo/7i94+eGF?= =?utf-8?q?0niV30jkEmlH86vNZaHyixIbmv6jpenjF0lHb3ULHAwpCJIj14CjtCcDapmvp7zqL?= =?utf-8?q?Mxz6aF1Q9++VDN6PSUMy2Nyi9pcKEDvCIg=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 6a88b850-c54e-4e3f-f59e-08dccb6db19f X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9562.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2024 16:38:37.2370 (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: sQFY6Ir3nFGjqASOr7ONLLiVWFzusqKiMRz/q0ZesrHA3ufMgs5QyWI39tUVane8AW0O6UP9eUAZKqIcuLzo8hNuidbdRaww6LtdbmvkR68= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9645 Add the tsd,mule-i2c-mux alongside with the amc6821 (tsd,mule) and isl1208 as a default device on the mux. Signed-off-by: Farouk Bouabid --- Notes: Merge after patches 1,2,3,4 arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts index 31d2f8994f85..56f87a603581 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts @@ -32,6 +32,7 @@ button-bios-disable { aliases { ethernet0 = &gmac0; + i2c10 = &i2c10; mmc0 = &sdhci; mmc1 = &sdmmc; rtc0 = &rtc_twi; @@ -276,8 +277,25 @@ &i2c0 { status = "okay"; fan@18 { - compatible = "ti,amc6821"; + compatible = "tsd,mule", "ti,amc6821"; reg = <0x18>; + + i2c-mux { + compatible = "tsd,mule-i2c-mux"; + #address-cells = <1>; + #size-cells = <0>; + + i2c10: i2c@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + rtc_twi: rtc@6f { + compatible = "isil,isl1208"; + reg = <0x6f>; + }; + }; + }; }; vdd_npu_s0: regulator@42 { @@ -313,11 +331,6 @@ regulator-state-mem { regulator-off-in-suspend; }; }; - - rtc_twi: rtc@6f { - compatible = "isil,isl1208"; - reg = <0x6f>; - }; }; &i2c1 { From patchwork Mon Sep 2 16:38:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 824736 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2042.outbound.protection.outlook.com [40.107.20.42]) (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 0E2D720FA82; Mon, 2 Sep 2024 16:38:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725295131; cv=fail; b=OpA+xx91ShKgd2KDNtj6Yqd0xLzC75V1HJ57eOKVJutX95EyxHScWlHtw+aXZtvaelD7m8qY6ZxjalD4LA9cUyb9mT0/ulvFT1ObeDduqLvvAvySRQxYwK6DtJNnKhrzAvRy7rOo256Lp0ldgfHseYdNxOFDwOlM450NPaIIviE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725295131; c=relaxed/simple; bh=i/M8yJPcY03Ki2kkWdHjugHPVbN0du7sMp9K4aXl/4s=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=kOe/FuAY93fFct38KMk8PaDA5ygzRPs2JP0bIGrPgszoIvNArrosl0CNy+IOeSSIznTit5YesKMWlD8JucFvRDPho9mDGXYmcKxCnPDCN5vdQbFb66j7wutMmy+ylOKGhu+zx0bAekf0UGZpi+dkvKxATSnc379D6AuCRaRbKp0= 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=G/yPXcN+; arc=fail smtp.client-ip=40.107.20.42 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="G/yPXcN+" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xDL8witCXTi4T+cx0gXcQlYQJyg1TIXkhLPizY22zEeRail/OnnTJhzRn/38QQrMbWVGBpG0zEpX9SLiwJcXEE66xRD5++1nITZC0IoOqoKbjaeXFpgq6lUljMXcIV/lHf0CJdyHOgS+8NdXCLCkfF8LG0iOwKzxifLNJID0tzh4BzRM6K42CfYfoJSqc6llYtyMfbTeQ71ctorJziL09RoaBlzy6GpczyioE+AQUAjRYd0Y/fZRhvHTOXYUuDYzhp24tf5un40W9weexqFNuWOHWKim2Pf0KNt0x1pEWBJ/3Wc2FUROPEGtzta4EfTAV1Hg7O61zcf02g7Fyg5Q9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Z7X6VHwyc7ENIxUNFQ8H6ZqCtiExpK5STM8GkBAPxkU=; b=pAOIACtxHZOnF+4WmLtuQNaPLvfSZxhXAL01YfmxKmwWVrIpXmRPWb6iH7BSLI6d/LFCysRKpnpf6zyXl4vt6L2tEAZsN7UsHVdvqXNHbEXDPO+7VPpar2uB/UoDCnHJlAExk0m3QmGwHjWhMQVpRJUaZSKzk2Mmr3Ws6xMgURFA0wYDNz5ULp9yqiqyc46klgG9uu4lHQhqpIUGHH18bOWg0fl+MpJm7O/3zanwMllRGKGmZGGMuR8cGb4RLSSxy0bHkIYl2yAlAbg0wjo+K2VavmaGUTb6dtCGlFYf36fGsOB2ZxziTI5uxOi+WTRAKZq0v+lFYRir+0qsEEG2wg== 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=Z7X6VHwyc7ENIxUNFQ8H6ZqCtiExpK5STM8GkBAPxkU=; b=G/yPXcN+ZWlQyuqP6WkTMlBIH7VTZx4+pfVJalBJVeL1V/DLh1uCRq0aA13VqjVrz0OcQbeaqfkE1z2aTpzv5aedIo1wcK6SytqxGP7eG6jTioXOxopTvTA/O2TK/ClM+Ye5yU+L79aYqqMQjKGnX7sgvTQVjAfX5ZVnTCyccJk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cherry.de; Received: from DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) by DB9PR04MB9645.eurprd04.prod.outlook.com (2603:10a6:10:309::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.24; Mon, 2 Sep 2024 16:38:39 +0000 Received: from DU0PR04MB9562.eurprd04.prod.outlook.com ([fe80::ad4d:8d53:1663:d181]) by DU0PR04MB9562.eurprd04.prod.outlook.com ([fe80::ad4d:8d53:1663:d181%6]) with mapi id 15.20.7918.020; Mon, 2 Sep 2024 16:38:39 +0000 From: Farouk Bouabid Date: Mon, 02 Sep 2024 18:38:20 +0200 Subject: [PATCH v7 7/8] arm64: dts: rockchip: add tsd,mule-i2c-mux on rk3588-tiger Message-Id: <20240902-dev-mule-i2c-mux-v7-7-bf7b8f5385ed@cherry.de> References: <20240902-dev-mule-i2c-mux-v7-0-bf7b8f5385ed@cherry.de> In-Reply-To: <20240902-dev-mule-i2c-mux-v7-0-bf7b8f5385ed@cherry.de> To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Peter Rosin , Jean Delvare , Guenter Roeck , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.15-dev-99b12 X-ClientProxiedBy: VI1PR0502CA0001.eurprd05.prod.outlook.com (2603:10a6:803:1::14) To DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) 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: DU0PR04MB9562:EE_|DB9PR04MB9645:EE_ X-MS-Office365-Filtering-Correlation-Id: 44846e44-518c-4b8e-78c2-08dccb6db29f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?/kmf2rHrHQVVfDrvvtqONeii7h9Ewyf?= =?utf-8?q?FBFXpUO66MvSL7rVmnm2/m5C0MgyiSP4PqK9iCSoGlIpm+dwdYgZPpBU1jaspU9Q9?= =?utf-8?q?YVaz/yS9KaYWqoq6aITH62YR8MpphglUjRqGa5EfQIqxAhdJAl1Bd9bLrRVJe2YrZ?= =?utf-8?q?luCJlMULIQKZbpxVTcx5y91AXcabvw9jbzoCj8tNojqPLOHifx3kff/U9pvA964hB?= =?utf-8?q?VVeBJwVQpzoZaXPzHlQqTBAQ5oESytMdl2t5UHaM5xntF2iVMhuKn7dogw8YVVxis?= =?utf-8?q?Cn+eBdmeue0t1h3e4cQGnUzCuAYTio9Y6SucdU/l496dHMsID52z230Rg5nujX5aa?= =?utf-8?q?c+b+ESWOC4VSXx9+SDyKXxaq9N6/AHi1r3wTYx2BMvnU/q+VWFmly9qVebWteZUpG?= =?utf-8?q?yN6DXUlUebzKhtZI9LQOzFfqkiO6ktGuxBdc95dGdEgvmF9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98xqdJ2CLiraKlYSwy?= =?utf-8?q?X8eRB2CwbHEDSk71QLZ8kVAkVnE/Zee5xIqE5x8nf+UVBz+LVIS92lQ=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9562.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(52116014)(7416014)(376014)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?XG5tXE+DgOVVDrR9kdXnJfnx0fSw?= =?utf-8?q?AFtgbdDDqIFNK7W0QJXYtd09POyAubh/raCPp0vi/gGQqeHjO3U5WPIHenrfCkFRk?= =?utf-8?q?20h1+BZG+wrcdjgBjH1iT0huuQ4NezM/spKBd8h3LSxOoQOZISIaluHdoUPSfQiWI?= =?utf-8?q?KpuO3KHSAJUYTD41RjqMrvx8YYkG6Kl4m0Las8JUlQSx510PYvOGhVBotesrM5Q1K?= =?utf-8?q?cwvT/EfRG1LdQXRLIccpkT65o7Fqp3cjEuSVBTE9NRr303XFyMrttUsxJagCbzqyF?= =?utf-8?q?hgnTb+HcbOe9mAfZdDN5ncvcCDm8jxVGVnWAozpMhkn48/W+Hp2xuVXGdriSaiPm1?= =?utf-8?q?xiDlYdeWapFgL5un+Yv2bCLDBmlCESaVmj1iSh+J7kZR7n1Vnf4py9NlwnHJr4rEE?= =?utf-8?q?oN4+TXYuP/Nsz+Gk6Oh/bW/AnOHnXwZYfwAi2uI7e+iVNRJoEDu/Cv/lJ+LRzlEL9?= =?utf-8?q?599j+RbLfp/UAxBiVU6xOBnvk1+fdIS2qaIBUay1iOt4cXIduleOgGQ+ITpSTjDyX?= =?utf-8?q?/+Lj3o+YQfR4fKD3LA/V7ptLswr6CcNlbg/ksqCKaGdr6a5PTI6luhIrnB+6gSLnL?= =?utf-8?q?3a0G3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EzFjvvBrec1ayiJkmkL7RfwlQzavc8pWPJYkLwXsK19ta5tt?= =?utf-8?q?TRnAxjqPNF/onxyZYonu2Wgk6GTKb6L9Wg=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 44846e44-518c-4b8e-78c2-08dccb6db29f X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9562.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2024 16:38:38.9269 (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: ahJrkzmjRPL+cqE7fNGy/a3q0Hm52r00s7IT75Vz2PZilgft4qT3nFgrvt21YDCcH4Gee9Yq2j7QdEcNoI83ZvcdN4cBcjh9P5eBNnSrY/w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9645 Add the tsd,mule-i2c-mux alongside with the amc6821 (tsd,mule) and isl1208 as a default device on the mux. Signed-off-by: Farouk Bouabid --- Notes: Merge after patches 1,2,3,4 arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi index 615094bb8ba3..a02f1178c60c 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi @@ -12,6 +12,7 @@ / { compatible = "tsd,rk3588-tiger", "rockchip,rk3588"; aliases { + i2c10 = &i2c10; mmc0 = &sdhci; rtc0 = &rtc_twi; }; @@ -224,13 +225,25 @@ &i2c6 { status = "okay"; fan@18 { - compatible = "ti,amc6821"; + compatible = "tsd,mule", "ti,amc6821"; reg = <0x18>; - }; - rtc_twi: rtc@6f { - compatible = "isil,isl1208"; - reg = <0x6f>; + i2c-mux { + compatible = "tsd,mule-i2c-mux"; + #address-cells = <1>; + #size-cells = <0>; + + i2c10: i2c@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + rtc_twi: rtc@6f { + compatible = "isil,isl1208"; + reg = <0x6f>; + }; + }; + }; }; };