From patchwork Mon Jul 8 16:12: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: 811276 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2130.outbound.protection.outlook.com [40.107.20.130]) (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 86A3513B7BE; Mon, 8 Jul 2024 16:13:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.130 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720455200; cv=fail; b=n8hwylfkylMGXuWE56zIjwtQ4yTiszp6cbtZwkqUJi2AN3QaYxmP98QTB86alCAFDpz2NsFR+gwDAspTGxGjCdtxpQl8yLMNvRR6/5qQuL1uXg0dmguktp9RZpXLfkYZ8QoOPZjGUlR5w+E/RpBDZa3PpQF0ky4x5wSMDtuCCiM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720455200; c=relaxed/simple; bh=uxjNQsin//RpLHGPJiutNOqul2+aED/LlFWL5Coaieg=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Ab8nvupbrQn9rRdGpvp9Ffe2hkXuq/Wtg2C9iuBNk6oJ5+NCOwZPxvXqm+17ygPnBpiqMvg6i8aayZCD7PLocHmxtQhUAts2PA2MDkCA1I0S+JSHONACfY32NZrkMQYxbrWCtX8VDa3hlNFbghZnESxA5Gf1TCJy3S4xh55Ue1E= 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=G18nvGtE; arc=fail smtp.client-ip=40.107.20.130 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="G18nvGtE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QWvTdMwIpfGoxklf1P4u6YuzVts5H3pksDgO5gbyB79WfVBSC0BQJYowEdI5cT7R//oNiHktixPqAeg7I5M6nXyqZqMIh9d/VTfQ+UxTFu3S+L/txsYPLOnb/KH+G8Hfm7nwja+C52DTsXUcocc7ZX7XPX+2+ntW9u+XGX54mF3r5UDQMjTuOledrc4BTlP/uzDTALBN5cSvWdm4RCz8O4oR+RDuskauY8eQxqmKNpHPG18QnXdS/kW5pnrlWUGq/Co7z00/h5P7j0LK8na7hAe7IRF2Mu5YBiEVQBrA0VfGrU6xGxzSfCN7IbgBTHDcd6VY26sa9WBGx8gCjYG+Vw== 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=4ZRaeGul8ksk2vs5d9Ox3E6MuuZILO/56GodZsU2vVI=; b=Ryc5JXbBou62mtC1SUBNMOb9L5GbI7lXMHxEJwNJIuK24pjzdHcpf6DIX72LFjKJHCVn62abrTTnStt7mVZszDntpzBIjWqsQawjEVvz2OXMQVt6tIHNTUskpY09sagp4F8kZ7gCKys5pP2SL0mR4UtVdYtnfi0ji9FE8/DOIaba3N8O4Mu1jQrCAw04eJeQQ4HsBZu+Uqk7/DbNmGmS9fGfKlY0DJsJa+Wokx004dt7jwwB7kDn5LAubJ9aqiXcpiHIVnbF0Xr/fVw5yxFNpWAWf5BN6ZTHkaruyrk6uz/q+Ku8aFBfM6C2Us+GnxY9Pw0n0IctOLtm1sIiyfNV6g== 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=4ZRaeGul8ksk2vs5d9Ox3E6MuuZILO/56GodZsU2vVI=; b=G18nvGtEX7n3AlDv3N04NH4GGc/py1kwYiXpFWG3K5KmgFKf1n9HerAo0nzMAjD8hxQ9sTa3eoLyRuKEqR3WwliwSHg1NrNfWVmZvV49cdxKZm6UXfSIDcZWEZFdeTe5F0wRTWIZn/Xs6BHrp7Dn5Tz1teUhS+uCDbnrVNDl/lA= 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 GV1PR04MB9055.eurprd04.prod.outlook.com (2603:10a6:150:1e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Mon, 8 Jul 2024 16:13:10 +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.7741.033; Mon, 8 Jul 2024 16:13:10 +0000 From: Farouk Bouabid Date: Mon, 08 Jul 2024 18:12:12 +0200 Subject: [PATCH v5 1/8] dt-bindings: i2c: add support for tsd,mule-i2c-mux Message-Id: <20240708-dev-mule-i2c-mux-v5-1-71446d3f0b8d@cherry.de> References: <20240708-dev-mule-i2c-mux-v5-0-71446d3f0b8d@cherry.de> In-Reply-To: <20240708-dev-mule-i2c-mux-v5-0-71446d3f0b8d@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: VE1PR03CA0057.eurprd03.prod.outlook.com (2603:10a6:803:118::46) 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_|GV1PR04MB9055:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c308390-5271-4189-f433-08dc9f68dc77 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|7416014|52116014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?4hstHsXSmm5kaWyp+T7SkwnlsIlPO0A?= =?utf-8?q?kR7y8gKmPfwLVy6PBf0p1oJF5AXZTwmaZNT310zQe5BTFB3MFVpOCrzOjODV0WFiY?= =?utf-8?q?oE97SSwTnBzneuNKhfxlCqILrZc57NU4AMzAFvk48dPt1PGmY7zG9OIdKZ+PiY0Kt?= =?utf-8?q?5xPlh8mvPtkJ6pbG94ctlMu7mwTQGiYvlal0xtQO1WbuwCiGg6gWEcVp5UUcr1AyC?= =?utf-8?q?CISrNoRiw0s6bLlmMM8n9fM1fZBitehDrXun4Ny4U8NC4if6opnt6XMRYS0mgkmWI?= =?utf-8?q?W0L2dqIkBcLRY378X48aapqC/Z5H0cOhM+2v5R9xXmZAG3rrA4S2aTFsY21jerB2Y?= =?utf-8?q?RgJVgAd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AMifKNBSpgI9ozO02XXp8GrAQDv0nzSyuE6kZMkfF9+1LWtMw3RC5lvFQNUCi9?= =?utf-8?q?khlKnjftZc1Kc322/aoSJczY6F89jS9euF4XvZU/sQcj9heBSt6s6+EY=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)(1800799024)(366016)(7416014)(52116014)(376014)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?EHeD7mNPY7KO7dgYuiqZb4PkVD/G?= =?utf-8?q?8jT+lxj3U4OkomoohMo4EtDt/D3yLryRjdcB4TZS3ifgqNo5jyVehcSmBp1OrnSbR?= =?utf-8?q?gHujYXDNcgnUf9rLZBzgsgdG3LFWKXPU396Xg8tMtgklVGqh+7+s7F2gl0EF+G+fy?= =?utf-8?q?n20OttaUIk+iW6r3i1GSceGMOOeODbI2vlP9/uKhNoI20rL+mFt+pP755tjCd9p7i?= =?utf-8?q?dOXGceHSxbFaTzq1RO7zGud17OD8UTFiway84KgEc/YN/U7Vxe+Jxjc3RQyywuxlz?= =?utf-8?q?5R4cM8A1Ht6JokGhUMxl+Abv35/nAh99qXkqriyg80o+NBShNQrcd1n16QRPCwk+b?= =?utf-8?q?WitvUA159rlYThH0Vg1ahuTsMTQ6uN9eDSXz0zPAdxPDSN0oqZWHsGpwHQekTuUPI?= =?utf-8?q?MGNygKUu0s1pS7UTdhY4agtKcyVhYosDFKPu9DTjE63hYT3bbWE7wft9nD2HyrSJ3?= =?utf-8?q?GXuk0TA4oZMjOg3Kh+Y7zU9gOOdo6BnPrqgCcvodYRngouaSeOgBOYZvaO1fxZOWX?= =?utf-8?q?/SNLRNlFnZWH0mz0nZ21Usjmxb2D/MlueayyguSZgsY3037wtctj9x3IZIT3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?q?khh73D12IB/YBZ9Swp7PIWaYOKKRjEUmI65neOCDwgkaMalqmH3MjAqf6dLOdEdTh?= =?utf-8?q?IQipLpvx3w8rJUWhPxESGOCXQN3oL2GYyw=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 6c308390-5271-4189-f433-08dc9f68dc77 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9562.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2024 16:13:10.4647 (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: E1bH401I8OwuVoqMA2q3+AYFrTdERWp1kZW5sEJcSEwRObEB2gb9nkLRWJD5uBEFCVUv2Habv1BdqCvSP/inzhP1+BlaebtJI4pP6XFhzSA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9055 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. 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>; + }; + }; + }; +... +