From patchwork Tue Jun 18 16:06:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 13702654 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 D8206C2BA18 for ; Tue, 18 Jun 2024 16:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: 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=BgH9ucL89hK0jwnd7puxUDWH+xKljqh6MCOxoZfCfFs=; b=by75TLBDdrys70jDJ5HTofp6l8 Vv6rT7eAWTC667ANTsCc2ZiookPlobClPCWwv1FIfy46OLo6e/oGdzxfecZdpRoTDDnrgDh94ZxDx N19Rtxero9LZdmNVTVCV0YUqNAvPkfAztVPczGLu5QeU/wYkw7UbEaGyzwfe2Daif6VPIcAy+7ddm AvjGymQsBuM53nZuyy7rqjnoeWrlHB0/V2+hmPrrKIPkc8eL7/+s1QbjMW7gBu/PgrmI/hZWsDd9D t0OWVS/8I344KFDsibuc12OsilbBLhAhjKwp1pFRacTTYXUuSLK90xAguPXY5i3lHTDv7582EiZLv 2LxkF7gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJbPi-0000000Flhr-1KEJ; Tue, 18 Jun 2024 16:10:30 +0000 Received: from mail-am6eur05on20719.outbound.protection.outlook.com ([2a01:111:f403:2612::719] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJbPG-0000000FlMl-24Hs; Tue, 18 Jun 2024 16:10:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PAgSjy/JdurOGKsmHM8s0VjGRfJqaA1rKyAIauMDQarLSsETiZdMfC7wZpqj9vDlHAPD3udDk6wKfVwKbZkWkPdsKlzButL6tFVt5jrZ3pamg41VfbfMWOc2hs6O/3y75mU6ldBS84yJo04h5UmiILnlcnWFNMGQb46296lLN7aL+tLyBEF1YwqGAPTrwIYa99KeJhHUe9TEoqtD11G8b9U84t/vylZp83SGC39MDH884fy024p3pTluIoBOE70q6ei+RBrWgNW8ng1dvWOl4Ql/X+Vktgt1RbXK0+Kna+dD812UhRJutO+tk4MngE5UOvr0GEK33n9oZwabXzwuyg== 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=BgH9ucL89hK0jwnd7puxUDWH+xKljqh6MCOxoZfCfFs=; b=XQ09VBGqT+fGtVgvLOlQXB907s3U8fBVQM8ptuqhRMtaMyINarpxpT7yA2V+4dozjyyQekxpa0nFMMFR+hl9DQwVB5Rik7ZA5SEdrmQVJaouKMgO1i/zGE161DHPQmarOB83wleJBHJom8dSv2mL7k9IGMnvxkBJJzF7J4oJsFs457tiHhW/Ls/AtfjGMQtOnR1hzyINjETuKqcnDrx25qLOMHRhyzBp0U0Fhi6GwPjzvYqvW/0ihCMYUi2v8Kxq6wT8RSLRxBNK4DU3Fk8tIChtdrVDyMNPVS29SkMrnNvmQHrluRpf07Yp8+7Zw5e14EsBcvI1zGb662wsq+14Jw== 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=BgH9ucL89hK0jwnd7puxUDWH+xKljqh6MCOxoZfCfFs=; b=fYDLuztcqV+wOCT1Sq2xF/JbeIjRK5m6t0tE19nes8cAmMdxT4D97df/pyG7WqscNdqNHO5ztP1GhEOyrLOjt2rrppvOsLNggZUdNa+aOdD3iEKq8RDoN6dbAocu1tTPbOw6IL2+SpIUlnZprmd1gOiPBMmN4wYlbkO9WXCxyRU= 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 VI2PR04MB10642.eurprd04.prod.outlook.com (2603:10a6:800:27f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Tue, 18 Jun 2024 16:09:49 +0000 Received: from VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::2a24:328:711:5cd6]) by VE1PR04MB6382.eurprd04.prod.outlook.com ([fe80::2a24:328:711:5cd6%5]) with mapi id 15.20.7677.030; Tue, 18 Jun 2024 16:09:49 +0000 From: Farouk Bouabid Date: Tue, 18 Jun 2024 18:06:45 +0200 Subject: [PATCH v4 3/9] dt-bindings: mfd: add support for mule Message-Id: <20240618-dev-mule-i2c-mux-v4-3-5462d28354c8@cherry.de> References: <20240618-dev-mule-i2c-mux-v4-0-5462d28354c8@cherry.de> In-Reply-To: <20240618-dev-mule-i2c-mux-v4-0-5462d28354c8@cherry.de> To: Jean Delvare , Guenter Roeck , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Farouk Bouabid , Quentin Schulz , Peter Rosin , Heiko Stuebner Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.14.0 X-ClientProxiedBy: VI1PR07CA0286.eurprd07.prod.outlook.com (2603:10a6:800:130::14) To VE1PR04MB6382.eurprd04.prod.outlook.com (2603:10a6:803:122::31) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6382:EE_|VI2PR04MB10642:EE_ X-MS-Office365-Filtering-Correlation-Id: 66c30662-a547-45e6-88f1-08dc8fb113f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|52116011|7416011|376011|366013|1800799021|38350700011|921017; X-Microsoft-Antispam-Message-Info: =?utf-8?q?74WTgJPwYY+ONb6FCKRik7r/hO17MH0?= =?utf-8?q?5mz80cYz2RZ+rgKRXnNQTY+E0dN8I3hKZUcKd0B5/ju6MVD8bWWJWXQnF3A84vdfk?= =?utf-8?q?JvEpvEdngT1pHVbFbBXJnAKqEFZtSM7c76jw2/MwaXZieXFQSTbdvckn9xmAyi3KV?= =?utf-8?q?kvgV+BfbwIgAjFK0lqH9k5ZdPt4lZyJUivyQnAHs6hi9NkWoYFhvf7JBIW3fPEUVi?= =?utf-8?q?skCGHffVYpoWf8os4g+tMByz/Rzi9BorcNkedt0rYEwTDQMGaoYbS8jslSD8QO+AM?= =?utf-8?q?xmziRNg3Jhfmp4rCR8wD1MsKk0bwn2pQYT2fIXeWQfRjV5/MDV18RvwR65qrWZ+sF?= =?utf-8?q?BHoRHeAUbJI+dqqsRyMMq2ieX2JVyYn5ZjvxPCZChyiJaF6tXl5l7PenU+CuK12v1?= =?utf-8?q?Olo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9iM8qWt9I7A=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:(13230037)(52116011)(7416011)(376011)(366013)(1800799021)(38350700011)(921017);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?t5H3qJspvLHxF1LhsTittkWwE/6Q?= =?utf-8?q?ke9dXZowHQVAnWYpZbS0srMzUqDherXFvAM1e3NsyvbAcfpoQDMslsmFiBuwLM/km?= =?utf-8?q?F9v2EWjSchsIzz9SqaF08zdXVBNg2UmRQnstk+0XZDnUfTeukxeyxjkWIj0Rc6Agm?= =?utf-8?q?dvYZPlzZSz4dcARL4ZveGtZE2wgpF3ExkER3e2OwZHftqFT2RMsI1rIobOJp9rtwY?= =?utf-8?q?6djGVgYBH6jZKDMmufN5rSpa3SCMS7TsmA632M8mjUBH9SwSHmTzi2/eiUkC73Ux2?= =?utf-8?q?r28Npad8RTdndl9ayBfaOQH+annLPnRjgsGmRLjtnnpm3zae7QlJtx8fYRU29+hWp?= =?utf-8?q?4k/ZlQ3o1gTfbLCKyuZS7rPZc+M7WLKGNMA2FCIp91UAyYpq9v2KPtD39ub42Jq0n?= =?utf-8?q?PRX24O0TUK6qBnp3xN7DH09n9XRp8woSS82KDWIrvsSBpb1GNPiELa5VBnrupEh4x?= =?utf-8?q?K6pOhGFTrMallyxwyQQ8lAAeYfRIT8qfQwHGbgViHqrokvcuecSqrRz6NJJxLy7FM?= =?utf-8?q?hb0sF7T1ID/ljRjtOPhALGqdQPld7nMUIKT97I0nmQa4VBmp/Kx8wosWyuF1+7UxA?= =?utf-8?q?jCdzooqpXu6LWECm7JD0EJnZ+yT74zaSM0HmOI9P3sl/LXYUcvxE4zOWJbeBzMOeh?= =?utf-8?q?suxSTT9Bez7Is6KfQ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+OcwoZNn14g4qSv7FRg3qw=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: 66c30662-a547-45e6-88f1-08dc8fb113f9 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6382.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2024 16:09:49.0910 (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: B4JPImVgy8Nv1t3O6QNSPbND8tlcVw1BLlPE3z7FEurOBxEDXniu3JyuVQgJfa6nhLO1FsWiyTQaTTgrE5q1WlSz2M9BeuTbsiITrnaYUrA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10642 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240618_091002_701311_81251C2E X-CRM114-Status: GOOD ( 14.05 ) 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 Mule is an MCU that emulates a set of I2C devices, among which an amc6821 device and an I2C mux that exposes more emulated devices. These two devices share the same I2C address. Only the I2C mux uses register (0xff) as a config register. Add dt-binding support for the Mule I2C multi-function device. Signed-off-by: Farouk Bouabid --- .../devicetree/bindings/i2c/tsd,mule-i2c-mux.yaml | 48 +++++++++++++ .../devicetree/bindings/mfd/tsd,mule.yaml | 82 ++++++++++++++++++++++ 2 files changed, 130 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..ac9dfc936272 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/tsd,mule-i2c-mux.yaml @@ -0,0 +1,48 @@ +# 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: | + This module is part of the Mule I2C multi-function device. For more + details see ../mfd/tsd,mule.yaml. + + Mule I2C-mux configures the active device that can be accessed on address + 0x6f through the 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 diff --git a/Documentation/devicetree/bindings/mfd/tsd,mule.yaml b/Documentation/devicetree/bindings/mfd/tsd,mule.yaml new file mode 100644 index 000000000000..ab532340a17c --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/tsd,mule.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/tsd,mule.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mule I2C multi function device + +maintainers: + - Farouk Bouabid + - Quentin Schulz + +description: + Mule is an MCU that emulates a set of I2C devices, among which an amc6821 + device and an I2C mux that exposes more emulated devices. These two devices + share the same I2C address. Only the I2C mux uses register (0xff) as a config + register. + +properties: + compatible: + const: tsd,mule + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^fan(@[0-9a-f]+)?$": + $ref: /schemas/trivial-devices.yaml + + "^i2c-mux(@[0-9a-f]+)?$": + $ref: /schemas/i2c/tsd,mule-i2c-mux.yaml + +required: + - "#address-cells" + - "#size-cells" + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + mule@18 { + compatible = "tsd,mule"; + reg = <0x18>; + #address-cells = <1>; + #size-cells = <0>; + + fan@18 { + compatible = "ti,amc6821"; + reg = <0x18>; + }; + + 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>; + }; + }; + }; + }; + }; +...