Received: by 10.192.165.156 with SMTP id m28csp944989imm; Thu, 19 Apr 2018 10:04:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/DgJX91bxPST3q7ZujqLEnjRSNq/twnqvTKtnDswjMhWtxaRW6V2KLs4QnJIiIqrnTBvi1 X-Received: by 2002:a17:902:24a5:: with SMTP id w34-v6mr6951867pla.328.1524157461132; Thu, 19 Apr 2018 10:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524157461; cv=none; d=google.com; s=arc-20160816; b=dLJ7/MfvQqPt8tA5JrEOpaLVfWW3no5ykEq+O8Xc9Rgiz3tslIkRvKR59f0gHKMNpu aOuU/ccdhXByJ/WNVrvWoDS2p58ys7OUBOdfxLTBQWAQwwN8wZ2OcKtmWlkkbnE3izPu wlKbgPeOOPySs1+VPSCCqh3NOBpk5Gu718+fDpREwYVw6KUUvR8mOr7VJ4rqJLX5G594 rpY1ItlfvvF3N/ITyf2lfVg/Eji0PbfyYWin+ZlLmobVU8kVshfDAPk1yjTmsDvtm9ig O/t1BQOZtpkreAXZzzblpDY4J0bhzatn+8cHk8tzb5tghX/rwrgEXJOB6SGaKdj5BavA NUPA== 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:to:from:dkim-signature:dkim-signature :arc-authentication-results; bh=+GKwHBVUMoSC7ff+g4T4vfiNFuRbiSNaYSN+75qp6x4=; b=RQCW/iCG4V6TPsASkt3SAMZPnrSnbvKbaHcaFE3IJMQXayHMCCf1AM8vIHkr9lQWqL K0PkDcoJkD1oNVuLjA0MOxHWXnaPKGzrcBNPiONlknESiC/odzurBlzFhWgEh17uKHZC fVKgOFF41YZeEvzGSM07W0B86iCNzEWQwIW3IuZPfOR9zbyx/uT7eu7uDlCiyCEhF3+E JGzBvBKnDB+qMBMrLJA43xIVe1bD7WRqDL4EZU60jFeUaY1SLoCngTxHs0Wh/Encpjk+ LqmM4qS0ZTapILwLYtruBvz4bc1b+WOzFc/LyBuwX4MQ4TIvb/JvwaAsnCgvAJ2H+feM 3jMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@raspberrypi.org header.s=pp header.b=h+m/pICT; dkim=pass header.i=@raspberrypi-org.20150623.gappssmtp.com header.s=20150623 header.b=PSfskWQo; 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 f14si3192325pgt.115.2018.04.19.10.04.02; Thu, 19 Apr 2018 10:04:21 -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=h+m/pICT; dkim=pass header.i=@raspberrypi-org.20150623.gappssmtp.com header.s=20150623 header.b=PSfskWQo; 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 S1753721AbeDSRBP (ORCPT + 99 others); Thu, 19 Apr 2018 13:01:15 -0400 Received: from mx08-00252a01.pphosted.com ([91.207.212.211]:33748 "EHLO mx08-00252a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753498AbeDSRAM (ORCPT ); Thu, 19 Apr 2018 13:00:12 -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 w3JH078m022293 for ; Thu, 19 Apr 2018 18:00:11 +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 2hdry78yu1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Thu, 19 Apr 2018 18:00:11 +0100 Received: by mail-wr0-f199.google.com with SMTP id e15-v6so5886489wrj.14 for ; Thu, 19 Apr 2018 10:00:11 -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=lsXC9Ca7MW+CZAJtEBdj6rYqQXYBx06C79nOjVazPFKA2wYKvkP6bBhyrnOghdZz+C ZGkY2gac1KggjQz/NbbXA9dxPsrMevEz8zpaOTtuWkuLeJtJnoW6YG9OI0Svos7jFIDg okbc7kwPABBB4IrkN4RIklFpy0VV5ESYY0pGi3stlQms0m+o8jF0diQxB9JxPxWEmTsi Nu1LSCc0kMtCEQszW3YGXavwPDtCkcFCUEqwRKVxVdL7mE7JplK50/heqCipCN3e6ZhX GAbDyLIjutXGBbj0GDu8NYkQ2MXXbM0I9NbuZtHxNubNMJI0AoeSZupodIZkyrOXwkCB 7qYQ== X-Gm-Message-State: ALQs6tCSCO5mnxsrJzD69QyZxOXqwsr/kRqcsntPJzHZYBUH0djSbaLz 7bkzLOn+4fYG4fzAZSPf5upzIpE6bvJLgfYcNt2/8zc1mnM8tD9U9++EFC2amy8HHP+NuDgZYES hByUwib8ZDYMYgWSYfNnc1kcA X-Received: by 2002:adf:b2f4:: with SMTP id g107-v6mr5489395wrd.205.1524157210950; Thu, 19 Apr 2018 10:00:10 -0700 (PDT) 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-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 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 -- 2.7.4