Message ID | 20230412112739.160376-26-angelogioacchino.delregno@collabora.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | MediaTek Helio X10 - Mailbox, Display, MMC/SD/SDIO | expand |
On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote: > Configure and enable the MMC0/1/2 controllers, used for the eMMC chip, > MicroSD card slot and SDIO (WiFi) respectively. > > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Applied, thanks > --- > .../dts/mediatek/mt6795-sony-xperia-m5.dts | 91 +++++++++++++++++++ > 1 file changed, 91 insertions(+) > > diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts > index debe0f2553d9..155a573eac4c 100644 > --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts > +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts > @@ -17,6 +17,7 @@ / { > aliases { > mmc0 = &mmc0; > mmc1 = &mmc1; > + mmc2 = &mmc2; > serial0 = &uart0; > serial1 = &uart1; > }; > @@ -121,7 +122,97 @@ proximity@48 { > }; > }; > > +&mmc0 { > + /* eMMC controller */ > + mediatek,latch-ck = <0x14>; /* hs400 */ > + mediatek,hs200-cmd-int-delay = <1>; > + mediatek,hs400-cmd-int-delay = <1>; > + mediatek,hs400-ds-dly3 = <0x1a>; > + non-removable; > + pinctrl-names = "default", "state_uhs"; > + pinctrl-0 = <&mmc0_pins_default>; > + pinctrl-1 = <&mmc0_pins_uhs>; > + vmmc-supply = <&mt6331_vemc33_reg>; > + vqmmc-supply = <&mt6331_vio18_reg>; > + status = "okay"; > +}; > + > +&mmc1 { > + /* MicroSD card slot */ > + vmmc-supply = <&mt6331_vmc_reg>; > + vqmmc-supply = <&mt6331_vmch_reg>; > + status = "okay"; > +}; > + > +&mmc2 { > + /* SDIO WiFi on MMC2 */ > + vmmc-supply = <&mt6331_vmc_reg>; > + vqmmc-supply = <&mt6331_vmch_reg>; > + status = "okay"; > +}; > + > &pio { > + mmc0_pins_default: emmc-sdr-pins { > + pins-cmd-dat { > + pinmux = <PINMUX_GPIO154__FUNC_MSDC0_DAT0>, > + <PINMUX_GPIO155__FUNC_MSDC0_DAT1>, > + <PINMUX_GPIO156__FUNC_MSDC0_DAT2>, > + <PINMUX_GPIO157__FUNC_MSDC0_DAT3>, > + <PINMUX_GPIO158__FUNC_MSDC0_DAT4>, > + <PINMUX_GPIO159__FUNC_MSDC0_DAT5>, > + <PINMUX_GPIO160__FUNC_MSDC0_DAT6>, > + <PINMUX_GPIO161__FUNC_MSDC0_DAT7>, > + <PINMUX_GPIO162__FUNC_MSDC0_CMD>; > + input-enable; > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>; > + }; > + > + pins-clk { > + pinmux = <PINMUX_GPIO163__FUNC_MSDC0_CLK>; > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>; > + }; > + > + pins-rst { > + pinmux = <PINMUX_GPIO165__FUNC_MSDC0_RSTB>; > + bias-pull-up = <MTK_PUPD_SET_R1R0_10>; > + }; > + }; > + > + mmc0_pins_uhs: emmc-uhs-pins { > + pins-cmd-dat { > + pinmux = <PINMUX_GPIO154__FUNC_MSDC0_DAT0>, > + <PINMUX_GPIO155__FUNC_MSDC0_DAT1>, > + <PINMUX_GPIO156__FUNC_MSDC0_DAT2>, > + <PINMUX_GPIO157__FUNC_MSDC0_DAT3>, > + <PINMUX_GPIO158__FUNC_MSDC0_DAT4>, > + <PINMUX_GPIO159__FUNC_MSDC0_DAT5>, > + <PINMUX_GPIO160__FUNC_MSDC0_DAT6>, > + <PINMUX_GPIO161__FUNC_MSDC0_DAT7>, > + <PINMUX_GPIO162__FUNC_MSDC0_CMD>; > + input-enable; > + drive-strength = <MTK_DRIVE_6mA>; > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>; > + }; > + > + pins-clk { > + pinmux = <PINMUX_GPIO163__FUNC_MSDC0_CLK>; > + drive-strength = <MTK_DRIVE_6mA>; > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>; > + }; > + > + pins-rst { > + pinmux = <PINMUX_GPIO165__FUNC_MSDC0_RSTB>; > + drive-strength = <MTK_DRIVE_6mA>; > + bias-pull-up = <MTK_PUPD_SET_R1R0_10>; > + }; > + > + pins-ds { > + pinmux = <PINMUX_GPIO164__FUNC_MSDC0_DSL>; > + drive-strength = <MTK_DRIVE_6mA>; > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>; > + }; > + }; > + > nfc_pins: nfc-pins { > pins-irq { > pinmux = <PINMUX_GPIO3__FUNC_GPIO3>;
diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts index debe0f2553d9..155a573eac4c 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts @@ -17,6 +17,7 @@ / { aliases { mmc0 = &mmc0; mmc1 = &mmc1; + mmc2 = &mmc2; serial0 = &uart0; serial1 = &uart1; }; @@ -121,7 +122,97 @@ proximity@48 { }; }; +&mmc0 { + /* eMMC controller */ + mediatek,latch-ck = <0x14>; /* hs400 */ + mediatek,hs200-cmd-int-delay = <1>; + mediatek,hs400-cmd-int-delay = <1>; + mediatek,hs400-ds-dly3 = <0x1a>; + non-removable; + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_pins_default>; + pinctrl-1 = <&mmc0_pins_uhs>; + vmmc-supply = <&mt6331_vemc33_reg>; + vqmmc-supply = <&mt6331_vio18_reg>; + status = "okay"; +}; + +&mmc1 { + /* MicroSD card slot */ + vmmc-supply = <&mt6331_vmc_reg>; + vqmmc-supply = <&mt6331_vmch_reg>; + status = "okay"; +}; + +&mmc2 { + /* SDIO WiFi on MMC2 */ + vmmc-supply = <&mt6331_vmc_reg>; + vqmmc-supply = <&mt6331_vmch_reg>; + status = "okay"; +}; + &pio { + mmc0_pins_default: emmc-sdr-pins { + pins-cmd-dat { + pinmux = <PINMUX_GPIO154__FUNC_MSDC0_DAT0>, + <PINMUX_GPIO155__FUNC_MSDC0_DAT1>, + <PINMUX_GPIO156__FUNC_MSDC0_DAT2>, + <PINMUX_GPIO157__FUNC_MSDC0_DAT3>, + <PINMUX_GPIO158__FUNC_MSDC0_DAT4>, + <PINMUX_GPIO159__FUNC_MSDC0_DAT5>, + <PINMUX_GPIO160__FUNC_MSDC0_DAT6>, + <PINMUX_GPIO161__FUNC_MSDC0_DAT7>, + <PINMUX_GPIO162__FUNC_MSDC0_CMD>; + input-enable; + bias-pull-up = <MTK_PUPD_SET_R1R0_01>; + }; + + pins-clk { + pinmux = <PINMUX_GPIO163__FUNC_MSDC0_CLK>; + bias-pull-down = <MTK_PUPD_SET_R1R0_10>; + }; + + pins-rst { + pinmux = <PINMUX_GPIO165__FUNC_MSDC0_RSTB>; + bias-pull-up = <MTK_PUPD_SET_R1R0_10>; + }; + }; + + mmc0_pins_uhs: emmc-uhs-pins { + pins-cmd-dat { + pinmux = <PINMUX_GPIO154__FUNC_MSDC0_DAT0>, + <PINMUX_GPIO155__FUNC_MSDC0_DAT1>, + <PINMUX_GPIO156__FUNC_MSDC0_DAT2>, + <PINMUX_GPIO157__FUNC_MSDC0_DAT3>, + <PINMUX_GPIO158__FUNC_MSDC0_DAT4>, + <PINMUX_GPIO159__FUNC_MSDC0_DAT5>, + <PINMUX_GPIO160__FUNC_MSDC0_DAT6>, + <PINMUX_GPIO161__FUNC_MSDC0_DAT7>, + <PINMUX_GPIO162__FUNC_MSDC0_CMD>; + input-enable; + drive-strength = <MTK_DRIVE_6mA>; + bias-pull-up = <MTK_PUPD_SET_R1R0_01>; + }; + + pins-clk { + pinmux = <PINMUX_GPIO163__FUNC_MSDC0_CLK>; + drive-strength = <MTK_DRIVE_6mA>; + bias-pull-down = <MTK_PUPD_SET_R1R0_10>; + }; + + pins-rst { + pinmux = <PINMUX_GPIO165__FUNC_MSDC0_RSTB>; + drive-strength = <MTK_DRIVE_6mA>; + bias-pull-up = <MTK_PUPD_SET_R1R0_10>; + }; + + pins-ds { + pinmux = <PINMUX_GPIO164__FUNC_MSDC0_DSL>; + drive-strength = <MTK_DRIVE_6mA>; + bias-pull-down = <MTK_PUPD_SET_R1R0_10>; + }; + }; + nfc_pins: nfc-pins { pins-irq { pinmux = <PINMUX_GPIO3__FUNC_GPIO3>;
Configure and enable the MMC0/1/2 controllers, used for the eMMC chip, MicroSD card slot and SDIO (WiFi) respectively. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> --- .../dts/mediatek/mt6795-sony-xperia-m5.dts | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+)