Device Tree binding for the mvsdio driver and related changes
Subsystems (5)
PATCH v2 1/1 Device Tree binding for the mvsdio driver and related changes
Hello,
This series of patches adds a Device Tree binding to the mvsdio driver (the driver for the SDIO interface found in many Marvell SoCs), and uses this binding to enable the SDIO interface on Armada 370 and Armada XP platforms, as well as converting the Kirkwood platforms to using the Device Tree to probe the SDIO interface.
The series has been tested on Kirkwood Topkick, Armada 370 Mirabox, Armada XP OpenBlocks, Armada 370 DB and Armada XP DB. The changes on the Dreamplug and MPLCEC4 boards should be tested by their respective maintainers if possible.
This series is obviously 3.9 material.
Here is a short description of the patches:
* Patches 1 and 2 cleanup the mvsdio driver initialization by using the slot-gpio helpers for the card-detect and write-protect GPIOs
* Patch 3 adds the Device Tree binding itself to the mvsdio driver
* Patch 4 adds pinctrl integration to the mvsdio driver
* Patch 5 adds Device Tree information to describe the SDIO interface on the Armada 370 and Armada XP SoCs.
* Patches 6 and 7 add pin muxing options for the SDIO interface on Armada 370 and Armada XP SoCs.
* Patches 8, 9, 10 enable the SDIO interface on the Armada XP DB, Armada 370 DB and Globalscale Mirabox platforms.
* Patch 11 adds Device Tree information to describe the SDIO interface on the Kirkwood SoCs.
* Patches 12 and 13 convert the Dreamplug and mplcec4 Kirkwood platforms to use the Device Tree to probe their SDIO interface and mux the corresponding pins.
* Patch 14 adds a pin mux option for the SDIO interface on the 88F6282 SoC, which is used in the Topkick platform.
* Patch 15 makes the Topkick DTS file inherit the kirkwood-8262.dtsi, so that it gets the pinctrl definition.
* Patch 16 converts the Kirkwood Topkick platform to use the Device Tree to probe its SDIO interface and mux the corresponding pins.
* Patch 17 removes a useless header inclusion related to the SDIO interface to the Kirkwood Dockstar platform.
* Patches 18, 19 and 20 update the mvebu_defconfig to enable the mvsdio driver, as well as Wifi/Bluetooth drivers needed for the SD8787 chip connected over SDIO on the Globalscale Mirabox.
Changes since v1:
* On Kirkwood Dreamplug, use the Device Tree to mux the SDIO pins, and remove a header inclusion that has become useless in the board C file. Requested by Andrew Lunn.
* On Kirkwood MPLCEC4, use the Device Tree to mux the SDIO pins, and remove a header inclusion that has become useless in the board C file. Requested by Andrew Lunn.
* Add a pin mux option for the SDIO interface in the 88F6282 SoC.
* Make the Kirkwood Topkick DTS file inherit the 88F6282 DTSI file.
* On Kirkwood Topkick, use the Device Tree to mux the SDIO pins, and remove a header inclusion that has become useless in the board C file. Requested by Andrew Lunn.
Best regards,
Thomas
PATCH v2 1/20 mmc: mvsdio: use slot-gpio infrastructure for write protect gpio
The MMC core subsystem provides in drivers/mmc/core/slot-gpio.c a nice set of helper functions to simplify the management of the write protect GPIO in MMC host drivers. This patch migrates the mvsdio driver to using those helpers, which will make the ->probe() code simpler, and therefore ease the process of adding a Device Tree binding for this driver.
--- drivers/mmc/host/mvsdio.c | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-)
drivers/mmc/host/mvsdio.c +5 -29
@@ -22,6 +22,7 @@#include <linux/clk.h> #include <linux/gpio.h> #include <linux/mmc/host.h> +#include <linux/mmc/slot-gpio.h> #include <asm/sizes.h> #include <asm/unaligned.h>
@@ -54,7 +55,6 @@ struct mvsd_host {int irq;struct clk *clk;int gpio_card_detect; -int gpio_write_protect; };#define mvsd_write (offs, val) writel(val, iobase + (offs))
@@ -566,20 +566,6 @@ static void mvsd_enable_sdio_irq(struct mmc_host *mmc, int enable)spin_unlock_irqrestore (&host->lock, flags); } -static int mvsd_get_ro (struct mmc_host *mmc) -{ -struct mvsd_host *host =mmc_priv (mmc); - -if (host->gpio_write_protect) -return gpio_get_value (host->gpio_write_protect); - -/* -* Board doesn't support read only detection; let the mmc core -* decide what to do. -*/ -return -ENOSYS ; -} -static void mvsd_power_up (struct mvsd_host *host) {void __iomem *iobase = host->base;
@@ -676,7 +662,7 @@ static void mvsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)static const struct mmc_host_ops mvsd_ops = { .request = mvsd_request, - .get_ro = mvsd_get_ro, + .get_ro = mmc_gpio_get_ro, .set_ios = mvsd_set_ios, .enable_sdio_irq = mvsd_enable_sdio_irq, };
@@ -798,15 +784,7 @@ static int __init mvsd_probe(struct platform_device *pdev)if (!host->gpio_card_detect) mmc->caps |=MMC_CAP_NEEDS_POLL ; -if (mvsd_data->gpio_write_protect) { - ret =gpio_request (mvsd_data->gpio_write_protect, -DRIVER_NAME " wp" ); -if (ret ==0 ) { -gpio_direction_input (mvsd_data->gpio_write_protect); - host->gpio_write_protect = - mvsd_data->gpio_write_protect; - } - } +mmc_gpio_request_ro (mmc, mvsd_data->gpio_write_protect);setup_timer (&host->timer, mvsd_timeout_timer, (unsigned long )host);platform_set_drvdata (pdev, mmc);
@@ -831,8 +809,7 @@ out:free_irq (gpio_to_irq (host->gpio_card_detect), host);gpio_free (host->gpio_card_detect); } -if (host->gpio_write_protect) -gpio_free (host->gpio_write_protect); +mmc_gpio_free_ro (mmc);if (host->base)iounmap (host->base); }
@@ -861,8 +838,7 @@ static int __exit mvsd_remove(struct platform_device *pdev) }mmc_remove_host (mmc);free_irq (host->irq, host); -if (host->gpio_write_protect) -gpio_free (host->gpio_write_protect); +mmc_gpio_free_ro (mmc);del_timer_sync (&host->timer);mvsd_power_down (host);iounmap (host->base);
Signature · 1 line
1.7.9.5
PATCH v2 1/20 mmc: mvsdio: use slot-gpio infrastructure for write protect gpio
drivers/mmc/host/mvsdio.c out: · line 812
Quoted 7 lines · Thomas Petazzoni
drivers/mmc/host/mvsdio.c +1
-2@@ -831,8 +809,7 @@ out:free_irq (gpio_to_irq (host->gpio_card_detect), host);gpio_free (host->gpio_card_detect); } -if (host->gpio_write_protect) -gpio_free (host->gpio_write_protect); +mmc_gpio_free_ro (mmc);
I posted a series[1] to save the call from error path and .remove().
Shawn
PS. What's the merge path for these mmc patches? I do not even see linux-mmc and Chris Ball on the Cc list.
Quoted 13 lines
drivers/mmc/host/mvsdio.c +1
-2if (host->base)iounmap (host->base); }@@ -861,8 +838,7 @@ static int __exit mvsd_remove(struct platform_device *pdev) }mmc_remove_host (mmc);free_irq (host->irq, host); -if (host->gpio_write_protect) -gpio_free (host->gpio_write_protect); +mmc_gpio_free_ro (mmc);del_timer_sync (&host->timer);mvsd_power_down (host);iounmap (host->base);
PATCH v2 1/20 mmc: mvsdio: use slot-gpio infrastructure for write protect gpio
Dear Shawn Guo,
Quoted 10 lines · Shawn Guo
drivers/mmc/host/mvsdio.c out: · line 812
Quoted 7 lines · Thomas Petazzoni
drivers/mmc/host/mvsdio.c +1
-2@@ -831,8 +809,7 @@ out:free_irq (gpio_to_irq (host->gpio_card_detect), host);gpio_free (host->gpio_card_detect); } -if (host->gpio_write_protect) -gpio_free (host->gpio_write_protect); +mmc_gpio_free_ro (mmc);I posted a series[1] to save the call from error path and .remove().
Yes, I've seen this one. Would you mind if I send a followup patch series that improves the mvsdio to use your new helper functions? I would like to avoid having too many dependencies for patch series.
Quoted 2 lines
PS. What's the merge path for these mmc patches? I do not even see linux-mmc and Chris Ball on the Cc list.
The merge path remains to be figured out. For now, I've Cc'ed Nicolas Pitre, who is referenced as the maintainer for the mvsdio driver, as well as the Marvell maintainers Jason Cooper, Andrew Lunn and Gr?gory Cl?ment. If a v3 is needed, I'll add linux-mmc and Chris Ball to the Cc list. That said, the majority of the patch is mostly Marvell-specific, so I guess it would be simpler if we could carry this through the Marvell maintainers, and then through arm-soc, of course with the Ack of the relevant MMC maintainers.
Thanks,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH v2 2/20 mmc: mvsdio: use slot-gpio for card detect gpio
In reply to Thomas PetazzoniThe MMC core subsystem provides in drivers/mmc/core/slot-gpio.c a nice set of helper functions to simplify the management of the card detect GPIO in MMC host drivers. This patch migrates the mvsdio driver to using those helpers, which will make the ->probe() code simpler, and therefore ease the process of adding a Device Tree binding for this driver.
--- drivers/mmc/host/mvsdio.c | 44 +++++++++----------------------------------- 1 file changed, 9 insertions(+), 35 deletions(-)
drivers/mmc/host/mvsdio.c +9 -35
@@ -54,7 +54,6 @@ struct mvsd_host {struct resource *res;int irq;struct clk *clk; -int gpio_card_detect; };#define mvsd_write (offs, val) writel(val, iobase + (offs))
@@ -540,13 +539,6 @@ static void mvsd_timeout_timer(unsigned long data)mmc_request_done (host->mmc, mrq); } -static irqreturn_t mvsd_card_detect_irq (int irq,void *dev) -{ -struct mvsd_host *host = dev; -mmc_detect_change (host->mmc,msecs_to_jiffies (100 )); -return IRQ_HANDLED ; -} -static void mvsd_enable_sdio_irq (struct mmc_host *mmc,int enable) {struct mvsd_host *host =mmc_priv (mmc);
@@ -765,23 +757,11 @@ static int __init mvsd_probe(struct platform_device *pdev)clk_prepare_enable (host->clk); } -if (mvsd_data->gpio_card_detect) { - ret =gpio_request (mvsd_data->gpio_card_detect, -DRIVER_NAME " cd" ); -if (ret ==0 ) { -gpio_direction_input (mvsd_data->gpio_card_detect); - irq =gpio_to_irq (mvsd_data->gpio_card_detect); - ret =request_irq (irq, mvsd_card_detect_irq, -IRQ_TYPE_EDGE_RISING |IRQ_TYPE_EDGE_FALLING , -DRIVER_NAME " cd" , host); -if (ret ==0 ) - host->gpio_card_detect = - mvsd_data->gpio_card_detect; -else -gpio_free (mvsd_data->gpio_card_detect); - } - } -if (!host->gpio_card_detect) +if (gpio_is_valid (mvsd_data->gpio_card_detect)) { + ret =mmc_gpio_request_cd (mmc, mvsd_data->gpio_card_detect); +if (ret) + goto out; + }else mmc->caps |=MMC_CAP_NEEDS_POLL ;mmc_gpio_request_ro (mmc, mvsd_data->gpio_write_protect);
@@ -794,9 +774,9 @@ static int __init mvsd_probe(struct platform_device *pdev)pr_notice ("%s: %s driver initialized, " ,mmc_hostname (mmc),DRIVER_NAME ); -if (host->gpio_card_detect) +if (!(mmc->caps &MMC_CAP_NEEDS_POLL ))printk ("using GPIO %d for card detection\n" , - host->gpio_card_detect); + mvsd_data->gpio_card_detect);else printk ("lacking card detect (fall back to polling)\n" );return 0 ;
@@ -805,10 +785,7 @@ out:if (host) {if (host->irq)free_irq (host->irq, host); -if (host->gpio_card_detect) { -free_irq (gpio_to_irq (host->gpio_card_detect), host); -gpio_free (host->gpio_card_detect); - } +mmc_gpio_free_cd (mmc);mmc_gpio_free_ro (mmc);if (host->base)iounmap (host->base);
@@ -832,10 +809,7 @@ static int __exit mvsd_remove(struct platform_device *pdev)if (mmc) {struct mvsd_host *host =mmc_priv (mmc); -if (host->gpio_card_detect) { -free_irq (gpio_to_irq (host->gpio_card_detect), host); -gpio_free (host->gpio_card_detect); - } +mmc_gpio_free_cd (mmc);mmc_remove_host (mmc);free_irq (host->irq, host);mmc_gpio_free_ro (mmc);
Signature · 1 line
1.7.9.5
PATCH v2 3/20 mmc: mvsdio: implement a Device Tree binding
In reply to Thomas PetazzoniThis patch adds a simple Device Tree binding for the mvsdio driver, as well as the necessary documentation for it. Compatibility with non-DT platforms is preserved, by keeping the platform_data based initialization.
We introduce a small difference between non-DT and DT platforms: DT platforms are required to provide a clocks = <...> property, which the driver uses to get the frequency of the clock that goes to the SDIO IP. The behaviour on non-DT platforms is kept unchanged: a clock reference is not mandatory, but the clock frequency must be passed in the "clock" field of the mvsdio_platform_data structure.
--- .../devicetree/bindings/mmc/orion-sdio.txt | 17 ++++++ drivers/mmc/host/mvsdio.c | 60 +++++++++++++++----- 2 files changed, 62 insertions(+), 15 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/orion-sdio.txt
Documentation/devicetree/bindings/mmc/orion-sdio.txt new file +17 -0
@@ -0,0 +1,17 @@ +* Marvell orion-sdio controller + +This file documents differences between the core properties in mmc.txt +and the properties used by the orion-sdio driver. + +- compatible: Should be "marvell,orion-sdio" +- clocks: reference to the clock of the SDIO interface + +Example: + + mvsdio at d00d4000 { + compatible = "marvell,orion-sdio"; + reg = <0xd00d4000 0x200>; + interrupts = <54>; + clocks = <&gateclk 17>; + status = "disabled"; + };
drivers/mmc/host/mvsdio.c +45 -15
115 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 4/20 mmc: mvsdio: add pinctrl integration
In reply to Thomas PetazzoniOn many Marvell SoCs, the pins used for the SDIO interface are part of the MPP pins, that are muxable pins. In order to get the muxing of those pins correct, this commit integrates the mvsdio driver with the pinctrl infrastructure by calling devm_pinctrl_get_select_default() during ->probe().
Note that we permit this function to fail because not all Marvell platforms have yet been fully converted to using the pinctrl infrastructure.
--- drivers/mmc/host/mvsdio.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/mmc/host/mvsdio.c +6 -0
@@ -25,6 +25,7 @@#include <linux/of_irq.h> #include <linux/mmc/host.h> #include <linux/mmc/slot-gpio.h> +#include <linux/pinctrl/consumer.h> #include <asm/sizes.h> #include <asm/unaligned.h>
@@ -692,6 +693,7 @@ static int __init mvsd_probe(struct platform_device *pdev)struct resource *r;int ret, irq;int gpio_card_detect, gpio_write_protect; +struct pinctrl *pinctrl; r =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); irq =platform_get_irq (pdev,0 );
@@ -713,6 +715,10 @@ static int __init mvsd_probe(struct platform_device *pdev) host->dev = &pdev->dev; host->res = r; + pinctrl =devm_pinctrl_get_select_default (&pdev->dev); +if (IS_ERR (pinctrl)) +dev_warn (&pdev->dev,"no pins associated\n" ); +/* Some non-DT platforms do not pass a clock, and the clock frequency is passed through platform_data. On DT platforms, a clock must always be passed, even if there is no gatable
Signature · 1 line
1.7.9.5
PATCH v2 5/20 arm: mvebu: add DT information for the SDIO interface of Armada 370/XP
In reply to Thomas PetazzoniNow that the mvsdio MMC driver has a Device Tree binding, we add the Device Tree informations to describe the SDIO interface available in the Armada 370/XP SoCs.
--- arch/arm/boot/dts/armada-370-xp.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/armada-370-xp.dtsi +8 -0
@@ -129,6 +129,14 @@ clocks = <&coreclk 0>; status = "disabled"; }; + + mvsdio at d00d4000 { + compatible = "marvell,orion-sdio"; + reg = <0xd00d4000 0x200>; + interrupts = <54>; + clocks = <&gateclk 17>; + status = "disabled"; + }; }; };
Signature · 1 line
1.7.9.5
PATCH v2 6/20 arm: mvebu: add pin muxing options for the SDIO interface on Armada 370
In reply to Thomas PetazzoniThe SDIO interface is available either on pins MPP9/11/12/13/14/15 or MPP47/48/49/50/51/52 on the Armada 370. Even though all combinations are potentially possible, those two muxing options are the most probable ones, so we provide those at the SoC level .dtsi file.
In practice, in turns out the Armada 370 DB board uses the former, while the Armada 370 Mirabox uses the latter.
--- arch/arm/boot/dts/armada-370.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/boot/dts/armada-370.dtsi +12 -0
@@ -47,6 +47,18 @@ pinctrl { compatible = "marvell,mv88f6710-pinctrl"; reg = <0xd0018000 0x38>; + + sdio_pins1: sdio-pins1 { + marvell,pins = "mpp9", "mpp11", "mpp12", + "mpp13", "mpp14", "mpp15"; + marvell,function = "sd0"; + }; + + sdio_pins2: sdio-pins2 { + marvell,pins = "mpp47", "mpp48", "mpp49", + "mpp50", "mpp51", "mpp52"; + marvell,function = "sd0"; + }; }; gpio0: gpio at d0018100 {
Signature · 1 line
1.7.9.5
PATCH v2 7/20 arm: mvebu: add pin muxing options for the SDIO interface on Armada XP
In reply to Thomas PetazzoniThe SDIO interface is only available on pins MPP30/31/32/33/34/35 on the various Armada XP variants, so we provide a pin muxing option for this in the Armada XP .dtsi files.
Even though those muxing options are the same for MV78230, MV78260 and MV78460, we keep them in each .dtsi file, because the number of pins, and therefore the declaration of the pinctrl node, is different for each SoC variant.
--- arch/arm/boot/dts/armada-xp-mv78230.dtsi | 6 ++++++ arch/arm/boot/dts/armada-xp-mv78260.dtsi | 6 ++++++ arch/arm/boot/dts/armada-xp-mv78460.dtsi | 6 ++++++ 3 files changed, 18 insertions(+)
arch/arm/boot/dts/armada-xp-mv78230.dtsi +6 -0
@@ -40,6 +40,12 @@ pinctrl { compatible = "marvell,mv78230-pinctrl"; reg = <0xd0018000 0x38>; + + sdio_pins: sdio-pins { + marvell,pins = "mpp30", "mpp31", "mpp32", + "mpp33", "mpp34", "mpp35"; + marvell,function = "sd0"; + }; }; gpio0: gpio at d0018100 {
arch/arm/boot/dts/armada-xp-mv78260.dtsi +6 -0
@@ -48,6 +48,12 @@ pinctrl { compatible = "marvell,mv78260-pinctrl"; reg = <0xd0018000 0x38>; + + sdio_pins: sdio-pins { + marvell,pins = "mpp30", "mpp31", "mpp32", + "mpp33", "mpp34", "mpp35"; + marvell,function = "sd0"; + }; }; gpio0: gpio at d0018100 {
arch/arm/boot/dts/armada-xp-mv78460.dtsi +6 -0
@@ -63,6 +63,12 @@ pinctrl { compatible = "marvell,mv78460-pinctrl"; reg = <0xd0018000 0x38>; + + sdio_pins: sdio-pins { + marvell,pins = "mpp30", "mpp31", "mpp32", + "mpp33", "mpp34", "mpp35"; + marvell,function = "sd0"; + }; }; gpio0: gpio at d0018100 {
Signature · 1 line
1.7.9.5
PATCH v2 8/20 arm: mvebu: enable the SD card slot on Armada XP DB board
In reply to Thomas PetazzoniThe Armada XP DB evaluation board has one SD card slot, directly connected to the SDIO IP of the SoC, so we enable this IP. Unfortunately, there are no GPIOs for card-detect and write-protect.
--- arch/arm/boot/dts/armada-xp-db.dts | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/armada-xp-db.dts +7 -0
@@ -90,5 +90,12 @@ phy = <&phy3>; phy-mode = "sgmii"; }; + + mvsdio at d00d4000 { + pinctrl-0 = <&sdio_pins>; + pinctrl-names = "default"; + status = "okay"; + /* No CD or WP GPIOs */ + }; }; };
Signature · 1 line
1.7.9.5
PATCH v2 9/20 arm: mvebu: enable the SD card slot on Armada 370 DB board
In reply to Thomas PetazzoniThe Armada XP DB evaluation board has one SD card slot, directly connected to the SDIO IP of the SoC, so we add a device tree description for it.
However, in the default configuration of the board, the SD card slot is not usable: the connector plugged into CON40 must be changed against a different one, provided with the board by the manufacturer. Since such a manual modification of the hardware is needed, we did not enable the SDIO interface by default, and left it to the board user to modify the Device Tree if needed. Since this board is really only an evaluation board for developers and not a final product, it is not too bad.
--- arch/arm/boot/dts/armada-370-db.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm/boot/dts/armada-370-db.dts +15 -0
@@ -59,5 +59,20 @@ phy = <&phy1>; phy-mode = "rgmii-id"; }; + + mvsdio at d00d4000 { + pinctrl-0 = <&sdio_pins1>; + pinctrl-names = "default"; + /* + * This device is disabled by default, because + * using the SD card connector requires + * changing the default CON40 connector + * "DB-88F6710_MPP_2xRGMII_DEVICE_Jumper" to a + * different connector + * "DB-88F6710_MPP_RGMII_SD_Jumper". + */ + status = "disabled"; + /* No CD or WP GPIOs */ + }; }; };
Signature · 1 line
1.7.9.5
PATCH v2 10/20 arm: mvebu: enable the SDIO interface on the Globalscale Mirabox
In reply to Thomas PetazzoniThe Globalscale Mirabox uses the SDIO interface of the Armada 370 to connect to a Wifi/Bluetooth SD8787 chip, so we enable the SDIO interface of this board in its Device Tree file.
--- arch/arm/boot/dts/armada-370-mirabox.dts | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/armada-370-mirabox.dts +10 -0
@@ -52,5 +52,15 @@ phy = <&phy1>; phy-mode = "rgmii-id"; }; + + mvsdio at d00d4000 { + pinctrl-0 = <&sdio_pins2>; + pinctrl-names = "default"; + status = "okay"; + /* + * No CD or WP GPIOs: SDIO interface used for + * Wifi/Bluetooth chip + */ + }; }; };
Signature · 1 line
1.7.9.5
PATCH v2 11/20 arm: kirkwood: add Device Tree informations for the SDIO controller
In reply to Thomas PetazzoniNow that the SDIO controller has a Device Tree binding, let's use it in kirkwood.dtsi.
--- arch/arm/boot/dts/kirkwood.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/kirkwood.dtsi +8 -0
@@ -190,5 +190,13 @@ clocks = <&gate_clk 17>; status = "okay"; }; + + mvsdio at 90000 { + compatible = "marvell,orion-sdio"; + reg = <0x90000 0x200>; + interrupts = <28>; + clocks = <&gate_clk 4>; + status = "disabled"; + }; }; };
Signature · 1 line
1.7.9.5
PATCH v2 12/20 arm: kirkwood: dreamplug: use Device Tree to probe SDIO
In reply to Thomas PetazzoniNow that the mvsdio driver has a Device Tree binding, and the SDIO controller is declared in kirkwood.dtsi, migrate the dreamplug board to use the Device Tree to probe the SDIO controller and to mux this interface properly.
---
Changes since v1:
* Remove the useless header inclusion from board-dreamplug.c, now that the SDIO interface is probed from the Device Tree.
* Reference the pmx_sdio muxing option from the DT node describing the SDIO interface, in order to get proper muxing of this interface.
--- arch/arm/boot/dts/kirkwood-dreamplug.dts | 7 +++++++ arch/arm/mach-kirkwood/board-dreamplug.c | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-)
arch/arm/boot/dts/kirkwood-dreamplug.dts +7 -0
@@ -74,6 +74,13 @@ status = "okay"; nr-ports = <1>; }; + + mvsdio at 90000 { + pinctrl-0 = <&pmx_sdio>; + pinctrl-names = "default"; + status = "okay"; + /* No CD or WP GPIOs */ + }; }; gpio-leds {
arch/arm/mach-kirkwood/board-dreamplug.c +0 -6
@@ -15,7 +15,6 @@#include <linux/init.h> #include <linux/mv643xx_eth.h> #include <linux/gpio.h> -#include <linux/platform_data/mmc-mvsdio.h> #include "common.h" static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
@@ -26,10 +25,6 @@ static struct mv643xx_eth_platform_data dreamplug_ge01_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(1), }; -static struct mvsdio_platform_data dreamplug_mvsdio_data = { -/* unfortunately the CD signal has not been connected */ -}; -void __init dreamplug_init (void ) {/*
@@ -37,5 +32,4 @@ void __init dreamplug_init(void)*/ kirkwood_ge00_init (&dreamplug_ge00_data);kirkwood_ge01_init (&dreamplug_ge01_data); -kirkwood_sdio_init (&dreamplug_mvsdio_data); }
Signature · 1 line
1.7.9.5
PATCH v2 13/20 arm: kirkwood: mplcec4: use Device Tree to probe SDIO
In reply to Thomas PetazzoniNow that the mvsdio driver has a Device Tree binding, and the SDIO controller is declared in kirkwood.dtsi, migrate the mplcec4 board to use the Device Tree to probe the SDIO controller and to mux the pins of the SDIO interface correctly.
This patch has not been tested, it remains to be tested by a person having access to the hardware.
---
Changes since v1:
* Remove the useless header inclusion from board-mplcec4.c, now that the SDIO interface is probed from the Device Tree.
* Reference the pmx_sdio muxing option from the DT node describing the SDIO interface, in order to get proper muxing of this interface.
--- arch/arm/boot/dts/kirkwood-mplcec4.dts | 11 +++++++++-- arch/arm/mach-kirkwood/board-mplcec4.c | 7 ------- 2 files changed, 9 insertions(+), 9 deletions(-)
arch/arm/boot/dts/kirkwood-mplcec4.dts +9 -2
@@ -20,12 +20,11 @@ pinctrl: pinctrl at 10000 { pinctrl-0 = < &pmx_nand &pmx_uart0 - &pmx_led_health &pmx_sdio + &pmx_led_health &pmx_sata0 &pmx_sata1 &pmx_led_user1o &pmx_led_user1g &pmx_led_user0o &pmx_led_user0g &pmx_led_misc - &pmx_sdio_cd >; pinctrl-names = "default";
@@ -133,6 +132,14 @@ status = "okay"; }; + + mvsdio at 90000 { + pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>; + pinctrl-names = "default"; + status = "okay"; + cd-gpios = <&gpio1 15 0>; + /* No WP GPIO */ + }; }; gpio-leds {
arch/arm/mach-kirkwood/board-mplcec4.c +0 -7
@@ -12,7 +12,6 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/mv643xx_eth.h> -#include <linux/platform_data/mmc-mvsdio.h> #include "common.h" #include "mpp.h"
@@ -24,11 +23,6 @@ static struct mv643xx_eth_platform_data mplcec4_ge01_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(2), }; -static struct mvsdio_platform_data mplcec4_mvsdio_data = { - .gpio_card_detect =47 ,/* MPP47 used as SD card detect */ -}; - -void __init mplcec4_init (void ) {/*
@@ -36,7 +30,6 @@ void __init mplcec4_init(void)*/ kirkwood_ge00_init (&mplcec4_ge00_data);kirkwood_ge01_init (&mplcec4_ge01_data); -kirkwood_sdio_init (&mplcec4_mvsdio_data);kirkwood_pcie_init (KW_PCIE0 ); }
Signature · 1 line
1.7.9.5
PATCH v2 13/20 arm: kirkwood: mplcec4: use Device Tree to probe SDIO
Quoted 81 lines · Thomas Petazzoni
Now that the mvsdio driver has a Device Tree binding, and the SDIO controller is declared in
kirkwood.dtsi, migrate the mplcec4 board to use the Device Tree to probe the SDIO controller and to mux the pins of the SDIO interface correctly.This patch has not been tested, it remains to be tested by a person having access to the hardware.
Signed-off-by Thomas Petazzoni <[email protected]>Cc Stefan Peter <[email protected]>---
Changes since v1:
* Remove the useless header inclusion fromboard-mplcec4.c, now that the SDIO interface is probed from the Device Tree.
* Reference thepmx_sdiomuxing option from the DT node describing the SDIO interface, in order to get proper muxing of this interface.--- arch/arm/boot/dts/kirkwood-mplcec4.dts | 11 +++++++++-- arch/arm/mach-kirkwood/board-mplcec4.c | 7 ------- 2 files changed, 9 insertions(+), 9 deletions(-)arch/arm/boot/dts/kirkwood-mplcec4.dts +9
-2@@ -20,12 +20,11 @@ pinctrl: pinctrl at 10000 { pinctrl-0 = < &pmx_nand &pmx_uart0 - &pmx_led_health &pmx_sdio + &pmx_led_health &pmx_sata0 &pmx_sata1 &pmx_led_user1o &pmx_led_user1g &pmx_led_user0o &pmx_led_user0g &pmx_led_misc - &pmx_sdio_cd >; pinctrl-names = "default";@@ -133,6 +132,14 @@ status = "okay"; }; + + mvsdio at 90000 { + pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>; + pinctrl-names = "default"; + status = "okay"; + cd-gpios = <&gpio1 15 0>; + /* No WP GPIO */ + }; }; gpio-leds {arch/arm/mach-kirkwood/board-mplcec4.c +0
-6@@ -12,7 +12,6 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/mv643xx_eth.h> -#include <linux/platform_data/mmc-mvsdio.h> #include "common.h" #include "mpp.h" @@ -24,11 +23,6 @@ static struct mv643xx_eth_platform_data mplcec4_ge01_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(2), }; -static struct mvsdio_platform_data mplcec4_mvsdio_data = { - .gpio_card_detect =47 ,/* MPP47 used as SD card detect */ -}; - -void __init mplcec4_init (void ) {/*
arch/arm/mach-kirkwood/board-mplcec4.c void __init mplcec4_init(void) · line 35
Quoted 7 lines
arch/arm/mach-kirkwood/board-mplcec4.c +0
-1@@ -36,7 +30,6 @@ void __init mplcec4_init(void)*/ kirkwood_ge00_init (&mplcec4_ge00_data);kirkwood_ge01_init (&mplcec4_ge01_data); -kirkwood_sdio_init (&mplcec4_mvsdio_data);kirkwood_pcie_init (KW_PCIE0 ); }
After applying "Fixes for 3.8-rc1" and"ARM: Kirkwood: Fix missing clk for USB device" from Andrew to 3.8-rc1, I was able to test these patches on the MPL CEC4 under 3.8-rc1. The mvsdio was fully functional.
Regards
Stefan Peter
Signature · 2 lines
MPL AG, Switzerland http://www.mpl.ch Tel. +41 (0)56 483 34 34 Fax: +41(0)56 493 30 20
PATCH v2 13/20 arm: kirkwood: mplcec4: use Device Tree to probe SDIO
Dear Stefan Peter,
Quoted 3 lines · Stefan Peter
After applying "Fixes for 3.8-rc1" and"ARM: Kirkwood: Fix missing clk for USB device" from Andrew to 3.8-rc1, I was able to test these patches on the MPL CEC4 under 3.8-rc1. The mvsdio was fully functional.
Excellent, thanks for the test!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH v2 13/20 arm: kirkwood: mplcec4: use Device Tree to probe SDIO
In reply to Stefan PeterQuoted 11 lines · Stefan Peter
Quoted 10 lines · Thomas Petazzoni
Now that the mvsdio driver has a Device Tree binding, and the SDIO controller is declared in
kirkwood.dtsi, migrate the mplcec4 board to use the Device Tree to probe the SDIO controller and to mux the pins of the SDIO interface correctly.This patch has not been tested, it remains to be tested by a person having access to the hardware.
Signed-off-by Thomas Petazzoni <[email protected]>Cc Stefan Peter <[email protected]>
...
Quoted 3 lines
After applying "Fixes for 3.8-rc1" and"ARM: Kirkwood: Fix missing clk for USB device" from Andrew to 3.8-rc1, I was able to test these patches on the MPL CEC4 under 3.8-rc1. The mvsdio was fully functional.
If you are comfortable saying so, please add a "Tested-by: ..." We don't like to assume ;-)
thx,
Jason.
PATCH v2 13/20 arm: kirkwood: mplcec4: use Device Tree to probe SDIO
Hi Jason
Quoted 12 lines · Jason Cooper
Quoted 11 lines · Stefan Peter
Quoted 10 lines · Thomas Petazzoni
Now that the mvsdio driver has a Device Tree binding, and the SDIO controller is declared in
kirkwood.dtsi, migrate the mplcec4 board to use the Device Tree to probe the SDIO controller and to mux the pins of the SDIO interface correctly.This patch has not been tested, it remains to be tested by a person having access to the hardware.
Signed-off-by Thomas Petazzoni <[email protected]>Cc Stefan Peter <[email protected]>
Quoted 8 lines
...
Quoted 3 lines
After applying "Fixes for 3.8-rc1" and"ARM: Kirkwood: Fix missing clk for USB device" from Andrew to 3.8-rc1, I was able to test these patches on the MPL CEC4 under 3.8-rc1. The mvsdio was fully functional.
If you are comfortable saying so, please add a "Tested-by: ..." We don't like to assume ;-)
I will do so as soon as I don't need two additional patches to get it working. However, if you are interested in getting a Tested-by for the "Fixes for 3.8-rc1" and"ARM: Kirkwood: Fix missing clk for USB device" from Andrew, let my know.
Regards
Stefan Peter
Signature · 2 lines
MPL AG, Switzerland http://www.mpl.ch Tel. +41 (0)56 483 34 34 Fax: +41(0)56 493 30 20
PATCH v2 13/20 arm: kirkwood: mplcec4: use Device Tree to probe SDIO
Quoted 20 lines · Stefan Peter
Hi Jason
Quoted 17 lines · Jason Cooper
Quoted 11 lines · Stefan Peter
Quoted 10 lines · Thomas Petazzoni
Now that the mvsdio driver has a Device Tree binding, and the SDIO controller is declared in
kirkwood.dtsi, migrate the mplcec4 board to use the Device Tree to probe the SDIO controller and to mux the pins of the SDIO interface correctly.This patch has not been tested, it remains to be tested by a person having access to the hardware.
Signed-off-by Thomas Petazzoni <[email protected]>Cc Stefan Peter <[email protected]>...
Quoted 3 lines
After applying "Fixes for 3.8-rc1" and"ARM: Kirkwood: Fix missing clk for USB device" from Andrew to 3.8-rc1, I was able to test these patches on the MPL CEC4 under 3.8-rc1. The mvsdio was fully functional.
Quoted 8 lines
Quoted 3 lines
If you are comfortable saying so, please add a "Tested-by: ..." We don't like to assume ;-)
I will do so as soon as I don't need two additional patches to get it working. However, if you are interested in getting a Tested-by for the "Fixes for 3.8-rc1" and"ARM: Kirkwood: Fix missing clk for USB device" from Andrew, let my know.
Please do. In the future it's ok to put the qualifier about dependencies on a Tested-by:, as I'll be making sure the patches are merged in the correct order to satisfy those dependencies.
thx,
Jason.
PATCH v2 13/20 arm: kirkwood: mplcec4: use Device Tree to probe SDIO
In reply to Thomas PetazzoniQuoted 81 lines · Thomas Petazzoni
Now that the mvsdio driver has a Device Tree binding, and the SDIO controller is declared in
kirkwood.dtsi, migrate the mplcec4 board to use the Device Tree to probe the SDIO controller and to mux the pins of the SDIO interface correctly.This patch has not been tested, it remains to be tested by a person having access to the hardware.
Signed-off-by Thomas Petazzoni <[email protected]>Cc Stefan Peter <[email protected]>---
Changes since v1:
* Remove the useless header inclusion fromboard-mplcec4.c, now that the SDIO interface is probed from the Device Tree.
* Reference thepmx_sdiomuxing option from the DT node describing the SDIO interface, in order to get proper muxing of this interface.--- arch/arm/boot/dts/kirkwood-mplcec4.dts | 11 +++++++++-- arch/arm/mach-kirkwood/board-mplcec4.c | 7 ------- 2 files changed, 9 insertions(+), 9 deletions(-)arch/arm/boot/dts/kirkwood-mplcec4.dts +9
-2@@ -20,12 +20,11 @@ pinctrl: pinctrl at 10000 { pinctrl-0 = < &pmx_nand &pmx_uart0 - &pmx_led_health &pmx_sdio + &pmx_led_health &pmx_sata0 &pmx_sata1 &pmx_led_user1o &pmx_led_user1g &pmx_led_user0o &pmx_led_user0g &pmx_led_misc - &pmx_sdio_cd >; pinctrl-names = "default";@@ -133,6 +132,14 @@ status = "okay"; }; + + mvsdio at 90000 { + pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>; + pinctrl-names = "default"; + status = "okay"; + cd-gpios = <&gpio1 15 0>; + /* No WP GPIO */ + }; }; gpio-leds {arch/arm/mach-kirkwood/board-mplcec4.c +0
-6@@ -12,7 +12,6 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/mv643xx_eth.h> -#include <linux/platform_data/mmc-mvsdio.h> #include "common.h" #include "mpp.h" @@ -24,11 +23,6 @@ static struct mv643xx_eth_platform_data mplcec4_ge01_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(2), }; -static struct mvsdio_platform_data mplcec4_mvsdio_data = { - .gpio_card_detect =47 ,/* MPP47 used as SD card detect */ -}; - -void __init mplcec4_init (void ) {/*
arch/arm/mach-kirkwood/board-mplcec4.c void __init mplcec4_init(void) · line 35
Quoted 7 lines
arch/arm/mach-kirkwood/board-mplcec4.c +0
-1@@ -36,7 +30,6 @@ void __init mplcec4_init(void)*/ kirkwood_ge00_init (&mplcec4_ge00_data);kirkwood_ge01_init (&mplcec4_ge01_data); -kirkwood_sdio_init (&mplcec4_mvsdio_data);kirkwood_pcie_init (KW_PCIE0 ); }
Requires "Fixes for 3.8-rc1" and "ARM: Kirkwood: Fix missing clk for USB device" from Andrew Lunn. With these patches,
Signature · 2 lines
MPL AG, Switzerland http://www.mpl.ch Tel. +41 (0)56 483 34 34 Fax: +41(0)56 493 30 20
PATCH v2 14/20 arm: kirkwood: add pinmux option for the SDIO interface on 88F6282
In reply to Thomas PetazzoniThis commit adds a pinmux option, pmx_sdio, to enable the muxing of the SDIO interface on the 88F6282 SoC from Marvell.
---
Changes since v1:
* This patch is new in v2.
--- arch/arm/boot/dts/kirkwood-6282.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/kirkwood-6282.dtsi +5 -0
@@ -30,6 +30,11 @@ marvell,pins = "mpp13", "mpp14"; marvell,function = "uart1"; }; + pmx_sdio: pmx-sdio { + marvell,pins = "mpp12", "mpp13", "mpp14", + "mpp15", "mpp16", "mpp17"; + marvell,function = "sdio"; + }; }; i2c at 11100 {
Signature · 1 line
1.7.9.5
PATCH v2 15/20 arm: kirkwood: topkick: the Topkick platform uses a 88F6282 SoC
In reply to Thomas PetazzoniThe Topkick board uses a 88F6282 SoC, so the Device Tree Source describing the Topkick should inherit from kirkwood-6282.dtsi, which allows to take advantage of pin muxing capabilities.
---
Changes since v1:
* This patch is new in v2
--- arch/arm/boot/dts/kirkwood-topkick.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/kirkwood-topkick.dts +1 -0
@@ -1,6 +1,7 @@ /dts-v1/; /include/ "kirkwood.dtsi" +/include/ "kirkwood-6282.dtsi" / { model = "Univeral Scientific Industrial Co. Topkick-1281P2";
Signature · 1 line
1.7.9.5
PATCH v2 15/20 arm: kirkwood: topkick: the Topkick platform uses a 88F6282 SoC
Quoted 17 lines · Thomas Petazzoni
The Topkick board uses a 88F6282 SoC, so the Device Tree Source describing the Topkick should inherit from
kirkwood-6282.dtsi, which allows to take advantage of pin muxing capabilities.Signed-off-by Thomas Petazzoni <[email protected]>---
Changes since v1:
* This patch is new in v2--- arch/arm/boot/dts/kirkwood-topkick.dts | 1 + 1 file changed, 1 insertion(+)arch/arm/boot/dts/kirkwood-topkick.dts +0
-0
arch/arm/boot/dts/kirkwood-topkick.dts line 4
Quoted 4 lines
arch/arm/boot/dts/kirkwood-topkick.dts +1
-0@@ -1,6 +1,7 @@ /dts-v1/; /include/ "kirkwood.dtsi" +/include/ "kirkwood-6282.dtsi"
Hmmm, shouldn't the cooresponding MPP.._GPIO and kirkwood_mpp_conf() be removed as well?
thx,
Jason.
Quoted 11 lines
arch/arm/boot/dts/kirkwood-topkick.dts +0
-0/ { model = "Univeral Scientific Industrial Co. Topkick-1281P2";Signature · 7 lines
1.7.9.5 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v2 15/20 arm: kirkwood: topkick: the Topkick platform uses a 88F6282 SoC
Quoted 20 lines · Jason Cooper
Quoted 19 lines · Thomas Petazzoni
The Topkick board uses a 88F6282 SoC, so the Device Tree Source describing the Topkick should inherit from
kirkwood-6282.dtsi, which allows to take advantage of pin muxing capabilities.Signed-off-by Thomas Petazzoni <[email protected]>---
Changes since v1:
* This patch is new in v2--- arch/arm/boot/dts/kirkwood-topkick.dts | 1 + 1 file changed, 1 insertion(+)arch/arm/boot/dts/kirkwood-topkick.dts +0
-0@@ -1,6 +1,7 @@ /dts-v1/;
Quoted 5 lines
arch/arm/boot/dts/kirkwood-topkick.dts line 4
Quoted 2 lines
arch/arm/boot/dts/kirkwood-topkick.dts +1
-0/include/ "kirkwood.dtsi" +/include/ "kirkwood-6282.dtsi"Hmmm, shouldn't the cooresponding MPP.._GPIO and
kirkwood_mpp_conf()be removed as well?
Hi Jason
I have some patches for that. I will dig them out over the weekend.
I did have an issue with one of the LEDs. If i remember correctly, i sent you an email about it. Could you look back in your archive?
Thanks
Andrew
PATCH v2 15/20 arm: kirkwood: topkick: the Topkick platform uses a 88F6282 SoC
Quoted 27 lines · Andrew Lunn
Quoted 20 lines · Jason Cooper
Quoted 19 lines · Thomas Petazzoni
The Topkick board uses a 88F6282 SoC, so the Device Tree Source describing the Topkick should inherit from
kirkwood-6282.dtsi, which allows to take advantage of pin muxing capabilities.Signed-off-by Thomas Petazzoni <[email protected]>---
Changes since v1:
* This patch is new in v2--- arch/arm/boot/dts/kirkwood-topkick.dts | 1 + 1 file changed, 1 insertion(+)arch/arm/boot/dts/kirkwood-topkick.dts +0
-0@@ -1,6 +1,7 @@ /dts-v1/;Quoted 5 lines
arch/arm/boot/dts/kirkwood-topkick.dts line 4
Quoted 2 lines
arch/arm/boot/dts/kirkwood-topkick.dts +1
-0/include/ "kirkwood.dtsi" +/include/ "kirkwood-6282.dtsi"Hmmm, shouldn't the cooresponding MPP.._GPIO and
kirkwood_mpp_conf()be removed as well?
Quoted 6 lines
Hi Jason
I have some patches for that. I will dig them out over the weekend.
I did have an issue with one of the LEDs. If i remember correctly, i sent you an email about it. Could you look back in your archive?
Yes, I have it on my todo list. Unfortunately, I haven't unpacked my dev plats after my office relocation. :( Hopefully, I'll get that set up this weekend.
thx,
Jason.
PATCH v2 16/20 arm: kirkwood: topkick: use Device Tree to probe SDIO
In reply to Thomas PetazzoniNow that the mvsdio driver has a Device Tree binding, and the SDIO controller is declared in kirkwood.dtsi, migrate the topkick board to use the Device Tree to probe the SDIO controller and mux the pins of the SDIO interface properly.
The patch has been tested on the Topkick hardware. However, due to an apparently unrelated problem, it is unable to detect the Wifi chip connected on the SDIO bus.
---
Changes since v1:
* Remove the useless header inclusion from board-usi_topkick.c, now that the SDIO interface is probed from the Device Tree.
* Reference the pmx_sdio muxing option from the DT node describing the SDIO interface, in order to get proper muxing of this interface.
--- arch/arm/boot/dts/kirkwood-topkick.dts | 9 +++++++++ arch/arm/mach-kirkwood/board-usi_topkick.c | 6 ------ 2 files changed, 9 insertions(+), 6 deletions(-)
arch/arm/boot/dts/kirkwood-topkick.dts +9 -0
@@ -55,6 +55,15 @@ status = "okay"; nr-ports = <1>; }; + + + mvsdio at 90000 { + pinctrl-0 = <&pmx_sdio>; + pinctrl-names = "default"; + status = "okay"; + /* No CD or WP GPIOs */ + }; + }; gpio-leds {
arch/arm/mach-kirkwood/board-usi_topkick.c +0 -6
@@ -14,7 +14,6 @@#include <linux/init.h> #include <linux/mv643xx_eth.h> #include <linux/gpio.h> -#include <linux/platform_data/mmc-mvsdio.h> #include "common.h" #include "mpp.h"
@@ -22,10 +21,6 @@ static struct mv643xx_eth_platform_data topkick_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(0), }; -static struct mvsdio_platform_data topkick_mvsdio_data = { -/* unfortunately the CD signal has not been connected */ -}; -/* * GPIO LED layout *
@@ -77,5 +72,4 @@ void __init usi_topkick_init(void)gpio_set_value (TOPKICK_SATA0_PWR_ENABLE ,1 );kirkwood_ge00_init (&topkick_ge00_data); -kirkwood_sdio_init (&topkick_mvsdio_data); }
Signature · 1 line
1.7.9.5
PATCH v2 17/20 arm: kirkwood: dockstar: remove useless include of SDIO header
In reply to Thomas PetazzoniThe dockstar platform does not register any SDIO controller, therefore it does not need to include the mmc-mvsdio.h header.
--- arch/arm/mach-kirkwood/dockstar-setup.c | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-kirkwood/dockstar-setup.c +0 -1
@@ -19,7 +19,6 @@#include <asm/mach-types.h> #include <asm/mach/arch.h> #include <mach/kirkwood.h> -#include <linux/platform_data/mmc-mvsdio.h> #include "common.h" #include "mpp.h"
Signature · 1 line
1.7.9.5
PATCH v2 18/20 arm: mvebu: enable SDIO support in mvebu_defconfig
In reply to Thomas PetazzoniNow that the mvsdio driver has gained Device Tree support and the necessary Device Tree informations has been added for Armada 370 and Armada XP platforms, we enable the MMC subsystem and the mvsdio driver in mvebu_defconfig.
--- arch/arm/configs/mvebu_defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/configs/mvebu_defconfig +2 -0
@@ -39,6 +39,8 @@ CONFIG_I2C_MV64XXX=y CONFIG_GPIOLIB=y CONFIG_GPIO_SYSFS=y # CONFIG_USB_SUPPORT is not set +CONFIG_MMC=y +CONFIG_MMC_MVSDIO=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_S35390A=y CONFIG_DMADEVICES=y
Signature · 1 line
1.7.9.5
PATCH v2 19/20 arm: mvebu: enable mwifiex driver in mvebu_defconfig
In reply to Thomas PetazzoniThe Globalscale Mirabox platform, based on the Armada 370 from Marvell, has a SD8787 Wireless chip connected on the SDIO interface. Now that the mvsdio has a Device Tree binding, and the necessary Device Tree informations have been added at the SoC and board level, let's enable the mwifiex driver for the Wireless part of the SD8787 chip.
For now, the driver gets probed correctly, detects a device and shows the network interfaces. However, scanning Wifi networks doesn't work for now, with a 'CMD_RESP: cmd 0x6 error, result=0x1' message. This will have to be investigated separately.
--- arch/arm/configs/mvebu_defconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/configs/mvebu_defconfig +3 -0
@@ -24,6 +24,7 @@ CONFIG_ARM_APPENDED_DTB=y CONFIG_VFP=y CONFIG_NET=y CONFIG_INET=y +CONFIG_CFG80211=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_BLK_DEV_SD=y CONFIG_ATA=y
@@ -31,6 +32,8 @@ CONFIG_SATA_MV=y CONFIG_NETDEVICES=y CONFIG_MVNETA=y CONFIG_MARVELL_PHY=y +CONFIG_MWIFIEX=y +CONFIG_MWIFIEX_SDIO=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_OF_PLATFORM=y
Signature · 1 line
1.7.9.5
PATCH v2 20/20 arm: mvebu: enable btmrvl driver in mvebu_defconfig
In reply to Thomas PetazzoniThe Globalscale Mirabox platform, based on the Armada 370 from Marvell, has a SD8787 Wireless/Bluetooth chip connected on the SDIO interface. Now that the mvsdio has a Device Tree binding, and the necessary Device Tree informations have been added at the SoC and board level, let's enable the btmrvl driver for the Bluetooth part of the SD8787 chip.
For now, the driver gets probed correctly, detects the device but apparently fails to push the firmware to the device:
Bluetooth: vendor=0x2df, device=0x911a, class=255, fn=2
Bluetooth: FW failed to be active in time!
Bluetooth: Downloading firmware failed!
Bluetooth: vendor=0x2df, device=0x911b, class=255, fn=3
Bluetooth: FW failed to be active in time!
Bluetooth: Downloading firmware failed!
This will have to be investigated separately.
--- arch/arm/configs/mvebu_defconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/configs/mvebu_defconfig +3 -0
@@ -24,6 +24,9 @@ CONFIG_ARM_APPENDED_DTB=y CONFIG_VFP=y CONFIG_NET=y CONFIG_INET=y +CONFIG_BT=y +CONFIG_BT_MRVL=y +CONFIG_BT_MRVL_SDIO=y CONFIG_CFG80211=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_BLK_DEV_SD=y
Signature · 1 line
1.7.9.5
PATCH v2 1/1 Device Tree binding for the mvsdio driver and related changes
In reply to Thomas PetazzoniHello Thomas,
Quoted 8 lines · On Friday 21 December 2012 15:48:59 Thomas Petazzoni wrote:
Hello,
This series of patches adds a Device Tree binding to the mvsdio driver (the driver for the SDIO interface found in many Marvell SoCs), and uses this binding to enable the SDIO interface on Armada 370 and Armada XP platforms, as well as converting the Kirkwood platforms to using the Device Tree to probe the SDIO interface.
Quoted 4 lines
The series has been tested on Kirkwood Topkick, Armada 370 Mirabox, Armada XP OpenBlocks, Armada 370 DB and Armada XP DB. The changes on the Dreamplug and MPLCEC4 boards should be tested by their respective maintainers if possible.
Tested on DB-MV784MP-GP and RD-A370-A1 successfully with a 16GB card. Thanks!
Signature · 1 line
Florian
PATCH v2 1/1 Device Tree binding for the mvsdio driver and related changes
In reply to Thomas PetazzoniThomas,
Thanks for the patches, I've merged them as follows:
* note, I've sorted them below in the order they will be merged
Quoted 8 lines · Thomas Petazzoni
Hello,
This series of patches adds a Device Tree binding to the mvsdio driver (the driver for the SDIO interface found in many Marvell SoCs), and uses this binding to enable the SDIO interface on Armada 370 and Armada XP platforms, as well as converting the Kirkwood platforms to using the Device Tree to probe the SDIO interface.
Quoted 8 lines
The series has been tested on Kirkwood Topkick, Armada 370 Mirabox, Armada XP OpenBlocks, Armada 370 DB and Armada XP DB. The changes on the Dreamplug and MPLCEC4 boards should be tested by their respective maintainers if possible.
This series is obviously 3.9 material.
Here is a short description of the patches:
mvebu/cleanup
Quoted 2 lines
* Patch 17 removes a useless header inclusion related to the SDIO interface to the Kirkwood Dockstar platform.
mvebu/drivers
Quoted 6 lines
* Patches 1 and 2 cleanup the mvsdio driver initialization by using the slot-gpio helpers for the card-detect and write-protect GPIOs
* Patch 3 adds the Device Tree binding itself to the mvsdio driver
* Patch 4 adds pinctrl integration to the mvsdio driver
mvebu/boards
Quoted 3 lines
* Patches 18, 19 and 20 update the
mvebu_defconfigto enable the mvsdio driver, as well as Wifi/Bluetooth drivers needed for the SD8787 chip connected over SDIO on the Globalscale Mirabox.
mvebu/dt
Quoted 12 lines
* Patch 5 adds Device Tree information to describe the SDIO interface on the Armada 370 and Armada XP SoCs.
* Patches 6 and 7 add pin muxing options for the SDIO interface on Armada 370 and Armada XP SoCs.
* Patches 8, 9, 10 enable the SDIO interface on the Armada XP DB, Armada 370 DB and Globalscale Mirabox platforms.
* Patch 11 adds Device Tree information to describe the SDIO interface on the Kirkwood SoCs.
Quoted 6 lines
* Patches 12 and 13 convert the Dreamplug and mplcec4 Kirkwood platforms to use the Device Tree to probe their SDIO interface and mux the corresponding pins.
* Patch 14 adds a pin mux option for the SDIO interface on the 88F6282 SoC, which is used in the Topkick platform.
Dropped (see my reply to the individual patch):
Quoted 5 lines
* Patch 15 makes the Topkick DTS file inherit the
kirkwood-8262.dtsi, so that it gets the pinctrl definition.* Patch 16 converts the Kirkwood Topkick platform to use the Device Tree to probe its SDIO interface and mux the corresponding pins.
To give an idea of how it all pulls together so far, I have created a (prone to rebasing!) branch, mvebu/for-next in which I have done the following:
git checkout v3.8-rc2
git merge arm-soc/for-next
git merge mvebu/fixes
git merge mvebu/cleanup
git merge mvebu/drivers
git merge mvebu/boards
git merge mvebu/dt
So everything I've merged so far is in there, ready for testing.
thx,
Jason.