From patchwork Wed Apr 18 15:45:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Elwell X-Patchwork-Id: 10348583 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 97EBB60244 for ; Wed, 18 Apr 2018 15:46:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8955A286F9 for ; Wed, 18 Apr 2018 15:46:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D50F28705; Wed, 18 Apr 2018 15:46:09 +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=unavailable 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 D78B2286F9 for ; Wed, 18 Apr 2018 15:46:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753833AbeDRPpl (ORCPT ); Wed, 18 Apr 2018 11:45:41 -0400 Received: from mx07-00252a01.pphosted.com ([62.209.51.214]:5767 "EHLO mx07-00252a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753941AbeDRPpg (ORCPT ); Wed, 18 Apr 2018 11:45:36 -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 w3IFYJLg029016 for ; Wed, 18 Apr 2018 16:45:34 +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=wUE2TTVV8QF3wix5vZWhrGyAHU9PTxsEiBoyo+Df3o4=; b=xPukQPD9Etdo+OChx3fj1EiyIVzXXBehns450wiiEu2DQ9HCrGq+xoyJ12+BZ3LdVgTr 0d0YDAp+mZAlPw4gkKws6X9BE92+ScE1+ocyq6kyjfg2T1F3z0/7IrQPK9vJYw6NPp2b sWDpv2R5XYd0DBql9ltoe+pe2LT5K7jB6lT71a2ztAnfIv0wEgikzNlSN+FIZj2lWHUG +IlrvyDMmmLkWQ5+oNL9as/XMoxZLrtKEMfa5OOPXVjmuZs4Hx/cau9yWnvC9/5EVZpn 1rDIponfa2xLxwOdxitbUvDPZE3utzHy7x14dmoK+xSUwsa1tda93Jieu0/vsEL7RzYU 9w== Received: from mail-wr0-f200.google.com (mail-wr0-f200.google.com [209.85.128.200]) by mx07-00252a01.pphosted.com with ESMTP id 2hdrya8dsp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Wed, 18 Apr 2018 16:45:34 +0100 Received: by mail-wr0-f200.google.com with SMTP id p11-v6so2221489wrd.20 for ; Wed, 18 Apr 2018 08:45:34 -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=wUE2TTVV8QF3wix5vZWhrGyAHU9PTxsEiBoyo+Df3o4=; b=s7VJWtnv7zRGMzglASv+1imVlVYnqdL0s3Y0bhE4IZ/YrClwZyTBfVSq53NvzlilIT akvw9LIYvInP6YaICkak+KKUaFzH2EzOPGmib1/MJDrPdNBZUnbldNnaiANSAPyF9XK/ uWYqjoG6s8TsiWUvR3eOLnHHzudqBpSQ6xypxhql7PRmROv+EAyNkuSuAmwq+HTr44ll wLXZacr1jPmo++8VQWZurBpx5Li7l6GqH5UyuXdi4rUa6qMTgN+dum1RK9zt+hwWMA5z eNtG8sEIMUF2M+Qa39g0lh7rJ4HOUrhjMiPnu1AlFJEGuiJ5cL+sPw9qA3mmrDYaNEIR OXLg== 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=wUE2TTVV8QF3wix5vZWhrGyAHU9PTxsEiBoyo+Df3o4=; b=jU1/Ac8tzXZxH21O9/wr3ZKubdX0iQaTQPdv437c6etVYcQ8zaFWFP2M697Ia6fQXl p05I83VjnoYEBEcKIugKZEGx7T/Cj6CNu2fGdK99uf4XuLc8TlFOv2A/uahov0ChrZSj fgYa2hUrsYZobj2UKGH0NKoKsgqKUFT6r9qgfPUuo3x7+iOEgFVJBGfUEK05s5aHPWDg iHmImd67IZX+gigCoZYueQ4Vzkos9fajljYEev9hxh6boxXcsrx4DQCl8gy9LhegEjAQ U2vPqka8V7IVriA/bhDn6zoHluGhBm3ApDglUgflabFLgjNafHPI9Je4jkLmVTcSXtCJ ddTg== X-Gm-Message-State: ALQs6tB5ui4p67p2ooECLwtrwxb36UC/PjhcsemMJvKCNMYgUa511G37 9o61j4VksHaa5c/FDcr6ypUDYKwCWiLLSsy5DyJqG9DDiz2OVhMrb11QsRiJZ7o9AjRHM2NyHK5 o//HtSRQ8G+V265cpOXPU X-Received: by 10.28.150.71 with SMTP id y68mr2262500wmd.139.1524066332622; Wed, 18 Apr 2018 08:45:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx49FepXo2Ntwt7KsxmxmYBtFYPcqZlnz5SczesDyBo6RXY/u12twqLnYs4F47NypoTfr8b45YQ== X-Received: by 10.28.150.71 with SMTP id y68mr2262474wmd.139.1524066332392; Wed, 18 Apr 2018 08:45:32 -0700 (PDT) Received: from buildbot.pitowers.org ([2a00:2381:fdf7:14:7931:3b7a:4272:adad]) by smtp.gmail.com with ESMTPSA id n79sm2752689wmi.20.2018.04.18.08.45.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Apr 2018 08:45:31 -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 v2 3/3] dt-bindings: Document the DT bindings for lan78xx Date: Wed, 18 Apr 2018 16:45:23 +0100 Message-Id: <1524066323-109628-4-git-send-email-phil@raspberrypi.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524066323-109628-1-git-send-email-phil@raspberrypi.org> References: <1524066323-109628-1-git-send-email-phil@raspberrypi.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-04-18_03:, , 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 --- .../devicetree/bindings/net/microchip,lan78xx.txt | 44 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 45 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..fa68f9b --- /dev/null +++ b/Documentation/devicetree/bindings/net/microchip,lan78xx.txt @@ -0,0 +1,44 @@ +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 +- 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-78xx.h". + +Example: + +/* Standard 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 ]; + microchip,led-modes = < + LAN78XX_LINK_1000_ACTIVITY + LAN78XX_LINK_10_100_ACTIVITY + >; + }; + }; + }; +}; diff --git a/MAINTAINERS b/MAINTAINERS index 9c9bc63..5352bbb 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-78xx.h