diff mbox

[v4,3/3] wlcore/wl12xx: spi: add wifi support to cm-t335

Message ID 1451482533-8624-4-git-send-email-uri.mashiach@compulab.co.il (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Uri Mashiach Dec. 30, 2015, 1:35 p.m. UTC
Device tree modifications:
- Pinmux for SPI0 and WiFi GPIOs.
- SPI0 node with wlcore as a child node.

Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
---
v1 -> v2: Replace interrupts and interrupt-parent with interrupts-extended.
v2 -> v3: Move the pinctrl-0 = <&wifi_pins> to the wlcore node.
v3 -> v4: replace interrupts-extended with interrupts and interrupt-parent. (revert v2 modification).
          According to Rob Herring and Documentation/devicetree/bindings/interrupt-controller/interrupts.txt,
	  interrupts-extended should only be used when a device has multiple interrupt parents.

 arch/arm/boot/dts/am335x-cm-t335.dts | 55 ++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

Comments

Kalle Valo Jan. 7, 2016, 9:02 a.m. UTC | #1
Uri Mashiach <uri.mashiach@compulab.co.il> writes:

> Device tree modifications:
> - Pinmux for SPI0 and WiFi GPIOs.
> - SPI0 node with wlcore as a child node.
>
> Cc: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
> ---
> v1 -> v2: Replace interrupts and interrupt-parent with interrupts-extended.
> v2 -> v3: Move the pinctrl-0 = <&wifi_pins> to the wlcore node.
> v3 -> v4: replace interrupts-extended with interrupts and interrupt-parent. (revert v2 modification).
>           According to Rob Herring and Documentation/devicetree/bindings/interrupt-controller/interrupts.txt,
> 	  interrupts-extended should only be used when a device has multiple interrupt parents.
>
>  arch/arm/boot/dts/am335x-cm-t335.dts | 55 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 55 insertions(+)

To what tree should this patch go? My wireless-drivers-next tree doesn't
even have this file.

https://patchwork.kernel.org/patch/7933441/
Uri Mashiach Jan. 7, 2016, 11:20 a.m. UTC | #2
Hi Kalle Valo,

On 01/07/2016 11:02 AM, Kalle Valo wrote:
> Uri Mashiach <uri.mashiach@compulab.co.il> writes:
>
>> Device tree modifications:
>> - Pinmux for SPI0 and WiFi GPIOs.
>> - SPI0 node with wlcore as a child node.
>>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
>> ---
>> v1 -> v2: Replace interrupts and interrupt-parent with interrupts-extended.
>> v2 -> v3: Move the pinctrl-0 = <&wifi_pins> to the wlcore node.
>> v3 -> v4: replace interrupts-extended with interrupts and interrupt-parent. (revert v2 modification).
>>            According to Rob Herring and Documentation/devicetree/bindings/interrupt-controller/interrupts.txt,
>> 	  interrupts-extended should only be used when a device has multiple interrupt parents.
>>
>>   arch/arm/boot/dts/am335x-cm-t335.dts | 55 ++++++++++++++++++++++++++++++++++++
>>   1 file changed, 55 insertions(+)
>
> To what tree should this patch go? My wireless-drivers-next tree doesn't
> even have this file.

Should be applied into omap-for-v4.x/dt

>
> https://patchwork.kernel.org/patch/7933441/
>
Igor Grinberg Jan. 13, 2016, 6 a.m. UTC | #3
Hi Kalle Valo,

On 01/07/16 11:02, Kalle Valo wrote:
> Uri Mashiach <uri.mashiach@compulab.co.il> writes:
> 
>> Device tree modifications:
>> - Pinmux for SPI0 and WiFi GPIOs.
>> - SPI0 node with wlcore as a child node.
>>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
>> ---

Uri, please document the dependencies next time. Thanks!

>> v1 -> v2: Replace interrupts and interrupt-parent with interrupts-extended.
>> v2 -> v3: Move the pinctrl-0 = <&wifi_pins> to the wlcore node.
>> v3 -> v4: replace interrupts-extended with interrupts and interrupt-parent. (revert v2 modification).
>>           According to Rob Herring and Documentation/devicetree/bindings/interrupt-controller/interrupts.txt,
>> 	  interrupts-extended should only be used when a device has multiple interrupt parents.
>>
>>  arch/arm/boot/dts/am335x-cm-t335.dts | 55 ++++++++++++++++++++++++++++++++++++
>>  1 file changed, 55 insertions(+)
> 
> To what tree should this patch go? My wireless-drivers-next tree doesn't
> even have this file.

Right. It will hit the mainline during this merge window through Tony's and
arm-soc trees.

Do you think it will be sensible if you take 1/3 and 2/3 patches and Tony
will take the 3/3 (there is no code dependency between first two and the last one),
or we can just wait till arm-soc hits the mainline, so you will have the
needed code?

> 
> https://patchwork.kernel.org/patch/7933441/
>
Igor Grinberg Jan. 13, 2016, 6:09 a.m. UTC | #4
On 12/30/15 15:35, Uri Mashiach wrote:
> Device tree modifications:
> - Pinmux for SPI0 and WiFi GPIOs.
> - SPI0 node with wlcore as a child node.
> 
> Cc: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>

Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Tony Lindgren Jan. 13, 2016, 5:27 p.m. UTC | #5
* Igor Grinberg <grinberg@compulab.co.il> [160112 22:01]:
> Hi Kalle Valo,
> 
> On 01/07/16 11:02, Kalle Valo wrote:
> > Uri Mashiach <uri.mashiach@compulab.co.il> writes:
> > 
> >> Device tree modifications:
> >> - Pinmux for SPI0 and WiFi GPIOs.
> >> - SPI0 node with wlcore as a child node.
> >>
> >> Cc: Tony Lindgren <tony@atomide.com>
> >> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
> >> ---
> 
> Uri, please document the dependencies next time. Thanks!
> 
> >> v1 -> v2: Replace interrupts and interrupt-parent with interrupts-extended.
> >> v2 -> v3: Move the pinctrl-0 = <&wifi_pins> to the wlcore node.
> >> v3 -> v4: replace interrupts-extended with interrupts and interrupt-parent. (revert v2 modification).
> >>           According to Rob Herring and Documentation/devicetree/bindings/interrupt-controller/interrupts.txt,
> >> 	  interrupts-extended should only be used when a device has multiple interrupt parents.
> >>
> >>  arch/arm/boot/dts/am335x-cm-t335.dts | 55 ++++++++++++++++++++++++++++++++++++
> >>  1 file changed, 55 insertions(+)
> > 
> > To what tree should this patch go? My wireless-drivers-next tree doesn't
> > even have this file.
> 
> Right. It will hit the mainline during this merge window through Tony's and
> arm-soc trees.
> 
> Do you think it will be sensible if you take 1/3 and 2/3 patches and Tony
> will take the 3/3 (there is no code dependency between first two and the last one),
> or we can just wait till arm-soc hits the mainline, so you will have the
> needed code?

Yeah I'll pick the dts changes separately after the merge window as
there is no dependency to the driver changes.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kalle Valo Jan. 14, 2016, 7:05 a.m. UTC | #6
Tony Lindgren <tony@atomide.com> writes:

>> >>  arch/arm/boot/dts/am335x-cm-t335.dts | 55 ++++++++++++++++++++++++++++++++++++
>> >>  1 file changed, 55 insertions(+)
>> > 
>> > To what tree should this patch go? My wireless-drivers-next tree doesn't
>> > even have this file.
>> 
>> Right. It will hit the mainline during this merge window through Tony's and
>> arm-soc trees.
>> 
>> Do you think it will be sensible if you take 1/3 and 2/3 patches and Tony
>> will take the 3/3 (there is no code dependency between first two and the last one),
>> or we can just wait till arm-soc hits the mainline, so you will have the
>> needed code?
>
> Yeah I'll pick the dts changes separately after the merge window as
> there is no dependency to the driver changes.

Ok, I'll then take patches 1 and 2 once the merge window opens.
Arend van Spriel Jan. 14, 2016, 9:08 a.m. UTC | #7
On 01/14/2016 08:05 AM, Kalle Valo wrote:
> Tony Lindgren <tony@atomide.com> writes:
>
>>>>>   arch/arm/boot/dts/am335x-cm-t335.dts | 55 ++++++++++++++++++++++++++++++++++++
>>>>>   1 file changed, 55 insertions(+)
>>>>
>>>> To what tree should this patch go? My wireless-drivers-next tree doesn't
>>>> even have this file.
>>>
>>> Right. It will hit the mainline during this merge window through Tony's and
>>> arm-soc trees.
>>>
>>> Do you think it will be sensible if you take 1/3 and 2/3 patches and Tony
>>> will take the 3/3 (there is no code dependency between first two and the last one),
>>> or we can just wait till arm-soc hits the mainline, so you will have the
>>> needed code?
>>
>> Yeah I'll pick the dts changes separately after the merge window as
>> there is no dependency to the driver changes.
>
> Ok, I'll then take patches 1 and 2 once the merge window opens.

I guess it is semantics, but the merge window is open right now so you 
probably mean to say after the merge window closes, ie. when 4.5-rc1 is 
ready.

Regards,
Arend

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kalle Valo Jan. 14, 2016, 9:11 a.m. UTC | #8
Arend van Spriel <arend@broadcom.com> writes:

> On 01/14/2016 08:05 AM, Kalle Valo wrote:
>> Tony Lindgren <tony@atomide.com> writes:
>>
>>> Yeah I'll pick the dts changes separately after the merge window as
>>> there is no dependency to the driver changes.
>>
>> Ok, I'll then take patches 1 and 2 once the merge window opens.
>
> I guess it is semantics, but the merge window is open right now so you
> probably mean to say after the merge window closes, ie. when 4.5-rc1
> is ready.

Exactly. Sorry, I suck in multitasking :)
Tony Lindgren Jan. 27, 2016, 6:40 p.m. UTC | #9
* Tony Lindgren <tony@atomide.com> [160113 09:28]:
> * Igor Grinberg <grinberg@compulab.co.il> [160112 22:01]:
> > Hi Kalle Valo,
> > 
> > On 01/07/16 11:02, Kalle Valo wrote:
> > > Uri Mashiach <uri.mashiach@compulab.co.il> writes:
> > > 
> > >> Device tree modifications:
> > >> - Pinmux for SPI0 and WiFi GPIOs.
> > >> - SPI0 node with wlcore as a child node.
> > >>
> > >> Cc: Tony Lindgren <tony@atomide.com>
> > >> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
> > >> ---
> > 
> > Uri, please document the dependencies next time. Thanks!
> > 
> > >> v1 -> v2: Replace interrupts and interrupt-parent with interrupts-extended.
> > >> v2 -> v3: Move the pinctrl-0 = <&wifi_pins> to the wlcore node.
> > >> v3 -> v4: replace interrupts-extended with interrupts and interrupt-parent. (revert v2 modification).
> > >>           According to Rob Herring and Documentation/devicetree/bindings/interrupt-controller/interrupts.txt,
> > >> 	  interrupts-extended should only be used when a device has multiple interrupt parents.
> > >>
> > >>  arch/arm/boot/dts/am335x-cm-t335.dts | 55 ++++++++++++++++++++++++++++++++++++
> > >>  1 file changed, 55 insertions(+)
> > > 
> > > To what tree should this patch go? My wireless-drivers-next tree doesn't
> > > even have this file.
> > 
> > Right. It will hit the mainline during this merge window through Tony's and
> > arm-soc trees.
> > 
> > Do you think it will be sensible if you take 1/3 and 2/3 patches and Tony
> > will take the 3/3 (there is no code dependency between first two and the last one),
> > or we can just wait till arm-soc hits the mainline, so you will have the
> > needed code?
> 
> Yeah I'll pick the dts changes separately after the merge window as
> there is no dependency to the driver changes.

Applying patch 3/3 into omap-for-v4.6/dt thanks.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren Jan. 27, 2016, 6:41 p.m. UTC | #10
* Igor Grinberg <grinberg@compulab.co.il> [160112 22:09]:
> 
> 
> On 12/30/15 15:35, Uri Mashiach wrote:
> > Device tree modifications:
> > - Pinmux for SPI0 and WiFi GPIOs.
> > - SPI0 node with wlcore as a child node.
> > 
> > Cc: Tony Lindgren <tony@atomide.com>
> > Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
> 
> Acked-by: Igor Grinberg <grinberg@compulab.co.il>

Applying into omap-for-v4.6/dt thanks.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/am335x-cm-t335.dts b/arch/arm/boot/dts/am335x-cm-t335.dts
index 42e9b66..65f1099 100644
--- a/arch/arm/boot/dts/am335x-cm-t335.dts
+++ b/arch/arm/boot/dts/am335x-cm-t335.dts
@@ -11,6 +11,7 @@ 
 /dts-v1/;
 
 #include "am33xx.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
 	model = "CompuLab CM-T335";
@@ -40,6 +41,15 @@ 
 		regulator-max-microvolt = <3300000>;
 	};
 
+	/* Regulator for WiFi */
+	vwlan_fixed: fixedregulator@2 {
+		compatible = "regulator-fixed";
+		regulator-name = "vwlan_fixed";
+		gpio = <&gpio0 20 GPIO_ACTIVE_HIGH>; /* gpio0_20 */
+		enable-active-high;
+		regulator-boot-off;
+	};
+
 	backlight {
 		compatible = "pwm-backlight";
 		pwms = <&ecap0 0 50000 0>;
@@ -223,6 +233,21 @@ 
 		>;
 	};
 
+	spi0_pins: pinmux_spi0_pins {
+		pinctrl-single,pins = <
+			/* spi0_sclk.spi0_sclk */
+			AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE0)
+			/* spi0_d0.spi0_d0 */
+			AM33XX_IOPAD(0x954, PIN_OUTPUT_PULLUP | MUX_MODE0)
+			/* spi0_d1.spi0_d1 */
+			AM33XX_IOPAD(0x958, PIN_INPUT | MUX_MODE0)
+			/* spi0_cs0.spi0_cs0 */
+			AM33XX_IOPAD(0x95C, PIN_OUTPUT | MUX_MODE0)
+			/* spi0_cs1.spi0_cs1 */
+			AM33XX_IOPAD(0x960, PIN_OUTPUT | MUX_MODE0)
+		>;
+	};
+
 	/* wl1271 bluetooth */
 	bluetooth_pins: pinmux_bluetooth_pins {
 		pinctrl-single,pins = <
@@ -230,6 +255,16 @@ 
 			AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLUP | MUX_MODE7)
 		>;
 	};
+
+	/* wl1271 WiFi */
+	wifi_pins: pinmux_wifi_pins {
+		pinctrl-single,pins = <
+			/* EMU1.gpio3_8 - WiFi IRQ */
+			AM33XX_IOPAD(0x9e8, PIN_INPUT_PULLUP | MUX_MODE7)
+			/* XDMA_EVENT_INTR1.gpio0_20 - WiFi enable */
+			AM33XX_IOPAD(0x9b4, PIN_OUTPUT | MUX_MODE7)
+		>;
+	};
 };
 
 &uart0 {
@@ -394,3 +429,23 @@  status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc1_pins>;
 };
+
+&spi0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pins>;
+	ti,pindir-d0-out-d1-in = <1>;
+	/* WLS1271 WiFi */
+	wlcore: wlcore@1 {
+		compatible = "ti,wl1271";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wifi_pins>;
+		reg = <1>;
+		spi-max-frequency = <48000000>;
+		clock-xtal;
+		ref-clock-frequency = <38400000>;
+		interrupt-parent = <&gpio3>;
+		interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
+		vwlan-supply = <&vwlan_fixed>;
+	};
+};