Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3704699imu; Mon, 28 Jan 2019 09:19:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN7OFkWQ4Upt04149dYE2qfIIYwAbY8B7/OKZiBx2C9Dxm1dXwGeR9v0SoBkavviqCSlph4x X-Received: by 2002:a63:1204:: with SMTP id h4mr20590418pgl.51.1548695991633; Mon, 28 Jan 2019 09:19:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548695991; cv=none; d=google.com; s=arc-20160816; b=n/5k8PNPYmkjxEAe4Dz90yi904xKsviNUiXrhSgwFhsz71yDHOHzbLt83F+qG6zTPT B3/EHUSEzJbhArGTBluZIP99ngd5YjR+kk3VZQ33G1oG/oJ5ZrnrSdkOm0qB1Kj4kw34 CNj6UElPjmSx/4oA9SJLWyDP+sSkIFarxMdeyYXBtvuhz4hMgB3vGotLSYrXLCsud8OX QtMw1y5zw7yxKYbkTYbwgdi3aS3wNuh5mNk+j6XXo74vC33iC9BoR88lUp839aYR3/Nn hZklVYV2Z7FiqURRReIw5pYOdtNTO+WKRF1bWospgXxTKKO7MpJIYMuUeBnukdoZ8/78 ZB7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3x0sDZUqmSWtpHQ68VMZThPCbJUG28oft+swDiPNPdQ=; b=huDkbJolbiGujyTUJd9YqC4FXXqlHlsQlZ94gQ2LorwwR2AZDBzjiGODiXXgs4KKug 0/94VW84v9dB+pJKIqY+oa2jQbgrvzloGxo3gR13/+1RGyBv/3OqSLXvUOblTmsqILm7 pOt5iwvG8hbsoXZS5mwwnozFJz+WfISggbVV+kPoc1XZLe0eo3UJ+ELd8ijIVSLBOALA hdu8a8qGCB0bWxHh5YQlve1kmKyuRJi6Xuw5emexeJ3uXPJIM2kXKTyw5YmZZX/iD+fE F+jUQaWOhaERhDwVAtCjL7TSfOMVjl82vGkwydIEZhGultZ/i+WVtTdY5yetitgM69oU O5bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XVHts6dZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 38si14871203pgx.460.2019.01.28.09.19.35; Mon, 28 Jan 2019 09:19:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XVHts6dZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731758AbfA1QFH (ORCPT + 99 others); Mon, 28 Jan 2019 11:05:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:51234 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731083AbfA1QFD (ORCPT ); Mon, 28 Jan 2019 11:05:03 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6128920989; Mon, 28 Jan 2019 16:05:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691502; bh=+ESr3YzHU75iNoAECia5QDRpd+aO21K7llA4fSG/Tmc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XVHts6dZL5y0WECENVZBzDbPdDUJPThnYjFP49gUsg4zSOvNBnINdTUd8SwCxeQSF YRFVj793K+HQMFyD5AUDDRp+4U2PU0syiMW/ObUA4GNMZsfFjC9I2fNKFRSFHEDGX6 OMb8y+Q3Aw13dMm8oY24JiQPBRIKtT/F8MygqPBY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Russell King - ARM Linux , Russell King , Tony Lindgren , Sasha Levin , linux-omap@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 119/258] ARM: dts: Fix OMAP4430 SDP Ethernet startup Date: Mon, 28 Jan 2019 10:57:05 -0500 Message-Id: <20190128155924.51521-119-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Russell King - ARM Linux [ Upstream commit 84fb6c7feb1494ebb7d1ec8b95cfb7ada0264465 ] It was noticed that unbinding and rebinding the KSZ8851 ethernet resulted in the driver reporting "failed to read device ID" at probe. Probing the reset line with a 'scope while repeatedly attempting to bind the driver in a shell loop revealed that the KSZ8851 RSTN pin is constantly held at zero, meaning the device is held in reset, and does not respond on the SPI bus. Experimentation with the startup delay on the regulator set to 50ms shows that the reset is positively released after 20ms. Schematics for this board are not available, and the traces are buried in the inner layers of the board which makes tracing where the RSTN pin extremely difficult. We can only guess that the RSTN pin is wired to a reset generator chip driven off the ethernet supply, which fits the observed behaviour. Include this delay in the regulator startup delay - effectively treating the reset as a "supply stable" indicator. This can not be modelled as a delay in the KSZ8851 driver since the reset generation is board specific - if the RSTN pin had been wired to a GPIO, reset could be released earlier via the already provided support in the KSZ8851 driver. This also got confirmed by Peter Ujfalusi based on Blaze schematics that should be very close to SDP4430: TPS22902YFPR is used as the regulator switch (gpio48 controlled): Convert arm boot_lock to raw The VOUT is routed to TPS3808G01DBV. (SCH Note: Threshold set at 90%. Vsense: 0.405V). According to the TPS3808 data sheet the RESET delay time when Ct is open (this is the case in the schema): MIN/TYP/MAX: 12/20/28 ms. Signed-off-by: Russell King Reviewed-by: Peter Ujfalusi [tony@atomide.com: updated with notes from schematics from Peter] Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- arch/arm/boot/dts/omap4-sdp.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts index 490726b52216..9dc7ec7655cb 100644 --- a/arch/arm/boot/dts/omap4-sdp.dts +++ b/arch/arm/boot/dts/omap4-sdp.dts @@ -33,6 +33,7 @@ gpio = <&gpio2 16 GPIO_ACTIVE_HIGH>; /* gpio line 48 */ enable-active-high; regulator-boot-on; + startup-delay-us = <25000>; }; vbat: fixedregulator-vbat { -- 2.19.1