Message ID | 20230808190144.19999-5-brgl@bgdev.pl |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2434359vqr; Tue, 8 Aug 2023 15:35:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGmVC/MVg1JcaNZuhMs5ZCIGufvU7PcxYhWxQkQh15HstpoGkqfXf1aL3L4mmNuhL/zuEQe X-Received: by 2002:a17:90a:c8d:b0:268:1ddd:266a with SMTP id v13-20020a17090a0c8d00b002681ddd266amr761247pja.30.1691534117651; Tue, 08 Aug 2023 15:35:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691534117; cv=none; d=google.com; s=arc-20160816; b=z3WtzktX6EwbGxp2r+GDU/+lI3A0wQQ+vM+6CT1b5NkozB06iCVEP/U0e8YWebxX9x t/o5LYYxAhGGG42a86h37nkoD3VAgYwjcVI9oI1gSw6IymHQvJbzN7w72f2iukjfrMl1 XBvecL1NcHVyucFaVV640e0Hsx6E18uWQ6ZBqmiXM7dhDeiKz6AtbWNS7w+UNVNbtxw/ YM4OfNxqWhlWkGErj8ZAOPzKRbhOcazQvRqkmOkENk1GPoSFKuLCvtlhN3CJ4ZdIpeOq +5OXCJqpv05r1PDzuoMDqGwXuyyeMiPJuWPiLS57NAM1uWLZxUPZ1AA9OXWmeuD+fo0o XsXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NErAZ1+jiHK36qRuqDrSYR1o6Tx2jw6JcGAy27EXYPg=; fh=v6UDtM1LG1pNigs7Y52IFg78NWSS5jq/R3uih93pXmc=; b=P2/n6NcxnL19eQm5QtLz0gg2ee7SJeUuH3LDP0kCkjWFd5Q3C720L0lhWYEDRCRdIw 56gYkoVxkUWHb/XzoMfj4mnpVlrkAfOFYGPj7hQv2SLzX/yuH3LHYvsmfDAscMevC15e iIfX6kOY30eGU3w22M/R4wLBGDyLD/JU93dQ3PcF9ihxkoqYmPVKmVzSNUDflrTGjWIu KHASFdYJrduXVvaA5vmZPiILPLp32r/G7WrAuLRitfc2OyAsBAchIbNQck0lknNfR5IM x5f+UdEWrYTBQ8ZCnfD2ceuA3RrQJQsv3AXDv1DJO8sDe4U7IijzsDkL5iu34vEGLkNs unqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=vfFJq+w5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o17-20020a17090ac71100b00268c1f4921esi100514pjt.66.2023.08.08.15.35.05; Tue, 08 Aug 2023 15:35:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=vfFJq+w5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236561AbjHHTgi (ORCPT <rfc822;aaronkmseo@gmail.com> + 99 others); Tue, 8 Aug 2023 15:36:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235317AbjHHTgS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 8 Aug 2023 15:36:18 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28D3E2178D for <linux-kernel@vger.kernel.org>; Tue, 8 Aug 2023 12:01:58 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id 5b1f17b1804b1-3fe2048c910so50842265e9.1 for <linux-kernel@vger.kernel.org>; Tue, 08 Aug 2023 12:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1691521316; x=1692126116; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NErAZ1+jiHK36qRuqDrSYR1o6Tx2jw6JcGAy27EXYPg=; b=vfFJq+w5TuOejiJncLe4a2+IEnq7wzFU4ePJqSO7nx6b+fb/O4vsCKbFHRoru3wUvi GZ1jFCyGMdT5CyP10iQf5oGi3HL/mEVYt/WdbCyIIRSi0W6wZQY0n4FfNvQVRKP2uFV1 xwVIrBfPk3psX4jGhXKywfv5hkoXg8IFAZlolAAuQMoaVAtdIU0MKR7GdFh5mVelIYVv 94FClmm9qPxSWK81RBZ8K2e3om3Lod1o5E83aU3ywmrgV8EXmGWkRPgj3R/mogCuigxM WL+xkYxe/5ywCGaZYz3wfMETYXoc9fPU3eWA8tZrwH7YNj4uFd3s5CJz9VXeIkSSD6Kk JhCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691521316; x=1692126116; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NErAZ1+jiHK36qRuqDrSYR1o6Tx2jw6JcGAy27EXYPg=; b=AizZPSEOLcb87b6YYDv0MhLIaTHAhSv2cdL4kkMdxVZ+cm8qqxrk/DBAa/Aty49KT5 l1ePLrNsGRCbh3QBOo2FiBf89F+B1FxyHOpH/2wZUdz0Dohfq3ifyNlZ1Ta6C8Letsk+ rsfvcut8BRPsNrzRUjTzOzXedc4XbEBOD4jylzZmcpeAjL9Xw8Oe6OH6IbmipqzuNj5p MCIFXW/90M7MUQ+dvyYF3N+3KD+5NShvwOsXMY6dBbmYULoZU6OBFPMg9acp5JTcO7YR k2poD/4hI0V5uzhdLF9fQzPzng1Cv4Le/3lw5pW61mLYtmsMgJWDYiBCg1QjhZHilSV4 Q99A== X-Gm-Message-State: AOJu0Yxm3k+zFe0ujy2m4L1KuLnimyy7/2bS/S6MhItyHZLF1fBLre6L nip3Qdv/fIM1zaYdWCj66Bh2xw== X-Received: by 2002:adf:df06:0:b0:317:5ed4:d821 with SMTP id y6-20020adfdf06000000b003175ed4d821mr221121wrl.55.1691521316726; Tue, 08 Aug 2023 12:01:56 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:6a08:bcc0:ae83:e1dc]) by smtp.gmail.com with ESMTPSA id z14-20020adfe54e000000b00317e9f8f194sm7301055wrm.34.2023.08.08.12.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 12:01:56 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Alex Elder <elder@linaro.org>, Srini Kandagatla <srinivas.kandagatla@linaro.org>, Andrew Halaney <ahalaney@redhat.com> Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Subject: [PATCH v2 4/8] arm64: dts: qcom: sa8775p-ride: move the reset-gpios property of the PHY Date: Tue, 8 Aug 2023 21:01:40 +0200 Message-Id: <20230808190144.19999-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230808190144.19999-1-brgl@bgdev.pl> References: <20230808190144.19999-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773702078687950900 X-GMAIL-MSGID: 1773702078687950900 |
Series |
arm64: dts: qcom: enable EMAC1 on sa8775p
|
|
Commit Message
Bartosz Golaszewski
Aug. 8, 2023, 7:01 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Device-tree bindings for MDIO define per-PHY reset-gpios as well as a global reset-gpios property at the MDIO node level which controls all devices on the bus. The latter is most likely a workaround for the chicken-and-egg problem where we cannot read the ID of the PHY before bringing it out of reset but we cannot bring it out of reset until we've read its ID. I have proposed a comprehensive solution for this problem in 2020 but it never got upstream. We do however have workaround in place which allows us to hard-code the PHY id in the compatible property, thus skipping the ID scanning. Let's make the device-tree for sa8775p-ride slightly more correct by moving the reset-gpios property to the PHY node with its ID put into the PHY node's compatible. Link: https://lore.kernel.org/all/20200622093744.13685-1-brgl@bgdev.pl/ Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Comments
On 8.08.2023 21:01, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Device-tree bindings for MDIO define per-PHY reset-gpios as well as a > global reset-gpios property at the MDIO node level which controls all > devices on the bus. The latter is most likely a workaround for the > chicken-and-egg problem where we cannot read the ID of the PHY before > bringing it out of reset but we cannot bring it out of reset until we've > read its ID. > > I have proposed a comprehensive solution for this problem in 2020 but it > never got upstream. We do however have workaround in place which allows > us to hard-code the PHY id in the compatible property, thus skipping the > ID scanning. > > Let's make the device-tree for sa8775p-ride slightly more correct by > moving the reset-gpios property to the PHY node with its ID put into the > PHY node's compatible. > > Link: https://lore.kernel.org/all/20200622093744.13685-1-brgl@bgdev.pl/ > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad
diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts index 09ae6e153282..a03a4c17c8f0 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts @@ -279,13 +279,13 @@ mdio { #address-cells = <1>; #size-cells = <0>; - reset-gpios = <&pmm8654au_2_gpios 8 GPIO_ACTIVE_LOW>; - reset-delay-us = <11000>; - reset-post-delay-us = <70000>; - sgmii_phy: phy@8 { + compatible = "ethernet-phy-id0141.0dd4"; reg = <0x8>; device_type = "ethernet-phy"; + reset-gpios = <&pmm8654au_2_gpios 8 GPIO_ACTIVE_LOW>; + reset-assert-us = <11000>; + reset-deassert-us = <70000>; }; };