From patchwork Thu Jul 25 13:27:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 13741906 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 5B73AC3DA49 for ; Thu, 25 Jul 2024 13:28:34 +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=Bgfa8aHg5cxh+7i6XaFgHSX33fTnrec1XGk+cYCz0vE=; b=qNQFW+mKMV4xuT0SknL3CGwuuR 8tOIG8SfNFm3VBi5VGebhLCVzbYKWcRj+WCTfrkS9MB0f7n2HhYY7dKZ2rnXYKu7EnoC6+sLZbsWL 8h4ZfP/cx8mI6XfspiVThjieUttKK6tgEJBjeY/xBySGM7Fw+ZEEHoHsAE+AZUTQXH+jtXpFcssic hB120uBNZahjcRwronU2z3THlWfwNzd2of6mDgzkdsC8LlbKFhcgnLDy1rBWkJh7h2gBvJp+/s/Tf DWxU1sncKirbPYBgVRvbYkoXk3mH90mQ3gwIw51ErK4frg1LD5OY3ZJAHEa/agFeGIlC4irUSvYaq m1PMKfNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWyWA-000000014XL-15D2; Thu, 25 Jul 2024 13:28:26 +0000 Received: from mail-db5eur02on20701.outbound.protection.outlook.com ([2a01:111:f403:2608::701] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWyW6-000000014Ul-2b6V; Thu, 25 Jul 2024 13:28:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EqO0hQ6M9AGoR1A3cvmttApuAslsbjFahD+ItQyOk7RwJHGs0M9lMcEPyqzf8pQv7PGhy6SWsdB3VjPIzoX+nJjhlYCiW1Htxt6GbxQKPaVILGCgwSuHV/EF2yCxDpSUtgOTrnTXqmjJB7gHivJy61MMwx+znuFulpoF+uG2DTZe1lUJOr7focvcquwOOm0GToWApzJXAoZBTScXTq7e/NQ1HfV5ARfg4EBMN3isBFh2xTIo1Wbqu07CUfAQNtWKV4nyip9rZGe8fGM1XfOWIgLj51ijswEdJhCUwQFvs7cLZfWGYWVuQTizLLiQXQWaeqWCLKqUmsxW3SxUPwDLTw== 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=pJnjelccAqGsu7IfgKRzMYfmKCxrKBYH0bERLOYy5IY=; b=P7D9VxLA4ZyKX0Y9Q4xSfxogKN7lKQ9R8ZjE/1RWb8QZGF13SpFewkDXzZgLG52h+enfbVCC1kgVcFbk9LBvTpSXyv5ox1gHX+3VRi29k+HvDnu8JPmZwwgCE10cgBdvJfcwk5Jn2CtWYIVG/7j0Ip+0TmspMbjHd037Q9RQDi/LvXp44mtXfDb2MehQTcuf6n/rr+2QSi5oB5vRFnwR4GueIEGcz2Rm/GZT2Ws+bnQg2gPqVwVGtZ0PQlA3vyLM7DrRQL36sipSqSLQcfjKs1j7upX0XU2Gxbgmwy3rHVIr0ZhArWttOgLmGh2T5IK7Lhrzv9CuXFi5rjoiqiWuKw== 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=pJnjelccAqGsu7IfgKRzMYfmKCxrKBYH0bERLOYy5IY=; b=Tp6wdJI6zkx7geDeY6dm9pF8JZD8tw83xazhQgnRDyISmFNlV93jRk0xCZUuJWUvVi4aFe0sTQFFOXM32GrrveHR4xeOYN9UwAkfMxozlrLlKfhjJt0zUMI/Uj/s9ZNCX4kRfokmKejtO0tmjNJY9ivRoSeh3vXHdl2ZxHAKbBw= 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 PAXPR04MB8287.eurprd04.prod.outlook.com (2603:10a6:102:1c4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20; Thu, 25 Jul 2024 13:28:16 +0000 Received: from DU0PR04MB9562.eurprd04.prod.outlook.com ([fe80::ad4d:8d53:1663:d181]) by DU0PR04MB9562.eurprd04.prod.outlook.com ([fe80::ad4d:8d53:1663:d181%4]) with mapi id 15.20.7784.016; Thu, 25 Jul 2024 13:28:15 +0000 From: Farouk Bouabid Date: Thu, 25 Jul 2024 15:27:47 +0200 Subject: [PATCH v6 1/8] dt-bindings: i2c: add support for tsd,mule-i2c-mux Message-Id: <20240725-dev-mule-i2c-mux-v6-1-f9f6d7b60fb2@cherry.de> References: <20240725-dev-mule-i2c-mux-v6-0-f9f6d7b60fb2@cherry.de> In-Reply-To: <20240725-dev-mule-i2c-mux-v6-0-f9f6d7b60fb2@cherry.de> To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Peter Rosin , Jean Delvare , Guenter Roeck , Heiko Stuebner Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.14.0 X-ClientProxiedBy: VI1P189CA0008.EURP189.PROD.OUTLOOK.COM (2603:10a6:802:2a::21) To DU0PR04MB9562.eurprd04.prod.outlook.com (2603:10a6:10:321::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9562:EE_|PAXPR04MB8287:EE_ X-MS-Office365-Filtering-Correlation-Id: fd26d9c8-dcf7-478e-9872-08dcacada3dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?xFWknPpomZT0o6MW0d+/FuYpgxv8Edr?= =?utf-8?q?cgqYOr0bXgQUw95BHXJpzVfQEa8dBLriah7Vf3WKVrhw1j/X8KW1jsWewRH0FvHeq?= =?utf-8?q?ErDyQjQ8ypmVRG6h37JMjkfiLtgm2de88hDblWxxkZ1brcGSeiZLODPkAMA8sdz9B?= =?utf-8?q?XVVDsSVzzjdsJiMk5X5qg6OT1IfG5NP8kTAtzAminzXJo+ghwx6lQ138z17HzHm+e?= =?utf-8?q?HstodOaQx92tPdATzL8+ODJBBn/teWAf3AbQgNdD7Zo9W+OMns0cEmgf4b5u5jOU/?= =?utf-8?q?mHkiRFngaztqj9sSRSEr4LDaFruGyCHfjrw5MhG/g9jmoO1Vbk9c+gDM5ZkHjHyF5?= =?utf-8?q?NV5FOStW9rVCXS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JzmRIwkiw4lbHB3PltKvjPlYlrS2QgFe7dit3HUnLmn3?= =?utf-8?q?SllfxvEAwMU/8A3+4YjvuNmoc+iczumjoics3yPUP5nBT5oQhYrGK/0c=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)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014)(921020);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?NbxUa2EvpOWXwGcqc0M42GfHnUe6?= =?utf-8?q?L+9XSuikYCKdW85eqK5xTgPkfNmTAQzm5/BP1Vb54QXycJd3vSv4yY5Y2u423NeWe?= =?utf-8?q?Sk7F4KVVZSrPLyvzeofpDAxEOrofDsiWZDOUcuYd9OBWJIMo3IWS+X08LuePjecXr?= =?utf-8?q?uTwhrokIIRJ+sEBxvChLR591vlOn23se2wffbHPJ2DGJPYlRTAL/Sz8W/nR1WROig?= =?utf-8?q?LAmUsrn82nhMqpBQKUhs79tyuZDk3lEFOtEH1YTZeh3Tsh2cI8pEPfkt3qCYxhxAH?= =?utf-8?q?WEoPtCk3il/PD+PcrD9xv9h//t3ybNQ0kClB5ySDGxACen5I09dYSlVVinFy7LLKb?= =?utf-8?q?qKUgHIPIEQT330wR9Uxne4aXgZKJ+Jy3bCJCQOv1dvoRDYBxVKnidVEJDZY6UjM5b?= =?utf-8?q?9+9mFxHxd/Kfn0DItXsBUbnbsm29V4LsCzdxlovSxOuPV5leA4VDG7Jrondx/cnXE?= =?utf-8?q?4FNpi/UDj1PcwZfczwckQUeI3jOy8zK+mZHpu2gy+sPDc1rX/7ec+6Nq8FmOe7EOZ?= =?utf-8?q?npK2k7fdIiwRh5OiOnJV6EzZAld+RwZUDem8dgeSIVpHJvH2nFQkHFuPRueDJx6Su?= =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?q?1+GSwpLJ207niFBkbQcDU4ChWwWC3Udm9lIDgBYnlnEWczcoFpJV4n6dOu9K4Ew7J?= =?utf-8?q?Ly2AdeFw4zAQcS0Lxy2TpMuHMEDu9oUiHg=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: fd26d9c8-dcf7-478e-9872-08dcacada3dd X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9562.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2024 13:28:15.9019 (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: D5B7c3MikPdCAGIvajGfQUXy44zCTns9LMAZvuSYfXaL4u5qzLkFI7/mvEb95QllhM+lPHqN1ZYLy+tp4Ir++jaAGV/aA06dhqXwkrG+DMI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8287 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240725_062822_869002_FA682EC5 X-CRM114-Status: GOOD ( 11.82 ) 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 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) Signed-off-by: Farouk Bouabid Acked-by: Wolfram Sang --- .../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>; + }; + }; + }; +... +