2013-07-30 20:21:44

by Luciano Coelho

[permalink] [raw]
Subject: [PATCH v3] Documentation: dt: bindings: TI WiLink modules

Add device tree bindings documentation for the TI WiLink modules.
Currently only the WLAN part of the WiLink6, WiLink7 and WiLink8
modules is supported.

Signed-off-by: Luciano Coelho <[email protected]>
---

In v3, use IRQ_TYPE_LEVEL_HIGH in the example, as suggested by Laurent.

.../devicetree/bindings/net/wireless/ti-wilink.txt | 68 ++++++++++++++++++++++
1 file changed, 68 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/wireless/ti-wilink.txt

diff --git a/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
new file mode 100644
index 0000000..aafebb1
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
@@ -0,0 +1,68 @@
+TI WiLink Wireless Modules Device Tree Bindings
+===============================================
+
+The WiLink modules provide wireless connectivity, such as WLAN,
+Bluetooth, FM and NFC.
+
+There are several different modules available, which can be grouped by
+their generation: WiLink6, WiLink7 and WiLink8. WiLink4 is not
+currently supported with device tree.
+
+Currently, only the WLAN portion of the modules is supported with
+device tree.
+
+Required properties:
+--------------------
+
+- compatible: should be "ti,wilink6", "ti,wilink7" or "ti,wilink8"
+- interrupt-parent: the interrupt controller
+- interrupts: out-of-band WLAN interrupt
+ See the interrupt controller's bindings documentation for
+ detailed definition.
+
+Optional properties:
+--------------------
+
+- clocks: list of clocks needed by the chip as follows:
+
+ refclock: the internal WLAN reference clock frequency (required for
+ WiLink6 and WiLink7; not used for WiLink8).
+
+ tcxoclock: the internal WLAN TCXO clock frequency (required for
+ WiLink7 not used for WiLink6 and WiLink8).
+
+ The clocks must be defined and named accordingly. For example:
+
+ clocks = <&refclock>
+ clock-names = "refclock";
+
+ refclock: refclock {
+ compatible = "ti,wilink-clock";
+ #clock-cells = <0>;
+ clock-frequency = <38400000>;
+ };
+
+ Some modules that contain the WiLink chip provide clocks in the
+ module itself. In this case, we define a "ti,wilink-clock" as shown
+ above. But any other clock could in theory be used, so the proper
+ clock definition should be used.
+
+
+Example:
+--------
+
+Example definition that can be used in OMAP4 Panda:
+
+wlan {
+ compatible = "ti,wilink6";
+ interrupt-parent = <&gpio2>;
+ interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio line 53 */
+ clocks = <&refclock>;
+ clock-names = "refclock";
+
+ refclock: refclock {
+ compatible = "ti,wilink-clock";
+ #clock-cells = <0>;
+ clock-frequency = <38400000>;
+ };
+};
--
1.8.3.2



2013-07-31 10:35:08

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH v3] Documentation: dt: bindings: TI WiLink modules

Hi Luciano,

On Tuesday 30 July 2013 23:21:08 Luciano Coelho wrote:
> Add device tree bindings documentation for the TI WiLink modules.
> Currently only the WLAN part of the WiLink6, WiLink7 and WiLink8
> modules is supported.
>
> Signed-off-by: Luciano Coelho <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

> ---
>
> In v3, use IRQ_TYPE_LEVEL_HIGH in the example, as suggested by Laurent.
>
> .../devicetree/bindings/net/wireless/ti-wilink.txt | 68
> ++++++++++++++++++++++ 1 file changed, 68 insertions(+)
> create mode 100644
> Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
> b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt new file
> mode 100644
> index 0000000..aafebb1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
> @@ -0,0 +1,68 @@
> +TI WiLink Wireless Modules Device Tree Bindings
> +===============================================
> +
> +The WiLink modules provide wireless connectivity, such as WLAN,
> +Bluetooth, FM and NFC.
> +
> +There are several different modules available, which can be grouped by
> +their generation: WiLink6, WiLink7 and WiLink8. WiLink4 is not
> +currently supported with device tree.
> +
> +Currently, only the WLAN portion of the modules is supported with
> +device tree.
> +
> +Required properties:
> +--------------------
> +
> +- compatible: should be "ti,wilink6", "ti,wilink7" or "ti,wilink8"
> +- interrupt-parent: the interrupt controller
> +- interrupts: out-of-band WLAN interrupt
> + See the interrupt controller's bindings documentation for
> + detailed definition.
> +
> +Optional properties:
> +--------------------
> +
> +- clocks: list of clocks needed by the chip as follows:
> +
> + refclock: the internal WLAN reference clock frequency (required for
> + WiLink6 and WiLink7; not used for WiLink8).
> +
> + tcxoclock: the internal WLAN TCXO clock frequency (required for
> + WiLink7 not used for WiLink6 and WiLink8).
> +
> + The clocks must be defined and named accordingly. For example:
> +
> + clocks = <&refclock>
> + clock-names = "refclock";
> +
> + refclock: refclock {
> + compatible = "ti,wilink-clock";
> + #clock-cells = <0>;
> + clock-frequency = <38400000>;
> + };
> +
> + Some modules that contain the WiLink chip provide clocks in the
> + module itself. In this case, we define a "ti,wilink-clock" as shown
> + above. But any other clock could in theory be used, so the proper
> + clock definition should be used.
> +
> +
> +Example:
> +--------
> +
> +Example definition that can be used in OMAP4 Panda:
> +
> +wlan {
> + compatible = "ti,wilink6";
> + interrupt-parent = <&gpio2>;
> + interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio line 53 */
> + clocks = <&refclock>;
> + clock-names = "refclock";
> +
> + refclock: refclock {
> + compatible = "ti,wilink-clock";
> + #clock-cells = <0>;
> + clock-frequency = <38400000>;
> + };
> +};
--
Regards,

Laurent Pinchart


2013-08-14 14:43:16

by Benoit Cousson

[permalink] [raw]
Subject: Re: [PATCH v3] Documentation: dt: bindings: TI WiLink modules

Hi Luca,

On 30/07/2013 22:21, Luciano Coelho wrote:
> Add device tree bindings documentation for the TI WiLink modules.
> Currently only the WLAN part of the WiLink6, WiLink7 and WiLink8
> modules is supported.
>
> Signed-off-by: Luciano Coelho <[email protected]>
> ---
>
> In v3, use IRQ_TYPE_LEVEL_HIGH in the example, as suggested by Laurent.
>
> .../devicetree/bindings/net/wireless/ti-wilink.txt | 68 ++++++++++++++++++++++
> 1 file changed, 68 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
> new file mode 100644
> index 0000000..aafebb1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
> @@ -0,0 +1,68 @@
> +TI WiLink Wireless Modules Device Tree Bindings
> +===============================================
> +
> +The WiLink modules provide wireless connectivity, such as WLAN,
> +Bluetooth, FM and NFC.
> +
> +There are several different modules available, which can be grouped by
> +their generation: WiLink6, WiLink7 and WiLink8. WiLink4 is not
> +currently supported with device tree.
> +
> +Currently, only the WLAN portion of the modules is supported with
> +device tree.
> +
> +Required properties:
> +--------------------
> +
> +- compatible: should be "ti,wilink6", "ti,wilink7" or "ti,wilink8"
> +- interrupt-parent: the interrupt controller
> +- interrupts: out-of-band WLAN interrupt
> + See the interrupt controller's bindings documentation for
> + detailed definition.
> +
> +Optional properties:
> +--------------------
> +
> +- clocks: list of clocks needed by the chip as follows:
> +
> + refclock: the internal WLAN reference clock frequency (required for
> + WiLink6 and WiLink7; not used for WiLink8).
> +
> + tcxoclock: the internal WLAN TCXO clock frequency (required for
> + WiLink7 not used for WiLink6 and WiLink8).
> +
> + The clocks must be defined and named accordingly. For example:
> +
> + clocks = <&refclock>
> + clock-names = "refclock";
> +
> + refclock: refclock {
> + compatible = "ti,wilink-clock";
> + #clock-cells = <0>;
> + clock-frequency = <38400000>;
> + };
> +
> + Some modules that contain the WiLink chip provide clocks in the
> + module itself. In this case, we define a "ti,wilink-clock" as shown
> + above. But any other clock could in theory be used, so the proper
> + clock definition should be used.
> +
> +
> +Example:
> +--------
> +
> +Example definition that can be used in OMAP4 Panda:
> +
> +wlan {
> + compatible = "ti,wilink6";
> + interrupt-parent = <&gpio2>;
> + interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio line 53 */
> + clocks = <&refclock>;
> + clock-names = "refclock";
> +
> + refclock: refclock {
> + compatible = "ti,wilink-clock";
> + #clock-cells = <0>;
> + clock-frequency = <38400000>;
> + };
> +};

Everything looks good beside the location of the wlan node...

It should not float at the root of the device tree. It is physically
attached to a SDIO bus and thus must be a child of the MMC controller
for a proper HW representation. That's moreover the best way to handle
properly the dependency between the MMC controller and the wilink driver.

Please note that this is easier do say than to do :-)

Regards,
Benoit