All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt: bindings: Add a generic ethernet device binding
@ 2016-07-13 10:20 ` Hans de Goede
  0 siblings, 0 replies; 20+ messages in thread
From: Hans de Goede @ 2016-07-13 10:20 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Maxime Ripard, Chen-Yu Tsai, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	Hans de Goede

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 <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 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>;
+	};
+};
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2016-07-17  1:02 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-13 10:20 [PATCH] dt: bindings: Add a generic ethernet device binding Hans de Goede
2016-07-13 10:20 ` Hans de Goede
2016-07-14 23:17 ` David Miller
2016-07-14 23:17   ` David Miller
     [not found]   ` <20160714.161707.2089949241813985527.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2016-07-15  6:40     ` Hans de Goede
2016-07-15  6:40       ` Hans de Goede
     [not found]       ` <47a052a1-cc8b-0f75-e44a-450c4a0ac075-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-07-15  6:44         ` Hans de Goede
2016-07-15  6:44           ` Hans de Goede
2016-07-15 17:51         ` David Miller
2016-07-15 17:51           ` David Miller
     [not found]           ` <20160715.105158.2028840258568316933.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2016-07-16 10:12             ` Hans de Goede
2016-07-16 10:12               ` Hans de Goede
2016-07-17  1:02               ` David Miller
2016-07-17  1:02                 ` David Miller
     [not found] ` <1468405204-5845-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-07-15 20:42   ` Arnd Bergmann
2016-07-15 20:42     ` Arnd Bergmann
2016-07-16 10:18     ` Hans de Goede
2016-07-16 10:18       ` Hans de Goede
     [not found]       ` <289d5b2e-6232-2c91-f11d-774265e05125-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-07-16 19:19         ` Arnd Bergmann
2016-07-16 19:19           ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.