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?fx13vOzXkSRmQ1VxNMizauL7DdbdX7Ej2oM3K9GSW5Rw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qSJseC/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?BwgLd46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KrNYq1?= =?utf-8?q?KmazPdrbWAO8RfQeD5JVF7hmKRt+lOQ0CA=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 491f2924-d347-4fd8-bbc4-08dc8a0bd9e3 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: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>; + }; + }; + }; + }; +...