From patchwork Mon May 6 11:37: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: 795074 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2102.outbound.protection.outlook.com [40.107.13.102]) (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 518EE143C52; Mon, 6 May 2024 12:24:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.13.102 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714998268; cv=fail; b=q12FLxks1rTOzVEaY7bQh3s+ePJEPRGoLtmdlxDb1tWJyTQDoWo8YIsdmS3MgqbByzbDPRYb3g9vZsRQ1n8MwFtXTbCzI8vBk4o/+gS6CGrU5UqhRc6tpIVb6jYy/TgjzcB1H3uMUhDE21tUL4CCSA9ticJqeMQEEm6v5h/BdJc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714998268; c=relaxed/simple; bh=ChWq4k6TLZAaRDFyH49Ss6I8/AVibvlLgLYdCYXpveo=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=s/Tjc8CD7Ac/ZnhH7uBpQKSZGfHnuMkcJkXIC9v3kMig0a72lcnjSw2+Fn+4UbBKlWGyACafypg6PaKviP8J0PGxe4Rnt5kzniaNGjhQIeQgyLTsUTWG1WCc3b+xcPifV30t9sVvJVcNqEEsqIhxJpcAxj8hwViUkmmUzrGrGh8= 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=HS/+fdMX; arc=fail smtp.client-ip=40.107.13.102 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="HS/+fdMX" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZX3l38xP0MwcbjQaR4jB4Gbl6VHKwgtD6tGyhjJgASmzkW1zvd3kIfH1mJhTzwzzuBh+dc9KcOrxNXyk2M9o3xfErTXkvgP6/Fu3WGRI342ZDzjmCwtS+iqCmnbErFNi6rBoKY446wDcZDBZI6iDes1WxHlNV4NdHg/vYvztYu7N2+AENYhmPz9n4h34Y3Mm5D6z0/TmC3wjFeArLwagvuNBAe/eVPPZpSLF0dg6sCO3MI9/W2JLN9q3KxFqPM9LTegx0eY5+29aa3DyNOZ9DzoiHQDI8qk1RNNJsWALeMu+8j6El5cMqbQC7eBSRg/J+XVo6QlkeuhDFMxH5nah6g== 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=flFaBaooq3Gfn4fLB5Qqk2nhJsqmOaFf3eZyVRSG/To=; b=E7WuCJzWI8hUB852SlsmEmdM5KygSqecd/sMEoapn6afQE7KRLie9LiXXpUhGP7JhJQNUHFBLwsTufWJQkbV+41c6eSpHgDlaWG6KiRggnrOA9wrB1enGKkTEP381f5LjVvjGHL3sFKKAB89i+CWbEaUnLT2rKRAEb+USO4CBINGVfGwst3ToI1p1YsTdcKL+ktuDBUL4qdnWff9xwDEdBdp9iNFOZJrKTgRC7c2e04wSRyq/bbgxydl26higgo4LVsaFUVsTLSazqltaA/T5ytnNU8PL0uuamq50keif9XjYIVu6VdBQf4N+RYq10Csn/dRnDMUmgQai8KaZTBfKQ== 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=flFaBaooq3Gfn4fLB5Qqk2nhJsqmOaFf3eZyVRSG/To=; b=HS/+fdMX7zZ/WnpszGvPWfOtRlFgH24Hi1oMga/l6vj8VR1mnwu1VTGrz5W9BuMKbvOa2iEpneY0p6VErksUnwz6TGXj3buWK6ythSjoKwIM4t62vrAjBjDcSRfD5py0UnsD+tMNJDPlHzAkOszFUwYL+20emfouPg45dfzSdL8= 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 AS8PR04MB9512.eurprd04.prod.outlook.com (2603:10a6:20b:40f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Mon, 6 May 2024 12:24:19 +0000 Received: from VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::59d9:878d:65f0:3936]) by VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::59d9:878d:65f0:3936%4]) with mapi id 15.20.7544.029; Mon, 6 May 2024 12:24:19 +0000 From: Farouk Bouabid Date: Mon, 06 May 2024 13:37:53 +0200 Subject: [PATCH v2 2/7] dt-bindings: i2c: mux: mule: add dt-bindings for mule i2c multiplexer Message-Id: <20240506-dev-mule-i2c-mux-v2-2-a91c954f65d7@cherry.de> References: <20240506-dev-mule-i2c-mux-v2-0-a91c954f65d7@cherry.de> In-Reply-To: <20240506-dev-mule-i2c-mux-v2-0-a91c954f65d7@cherry.de> To: Wolfram Sang , Peter Rosin , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Farouk Bouabid , Quentin Schulz , Heiko Stuebner , Quentin Schulz 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: VI1PR0102CA0103.eurprd01.prod.exchangelabs.com (2603:10a6:803:15::44) To VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) 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: VE1PR04MB6382:EE_|AS8PR04MB9512:EE_ X-MS-Office365-Filtering-Correlation-Id: 0d23d7aa-f01f-4efe-64eb-08dc6dc771dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|366007|7416005|1800799015|52116005|376005|921011|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?jVU5Mi7hJ+8dcY4Ivr1UE1iQRN0NTgF?= =?utf-8?q?f2jCWyTbF46mCDMlk1tKR1qaD2GOKk5A2XJfFcRN+TCj7TzDVrQVLk2Jpgu+T/5py?= =?utf-8?q?WIJGXXEHiNEgbTJq69qjAmH7gnXi2a+YxYNFLBD4ghNKY7LuSjZ5aOYAZr8ZsbiiU?= =?utf-8?q?u6JRY+Pfhoqe7UEGiV5dvf8Iag2pNiprfk8/mw4sMZ+DsJPiRxxpCrzFBoD9JflRP?= =?utf-8?q?yUFKIqjD4hm2UhTkzwXTGkq4AVKvXm/dGvRn2o4aK0cWqeT0jcwaMHfreDna2g5uF?= =?utf-8?q?Gad7ifwd37T/ViK5gp1bCkzczaI4GW1hWsfRIkX+a9iIEtjYRLRG5Ux5BRcg+y8Y6?= =?utf-8?q?5py39NqpsrlPUShEUpB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TkgrjisunlvEMIQie8UFIgZ5EKG4=3D?= 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)(366007)(7416005)(1800799015)(52116005)(376005)(921011)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?YEV8jdS+mTwPn77fJCCYTCvUY2Za?= =?utf-8?q?X+Pr0XGPRe66i7hSRAvrU0o9lw5xblKoW4H/IwskjRyYV0ypJRiOKASPaJMVW8erV?= =?utf-8?q?8J6xgAke09DcEFckKZEQRPJCdSuh9RUr0nU5BIFBw6yGCPEkSfaMQk6CHGZJ2J7yx?= =?utf-8?q?sSgyakhAHXztyjTXUIjV3ACyCFKLB0Waza48c7rI4nhdmfRJ+a+MlDPpkHW/6v/F1?= =?utf-8?q?4ba038FS8/KqFmm5ciHqLh9GiZohku42MzBgxjTElOktfCB9v6L//OmVQakO0Zpig?= =?utf-8?q?tC+cJdd6UJ2ZmmDD9wbunKE3KW+ZNWC3hx6E2MsslJUTOnaewyLOF8qYEHXtYz5Ty?= =?utf-8?q?A5O65rdIc7RACcZ9iKHs448Cw39ayjgrP7G5dOJ26S3HAQk+xaRYwMqb1UzbjNLOk?= =?utf-8?q?aQU9QY0aQWE1AMZ6UpMSt2pbaLFbqBH3Uyijn86KS1zi0qwV40zsJ1TsCj81IftA0?= =?utf-8?q?KJSz3id7UNBp7t8faLjYTnw1HMlrl0R6pGGm6iJ8vYGbBy9g+2Kd1jJ3u4TFcgkVf?= =?utf-8?q?akaJiuZTVgGJ34hXORswCLpVSQDXDeFzrbmjavJ6K8d/5FGUSOxItLVvchUYtcfWJ?= =?utf-8?q?zHr9Uqp8Oa0BXF1NpEnCVg7CynHguPwDUFEwGgwnQHEVHry6jTOD7+RUookD9kzqm?= =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-8?q?uAawkqZBqzf+f7be328lAGkVH65N2tHOQQ=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 0d23d7aa-f01f-4efe-64eb-08dc6dc771dd X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 12:24:15.7098 (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: BReddaunuBFEohIcHeUWPojG1psSVlkcEF/6Tc8i45jYGrB33HqA/wYdgLUi1m6IsLlh9ccVZz8MmF5oO2dtkncc3NYz0DhH9s9yiLeKfmM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB9512 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 core 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..50915183bd43 --- /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 core 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>; + }; + }; + }; + }; +...