From patchwork Tue Jun 11 11:43:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 803344 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2109.outbound.protection.outlook.com [40.107.22.109]) (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 B0C3617B50C; Tue, 11 Jun 2024 11:44:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.109 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106279; cv=fail; b=dIeGhXgIisfkxICpF/kbE5tc/rQIQ9X5AWqfkLXLjC+PERqFY5DOQT4NCrUrei6cLjINLIUWHBXOQWGNulZkRsujpy9sHVI7vuKcvTKFupAD+FaNIuGI1OetlOi+Nq2eRQtejDTimkBK8hJ2rUmJOv2kWsc2vTNOfxbxcQYGUp8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106279; c=relaxed/simple; bh=zDdD8wtsbTpMmr0rrs62WkFCQORGAaRR0UXrpm2Y/lI=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=jj8LT9Z3R7xbjT3Pz0Hz+PUxzbsJveFmJlVU8r9ZE3EUmL0P5O8xR3JaN8G7ICXU4G3/BDWx6sAf38/MJuLlFJ4AOL9+aJl2MoWvCYVN1bvibf39610v2lrvXXXeOv9lYieHisNmbijRZf03rbpGjMdsw3MZMeFfkiWPOAZCD1w= 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=dRk9zqjz; arc=fail smtp.client-ip=40.107.22.109 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="dRk9zqjz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DWHgEvPAJd2yM9bK0zmCvYMEh3qbQWME5imT9GM/LMbu6j4S2TP1teNDJKd73ALZIJJCWistRYCXPHLy7sOwAEVRWRYW9DL9RKP62JMmFF4SHYU2oSbazIf3490LTUfnBoEG9w01p+ONn8IP7424HkA6frYZDSzXgHbkLe7YsTzySr1FMjfmyeb0zsgy6Uva2H0vbeBGHNWwQTzSsGF6MddiyXgWKx5eaVvsJy1HHBsJU/1U6/Icg7pR+lgt9HbZ/+5/q7uOYQTFQzNBwpuINXmPAoWMTntHh6i+1CxrxlvJxJSi4DoGfeI5vZniidYGWuyNwxWyZ6fTtMJsubA3UQ== 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=7ZFfJkKfmoyi3DJyI1piww+xaO26rxcAoVa8TjmN66A=; b=DQdEnoP/WQoyYISsVELSzsuxCrNxHMyYc+GE6WyrKdsmtQs8MXy1Tx+7CwrY4BUz65TWXctWlGvuTWgU1tbv0dJpasPgXyMqKmBx7G/nO4/lLMDaKnnxtoLelASW+N6ZJeNmT6AihZO6Mx6xeZOhjH4kuqDc1N0dX+UW/8PRqXr5w1CqXn1kdfF5oJfnGUGUoKoduagbgWyR8IkOX599wSAm741WUhZKn7zHWxEutdKLbTRn9TO8iYPbQ8RnBKiHDcdItKSOmsJJTwIwzTZK6lA26hLyz42SlpSm8kd8cTzJLfnYJx662mesEeaNOpcXY2PqlHfK3J/dNM9A5DLdEw== 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=7ZFfJkKfmoyi3DJyI1piww+xaO26rxcAoVa8TjmN66A=; b=dRk9zqjzN0dDiNZaWi/vBbQYxQwM03VQgGlBiyX3DDwMI2C+vQz39U8ZUyhcbvZCpKdDKISgFySGDXGnPkBGh0+yX4AyR45ymUZK7rigoJHsapo+injk5+YKlBzM4o+KUKlgwCZ2IYyW81pPzkOIK3aAfl/muTu5Ex6V1fKiOwk= 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 GVXPR04MB10301.eurprd04.prod.outlook.com (2603:10a6:150:1dd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Tue, 11 Jun 2024 11:44:28 +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.7633.036; Tue, 11 Jun 2024 11:44:28 +0000 From: Farouk Bouabid Date: Tue, 11 Jun 2024 13:43:52 +0200 Subject: [PATCH v3 1/7] i2c: mux: add the ability to share mux address with child nodes Message-Id: <20240611-dev-mule-i2c-mux-v3-1-08d26a28e001@cherry.de> References: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> In-Reply-To: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> To: Wolfram Sang , Peter Rosin , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.13.0 X-ClientProxiedBy: VI1PR0902CA0050.eurprd09.prod.outlook.com (2603:10a6:802:1::39) 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_|GVXPR04MB10301:EE_ X-MS-Office365-Filtering-Correlation-Id: 0814496d-f05e-4105-39fe-08dc8a0bd91f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|52116005|1800799015|376005|7416005|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?zLNW9Jw5/hl987Ee+1OycTXO00w9/w8?= =?utf-8?q?Fi936cb4d+3aFfcwsMQ5i3ClOOLSRKtIC0Byr7sHjYJ1BGvqCA1Wmom/mKIHX66ae?= =?utf-8?q?MVtyeqSLj1qbtRflv2XBrUrOAn/psNJJ2MmyuATetGJ7Mx9I7943KroQHTFEyaAtw?= =?utf-8?q?QDWUJ6Vv3kmOUKq0AUFjbVpRaMjCl6X1yQ6yYhEmuHtKmVEju74oRhQgUnWgq5TdF?= =?utf-8?q?xaeX+FUvmB6b6TWnJb6OFsKpwpxrUAn1BYSopHfiJlJ15dwhFXymKHYtmu6vs37TQ?= =?utf-8?q?6Qdk/IOi8WMyL+f5x4A9l25FSJcKCXl3aTIAp2iJT/LLT/5prKK5mCKmw2Xrb35a8?= =?utf-8?q?Exd5x6sSMtN20ICnaDrjW2imeFd8ctCVc7wb0Jocn38xeG6c3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XzgxNnuHDK8ZbIYqM?= =?utf-8?q?xuww8TxmOOgAj+itzdZXHn/G2AEw0zQBkHY65++1TqGU6kUs2QdjYkJQ=3D?= 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:(13230031)(52116005)(1800799015)(376005)(7416005)(366007)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?bn1Nq9k6NRf3XRva0Rup7/NQ0oTb?= =?utf-8?q?MfyimV76WNWyIQblEnYNtPirYwcj8fL1FcHZoNdI8c7nX9Qx5181ZpEd8yX/Lp4hK?= =?utf-8?q?0XddY3NIJ0F4MBJTloH8SIiZTDa3nFSVz4OEUH6lWS9/Ysj1al8RzAOjGYzxuBnkA?= =?utf-8?q?r97CkCHkxcj40F/KsZiRelcLWYfj4O3B6Ny1XoXmrcV81okpIOKISgPPN7NjiAiFh?= =?utf-8?q?oQGrmiWQ9nWANt94pHqCwdDZ58jK/OdzzhhYyx/clMNb3whdCm3yOQF7RgcXDJG+p?= =?utf-8?q?g4f+r2Nw4V6cOCuGI/VzCBhqd5N0pKrQSt3qIPOuc8+b4JkIEaiIcyGt+ysHC9P2X?= =?utf-8?q?beWQVhU5c6ziYmIvOsAzpIfHg9Luka3TsH0v9QAgahfZDVHbF+UhuacbRqzkIVMCj?= =?utf-8?q?ECmrHSzm3rYJaYbHUWa6ndfwy49cRTGZ4uygx2XB+lEc5miqYiXKLOEFL+MnaXYoH?= =?utf-8?q?rnzrvIWVzycbf+hDnZsDbCeWJnhNEofxX3mTDXBrRkjNtSamtmbAMPrL7xPMvt06v?= =?utf-8?q?NUgS0usWYwYYPohvwYFoUaYFvtqHC7hTPGioVQXaVexZ2mbT9dlhAoUvv4x/WOrMn?= =?utf-8?q?I9bZMKwV8N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GDryE/jLhs5VcyUcl5Bh16a5x5ty9h7cfn+YMLy3LzwJ3bqjDEsyxTi61T?= =?utf-8?q?n7MXNwqXKFBg/SswwLxMm/flM+G0S26pZw=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 0814496d-f05e-4105-39fe-08dc8a0bd91f X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2024 11:44:27.9652 (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: y19ThY51X7XaV+vhhBxcIi80JZQ2bMkktYb+xDdIYaksx7+6UqaBQ4BbNycmCFx19OqWgRkd8SB4PFPfh4tgba2DK5sOvsJQO6Zkn/KFPgA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10301 Allow the mux (if it's an I2C device) to have the same address as a child device. This is useful when the mux can only use an I2C address that is used by a child device because no other addresses are free to use. eg. the mux can only use address 0x18 which is used by amc6821 connected to the mux. Signed-off-by: Farouk Bouabid --- drivers/i2c/i2c-core-base.c | 6 +++++- drivers/i2c/i2c-mux.c | 48 ++++++++++++++++++++++++++++++++++++++++++++- include/linux/i2c-mux.h | 1 + include/linux/i2c.h | 7 +++++++ 4 files changed, 60 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index ff5c486a1dbb..ce2425b0486d 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -821,9 +821,13 @@ static int i2c_check_mux_children(struct device *dev, void *addrp) static int i2c_check_addr_busy(struct i2c_adapter *adapter, int addr) { struct i2c_adapter *parent = i2c_parent_is_i2c_adapter(adapter); + bool skip_check = false; int result = 0; - if (parent) + if (adapter->quirks && adapter->quirks->flags & I2C_AQ_SKIP_ADDR_CHECK) + skip_check = adapter->quirks->skip_addr_in_parent == addr; + + if (parent && !skip_check) result = i2c_check_mux_parents(parent, addr); if (!result) diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c index 57ff09f18c37..644509bc3496 100644 --- a/drivers/i2c/i2c-mux.c +++ b/drivers/i2c/i2c-mux.c @@ -334,7 +334,53 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc, priv->adap.dev.parent = &parent->dev; priv->adap.retries = parent->retries; priv->adap.timeout = parent->timeout; - priv->adap.quirks = parent->quirks; + + struct i2c_adapter_quirks *quirks; + /* + * When creating the adapter, the node devices are checked for I2C address + * match with other devices on the parent adapter, among which is the mux itself. + * If a match is found the node device is not probed successfully. + * Allow the mux to have the same address as a child device by skipping this check. + */ + if (muxc->share_addr_with_children) { + struct i2c_client *client = to_i2c_client(muxc->dev); + + if (muxc->dev->type != &i2c_client_type) + dev_warn_once(muxc->dev, "Mux is not an I2C device\n"); + + quirks = devm_kzalloc(muxc->dev, sizeof(*quirks), GFP_KERNEL); + if (!quirks) + return -ENOMEM; + + if (parent->quirks) + memcpy(quirks, parent->quirks, sizeof(*quirks)); + + quirks->flags |= I2C_AQ_SKIP_ADDR_CHECK; + quirks->skip_addr_in_parent = client->addr; + priv->adap.quirks = quirks; + + } else if (parent->quirks && + parent->quirks->flags & I2C_AQ_SKIP_ADDR_CHECK) { + /* + * Another I2C mux device can be a child of the Mule I2C mux. + * The former could probably not allow address conflict between + * its address and its own children addresses. + * + * For this purpose, do not propagate this flag unless + * share_addr_with_children is set. + */ + quirks = devm_kzalloc(muxc->dev, sizeof(*quirks), GFP_KERNEL); + if (!quirks) + return -ENOMEM; + + memcpy(quirks, parent->quirks, sizeof(*quirks)); + quirks->flags &= ~I2C_AQ_SKIP_ADDR_CHECK; + priv->adap.quirks = quirks; + + } else { + priv->adap.quirks = parent->quirks; + } + if (muxc->mux_locked) priv->adap.lock_ops = &i2c_mux_lock_ops; else diff --git a/include/linux/i2c-mux.h b/include/linux/i2c-mux.h index 98ef73b7c8fd..17ac68bf1703 100644 --- a/include/linux/i2c-mux.h +++ b/include/linux/i2c-mux.h @@ -21,6 +21,7 @@ struct i2c_mux_core { unsigned int mux_locked:1; unsigned int arbitrator:1; unsigned int gate:1; + unsigned int share_addr_with_children:1; void *priv; diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 5e6cd43a6dbd..c3acbaaadae9 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -670,6 +670,7 @@ int i2c_generic_scl_recovery(struct i2c_adapter *adap); * @max_read_len: maximum length of a read message * @max_comb_1st_msg_len: maximum length of the first msg in a combined message * @max_comb_2nd_msg_len: maximum length of the second msg in a combined message + * @skip_addr_in_parent: No conflict check on parent adapter for a given address * * Note about combined messages: Some I2C controllers can only send one message * per transfer, plus something called combined message or write-then-read. @@ -690,6 +691,7 @@ struct i2c_adapter_quirks { u16 max_read_len; u16 max_comb_1st_msg_len; u16 max_comb_2nd_msg_len; + unsigned short skip_addr_in_parent; }; /* enforce max_num_msgs = 2 and use max_comb_*_len for length checks */ @@ -711,6 +713,11 @@ struct i2c_adapter_quirks { #define I2C_AQ_NO_ZERO_LEN (I2C_AQ_NO_ZERO_LEN_READ | I2C_AQ_NO_ZERO_LEN_WRITE) /* adapter cannot do repeated START */ #define I2C_AQ_NO_REP_START BIT(7) +/** + * do not check for conflict on a given address + * used accordingly with "struct i2c_adapter_quirks.skip_addr_in_parent" + */ +#define I2C_AQ_SKIP_ADDR_CHECK BIT(8) /* * i2c_adapter is the structure used to identify a physical i2c bus along From patchwork Tue Jun 11 11:43:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 803989 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2097.outbound.protection.outlook.com [40.107.22.97]) (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 8D16A176237; Tue, 11 Jun 2024 11:44:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.97 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106276; cv=fail; b=tdR5hGHevioiaDIZ1DGq5CDxVLyJkkt4Fz+9syBjwxrhb3P8MyNKfRC4tn02IuR3tjklTV1+Zq5UT170+6mM0wOPsvIzxwMZU6qoZIspfXcrsO93t6aXljRQU/OlPPEwmD5zjHZQ3jpaDJ6Q2/v6LMK8sqK/aH7rLeL5laS1I0U= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106276; c=relaxed/simple; bh=2R06mqreOquLzt8WXrDn0zBOcXUBRQ2JxOyMrySrSaw=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=uRijmx6LEjfuI6v9MNTBAn7FsX51LrZikM5Q5C+rSzC3iA+SHHhso2g9gcnNrTWcWzP3LyaFj9Era6n2IpzVoG5eWvb96GL2uVfo15oagWNtT2/dm9vniU4Q5g/7SPbk9eQz9FDuxr7j6OftQZErGdgFbiw4Kt13YqMQrXEmb18= 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=C42jyMoD; arc=fail smtp.client-ip=40.107.22.97 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="C42jyMoD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BvOqduhUDSizteXrGXuBHLsi9Q1+fDAd+wdagQnEYBn4grdzH3CMHmIj8dNlWSRuB5iH7tIZ2X4mTPJwW+jLIY+v3utmNrpI2OIupSq4SNBLiRmmi/H9rAGKd2qv5/9AMsfCxzB86MydpKK8Oln+mQla+MMyb9WnZgqFUdX1ced+I6IqGDX59hWCwqRbKpgDDoczh6YSPoXqVyk105ZVdff2/kOwaWx2tFphYTE0BHDy2BF9bLVDcLht81Ng5oZjZW33h/z/mY4R7Murevtg4QZaiV6FS4h94MBi3AABUe/kuGjtFkpHNgEd0YPAwPF8wuVC/fyt+nkQwkYGxBEOXQ== 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=G8nQRXbGMGZUa0As7hZ1lJZ03AMaE/ijdus/QUcrsfk=; b=kd7CeoBCGHvRJEvVhMHQHdaLH5CIGmEUpwNLOuhsTklfoJv6C//Wnf9PreEHZ58TGQN+HjKwHRtAysP0I6G5H25q3rSDk50eSndsb9S4v5caC6+N0N+Hceif5JqvoCYHb/dDuSLhAJNMkGNn+NXFmT5YewBHZv1Iku1aAagdvN53KxeMh5ITSET+4BM8UVSjuC3whJTertJzddTfASCrKR1g0Bn3z9rRK0tuZcACfA+hZzqiTTI91UD3jlxGdA9Tcj4Z6bpZK8sZbFeQrozoJPvllwR3ssO27iQBVJi1VI3mdmVQxkzRReaMv4iV4gp2QXk1QZ/BIyPwaUbd549Pmw== 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=G8nQRXbGMGZUa0As7hZ1lJZ03AMaE/ijdus/QUcrsfk=; b=C42jyMoDCfuApuOY+wxYg2tJheGD83ggtxOTAYtfwYOxgg85jP5y4cz7m51s5rx7dZVoAoSGJBW9FY5yeFNWbctOl6CLyzPFFmYpA9wd9JzaF5lkiHHb38hMM6mX/vWAZNy1lTjpuoB74IXNwKi6A4pn2J5G2Xr4ojOyrGGqeo0= 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 GVXPR04MB10301.eurprd04.prod.outlook.com (2603:10a6:150:1dd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Tue, 11 Jun 2024 11:44:28 +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.7633.036; Tue, 11 Jun 2024 11:44:28 +0000 From: Farouk Bouabid Date: Tue, 11 Jun 2024 13:43:53 +0200 Subject: [PATCH v3 2/7] dt-bindings: i2c: mux: mule: add dt-bindings for mule i2c multiplexer Message-Id: <20240611-dev-mule-i2c-mux-v3-2-08d26a28e001@cherry.de> References: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> In-Reply-To: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> To: Wolfram Sang , Peter Rosin , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.13.0 X-ClientProxiedBy: VI1PR0902CA0050.eurprd09.prod.outlook.com (2603:10a6:802:1::39) 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_|GVXPR04MB10301:EE_ X-MS-Office365-Filtering-Correlation-Id: 491f2924-d347-4fd8-bbc4-08dc8a0bd9e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|52116005|1800799015|376005|7416005|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?vNaHP9y1ldIF4ORqhIltLO0B7tGEDnA?= =?utf-8?q?uZHka7o9RussMVRznN8zkfPg0K0XJClmcBFcFvAPCKudBs75Gqgeq2ka1rPjwh2aX?= =?utf-8?q?mFb8UU3QVJR1+lP08rGv0zobIONJaXUOJnyxqR7BYlBH/U2gMU5elyIr71OqcQfmj?= =?utf-8?q?46ipHN1BFmxeyPwb+G1ZDLAPODb7TNaL1cLS6m3eEy5GowgUeDFKSTk3x4onbptBs?= =?utf-8?q?+2fPPlu4w2A9QAz6+cz1+/i6axSbyBgqXriGkqqAGwLgk/DW5+M6EpUMoMaLPzw7s?= =?utf-8?q?rHb8FnUY2J+Kha2S/VcNfDaj02Wrhe/fdv/wVCmNNdDFmDJ1+jLBHP84+ZcD8mM0H?= =?utf-8?q?fx13vOzXkSRmQ1VxNMizauL7DdbdX7Ej2oM3K9GSW5Rwzjz8pgI3fqt+Be4cP9Qik?= =?utf-8?q?5X44iptLGLqR2/EXmCoyLh79lQ1lHaiQdgp3m4FS2Yn7+vPQ4N9dyc5J2syubt1x+?= =?utf-8?q?OKZiuWd6arDnbJF+hx8EqV8gyQPw5OAytzOthhdMVmWOPylfOLegtXFkvxE7ItOwI?= =?utf-8?q?jo4gERiQyMlvYlK957pYVIzVECf3ieWNNbDaByD4NJNGEo1ELpWm8JTN6XXrlK8PF?= =?utf-8?q?zIgVXwfF1d6ndw46cF1j6yh0uCkqoSo/fBeh5tm8uyRGpAeMK6WGkNJXVdmSIgMFA?= =?utf-8?q?h8d2bWxIHEqQwgRVR8oJ1uJMWzaRNScbqhSxi1IEMPeuvbE9ltZFsRQygAvD6M2Nl?= =?utf-8?q?V1e4hyxGlDqwotd6HWqwRUwMf6hnGTst/Sm/9gu0btUvvZgJsUychjy8q9tOMSOq4?= =?utf-8?q?SCWIOxoAw9SoonRhvoFrnP/jCFG+W8/Y70bO+dSep853BjFiumQ4AHAIlpAMCOgqo?= =?utf-8?q?bwA1Uj3xWDYl88azOZY8YTMwlwru7wwLVpBo1YFSiCiE+CWbYp/vCVnRrZds1WxE0?= =?utf-8?q?vCeuvZ3C4B72auzDLxBMb2yD1TdCMPvUGZUjD/oECgC2gKycvQN1gmORnKiX6jYp5?= =?utf-8?q?Do00P+53OgqWOd12jCeYeRBqErqQhMTr2eoGanonKhRMOtM0VDSCRVx4NbHSqttDQ?= =?utf-8?q?TOWe/DT9sjUrM8MciP/qdEfl4MNGES4A8l1RsdCePU+fpwa9R9duhpW0w5WFUoi9q?= =?utf-8?q?L91Nn4fB4Qxr9envV7SNcM4+fztriX6HihmvXVsz1RamJYzXwzGMfvpqTj73jli3n?= =?utf-8?q?k1Lab+PZlVvFLMfF2s35JbKIr14nPLhn6q4zL3U+6BuXc5O5CAKu98FB1+BQT0IWE?= =?utf-8?q?uz2GIjieA7BU2FzRl0E7KsUP4pAalLCKDdCAHEf4qSNkgkhMcGTtGJqSJseC/Cmmc?= =?utf-8?q?n89UMY8C/Nyjj?= 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:(13230031)(52116005)(1800799015)(376005)(7416005)(366007)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?MOHuQ2pzcblQL3YC/E5+HpysyZzl?= =?utf-8?q?5pu9q5UoICF5JwBPvkKoQtU3dj96yX3azzXPihayvRRaMKmiu2pCpWMM8K7lhA/YB?= =?utf-8?q?IERgNSOs3+Quh3ahT9dlIIi2fyLU1M91oyXC3XFhiPIiDdDF2iDHL2EPSmTz7uIui?= =?utf-8?q?LCBW+zNC1m+rH8/NNegd4qxaRyiYwKzf/fqnC1LPdtMtCFBFbUd4kDz2ITVgqisNd?= =?utf-8?q?T2kIeXmBLk4WC3JMpnZwZzX6cjrsRjtVwLHKn1QejjEGjO5FemOS5rOlcnLKUve6g?= =?utf-8?q?5Uv2RnhZnGpeyE1vgGDhCmRRCrjvmGLYDih9EqV7buvRBUQJgWMz/TBFwvea6HeBN?= =?utf-8?q?KawYu4kn9MDWCJqfyFbmGZy22RvgzHkM/LVwsCHB5eayvDAbRD20gotFfh6gUmnsc?= =?utf-8?q?7CsB0txw/OBru0HXogwu1mGnMZGe3cfx3cOKKYrEQN6BupGMropLnKkxuOBUAMKM3?= =?utf-8?q?GWBTwbLQXOz6p1wemggFR4wHytoTUS+b5aElRyLFDIWXd/BVCMz5SAb+OK+YptDlG?= =?utf-8?q?c+u+qdi5D/mGty//mnTCiTDjR6GMF845hafDnDxoEJyuMA6cjXn6NHTmOxFEmsD89?= =?utf-8?q?imPn0uI7ggT93y22C26nZficei+XjHYLBbeSk1rpxgDsz5GXI9VGy8ycvCYQvxN1R?= =?utf-8?q?BwgLd46zXN+4+FqjBzhJUQ8Yp646RlvbL0Rf9ZNY5rr4QVNmR+jlgxjIiPT2s9/TW?= =?utf-8?q?ETlOSvvzLo8iAlpp7ZXaWYDtlvGOdHPlCNjzYQWqtj6yYpUTAIEx8hUe5SkaZJc+F?= =?utf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rossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2024 11:44:28.7439 (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: G672EwOK+6X6Eay1FaIUQs/1GAqewLpU6bNo90eK+G99ker+ZUdWPlwMQhAFigMHj+KTse+qkNlEtph4FxeYh59On9XY3dI2qBWSs32R9H8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10301 Mule is an MCU that emulates a set of I2C devices which are reachable through an I2C-mux. The emulated devices share a single I2C address with the mux itself where the requested register is what determines which logic is executed (mux logic or device logic). Add support for the Mule I2C multiplexer bindings. Signed-off-by: Farouk Bouabid --- .../devicetree/bindings/i2c/tsd,mule-i2c-mux.yaml | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/tsd,mule-i2c-mux.yaml b/Documentation/devicetree/bindings/i2c/tsd,mule-i2c-mux.yaml new file mode 100644 index 000000000000..b7bb13549027 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/tsd,mule-i2c-mux.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/i2c/tsd,mule-i2c-mux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mule I2C multiplexer + +maintainers: + - Farouk Bouabid + - Quentin Schulz + +description: | + Mule is an MCU that emulates a set of I2C devices which are reachable + through an I2C-mux. + + The emulated devices share a single I2C address with the mux itself + where the requested register is what determines which logic is executed + (mux logic or device logic) + + +--------------------------------------------------+ + | Mule | + | +---------------+ | + ------+->|Config register|----+ | + | | +---------------+ | | + | | V_ | + | | | \ +--------+ | + | | | \-------->| dev #0 | | + | | | | +--------+ | + | | | M |-------->| dev #1 | | + | +--------------------->| U | +--------+ | + | | X |-------->| dev #2 | | + | | | +--------+ | + | | /-------->| dev #3 | | + | |__/ +--------+ | + +--------------------------------------------------+ + + +allOf: + - $ref: /schemas/i2c/i2c-mux.yaml# + +properties: + compatible: + const: tsd,mule-i2c-mux + + reg: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + i2c-mux@18 { + compatible = "tsd,mule-i2c-mux"; + reg = <0x18>; + #address-cells = <1>; + #size-cells = <0>; + + i2c@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + fan: fan@18 { + compatible = "ti,amc6821"; + reg = <0x18>; + #cooling-cells = <2>; + }; + }; + }; + }; +... From patchwork Tue Jun 11 11:43:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 803987 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2109.outbound.protection.outlook.com [40.107.22.109]) (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 4A37F17BB2A; Tue, 11 Jun 2024 11:44:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.109 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106281; cv=fail; b=QTdlk30JABWkBQyZ789ATfORpBHheNYtjnRMnbDbPLzG7pd2/Ed6yOEBsNlYFQDgdTROtLN6I/ZRcay3ZWWtGKKf7Wr/gRyYSXAvKLehUlHwy87QpSnaNksCB55YBLTcc2d7xDPIi36ydj32SeHIK6mWKQDKxp1SEnUy6lBq1iI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106281; c=relaxed/simple; bh=YJnDzYkWp6xamdl6WBWo3TjkQ/xXtTuf8Ga+2yf/MyE=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=ugGt7htlY1plcoldEkHvzyoCR3SSliDYinKCaJcRJCf4z1IwyfRWJVi3RQwXF2hUMq1uWcvsY+uGSX9zdxLx1rR1NivTfKHIKTvmQhxBMISu+dUiQn7HSbqgQQKsQqhQBTR5yiTTQ0naj1LKu4j7v7UKxbvCvCj/StqRukvtsRc= 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=i9Iym5c3; arc=fail smtp.client-ip=40.107.22.109 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="i9Iym5c3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f3X8r3FK/dRm+YsHJg+xS/RDFGH1BXjDDB2M1AByUXNZVXYKllKuTshZ1iQ+wgN3BTCWkBPdiK6ujjb2Te7sWDha6l/1TtuKuKqeyq9U6/YjcH0HJzUqUlUVZwb7gSE3lSjoDgZ5HdhWGGEAP9rwJ3JNbeHH0mUOTWSidmt9wgFZ9+vvddPA+1c77hLPS0hVPWKytudWyfRhDDkEDukyVkEreLDIobWSMDK/Ywpep1JhvdMnfZwI09tNAFFMBRiJ0SYtoZkNAPfUjaF3PQlfbdWk4WUN2ZciJzAJZ3INDDSbE16pbkZMFGjaIc6UdX+s1/r/bhRMmvfnuPxHxEm3eQ== 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=NoJOV7uyxx3z8OrFykyBkgyA9vpenxJYExyJWNS5Da8=; b=nXYvmhEhgdbOM5ViOP1ol/TMYDqLIWqB79ly1jscKL1xbw1liMzBnbDeavX8ZcZVBK/vm8vZuMTJR6LLocKiX6RAhZm0q+tb1P8c47nUc0bIKR8xBB9YPRjDGK56dxycaJ2OpsXS09uUKbNaGz1WyyUg0Ep9BY6W1GA9MID71NF+nhCdFRlKdCylPrgqVjowMC2yCnwYjVlL4Mm9zcvagYpec4HPpMERldNxrj8YB54ssY3BJlkR7r4Ka+R6ep0YY4dd4a7OpETUDOrNFL5VFJx6eHw5Gei4nNHZmw7aCvbNP5Agxr+wPBi7ucv97JJ+ozTnjzprTqlEBQYiSD3u4A== 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=NoJOV7uyxx3z8OrFykyBkgyA9vpenxJYExyJWNS5Da8=; b=i9Iym5c3cSQFoVRm4Uf5L2HzNkQ9EXR4WVdanYXz4CV+jAt79s/bwzzUsctOcpSQAXDH/BFGpft/+XAbRYRttyhqXwCbh3FuVk9TOM+iBCmmwUEBGpOgMZg2olynpeG0+efIzIqPseEyG5FIr/m2yutgWebC+dBzZgyM1dUtVL4= 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 GVXPR04MB10301.eurprd04.prod.outlook.com (2603:10a6:150:1dd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Tue, 11 Jun 2024 11:44:30 +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.7633.036; Tue, 11 Jun 2024 11:44:30 +0000 From: Farouk Bouabid Date: Tue, 11 Jun 2024 13:43:54 +0200 Subject: [PATCH v3 3/7] i2c: muxes: add support for mule i2c multiplexer Message-Id: <20240611-dev-mule-i2c-mux-v3-3-08d26a28e001@cherry.de> References: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> In-Reply-To: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> To: Wolfram Sang , Peter Rosin , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.13.0 X-ClientProxiedBy: VI1PR0902CA0050.eurprd09.prod.outlook.com (2603:10a6:802:1::39) 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_|GVXPR04MB10301:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ae0d7fc-eb38-4066-dd6f-08dc8a0bda65 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|52116005|1800799015|376005|7416005|366007|38350700005; X-Microsoft-Antispam-Message-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XV5ZP4PyvjcAzqOMHhCVu0S5yfbHLHcra9Jtlu4E?= =?utf-8?q?9CQ5gjcqSEGk9hjgTqIlpdf2btFSsJ11ZrKDGsE/Pcx1CBz56L7MrClWc3SWUvVxs?= =?utf-8?q?ILaKE2ZHnXT8NUxlMB+j2Oi0TVv+XVZrSVWnUZWXwNezGm5rBLTQRR1REv0fNyBvf?= =?utf-8?q?+5OyYc+Txfls6wAiO5+gHzQialstygT1Wv35zsE0dSU9YUihMCfcZ069/Q90D0DZh?= =?utf-8?q?AW82xfFVmt25rmb6R7+9Nsep3lL5qDVE7PMNsbT3/fH0E3VnPTi0wGRmmaztm3qIK?= =?utf-8?q?cFoVoCE1AskcNTlUoV4UDxuHZN/LSvYS7g54PlGDfgwMaea5CaPxULTP4aCcILeLf?= =?utf-8?q?oBErwvreJecyqLZjgBTaNBHrRUeB7KCXAQ+skDvwo6Ch3OVhy2E7/4DFW93zUh1Lv?= =?utf-8?q?ZjC3eAwyirpNOdMDX5BTxT+7XTtmyQ5ftg1+2+yogfdcpvawFzyToJhY=3D?= 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:(13230031)(52116005)(1800799015)(376005)(7416005)(366007)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?HEAJ7k9pOv/1nd6bnibQ9mlTiLCq?= =?utf-8?q?ub0Ya7XFIz2quPRfd+FdluelLngxlgew1jlv712Eg7nT0eaALbNg2jZvFpmm4ML5o?= =?utf-8?q?ZrmLiyBFo/idjqnuIVp8qOAs6Apyye/tEeo6Ax6qVlijZrfVEsGLfKVyiCBseqcmC?= =?utf-8?q?IXClTBsamFIgV6+AIBsV6sJta5W47/B2cHfCg740kCAYl1UPrOaW2Izb2bgjWE/YJ?= =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utf-8?q?RDUMCA3R9t8zY5mbXiXFUL7FzWftZyBc4/PYxQYqqFM6deDbVFkWq4Gql344tBJ2O?= =?utf-8?q?l03FIdU8xkqiOaTrDI52vPHcWO/5pmbPXfzascLWNawQKbFraTYBGfMkcG6Ym4wC1?= =?utf-8?q?AOao2DAgTKdbps92635BegersjG2B8QcnskLa6gCdduYtNG6zC1fW2s1vxk/pNRGn?= =?utf-8?q?dFohpeYaYfmHw9vD24NdKmX0tJ+wx58qI2A87zyJSXdQ93psfWgF5INrSkBrSNVnN?= =?utf-8?q?SdE7Q6PVoLLmdKhN7qm7hH9SWGoHpnMb6tDzAtjrlmmmn+0lTqwQST3LZ2i0RYxgo?= =?utf-8?q?WHjZPGfrmlHqYnAxu6uwZw+a/ABSjCAiy3HdhnqX+XKaQbwz/Z934awTAP/WMqLEf?= =?utf-8?q?Q/ogMmBjCtBxLyQEVjU3tz5UIYf4OaXwz+meULNKW1lMhfMDAYmFu1oRiyAEMD1Bd?= =?utf-8?q?vhQMZbkpk41GusBcDnKh3bAngEFApMs+GA=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 3ae0d7fc-eb38-4066-dd6f-08dc8a0bda65 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2024 11:44:29.7217 (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: Ean+9eWTceK6NLpi++7Xezd5LC79ytJ4U5XLdeIGqI9dKucsvW54g7AqXobCJVbG+YJiDGhG7Je9RBxLEujyzD+5T7Yc7qRqAlJ3i/0DJs4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10301 Mule is an MCU that emulates a set of I2C devices which are reachable through an I2C-mux. The emulated devices share a single I2C address with the mux itself where the requested register is what determines which logic is executed (mux logic or device logic): 1- The devices on the mux can be selected (mux function) by writing the appropriate device number to an I2C config register (0xff) that is not used by any device logic. 2- Any access to a register other than the config register will be handled by the previously selected device. Signed-off-by: Farouk Bouabid --- drivers/i2c/muxes/Kconfig | 18 +++++ drivers/i2c/muxes/Makefile | 1 + drivers/i2c/muxes/i2c-mux-mule.c | 157 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 176 insertions(+) diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig index db1b9057612a..70876259796d 100644 --- a/drivers/i2c/muxes/Kconfig +++ b/drivers/i2c/muxes/Kconfig @@ -119,4 +119,22 @@ 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 + help + Mule is an MCU that emulates a set of I2C devices which are reachable + through an I2C-mux. + + The emulated devices share a single I2C address with the mux itself + where the requested register is what determines which logic is executed + (mux logic or device logic). + + 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..db27fa560995 --- /dev/null +++ b/drivers/i2c/muxes/i2c-mux-mule.c @@ -0,0 +1,157 @@ +// 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 + +#define MUX_CONFIG_REG 0xff +#define MUX_DEFAULT_DEV 0x0 + +struct mule_i2c_reg_mux { + struct regmap *regmap; +}; + +static const struct regmap_config mule_regmap_config = { + .reg_bits = 8, + .val_bits = 8, +}; + +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 i2c_client *client) +{ + struct i2c_adapter *adap = client->adapter; + struct mule_i2c_reg_mux *priv; + 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(client->dev.of_node); + dev_dbg(&client->dev, "%u devices on the mux\n", ndev); + + muxc = i2c_mux_alloc(adap, &client->dev, + ndev, sizeof(*priv), + I2C_MUX_LOCKED, + mux_select, mux_deselect); + if (!muxc) + return -ENOMEM; + + muxc->share_addr_with_children = 1; + priv = i2c_mux_priv(muxc); + + priv->regmap = devm_regmap_init_i2c(client, &mule_regmap_config); + if (IS_ERR(priv->regmap)) + return dev_err_probe(&client->dev, PTR_ERR(priv->regmap), + "Failed to allocate i2c register map\n"); + + i2c_set_clientdata(client, muxc); + + /* + * Mux 0 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, 0); + if (ret) + return ret; + + ret = regmap_read(priv->regmap, MUX_CONFIG_REG, &readback); + if (ret) + return ret; + + old_fw = (readback != 0); + + ret = devm_add_action_or_reset(&client->dev, mux_remove, muxc); + if (ret) + return ret; + + /* Create device adapters */ + for_each_child_of_node(client->dev.of_node, dev) { + u32 reg; + + ret = of_property_read_u32(dev, "reg", ®); + if (ret) { + dev_err(&client->dev, "No reg property found for %s: %d\n", + of_node_full_name(dev), ret); + return ret; + } + + if (old_fw && reg != 0) { + dev_warn(&client->dev, + "Mux %d not supported, please update Mule FW\n", reg); + continue; + } + + ret = mux_select(muxc, reg); + if (ret) { + dev_warn(&client->dev, + "Mux %d not supported, please update Mule FW\n", reg); + continue; + } + + ret = i2c_mux_add_adapter(muxc, 0, reg, 0); + if (ret) { + dev_err(&client->dev, "Failed to add i2c mux adapter %d: %d\n", reg, 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 i2c_driver mule_i2c_mux_driver = { + .driver = { + .name = "mule-i2c-mux", + .of_match_table = mule_i2c_mux_of_match, + }, + .probe = mule_i2c_mux_probe, +}; + +module_i2c_driver(mule_i2c_mux_driver); + +MODULE_AUTHOR("Farouk Bouabid "); +MODULE_DESCRIPTION("I2C mux driver for Mule"); +MODULE_LICENSE("GPL"); From patchwork Tue Jun 11 11:43:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 803343 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2097.outbound.protection.outlook.com [40.107.22.97]) (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 4DBB417BB2B; Tue, 11 Jun 2024 11:44:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.97 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106281; cv=fail; b=pcCALquipcb7rh9W1YNr+4+mVrp4jOJo17kTDcfd3h7BWju1nEmPZpmZMzEBLW6GRQI6EG2sg7mRjpTKD3cDtLemN0j/HPsNIFXf7MQ007sALMU6TMuaUIKVTE4x0u8Euge+akL4u3EAR4t6UOcVSDM4UtBnPkV7xOllKqhL1ZA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106281; c=relaxed/simple; bh=vhC1usf6aAKwa44qET5gnHFYGBkgbSm6Lk2JzIlNLcY=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=EINlBDUS20SbfBFo6mHWZHdEE75jWll1wCu2yAI8BGJyP5UeZEIT9lMqm3CWXoBtmkzj3iTcilwmuyTSzpGPvLiFTOY9rLPZy925tbxdWX4xY+rTJLaTvw49dYBNF8DU+3i7nfRlrp9rooNokYaElGqCXCYuBCM3V0tKyl/iCi4= 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=nNdmiDvF; arc=fail smtp.client-ip=40.107.22.97 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="nNdmiDvF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iv/qnxzmzgN17AkKX5dYDg1tcdR8mL9i80Y+qmxoDztssd0xPviNVMVe8Z1acd0nuPe6vZfvslVPISljx5Z2eLq+0G9nlG17wHajdv48Xa/MUAk5d0HVNx5ROe6d0aIIevJ02BsMf20FHivCwNyGkVrkuzizRghv4A7x8hQWe+Tr0wh2sJforYyC6gMi1vtFS+qummLGFA5gHJQiuRnQkrERb9HIfHSBN3Pau2AV5BRJCt5ADhTbS2RLBSD18mYq/pbYMrstfI5PrgqEdAZJAr93IoxJz5/6VR4/EEMTiPe6CPSzVACw3wLnkBeqV/O+h180NPwIvSXmYwJA4fl5nw== 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=sAKZwqSDccjmur5hLkm1VaeNdFGpJbQRsK80k2PwSmc=; b=PsRNYcxFsYdz9NE1rDfTfnfWKWkk0FMITmaiqF57Unv87yAoWMgMA1fuvKnjNlbscJ1cKz8bBwP4LwNJ+RJSXiDTQn7KzcS2Un5XVBMZGl0JNCi2RMgYx5VscrxnAfGEn8/KytMbFdvA1uaMI9gvgVv4gpZ+Nq6E8iyaPEnMBZosaXa2NXyPGmTG6FHZvINTVJRyOHTJLaQrYUOFerPQBimmPn5kzH4+Geaa4PaN+jtgxSi+03QVQ5FwlQvM9QOWOg3HaGwd2rXlHoahfVcdYavUr3fzrRdIge1AVb5b70uLKjNAqc748H4hgYgPo/4o2IFk7iaFHS6MVVP9bx3Hcw== 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=sAKZwqSDccjmur5hLkm1VaeNdFGpJbQRsK80k2PwSmc=; b=nNdmiDvF+8jcn1PDlXgBGAnqKuKq7xcdkBptyaAIqswSEVIW+0WtcjXTeaoEK2yWqi/FUKmZtW7tTpnY49B/F/4cnu8D/fmzgSTAVEjmDyvALHkpJ1xZEfapdbrVcbCbmDq4uZHOya9ErMbFVY2xSeE4bwSWOKf/CDUM/3So5n4= 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 GVXPR04MB10301.eurprd04.prod.outlook.com (2603:10a6:150:1dd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Tue, 11 Jun 2024 11:44:30 +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.7633.036; Tue, 11 Jun 2024 11:44:30 +0000 From: Farouk Bouabid Date: Tue, 11 Jun 2024 13:43:55 +0200 Subject: [PATCH v3 4/7] arm64: dts: rockchip: add mule i2c mux (0x18) on rk3399-puma Message-Id: <20240611-dev-mule-i2c-mux-v3-4-08d26a28e001@cherry.de> References: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> In-Reply-To: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> To: Wolfram Sang , Peter Rosin , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.13.0 X-ClientProxiedBy: VI1PR0902CA0050.eurprd09.prod.outlook.com (2603:10a6:802:1::39) 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_|GVXPR04MB10301:EE_ X-MS-Office365-Filtering-Correlation-Id: 081e17de-9f20-4438-6690-08dc8a0bdb04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|52116005|1800799015|376005|7416005|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?/JLpLZ8FuxslQ12nZ564XUFHdQ+pmdv?= =?utf-8?q?BsKrUjOci3vIkOE9hcA52cOfs3rLswSbkPEBeGlBeJXxENFy/0ws4lXUg1R3pV3vP?= =?utf-8?q?26VeCut8mGZHkXLhy+VBc26tbkXwAdaVHBxuq1b4Pgc2RPEu+H6mrB1fgGUU7tv7C?= =?utf-8?q?ithboU1o5INo67AGlhjBRgxUBp1rQyzIDBerqcSifd5cShkX4CRt4uWmuGt7GpLP8?= =?utf-8?q?LpUfSa0fLsfBpH4ANMnCJBzfSdCZChflQ1muaxaBZUx0F3K5T8p9MhG/1L4TUN8/2?= =?utf-8?q?tqWinL5IJHH09/fVJo0uTOUE10WW2D+yn0lc3TmiRnfjPSVjMdvPI183Z0V1Imhni?= =?utf-8?q?/qC+oBGxIdEDuw4R9cS17Q5/p524Hd+BUoDIwJy+Cm2XJL/+S6jfr2ESZj+WzZOsU?= =?utf-8?q?CzD/fFNEMU+5ZkveDchn4qotw6xftUT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/HSsg/eWld84YfHB9EcSAMdHftCTE=3D?= 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:(13230031)(52116005)(1800799015)(376005)(7416005)(366007)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?eIgPqAH0bzIGPnFrZmWkB+XzD6DT?= =?utf-8?q?+KH91iZm6aGEZ+6r2VT5oLmvV3fN2SqNcRdBAB8krY5vsfFFdkHk5n1CwMBf3/Qxz?= =?utf-8?q?bPvGVvhnmLPpIFkld9nTkCnyS7BiNd0G+0MZNBfxeRYuvivb4jQsbvDRrsvYmLpaF?= =?utf-8?q?Z5CjLA0MLsgSrIQjXKeGBvpJ0lF25IRkXXn4BU5ildCsLYT4F5+jOSVsWnfrcpZOe?= =?utf-8?q?ZGal/f/1RMuqLKCVCNZZvnC45vLix6O22v3YRbGt9Wcui4HMWoCPSmVcCDls3qgAb?= =?utf-8?q?fAwxlMp4wIkBpd+xaDF6jSeM9HKQjGX6AEvxoCUgnxm6Qe7g3d/3u0ljg/42DjLVZ?= =?utf-8?q?KouRMZ054SqjWk51GejMxf9C/mDBTcrDR2rt1YWFbP4dDCx7dlSyRDfGRT3n6FtVQ?= =?utf-8?q?L0yLjyCh1aQ16lpqfPUW4IRt5tmHXIcLFC0E8onKvAaLeL+Wo6tb0W7L1gU0FcZdC?= =?utf-8?q?nsqbOqoEVazWPgh+xBnc8VtAmDCXSU4mv7XVuh7tTMdOm/6KhmIc3wLn9yNpG80SU?= =?utf-8?q?HxmFMwyl+RbZ8im3vFq8qFVrnJKKhXogLhVgb++GGM4HO/ppt/0Z33+fnMp3oTfA9?= =?utf-8?q?pYHELqGsoKF3Esm1C0OHUxBPIy5UCHEbJT1g1Vv9Qc9I95U2f3BbEX8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RxICWS7EMfi4Nq8rrHn?= =?utf-8?q?15NSF/saELFCSyNM9Vo2cFuVIPbCgZZqsw=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 081e17de-9f20-4438-6690-08dc8a0bdb04 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2024 11:44:30.7856 (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: rpyjcm/3+Go6lIcp+rdMVQUHsRIgVzpVUWLK0KyaaV4DR7dn9SpMNTX3rydCA32Md6RVGxtDPHBBMsMmKtSl5Dqbeyh3f/x2mgdExHk+N0s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10301 Mule emulates an I2C mux (address 0x18). The amc6821 is exposed behind this bus. Add the mux node and amc6821 as a default device. Signed-off-by: Farouk Bouabid --- arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi index c08e69391c01..e7313be24c1a 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; }; @@ -357,10 +358,23 @@ &i2c7 { status = "okay"; clock-frequency = <400000>; - fan: fan@18 { - compatible = "ti,amc6821"; + i2c-mux@18 { + compatible = "tsd,mule-i2c-mux"; reg = <0x18>; - #cooling-cells = <2>; + #address-cells = <1>; + #size-cells = <0>; + + i2c10: i2c@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + fan: fan@18 { + compatible = "ti,amc6821"; + reg = <0x18>; + #cooling-cells = <2>; + }; + }; }; rtc_twi: rtc@6f { From patchwork Tue Jun 11 11:43:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 803342 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2097.outbound.protection.outlook.com [40.107.22.97]) (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 6FA7D17CA0D; Tue, 11 Jun 2024 11:44:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.97 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106283; cv=fail; b=S3/2NM/tK8tC1NrjSIuXqZze7zOET20u3aSNS1xDODInmiF4Z+RzWIgpMJjWga0ecuzgZA4wCVoZaPA9r/10R1EuvUZ+8AoWFLmYt8Ly78rXpbVPvbgJspFV/7BjkQoDZwvxNpkyx5uVvi5cgDnekJHiXL6sg8kd2q+I8GC16X0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106283; c=relaxed/simple; bh=gxdwam3AHtG2YoVgaJfjsq9hc8+AecBJIv/BEufi9Wg=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=F04jEheEPXvdHp5b5rhuCoFpI6gADptvmroKjHi/FOSpfT91YkFCi56Rye5Gp95NR1mUZj5HGScHWdxos+PxEUCXumzvJvvLWpfTwSlINoc1DF4oujcgekNZCPLrmcRrsGI2EhFDfuKCwQ7YKdABSu6S6mVPHqrKqi7Q/xKF3vk= 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=AcD73IMh; arc=fail smtp.client-ip=40.107.22.97 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="AcD73IMh" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NrolH52ujNhPcSwOqcRxJZCkPTABBXZeln3Xw5bMUPzQRELqfhqbAphnHz+1eoyUxu/Hjhs03QaCRInaKYNE/BM3FvisQPnXSDBchH6zTH+Cz8THluaxX1lvVcRiQ6P9MiVknPM9AA9OTyVpb/ASIB0XVArJkgHYv+UjgjAi16FBLIYK95PIbsO3QeZBL3HQ8bkDYpepQog42eBx0N71kRHYiS9biQS8/2aVYxDKqWnHSRBLzwOcbaiwtdCc9LmilmZ0USLmMScbpKNWKv8Ne0Yndy5g9rjXJFNOaBpz/Lvh39rrfazdTV9IUv4Z+ISkr7hC84vRyKl0hjt2bj5OEQ== 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=ZFIeoMB1Ayjvd6zIuV0ZwuweHreNL3VZbtqc27f9itQ=; b=nc/5f3x7HswkqTAYF1KsfvIF+Y9ZeFxaXgdouWhBYzKNYGSESy1OqyaLsrbSS3IDeH9+u2XYGSjTg1wcLJ5BqX5gKmC6i/Wu1oTU9ecG0YjLDHFi3j895zrzbLLZTb/cnhZYy88e2ohe0dB33WctNxpTOQpvE48AravZun2Td/XtGW5aDuTfL6qTSFMlObO/lsOn19Vaa1PmiVRLJ/Xy87zXsDYptw3ex1/CVbMBBHZ1TH+4Bean17uGRXNnZ0bgSFIkCYz6Is2/FXiC+ELdSK7ryF5H5476plRehrUCGsqf8nRJ4JV1MFVImfQk47OxThOgNSbB+vGFZPTM66XjWQ== 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=ZFIeoMB1Ayjvd6zIuV0ZwuweHreNL3VZbtqc27f9itQ=; b=AcD73IMhOEwmRuiVmjM4uwedIMhRKBhM5pVmIxRbX93q1bSUWiatxNityNDVC9KaocchYtbBvZAU1W6icEtU8QBVAN2nc/bVe0KE+PswnpPpJLzyPAn+cICOUxEbbxFTUNEc6iF0QREKhnvV1eehvF01czZ34GaBFCwi1XPvFf4= 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 GVXPR04MB10301.eurprd04.prod.outlook.com (2603:10a6:150:1dd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Tue, 11 Jun 2024 11:44:31 +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.7633.036; Tue, 11 Jun 2024 11:44:31 +0000 From: Farouk Bouabid Date: Tue, 11 Jun 2024 13:43:56 +0200 Subject: [PATCH v3 5/7] arm64: dts: rockchip: add mule i2c mux (0x18) on rk3588-tiger Message-Id: <20240611-dev-mule-i2c-mux-v3-5-08d26a28e001@cherry.de> References: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> In-Reply-To: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> To: Wolfram Sang , Peter Rosin , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.13.0 X-ClientProxiedBy: VI1PR0902CA0050.eurprd09.prod.outlook.com (2603:10a6:802:1::39) 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_|GVXPR04MB10301:EE_ X-MS-Office365-Filtering-Correlation-Id: 4cea8b0b-d91f-441a-0728-08dc8a0bdb96 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|52116005|1800799015|376005|7416005|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?4sOlDnpb/gS4eU/jMRR+q3PapXJ2WUO?= =?utf-8?q?Sn6MTdlnUQm8XHWMcMqpTNrWesNBxvTAZRfAk1noklwcbsLCZKrjFpWDXaEJNnFsn?= =?utf-8?q?Y1UUUQqVtz/KhU5np/V1IqZbZGMavIb4/D6BTKfBloPn0sDMEn748e7hKzyCxAqam?= =?utf-8?q?GSFAwYCkAuajzsWnEXFWWXDwgi161RiJh5xlpcgq+6e6OYFKDPk9jBG4VYiW79WQa?= =?utf-8?q?8Mr3IcQVm6FW7MkXOT6aFtnKXXFanxtWT6wuFIxHaIzzinFa1Bo5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qO4SsCXW?= =?utf-8?q?D5yg7Hu/EbqsmDRVL9G3AHyVXX4I5Krg09AbmcYYPhq8YstJJmCobSrNCKY4e9iET?= =?utf-8?q?Dja5VnM9itgLYqdpX97tREsGRk8hAxgiwNFOWgQiHg6jo56K42/JtXyxiaNIHhvXW?= =?utf-8?q?nZlKqTNhoo974nDMx7w0TutZzWbu/IYZa9pBkfzjePDR+cvJU2ztXzrs=3D?= 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:(13230031)(52116005)(1800799015)(376005)(7416005)(366007)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?VgcFS7GLU+0vnLDVx0kw7e0J5qcK?= =?utf-8?q?yaTv/LpwLSvmS/Ld5hTKchOVtf4Fd25bDgsA6nlHNIVN1/BGCMDPBFnK5dJUZkLX/?= =?utf-8?q?613q+dWOBqSFnvhjHCawj3t+pY3bZ+qGxO9gERCqU6IFDhX6jyU2QcCr8Dw77jd4O?= =?utf-8?q?k9rcAkJiyvgXeMqdAZ5I/BdwnVX6+RUWAWnEUZxOqbg0S/IaLms0EMQDq6Uehfxm9?= =?utf-8?q?KDKLrhpm/psMy1b8ydMcj2IRunojk/c+fofqJ/qEMwNwT9rrAQ9OWk5SCMHwBxsd5?= =?utf-8?q?mi9WkcigEvWLKgHfEnbLlAptXlUTe/V2TRg5FOVujAWD2bzyE7p16+bpP5CW4XSxa?= =?utf-8?q?k5E/QTT7by8aJjz0yM7CQVOkV5PQ8pfim1LooxTHwJzvo/Q06wCeW6u8WIkS2krCw?= =?utf-8?q?HUXVm7LAw1oDNo873AFa0y4oL4E8Ivjd+mHQ7fXQG7Tyub1cQcZycRPLDm8MsskXN?= =?utf-8?q?IV1DRmEk/fSBNxzNVB/4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Siq4eoO3U6Kd6XiggiGoHFRUVolL+1J8q/WVJcA?= =?utf-8?q?cKfL2mh0YbHAwpaK4/dxxe0FccgEREKGZ0M8dJSBi/8lvhOWjhhpxWG3bHTlU7fni?= =?utf-8?q?nUf5+qX5fSN74ygl/KOyrWFFaxL8KwSwNmos7I7b7X5trwgYpR2AfhyhP5nrtDZS9?= =?utf-8?q?quV85lK7t0+ufrvZJhLoJdo0dlfCwDtZCA=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 4cea8b0b-d91f-441a-0728-08dc8a0bdb96 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2024 11:44:31.6379 (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: EijHyLmObRV+AkgJnKXXYQrMd2Q0AagAdwtCkXXlQMZ1TFXbLQUAbtY9rvAOUxhiRXw1F5DaRdMjR8uU/9Jm5rUZiD/oW1XC1kRh9Rr0aeg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10301 Mule emulates an I2C mux (address 0x18). The amc6821 is exposed behind this bus. Add the mux node and amc6821 as a default device. Signed-off-by: Farouk Bouabid --- arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi index 1eb2543a5fde..5ed7d51717bb 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; }; @@ -210,9 +211,23 @@ &i2c6 { clock-frequency = <400000>; status = "okay"; - fan@18 { - compatible = "ti,amc6821"; + i2c-mux@18 { + compatible = "tsd,mule-i2c-mux"; reg = <0x18>; + #address-cells = <1>; + #size-cells = <0>; + + i2c10: i2c@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + fan: fan@18 { + compatible = "ti,amc6821"; + reg = <0x18>; + #cooling-cells = <2>; + }; + }; }; rtc_twi: rtc@6f { From patchwork Tue Jun 11 11:43:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 803986 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2109.outbound.protection.outlook.com [40.107.22.109]) (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 908D717CA15; Tue, 11 Jun 2024 11:44:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.109 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106283; cv=fail; b=Egoui6gvQxesBhqRlKebZPSt0rhtWHzTXySPXtTKK4iNRf64cV1GDMd1guoOnRbJBe2XxxeVDh/tvlaQitclrNAxxWP5ERw+Aw9EGbX9zhRiaCuaJWBnrorq3N+6njdM0I0JXzr3nV1kM3tP1IdK4AZAPQLQJuc8YqHIRbEZlLM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106283; c=relaxed/simple; bh=q4gHXk9AZSqooy3vTT8zXQi+fEvdUfSfQESbItpvKTA=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=l8LOrOTJPI0KjFUsTcqqMbL1qsVHkFXdPUFTqaa4hCTMjnnXSzPYPgj+g1YvQRm0ry4vjCtslCxIruK1ivlF1mwyt1HY42ouKvcDkrP/yL7/Y1Gf05EqCUi/nvjw7mIVhj5Rg5QIlkhEjL8Fnl6lVDdgLz6scg36DW8RQ02Giv4= 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=Kxb65jeI; arc=fail smtp.client-ip=40.107.22.109 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="Kxb65jeI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CyXeJw8sg2Jz2ljUCB/6zyAhHBlYV8Gm+UOQ19wWZAWgpLc2wqQjHsiqoRVCCaVPybqYTw6gQPzAifBfE71/JItOi3RguetAwoRCTxvZJn8c8DhN5jTFuoc4fxKVZP6CnxCDasVqPOkjx8JuMCyt/DPQgeMje4BmfFCi8slFVxv8wrN3kseaSlMhISOW/UWaziEkWO/STIl+OY6MLpTaUjNA36rOVOTrMpbwKiCk2NPDU2dUcVMCGlbdXFh1zjlFuc8u5PExT/B7SdfgCXABgOFriWd6zrU4/Gc+5c4dezLKg6Zghq7+GnwvwPOUwf1yvVxqkYA0XiCVzX5n+0FPqw== 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=m1gRCrH2jGALy4cXjww2muIP1NpMPlSQNBJ1FAxNmxc=; b=TLI/aLKphCfj0HwctzqeCjNV4dkhmNS3wZ+EuGexf/jd2fhqo0nXRS2qX59dXXnxyApHS+JQpzNWR02ceUEVG2XUXDwyxo/eM7R07pdwak7WqEBAJ5Rtsdp1THJFBZC6ByotvUgiZMas/Q1TjZTmFT6vC0OgwRuqjzEpJG7c36UXPtqmyM/0SotAAzrKIau0ZjSVRtv9F0JST2mYbhJaGLZ7ujMoexLnHDME+g8VFm6+Bxl49S9Ly1lHSNUhl+hHrHx9ON4vuBelhoV8jB47bMJETNNsl1Ks5h0trAM6ymIt44lPNJc+aXbylMllc3f6lE9BAqp0Tkqz6NjK8w2Ydg== 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=m1gRCrH2jGALy4cXjww2muIP1NpMPlSQNBJ1FAxNmxc=; b=Kxb65jeIoNI1gsv4vMcBKKl8BE3NBlJEsUZ4bmOZuYXbfs5ROqdCRp97Oqbt+4N2xMRT6+Vab4SO9pUcQ2fYpJ4bpKjUkh/n/3YU+LFKmZBpTeUQK1JwJ1x3rV66S3JigJKnMF+hYsIu7JTM0zIhqKAKX5MAus468X3ZOErR4rw= 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 GVXPR04MB10301.eurprd04.prod.outlook.com (2603:10a6:150:1dd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Tue, 11 Jun 2024 11:44:33 +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.7633.036; Tue, 11 Jun 2024 11:44:33 +0000 From: Farouk Bouabid Date: Tue, 11 Jun 2024 13:43:57 +0200 Subject: [PATCH v3 6/7] arm64: dts: rockchip: add mule i2c mux (0x18) on px30-ringneck Message-Id: <20240611-dev-mule-i2c-mux-v3-6-08d26a28e001@cherry.de> References: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> In-Reply-To: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> To: Wolfram Sang , Peter Rosin , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.13.0 X-ClientProxiedBy: VI1PR0902CA0050.eurprd09.prod.outlook.com (2603:10a6:802:1::39) 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_|GVXPR04MB10301:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f0f6ad5-84e4-449d-c92d-08dc8a0bdbda X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|52116005|1800799015|376005|7416005|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?6z6im6x9bOofYllRVkr7l7H+iWnTiEw?= =?utf-8?q?v8+6XygN20cThZPGT0eUC6yEioXQBA4H2q8hXNpKmIMSWVOkJe6hXcXp3Rgx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PWYfRbaDjuVj8v9qbx3RjEoQGp2XtsBntXTD/SNSV38SbcY4IH7bTtDw/oxQJZ/d?= =?utf-8?q?1tLXbHbgoKktIkLj3wzUQ27IPj/CnKDeSgU36B8y+hts5m0DUrrnNiw6dxtVaQFNB?= =?utf-8?q?n2CjLnbxmprE84sLMFEscnJCJHYr8dE8GJ8gt02TtTbZR7jh7anQjWZycSIPEerqn?= =?utf-8?q?9AxzbIVc2RO3mH9ZnEA1Gl7IX8r49GeJYVBww0yDDJQwEEBM9vIr3RGvnmIMwUUpX?= =?utf-8?q?6K9e0L3okbmMtFmjGcNzCAAtVYpRdBp9j4Y459LlI94j1tMV4b+bbHUjg5l82HDlj?= =?utf-8?q?AtTTyOKlIUA4WHJxCY0mhzH3NKJe+z/2Ywq/tdH9oYtHp21hWbxqDF0Y=3D?= 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:(13230031)(52116005)(1800799015)(376005)(7416005)(366007)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?hhiOfc5BLUL2pPVJuZ08mUtmYCWD?= =?utf-8?q?dj3PVmBupK2knSzCB5/y2Ja/TCbT4JrvL7fdS9GRdGtgiZa4q8uyEUEUo5tfGm4AL?= =?utf-8?q?WO7Us+dhK5O1Lbt/uMWgBuQE0nfWeAQaKoISV47tuF1iMXbPrTT2vXxDTZAYJFqe7?= =?utf-8?q?pJ4+yK9fDXOq19qggJse3K7kPs/DzWhlxhP80EOt4OcpfD9R66FTu/XV0YvnbNRYH?= =?utf-8?q?63/GCZtIELAjLP9H9pq2OC7cDTLDA9H/Dp3mCQWAN9DPinaytEq7scHXYeBGtXhj9?= =?utf-8?q?6lIUlYeo1K5wCp5CbVopqL+Sc67GiiyoQWBAQu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GP0GERKZQDOwfn?= =?utf-8?q?RE/x1ht2BcSA8ORWXfBA3uLfyEv+YSuFi80aug7dxmu93F5iEh5iUW4gr/qvcmJFF?= =?utf-8?q?JAscaWMAO8lzVtSI72QLRdN82QNd5iA6awR+ji3aVnG0CjfQ5iTUhQCD6/EaGPmzB?= =?utf-8?q?75jiXBGbX8OXX1PZhQ6cCzC7xaACKT/XYiHs9zJDjqOSFgvT+pHwEDxEbS5B4Gz2B?= =?utf-8?q?Iqq2aQABW+0XgkORxg9Fvk6SK8v0kPj27DQTB+d3f+Tvr4oSfNpTyWmUL1V4hh2pV?= =?utf-8?q?GiqA6w1h1tdP9Rnda4W6NfEJLN9V4Wp4FjykHPs+FI8F0QNjvWy4K3Q3kzrs1soDO?= =?utf-8?q?Pf+mBChEWjZLTpiIcDb+3b1il+oUraIbtA=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 4f0f6ad5-84e4-449d-c92d-08dc8a0bdbda X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2024 11:44:32.7857 (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: jyt4bQqnh4LStxKfYCWAsPjw45/08Bvrnw0H+MdI9O4SrQsOylHVOdLDFb7MFD9UPikWlEuHyVapmxKjVlYCs6M42ZVwt9HNcEa5B1KxEBE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10301 Mule emulates an I2C mux (address 0x18). The amc6821 is exposed behind this bus. Add the mux node and amc6821 as a default device. Signed-off-by: Farouk Bouabid --- arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi b/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi index bb1aea82e666..eea906379983 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,10 +292,23 @@ &i2c1 { /* SE05x is limited to Fast Mode */ clock-frequency = <400000>; - fan: fan@18 { - compatible = "ti,amc6821"; + i2c-mux@18 { + compatible = "tsd,mule-i2c-mux"; reg = <0x18>; - #cooling-cells = <2>; + #address-cells = <1>; + #size-cells = <0>; + + i2c10: i2c@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + fan: fan@18 { + compatible = "ti,amc6821"; + reg = <0x18>; + #cooling-cells = <2>; + }; + }; }; rtc_twi: rtc@6f { From patchwork Tue Jun 11 11:43:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 803341 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2097.outbound.protection.outlook.com [40.107.22.97]) (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 91A9C17CA16; Tue, 11 Jun 2024 11:44:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.97 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106285; cv=fail; b=WlNVGjFXQ7nuruAxO3n5tly+hV30mvx9iuSlbdvS7cP5Bph+rnHcX63Gsbcso2v1uXVRwc3+ymiEelrek6k1KEIUm7LbonRaOW87+JLssWHYuvunHIHKMzl5VlYuWdGphAz/aHjV+suNqeca5iZPNACnbiE1eexdPB6Dg4obxQE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718106285; c=relaxed/simple; bh=zf31fsPc+ejLzxXrCAK6u9pJqrI0f27LctCLqZ9aV1U=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=lqmTlGP3+r1k9eaPbad46i2nlW5ertXtst/Y9rKUGw9mId2kVeiUguiiYF6FQQZKuotSXvRabkP6M8IGx2YbFI3SdP3dbR+iq1R6yBLk8/Erxfjt3Z+VQp+aMMKwN4ENOzmhydiW2fkNli4PJ3nlti+ukGefXd9qNKJ80L0Pyms= 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=Itd3BEoW; arc=fail smtp.client-ip=40.107.22.97 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="Itd3BEoW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mCmt61iTfjyROrRe2dEs01j1GSUzZhpch62MeLNkU/0kZEhoP/rRKKdd/xfqLgqdeMgq7+glv3218GLIGNb66ubagYPVlcvVEGr7vbTa7xzwuXW78pl5HPaWSMnEHpqmQGmlZgpyjGR2w79v7CSxAKl0NTtFyft2CthGH1FmxJHk7VK77GfQff85w/HcnbqKGbKWeuRQlzFZC66CJXkqwX4E1q8okPYC0LW3uDR6ibonn/t/LPLYRM5OgNvpuB3uL96hND1yhOsxSWZ9i69JSpYzjDRlfgRnshA7TprG4UqdtqYY6sQgogzIrQ6W8hqHYubmYvk/f16u0dj1SN6LKQ== 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=+YOMp5PxtEIH32WPrIdAw5ibx7RIknJ01VIcy1JYLmg=; b=QlpzMpBnZOW8fkZpcDMGBg9wGc2jxuSJks/Sgc2LRVOfpe8vzIzJUK/C5mkNURtCq+PgAqOQdbOMX706wtECwf5QrrraO9LGFOg4lMGFBuazGNrYXW7Q+rMdFAVS3+dB3BdOYU+pZkMU8hReOWDnewKzGi8hYz2WmZNARkIs+jgMKI7WZA/tDwcbok6qj5k1pIONhSOVge69d33OYhyabviMdVyctj9OXR8CUt0/yikrfqk1ep8sF2y0pxOhHUt5a12Mn03dz5gscTBvbPgGlZSjl/Z/ClzCKtExqMYsDXWdyryicj9yoAkmUgCpe3tZ6UoSH2adjFBn+aeX7MKHWQ== 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=+YOMp5PxtEIH32WPrIdAw5ibx7RIknJ01VIcy1JYLmg=; b=Itd3BEoW8CSnNxwYcTAmR8DC48I9xulHvkW3wLj1PGkkdM9b3tQDcy9zJTq6uUtNXWkXj2rI0eDx+byVVPMQryI0nHKGd9vSsjeBHj6H1r9+sdDDV+hS8xNGg6+4Ja5Al1vJQK28EbD+p2FFuIKOMrBaxZhWlRTZlG14rsHtvjc= 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 GVXPR04MB10301.eurprd04.prod.outlook.com (2603:10a6:150:1dd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Tue, 11 Jun 2024 11:44:34 +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.7633.036; Tue, 11 Jun 2024 11:44:34 +0000 From: Farouk Bouabid Date: Tue, 11 Jun 2024 13:43:58 +0200 Subject: [PATCH v3 7/7] arm64: dts: rockchip: add mule i2c mux (0x18) on rk3588-jaguar Message-Id: <20240611-dev-mule-i2c-mux-v3-7-08d26a28e001@cherry.de> References: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> In-Reply-To: <20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de> To: Wolfram Sang , Peter Rosin , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.13.0 X-ClientProxiedBy: VI1PR0902CA0050.eurprd09.prod.outlook.com (2603:10a6:802:1::39) 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_|GVXPR04MB10301:EE_ X-MS-Office365-Filtering-Correlation-Id: a65233ff-df6d-4f97-08b8-08dc8a0bdcf8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|52116005|1800799015|376005|7416005|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?BX1naD2isRJ76a7NnZ1klSUXcMXieFi?= =?utf-8?q?IS1Ak6aDPWOuQ/dT8l2lD8twiMmMZrHrmQWZcyahdw6bjLUmFgtaQDhHO7n5fl+hJ?= =?utf-8?q?brFx3hzOh5SBQBca1zakv8bKDikf6aGuNnKIDSoyXKrJ1X8S886pHGCEX6YLiDaIL?= =?utf-8?q?6fhK2gnRCJY72n/LMby1zj7vNZCRzdEZObYf1tJhkzRvWXFhLSq+DsR9e5sS0ZxeQ?= =?utf-8?q?wBWRLQgUz+XbuwL4YaCN/gene2cta82+HhW+CLdm4sa+jXHLKtfScx6U7FD4/4Acx?= =?utf-8?q?GzpBzthepXrUlJkXigGE+zbKMV0OXjItQpsL++RclVMyDs8VLiffoHw3KNvTVAIaa?= =?utf-8?q?cHJPm0Ndjs/KsQD78G7nvRaI801kDD/P9Khp81uvZRAzM2wSDG+kybbQa8lBzUtoT?= =?utf-8?q?xfmJQqEMpOWwVd88Rh/ZYXGwB64X4uOVnanhffJ6/fdjG6DkAeyZOnF1lxQEcp9Qx?= =?utf-8?q?Rdj8kkE/d+O6MRL8RFPS+69yF9KhLhdo8/7tNS94bhSnLQzJZVTgZXMapkbGkO1TQ?= =?utf-8?q?dyFAeFZmzBAt+vluaI7ZVX18q7c8j76/h8CwhgF79ifp/+IjZOoO1DBofsfhqyW8q?= =?utf-8?q?U+41xQWDl7/WhrvvaEqQtt4smamu2AsEVJymK18DK1XpR1bV2Dpd16Nw1caY/Qtrt?= =?utf-8?q?C6HRWPKZIZ4KfF4V2oTWW3eLmMKrWMJf/NkIF2BInzKyPA6WcrNwTJeYcKQrQPK0w?= =?utf-8?q?tGwTOsgbFyZLdA3Si/9Gs9XH+iudS7Tn6Il7A81ePPzbWCRVjmb42BnkBf/CJiz/u?= =?utf-8?q?bp16h8bK50DBVCIw/D+I2gB/7+xlq+iHjakPlhSAYFRAFWb9Dkk9B39ZqdgO86XYV?= =?utf-8?q?ATw4ivK4eL6YYACoSthygvMDYJHtF9TfhZYxqGtCs+xEGFcNbVyiwfnNrLNsIfxgl?= =?utf-8?q?f0GUmlwI6f8cJlN3xcU6BAjWN/dNeNsLWbiXNBkVtoh5nGKhOmubDaRj6bX+8CtuI?= =?utf-8?q?UkMRBhfhI4d6RptuLlC9C4SM54xOSJ+zYmkyz8SIS/ysvVmz6ibha+CuvFG+bL/or?= =?utf-8?q?i6flNavxvqTGxOZiTcpIWhdgg8gzrxM/K6pWnbMHKXiORmFVpHWycvTmUQYhKMVcT?= =?utf-8?q?VEQmEfWFhjzNkdEu3HylqHY4NgdmeHYs29OfEt1HrtnJT/oIKz66dFF9Y/7fRmLFX?= =?utf-8?q?p3wEMginQ/WAwzvfNG6YNbATf04bi98VYeXGjN/ZUaXPg/KIyWhzJbVGGt5DVhx48?= =?utf-8?q?4d6ljKMwwEwvCaE89D+B1vsByyhz1G4Kw5pOGoSbO4HU0Qo7UfKRUGCYLCbPBc8yM?= =?utf-8?q?GiZ5f1aCErNZY9jaeuTjt/dyHClhOkATYAiZsUkLoTk0H+O606DyvAa8=3D?= 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:(13230031)(52116005)(1800799015)(376005)(7416005)(366007)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?upr7D9lRk+xaeiZpa7wDjRTR9vkp?= =?utf-8?q?H/WEo8aAtcy66R6vo1V0TfG8qdfJUtZVK1SOfcSHZ7k43iqaWjnSKiAtg9RvXNeBw?= =?utf-8?q?YKWKMyKNQsfzTn2UvAf5yhx7R6py5j1brb1PQhHX9NxFYV7Hgo0leJa18bszAJ1o7?= =?utf-8?q?Z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n/09t2y0Xioz1SX6hHm0ohu3oP8YKDelucxBlWHnljdReJ76T88HUYoH2BRI2lo5/?= =?utf-8?q?YbXPE6SOeEXIgu/oo8o3iQAfvyWp6U3ylBlyEzZ0agm86JDGi6AevDHN5sHjIu/zY?= =?utf-8?q?habYagTLvqlVU/hAtnU2gpC7idHAeLJs35nlu/ryIi+EF2ao0j49HraKZHA+FLOfK?= =?utf-8?q?F4g/eHbM1CtPyV6+G9Iq+F7bgWvY4ll9Q3enqNQBFdPU1HpmhskiNgzxLw6TFXfO9?= =?utf-8?q?k5sE3yJQbnWKMF5DFVGPndbR2eyU9+endmFgAysMJ8i0SQAbLD70zVtBMuwnw5zOf?= =?utf-8?q?g9t1Lepfk3o583K6yditPEZCc1go1QUSIt680lOv3j37xduCOfzBfoyHZ3AT7FCpe?= =?utf-8?q?onsJ4n9+XAXcBHxL9G3Lp9LuGA8Wniwk9j8NfkNmx8EHXQDM99BiSA4VBHWZM7GRR?= =?utf-8?q?sQOyFi4FmW8NU9K9dln9+ON/4x3SdNFPErvF4zTP485qA7IW+D11LwLvv0sgtMWNA?= =?utf-8?q?dpYOjvynFCfIslYXOMOKmfhWNU0/R/kYtw=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: a65233ff-df6d-4f97-08b8-08dc8a0bdcf8 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2024 11:44:34.1463 (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: KTN062PQ9BbsPHXktXOo/evZaF3s11xN8SOOJhiZjlsDo0tHoltmnEnrDpgpkM042XBeKIJ3wdajmzvH628t01ig4xCUSydvx8p0//rPJmk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10301 Mule emulates an I2C mux (address 0x18). The amc6821 is exposed behind this bus. Add the mux node and amc6821 as a default device. Signed-off-by: Farouk Bouabid --- arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts index 39d65002add1..14f1322c162f 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; @@ -249,9 +250,23 @@ &i2c0 { pinctrl-0 = <&i2c0m2_xfer>; status = "okay"; - fan@18 { - compatible = "ti,amc6821"; + i2c-mux@18 { + compatible = "tsd,mule-i2c-mux"; reg = <0x18>; + #address-cells = <1>; + #size-cells = <0>; + + i2c10: i2c@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + fan: fan@18 { + compatible = "ti,amc6821"; + reg = <0x18>; + #cooling-cells = <2>; + }; + }; }; vdd_npu_s0: regulator@42 {