From patchwork Fri Sep 13 04:45:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 13802993 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 602D6EEEC08 for ; Fri, 13 Sep 2024 04:46:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=QNFZhbQPWvwwvzlOmDZyJGoAY+9pJI8LC1jA7zJfumY=; b=KflyZeuMt1flN/ PDE/vAWU5A7DW8/zazYmpXIMTttlj8q8shxx925oeU9qvEg5hcI/fe4HShNBkkNx2+UXeoH5Ni4ov P8Voq6UksmaEYxz4TMPy8bK00Z4yZqUFT6NyBX+9glyG7Bx9oWIQ1xZlamajr67CLbaaGgqofMkaV 8y4WVIaiUHtz3SAOWikb+rmZpCLwqCDeiz1dewFY+zUSxjrC4+U3vxCabqZoiQL3iLS8r2iXImCxi 7ZdX4j20pycLxNVGfxHOByNu+brYZWk2HnOSYRm43upRo+xBPJk0NMrQngH4lsRY9wLBHFXPg4IfK KroNzMcQPFPzOmmQe9fA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soyCB-0000000EvXa-3iDj; Fri, 13 Sep 2024 04:46:11 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soyC6-0000000EvWj-3YtA for linux-phy@lists.infradead.org; Fri, 13 Sep 2024 04:46:10 +0000 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5bf01bdaff0so577809a12.3 for ; Thu, 12 Sep 2024 21:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726202764; x=1726807564; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dvjMZVYW6cr2cJF7xCG4RzHVN0FtN4ELeVl4OFEmIT0=; b=ZJEiN/waE3aSqHaXW0YJ7R7IJe7xFaz7whpPHfD6It6MpNxY/VSsJJtSpHzgTkKukY DrBnnFcVUcwVmnqPzEen3ya912y6HAhM2DY4XL+P6XTHhOgBElOT1dV3IvXN81U7lQIq rxhUxHP8tWo48tsmUJPui7zLS5z79+n3S13HubYOZTdKrIyYb32FA1LfXVxzadCb7ft2 sDzugrztaVlq9T0nO22WuH1FqYlWbZSV015HXw05ygKVxElFKIvFAAht99X09OdQ5ft1 yI2lBZZvdSrAR7bFOtxYsOhKpTHg49LINw7F+cQW8ezkyjLVaA4MJ2+2CZ2TcZDOP1sB Z0lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726202764; x=1726807564; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dvjMZVYW6cr2cJF7xCG4RzHVN0FtN4ELeVl4OFEmIT0=; b=T+QSoTvyTYZewyBe/W4pz8fZiq/FAoc9tZ5F+zTmc8fMaFxonfectGR9djwgAL7CtV 6LHaaAJxQi3AoHDViyjMaqV5hNlYJ6huYYg8Q3g+K52Cr7HAuy2DlhoohLu78mR6EwWo LPIxjohY7HZpeFXVFyyNOWcADFt/tlOfuZuwwMpCJztpqVQGcclv1FtarcOGDLLNrk7x bTFBsdJezp2j5/DeQNSVWzySpQbeJqWI3lWtssgC7q8IzrFUdVVQWIRBjufvCbOjmh3n pUBDsr8jf65oZ3zJOEgO+ED5A++a9CYXEvWE0qtrJeuxpAlDq6GqRN+MXy+n4ld34ok4 XDJA== X-Forwarded-Encrypted: i=1; AJvYcCUy6BKmE+EF7WqxiVKtD83vz0sedlzvbnnCBZvbj6PvvZGYX/dka+OQPsHGYlmgle/LxcGo5uNG1lQ=@lists.infradead.org X-Gm-Message-State: AOJu0Yx9+75APZtUJHhYDD/0VhLLlYvO72KO+qsyUPScgUQmKOTfmltE P8ktrO1uM+TJrdjFfgS4kR2g2609JB36EMWn8AuqT6/lxKmZhKKG X-Google-Smtp-Source: AGHT+IFfaAVy51H5u5apm3I4pEWfaWlpFB7z2h8ZgkGGlzxqpBzd+BWSTMcvBDQo5Qs5g+lQ/sfDhQ== X-Received: by 2002:a05:6402:2b8f:b0:5c4:8ac:ff80 with SMTP id 4fb4d7f45d1cf-5c41e2ada81mr1139349a12.33.1726202764181; Thu, 12 Sep 2024 21:46:04 -0700 (PDT) Received: from localhost.lan (031011218106.poznan.vectranet.pl. [31.11.218.106]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c3ebd76fc4sm7303468a12.78.2024.09.12.21.46.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 21:46:03 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I Cc: Jeff Johnson , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?b?UmFm?= =?utf-8?b?YcWCIE1pxYJlY2tp?= Subject: [PATCH 1/2] dt-bindings: phy: bcm-ns-usb2-phy: drop deprecated variant Date: Fri, 13 Sep 2024 06:45:56 +0200 Message-Id: <20240913044557.28315-1-zajec5@gmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240912_214606_918001_53468662 X-CRM114-Status: GOOD ( 10.50 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki The old binding variant (the one covering whole DMU block) was deprecated 3 years ago. Linux kernel was warning when using it for similar amount of time. There aren't any known Northstar devices with bootloader providing DT to operating system. Actually OpenWrt seems to be the only project using this binding and it always appends DTB to kernel. It has switched to the non-deprecated binding years ago. Given there is close to zero chance this breaks anyone's setup it should more than safe to drop this binding variant after 3 years. Signed-off-by: Rafał Miłecki Acked-by: Conor Dooley --- .../bindings/phy/bcm-ns-usb2-phy.yaml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.yaml index 426101530a21..d72c02ab55ae 100644 --- a/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.yaml +++ b/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.yaml @@ -18,16 +18,8 @@ properties: const: brcm,ns-usb2-phy reg: - anyOf: - - maxItems: 1 - description: PHY control register - - maxItems: 1 - description: iomem address range of DMU (Device Management Unit) - deprecated: true - - reg-names: - items: - - const: dmu + maxItems: 1 + description: PHY control register brcm,syscon-clkset: description: phandle to syscon for clkset register @@ -50,12 +42,7 @@ required: - clocks - clock-names - "#phy-cells" - -oneOf: - - required: - - brcm,syscon-clkset - - required: - - reg-names + - brcm,syscon-clkset additionalProperties: false From patchwork Fri Sep 13 04:45:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 13802992 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 16158EEEC0E for ; Fri, 13 Sep 2024 04:46:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FFE5YSrZgU9x6k24VxVlfEGkJxKKGI0noAYbgbFPcRQ=; b=qnhVUZtsSde3P4 +zBkcFT3SlvV2S5/ZTty1WCh63gcjEcb0k7Vd6bpx7AC5+M4EDTWnGGkgaifDmTXyfMKi5RgCKtch k2OcT5YKshazo7bgEX1IHy8I8S32ZiFE1+qRzS6BvVqK0guLwiePCIuRI1ffyyPFxiiQDL9l71UhK +Z2+WNnQ9UMgRgE/T2qnDh45eyCnC3gKtN6G0taIcvvuaCjYIu9QgBoFzGT5qdedvqt0S5C/QZv2c mzPace3IjJc/DZUUWvh1umgdtdUyUPSw0VsUHuh3wS3fKzkkXlcxos9zAXusOw0LvvKobZFnNropj kdfAFN7fLhRAa2PNGfvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soyCB-0000000EvXS-2T2q; Fri, 13 Sep 2024 04:46:11 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soyC8-0000000EvWy-16Zx for linux-phy@lists.infradead.org; Fri, 13 Sep 2024 04:46:09 +0000 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5c241feb80dso5381846a12.0 for ; Thu, 12 Sep 2024 21:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726202766; x=1726807566; darn=lists.infradead.org; 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=etW/iub89JqiLphBAHzvsoo9XIPyzDTt8mamtwnIl7s=; b=mZOsvC4oqlpucvQvPg/zGjtkKw1vyTUBsdGp/wFfyBoo7XJx+PiikME2utBMCn6ssH 2S1Hvt4L5WJF1tfmBCe3NwW4K2rDtISBVbkN7qDoRvhtP2ZHBOULmevZjAZqjqC/Ejru vMklVpfBIWUrv3fVkMwbdZQ+J5tGc5zTdNJ+9jtGfntwYpRuDkBalaoO7E5sbh8tW5CR FmS6vrnWicEC6fLXNfVpd78yTNy17NM44dfltcojI9Q8lAYXaoyIVTPhh9oFHdJP+mK+ e2ZYpmPaAHvwIuBc0u1rHqY5OeqnAU5u7fIx05/NxOYncQcB7jOhjo5etoJZUNWkS7e/ e7GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726202766; x=1726807566; 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=etW/iub89JqiLphBAHzvsoo9XIPyzDTt8mamtwnIl7s=; b=pUOvbFI8TOnLYgibLGpi16OW0TltBBaX6gIQtu+U2aFeNi5BhA3jEhPZkrptu2spfY YexkUB8yy3X6w5Epabg1ob2yry9oClL6P6XRNk5da8EvbooYKBGkEWVsD8dMl7wiJcMw jox9XgYZgnSKHCIjiIX8Rb7blJBBrXljMrwckdvAPlIuCj40N4Zzg2cL4yyZFRGk6y0H vPMOYzDfxnZc3CXSF3rISKc7TXKLwJi47t6AmV8mYXP2BakYeBaQQlUEylnVWrUqtfP1 JFduY3fIeMyhQQj5d5/QRAdadvIubEUw/qapXnabAKJP1O4eVEQ3ZAzv49o08ch8tcIB Zbzw== X-Forwarded-Encrypted: i=1; AJvYcCVvTJHn0SjtsCyo1pbAfxGNcv4zvqSTbT4Oe/TtbWVYDTbhKZpNNqtOKIrKwQflu/+CO3/NAs86cos=@lists.infradead.org X-Gm-Message-State: AOJu0YxH1mG+MCH2GTsWx+Dghy06R89jN2r9FgIvWWF/AxSzVyRrzTz8 SHU6JV9HOwcUl2XmyjAxVbkXlURwHqqJT7mM7E8/8KtpfJaquzsRVIk/QQ== X-Google-Smtp-Source: AGHT+IHxgF432i43pDnIe5jmxrG9h7pU58o/7t/3GD8MSHv7ETteVuY0BK3UNxdrJtKC2Ox0T0rmDw== X-Received: by 2002:a05:6402:520e:b0:5c2:5248:a929 with SMTP id 4fb4d7f45d1cf-5c41435c3d2mr6267297a12.7.1726202766355; Thu, 12 Sep 2024 21:46:06 -0700 (PDT) Received: from localhost.lan (031011218106.poznan.vectranet.pl. [31.11.218.106]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c3ebd76fc4sm7303468a12.78.2024.09.12.21.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 21:46:05 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I Cc: Jeff Johnson , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?b?UmFm?= =?utf-8?b?YcWCIE1pxYJlY2tp?= Subject: [PATCH 2/2] phy: bcm-ns-usb2: drop support for old binding variant Date: Fri, 13 Sep 2024 06:45:57 +0200 Message-Id: <20240913044557.28315-2-zajec5@gmail.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240913044557.28315-1-zajec5@gmail.com> References: <20240913044557.28315-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240912_214608_330313_1FC1A4EC X-CRM114-Status: GOOD ( 14.91 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki The old binding was incorrectly designed and ended up being deprecated 3 years ago. Finally it has been dropped so relevant code it not needed anymore. Signed-off-by: Rafał Miłecki --- drivers/phy/broadcom/phy-bcm-ns-usb2.c | 54 +++++++------------------- 1 file changed, 15 insertions(+), 39 deletions(-) diff --git a/drivers/phy/broadcom/phy-bcm-ns-usb2.c b/drivers/phy/broadcom/phy-bcm-ns-usb2.c index 5213c75b6da6..c5d35031b398 100644 --- a/drivers/phy/broadcom/phy-bcm-ns-usb2.c +++ b/drivers/phy/broadcom/phy-bcm-ns-usb2.c @@ -24,9 +24,6 @@ struct bcm_ns_usb2 { struct phy *phy; struct regmap *clkset; void __iomem *base; - - /* Deprecated binding */ - void __iomem *dmu; }; static int bcm_ns_usb2_phy_init(struct phy *phy) @@ -49,10 +46,7 @@ static int bcm_ns_usb2_phy_init(struct phy *phy) goto err_clk_off; } - if (usb2->base) - usb2ctl = readl(usb2->base); - else - usb2ctl = readl(usb2->dmu + BCMA_DMU_CRU_USB2_CONTROL); + usb2ctl = readl(usb2->base); if (usb2ctl & BCMA_DMU_CRU_USB2_CONTROL_USB_PLL_PDIV_MASK) { usb_pll_pdiv = usb2ctl; @@ -66,24 +60,16 @@ static int bcm_ns_usb2_phy_init(struct phy *phy) usb_pll_ndiv = (1920000000 * usb_pll_pdiv) / ref_clk_rate; /* Unlock DMU PLL settings with some magic value */ - if (usb2->clkset) - regmap_write(usb2->clkset, 0, 0x0000ea68); - else - writel(0x0000ea68, usb2->dmu + BCMA_DMU_CRU_CLKSET_KEY); + regmap_write(usb2->clkset, 0, 0x0000ea68); /* Write USB 2.0 PLL control setting */ usb2ctl &= ~BCMA_DMU_CRU_USB2_CONTROL_USB_PLL_NDIV_MASK; usb2ctl |= usb_pll_ndiv << BCMA_DMU_CRU_USB2_CONTROL_USB_PLL_NDIV_SHIFT; - if (usb2->base) - writel(usb2ctl, usb2->base); - else - writel(usb2ctl, usb2->dmu + BCMA_DMU_CRU_USB2_CONTROL); + + writel(usb2ctl, usb2->base); /* Lock DMU PLL settings */ - if (usb2->clkset) - regmap_write(usb2->clkset, 0, 0x00000000); - else - writel(0x00000000, usb2->dmu + BCMA_DMU_CRU_CLKSET_KEY); + regmap_write(usb2->clkset, 0, 0x00000000); err_clk_off: clk_disable_unprepare(usb2->ref_clk); @@ -107,27 +93,17 @@ static int bcm_ns_usb2_probe(struct platform_device *pdev) return -ENOMEM; usb2->dev = dev; - if (of_property_present(dev->of_node, "brcm,syscon-clkset")) { - usb2->base = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(usb2->base)) { - dev_err(dev, "Failed to map control reg\n"); - return PTR_ERR(usb2->base); - } - - usb2->clkset = syscon_regmap_lookup_by_phandle(dev->of_node, - "brcm,syscon-clkset"); - if (IS_ERR(usb2->clkset)) { - dev_err(dev, "Failed to lookup clkset regmap\n"); - return PTR_ERR(usb2->clkset); - } - } else { - usb2->dmu = devm_platform_ioremap_resource_byname(pdev, "dmu"); - if (IS_ERR(usb2->dmu)) { - dev_err(dev, "Failed to map DMU regs\n"); - return PTR_ERR(usb2->dmu); - } + usb2->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(usb2->base)) { + dev_err(dev, "Failed to map control reg\n"); + return PTR_ERR(usb2->base); + } - dev_warn(dev, "using deprecated DT binding\n"); + usb2->clkset = syscon_regmap_lookup_by_phandle(dev->of_node, + "brcm,syscon-clkset"); + if (IS_ERR(usb2->clkset)) { + dev_err(dev, "Failed to lookup clkset regmap\n"); + return PTR_ERR(usb2->clkset); } usb2->ref_clk = devm_clk_get(dev, "phy-ref-clk");