From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 29F7FC433F5 for ; Sat, 19 Feb 2022 23:09:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5C51483C68; Sun, 20 Feb 2022 00:09:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AtveZW/G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6DB7183C5B; Sun, 20 Feb 2022 00:09:16 +0100 (CET) Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E15F983C6D for ; Sun, 20 Feb 2022 00:09:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=aford173@gmail.com Received: by mail-io1-xd29.google.com with SMTP id s1so11836655iob.9 for ; Sat, 19 Feb 2022 15:09:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tnTRwI7fKOK9mRN1Ft+hpJyW7RrpStTV7xF7IX963Vc=; b=AtveZW/GTtfgRODsbmbB+4yKX3y2Jm2257zS1ArY2q40W90JbVE8XE5WAPJWOVkp5n 3w1yIaZpgywMUWx2DMZuIPrD987c1Gkw/VZs9az8B3KCGeDeya1BJBB22BOw/M3/jkAq KFpp0AD2J76HwukYVwP4SBuNMXGSWVWDWojLrTs+maZNezR6zC0S9Kfa3pyvWNkyMtEG 1q3KiLNkA3bt+cT47PRpMtXTuSSSkGbwvQL0JBvIGOAbj8Pw8mf3S49UZ0hlSogRvgrx cm51GtlCCG4r0ncRXvFpT00v5X8+UyODksTz5HP4Y/wPhAMrIAgPsoFKyN2LWUw3o960 hA9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tnTRwI7fKOK9mRN1Ft+hpJyW7RrpStTV7xF7IX963Vc=; b=IvGuGr2nCLIx9LQ9t/yAB2tMbWFuiH1AGQTNQA2QeyA76hF5/3X98ZbScwQqYGYx6C xuNpmxZ+o3CNI/D3tXLhhiKGQ5mjjmDy+MoJEXNnlHp1ICKCf4lBfCnYPtH0/EefkmBt agiXaaGxnlJrmhhFqqKR2NKd3mrBRwLLVeqTmePgGafyoTv0CQ46HgbTF0D3xFC0EJkf HPnVgrfocQEXcj9i8vtQcb8teIdzmeD6OuwQ/4SRthwL6bnRS6IldkDtYdj7YLcOs0TR iLvmRKv5SHfMFyllDtZ+mQDROCvDDKwNVSIEodXkOHNktzuobu5FSGPyvyZZLlMkbyYj eNdQ== X-Gm-Message-State: AOAM533zQEVLk32r3is5H1GeJI1wWisvee7pqzvyCQ9MG7UgNRhNWDgg hmiktCID9839cPinxM/6V5TmZdqbgVgc9A== X-Google-Smtp-Source: ABdhPJyniCSRaAnnBUk0Qf1loEuf07DPoJrAYc1XIy7ZsFnjFzvsMLKSkX0VVuHRHtkvFI0xCDKHyQ== X-Received: by 2002:a05:6638:1453:b0:30e:221e:d497 with SMTP id l19-20020a056638145300b0030e221ed497mr10217773jad.115.1645312144206; Sat, 19 Feb 2022 15:09:04 -0800 (PST) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:4655:df85:f9da:7170]) by smtp.gmail.com with ESMTPSA id u12sm5642173ilg.51.2022.02.19.15.09.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Feb 2022 15:09:03 -0800 (PST) From: Adam Ford To: u-boot@lists.denx.de Cc: marex@denx.de, trini@konsulko.com, woods.technical@gmail.com, Adam Ford Subject: [PATCH 3/7] phy: nop-phy: Fix enabling reset Date: Sat, 19 Feb 2022 17:08:43 -0600 Message-Id: <20220219230847.798484-4-aford173@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220219230847.798484-1-aford173@gmail.com> References: <20220219230847.798484-1-aford173@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean The reset function should place the phy into reset, while the init function should take the phy out of reset. Currently the reset function takes it out of reset, and the init calls the reset. Signed-off-by: Adam Ford --- drivers/phy/nop-phy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/phy/nop-phy.c b/drivers/phy/nop-phy.c index b08eedd4d4..e2ee6e9206 100644 --- a/drivers/phy/nop-phy.c +++ b/drivers/phy/nop-phy.c @@ -28,7 +28,7 @@ static int nop_phy_reset(struct phy *phy) if (!dm_gpio_is_valid(&priv->reset_gpio)) return 0; - return dm_gpio_set_value(&priv->reset_gpio, false); + return dm_gpio_set_value(&priv->reset_gpio, true); } #endif @@ -44,7 +44,8 @@ static int nop_phy_init(struct phy *phy) } #if CONFIG_IS_ENABLED(DM_GPIO) - ret = nop_phy_reset(phy); + /* Take phy out of reset */ + ret = dm_gpio_set_value(&priv->reset_gpio, false); if (ret) { if (CONFIG_IS_ENABLED(CLK)) clk_disable_bulk(&priv->bulk); -- 2.32.0