From patchwork Tue Apr 16 13:29:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Richard X-Patchwork-Id: 789536 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D79BF130E46; Tue, 16 Apr 2024 13:30:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713274230; cv=none; b=AbPOu+ghU2mGrWe8xNQMbDnn7f15bCpzlRv9I3UvXnDgL6+SmksoKzl2H/ScNHH6eIl24dYH65HA88G3hhc33jo4tAWaYjypN+sZDgc9TxBrwGdz7V4dtRSAR/bcHcpLsjXVxunxaZUJvA50CsFilCDQqpLAx1fHGyZ+l4+2HmQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713274230; c=relaxed/simple; bh=aNY1BCk37hgomQWTjUsQ5l9jnB52GHjycJLv3+RRDtA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QRZejzaymNJ6FHxdQX3u8Ce8zm6vTKCe1SMClT2SbkcIg8N5zQKTguniYTRgUKQjKG4AmqHJqr53orpPhwLfjNiLR2bQar47qWMV/XkOolZyNXhbmZFnlAl2IHreF/RZLs8fptaUD7PfiereXz1RLyk6C7/ahW/VFZHvedH3LLQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=UVoXazS6; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="UVoXazS6" Received: by mail.gandi.net (Postfix) with ESMTPSA id 89DAA40007; Tue, 16 Apr 2024 13:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713274226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SOtYByFbOq/kD+SHjuSXQZVzJTtVnLBLPoL8nOih1ao=; b=UVoXazS64pUJ2dqd9Efwu8fZrPjLcY9GpSxAvev1gs9Hgos2iof1LFsA+ZhzfJE+UXyn0/ +1Jvy5CC2vbg9ToO/ekDRTZVWDnrxnGFoWvtvLmfvnSkhJKkK8THhbvPswiWmF3XMfOag/ MiMp9dhJb4gw0HVPYxA5f3b1Lu2rv2a39PVKsBcURzPKiOZp9MtAv+z5jZGOBZVJoH+vu0 KoQxtte/MO2O/yqxhATTXLX3lVzuO4JBePHkrzgK9Ve7GQvB+8NXW/J5nL8cg3Pr/wgBiP tv8c+DseqNoXJmmMgeL06ksnSoRz0uK2zrpb+ecLqstSeZUurC0zxbOW4/nRhg== From: Thomas Richard Date: Tue, 16 Apr 2024 15:29:58 +0200 Subject: [PATCH v5 09/11] PCI: Add T_PERST_CLK_US macro Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240102-j7200-pcie-s2r-v5-9-4b8c46711ded@bootlin.com> References: <20240102-j7200-pcie-s2r-v5-0-4b8c46711ded@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v5-0-4b8c46711ded@bootlin.com> To: Linus Walleij , Bartosz Golaszewski , Tony Lindgren , Aaro Koskinen , Janusz Krzysztofik , Vignesh R , Andi Shyti , Peter Rosin , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Rob Herring , Bjorn Helgaas , Siddharth Vadapalli Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com, Thomas Richard X-Mailer: b4 0.12.0 X-GND-Sasl: thomas.richard@bootlin.com "Power Sequencing and Reset Signal Timings" table (section 2.9.2) in PCI EXPRESS CARD ELECTROMECHANICAL SPECIFICATION, REV. 5.1 indicates PERST# should be deasserted after minimum of 100us once REFCLK is stable (symbol T_PERST-CLK). Add a macro so that PCIe controller drivers can use it. Signed-off-by: Thomas Richard --- drivers/pci/pci.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 17fed1846847..c47b1d3b5887 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -16,6 +16,9 @@ /* Power stable to PERST# inactive from PCIe card Electromechanical Spec */ #define PCIE_T_PVPERL_MS 100 +/* REFCLK stable before PERST# inactive from PCIe card Electromechanical Spec */ +#define PCIE_T_PERST_CLK_US 100 + /* * PCIe r6.0, sec 5.3.3.2.1 * Recommends 1ms to 10ms timeout to check L2 ready.