Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=68.232.154.123 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796373304; b=uBOBS4FpvVma7D0AEB9Su+7rM8zh51Lfzu0NHLArJhSDhe2mH+5PeGEw5o4PwOoWTVVO NZA6GooISFL+IQzKtR8kTRuWjKe0OqR8Ba9eaSv1i6RdU+WvCppFT5Td8IneQFU7e2c/M RqYh6MMXHegvL7BOaHqVNGTidT9T+xO+Vy7HbiMDdAqGNgmpGZ6MOn83MFIOhDyMHidCY J3ePd3w6B+omUr+qE9Vn4kuYmLbH1kcdJTO2A0XfAm5ytMk+rUTPUznw9P9S2yCcKDE/R hW04HvsRyOF0FjWuB7jernY8gk1NhBsBbljqmOEcxClT3nWRHJfzBtILhbiU5QCkdjw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796373304; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-Amp-Result:Received:Received:Received:From:To:CC: Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:Content-Type; bh=iml5QqfRQBssKV75M0t6Pzw3BEVIfSxCH0N9iJROGxE=; b=orra1ykEa/h7OYY2XqFbjN1+yaJ+g3W4UmidB2SSdVzZSY9Odcd390dxOhwbu4DnuReB LHSGzIEyWS2a1brjHOsLOBS+H8Tg+ziLpAX8MZSmXoUtoP3kwZNyCsCwXNaZooXRpWZC/ c5V2HJvEMzV9DAlllhxbpszh1WUd2kuqSEeEaswHp3V0Y/VdFGyotKYnxdaEiQkUWBtbv tMwTnEtm4upAHklNrfVkCfXP3sByht6BHBL4dRTZ+nvsj26P+prQm1LsTDROe7AOoJKP3 nR+G/uk9ypTeNFpVZJKgXfYOmjx/t77aZIluQILTFtwEQjvDeiJKr2Pz9gICRNXXUnA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=TUTdL3xY; arc=none smtp.remote-ip=68.232.154.123 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 40688606A322 for ; Fri, 4 Dec 2026 08:35:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 40688606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=TUTdL3xY DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1796373304; x=1827909304; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=o2F/QS1pKPcsZ5Vw9CAZ93uhO2iU7Xl8PhdL05DR8HY=; b=TUTdL3xYVO/Wl8PhlndDDx9BZAYBoP8Xw4MW5NP3E2CdUETfsvShBjb9 yIwjTbvGCtqKBWKbV1hbxHB7KnzFnzc6sVC54zXNhMbZT0ThfCkwtdXyF uxDz3MnA2EAPxEIgxGh2ap3QtBEgn48pWr7zhDjYXS1J45MCLI4St7SPT 8b5cx16RO+stVsWMpfgdQM5DawCIJMwn8BT9ZkXxEp9uwhNGF08jBKBUJ c9LTt/vO11kggaic2jlKJZGMGGN5Y6Ara+Q397z+6I34k83dwUYX79RGk sw3aE1Zfh6Cqc+fgbgSj/YluKRI+0YRtkwamFHuaIWTNll6pHlagUiHnp g==; X-CSE-ConnectionGUID: N2b4oZA1QPWfz+R8wmZU6g== X-CSE-MsgGUID: uL/YE770Qqih/3j+k44T/Q== X-IronPort-AV: E=Sophos;i="6.29,78,1794898800"; d="scan'208";a="66461653" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2026 01:35:03 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.87.71) by chn-vm-ex1.mchp-main.com (10.10.87.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.57; Fri, 4 Dec 2026 01:35:02 -0700 Received: from che-ll-i67131.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Fri, 4 Dec 2026 01:34:59 -0700 From: Manikandan Muralidharan To: , , , , , , CC: Subject: [PATCH 0/3] i3c: mipi-i3c-hci: derive SAMA7D65 SCL timings from gclk Date: Fri, 4 Dec 2026 14:04:46 +0530 Message-ID: <20261204083449.933526-1-manikandan.m@microchip.com> X-Mailer: git-send-email 2.43.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain The Microchip SAMA7D65 I3C controller support merged in v7.2 [1] relies on two AMD quirks: HCI_QUIRK_OD_PP_TIMING, which programs fixed OD/PP timing values tuned for the AMD core clock, and HCI_QUIRK_RESP_BUF_THLD, which clears the response buffer threshold once after the PIO init. This series replaces both with Microchip specific handling: - Patch 1 moves the OD/PP timing register offsets to hci.h so that both vendor quirk files can use them. No functional change. - Patch 2 adds hci_quirks_mchp.c, which derives the push-pull, open-drain, SDR1..SDR4 extended low count and bus free timings from the gclk rate and the configured I3C/I2C SCL rates. The gclk is the second clock of the existing binding, taken from the clocks already acquired in probe, so the device tree ABI is unchanged. The timings are programmed in bus_init() and restored whenever the controller is reset. - Patch 3 selects the response buffer threshold in __hci_pio_init(), so that it stays in sync with the cached QUEUE_THLD_CTRL value and is not reverted by IBI threshold updates or a controller reset and restore. Tested on the SAMA7D65 Curiosity board with an LSM6DSV IMU on the I3C bus (SETDASA, private transfers through the IIO driver). With the 125 MHz gclk, the controller runs push-pull at 12.5 MHz and open-drain at 1 MHz, and the bus keeps working after standby and suspend-to-RAM. [1] https://lore.kernel.org/all/20260525092405.1514213-1-manikandan.m@microchip.com/ Manikandan Muralidharan (3): i3c: mipi-i3c-hci: move shared SCL timing register offsets to hci.h i3c: mipi-i3c-hci: add Microchip quirk to derive SCL timings from gclk i3c: mipi-i3c-hci: add Microchip quirk to set response buffer threshold drivers/i3c/master/mipi-i3c-hci/Makefile | 2 +- drivers/i3c/master/mipi-i3c-hci/core.c | 23 +++- drivers/i3c/master/mipi-i3c-hci/hci.h | 9 ++ drivers/i3c/master/mipi-i3c-hci/hci_quirks.c | 3 - .../i3c/master/mipi-i3c-hci/hci_quirks_mchp.c | 124 ++++++++++++++++++ drivers/i3c/master/mipi-i3c-hci/pio.c | 8 +- 6 files changed, 159 insertions(+), 10 deletions(-) create mode 100644 drivers/i3c/master/mipi-i3c-hci/hci_quirks_mchp.c base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 -- 2.43.0