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 43101C001B0 for ; Wed, 9 Aug 2023 19:56:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7E1FD8662F; Wed, 9 Aug 2023 21:56:57 +0200 (CEST) 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="ho7fQ2v1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2FFC8866BD; Wed, 9 Aug 2023 21:56:56 +0200 (CEST) Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (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 1D8258003C for ; Wed, 9 Aug 2023 21:56:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-78666f06691so5439739f.0 for ; Wed, 09 Aug 2023 12:56:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691611013; x=1692215813; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=OXoVW89LekxSLZkYRM6YlvVulo4pUmYSXPdkECe2Wws=; b=ho7fQ2v1j9i9e2AzHcRO5C8LGxkYyjGgsoxZmMaE6fBIXirp1ltwUE4Q8zROLZyfDk 8+AWfnk2IHSiUNNohl9RCQDcd6GpGAEkbs9+TM3Ca540l4rts0Os1Hb80MHtxbT7Reu1 Z5J6nRGJZ1QZr3/+Xj5xyv0kRJqqTWWBh8g/gU5irrxFM0dlVqdKahZYbpUWz8yaMqOv VSLWha0xY5GCpvGy2eocTcY7TPoMjdXWhfqCNzlLWht1itIOrgb11Khj+ovX/SoghMpf 9evSX0oPYKJxAx+pdQ0GrDBQXp5OKvIOSk+sQGeThuXK+kA6eO+Mm3WXM6h/4ZU+n9wn TvoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691611013; x=1692215813; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OXoVW89LekxSLZkYRM6YlvVulo4pUmYSXPdkECe2Wws=; b=ZCEmJk1eTaixZTNThvVo2HkPMqkTCWpJ7mNhsU9GtkFA8C5VfihvkUp43JU1CDLZUq fXhmS9eNbgIA1WaJNiJwRIanmmZbUDXo0AaNq1lQJST6ZEismrO7VcUdIpHYFIlE4fea Kx8GnFPLyLOj1okBFmiXxRgRzpt7hOxvjBxFuClZ31yPvEDHpWz8dfaW6orMecypVijt T4VK11pvxx/XB6LBWnvDxx1m7QWr/1ba/0sl3e0dfntJ6A7TkhkcUwvar4y4VL6PuQBq vhUyLTrc2/GMfWQ9Paq5LoRT6OoZ2KT/nepZHci6zdVl0odsOtmoCxuWfddp/QfwnrlN ZjrA== X-Gm-Message-State: AOJu0YyU6LEBkwsvqfBW7yKFxQZUkUI06f5j5i33hpsQSJXAuImYlNkr sTWHqSH/bFCdDWj/3G6RRu4= X-Google-Smtp-Source: AGHT+IFwJsN+gdkpZ8yU8lACfFFHpN6GVUwjxSqjuHJnSuMzMnoE1kAh4JVyom+G/UD/zmCtpEsJKQ== X-Received: by 2002:a05:6e02:1a25:b0:345:b923:971b with SMTP id g5-20020a056e021a2500b00345b923971bmr137009ile.3.1691611012569; Wed, 09 Aug 2023 12:56:52 -0700 (PDT) Received: from ?IPV6:2001:470:42c4:101:6e71:1f10:2120:d11d? ([2001:470:42c4:101:6e71:1f10:2120:d11d]) by smtp.gmail.com with ESMTPSA id a12-20020a92c70c000000b003339733e374sm1383975ilp.86.2023.08.09.12.56.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Aug 2023 12:56:52 -0700 (PDT) Message-ID: <63fe166d-a830-3682-4ace-2dc6aac630f7@gmail.com> Date: Wed, 9 Aug 2023 13:56:51 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 01/20] net: sunxi_emac: chase DT nodes to find PHY regulator Content-Language: en-US To: Andre Przywara , Jagan Teki , u-boot@lists.denx.de Cc: Samuel Holland , Jernej Skrabec , Icenowy Zheng , Maxim Kiselev , linux-sunxi@lists.linux.dev References: <20230721134606.4505-1-andre.przywara@arm.com> <20230721134606.4505-2-andre.przywara@arm.com> From: Sam Edwards In-Reply-To: <20230721134606.4505-2-andre.przywara@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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.8 at phobos.denx.de X-Virus-Status: Clean Hi Andre, Looks good to me! My target doesn't have PHY on a regulator, so no test result for this one. On 7/21/23 07:45, Andre Przywara wrote: > At the moment the sun4i EMAC driver relies on hardcoded CONFIG_MACPWR > Kconfig symbols to enable potential PHY regulators. As we want to get rid > of those, we need to find the regulator by chasing up the DT. > > The sun4i-emac binding puts the PHY regulator into the MDIO node, which > is the parent of the PHY device. U-Boot does not have (and does not > need) an MDIO driver, so we need to chase down the regulator through the > EMAC node: we follow the "phy-handle" property to find the PHY node, > then go up to its parent, where we find the "phy-supply" link to the > regulator. Let U-Boot find the associated regulator device, and put that > into the private device struct, so we can find and enable the regulator > at probe time, later. > > Signed-off-by: Andre Przywara Reviewed-by: Sam Edwards Thanks, Sam