Message ID | 1424362401-8228-1-git-send-email-eliad@wizery.com |
---|---|
State | Superseded, archived |
Headers | show |
On Thu, 2015-02-19 at 18:13 +0200, Eliad Peller wrote: > Add device tree binding documentation for TI's wl18xx > wlan chip. > > Signed-off-by: Eliad Peller <eliad@wizery.com> > --- If, as I said in the other thread, you use the work I did earlier, support for wl12xx will also be included... -- Luca. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thursday 19 February 2015 18:13:20 Eliad Peller wrote: > +Required properties: > + - compatible : Should be "ti,wl18xx". Do not use wildcards in the compatible string, use specific model numbers. Arnd -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thursday 19 February 2015 18:13:21 Eliad Peller wrote: > + > +static struct wl12xx_platform_data *wlcore_probe_of(struct device *dev) > +{ > + struct device_node *np = dev->of_node; > + struct wl12xx_platform_data *pdata; > + > + if (!np || !of_match_node(wlcore_sdio_of_match_table, np)) { > + dev_err(dev, "No platform data set\n"); > + return NULL; > + } > + > + pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); > + if (!pdata) > + return NULL; > + > + pdata->irq = irq_of_parse_and_map(np, 0); > + if (!pdata->irq) { > + dev_err(dev, "No irq in platform data\n"); > + kfree(pdata); > + return NULL; > + } > + > + return pdata; > +} > +#else > +static struct wl12xx_platform_data *wlcore_probe_of(struct device *dev) > +{ > + return NULL; > +} > +#endif > + > +static struct wl12xx_platform_data * > +wlcore_get_platform_data(struct device *dev) > +{ > + struct wl12xx_platform_data *pdata; > + > + pdata = wl12xx_get_platform_data(); > + if (!IS_ERR(pdata)) > + return kmemdup(pdata, sizeof(*pdata), GFP_KERNEL); > + > + return wlcore_probe_of(dev); > +} I think the probe_of needs to come first here, otherwise you cannot override the pdata quirk with actual DT data. I've looked up the what boards actually use this data and found that all of them already support booting from DT: some omap2 boards using arch/arm/mach-omap2/pdata-quirks.c to provide the data, and the davinci 850evm. Can you make sure you add the correct data to all of these dts files as part of your series and remove the wl12xx_platform_data references? Arnd -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Feb 27, 2015 at 10:14 AM, Arnd Bergmann <arnd@arndb.de> wrote: > On Thursday 19 February 2015 18:13:20 Eliad Peller wrote: >> +Required properties: >> + - compatible : Should be "ti,wl18xx". > > Do not use wildcards in the compatible string, use specific model numbers. ok. i'll change it to ti,wl1835 and ti,wl1837 thanks, Eliad. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Feb 27, 2015 at 10:26 AM, Arnd Bergmann <arnd@arndb.de> wrote: > On Thursday 19 February 2015 18:13:21 Eliad Peller wrote: >> + >> +static struct wl12xx_platform_data *wlcore_probe_of(struct device *dev) >> +{ >> + struct device_node *np = dev->of_node; >> + struct wl12xx_platform_data *pdata; >> + >> + if (!np || !of_match_node(wlcore_sdio_of_match_table, np)) { >> + dev_err(dev, "No platform data set\n"); >> + return NULL; >> + } >> + >> + pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); >> + if (!pdata) >> + return NULL; >> + >> + pdata->irq = irq_of_parse_and_map(np, 0); >> + if (!pdata->irq) { >> + dev_err(dev, "No irq in platform data\n"); >> + kfree(pdata); >> + return NULL; >> + } >> + >> + return pdata; >> +} >> +#else >> +static struct wl12xx_platform_data *wlcore_probe_of(struct device *dev) >> +{ >> + return NULL; >> +} >> +#endif >> + >> +static struct wl12xx_platform_data * >> +wlcore_get_platform_data(struct device *dev) >> +{ >> + struct wl12xx_platform_data *pdata; >> + >> + pdata = wl12xx_get_platform_data(); >> + if (!IS_ERR(pdata)) >> + return kmemdup(pdata, sizeof(*pdata), GFP_KERNEL); >> + >> + return wlcore_probe_of(dev); >> +} > > I think the probe_of needs to come first here, otherwise you cannot > override the pdata quirk with actual DT data. > makes sense. i'll change it. > I've looked up the what boards actually use this data and found that > all of them already support booting from DT: some omap2 boards using > arch/arm/mach-omap2/pdata-quirks.c to provide the data, and the > davinci 850evm. Can you make sure you add the correct data to all > of these dts files as part of your series and remove the > wl12xx_platform_data references? AFAICT, these board files add wl12xx platform data, while the new DT support is only for wl18xx. Eliad. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sunday 08 March 2015 13:13:13 Eliad Peller wrote: > > > I've looked up the what boards actually use this data and found that > > all of them already support booting from DT: some omap2 boards using > > arch/arm/mach-omap2/pdata-quirks.c to provide the data, and the > > davinci 850evm. Can you make sure you add the correct data to all > > of these dts files as part of your series and remove the > > wl12xx_platform_data references? > > AFAICT, these board files add wl12xx platform data, while the new DT > support is only for wl18xx. > How can you tell the difference? What I see is that omap3pandora (and nothing else) calls wl1251_set_platform_data(), while da850-evm and all omap3/omap4 boards use wl12xx_set_platform_data(). The latter seems to refer to all wl12xx and wl18xx variants except for wl1251, based on my (very limited) understanding of that code. Arnd -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, Mar 8, 2015 at 11:53 PM, Arnd Bergmann <arnd@arndb.de> wrote: > On Sunday 08 March 2015 13:13:13 Eliad Peller wrote: >> >> > I've looked up the what boards actually use this data and found that >> > all of them already support booting from DT: some omap2 boards using >> > arch/arm/mach-omap2/pdata-quirks.c to provide the data, and the >> > davinci 850evm. Can you make sure you add the correct data to all >> > of these dts files as part of your series and remove the >> > wl12xx_platform_data references? >> >> AFAICT, these board files add wl12xx platform data, while the new DT >> support is only for wl18xx. >> > > How can you tell the difference? What I see is that omap3pandora > (and nothing else) calls wl1251_set_platform_data(), while > da850-evm and all omap3/omap4 boards use wl12xx_set_platform_data(). > > The latter seems to refer to all wl12xx and wl18xx variants except > for wl1251, based on my (very limited) understanding of that code. right. i got mislead because legacy_init_wl12xx() is defined there only for CONFIG_WL12XX (and not for CONFIG_WL18XX). it looks like only "isee,omap3-igep0020-rev-f" and "isee,omap3-igep0020-rev-g" have pdata quirks for wl18xx (and thus initialize the pdata clocks to 0). sorry for the trivial question, but what's the standard way to submit such patch? should i simply add a third patch to the patchset which removes the pdata quirk and adds the missing dts definition? i don't have such board, so i can only compile-test it. thanks, Eliad. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Monday 09 March 2015 09:18:46 Eliad Peller wrote: > On Sun, Mar 8, 2015 at 11:53 PM, Arnd Bergmann <arnd@arndb.de> wrote: > > On Sunday 08 March 2015 13:13:13 Eliad Peller wrote: > >> > >> > I've looked up the what boards actually use this data and found that > >> > all of them already support booting from DT: some omap2 boards using > >> > arch/arm/mach-omap2/pdata-quirks.c to provide the data, and the > >> > davinci 850evm. Can you make sure you add the correct data to all > >> > of these dts files as part of your series and remove the > >> > wl12xx_platform_data references? > >> > >> AFAICT, these board files add wl12xx platform data, while the new DT > >> support is only for wl18xx. > >> > > > > How can you tell the difference? What I see is that omap3pandora > > (and nothing else) calls wl1251_set_platform_data(), while > > da850-evm and all omap3/omap4 boards use wl12xx_set_platform_data(). > > > > The latter seems to refer to all wl12xx and wl18xx variants except > > for wl1251, based on my (very limited) understanding of that code. > > right. > i got mislead because legacy_init_wl12xx() is defined there only for > CONFIG_WL12XX (and not for CONFIG_WL18XX). > it looks like only "isee,omap3-igep0020-rev-f" and > "isee,omap3-igep0020-rev-g" have pdata quirks for wl18xx (and thus > initialize the pdata clocks to 0). Ok. > sorry for the trivial question, but what's the standard way to submit > such patch? should i simply add a third patch to the patchset which > removes the pdata quirk and adds the missing dts definition? i don't > have such board, so i can only compile-test it. Yes, I think that would be good. Depending on the complexity of the patch, you can do it in multiple ways: a) one patch to all the dts files, which also removes the legacy_init_wl12xx() infrastructure b) one patch to add the .dts changes, a second patch to remove the code from pdata-quirks.c and a third to remove the functionality in the driver c) one patch per board. I'm fine with any of these, but the omap maintainers might have a preference. Arnd -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Mar 9, 2015 at 10:50 AM, Arnd Bergmann <arnd@arndb.de> wrote: > On Monday 09 March 2015 09:18:46 Eliad Peller wrote: >> On Sun, Mar 8, 2015 at 11:53 PM, Arnd Bergmann <arnd@arndb.de> wrote: >> > On Sunday 08 March 2015 13:13:13 Eliad Peller wrote: >> >> >> >> > I've looked up the what boards actually use this data and found that >> >> > all of them already support booting from DT: some omap2 boards using >> >> > arch/arm/mach-omap2/pdata-quirks.c to provide the data, and the >> >> > davinci 850evm. Can you make sure you add the correct data to all >> >> > of these dts files as part of your series and remove the >> >> > wl12xx_platform_data references? >> >> >> >> AFAICT, these board files add wl12xx platform data, while the new DT >> >> support is only for wl18xx. >> >> >> > >> > How can you tell the difference? What I see is that omap3pandora >> > (and nothing else) calls wl1251_set_platform_data(), while >> > da850-evm and all omap3/omap4 boards use wl12xx_set_platform_data(). >> > >> > The latter seems to refer to all wl12xx and wl18xx variants except >> > for wl1251, based on my (very limited) understanding of that code. >> >> right. >> i got mislead because legacy_init_wl12xx() is defined there only for >> CONFIG_WL12XX (and not for CONFIG_WL18XX). >> it looks like only "isee,omap3-igep0020-rev-f" and >> "isee,omap3-igep0020-rev-g" have pdata quirks for wl18xx (and thus >> initialize the pdata clocks to 0). > > Ok. > >> sorry for the trivial question, but what's the standard way to submit >> such patch? should i simply add a third patch to the patchset which >> removes the pdata quirk and adds the missing dts definition? i don't >> have such board, so i can only compile-test it. > > Yes, I think that would be good. Depending on the complexity of the > patch, you can do it in multiple ways: > > a) one patch to all the dts files, which also removes the > legacy_init_wl12xx() infrastructure > > b) one patch to add the .dts changes, a second patch to remove the > code from pdata-quirks.c and a third to remove the functionality > in the driver > > c) one patch per board. > > I'm fine with any of these, but the omap maintainers might have a > preference. > thanks. i'll go with a single patch then (unless the maintainers prefer otherwise). Eliad. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wl18xx.txt b/Documentation/devicetree/bindings/net/wireless/ti,wl18xx.txt new file mode 100644 index 0000000..8120a81 --- /dev/null +++ b/Documentation/devicetree/bindings/net/wireless/ti,wl18xx.txt @@ -0,0 +1,32 @@ +TI Wilink8 (wl18xx) SDIO devices + +This node provides properties for controlling the wilink8 wireless device. The +node is expected to be specified as a child node to the SDIO controller that +connects the device to the system. + +Required properties: + - compatible : Should be "ti,wl18xx". + - interrupts : specifies attributes for the out-of-band interrupt. + +Optional properties: + - interrupt-parent : the phandle for the interrupt controller to which the + device interrupts are connected. + +Example: + +&mmc3 { + status = "okay"; + vmmc-supply = <&wlan_en_reg>; + bus-width = <4>; + cap-power-off-card; + keep-power-in-suspend; + + #address-cells = <1>; + #size-cells = <0>; + wlcore: wlcore@2 { + compatible = "ti,wl18xx"; + reg = <2>; + interrupt-parent = <&gpio0>; + interrupts = <19 IRQ_TYPE_NONE>; + }; +};
Add device tree binding documentation for TI's wl18xx wlan chip. Signed-off-by: Eliad Peller <eliad@wizery.com> --- v3: * make the bindings device-specific (wl18xx) (Arnd, Mark) * split bindings and driver changes (Arnd) * make interrupt-parent optional (Arnd) * make unit-address same as reg (Mark) .../devicetree/bindings/net/wireless/ti,wl18xx.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wl18xx.txt