Hi, On 01/28/2014 11:11 AM, Arend van Spriel wrote: > On 01/27/2014 11:12 AM, Tomasz Figa wrote: >>> The brcmfmac driver that consumes these DT nodes will have a closer look >>> at the device obtaining the chipid during the probe and determine if it >>> can support it. So the compatible string indicates that the device needs >>> a so-called fullmac wireless driver opposed to a mac80211 aka. softmac >>> wireless driver. >> >> The compatible string should guarantee that the chip ID register holds a >> valid value, so just "wifi-fullmac" or "brcmfmac" sounds too generic to > > I am not sure I understand this requirement. Is the DT node claimed > somehow after of_find_matching_node() and unavailable to other drivers. > >> me. The string must specify the family of chips with this chip ID scheme >> in a reasonably precise way. "brcm,bcm43xx-fmac" maybe? I still see a >> risk of, say, BCM43999 showing up, which would be a completely different >> chip. while having the model matching the pattern. > > If a completely different chip, ie. BCM43999, shows up in a board the > device tree should not use "brcm,bcm43xx-fmac". That would be an error > in the dts file, right? All the devices listed in your bindings patch > are treated the same, ie. *compatible* on DT level and hence can have > the same compatible property. > > In my opinion that is what the compatible property is about. It > identifies how a specific category of devices is accessed/configured. As > an example please see [1]. It shows one compatible string for a binding > that is used for different MPIC controllers. > > Just to be clear, I like your suggestion to use "brcm,bcm43xx-fmac", but > felt you did not so added my explanation/point of view. The usual way to solve this is to have the dts file have a list of compatibility strings going from specific to more generic, so for ie the wifi on the cubietruck the dts file would contain: compatible = "brcm,bcm43362", "brcm,bcm43xx-fmac"; And then the brcmfmac driver will contain .compatible = "brcm,bcm43xx-fmac" If we then ever need to have some specific quirks in the driver the driver can use of_device_is_compatible(dev->of_node, "brcm,bcm43362") to check for the 43362. Their could even be a completely separate driver for the "brcm,bcm43362", with brcmfmac still claiming "brcm,bcm43xx-fmac", as matching is done from left to right, so if there is a specific driver and a more generic one the specific driver will win (assuming both are built-in / loaded at probe time). TL;DR: dts file should have: compatible = "brcm,bcm43362", "brcm,bcm43xx-fmac"; brcmfmac should have: .compatible = "brcm,bcm43xx-fmac", So that we can add device specific quirks later (if necessary). Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html