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: 13693528 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 62D79C25B76 for ; Tue, 11 Jun 2024 11:44:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=QmIZ7ZJqqjamLvjFD5R0myWCwSdwzcM9+W509BCi+8w=; b=GWg0vEdyLhJufB9J5lRnMFDDoy V4P0mKk4DDC1FKlQJvkyTB3Tn3EMaHmNPKn7crYKolUyGgTJxJ4xkh0cuFbpvPoQHHh+adDsd/Z7v mHkDEVa7kJFblnr9iqpcuP+ttPtyXkbp3JSwI1it4STThFxRHYgqqsLBTyFgsW8tQKx2bxijpHEKx cAsu97EH7yr/cUiq9089aQEmbWllwgO3IVdPhiErQKFZhjwZY9zVl+sQ8auEBXAh/iQMsKYA1Mu7S sVTtp2umx9UQfVEiyvuHSL8lHpiFsG6gJO/bz+75TqJd7669wWi2RcX8KrwrFR+fXoqHH/nHICIaj 2eu2wxJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGzvk-00000008hjG-1Pf2; Tue, 11 Jun 2024 11:44:48 +0000 Received: from mail-am6eur05on2070e.outbound.protection.outlook.com ([2a01:111:f403:2612::70e] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGzvc-00000008hdQ-2MOk; Tue, 11 Jun 2024 11:44:43 +0000 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) 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+Be4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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+FqjBzhJUQ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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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240611_044440_951237_AB1043FA X-CRM114-Status: GOOD ( 11.95 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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>; + }; + }; + }; + }; +...