From patchwork Sun Jun 13 09:46:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Hagan X-Patchwork-Id: 12317431 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 650FAC48BDF for ; Sun, 13 Jun 2021 09:49:38 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 38C076124B for ; Sun, 13 Jun 2021 09:49:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38C076124B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=7KZshNFQN0QGCRV97Hs+fugUBXdEQujTtdcdKX+mu8g=; b=isFAamlx9/Fc6G 1iZU0KmZY7i6QRrRfm3oWc8jSGfH/foCgzJytzdOHAk+zjK88dxdAKf4DXvGohMYmgfZq1O/K1IjL I9lpmk3fyP0qwE2cX2nCoygxS934FcCf7Cm4itF6FT3jo+FgwGtxC0nxSHYsfDqo12TPsLdnnWRuh TdhfaGyqBvGDNGYCqU5LjgdECqssmcBlKAWlnPSs4XME392ep4pdr32QThHUvt/TlOBrbEMc8n6eH h3sZXvefeVEveZQRDJZ08Nlks6NqslcTcIdAB6zls5EhTK/7N9RAYhGM+5YAWYs6OgW5KA7pmFkxC tGEvZ3k6VjMKZeojn+QQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsMim-00A6r9-0A; Sun, 13 Jun 2021 09:48:00 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsMii-00A6qX-8M for linux-arm-kernel@lists.infradead.org; Sun, 13 Jun 2021 09:47:57 +0000 Received: by mail-wr1-x429.google.com with SMTP id c5so10943509wrq.9 for ; Sun, 13 Jun 2021 02:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IDfBcudzWJBKabnnvY8z/cQCBRgnrN5jAmw/3Eca5LM=; b=mIUAFX4VpiU75CUcRASXp/3YKIOqCFjR04uNxvfwu3mQuXu55ZIMdPOjBCpOtwd/hJ SrF0ZhSw6Kzk4rVC/uzFsABKltCWHe69iY0VyooaZYXlYOilK9pLkRaRzBKv89jCTu8o 8b3PJTsuzLyUEgYQFYBsANQVkmALybai5UZ621ndXMYJ8cqIZb8EG8SItOe2HCocmRdw HoKhGQ6YAWSyVjcZMKIHqj8uVb1V8MIy5JsxeNxd5/XSkeg5sVCLUufbG6D5+OKl4Egm NPFgtMtJGxx8anfhQ4JpBQnEWCPq04as6CYm+vxP2zmbo34KjaQH3YO4vahODo2Yoeba T+mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IDfBcudzWJBKabnnvY8z/cQCBRgnrN5jAmw/3Eca5LM=; b=PuTrhE5SJgT469EeHLPy2kHSJD/ENLIIKKJRX0mKA00MxwsMdctHZWGUg64ZikLMuP J6+JHisnCNaT523ou3USeLiyuQe8PjQzpg/bYJWZrUXzREAx9G3rd4GVkQSKtzP3AKnh uQsRXnN/72xE7hCAiFqPbJ1Kkc84vvbzUj4fuV5GvnWWqcSOFYSv8X8ujx18JmMo9aQ7 O9QTX07oekSTLB/zUIDukrWDFPjOLgBHkHRf5MsKd4JrP4qeDH93DqaHF1IbVAF65Ugz doY2Me6Azb7yWMDzxUqQWaAnqnxVvnFsrgiaGUy8GmQsbM40WF6wh79XDa+5xrYwEzuc VMig== X-Gm-Message-State: AOAM532mPJNMKfbGfyz1OmfMlGN/9Wy7XnDHXS01p7IuNYnTg7w/VLIP 71OXEnAjjpsv5+pm1m2035I= X-Google-Smtp-Source: ABdhPJy1oD1q0kSYxcHbnuLF0CAphsMk6y07KdPjoM5BuVtzdozideQb7kcc94K0shW8eB3HfJFdug== X-Received: by 2002:a05:6000:188:: with SMTP id p8mr5874031wrx.296.1623577672062; Sun, 13 Jun 2021 02:47:52 -0700 (PDT) Received: from cluster5 ([80.76.206.81]) by smtp.gmail.com with ESMTPSA id 2sm12827599wrz.87.2021.06.13.02.47.51 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Sun, 13 Jun 2021 02:47:51 -0700 (PDT) From: Matthew Hagan To: Cc: Florian Fainelli , Vladimir Oltean , Andrew Lunn , Vivek Unune , Matthew Hagan , Rob Herring , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] ARM: dts: NSP: Move USB3 PHY to internal MDIO bus Date: Sun, 13 Jun 2021 10:46:37 +0100 Message-Id: <20210613094639.3242151-4-mnhagan88@gmail.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210613094639.3242151-1-mnhagan88@gmail.com> References: <20210613094639.3242151-1-mnhagan88@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210613_024756_343318_F4A2B857 X-CRM114-Status: GOOD ( 15.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch largely replicates Vivek Unune's patch "ARM: dts: BCM5301X:Make usb3 phy use mdio phy driver"[1] for the NSP platform, whereby we need to create an mdio-mux to facilitate switches configured via external MDIO, in this case on the Meraki MX65. However in doing so, we are creating an overlap with usb3_phy's ccb-mii range. To resolve this, usb3_phy should be moved to a child node of the internal MDIO bus. The result is heavily based upon Vivek's patch. This has also been cross-referenced with Yendapally Reddy's earlier work which utilised the subsequently dropped brcm,nsp-usb3-phy driver: "[PATCH v2 4/4] arm: dts: nsp: Add USB nodes to device tree" [2]. Finally, this change provides conformance to the bcm-ns-usb3-phy documentation, utilising the required usb3-dmp-syscon property. Note that support for the deprecated ccb-mii bindings has been dropped as of "phy: phy-bcm-ns-usb3: drop support for deprecated DT binding"[3]. [1] https://lore.kernel.org/patchwork/patch/933971/ [2] https://www.spinics.net/lists/arm-kernel/msg555132.html [3] https://lore.kernel.org/linux-devicetree/20201113113423.9466-1-zajec5@gmail.com/ Signed-off-by: Matthew Hagan --- arch/arm/boot/dts/bcm-nsp.dtsi | 38 +++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi index e91a68996986..7c59816fdb32 100644 --- a/arch/arm/boot/dts/bcm-nsp.dtsi +++ b/arch/arm/boot/dts/bcm-nsp.dtsi @@ -370,6 +370,35 @@ mdio: mdio@32000 { #address-cells = <1>; }; + mdio-mux@32000 { + compatible = "mdio-mux-mmioreg"; + reg = <0x32000 0x4>; + mux-mask = <0x200>; + #address-cells = <1>; + #size-cells = <0>; + mdio-parent-bus = <&mdio>; + + mdio_int: mdio@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + usb3_phy: usb3-phy@10 { + compatible = "brcm,ns-bx-usb3-phy"; + reg = <0x10>; + usb3-dmp-syscon = <&usb3_dmp>; + #phy-cells = <0>; + status = "disabled"; + }; + }; + + mdio_ext: mdio@200 { + reg = <0x200>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + rng: rng@33000 { compatible = "brcm,bcm-nsp-rng"; reg = <0x33000 0x14>; @@ -530,13 +559,8 @@ sata1: sata-port@1 { }; }; - usb3_phy: usb3-phy@104000 { - compatible = "brcm,ns-bx-usb3-phy"; - reg = <0x104000 0x1000>, - <0x032000 0x1000>; - reg-names = "dmp", "ccb-mii"; - #phy-cells = <0>; - status = "disabled"; + usb3_dmp: syscon@104000 { + reg = <0x104000 0x1000>; }; };