From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10DFC606A334 for ; Wed, 2 Dec 2026 18:05:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=LNEzm59E 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:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Unsubscribe-Post:List-Owner; bh=D8cvY5ceUhYQMHnkCGA0CEDSXbdrKzI/E7Eqz5jRIiw=; b=LNEzm59EFdVNCHZI13fr5Yqxo5 6skoKGueNpE04O2Vozyw9VIfxGodap/1fJoV/gOLdfehkXGE06ZU+04t7M58eP1l9WT1MNycsCA7k XJahrONRts6LdovNwDGfo27tjbUcw5ihwkrYUmFgUN0OCek1eJ/tKA+VDI2tiDAPTG4dcxs7nfMbA K0JtK3DFYesSDlvZXUnsA/+avyLUPpw4EIqldbjbBwnfD5Mi6UW6h+fOwxjcjgE3gg8SWlqxwdxXJ sFEfDgT411EPLq3MziJ/TLaUIk5hwWWY2K4zxW5YNy8zEdlavl8cu9VYfwpcx2H5QaUVYTjVUsYgE a189pP6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYohI-0000000CTWf-0gX8; Wed, 02 Dec 2026 18:04:52 +0000 Received: from nbd.name ([46.4.11.11]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYohD-0000000CTU3-0TeB; Wed, 02 Dec 2026 18:04:50 +0000 Received: from [2a04:4540:1404:c8fc:172c:e560:a116:623] (helo=bertha10..) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xYoh0-00BMWx-2M; Wed, 02 Dec 2026 19:04:34 +0100 From: John Crispin To: Stefan Roese , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Philipp Zabel Cc: Christian Marangi , devicetree@vger.kernel.org, lei.dong@airoha.com, Linqi.zhang@airoha.com, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Rajeev.kumar@airoha.com, upstream@airoha.com, Weifeng.xu@airoha.com, zhengping.zhang@airoha.com Subject: [PATCH v5 0/3] i2c: mt7621: add Airoha AN7589 support Date: Wed, 2 Dec 2026 19:04:27 +0100 Message-Id: <20261202180430.3572052-1-john@phrozen.org> X-Mailer: git-send-email 2.34.1 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_100447_162071_973C6DE2 X-CRM114-Status: GOOD ( 12.91 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-11.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 The Airoha AN7589 carries the MT7621 I2C controller with a second control register that holds a 16 bit clock divider. Like the AN7581, it runs without SCL stretching. Patch 1 resets the controller with reset_control_assert() and reset_control_deassert() instead of device_reset(), as the EN7581 and AN7589 reset controller has no .reset operation. Patch 2 adds the compatible, with mediatek,mt7621-i2c as the fallback. Patch 3 adds the AN7589 match data and uses the wider divider for bus rates down to about 3 kHz. The series applies to next-20261201 and has no dependencies. Sorry for the V5, I forgot to rebase prior to sending V4. Changes in v5: - Rebased on next-20261201, which has the AN7581 support of Christian: commit fa3fd2c10a8f ("dt-bindings: i2c: mt7621: Document an7581 compatible") commit 036099c2e588 ("i2c: mt7621: limit SCL_STRETCH only to Mediatek SoC") - Patch 2: the compatible is a oneOf of the existing enum and the AN7589 entry. - Patch 3: use the match data and the SCL stretch flag that came with the AN7581 support, add the flag for the extended divider to it. - Patch 1 is unchanged. - Link to v4: https://lore.kernel.org/r/20261201183145.2953089-1-john@phrozen.org Changes in v4: - Patch 3: read the clock rate after the declarations, fail the probe for a clock rate of 0 and round the AN7589 divider up (Andi). - Patches 1 and 2 are unchanged. - Link to v3: https://lore.kernel.org/r/20261116175343.344425-1-john@phrozen.org Changes in v3: - Patch 1: add the Reviewed-by of Philipp. - Patch 2: add the Acked-by of Conor. - Patch 3: compute the AN7589 divider with constant limits, so a clock rate below 1 MHz cannot wrap it (kernel test robot, sashiko). - Link to v2: https://lore.kernel.org/r/20261112185820.1315718-1-john@phrozen.org Changes in v2: - Add patch 1. It replaces "clk: en7523: add a reset operation" from the clk series, as Philipp suggested. - Patch 2: add mediatek,mt7621-i2c as the fallback compatible (Conor). - Patch 3: the extended divider supports bus rates down to about 3 kHz. Set it up before the controller is enabled. - Link to v1: https://lore.kernel.org/r/20261111093941.691801-1-john@phrozen.org John Crispin (3): i2c: mt7621: assert and deassert the reset line dt-bindings: i2c: mt7621: add Airoha AN7589 i2c: mt7621: add support for Airoha AN7589 .../bindings/i2c/mediatek,mt7621-i2c.yaml | 14 ++++- drivers/i2c/busses/i2c-mt7621.c | 62 ++++++++++++++++--- 2 files changed, 64 insertions(+), 12 deletions(-) base-commit: d138596e9f822033490b2e577ec2ea64f2aa246c -- 2.34.1