From patchwork Fri Sep 6 15:54:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 826098 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011064.outbound.protection.outlook.com [52.101.65.64]) (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 4544E1D0DC6; Fri, 6 Sep 2024 15:55:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725638154; cv=fail; b=RODQLAd7Lih3VPjq158sHuuJONCPDR+57OWboSPhCGqK3IRX22FtzdnOZ4rJEJebmi+9aO8QdtBX0zLzwxKQ+QhvdgQ7GHisa9bfeulyGKnUEyHxsqBOfOqkKFxtHP9rjiUnkrX43M5/t9dWbaTm6tcFj2sCsYAsvCkxpb6GD4Y= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725638154; c=relaxed/simple; bh=SfE8/mJSj688fz7/D9o92rF+AocyZF/L3sDEh7JPBVo=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=BEtKyfxZ/Z9PUfPrHooCPwx4d+ehnfIR6xRuARzNN0FG8TjRq8qOEd8SZA+ZrRSyRb67DseRvW872v3IlUkil4guZvA5falLQSxoit5LY07DK1IZLisiewW1YOGlhlMlL41tXbawC4XERKXTPQJPXN9HbanBjdIveBq/QQpCuOI= 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=gima8s+u; arc=fail smtp.client-ip=52.101.65.64 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="gima8s+u" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=l1xSyCGiNfQ59u1LhG7JZiaLZB2vMquWEBKrVJFgXY5P7YbpbW4lRVtrfaCHMmEMF2f9+c341BbczoD02RLSgLevn9nNQaILdJ7lWqhx1Cd+Aap8XC7iDIUlvs+RkBmy07Oz1EDE/e99Axy8hcVYhgxQkGr1BJ1DQhTH6US4YBNh/GyAjMrPFgcnBTffeSh5AsPMFdB991TAk4uYdgT25iixWTbcrr3Hb7qTvqB5KAUu5n4zsOCQxravxuSY1aHZswxVxS2xbbqawKyw1q9rEnsUMA/gqLVewe+DzLd59u4dOGyQMquLehtERX29ej1popNTqWxO3Ukay3yA6+Kksw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rcoef2dM8l/6IOP+6VXDoZrZ0qTu1WQx0TD6c7JIpl0=; b=A9T9v2YBQGylSFNjbuxUC9FUdg7MJvUnKPwN9n08TKiPWps0Qe0W+X9CB9Zph5mpEviaB9bAtNxclyvW1hezinJF5+PBwmUDeUkl6Bqj5Op9fMHVuq3fdk3nnQtVZwRNjM80lQaIgramsCqN1tJ+MgWLhpoBA+lrmlg1gW7SdlCdkPiUOUrJyqQbCqBPJqJQodb43poO6wVhoSLKiRtQMATO8zVAE9efIthq+yt2cAXOWdrPASWBckbsflfdr5+rq9BLwkxzS4gJN8QHFzOam13hAW38846Ud8bwczPbRFzuc1EDrfW0eXYZmVieZ/PuICb3bXihVIpKGZCkeLnl/w== 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=rcoef2dM8l/6IOP+6VXDoZrZ0qTu1WQx0TD6c7JIpl0=; b=gima8s+u1mbd9mSfIZeo5DhWknDC6RBYU0ds0SSKlYbYVGQP+8PhAziYi2MGdbu8W4nzPkw74egyXv/kkwObqOiFl+5N4uICtsh5GIIu3hX5qkToXc6DZLwaG9JRwVnbE9A0Rd/u8wwMFA13Ky2VG2DG0OpJ437AyrSYdd6AeDw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cherry.de; Received: from DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) by PAXPR04MB8319.eurprd04.prod.outlook.com (2603:10a6:102:1c3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.17; Fri, 6 Sep 2024 15:55:47 +0000 Received: from DU0PR04MB9562.eurprd04.prod.outlook.com ([fe80::ad4d:8d53:1663:d181]) by DU0PR04MB9562.eurprd04.prod.outlook.com ([fe80::ad4d:8d53:1663:d181%6]) with mapi id 15.20.7918.020; Fri, 6 Sep 2024 15:55:47 +0000 From: Farouk Bouabid Date: Fri, 06 Sep 2024 17:54:12 +0200 Subject: [PATCH v8 1/8] dt-bindings: i2c: add support for tsd,mule-i2c-mux Message-Id: <20240906-dev-mule-i2c-mux-v8-1-dbd28a150e41@cherry.de> References: <20240906-dev-mule-i2c-mux-v8-0-dbd28a150e41@cherry.de> In-Reply-To: <20240906-dev-mule-i2c-mux-v8-0-dbd28a150e41@cherry.de> To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Peter Rosin , Jean Delvare , Guenter Roeck , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Wolfram Sang X-Mailer: b4 0.15-dev-77eae X-ClientProxiedBy: VE1PR08CA0022.eurprd08.prod.outlook.com (2603:10a6:803:104::35) To DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9562:EE_|PAXPR04MB8319:EE_ X-MS-Office365-Filtering-Correlation-Id: 3914f20d-8916-49b6-15ba-08dcce8c5f55 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|376014|7416014|1800799024|52116014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?XSrNICttPdrJzj7JVrR/j2YFbFj7zmd?= =?utf-8?q?ynWb3IKv31o81fkkUnkpCIgXrgKycWe1X+B2qUWnbFWE5UHPqlhjX0WL9yI5uFc/5?= =?utf-8?q?f9gD0w+YkWmHv1gNGGE0YS8e7MmtCvjMpGhDPbW+9+dxomjhHk0tH0wcNUuIdADsM?= =?utf-8?q?0SVMxzXRWSyNcwZFgYCxXKyLs1EYFcdbiwdNvOCifYpHyuRv5T01zLMQ7gO9NxaYE?= =?utf-8?q?8h7OMNW6XSrcSvDzuezHybI+XwhMtLpcoywrq3j0Va1sc9iuTiRp11CJyQLP9Jt48?= =?utf-8?q?E1pMM8wotngpmWXyYSJo7tOWOSX4K2zA2xUrk53eRCixM7aPN61a+eVw2kBgNxvab?= =?utf-8?q?KFcEJgquPbrxwVMxYotBAB0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MistJL79JoZthjXYoGO7dn6GFpOC95UJQf9?= =?utf-8?q?/nw0Vcv0ThV5a882AaAuR1QhBm8FqCWVbgDC4XUxUyFo+ZKrAKXmPOys=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9562.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(7416014)(1800799024)(52116014)(921020)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?9u2mAAdr33CvYwzo57yEc9Wlrxm7?= =?utf-8?q?yYS9zEG/gKHtzUMIHVTpa+cNuQidzw1uQUd6CN3o5Mr8YB2XBgNJs0dmjd/+LtZ+t?= =?utf-8?q?6gFDUl1sGCspcU1eLTSXV5TPAS2UGNYNIjd7pKI8PNHbquFjH37g/hf0OJG5rmqnM?= =?utf-8?q?CT35uXCgEJ20DMAc9CSmY5tfscK4HMRCrdOxe/Yh7FMftr5ly769C/Ezb9B1Y+VER?= =?utf-8?q?6eQmPTq01/emcgTOnHvyKQvADb0Ywll/8aAMDzlZTDmJ9tpKwPhBSduaZrnWvNCI5?= =?utf-8?q?nXwoDZz9r1N6nVs7yrKtdX0tRHp5OoEe4iJcmD+TT2WMy4KwsoRaPb68BxMKFjDLl?= =?utf-8?q?MBG3MMuxVGiUN0CjpcdICiOwC9n2PxwFzidXT0vasbf9er8ZBDMIYP+gkpUjU/Sxl?= =?utf-8?q?MCccclucaudUXpc77D+/Rkh/ecfZB3OybCJmoHQMkJ6I5FECD5T++U2oAVlG+4Tzx?= =?utf-8?q?/RhRrV+UdrlNn308v5FMGk6DdslfqLGWDfpQPvBCccdgBTbEH4J9t9cGCwxkDz0wY?= =?utf-8?q?gMmSMU6nWZ4ksuslmmP/XAEkrfkNBpUpZkoTXL7n8cO40quqcScKIun4Vi+bq60Ib?= =?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9QcNAHQfh/2?= =?utf-8?q?TSBjlRs4CPyPkITJ07R8le9uiLAP3n8bySRmvum3ItoNu/cKuvwf7MG8PBMqlJjtq?= =?utf-8?q?DJeU0cpwTMTVmw2aR6jijgBoK6IK+4gvBA=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 3914f20d-8916-49b6-15ba-08dcce8c5f55 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9562.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2024 15:55:47.0595 (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: S7NqOAZjL0JmEL0j37tC2nK5VpqxbWleHI3rjjAL8Fo3x9Q9/05uuX3BZIOhSKSgaEb5w9Q4fb1FCyAD/DC9aUYZ44BlwVKxvgIBjbHbzsk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8319 Theobroma Systems Mule is an MCU that emulates a set of I2C devices, among which devices that are reachable through an I2C-mux. The devices on the mux can be selected by writing the appropriate device number to an I2C config register. Reviewed-by: Rob Herring (Arm) Acked-by: Wolfram Sang Signed-off-by: Farouk Bouabid --- .../devicetree/bindings/i2c/tsd,mule-i2c-mux.yaml | 69 ++++++++++++++++++++++ 1 file changed, 69 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..28139b676661 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/tsd,mule-i2c-mux.yaml @@ -0,0 +1,69 @@ +# 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: Theobroma Systems Mule I2C multiplexer + +maintainers: + - Farouk Bouabid + - Quentin Schulz + +description: | + Theobroma Systems Mule is an MCU that emulates a set of I2C devices, among + which devices that are reachable through an I2C-mux. The devices on the mux + can be selected by writing the appropriate device number to an I2C config + register. + + + +--------------------------------------------------+ + | Mule | + 0x18| +---------------+ | + -------->|Config register|----+ | + | +---------------+ | | + | V_ | + | | \ +--------+ | + | | \-------->| dev #0 | | + | | | +--------+ | + 0x6f| | M |-------->| dev #1 | | + ---------------------------->| U | +--------+ | + | | X |-------->| dev #2 | | + | | | +--------+ | + | | /-------->| dev #3 | | + | |__/ +--------+ | + +--------------------------------------------------+ + + +allOf: + - $ref: /schemas/i2c/i2c-mux.yaml# + +properties: + compatible: + const: tsd,mule-i2c-mux + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + i2c-mux { + compatible = "tsd,mule-i2c-mux"; + #address-cells = <1>; + #size-cells = <0>; + + i2c@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + rtc@6f { + compatible = "isil,isl1208"; + reg = <0x6f>; + }; + }; + }; +... +