From patchwork Tue Jun 18 16:06:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Farouk Bouabid X-Patchwork-Id: 13702577 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 2A7E2C27C4F for ; Tue, 18 Jun 2024 16:10:50 +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:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=4/I6UmZ7MMnch9vdh4xogitlP9SJ3YKJ1XXcUurWtnc=; b=oysqq2Lvv/U7mN RMVuBxH18xFlFl1yDK2IvoGnLlKb6wCK4/bINbdHi/NN6/+CwJa5ZdHGV1DJrA+HjjE0Jb30KOsTK bGCc9ADhH+OyGFPZ5szGJTeAD+vuTZ1eJ3M/sGwm3DDSYkXYHv1UvchFIwXVdBrakEwFS+xoNCWQp zkso6avOH3V6rmkq2E6cHKe5T6tBcv77QLX0N32zs8tVQImcyPaVY0JPvSPoYSk4j3MosHY7kym8s i3iS8cnjKW7GIaXTdTlVAynh8+z+Cc9eFEWNxBzLXQ10beupJSc0b/PgFwL/GBY3YzlqRIJljHCuD delfqQs+vIVv5ND7niZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJbPx-0000000Flr4-3klC; Tue, 18 Jun 2024 16:10:45 +0000 Received: from mail-am6eur05on2072c.outbound.protection.outlook.com ([2a01:111:f403:2612::72c] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJbPI-0000000FlMt-1qpC; Tue, 18 Jun 2024 16:10:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TTF9xbI4lG6ju0FLt5J/998/mbHfcIPfTrWZ8UOhjAZSEDUYjGJRkfihle5h/U3LTI3QqpjYCrFkbW9h9pT1WFiCR6xBl5ZrOAsedJgLiq/EpelEkBLMFRPhIALN0++wPxEStGBlxNqQiI6tfGuKAXtPFpFFSnyfqe0r7DAVgaWTNYs0VkjMu+6uMuvZKF1oQIziCp+u+VOrmYrfQv+NVT3hYQLaKw4YZI6faYkMHbJlP3J2escpXZdZm1ZOG+fXJjzT/FKgSZah3CbNZn5M2/AKL2QQGovIdFUfAhRxcnazYbEiHgxx62B0F7KJyAGQ8gtOR7sk/qo0vr/I8DvV0w== 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=ZOxjhnjd9IQFHs5QVJqoYF+91lKnB8XW10+UFDR+9Lw=; b=XJ0oLUajp8wvZ6k9NlbSqc+BKTaLOMpYSq1PooJ+yFOO8tXB4sQWmB5p6gQJfi0NpAmWtU5zuHNk5sVUXQm3W2ohwSTD1MPyU+BYCIqxMUUL0WoxCwoLyQOl1oMTQRTCrX8fLoCnxny1uvNP0G66ngsSgI3TCAUqpGSM8qemYcXyq6s69N+uPjpSnk27EJPBt+JGK76eaUqFalkCOMaDk21+Yt9y4kleyMUCHu8cf6hLmBKLxrXtCy9xcjF3cB3JcRD/hHnppzoww1eYSgh0+3JsGqTisar2j2C4j8rnugelR6eKEgjRAUtenqgYKSDIOZehLj86pUliZ5/WjMtWqg== 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=ZOxjhnjd9IQFHs5QVJqoYF+91lKnB8XW10+UFDR+9Lw=; b=iQELp6lSKUO8CogVdFf++m89PpoiZ+ueoIriCzrA+DWIkWQaoBQewp2hEnk5pcVxBONSGonsjgOlv51dfreIDD1Xk+bcQGZKkwciLoWB1LI8cGDSPreNffecgd2HGD45UggpF9J0X4FNLX6/IVopkasqpWzMfZ91UAHXMN9qcDE= 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:48 +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:48 +0000 From: Farouk Bouabid Subject: [PATCH v4 0/9] Add Mule MFD support Date: Tue, 18 Jun 2024 18:06:42 +0200 Message-Id: <20240618-dev-mule-i2c-mux-v4-0-5462d28354c8@cherry.de> X-B4-Tracking: v=1; b=H4sIAJKwcWYC/23OwQrCMAwG4FeRnq2kWVc3T76HeKht6grOSjuLQ /budiooKLnkD+RL7ixR9JTYZnFnkbJPPpxLkMsFM50+H4l7WzJDQAmluKXM++upzNGU5sZbAZW xBGtAwcraJZLztye525fc+TSEOD4vZDFP3xiqXywLDhxkrWWDTjl32A4dhUMMveZpTAP1aWVCz 2Y44wer4R+GBdOtMG0tnartems6inFcWXoB1QdQQvwBqvmbxqLS2BCA+AamaXoAIoMSxD4BAAA = 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: c4d7da4f-0ff6-4909-66d1-08dc8fb11367 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?+0wvHZ03gG+hrBL3Z9AjFVKgwGyypK2?= =?utf-8?q?ZOjDypWLUk6odnrqIpT4SnEKYUA3X8X4eL5uN/rh0BC4lvPaswUAaqKLaSwPYYYe4?= =?utf-8?q?JAXt7RwKnbaff63rVkb3pHQUTc9ktFopePaXcpNRKfUpNTU57U9vZbIiEJI/y3dox?= =?utf-8?q?7HxMO/ctSBYP4kLWoqXqSJbdQuZpeqN0NAw5v/VFaJVpelIETrSCIUBJfCSaQOlNh?= =?utf-8?q?4/vnfJR5m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B3o+GRVQqKdjomJMIKqlrwcpFxvxHfwa1tyW5kfASDPv/dZb?= =?utf-8?q?YvAVIB6i3eaDhaTCoav89oxhQZdLrP1pEQD0GGbK5jvRTmHNTc/UjFo82Kqxbys/j?= =?utf-8?q?3DkaLb1YbzTIpeNkmAj0Ony0k7z/0fvOd8REjrkox/SJhWR2Zf/oBZtYCs9IOKCIh?= =?utf-8?q?sbTvVtfjOo80JLUx8K3KlUTQXvabL/nkp/g=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?xDacnazZMcS5Cb684LOtSoJ6NX00?= =?utf-8?q?dSVIFHhn7ZsxdG291MVl2GxOeTBmbjY790x2znlUg5IHBHz5boEoyIJrmsIs8lBCE?= =?utf-8?q?d/GTPZv54jzOEBViiCkJ1Hb0jMX+xP6BdNNgtw5PudKfkf6et6XmSkhGT0f66UaN4?= =?utf-8?q?RXaZmKyrJJPjPalqq/M964/KlWOqRX7n6BOJ8sD/PEBftpZ3k0QNbEb1vFZ7yj+SN?= =?utf-8?q?+qsMZ1cb6Pb3XIhCMig3e6xfPFuVpCII8ZgCNBLsss+yE3dC1FEOn54kVDAAmxU98?= =?utf-8?q?ib3P5pydhQ3M103TtdBhbE/qWBnZS4L6P0smBmOE309CtsPyldeJJp+G7xGpWC57p?= =?utf-8?q?Za/yaWt2QYRLpfhRTHGcvZhMvpNepRZjBUB1fAJa74JbPBd8bck1htcDQuZzRZgFO?= =?utf-8?q?I1MxbOxTwjBG1Jvu3QIKKSPc8mNIKEKhmTmVT4yvQ4loQlAGhAuGBi0l3Ujz4uyHe?= =?utf-8?q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PvHbf3VqHSvS0bERzkuVMxETgCH3EzXbP2aVWxS51UPI7nR4XW?= =?utf-8?q?qbY5aPKmqLJnkUJrfVWp6vnT7ACGqudA4+jn7lqhlLsQuWTTGO3HqAsAWFnqvilBQ?= =?utf-8?q?Oncu2seSPGQYP2Vy6zHR8KQJpfRg96kaBF3h+WweXTYucoTnyeVbBKxI8cYrrGR4M?= =?utf-8?q?Ra3oiasSUPjVXNQsOXD7JYX2KnDeAc1i/A=3D=3D?= X-OriginatorOrg: cherry.de X-MS-Exchange-CrossTenant-Network-Message-Id: c4d7da4f-0ff6-4909-66d1-08dc8fb11367 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:47.9025 (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: lOvqBJokGjc02lRiy4RNo1d2+4bCokO6p2Wm+dSncNHFz4JGs5kBdE1OGaplJgDW8xAVu4EcbCt5QiYN8fvYvNm19UjfyELcniHGrkNM8BI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10642 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240618_091004_686629_13F1E7E3 X-CRM114-Status: GOOD ( 14.50 ) 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 Mule is an MCU that emulates a set of I2C devices which are reachable through an I2C-mux. The mux and amc6821 combined make the Mule multi-function device (@0x18) The devices on the mux can be selected by writing the appropriate device number to an I2C config register (0xff) that is not used by amc6821 logic. The selected device on the mux can be accessed for reading and writing at I2C address 0x6f. +--------+----------------+------------------------------+ | Mule (MFD) | 0x18 | +----------------+ | --------+----->| amc6821 | | | | +----------------+ | | +----->| Mux config reg |-----+ | | +----------------+ | | | V__ +---------+ | | | \-------->| isl1208 | | | | | +---------+ | 0x6f | | M |-------->| dev #1 | | ------------------------------------>| U | +---------+ | | | X |-------->| dev #2 | | | | | +---------+ | | | /-------->| dev #3 | | | |__/ +---------+ | +--------------------------------------------------------+ This patch-series adds support for the Mule MFD and I2C multiplexer as part of rk3399-puma, px30-ringneck, rk3588-tiger and rk3588-jaguar boards. Signed-off-by: Farouk Bouabid Changes in v4: - Drop the previously added i2c adapter quirks - Add platform driver probe to amc6821. - Change mule-i2c-mux driver to a platform driver - Add dev_probe_err in mule-i2c-mux driver - Add support for tsd,mule in simple-mfd-i2c - Add tsd,mule mfd to supported dts - Link to v3: https://lore.kernel.org/r/20240611-dev-mule-i2c-mux-v3-0-08d26a28e001@cherry.de Changes in v3: - Change "i2c" in comments/commit-logs to "I2C" - Fix long line-length - Warn when "share_addr_with_children" is set and the Mux is not an I2C device - Fix/stop propagating "I2C_AQ_SKIP_ADDR_CHECK" flag if "share_addr_with_children" is not set. - Fix "old_fw" variable is used to indicate the reversed meaning. - Link to v2: https://lore.kernel.org/r/20240506-dev-mule-i2c-mux-v2-0-a91c954f65d7@cherry.de Changes in v2: - Add i2c-adapter quirks to skip checking for conflict between the mux core and a child device address. - Rename dt-binding to "tsd,mule-i2c-mux.yaml" - Add Mule description to kconfig - Fix indentation - Move device table after probe - Link to v1: https://lore.kernel.org/r/20240426-dev-mule-i2c-mux-v1-0-045a482f6ffb@theobroma-systems.com --- Farouk Bouabid (9): hwmon: (amc6821) add platform driver probe hwmon: (amc6821) dev_err using amc6821 device struct dt-bindings: mfd: add support for mule i2c: muxes: add support for mule i2c multiplexer mfd: simple-mfd-i2c: Add support for tsd,mule arm64: dts: rockchip: add mule mfd (0x18) on rk3588-jaguar arm64: dts: rockchip: add mule mfd (0x18) on rk3399-puma arm64: dts: rockchip: add mule mfd (0x18) on rk3588-tiger arm64: dts: rockchip: add mule mfd (0x18) on px30-ringneck .../devicetree/bindings/i2c/tsd,mule-i2c-mux.yaml | 48 +++++++ .../devicetree/bindings/mfd/tsd,mule.yaml | 82 +++++++++++ arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi | 33 ++++- arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 33 ++++- arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts | 34 ++++- arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi | 32 ++++- drivers/hwmon/amc6821.c | 88 +++++++----- drivers/i2c/muxes/Kconfig | 17 +++ drivers/i2c/muxes/Makefile | 1 + drivers/i2c/muxes/i2c-mux-mule.c | 151 +++++++++++++++++++++ drivers/mfd/simple-mfd-i2c.c | 1 + 11 files changed, 461 insertions(+), 59 deletions(-) --- base-commit: 915c5c8d4bc3c72020b9526cb3cbbd8e14318fc4 change-id: 20240404-dev-mule-i2c-mux-9103cde07021 Best regards,