ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
v12 cover ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
Hi All,
Here is v12 of the sunxi-mmc patch-set David Lanzend?rfer and I have been working on, the mmc driver itself is unchanged from v11. New this version are some dts patch changes, see below.
The first patch in this series is the patch adding the actual mmc driver and should go in through the mmc tree.
All the other patches are devicetree patches adding / using the new fixed reg_vcc3v3 supply to all sunxi board files, and should go upstream through Maxime's sunxi-dts tree.
Changes since v1:
-Using mmc_of_parse instead of diy dt parsing -Adding nodes for all mmc controller to the dtsi files,
including sofar unused controllers
-Using generic GPIO slot library for WP/CD -Adding additional MMC device nodes into DTSI files
Changes since v2:
-Add missing Signed-off-by tags
-Stop using __raw_readl / __raw_writel so that barriers are properly used -Adding missing new lines
-Adding missing patch for automatic reparenting of clocks
Changes since v3:
-Move clk_enable / disable into host_init / exit (Hans) -Fix hang on boot caused by irq storm (Hans)
Changes since v4:
-moving sunxi-mci.{c/h} to sunxi-mmc.{c/h} -removing camel cases from the defines in sunxi-mmc.h -moving defines out of the struct definition
since this is bad coding style
-adding documentation for the device tree binding Changes since v5:
-adding host initialization for when the sdio irq is enabled
(just to make sure having a defined state at all time)
-add mmc support fixup: set pullup on cd pins -fixup: Don't set MMC_CAP_NEEDS_POLL / MMC_CAP_4_BIT_DATA
Changes since v6:
-fixing copyright info in sunxi-mmc.*
-s/__SUNXI_MCI_H__/__SUNXI_MMC_H__/g
-s/SDXC_RESPONSE_/SDXC_RESP_/g
-s/define/definitions <- Comment from Priit Laes
Changes since v7:
-Merge sunxi-mmc.h into sunxi-mmc.c
-Various style fixes / cleanups based on Maxime's review
-sun6i support
-Fix a race condition in interrupt / tasklet interaction
-Split the dts patches into 3 per platform:
1) Add mmc nodes to the dtsi
2) Add mmc pinmux to the dtsi
3) Add mmc nodes to the various board files
-Moved setting of bus-width and cd gpio polarity from .dtsi to the board-files -Added sun6i dts patches
Changes since v8:
-Don't claim MMC_CAP_SDIO_IRQ by default, sdio-irq support appears to not
always be reliable. Can be re-added to the caps on a per board basis through dts
-Added EXPORT_SYMBOL(clk_sunxi_mmc_phase_control)
-Moved bus-width and cd-inverted dts attributes for sun6i from dtsi to dts -Squashed patches adding sun6i-a31-m9.dts and mmc support for m9 together -Added a patch enabling the sdio wifi on the cubietruck in dts
Changes since v9:
-Drop the sun5i and sun6i dts pinmux patches as those have already been
accepted
-Rename the mmc clock for the controller from "mod" to "mmc" so as
to not confuse it with a regular mod0 clock
-Rename pinmux for the reference design card-detect pin from cd_pin_a to
cd_pin_reference_design
Changes since v10:
-Dropped all dts and clk patches, as they are all accepted now -Cleanup some somewhat weird names (leftovers from the android code):
s/mci_readl/mmc_readl/
s/mci_writel/mmc_write/
s/smc_host/host/
-Switched to mmc_regulator_get_supply API and added fixed regulator nodes to
all board files (introducing new dts patches)
-Got rid of duplicate ios info
-Stop checking card-detect before each request
-Drop usleep after changing the clock rate
-Drop incomplete / wrong voltage switching support
-Drop the large comment with values copy/pasted from the spec -Move enable/disable clk + reset + irq calls from power up / down to
probe / remove
-Make sunxi_mmc_clk_set_rate / sunxi_mmc_oclk_onoff return an error -Use a threaded interrupt handler for sending an explicit stop on data errors -Fix sunxi_mmc_send_manual_stop to properly stop ongoing SD_IO_RW_EXTENDED cmds
Changes since v11:
-Instead of adding a reg_vmmc0 regulator add a fixed reg_vcc3v3 regulator, as
we may need it in other places too
-Also add a vmmc-supply entry to thr non mmc0 nodes on the 2 boards which have
multiple sdcard slots.
Regards,
Hans
PATCH v12 1/6 ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
From: David Lanzend??rfer <[email protected]>
The Allwinner sunxi mmc host uses dma in bus-master mode using a built-in designware idmac controller, which is identical to the one found in the mmc-dw hosts. However the rest of the host is not identical to mmc-dw, it deals with sending stop commands in hardware which makes it significantly different from the mmc-dw devices.
HdG: Various cleanups and fixes.
--- .../devicetree/bindings/mmc/sunxi-mmc.txt | 43 + drivers/mmc/host/Kconfig | 7 + drivers/mmc/host/Makefile | 2 + drivers/mmc/host/sunxi-mmc.c | 1050 ++++++++++++++++++++ 4 files changed, 1102 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/sunxi-mmc.txt create mode 100644 drivers/mmc/host/sunxi-mmc.c
Documentation/devicetree/bindings/mmc/sunxi-mmc.txt new file +43 -0
@@ -0,0 +1,43 @@ +* Allwinner sunxi MMC controller + +The highspeed MMC host controller on Allwinner SoCs provides an interface +for MMC, SD and SDIO types of memory cards. + +Supported maximum speeds are the ones of the eMMC standard 4.5 as well +as the speed of SD standard 3.0. +Absolute maximum transfer rate is 200MB/s + +Required properties: + - compatible : "allwinner,sun4i-a10-mmc" or "allwinner,sun5i-a13-mmc" + - reg : mmc controller base registers + - clocks : a list with 2 phandle + clock specifier pairs + - clock-names : must contain "ahb" and "mmc" + - interrupts : mmc controller interrupt + +Optional properties: + - resets : phandle + reset specifier pair + - reset-names : must contain "ahb" + - for cd, bus-width and additional generic mmc parameters + please refer to mmc.txt within this directory + +Examples: + - Within .dtsi: + mmc0: mmc at 01c0f000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c0f000 0x1000>; + clocks = <&ahb_gates 8>, <&mmc0_clk>; + clock-names = "ahb", "mod"; + interrupts = <0 32 4>; + status = "disabled"; + }; + + - Within dts: + mmc0: mmc at 01c0f000 { + pinctrl-names = "default", "default"; + pinctrl-0 = <&mmc0_pins_a>; + pinctrl-1 = <&mmc0_cd_pin_reference_design>; + bus-width = <4>; + cd-gpios = <&pio 7 1 0>; /* PH1 */ + cd-inverted; + status = "okay"; + };
drivers/mmc/host/Kconfig +7 -0
@@ -694,3 +694,10 @@ config MMC_REALTEK_PCI help Say Y here to include driver code to support SD/MMC card interface of Realtek PCI-E card reader + +config MMC_SUNXI + tristate "Allwinner sunxi SD/MMC Host Controller support" + depends on ARCH_SUNXI + help + This selects support for the SD/MMC Host Controller on + Allwinner sunxi SoCs.
drivers/mmc/host/Makefile +2 -0
@@ -53,6 +53,8 @@ obj-$(CONFIG_MMC_WMT) += wmt-sdmmc.o obj-$(CONFIG_MMC_REALTEK_PCI) += rtsx_pci_sdmmc.o +obj-$(CONFIG_MMC_SUNXI) += sunxi-mmc.o + obj-$(CONFIG_MMC_SDHCI_PLTFM) += sdhci-pltfm.o obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += sdhci-cns3xxx.o obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX) += sdhci-esdhc-imx.o
drivers/mmc/host/sunxi-mmc.c new file +1050 -0
1,050 lines not on this page · raw message
Signature · 1 line
1.9.0
PATCH v12 1/6 ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
Quoted 12 lines · Hans de Goede
From: David Lanzend?rfer <[email protected]>
The Allwinner sunxi mmc host uses dma in bus-master mode using a built-in designware idmac controller, which is identical to the one found in the mmc-dw hosts. However the rest of the host is not identical to mmc-dw, it deals with sending stop commands in hardware which makes it significantly different from the mmc-dw devices.
HdG: Various cleanups and fixes.
Signed-off-by David Lanzend?rfer <[email protected]>Signed-off-by Hans de Goede <[email protected]>
[snip]
drivers/mmc/host/sunxi-mmc.c line 621
Quoted 6 lines
drivers/mmc/host/sunxi-mmc.c new file +6
-0+ +static int sunxi_mmc_clk_set_rate (struct sunxi_mmc_host *host, +struct mmc_ios *ios) +{ +u32 rate, oclk_dly, rval, sclk_dly, src_clk; +struct clk_hw *hw =__clk_get_hw (host->clk_mmc);
Hi Hans,
This seems like the wrong approach. But I guess it's related to the "clock phase control" API you have been discussing with the clk maintainer, Mike Turquette!?
__clk_get_hw is supposed to be used by clk providers, not clk consumers.
Quoted 47 lines
drivers/mmc/host/sunxi-mmc.c new file +47
-0+int ret; + + rate =clk_round_rate (host->clk_mmc, ios->clock); +dev_dbg (mmc_dev (host->mmc),"setting clk to %d, rounded %d\n" , + ios->clock, rate); + +/* setting clock rate */ + ret =clk_set_rate (host->clk_mmc, rate); +if (ret) { +dev_err (mmc_dev (host->mmc),"error setting clk to %d: %d\n" , + rate, ret); +return ret; + } + + ret =sunxi_mmc_oclk_onoff (host,0 ); +if (ret) +return ret; + +/* clear internal divider */ + rval =mmc_readl (host,REG_CLKCR ); + rval &= ~0xff ; +mmc_writel (host,REG_CLKCR , rval); + +/* determine delays */ +if (rate <=400000 ) { + oclk_dly =0 ; + sclk_dly =7 ; + }else if (rate <=25000000 ) { + oclk_dly =0 ; + sclk_dly =5 ; + }else if (rate <=50000000 ) { +if (ios->timing ==MMC_TIMING_UHS_DDR50 ) { + oclk_dly =2 ; + sclk_dly =4 ; + }else { + oclk_dly =3 ; + sclk_dly =5 ; + } + }else { +/* rate > 50000000 */ + oclk_dly =2 ; + sclk_dly =4 ; + } + + src_clk =clk_get_rate (clk_get_parent (host->clk_mmc)); +if (src_clk >=300000000 && src_clk <=400000000 ) { +if (oclk_dly)
drivers/mmc/host/sunxi-mmc.c line 678
Quoted 10 lines
drivers/mmc/host/sunxi-mmc.c new file +10
-0+ oclk_dly--; +if (sclk_dly) + sclk_dly--; + } + +clk_sunxi_mmc_phase_control (hw, sclk_dly, oclk_dly); + +return sunxi_mmc_oclk_onoff (host,1 ); +} +
[snip]
Besides the above, I think this looks good!
Kind regards
Ulf Hansson
PATCH v12 1/6 ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
Hi,
Quoted 25 lines · Ulf Hansson
Quoted 12 lines · Hans de Goede
From: David Lanzend?rfer <[email protected]>
The Allwinner sunxi mmc host uses dma in bus-master mode using a built-in designware idmac controller, which is identical to the one found in the mmc-dw hosts. However the rest of the host is not identical to mmc-dw, it deals with sending stop commands in hardware which makes it significantly different from the mmc-dw devices.
HdG: Various cleanups and fixes.
Signed-off-by David Lanzend?rfer <[email protected]>Signed-off-by Hans de Goede <[email protected]>[snip]
drivers/mmc/host/sunxi-mmc.c line 621
Quoted 6 lines
drivers/mmc/host/sunxi-mmc.c new file +6
-0+ +static int sunxi_mmc_clk_set_rate (struct sunxi_mmc_host *host, +struct mmc_ios *ios) +{ +u32 rate, oclk_dly, rval, sclk_dly, src_clk; +struct clk_hw *hw =__clk_get_hw (host->clk_mmc);Hi Hans,
Quoted 3 lines
This seems like the wrong approach. But I guess it's related to the "clock phase control" API you have been discussing with the clk maintainer, Mike Turquette!?
Yes, this is meant as a temporary solution until we get a proper "clock phase control" API.
Quoted 63 lines
__clk_get_hwis supposed to be used by clk providers, not clk consumers.Quoted 57 lines
drivers/mmc/host/sunxi-mmc.c new file +57
-0+int ret; + + rate =clk_round_rate (host->clk_mmc, ios->clock); +dev_dbg (mmc_dev (host->mmc),"setting clk to %d, rounded %d\n" , + ios->clock, rate); + +/* setting clock rate */ + ret =clk_set_rate (host->clk_mmc, rate); +if (ret) { +dev_err (mmc_dev (host->mmc),"error setting clk to %d: %d\n" , + rate, ret); +return ret; + } + + ret =sunxi_mmc_oclk_onoff (host,0 ); +if (ret) +return ret; + +/* clear internal divider */ + rval =mmc_readl (host,REG_CLKCR ); + rval &= ~0xff ; +mmc_writel (host,REG_CLKCR , rval); + +/* determine delays */ +if (rate <=400000 ) { + oclk_dly =0 ; + sclk_dly =7 ; + }else if (rate <=25000000 ) { + oclk_dly =0 ; + sclk_dly =5 ; + }else if (rate <=50000000 ) { +if (ios->timing ==MMC_TIMING_UHS_DDR50 ) { + oclk_dly =2 ; + sclk_dly =4 ; + }else { + oclk_dly =3 ; + sclk_dly =5 ; + } + }else { +/* rate > 50000000 */ + oclk_dly =2 ; + sclk_dly =4 ; + } + + src_clk =clk_get_rate (clk_get_parent (host->clk_mmc)); +if (src_clk >=300000000 && src_clk <=400000000 ) { +if (oclk_dly) + oclk_dly--; +if (sclk_dly) + sclk_dly--; + } + +clk_sunxi_mmc_phase_control (hw, sclk_dly, oclk_dly); + +return sunxi_mmc_oclk_onoff (host,1 ); +} +[snip]
Quoted 1 line
Besides the above, I think this looks good!
Thanks!
Since Mike Turquette has already merged clk_sunxi_mmc_phase_control I would like to keep this as is, as I already promised Mike, I can safely promise you too: I promise clean this up as soon as the "clock phase control" API has been worked out.
Regards,
Hans
PATCH v12 1/6 ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
Quoted 98 lines · Hans de Goede
Hi,
Quoted 25 lines · Ulf Hansson
Quoted 12 lines · Hans de Goede
From: David Lanzend?rfer <[email protected]>
The Allwinner sunxi mmc host uses dma in bus-master mode using a built-in designware idmac controller, which is identical to the one found in the mmc-dw hosts. However the rest of the host is not identical to mmc-dw, it deals with sending stop commands in hardware which makes it significantly different from the mmc-dw devices.
HdG: Various cleanups and fixes.
Signed-off-by David Lanzend?rfer <[email protected]>Signed-off-by Hans de Goede <[email protected]>[snip]
drivers/mmc/host/sunxi-mmc.c line 621
Quoted 6 lines
drivers/mmc/host/sunxi-mmc.c new file +6
-0+ +static int sunxi_mmc_clk_set_rate (struct sunxi_mmc_host *host, +struct mmc_ios *ios) +{ +u32 rate, oclk_dly, rval, sclk_dly, src_clk; +struct clk_hw *hw =__clk_get_hw (host->clk_mmc);Hi Hans,
Quoted 3 lines
This seems like the wrong approach. But I guess it's related to the "clock phase control" API you have been discussing with the clk maintainer, Mike Turquette!?
Yes, this is meant as a temporary solution until we get a proper "clock phase control" API.
Quoted 63 lines
__clk_get_hwis supposed to be used by clk providers, not clk consumers.Quoted 57 lines
drivers/mmc/host/sunxi-mmc.c new file +57
-0+int ret; + + rate =clk_round_rate (host->clk_mmc, ios->clock); +dev_dbg (mmc_dev (host->mmc),"setting clk to %d, rounded %d\n" , + ios->clock, rate); + +/* setting clock rate */ + ret =clk_set_rate (host->clk_mmc, rate); +if (ret) { +dev_err (mmc_dev (host->mmc),"error setting clk to %d: %d\n" , + rate, ret); +return ret; + } + + ret =sunxi_mmc_oclk_onoff (host,0 ); +if (ret) +return ret; + +/* clear internal divider */ + rval =mmc_readl (host,REG_CLKCR ); + rval &= ~0xff ; +mmc_writel (host,REG_CLKCR , rval); + +/* determine delays */ +if (rate <=400000 ) { + oclk_dly =0 ; + sclk_dly =7 ; + }else if (rate <=25000000 ) { + oclk_dly =0 ; + sclk_dly =5 ; + }else if (rate <=50000000 ) { +if (ios->timing ==MMC_TIMING_UHS_DDR50 ) { + oclk_dly =2 ; + sclk_dly =4 ; + }else { + oclk_dly =3 ; + sclk_dly =5 ; + } + }else { +/* rate > 50000000 */ + oclk_dly =2 ; + sclk_dly =4 ; + } + + src_clk =clk_get_rate (clk_get_parent (host->clk_mmc)); +if (src_clk >=300000000 && src_clk <=400000000 ) { +if (oclk_dly) + oclk_dly--; +if (sclk_dly) + sclk_dly--; + } + +clk_sunxi_mmc_phase_control (hw, sclk_dly, oclk_dly); + +return sunxi_mmc_oclk_onoff (host,1 ); +} +[snip]
Quoted 8 lines
Quoted 1 line
Besides the above, I think this looks good!
Thanks!
Since Mike Turquette has already merged
clk_sunxi_mmc_phase_controlI would like to keep this as is, as I already promised Mike, I can safely promise you too: I promise clean this up as soon as the "clock phase control" API has been worked out.
Thanks for promise. :-)
Anyway, I think I would like Mike to confirm this violation is accepted as a temporary solution. Additionally I would like it to be commented in the code here, that it's a temporary solution and that it violates the clk API.
Kind regards
Ulf Hansson
Quoted 4 lines
Regards,
Hans
PATCH v12 1/6 ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
Hi,
Quoted 108 lines · Ulf Hansson
Quoted 98 lines · Hans de Goede
Hi,
Quoted 25 lines · Ulf Hansson
Quoted 12 lines · Hans de Goede
From: David Lanzend?rfer <[email protected]>
The Allwinner sunxi mmc host uses dma in bus-master mode using a built-in designware idmac controller, which is identical to the one found in the mmc-dw hosts. However the rest of the host is not identical to mmc-dw, it deals with sending stop commands in hardware which makes it significantly different from the mmc-dw devices.
HdG: Various cleanups and fixes.
Signed-off-by David Lanzend?rfer <[email protected]>Signed-off-by Hans de Goede <[email protected]>[snip]
drivers/mmc/host/sunxi-mmc.c line 621
Quoted 6 lines
drivers/mmc/host/sunxi-mmc.c new file +6
-0+ +static int sunxi_mmc_clk_set_rate (struct sunxi_mmc_host *host, +struct mmc_ios *ios) +{ +u32 rate, oclk_dly, rval, sclk_dly, src_clk; +struct clk_hw *hw =__clk_get_hw (host->clk_mmc);Hi Hans,
Quoted 3 lines
This seems like the wrong approach. But I guess it's related to the "clock phase control" API you have been discussing with the clk maintainer, Mike Turquette!?
Yes, this is meant as a temporary solution until we get a proper "clock phase control" API.
Quoted 63 lines
__clk_get_hwis supposed to be used by clk providers, not clk consumers.Quoted 57 lines
drivers/mmc/host/sunxi-mmc.c new file +57
-0+int ret; + + rate =clk_round_rate (host->clk_mmc, ios->clock); +dev_dbg (mmc_dev (host->mmc),"setting clk to %d, rounded %d\n" , + ios->clock, rate); + +/* setting clock rate */ + ret =clk_set_rate (host->clk_mmc, rate); +if (ret) { +dev_err (mmc_dev (host->mmc),"error setting clk to %d: %d\n" , + rate, ret); +return ret; + } + + ret =sunxi_mmc_oclk_onoff (host,0 ); +if (ret) +return ret; + +/* clear internal divider */ + rval =mmc_readl (host,REG_CLKCR ); + rval &= ~0xff ; +mmc_writel (host,REG_CLKCR , rval); + +/* determine delays */ +if (rate <=400000 ) { + oclk_dly =0 ; + sclk_dly =7 ; + }else if (rate <=25000000 ) { + oclk_dly =0 ; + sclk_dly =5 ; + }else if (rate <=50000000 ) { +if (ios->timing ==MMC_TIMING_UHS_DDR50 ) { + oclk_dly =2 ; + sclk_dly =4 ; + }else { + oclk_dly =3 ; + sclk_dly =5 ; + } + }else { +/* rate > 50000000 */ + oclk_dly =2 ; + sclk_dly =4 ; + } + + src_clk =clk_get_rate (clk_get_parent (host->clk_mmc)); +if (src_clk >=300000000 && src_clk <=400000000 ) { +if (oclk_dly) + oclk_dly--; +if (sclk_dly) + sclk_dly--; + } + +clk_sunxi_mmc_phase_control (hw, sclk_dly, oclk_dly); + +return sunxi_mmc_oclk_onoff (host,1 ); +} +[snip]
Quoted 8 lines
Quoted 1 line
Besides the above, I think this looks good!
Thanks!
Since Mike Turquette has already merged
clk_sunxi_mmc_phase_controlI would like to keep this as is, as I already promised Mike, I can safely promise you too: I promise clean this up as soon as the "clock phase control" API has been worked out.
Quoted 6 lines
Thanks for promise. :-)
Anyway, I think I would like Mike to confirm this violation is accepted as a temporary solution. Additionally I would like it to be commented in the code here, that it's a temporary solution and that it violates the clk API.
Thinking more about this the __clk_get_hw call really should have been inside the clk_sunxi_mmc_phase_control function. I'll do a followup patch for Mike / the clk tree to fix this, and do a v13 of the sunxi-mmc driver using the updated version.
Regards,
Hans
PATCH v12 2/6 ARM: dts: sunxi: Add reg_vcc3v3 supply to sunxi-common-regulators.dtsi
In reply to Hans de Goede--- arch/arm/boot/dts/sunxi-common-regulators.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/sunxi-common-regulators.dtsi +7 -0
@@ -72,4 +72,11 @@ gpio = <&pio 7 3 0>; status = "disabled"; }; + + reg_vcc3v3: vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; };
Signature · 1 line
1.9.0
PATCH v12 3/6 ARM: dts: sun4i: Add reg_vcc3v3 to sun4i board mmc nodes
In reply to Hans de Goede--- arch/arm/boot/dts/sun4i-a10-a1000.dts | 1 + arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 1 + arch/arm/boot/dts/sun4i-a10-hackberry.dts | 1 + arch/arm/boot/dts/sun4i-a10-inet97fv2.dts | 1 + arch/arm/boot/dts/sun4i-a10-mini-xplus.dts | 1 + arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 1 + arch/arm/boot/dts/sun4i-a10-pcduino.dts | 1 + 7 files changed, 7 insertions(+)
arch/arm/boot/dts/sun4i-a10-a1000.dts +1 -0
@@ -39,6 +39,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-inverted;
arch/arm/boot/dts/sun4i-a10-cubieboard.dts +1 -0
@@ -37,6 +37,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-inverted;
arch/arm/boot/dts/sun4i-a10-hackberry.dts +1 -0
@@ -39,6 +39,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-inverted;
arch/arm/boot/dts/sun4i-a10-inet97fv2.dts +1 -0
@@ -27,6 +27,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-inverted;
arch/arm/boot/dts/sun4i-a10-mini-xplus.dts +1 -0
@@ -23,6 +23,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-inverted;
arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts +1 -0
@@ -36,6 +36,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-inverted;
arch/arm/boot/dts/sun4i-a10-pcduino.dts +1 -0
@@ -37,6 +37,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-inverted;
Signature · 1 line
1.9.0
PATCH v12 4/6 ARM: dts: sun5i: Add reg_vcc3v3 to sun5i board mmc nodes
In reply to Hans de Goede--- arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 2 ++ arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 1 + arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 1 + 3 files changed, 4 insertions(+)
arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts +2 -0
@@ -38,6 +38,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino_micro>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 6 1 0>; /* PG1 */ cd-inverted;
@@ -47,6 +48,7 @@ mmc1: mmc at 01c10000 { pinctrl-names = "default"; pinctrl-0 = <&mmc1_pins_a>, <&mmc1_cd_pin_olinuxino_micro>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 6 13 0>; /* PG13 */ cd-inverted;
arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts +1 -0
@@ -24,6 +24,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxinom>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 6 0 0>; /* PG0 */ cd-inverted;
arch/arm/boot/dts/sun5i-a13-olinuxino.dts +1 -0
@@ -23,6 +23,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 6 0 0>; /* PG0 */ cd-inverted;
Signature · 1 line
1.9.0
PATCH v12 5/6 ARM: dts: sun6i: Add reg_vcc3v3 to sun6i board mmc nodes
In reply to Hans de Goede--- arch/arm/boot/dts/sun6i-a31-m9.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/sun6i-a31-m9.dts +2 -0
@@ -11,6 +11,7 @@ /dts-v1/; /include/ "sun6i-a31.dtsi" +/include/ "sunxi-common-regulators.dtsi" / { model = "Mele M9 / A1000G Quad top set box";
@@ -24,6 +25,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_m9>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 7 22 0>; /* PH22 */ cd-inverted;
Signature · 1 line
1.9.0
PATCH v12 6/6 ARM: dts: sun7i: Add reg_vcc3v3 to sun7i board mmc nodes
In reply to Hans de Goede--- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 1 + arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 1 + arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 2 ++ 3 files changed, 4 insertions(+)
arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +1 -0
@@ -23,6 +23,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-inverted;
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +1 -0
@@ -23,6 +23,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-inverted;
arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts +2 -0
@@ -34,6 +34,7 @@ mmc0: mmc at 01c0f000 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 7 1 0>; /* PH1 */ cd-inverted;
@@ -43,6 +44,7 @@ mmc3: mmc at 01c12000 { pinctrl-names = "default"; pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olinuxinom>; + vmmc-supply = <®_vcc3v3>; bus-width = <4>; cd-gpios = <&pio 7 11 0>; /* PH11 */ cd-inverted;
Signature · 1 line
1.9.0
v12 cover ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
In reply to Hans de GoedeHi Hans,
Quoted 6 lines · Hans de Goede
Hi All,
Here is v12 of the sunxi-mmc patch-set David Lanzend?rfer and I have been working on, the mmc driver itself is unchanged from v11. New this version are some dts patch changes, see below.
Quoted 6 lines
The first patch in this series is the patch adding the actual mmc driver and should go in through the mmc tree.
All the other patches are devicetree patches adding / using the new fixed
reg_vcc3v3supply to all sunxi board files, and should go upstream through Maxime's sunxi-dts tree.
I just merged the last 5 patches.
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140511/35d4d738/attachment.sig>