* [PATCH v4 0/3] wlcore/wl12xx: spi: add wifi support to cm-t335 @ 2015-12-30 13:35 Uri Mashiach 2015-12-30 13:35 ` [PATCH v4 1/3] wlcore/wl12xx: spi: add power operation function Uri Mashiach ` (2 more replies) 0 siblings, 3 replies; 21+ messages in thread From: Uri Mashiach @ 2015-12-30 13:35 UTC (permalink / raw) To: linux-arm-kernel Add DT support for WLS1271 SPI driver. Add power operation function to the WLS1271 SPI driver. Uri Mashiach (3): wlcore/wl12xx: spi: add power operation function wlcore/wl12xx: spi: add device tree support wlcore/wl12xx: spi: add wifi support to cm-t335 .../bindings/net/wireless/ti,wlcore,spi.txt | 36 +++++++++ arch/arm/boot/dts/am335x-cm-t335.dts | 55 ++++++++++++++ drivers/net/wireless/ti/wlcore/Kconfig | 2 +- drivers/net/wireless/ti/wlcore/spi.c | 86 +++++++++++++++++++++- 4 files changed, 174 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt -- 2.5.0 ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 1/3] wlcore/wl12xx: spi: add power operation function 2015-12-30 13:35 [PATCH v4 0/3] wlcore/wl12xx: spi: add wifi support to cm-t335 Uri Mashiach @ 2015-12-30 13:35 ` Uri Mashiach 2016-01-09 2:53 ` Sebastian Reichel ` (2 more replies) 2015-12-30 13:35 ` [PATCH v4 2/3] wlcore/wl12xx: spi: add device tree support Uri Mashiach 2015-12-30 13:35 ` [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 Uri Mashiach 2 siblings, 3 replies; 21+ messages in thread From: Uri Mashiach @ 2015-12-30 13:35 UTC (permalink / raw) To: linux-arm-kernel The power function uses a consumer regulator access to update the WiFi enable GPIO value. Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> --- v1 -> v2: oops fix was removed to a separate fix. v2 -> v3: no changes v3 -> v4: update devm_regulator_get() error handling. drivers/net/wireless/ti/wlcore/spi.c | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c index 44f059f..dec1512 100644 --- a/drivers/net/wireless/ti/wlcore/spi.c +++ b/drivers/net/wireless/ti/wlcore/spi.c @@ -30,6 +30,7 @@ #include <linux/spi/spi.h> #include <linux/wl12xx.h> #include <linux/platform_device.h> +#include <linux/regulator/consumer.h> #include "wlcore.h" #include "wl12xx_80211.h" @@ -81,6 +82,7 @@ struct wl12xx_spi_glue { struct device *dev; struct platform_device *core; + struct regulator *reg; /* Power regulator */ }; static void wl12xx_spi_reset(struct device *child) @@ -318,11 +320,40 @@ static int __must_check wl12xx_spi_raw_write(struct device *child, int addr, return 0; } +/** + * wl12xx_spi_set_power - power on/off the wl12xx unit + * @child: wl12xx device handle. + * @enable: true/false to power on/off the unit. + * + * use the WiFi enable regulator to enable/disable the WiFi unit. + */ +static int wl12xx_spi_set_power(struct device *child, bool enable) +{ + int ret = 0; + struct wl12xx_spi_glue *glue = dev_get_drvdata(child->parent); + + WARN_ON(!glue->reg); + + /* Update regulator state */ + if (enable) { + ret = regulator_enable(glue->reg); + if (ret) + dev_err(child, "Power enable failure\n"); + } else { + ret = regulator_disable(glue->reg); + if (ret) + dev_err(child, "Power disable failure\n"); + } + + return ret; +} + static struct wl1271_if_operations spi_ops = { .read = wl12xx_spi_raw_read, .write = wl12xx_spi_raw_write, .reset = wl12xx_spi_reset, .init = wl12xx_spi_init, + .power = wl12xx_spi_set_power, .set_block_size = NULL, }; @@ -353,6 +384,14 @@ static int wl1271_probe(struct spi_device *spi) * comes from the board-peripherals file */ spi->bits_per_word = 32; + glue->reg = devm_regulator_get(&spi->dev, "vwlan"); + if (PTR_ERR(glue->reg) == -EPROBE_DEFER) + return -EPROBE_DEFER; + if (IS_ERR(glue->reg)) { + dev_err(glue->dev, "can't get regulator\n"); + return PTR_ERR(glue->reg); + } + ret = spi_setup(spi); if (ret < 0) { dev_err(glue->dev, "spi_setup failed\n"); -- 2.5.0 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v4 1/3] wlcore/wl12xx: spi: add power operation function 2015-12-30 13:35 ` [PATCH v4 1/3] wlcore/wl12xx: spi: add power operation function Uri Mashiach @ 2016-01-09 2:53 ` Sebastian Reichel 2016-01-12 11:21 ` Grygorii Strashko 2016-01-13 6:03 ` Igor Grinberg 2016-01-29 9:11 ` [v4,1/3] " Kalle Valo 2 siblings, 1 reply; 21+ messages in thread From: Sebastian Reichel @ 2016-01-09 2:53 UTC (permalink / raw) To: linux-arm-kernel Hi, On Wed, Dec 30, 2015 at 03:35:31PM +0200, Uri Mashiach wrote: > The power function uses a consumer regulator access to update the WiFi > enable GPIO value. > > Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> [On Nokia N950] Tested-By: Sebastian Reichel <sre@kernel.org> -- Sebastian -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160109/46270873/attachment-0001.sig> ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 1/3] wlcore/wl12xx: spi: add power operation function 2016-01-09 2:53 ` Sebastian Reichel @ 2016-01-12 11:21 ` Grygorii Strashko 0 siblings, 0 replies; 21+ messages in thread From: Grygorii Strashko @ 2016-01-12 11:21 UTC (permalink / raw) To: linux-arm-kernel On 01/09/2016 04:53 AM, Sebastian Reichel wrote: > Hi, > > On Wed, Dec 30, 2015 at 03:35:31PM +0200, Uri Mashiach wrote: >> The power function uses a consumer regulator access to update the WiFi >> enable GPIO value. >> >> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> > > [On Nokia N950] > Tested-By: Sebastian Reichel <sre@kernel.org> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Thanks. -- regards, -grygorii ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 1/3] wlcore/wl12xx: spi: add power operation function 2015-12-30 13:35 ` [PATCH v4 1/3] wlcore/wl12xx: spi: add power operation function Uri Mashiach 2016-01-09 2:53 ` Sebastian Reichel @ 2016-01-13 6:03 ` Igor Grinberg 2016-01-29 9:11 ` [v4,1/3] " Kalle Valo 2 siblings, 0 replies; 21+ messages in thread From: Igor Grinberg @ 2016-01-13 6:03 UTC (permalink / raw) To: linux-arm-kernel On 12/30/15 15:35, Uri Mashiach wrote: > The power function uses a consumer regulator access to update the WiFi > enable GPIO value. > > Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> Acked-by: Igor Grinberg <grinberg@compulab.co.il> -- Regards, Igor. ^ permalink raw reply [flat|nested] 21+ messages in thread
* [v4,1/3] wlcore/wl12xx: spi: add power operation function 2015-12-30 13:35 ` [PATCH v4 1/3] wlcore/wl12xx: spi: add power operation function Uri Mashiach 2016-01-09 2:53 ` Sebastian Reichel 2016-01-13 6:03 ` Igor Grinberg @ 2016-01-29 9:11 ` Kalle Valo 2 siblings, 0 replies; 21+ messages in thread From: Kalle Valo @ 2016-01-29 9:11 UTC (permalink / raw) To: linux-arm-kernel > The power function uses a consumer regulator access to update the WiFi > enable GPIO value. > > Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> > Tested-By: Sebastian Reichel <sre@kernel.org> > Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> > Acked-by: Igor Grinberg <grinberg@compulab.co.il> Thanks, 2 patches applied to wireless-drivers-next.git: 4c1ce07bcf62 wlcore/wl12xx: spi: add power operation function 04654c386145 wlcore/wl12xx: spi: add device tree support Kalle Valo ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 2/3] wlcore/wl12xx: spi: add device tree support 2015-12-30 13:35 [PATCH v4 0/3] wlcore/wl12xx: spi: add wifi support to cm-t335 Uri Mashiach 2015-12-30 13:35 ` [PATCH v4 1/3] wlcore/wl12xx: spi: add power operation function Uri Mashiach @ 2015-12-30 13:35 ` Uri Mashiach 2016-01-09 2:56 ` Sebastian Reichel 2016-01-13 6:05 ` Igor Grinberg 2015-12-30 13:35 ` [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 Uri Mashiach 2 siblings, 2 replies; 21+ messages in thread From: Uri Mashiach @ 2015-12-30 13:35 UTC (permalink / raw) To: linux-arm-kernel Add DT support for the wl1271 SPI WiFi. Add documentation file for the wl1271 SPI WiFi. Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> Acked-by: Rob Herring <robh@kernel.org> --- v1 -> v2: update interrupt documentation. replace interrupts and interrupt-parent with interrupts-extended. IRQ parameters retrieved from spi_device instead of DT. remove redundant #ifdef CONFIG_OF v2 -> v3: Add MODULE_DEVICE_TABLE. Remove #ifdef CONFIG_OF. Make the Kconfig symbol to depend on OF. Replace irqd_get_trigger_type() with irq_get_trigger_type(). 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. .../bindings/net/wireless/ti,wlcore,spi.txt | 36 +++++++++++++++++ drivers/net/wireless/ti/wlcore/Kconfig | 2 +- drivers/net/wireless/ti/wlcore/spi.c | 47 ++++++++++++++++++++-- 3 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt diff --git a/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt b/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt new file mode 100644 index 0000000..9180724 --- /dev/null +++ b/Documentation/devicetree/bindings/net/wireless/ti,wlcore,spi.txt @@ -0,0 +1,36 @@ +* Texas Instruments wl1271 wireless lan controller + +The wl1271 chip can be connected via SPI or via SDIO. This +document describes the binding for the SPI connected chip. + +Required properties: +- compatible : Should be "ti,wl1271" +- reg : Chip select address of device +- spi-max-frequency : Maximum SPI clocking speed of device in Hz +- ref-clock-frequency : Reference clock frequency +- interrupt-parent, interrupts : + Should contain parameters for 1 interrupt line. + Interrupt parameters: parent, line number, type. +- vwlan-supply : Point the node of the regulator that powers/enable the wl1271 chip + +Optional properties: +- clock-xtal : boolean, clock is generated from XTAL + +- Please consult Documentation/devicetree/bindings/spi/spi-bus.txt + for optional SPI connection related properties, + +Examples: + +&spi1 { + wl1271 at 1 { + compatible = "ti,wl1271"; + + 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>; + }; +}; diff --git a/drivers/net/wireless/ti/wlcore/Kconfig b/drivers/net/wireless/ti/wlcore/Kconfig index 7c09954..5918080 100644 --- a/drivers/net/wireless/ti/wlcore/Kconfig +++ b/drivers/net/wireless/ti/wlcore/Kconfig @@ -13,7 +13,7 @@ config WLCORE config WLCORE_SPI tristate "TI wlcore SPI support" - depends on WLCORE && SPI_MASTER + depends on WLCORE && SPI_MASTER && OF select CRC7 ---help--- This module adds support for the SPI interface of adapters using diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c index dec1512..020ac1a 100644 --- a/drivers/net/wireless/ti/wlcore/spi.c +++ b/drivers/net/wireless/ti/wlcore/spi.c @@ -30,6 +30,7 @@ #include <linux/spi/spi.h> #include <linux/wl12xx.h> #include <linux/platform_device.h> +#include <linux/of_irq.h> #include <linux/regulator/consumer.h> #include "wlcore.h" @@ -357,6 +358,39 @@ static struct wl1271_if_operations spi_ops = { .set_block_size = NULL, }; +static const struct of_device_id wlcore_spi_of_match_table[] = { + { .compatible = "ti,wl1271" }, + { } +}; +MODULE_DEVICE_TABLE(of, wlcore_spi_of_match_table); + +/** + * wlcore_probe_of - DT node parsing. + * @spi: SPI slave device parameters. + * @res: resource parameters. + * @glue: wl12xx SPI bus to slave device glue parameters. + * @pdev_data: wlcore device parameters + */ +static int wlcore_probe_of(struct spi_device *spi, struct wl12xx_spi_glue *glue, + struct wlcore_platdev_data *pdev_data) +{ + struct device_node *dt_node = spi->dev.of_node; + int ret; + + if (of_find_property(dt_node, "clock-xtal", NULL)) + pdev_data->ref_clock_xtal = true; + + ret = of_property_read_u32(dt_node, "ref-clock-frequency", + &pdev_data->ref_clock_freq); + if (IS_ERR_VALUE(ret)) { + dev_err(glue->dev, + "can't get reference clock frequency (%d)\n", ret); + return ret; + } + + return 0; +} + static int wl1271_probe(struct spi_device *spi) { struct wl12xx_spi_glue *glue; @@ -366,8 +400,6 @@ static int wl1271_probe(struct spi_device *spi) memset(&pdev_data, 0x00, sizeof(pdev_data)); - /* TODO: add DT parsing when needed */ - pdev_data.if_ops = &spi_ops; glue = devm_kzalloc(&spi->dev, sizeof(*glue), GFP_KERNEL); @@ -392,6 +424,13 @@ static int wl1271_probe(struct spi_device *spi) return PTR_ERR(glue->reg); } + ret = wlcore_probe_of(spi, glue, &pdev_data); + if (IS_ERR_VALUE(ret)) { + dev_err(glue->dev, + "can't get device tree parameters (%d)\n", ret); + return ret; + } + ret = spi_setup(spi); if (ret < 0) { dev_err(glue->dev, "spi_setup failed\n"); @@ -409,7 +448,7 @@ static int wl1271_probe(struct spi_device *spi) memset(res, 0x00, sizeof(res)); res[0].start = spi->irq; - res[0].flags = IORESOURCE_IRQ; + res[0].flags = IORESOURCE_IRQ | irq_get_trigger_type(spi->irq); res[0].name = "irq"; ret = platform_device_add_resources(glue->core, res, ARRAY_SIZE(res)); @@ -447,10 +486,10 @@ static int wl1271_remove(struct spi_device *spi) return 0; } - static struct spi_driver wl1271_spi_driver = { .driver = { .name = "wl1271_spi", + .of_match_table = of_match_ptr(wlcore_spi_of_match_table), }, .probe = wl1271_probe, -- 2.5.0 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v4 2/3] wlcore/wl12xx: spi: add device tree support 2015-12-30 13:35 ` [PATCH v4 2/3] wlcore/wl12xx: spi: add device tree support Uri Mashiach @ 2016-01-09 2:56 ` Sebastian Reichel 2016-01-12 11:24 ` Grygorii Strashko 2016-01-13 6:05 ` Igor Grinberg 1 sibling, 1 reply; 21+ messages in thread From: Sebastian Reichel @ 2016-01-09 2:56 UTC (permalink / raw) To: linux-arm-kernel Hi, On Wed, Dec 30, 2015 at 03:35:32PM +0200, Uri Mashiach wrote: > Add DT support for the wl1271 SPI WiFi. > > Add documentation file for the wl1271 SPI WiFi. > > Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> > Acked-by: Rob Herring <robh@kernel.org> [On Nokia N950] Tested-By: Sebastian Reichel <sre@kernel.org> -- Sebastian -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160109/9774d81e/attachment.sig> ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 2/3] wlcore/wl12xx: spi: add device tree support 2016-01-09 2:56 ` Sebastian Reichel @ 2016-01-12 11:24 ` Grygorii Strashko 0 siblings, 0 replies; 21+ messages in thread From: Grygorii Strashko @ 2016-01-12 11:24 UTC (permalink / raw) To: linux-arm-kernel On 01/09/2016 04:56 AM, Sebastian Reichel wrote: > Hi, > > On Wed, Dec 30, 2015 at 03:35:32PM +0200, Uri Mashiach wrote: >> Add DT support for the wl1271 SPI WiFi. >> >> Add documentation file for the wl1271 SPI WiFi. >> >> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> >> Acked-by: Rob Herring <robh@kernel.org> > > [On Nokia N950] > Tested-By: Sebastian Reichel <sre@kernel.org> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Thanks.-- regards, -grygorii ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 2/3] wlcore/wl12xx: spi: add device tree support 2015-12-30 13:35 ` [PATCH v4 2/3] wlcore/wl12xx: spi: add device tree support Uri Mashiach 2016-01-09 2:56 ` Sebastian Reichel @ 2016-01-13 6:05 ` Igor Grinberg 1 sibling, 0 replies; 21+ messages in thread From: Igor Grinberg @ 2016-01-13 6:05 UTC (permalink / raw) To: linux-arm-kernel On 12/30/15 15:35, Uri Mashiach wrote: > Add DT support for the wl1271 SPI WiFi. > > Add documentation file for the wl1271 SPI WiFi. > > Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> > Acked-by: Rob Herring <robh@kernel.org> Acked-by: Igor Grinberg <grinberg@compulab.co.il> -- Regards, Igor. ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 2015-12-30 13:35 [PATCH v4 0/3] wlcore/wl12xx: spi: add wifi support to cm-t335 Uri Mashiach 2015-12-30 13:35 ` [PATCH v4 1/3] wlcore/wl12xx: spi: add power operation function Uri Mashiach 2015-12-30 13:35 ` [PATCH v4 2/3] wlcore/wl12xx: spi: add device tree support Uri Mashiach @ 2015-12-30 13:35 ` Uri Mashiach 2016-01-07 9:02 ` Kalle Valo 2016-01-13 6:09 ` Igor Grinberg 2 siblings, 2 replies; 21+ messages in thread From: Uri Mashiach @ 2015-12-30 13:35 UTC (permalink / raw) To: linux-arm-kernel 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(+) 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 at 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 at 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>; + }; +}; -- 2.5.0 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 2015-12-30 13:35 ` [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 Uri Mashiach @ 2016-01-07 9:02 ` Kalle Valo 2016-01-07 11:20 ` Uri Mashiach 2016-01-13 6:00 ` Igor Grinberg 2016-01-13 6:09 ` Igor Grinberg 1 sibling, 2 replies; 21+ messages in thread From: Kalle Valo @ 2016-01-07 9:02 UTC (permalink / raw) To: linux-arm-kernel 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/ -- Kalle Valo ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 2016-01-07 9:02 ` Kalle Valo @ 2016-01-07 11:20 ` Uri Mashiach 2016-01-13 6:00 ` Igor Grinberg 1 sibling, 0 replies; 21+ messages in thread From: Uri Mashiach @ 2016-01-07 11:20 UTC (permalink / raw) To: linux-arm-kernel 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/ > -- Thanks, Uri ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 2016-01-07 9:02 ` Kalle Valo 2016-01-07 11:20 ` Uri Mashiach @ 2016-01-13 6:00 ` Igor Grinberg 2016-01-13 17:27 ` Tony Lindgren 1 sibling, 1 reply; 21+ messages in thread From: Igor Grinberg @ 2016-01-13 6:00 UTC (permalink / raw) To: linux-arm-kernel 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/ > -- Regards, Igor. ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 2016-01-13 6:00 ` Igor Grinberg @ 2016-01-13 17:27 ` Tony Lindgren 2016-01-14 7:05 ` Kalle Valo 2016-01-27 18:40 ` Tony Lindgren 0 siblings, 2 replies; 21+ messages in thread From: Tony Lindgren @ 2016-01-13 17:27 UTC (permalink / raw) To: linux-arm-kernel * 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 2016-01-13 17:27 ` Tony Lindgren @ 2016-01-14 7:05 ` Kalle Valo 2016-01-14 9:08 ` Arend van Spriel 2016-01-27 18:40 ` Tony Lindgren 1 sibling, 1 reply; 21+ messages in thread From: Kalle Valo @ 2016-01-14 7:05 UTC (permalink / raw) To: linux-arm-kernel 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. -- Kalle Valo ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 2016-01-14 7:05 ` Kalle Valo @ 2016-01-14 9:08 ` Arend van Spriel 2016-01-14 9:11 ` Kalle Valo 0 siblings, 1 reply; 21+ messages in thread From: Arend van Spriel @ 2016-01-14 9:08 UTC (permalink / raw) To: linux-arm-kernel 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 2016-01-14 9:08 ` Arend van Spriel @ 2016-01-14 9:11 ` Kalle Valo 0 siblings, 0 replies; 21+ messages in thread From: Kalle Valo @ 2016-01-14 9:11 UTC (permalink / raw) To: linux-arm-kernel 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 :) -- Kalle Valo ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 2016-01-13 17:27 ` Tony Lindgren 2016-01-14 7:05 ` Kalle Valo @ 2016-01-27 18:40 ` Tony Lindgren 1 sibling, 0 replies; 21+ messages in thread From: Tony Lindgren @ 2016-01-27 18:40 UTC (permalink / raw) To: linux-arm-kernel * 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 2015-12-30 13:35 ` [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 Uri Mashiach 2016-01-07 9:02 ` Kalle Valo @ 2016-01-13 6:09 ` Igor Grinberg 2016-01-27 18:41 ` Tony Lindgren 1 sibling, 1 reply; 21+ messages in thread From: Igor Grinberg @ 2016-01-13 6:09 UTC (permalink / raw) To: linux-arm-kernel 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> -- Regards, Igor. ^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 2016-01-13 6:09 ` Igor Grinberg @ 2016-01-27 18:41 ` Tony Lindgren 0 siblings, 0 replies; 21+ messages in thread From: Tony Lindgren @ 2016-01-27 18:41 UTC (permalink / raw) To: linux-arm-kernel * 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2016-01-29 9:11 UTC | newest] Thread overview: 21+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-12-30 13:35 [PATCH v4 0/3] wlcore/wl12xx: spi: add wifi support to cm-t335 Uri Mashiach 2015-12-30 13:35 ` [PATCH v4 1/3] wlcore/wl12xx: spi: add power operation function Uri Mashiach 2016-01-09 2:53 ` Sebastian Reichel 2016-01-12 11:21 ` Grygorii Strashko 2016-01-13 6:03 ` Igor Grinberg 2016-01-29 9:11 ` [v4,1/3] " Kalle Valo 2015-12-30 13:35 ` [PATCH v4 2/3] wlcore/wl12xx: spi: add device tree support Uri Mashiach 2016-01-09 2:56 ` Sebastian Reichel 2016-01-12 11:24 ` Grygorii Strashko 2016-01-13 6:05 ` Igor Grinberg 2015-12-30 13:35 ` [PATCH v4 3/3] wlcore/wl12xx: spi: add wifi support to cm-t335 Uri Mashiach 2016-01-07 9:02 ` Kalle Valo 2016-01-07 11:20 ` Uri Mashiach 2016-01-13 6:00 ` Igor Grinberg 2016-01-13 17:27 ` Tony Lindgren 2016-01-14 7:05 ` Kalle Valo 2016-01-14 9:08 ` Arend van Spriel 2016-01-14 9:11 ` Kalle Valo 2016-01-27 18:40 ` Tony Lindgren 2016-01-13 6:09 ` Igor Grinberg 2016-01-27 18:41 ` Tony Lindgren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).