Received: by 10.213.65.68 with SMTP id h4csp1689159imn; Thu, 15 Mar 2018 06:58:06 -0700 (PDT) X-Google-Smtp-Source: AG47ELswuy8VL4cICpYW6ZtegJdAxKdMkBgoNg5oANOsngDYLeuE4sST9QSYYRlCahrXdjiki/hb X-Received: by 10.98.11.19 with SMTP id t19mr7830463pfi.70.1521122286488; Thu, 15 Mar 2018 06:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521122286; cv=none; d=google.com; s=arc-20160816; b=P36VchuRGd10g91oQd4Ka841iq35SjgF05/P+MjrPN2VNUaoijprqn++zFHuA5r+Pd 6CculyzXyeLN/U7OcLzgWvOOIzmhFznUWQ7RZKsGAHaTzDnLbCH19c0WTfiLon1iO2P5 VcuZAzp0Nnq9iRrjU20HWuSjlUimVMStvzuCXVbgBSLe/h+6qAAD6sQDS43yHwhuvjDg N5/QwZEX7R/R6ytd/KmtypdANfAEAPIQSZ3qbyv97GtGk4NiZMF1W/1HWwX5UW2ZjaCU K5BsaNqz+6knrceckySIacSq/g0O/SyK1h+nSbZjSaHOcmWjPt7rudNiYJybz1oGgNog X31w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=yJcgE1wKjDgnZtMJJBqKaWz5Ki/bN42AvBslg3X+1dk=; b=K7pK03u2wzEJ5q/JylJcIC2LFtRUukj7qlFpPNIWOQagwleYCAkpFDUUDlKvqEO1HD SINOfhlVAMHSQ2NEZIB1KxKAdC5G4cylF2/FJvMfpYFgBE5NIqm7ax/fAl/uD61OZWCG u4ed1juI/FPggjoY8u5+ONXv0AEPPQJPm5NEieBfHDnEfQ3MmvKGTFWFWBOIurW5VnMV o5Nxmg0kU5I+YxaCl8X5RHnrp6D4lZcknyaSv8B+vF3xofOMsn4BE60dcaVg6k2eEHhT P+onvKkwseborTX+GATvEkkZV0Nr4W2c9NU9byyYmTRztLKCHA+o9wC8xyBZOf7Dnn1B HPVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i08+sDmj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5-v6si4051206pll.90.2018.03.15.06.57.51; Thu, 15 Mar 2018 06:58:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i08+sDmj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751918AbeCON5A (ORCPT + 99 others); Thu, 15 Mar 2018 09:57:00 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:36199 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751475AbeCON46 (ORCPT ); Thu, 15 Mar 2018 09:56:58 -0400 Received: by mail-qt0-f196.google.com with SMTP id c7so7274249qtn.3; Thu, 15 Mar 2018 06:56:57 -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:mime-version :content-transfer-encoding; bh=yJcgE1wKjDgnZtMJJBqKaWz5Ki/bN42AvBslg3X+1dk=; b=i08+sDmj4/B48MK2qUkP977xoj0qnQKvPoftZ+gciVsBTZxPB49ywdlHJelwVgr/od PhwIc7rP6lcRsVPimcVV045MlLnMW7lji+0QRTnMtThEzBmsXp17NPTdSjRlA9/fdaYp 4LhEMTZRz8wELv5x54fwInX5+4ms4igI/rftcvSp7dolH6YqSSCTjEZsdxYMynNbK9We c+A0pBBCtxR+iQ+XA7+UXDIOQU7LHKHCA5zdoA2zfs99RHkuW5+LG7n99gGcW7ld+nbH qxhQZ0fTwOHkB6iVOcT3TVnZSFM4VY2+E2egA2cxULJwYjZLY59iyEhJ6GcL8eGnqevC J51g== 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:mime-version :content-transfer-encoding; bh=yJcgE1wKjDgnZtMJJBqKaWz5Ki/bN42AvBslg3X+1dk=; b=fs7ELWV8y7s4f5S1obkRNbYLjFpL/pXhfDkhOuO3L/j+1ULuAzo38Kq3+C2PlAAnnA Xidq3Cj9NsmXymZb9LvBIzV30v4aP3OpAqD8fUZ5wDbbJKFYswf1ACPhnR4bsv9yKyWZ efsNinYULIOHFz0nmq/erGaNrqKt6Z2oKxa8KChN/wJz+cJI/rp7HmK3+vMcdjWRBZ5Q UjuFI323MO+ZaJrJ0MrGunhQxWp8U0XLQjdfxDb45jCPqkBmFaC18dpJSvSaRqmS67ge y9z/0uThAEyEAv+keFLcEVCJugVmWzcgQ89zVagVB7hRPe9JgPlT5KNdDVe6ozn6sR9e fYVw== X-Gm-Message-State: AElRT7F+r3lJKZIB7WCYlhFs1IZHBLNK+tqBhtyRPFSlgSFJzzGkUG2z Nxe4typG1maBp06tiPGMjIg= X-Received: by 10.200.46.83 with SMTP id s19mr13139783qta.153.1521122217342; Thu, 15 Mar 2018 06:56:57 -0700 (PDT) Received: from localhost.localdomain (ool-18b822e8.dyn.optonline.net. [24.184.34.232]) by smtp.googlemail.com with ESMTPSA id m8sm3613697qkm.26.2018.03.15.06.56.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Mar 2018 06:56:56 -0700 (PDT) From: Vivek Unune To: florian.fainelli@broadcom.com, hauke@hauke-m.de, zajec5@gmail.com, jonmason@broadcom.com, bcm-kernel-feedback-list@broadcom.com, robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vivek Unune Subject: [PATCH] ARM: dts: BCM5301X:Make usb3 phy use mdio phy driver Date: Thu, 15 Mar 2018 09:56:47 -0400 Message-Id: <20180315135647.48456-1-npcomplete13@gmail.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, usb3 phy in bcm5301x.dtsi uses platform driver which requires register range "ccb-mii" <0x18003000 0x1000>. This range overlaps with mdio cmd and param registers (<0x18003000 0x8>). Essentially, the platform driver partly acts like a mdio bus driver, hence to use of this register range. In some Northstar devices like Linksys EA9500, secondary switch is connected via external mdio. The only way to access and configure the external switch is via mdio bus. When we enable the mdio bus in it's current state, the mdio bus and any child buses fail to register because of the register range overlap. On Northstar, the usb3 phy is connected at address 0x10 on the internal mdio bus. This change moves the usb3_phy node and makes it a child node of internal mdio bus. Thanks to Rafał Miłecki's commit af850e14a7ae ("phy: bcm-ns-usb3: add MDIO driver using proper bus layer") the same usb3 platform driver can now act as usb3 phy mdio driver. Tested on Linksys Panamera (EA9500) Signed-off-by: Vivek Unune --- arch/arm/boot/dts/bcm47094.dtsi | 7 ++++--- arch/arm/boot/dts/bcm5301x.dtsi | 34 ++++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/arch/arm/boot/dts/bcm47094.dtsi b/arch/arm/boot/dts/bcm47094.dtsi index 4840a782fc05..f7c3e274b354 100644 --- a/arch/arm/boot/dts/bcm47094.dtsi +++ b/arch/arm/boot/dts/bcm47094.dtsi @@ -7,9 +7,10 @@ #include "bcm4708.dtsi" / { - usb3_phy: usb3-phy { - compatible = "brcm,ns-bx-usb3-phy"; - }; +}; + +&usb3_phy { + compatible = "brcm,ns-bx-usb3-phy"; }; &uart0 { diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi index 9a076c409f4e..7ba6533f7615 100644 --- a/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi @@ -154,13 +154,6 @@ clock-names = "phy-ref-clk"; }; - usb3_phy: usb3-phy { - compatible = "brcm,ns-ax-usb3-phy"; - reg = <0x18105000 0x1000>, <0x18003000 0x1000>; - reg-names = "dmp", "ccb-mii"; - #phy-cells = <0>; - }; - axi@18000000 { compatible = "brcm,bus-axi"; reg = <0x18000000 0x1000>; @@ -359,7 +352,32 @@ reg = <0x18003000 0x8>; #size-cells = <1>; #address-cells = <0>; - status = "disabled"; + }; + + mdio-bus-mux { + compatible = "mdio-mux-mmioreg"; + mdio-parent-bus = <&mdio>; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x18003000 0x4>; + mux-mask = <0x200>; + + mdio_int: mdio@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + usb3_phy: usb3-phy@10 { + compatible = "brcm,ns-ax-usb3-phy"; + reg = <0x10>; + usb3-dmp-syscon = <&usb3_dmp>; + #phy-cells = <0>; + }; + }; + }; + + usb3_dmp: syscon@18105000 { + reg = <0x18105000 0x1000>; }; i2c0: i2c@18009000 { -- 2.11.0