From patchwork Fri Apr 26 16:49:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 13645095 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 E2058C19F4F for ; Fri, 26 Apr 2024 16:51:06 +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=1dFOa7jVJjm9f4tWopWDbmepIqmWBm6FQwLsy1Ab6+0=; b=HQusU33R9yl6/yrZqqbMZ3fHAA jWX0oyc7yYnEBwGTODqTankcbZCuyIbdYg24GULbr36a2uaMzgjAqxZk85oAH0p94zCh0iYdUZaPI GOZMF8DOmXB0WqSylDRE3HX4RV1IiSYmByFI9L03/EPlVgnPcixOjreWj6eUvRHPRWUZxhj0TOnIp uEZivwXnzW0Nq1+bZZBN0pTwlJO1XuR7T9PhGuhQSZBHTeVC9HOYC0db3Symvu0M0KRc5V88c6Tcn epQotWNCS3HOvVmX0vH/nPdd1q+E0jlWAA8Irqsp4eDXQEV1OVqbGuVZeqSbV/R4WwkkNkIVgyXR6 drqYMgRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0Omj-0000000DJo0-0Gbn; Fri, 26 Apr 2024 16:50:53 +0000 Received: from mail-db3eur04on072a.outbound.protection.outlook.com ([2a01:111:f400:fe0c::72a] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0OmU-0000000DJdc-4Ajb; Fri, 26 Apr 2024 16:50:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eZTiA10mU/pwlP9fiinbQbSgQ+skoRGQTmN+2aS3ziC4wwgs5Suska3lmQzN6sydCejFKe5QnlpwAUzY/iM/4XbcgK8C29nDTNslKweZaROwmlAJ++PTN4It8W6YjvJ0kP8YJ8rkbOGb4lGRFDOhaO9yj9Y1luRWLtMWcwcCeWwO/VA7PDMYt/do1BxzSPinbWuQ3uALWhZerQVC4woWN8AHLSpMO3d3sQv/F3HKsz2FoGPNT0OWH2tnSbDeO5cvIAwBsrCmdSlMSyVo+8fzIKc45ib0I32karUDNR6EUPXXObHhGFgudSyW9Jgl13+H1jW1m/dgi9WKwBqDxckTJQ== 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=jALs9GKntVlZQTeo6/+1x1V4OtMgbK0DQtN+qnKkdNs=; b=HvymQIzM/HqFbcEvU1RpOUssD3hsQXvsS3NdX0OqgsNpsgjs7d8+Q0h2BtRjdXQRLiG9NJyd9IcGQbDFZ3QIQ2CGMCTDd9T8xEcJTEpXi4rPpoPCwFChTdq6Rs73Vw8qyaUnCi8rQ9c5ktMMcc6KZKGg3aBluwyYSF+FmOJIcx54M0m8RY24lcSymqWaxmO9eixNJgWTDf013MdDwX3SrYuJA73BjDqsWXSZ2BMYKjgBErsjgV9CN3p5aqRtgPPEANy2S++sN+wbnnYUBRf4bzsahV6atFqnRWfRVb3MNi9BhbQ+NlQyFrbLO8l7gvLtOs+0+PnfqhZVIQViNV5Z9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=theobroma-systems.com; dmarc=pass action=none header.from=theobroma-systems.com; dkim=pass header.d=theobroma-systems.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=theobroma-systems.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jALs9GKntVlZQTeo6/+1x1V4OtMgbK0DQtN+qnKkdNs=; b=GGbAw9TQHqUj85sDgjOjkL/PjupDDDae9oq7Nr7bpzzoZ+OHPt4s5meYTukfwsDjRKJp41rQamOa6rTUp/aO7v6usWkKB3FR0bepNBxXcefUnIWUkcnYk7vIQ1k1iytoDsc46o1UPwhaMlvN7/n41a27d6E3T7Uazrkr9wCj8XHOIhgaidS7YVVkhTS4SO9GfMKNYjQGc3siF4VeQHXzxpcZnrmNoLR45BsDjV1NubhzhBomC3501oeTaI+hrcfs5EqNF+x0r4muy0x794JkX4o8Y9yslFoAn9P8NFZlKHxBdehM19qG+C7P5WKq/SryhwJmzI31RoO9w3Fg1rzuuw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=theobroma-systems.com; Received: from VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) by VI0PR04MB10230.eurprd04.prod.outlook.com (2603:10a6:800:240::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Fri, 26 Apr 2024 16:50:27 +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.7472.044; Fri, 26 Apr 2024 16:50:27 +0000 From: Farouk Bouabid Date: Fri, 26 Apr 2024 18:49:33 +0200 Subject: [PATCH 2/7] dt-bindings: i2c: mux: mule: add dt-bindings for mule i2c multiplexer Message-Id: <20240426-dev-mule-i2c-mux-v1-2-045a482f6ffb@theobroma-systems.com> References: <20240426-dev-mule-i2c-mux-v1-0-045a482f6ffb@theobroma-systems.com> In-Reply-To: <20240426-dev-mule-i2c-mux-v1-0-045a482f6ffb@theobroma-systems.com> To: Wolfram Sang , Peter Rosin , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Quentin Schulz , Heiko Stuebner 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, Farouk Bouabid X-Mailer: b4 0.13.0 X-ClientProxiedBy: VI1PR08CA0261.eurprd08.prod.outlook.com (2603:10a6:803:dc::34) To VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6382:EE_|VI0PR04MB10230:EE_ X-MS-Office365-Filtering-Correlation-Id: af46b4df-ff1a-4c96-0ccf-08dc6610f956 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?utf-8?q?4tqGMhHf2wMh2C2x0iXbZuGqC8iNbwk?= =?utf-8?q?2x3yFx+uURHuBslm7PktYWMv8LZ11KBsxqr/klIeC1wEN7x4nHZUMhP1sQbbsNFkb?= =?utf-8?q?rj2YPKhKQ0Obm8CHM84bsANt65aBo5ws2nRjNQLBFgMLrU4u+b4Ykm53GOQJbnnru?= =?utf-8?q?blOwPyDbFVoFi3j+uQsboV657+hUiZzQzk7/ZHyoAAu6Qd2Ep9+kJTyHigLuIhkgk?= =?utf-8?q?joMouwhj++t28pZ50UGxbwhppcBGBInu6KLjy+V7dIYF+va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629MKpZniS6L/uIQ?= =?utf-8?q?ef5q0ag117xRxEkl4ZIDUrS73dtwbxKk/hoWpVmRf2Bt6031AimYJ/AAoyTdQqcH7?= =?utf-8?q?9eBYiIJu57JPFYll7QPdn1hR9SFParR1IApw=3D=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)(376005)(52116005)(7416005)(1800799015)(366007)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?bV2k/usdZgoSMH+wmRUJACIaHVs3?= =?utf-8?q?Le1WpkQxdAMSnBWTspm9dZmD2RApHHivtu7BwSJDEfOlxhT5eMlGW7wV1t5PndS8g?= =?utf-8?q?kyuCoOzrDXRH9NURG4abedj6AHM9g6uEw52OhyQu3lryvDu5kdn+nw6pUwCHHMMK9?= =?utf-8?q?HdMNBstwyXnkVepzwvrsD+NqQbXniFom4mzV1Dj8e4atIVJMu6VcnZqyQ00UipxzL?= =?utf-8?q?ATtE8bbFS917gJihLdp/xYGFEKCCTKHPO7D6i+YG4GwKnDeGbkCzVOqaulczGbN1z?= =?utf-8?q?6WOvK/aiSHiw/vFqINdUqZTX99IwU/gRxAo22cBB/DoDTiND0NB0w+dwu9k2XqEdt?= =?utf-8?q?ctDj2no7l/3xxlFhMt+UcYBurvvoZ6FDDr45s0sYCOXPe8XwoVzjEPlsK6q+Cgl8o?= =?utf-8?q?2yzLV+LkiO3i3a6qqUgBF/6XZfr0lXWaxS976+LpKuaKBMYA+4Im8qrGbhfDVdSJa?= =?utf-8?q?O+Nbnqtpjot7vWlxjMs+8C5H0LQi0stIhdTLXCUuMEypsBtJ0egIbakG2k5Fm6klj?= =?utf-8?q?NwB6ZccEMGcSMueKlZIpcuC04GOgvJmvq+8ABWKY296XHayXK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d82SCtorfVgBYJXk5R?= =?utf-8?q?jXsY1rJzSBOf8ksQ9j/CNW7gTiGp/Q/RpfN7YRipgSh3prNm1zeuur/uSIoBCUUGD?= =?utf-8?q?Lr0CtD+fgXyjoMA+OJhSdo1wnP/2B9b0Ok/XhQeydK8ygQRZEB2oth4=3D?= X-OriginatorOrg: theobroma-systems.com X-MS-Exchange-CrossTenant-Network-Message-Id: af46b4df-ff1a-4c96-0ccf-08dc6610f956 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2024 16:50:27.0357 (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: UEfeJGkXKgeKFCwo4RCRiluJhh1vlMIspGuJWNh/vlBw/OdXtDvBr4DWadWoSi2fIcu0AATlzPet0th2WfgRSdzJqz3zYmcmJ0uUzzxgDnZJgZAzxYH2EwJHoFVQVlFD X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10230 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_095039_192816_BB2E2A1A X-CRM114-Status: GOOD ( 12.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch adds support for the Mule I2C multiplexer. Mule is an mcu that emulates a set of i2c devices which are reacheable through an i2c-mux. The emulated devices share a single i2c address with the mux itself where the requested register is what determines which logic is executed (mux or device). Signed-off-by: Farouk Bouabid --- .../devicetree/bindings/i2c/i2c-mux-mule.yaml | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-mule.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-mule.yaml new file mode 100644 index 000000000000..458e4661cbc8 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-mule.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/i2c-mux-mule.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 reacheable + through an i2c-mux. + + The emulated devices share a single i2c address with the mux itself where + the requested register is what determines which logic is executed (mux or + device) + + +--------------------------------------------------+ + | 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>; + }; + }; + }; + }; +...