Enable the Amlogic Meson SDIO MMC controller
Subsystems (3)
Martin Blumenstingl
reviewercover Enable the Amlogic Meson SDIO MMC controller
Now that the SDIO MMC driver is queued for v4.15 we need to prepare our platform so boards can actually use this driver. This adds the Meson SDIO MMC controller to the .dts files and enables the corresponding driver in the multi_v7_defconfig.
Below is an example to enable the SD card using "port 1" of the SDIO MMC controller.
cd-gpios, cd-inverted and vmmc-supply need to be configured based on the board design (as well as the "reg" property if the SD card is not connected to the MMC controller's slot called "port 0").
&sdio {
status = "okay";
pinctrl-0 = <&sd_b_pins>;
pinctrl-names = "default";
/* SD card */
sd_card_slot: slot at 1 {
compatible = "mmc-slot";
reg = <1>;
status = "okay";
bus-width = <4>;
no-sdio;
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
cd-inverted;
vmmc-supply = <&vcc_3v3>;
};
};Martin Blumenstingl (2):
ARM: dts: meson: add the SDIO MMC controller
ARM: multi_v7_defconfig: enable the Meson MX SDIO/MMC controller
arch/arm/boot/dts/meson.dtsi | 9 +++++++++ arch/arm/boot/dts/meson8.dtsi | 6 ++++++ arch/arm/boot/dts/meson8b.dtsi | 6 ++++++ arch/arm/configs/multi_v7_defconfig | 1 + 4 files changed, 22 insertions(+)
Signature · 1 line
2.14.2
Martin Blumenstingl
reviewerPATCH 1/2 ARM: dts: meson: add the SDIO MMC controller
Meson6, Meson8 and Meson8b are using the same MMC controller IP. This adds the MMC controller node to meson.dtsi so it can be used by all SoCs.
The controller itself is a bit special, because it has multiple slots. Each slot is accessed through a sub-node of the controller. However, currently the driver for this hardware only supports one slot.
--- arch/arm/boot/dts/meson.dtsi | 9 +++++++++ arch/arm/boot/dts/meson8.dtsi | 6 ++++++ arch/arm/boot/dts/meson8b.dtsi | 6 ++++++ 3 files changed, 21 insertions(+)
arch/arm/boot/dts/meson.dtsi +9 -0
@@ -165,6 +165,15 @@ status = "disabled"; }; + sdio: mmc at 8c20 { + compatible = "amlogic,meson-mx-sdio"; + reg = <0x8c20 0x20>; + interrupts = <GIC_SPI 28 IRQ_TYPE_EDGE_RISING>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + spifc: spi at 8c80 { compatible = "amlogic,meson6-spifc"; reg = <0x8c80 0x80>;
arch/arm/boot/dts/meson8.dtsi +6 -0
@@ -299,6 +299,12 @@ clock-names = "clkin", "core", "sana"; }; +&sdio { + compatible = "amlogic,meson8-sdio", "amlogic,meson-mx-sdio"; + clocks = <&clkc CLKID_SDIO>, <&clkc CLKID_CLK81>; + clock-names = "core", "clkin"; +}; + &spifc { clocks = <&clkc CLKID_CLK81>; };
arch/arm/boot/dts/meson8b.dtsi +6 -0
@@ -207,6 +207,12 @@ clock-names = "clkin", "core", "sana"; }; +&sdio { + compatible = "amlogic,meson8b-sdio", "amlogic,meson-mx-sdio"; + clocks = <&clkc CLKID_SDIO>, <&clkc CLKID_CLK81>; + clock-names = "core", "clkin"; +}; + &uart_AO { clocks = <&clkc CLKID_CLK81>; };
Signature · 1 line
2.14.2
Martin Blumenstingl
reviewerPATCH 2/2 ARM: multi_v7_defconfig: enable the Meson MX SDIO/MMC controller
In reply to Martin BlumenstinglThis enables the new Amlogic Meson MX SDIO/MMC controller driver, which typically connects to the SD card and SDIO wifi module.
The driver is enabled as built-in to allow booting from the SD card.
--- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v7_defconfig +1 -0
@@ -727,6 +727,7 @@ CONFIG_MMC_OMAP=y CONFIG_MMC_OMAP_HS=y CONFIG_MMC_ATMELMCI=y CONFIG_MMC_SDHCI_MSM=y +CONFIG_MMC_MESON_MX_SDIO=y CONFIG_MMC_MVSDIO=y CONFIG_MMC_SDHI=y CONFIG_MMC_DW=y
Signature · 1 line
2.14.2
cover Enable the Amlogic Meson SDIO MMC controller
In reply to Martin BlumenstinglQuoted 4 lines · Martin Blumenstingl
Now that the SDIO MMC driver is queued for v4.15 we need to prepare our platform so boards can actually use this driver. This adds the Meson SDIO MMC controller to the .dts files and enables the corresponding driver in the
multi_v7_defconfig.
Just curious... were you able to test this on any meson8 platform?
[...]
Quoted 2 lines
Martin Blumenstingl (2):
ARM: dts: meson: add the SDIO MMC controller
Applied to v4.15/dt
Quoted 1 line
ARM:
multi_v7_defconfig: enable the Meson MX SDIO/MMC controller
Applied to v4.15/defconfig
Thanks!
Kevin
Martin Blumenstingl
reviewercover Enable the Amlogic Meson SDIO MMC controller
Hi Kevin,
Quoted 8 lines · Kevin Hilman
Quoted 4 lines · Martin Blumenstingl
Now that the SDIO MMC driver is queued for v4.15 we need to prepare our platform so boards can actually use this driver. This adds the Meson SDIO MMC controller to the .dts files and enables the corresponding driver in the
multi_v7_defconfig.Just curious... were you able to test this on any meson8 platform?
I have two 32-bit Meson boards:
- Meson8m2 (S812) based Akaso M8S
- Meson8b based Endless Mini EC-100
I do not have any Meson8 (S805) based board, however I believe that there aren't many differences between Meson8 and Meson8m2 in terms of "peripherals" (they share the same mach-meson8 directory in Amlogic's kernel sources).
most of my tests were done my Meson8m2 board, however I also did a quick test on the EC-100 some time ago.
Quoted 10 lines
[...]
Quoted 2 lines
Martin Blumenstingl (2):
ARM: dts: meson: add the SDIO MMC controllerApplied to v4.15/dt
Quoted 1 line
ARM:
multi_v7_defconfig: enable the Meson MX SDIO/MMC controllerApplied to v4.15/defconfig
Thank you!
Quoted 3 lines
Thanks!
Kevin
Martin