Received: by 10.192.165.156 with SMTP id m28csp787287imm; Thu, 19 Apr 2018 07:34:11 -0700 (PDT) X-Google-Smtp-Source: AIpwx49eBMRpJgp8YsfBxlo+qZmvhv59juFeSJERaH6u58QYI3TMVlXD3WzBap/huVrP7CgFXKKB X-Received: by 2002:a17:902:e8:: with SMTP id a95-v6mr6369324pla.274.1524148451720; Thu, 19 Apr 2018 07:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148451; cv=none; d=google.com; s=arc-20160816; b=u/cHGVBVrpJk2dlWOmWVaA3hg0PPWgSn8NIKGqSJ0WVooYd3xF6e0nK9FlsUyLhUVA es0v8CQkUVR3kqHW+TUMsGJo5owh8kOMUubeUeJDsAa2QWMsmjGy3mkSx+H8c/Lvx3RU PXYivxu3yp/oiM0TfmFMHOv7pH9JY71QbtKcMaDbtl5oS6fISq5Z2nYcYju8KKTgSv6G tK0+LqubhGHy3rqLzMFx1t48EjkEAiTIXHPXNKmUfqDipl38w5bmBoccMlqILRA/v439 6cWwk5/+bqU2kSL7nThGaex2Ig//HFDF/RgvjL9osZjyrKUV0I3peD8zm2wGGJ1zdXjn iJbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-signature :arc-authentication-results; bh=xSSD9SvLCvUPLV3TsLO9yFBlCax29EsDDiA9e9toJmo=; b=w1y+dZ093rOgaANy6yI1sxr874hhIP06MTXzaHXYfgdrWKxjLrb1W2htxOd5QePgQB ITT19hjIsYn9uc4dOjlrhhY5OyKjYf5gIK4Iq5uclmT2fO+Q1C8y64HM46PtfxGQrOoa 6u2HqeYFRWIX8ltIYT5PIkemxeXXmIM1k+xhyz1xsLvCTVbBtwf5GbsucXGxQU/YbRNu etLf+Ydnlm36G2KRgKXZFOWC+ot87JfqeHm/uwvPYDWR5zjD+LS8s0CHD/7fERcjMljM ESprvG5pNh1AmhIzQCCZZLbVR2SkihKIBFDj1u14FjN/DkKtN5+QXlVw7ufaF/xz2/9j 9w4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@raspberrypi.org header.s=pp header.b=shDcZsAU; dkim=pass header.i=@raspberrypi-org.20150623.gappssmtp.com header.s=20150623 header.b=Va8S0xDM; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j123si361424pfd.207.2018.04.19.07.33.57; Thu, 19 Apr 2018 07:34:11 -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=fail header.i=@raspberrypi.org header.s=pp header.b=shDcZsAU; dkim=pass header.i=@raspberrypi-org.20150623.gappssmtp.com header.s=20150623 header.b=Va8S0xDM; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753229AbeDSOcn (ORCPT + 99 others); Thu, 19 Apr 2018 10:32:43 -0400 Received: from mx07-00252a01.pphosted.com ([62.209.51.214]:53923 "EHLO mx07-00252a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752558AbeDSOcY (ORCPT ); Thu, 19 Apr 2018 10:32:24 -0400 Received: from pps.filterd (m0102628.ppops.net [127.0.0.1]) by mx07-00252a01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3JENEuK013229 for ; Thu, 19 Apr 2018 15:32:23 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pp; bh=xSSD9SvLCvUPLV3TsLO9yFBlCax29EsDDiA9e9toJmo=; b=shDcZsAURJl9j5Qmij4o1DuWAePdxmR05Ktd35GzZ32KALSqeMJHcIDY1eXM+KXmEeW6 gYdeXuLj2tfm0i/EDbG1XstjaPKVS5y1CMfnZ1D/pBsxFCOI8honbLZFwVK1UdPMaW9I S2EE6ty9qIC2hzSYw2pJYWNfx0+8l/LuxMLXXNVHVb+JnOjd7HY0gKjGlbD5e4NjFXaA CcdLFzEFdbXFUifBwJEeqh1KKv9+LEkK6FxCkrFcOp6nnOGFvBq4TEAArnI7GEazYBvN EYRbf2BC6Jir23UZzJhWz91HQigravIBy/agrVWT9eNTNPI/UOMn3qKwSsiqw6Qi4Zfh iQ== Received: from mail-wr0-f198.google.com (mail-wr0-f198.google.com [209.85.128.198]) by mx07-00252a01.pphosted.com with ESMTP id 2hdrya8wwp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Thu, 19 Apr 2018 15:32:23 +0100 Received: by mail-wr0-f198.google.com with SMTP id p4-v6so5342630wrf.17 for ; Thu, 19 Apr 2018 07:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xSSD9SvLCvUPLV3TsLO9yFBlCax29EsDDiA9e9toJmo=; b=Va8S0xDMUExnUhtXMWb8OHenp52JQUiI9G9/6TZ8H4Wca0/9e80yyqyqLOsA628TzP M2BXlGR27rkNiAIY6SyxyYqwPvXPrNf/b5jKAOGBBmnyLqz4fjJac8wzX4VwcrxdS+vF 4HTfV0stmQeg0Pyc1UqfLQQdjyn3b7ox6lDfC0S8BfFyvkQssZksffZ9Kzk9y5UzFL8p 6BFNjWMdXkVF6OgolEKvdg0LNvgGSs/IHS2bGG1jht/BEtvzVFWaSCc80ZcXkYVum3Qu CiCGI4ISGagB/P741CCfj4yE6PGftw1w8d7anzChGtW8jJBWlvin92u2v4tiikbl1nYJ jRkw== 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; bh=xSSD9SvLCvUPLV3TsLO9yFBlCax29EsDDiA9e9toJmo=; b=KhQV3nPdQHRO2Lo3GEj6Nt8InvxXKPcd5sdltjjNgDq6WeQ4nVpWVot876wYq4onK3 Uw0Mte9TlJX06c8nkMn61CGxrjnSbwtOk3I0AxWkiW4Cp69i7KXEOZkQDBgpQMtnOoSc SdR/lb6VpKiO6tHxP5omSABW6EUY2dPNWC9ms84s/4N1VQ1igZvptf1HHWDL90o6s3CX S2YSvqUzgrdCVoWBA7+aLhNSQvOnIbzBbFX7trtihDajcLSVPzN95CEhozkn/buVz4/C lJYdUl+7MmqfjgKDCrmCDkS/R2pqcEU/fulEy7+2AzEhfS6XK7s29e9DUdbsXSinbz9k Chrw== X-Gm-Message-State: ALQs6tCsgO0ISyqIBBB1nE2C0YT1S/gdMTwwQkmaL5O4/stWdUVZVy7Z 0TlOqXmn3M4NSMV9f/WfmZJS+jJMnxeeN9V85M0IYl4sc72FGyr4h2xRI1mM6hsECxmXFw+7i80 3bUz2GgZ9KjA++fARN/sW2SrT X-Received: by 10.28.179.196 with SMTP id c187mr4494316wmf.21.1524148342448; Thu, 19 Apr 2018 07:32:22 -0700 (PDT) X-Received: by 10.28.179.196 with SMTP id c187mr4494301wmf.21.1524148342179; Thu, 19 Apr 2018 07:32:22 -0700 (PDT) Received: from buildbot.pitowers.org ([2a00:2381:fdf7:14:3509:880e:14cc:3c11]) by smtp.gmail.com with ESMTPSA id i44-v6sm3465473wri.17.2018.04.19.07.32.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Apr 2018 07:32:20 -0700 (PDT) From: Phil Elwell To: Woojung Huh , Microchip Linux Driver Support , Rob Herring , Mark Rutland , "David S. Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Linus Walleij , Andrew Morton , Randy Dunlap , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Cc: Phil Elwell Subject: [PATCH v3 3/3] dt-bindings: Document the DT bindings for lan78xx Date: Thu, 19 Apr 2018 15:32:05 +0100 Message-Id: <1524148325-78945-5-git-send-email-phil@raspberrypi.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524148325-78945-1-git-send-email-phil@raspberrypi.org> References: <1524148325-78945-1-git-send-email-phil@raspberrypi.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-19_05:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Microchip LAN78XX family of devices are Ethernet controllers with a USB interface. Despite being discoverable devices it can be useful to be able to configure them from Device Tree, particularly in low-cost applications without an EEPROM or programmed OTP. Document the supported properties in a bindings file. Signed-off-by: Phil Elwell --- .../devicetree/bindings/net/microchip,lan78xx.txt | 54 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/microchip,lan78xx.txt diff --git a/Documentation/devicetree/bindings/net/microchip,lan78xx.txt b/Documentation/devicetree/bindings/net/microchip,lan78xx.txt new file mode 100644 index 0000000..a5d701b --- /dev/null +++ b/Documentation/devicetree/bindings/net/microchip,lan78xx.txt @@ -0,0 +1,54 @@ +Microchip LAN78xx Gigabit Ethernet controller + +The LAN78XX devices are usually configured by programming their OTP or with +an external EEPROM, but some platforms (e.g. Raspberry Pi 3 B+) have neither. +The Device Tree properties, if present, override the OTP and EEPROM. + +Required properties: +- compatible: Should be one of "usb424,7800", "usb424,7801" or "usb424,7850". + +Optional properties: +- local-mac-address: see ethernet.txt +- mac-address: see ethernet.txt + +Optional properties of the embedded PHY: +- microchip,led-modes: a 0..4 element vector, with each element configuring + the operating mode of an LED. Omitted LEDs are turned off. Allowed values + are defined in "include/dt-bindings/net/microchip-lan78xx.h". + +Example: + +/* Based on the configuration for a Raspberry Pi 3 B+ */ +&usb { + usb1@1 { + compatible = "usb424,2514"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + usb1_1@1 { + compatible = "usb424,2514"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + ethernet: usbether@1 { + compatible = "usb424,7800"; + reg = <1>; + local-mac-address = [ 00 11 22 33 44 55 ]; + + mdio { + #address-cells = <0x1>; + #size-cells = <0x0>; + eth_phy: ethernet-phy@1 { + reg = <1>; + microchip,led-modes = < + LAN78XX_LINK_1000_ACTIVITY + LAN78XX_LINK_10_100_ACTIVITY + >; + }; + }; + }; + }; + }; +}; diff --git a/MAINTAINERS b/MAINTAINERS index 23735d9..91cb961 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14572,6 +14572,7 @@ M: Woojung Huh M: Microchip Linux Driver Support L: netdev@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/net/microchip,lan78xx.txt F: drivers/net/usb/lan78xx.* F: include/dt-bindings/net/microchip-lan78xx.h -- 2.7.4