From patchwork Thu Apr 19 16:59:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Elwell X-Patchwork-Id: 10351373 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F24A66053C for ; Thu, 19 Apr 2018 17:01:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2E352000A for ; Thu, 19 Apr 2018 17:01:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D70C721327; Thu, 19 Apr 2018 17:01:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B08452000A for ; Thu, 19 Apr 2018 17:01:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753579AbeDSRBF (ORCPT ); Thu, 19 Apr 2018 13:01:05 -0400 Received: from mx08-00252a01.pphosted.com ([91.207.212.211]:33758 "EHLO mx08-00252a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753503AbeDSRAN (ORCPT ); Thu, 19 Apr 2018 13:00:13 -0400 Received: from pps.filterd (m0102629.ppops.net [127.0.0.1]) by mx08-00252a01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3JH078n022293 for ; Thu, 19 Apr 2018 18:00:12 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; h=from : to : subject : date : message-id : in-reply-to : references; s=pp; bh=+GKwHBVUMoSC7ff+g4T4vfiNFuRbiSNaYSN+75qp6x4=; b=h+m/pICTHOqk/9kIIZCSqISyfuzNsy+9j/sdzPIGFHBti4PtDE/aQ/xt1OzzJ+egfvTL VGL2W2rD8n+ekUhFPofrt73jirR83rCmRXD5UQgiXEBNfmLVIztXZXZ3yoyNrYRq+Fen Tbj6o4FEq5l2SW91R4GVIbLwt+Kifj+iCPio20bcaRnGjcv0yZE1VCelfbJa1IqYwfuj xVqTJNRb6FXThYWywcUDG975NKom7H3ERGaJ2AkaKsPiKstQe+d490l/VcNpqI12OGhj Coahlov1XVxqlO5quJA8VN6eObsYEgnwurVCYU0nniT1vlx0vNHuaW8xnDCF77XSBXzq mQ== Received: from mail-wr0-f199.google.com (mail-wr0-f199.google.com [209.85.128.199]) by mx08-00252a01.pphosted.com with ESMTP id 2hdry78yu6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Thu, 19 Apr 2018 18:00:12 +0100 Received: by mail-wr0-f199.google.com with SMTP id h1-v6so5916741wre.0 for ; Thu, 19 Apr 2018 10:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=+GKwHBVUMoSC7ff+g4T4vfiNFuRbiSNaYSN+75qp6x4=; b=PSfskWQoKIejWgMYPDYyKLnAip0KI7XCpvQnNwHmmX3L69HL2PE+4EioopDB4iAPpn BH/+KUGcy5n5ar6H9qLqy4YifxssHrNis4k03RLdxmaPrPodLX68DhSxAHRpZM4w9v2u A7eoyLTQpF7ldcz991XHVqxKK+N5S0AxUryrEJE5C/BDVyBFY1Y+Mfnn1x/tmvfA86oA 00WsmSigpkTKeecQtqWbmL/K6tQs9o+dNiXx6LORkNBdP8+IDpC3Dq0Q+YalRnfhtqCa f1BkIRa9Ld6OQFNucrwPCJ7O/7updnAq7FvzisRKLK6gh53mmaLoL/UBxo6bsLOGM952 /TGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=+GKwHBVUMoSC7ff+g4T4vfiNFuRbiSNaYSN+75qp6x4=; b=X88kmH31kmiCprZ+n2ZFGwf93rSId01YszHE0zbsB4+cFwxP6DFpM2KyvdU152YXn5 obLCX/OI3AN9EFkY7/AwcPN2knV1LIN8c81rit+tTkp9276lh6mODLhpfTMppsp/BBqP Kpfp9rRu/YHOCF3ONsQiuay2XeWo/k9tNoR83pkFB4JzvSr0PxHnTPLqC+huGhRwBJ9C dl57SJlevEfm137QgJKjWZ6d9uTvomUJiDoWrQBRYwWX0Y/xCiysf1XI/Ryp/BAd+lWX rWP2g7sLEqfIMg5GUSUnJZb+ZuFEts6QkJ405TIlWUjwfRzP8WpSsrx0zSrVCWCvjLRM y73Q== X-Gm-Message-State: ALQs6tCF5fLEHcCQnO/Jhj4rGdop36PKGmCBmqDs6PQkoowPiO/HxVx5 wMkpdCUWiTc+WKI70wRMxbZtmkWrhrRJpceSb+dZm4SCptnNpPSvYOQlbSjF/Afei1Kvs7nv7VR cq7J/ooPL6vq5qn50EBkz X-Received: by 2002:adf:b2f4:: with SMTP id g107-v6mr5489387wrd.205.1524157210930; Thu, 19 Apr 2018 10:00:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx48t81/ZHBPmtlMLnRM/K7nG4gEMtxJoXIQcPcLLDePImwipLar5P+eF/3swVC4AGkih8HjSnA== X-Received: by 2002:adf:b2f4:: with SMTP id g107-v6mr5489369wrd.205.1524157210671; Thu, 19 Apr 2018 10:00:10 -0700 (PDT) Received: from buildbot.pitowers.org ([2a00:2381:fdf7:14:3509:880e:14cc:3c11]) by smtp.gmail.com with ESMTPSA id a139sm5581532wma.43.2018.04.19.10.00.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Apr 2018 10:00:09 -0700 (PDT) From: Phil Elwell To: Woojung Huh , Microchip Linux Driver Support , Rob Herring , Mark Rutland , Andrew Lunn , Florian Fainelli , "David S. Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Linus Walleij , Andrew Morton , Randy Dunlap , Phil Elwell , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH v4 3/3] dt-bindings: Document the DT bindings for lan78xx Date: Thu, 19 Apr 2018 17:59:40 +0100 Message-Id: <1524157180-27276-4-git-send-email-phil@raspberrypi.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524157180-27276-1-git-send-email-phil@raspberrypi.org> References: <1524157180-27276-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-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Andrew Lunn --- .../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..76786a0 --- /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 { + usb-port@1 { + compatible = "usb424,2514"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + usb-port@1 { + compatible = "usb424,2514"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + ethernet: ethernet@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