From patchwork Wed Jul 13 10:20:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 9227337 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 F329A6075D for ; Wed, 13 Jul 2016 10:22:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E378527D85 for ; Wed, 13 Jul 2016 10:22:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D78C927F17; Wed, 13 Jul 2016 10:22:15 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6536F27D85 for ; Wed, 13 Jul 2016 10:22:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNHHO-0007Ci-Fb; Wed, 13 Jul 2016 10:20:34 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNHHL-00079o-Kq for linux-arm-kernel@lists.infradead.org; Wed, 13 Jul 2016 10:20:32 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EF93D78225; Wed, 13 Jul 2016 10:20:09 +0000 (UTC) Received: from shalem.localdomain.com (vpn1-7-199.ams2.redhat.com [10.36.7.199]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6DAK6GT023023; Wed, 13 Jul 2016 06:20:07 -0400 From: Hans de Goede To: Rob Herring , Mark Rutland Subject: [PATCH] dt: bindings: Add a generic ethernet device binding Date: Wed, 13 Jul 2016 12:20:04 +0200 Message-Id: <1468405204-5845-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 13 Jul 2016 10:20:11 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160713_032031_883478_12E6B74E X-CRM114-Status: GOOD ( 15.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree , netdev@vger.kernel.org, Hans de Goede , Chen-Yu Tsai , Maxime Ripard , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On some boards (android tablets) different batches use different sdio wifi modules. This is not a problem since sdio is a discoverable bus, so we only need to describe and activate the mmc controller in dt and then the kernel will automatically load the right driver. But sometimes it is useful to specify certain ethernet properties for these "unknown" sdio devices, specifically we want the boot-loader to be able to set "local-mac-address" as some of these sdio wifi modules come without an eeprom / without a factory programmed mac address. Since the exact device is unknown (differs per batch) we cannot use a wifi-chip specific compatible. This commit adds a new "generic,ethernet" binding for use in dt-nodes describing such an unknown ethernet device. Cc: Maxime Ripard Signed-off-by: Hans de Goede --- Documentation/devicetree/bindings/net/generic.txt | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/generic.txt diff --git a/Documentation/devicetree/bindings/net/generic.txt b/Documentation/devicetree/bindings/net/generic.txt new file mode 100644 index 0000000..2325709 --- /dev/null +++ b/Documentation/devicetree/bindings/net/generic.txt @@ -0,0 +1,30 @@ +* Generic ethernet controller + +This binding is for ethernet devices which need a dt node so that certain +standard properties, e.g. a mac-address can be specified via dt, but +otherwise can be detected automatically as they are on a discoverable bus. + +Required properties: +- compatible: should be "generic,ethernet" + +Optional properties: +- See bindings/ethernet.txt + +Example: + +/ { + aliases { + /* Make u-boot set mac-address for the sdio-wifi (no eeprom) */ + ethernet0 = &sdio_wifi; + }; +}; + +&mmc1 { + non-removable; + status = "okay"; + + sdio_wifi: sdio_wifi@1 { + compatible = "generic,ethernet" + reg = <1>; + }; +};