* [PATCH v2 0/3] Allwinner H6 MMC support @ 2018-07-19 4:28 Icenowy Zheng [not found] ` <20180719042810.6546-1-icenowy-h8G6r0blFSE@public.gmane.org> 2018-07-19 4:28 ` [PATCH v2 3/3] arm64: allwinner: h6: enable MMC0/2 on Pine H64 Icenowy Zheng 0 siblings, 2 replies; 6+ messages in thread From: Icenowy Zheng @ 2018-07-19 4:28 UTC (permalink / raw) To: Rob Herring, Maxime Ripard, Chen-Yu Tsai Cc: linux-mmc-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng This patchset adds support for MMC controller in the Allwinner H6 SoC. Its function is a superset of the A64 MMC controller's, so it currently use A64 compatible as a fallback. Icenowy Zheng (3): dt-binding: mmc: sunxi: add H6 compatible (with A64 fallback) arm64: allwinner: h6: add device tree nodes for MMC controllers arm64: allwinner: h6: enable MMC0/2 on Pine H64 .../devicetree/bindings/mmc/sunxi-mmc.txt | 2 + .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 18 ++++++ arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 59 +++++++++++++++++++ 3 files changed, 79 insertions(+) -- 2.17.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20180719042810.6546-1-icenowy-h8G6r0blFSE@public.gmane.org>]
* [PATCH v2 1/3] dt-binding: mmc: sunxi: add H6 compatible (with A64 fallback) [not found] ` <20180719042810.6546-1-icenowy-h8G6r0blFSE@public.gmane.org> @ 2018-07-19 4:28 ` Icenowy Zheng [not found] ` <20180719042810.6546-2-icenowy-h8G6r0blFSE@public.gmane.org> 2018-07-19 4:28 ` [PATCH v2 2/3] arm64: allwinner: h6: add device tree nodes for MMC controllers Icenowy Zheng 2018-07-19 14:51 ` [PATCH v2 0/3] Allwinner H6 MMC support Maxime Ripard 2 siblings, 1 reply; 6+ messages in thread From: Icenowy Zheng @ 2018-07-19 4:28 UTC (permalink / raw) To: Rob Herring, Maxime Ripard, Chen-Yu Tsai Cc: linux-mmc-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng The MMC controllers on H6 is similar to the ones on A64, but with some new features. Add compatible strings for them (with the A64 compatible strings as fallback, in order to make them to work with A64 drivers). Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> --- Changes in v2: - Add A64 fallback. Documentation/devicetree/bindings/mmc/sunxi-mmc.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt b/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt index 132e0007d7d6..e9cb3ec5e502 100644 --- a/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt +++ b/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt @@ -16,6 +16,8 @@ Required properties: * "allwinner,sun9i-a80-mmc" * "allwinner,sun50i-a64-emmc" * "allwinner,sun50i-a64-mmc" + * "allwinner,sun50i-h6-emmc", "allwinner.sun50i-a64-emmc" + * "allwinner,sun50i-h6-mmc", "allwinner.sun50i-a64-mmc" - reg : mmc controller base registers - clocks : a list with 4 phandle + clock specifier pairs - clock-names : must contain "ahb", "mmc", "output" and "sample" -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <20180719042810.6546-2-icenowy-h8G6r0blFSE@public.gmane.org>]
* Re: [PATCH v2 1/3] dt-binding: mmc: sunxi: add H6 compatible (with A64 fallback) [not found] ` <20180719042810.6546-2-icenowy-h8G6r0blFSE@public.gmane.org> @ 2018-07-26 1:14 ` Icenowy Zheng 0 siblings, 0 replies; 6+ messages in thread From: Icenowy Zheng @ 2018-07-26 1:14 UTC (permalink / raw) To: Rob Herring, Maxime Ripard, Chen-Yu Tsai Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, linux-mmc-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r 在 2018-07-19四的 12:28 +0800,Icenowy Zheng写道: > The MMC controllers on H6 is similar to the ones on A64, but with > some > new features. > > Add compatible strings for them (with the A64 compatible strings as > fallback, in order to make them to work with A64 drivers). > > Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> > --- > Changes in v2: > - Add A64 fallback. > > Documentation/devicetree/bindings/mmc/sunxi-mmc.txt | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt > b/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt > index 132e0007d7d6..e9cb3ec5e502 100644 > --- a/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt > +++ b/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt > @@ -16,6 +16,8 @@ Required properties: > * "allwinner,sun9i-a80-mmc" > * "allwinner,sun50i-a64-emmc" > * "allwinner,sun50i-a64-mmc" > + * "allwinner,sun50i-h6-emmc", "allwinner.sun50i-a64-emmc" > + * "allwinner,sun50i-h6-mmc", "allwinner.sun50i-a64-mmc" BTW it seems that the driver performs quite bad on H6 when dealing it as an A64. I get 1.5MB/s on a card, although the card can reach 20MB/s read speed (testing on BSP). > - reg : mmc controller base registers > - clocks : a list with 4 phandle + clock specifier pairs > - clock-names : must contain "ahb", "mmc", "output" and "sample" -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] arm64: allwinner: h6: add device tree nodes for MMC controllers [not found] ` <20180719042810.6546-1-icenowy-h8G6r0blFSE@public.gmane.org> 2018-07-19 4:28 ` [PATCH v2 1/3] dt-binding: mmc: sunxi: add H6 compatible (with A64 fallback) Icenowy Zheng @ 2018-07-19 4:28 ` Icenowy Zheng 2018-07-19 14:51 ` [PATCH v2 0/3] Allwinner H6 MMC support Maxime Ripard 2 siblings, 0 replies; 6+ messages in thread From: Icenowy Zheng @ 2018-07-19 4:28 UTC (permalink / raw) To: Rob Herring, Maxime Ripard, Chen-Yu Tsai Cc: linux-mmc-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng The Allwinner H6 SoC have 3 MMC controllers. Add device tree nodes for them. Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org> --- Changes in v2: - Add A64 compatible fallback. arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 59 ++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 37c2e11fca2e..cfa5fffcf62b 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -126,12 +126,71 @@ interrupt-controller; #interrupt-cells = <3>; + mmc0_pins: mmc0-pins { + pins = "PF0", "PF1", "PF2", "PF3", + "PF4", "PF5"; + function = "mmc0"; + drive-strength = <30>; + bias-pull-up; + }; + + mmc2_pins: mmc2-pins { + pins = "PC1", "PC4", "PC5", "PC6", + "PC7", "PC8", "PC9", "PC10", + "PC11", "PC12", "PC13", "PC14"; + function = "mmc2"; + drive-strength = <30>; + bias-pull-up; + }; + uart0_ph_pins: uart0-ph { pins = "PH0", "PH1"; function = "uart0"; }; }; + mmc0: mmc@4020000 { + compatible = "allwinner,sun50i-h6-mmc", + "allwinner,sun50i-a64-mmc"; + reg = <0x04020000 0x1000>; + clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>; + clock-names = "ahb", "mmc"; + resets = <&ccu RST_BUS_MMC0>; + reset-names = "ahb"; + interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + mmc1: mmc@4021000 { + compatible = "allwinner,sun50i-h6-mmc", + "allwinner,sun50i-a64-mmc"; + reg = <0x04021000 0x1000>; + clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>; + clock-names = "ahb", "mmc"; + resets = <&ccu RST_BUS_MMC1>; + reset-names = "ahb"; + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + mmc2: mmc@4022000 { + compatible = "allwinner,sun50i-h6-emmc", + "allwinner,sun50i-a64-emmc"; + reg = <0x04022000 0x1000>; + clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>; + clock-names = "ahb", "mmc"; + resets = <&ccu RST_BUS_MMC2>; + reset-names = "ahb"; + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + uart0: serial@5000000 { compatible = "snps,dw-apb-uart"; reg = <0x05000000 0x400>; -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/3] Allwinner H6 MMC support [not found] ` <20180719042810.6546-1-icenowy-h8G6r0blFSE@public.gmane.org> 2018-07-19 4:28 ` [PATCH v2 1/3] dt-binding: mmc: sunxi: add H6 compatible (with A64 fallback) Icenowy Zheng 2018-07-19 4:28 ` [PATCH v2 2/3] arm64: allwinner: h6: add device tree nodes for MMC controllers Icenowy Zheng @ 2018-07-19 14:51 ` Maxime Ripard 2 siblings, 0 replies; 6+ messages in thread From: Maxime Ripard @ 2018-07-19 14:51 UTC (permalink / raw) To: Icenowy Zheng Cc: Rob Herring, Chen-Yu Tsai, linux-mmc-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 385 bytes --] On Thu, Jul 19, 2018 at 12:28:07PM +0800, Icenowy Zheng wrote: > This patchset adds support for MMC controller in the Allwinner H6 SoC. > > Its function is a superset of the A64 MMC controller's, so it currently > use A64 compatible as a fallback. Applied, thanks! Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] arm64: allwinner: h6: enable MMC0/2 on Pine H64 2018-07-19 4:28 [PATCH v2 0/3] Allwinner H6 MMC support Icenowy Zheng [not found] ` <20180719042810.6546-1-icenowy-h8G6r0blFSE@public.gmane.org> @ 2018-07-19 4:28 ` Icenowy Zheng 1 sibling, 0 replies; 6+ messages in thread From: Icenowy Zheng @ 2018-07-19 4:28 UTC (permalink / raw) To: Rob Herring, Maxime Ripard, Chen-Yu Tsai Cc: linux-mmc, devicetree, linux-arm-kernel, linux-kernel, linux-sunxi, Icenowy Zheng The Pine H64 board have a MicroSD slot connected to MMC0 controller of the H6 SoC and a eMMC slot connected to MMC2. Enable them in the device tree. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> --- Changes in v2: - Use real regulator instead of dummy regulator. .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts index 1673636358ef..ceffc40810ee 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts @@ -41,6 +41,24 @@ }; }; +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; + vmmc-supply = <®_cldo1>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_pins>; + vmmc-supply = <®_cldo1>; + vqmmc-supply = <®_bldo2>; + non-removable; + cap-mmc-hw-reset; + status = "okay"; +}; + &r_i2c { status = "okay"; -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-07-26 1:14 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-07-19 4:28 [PATCH v2 0/3] Allwinner H6 MMC support Icenowy Zheng [not found] ` <20180719042810.6546-1-icenowy-h8G6r0blFSE@public.gmane.org> 2018-07-19 4:28 ` [PATCH v2 1/3] dt-binding: mmc: sunxi: add H6 compatible (with A64 fallback) Icenowy Zheng [not found] ` <20180719042810.6546-2-icenowy-h8G6r0blFSE@public.gmane.org> 2018-07-26 1:14 ` Icenowy Zheng 2018-07-19 4:28 ` [PATCH v2 2/3] arm64: allwinner: h6: add device tree nodes for MMC controllers Icenowy Zheng 2018-07-19 14:51 ` [PATCH v2 0/3] Allwinner H6 MMC support Maxime Ripard 2018-07-19 4:28 ` [PATCH v2 3/3] arm64: allwinner: h6: enable MMC0/2 on Pine H64 Icenowy Zheng
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).