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: 901395 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=raspberrypi.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=raspberrypi.org header.i=@raspberrypi.org header.b="h+m/pICT"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi-org.20150623.gappssmtp.com header.i=@raspberrypi-org.20150623.gappssmtp.com header.b="PSfskWQo"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40Rlbk69YSz9s1w for ; Fri, 20 Apr 2018 03:00:18 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753386AbeDSRAP (ORCPT ); Thu, 19 Apr 2018 13:00:15 -0400 Received: from mx08-00252a01.pphosted.com ([91.207.212.211]:33750 "EHLO mx08-00252a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753251AbeDSRAN (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 w3JGwthi021504 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-f200.google.com (mail-wr0-f200.google.com [209.85.128.200]) by mx08-00252a01.pphosted.com with ESMTP id 2hdry78yu2-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-f200.google.com with SMTP id c56-v6so5915679wrc.5 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=eQTsyushucMyXICz2lo7o0d+RW6ViJxk/aWGeY7AfBOtLfGaU8oaf89ghW1mxsrae3 mLaMORfxOYb885u8WhquRP28WebniO6UGAE8iOJQpdlWzvl2uOgJoJhCo5Ec5DoxGUc3 pTqhI2aPehcGo6O8ebNOaMcsd142HScQPQGQsObDOwOECnxPoztTX/zocvpHtsNwDThn iuuZ7+L3IhHkL43wTwsn+1FtP4IWgOgL+QeUr6dBA/XDslrUFI/Ov62+JEFS5ialK28U ugXpG6vw/wSOxzZd0GyrA2XvFYntl78ODH49ZkCgZpaKBkP2ndfs9Wh3QKyEKzpoxBOD +xLg== X-Gm-Message-State: ALQs6tCJ4XYP+xEurpHUzdSZpSV+eaP+fDyatEEL9yq/qErBZi+FSLSC gVDUXcfGD2FMCdcf4CEjscD6LUKLu8RdX1z0Oq7Pg3fgeZ4hfbyEZ4zMQj0T5MwNfLB2viO/Ztg gBYK59n4B2i8cNcgCSv/fLg== X-Received: by 2002:adf:b2f4:: with SMTP id g107-v6mr5489379wrd.205.1524157210912; 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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