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: 13726830 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 BC89AC3271E for ; Mon, 8 Jul 2024 16:13:52 +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=RB/36hPVycbEoMdXCNn9ovRILyndepvquxjSl1s5JY4=; b=axW49Tj+z+FQCKF8WFCl+ARC6p ei1MGqPzNKBDjYlKsCihGY7/GVTFnVkEoLKqnS3r7JuadjneSBVqXFGB58Y1lRJ+BdyiA91alT2Lu k+1wwi8Eew7bE6ULMvCw+Th/3YSuagaM7+LFKHpGgxSKbQDl6USjVnZZg6vXRQ21UrRgDoeDNldOg b09bhyO08kfCf0Qi5Mk0DQqAWKUyC2wVv96xOKEM0+c6lKA443HVRIb5xKFSkGoqywfTho74H2PBl sZBY1C+jftqwb6NKS36yajb9f8pXTYDPTIUduZoOle+YLcbmxI8NCq0Xq9fT3OxYJuc35F1PF5r/T u1wNg/fA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQqzt-00000004O9I-0XE0; Mon, 08 Jul 2024 16:13:49 +0000 Received: from mail-db8eur05on20722.outbound.protection.outlook.com ([2a01:111:f400:7e1a::722] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQqzT-00000004NyG-0S4t; Mon, 08 Jul 2024 16:13:24 +0000 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) 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?RgJVgAdFgNa4fzKW4kT1wG81Z94oZQjuenTW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zSyuE6kZMkfF9+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/MlueayyguSZgsY3037wtctj9x3IZIT3nomhp?= =?utf-8?q?NPRbn/hTCnh4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KRjEUmI65neOCDwgkaMalqmH3MjAqf6dLOdEdTh?= =?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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240708_091323_187838_879F6E73 X-CRM114-Status: GOOD ( 11.72 ) 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. Signed-off-by: Farouk Bouabid Reviewed-by: Rob Herring (Arm) --- .../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>; + }; + }; + }; +... +