Skip to contentSkip to conversation

Misc fixes up for MT7623 mmc

PATCH Superseded [email protected] 3 participants 7 messages Nov 29, 2017 – Dec 1, 2017

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Misc fixes up for MT7623 mmc

From: Sean Wang <[email protected]>

Just add some fixes up for the current MT7623 support

Patch 1) complement the missing dt-bindings definitions
Patch 2) pick up the proper falling back as patch 1 defines.
Patch 3) SD-card detection issue caused by the wrong polarity is being fixed up

Sean Wang (3):
mmc: dt-bindings: add mmc support to MT7623 SoC
arm: dts: mt7623: update mmc related nodes with the appropriate
fallback
arm: dts: mt7623: fix card detection issue on bananapi-r2

 Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
 arch/arm/boot/dts/mt7623.dtsi                    | 4 ++--
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts    | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/3 mmc: dt-bindings: add mmc support to MT7623 SoC

From: Sean Wang <[email protected]>

Add the devicetree binding for MT7623 SoC using MT2701 as the fallback.

Cc devicetree at vger.kernel.org
---
 Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/mmc/mtk-sd.txt +2 -0
index 72d2a73..1732588 100644
@@ -12,6 +12,8 @@ Required properties:
 	"mediatek,mt8173-mmc": for mmc host ip compatible with mt8173
 	"mediatek,mt2701-mmc": for mmc host ip compatible with mt2701
 	"mediatek,mt2712-mmc": for mmc host ip compatible with mt2712
+	"mediatek,mt7623-mmc",
+	"mediatek,mt2701-mmc": for mmc host ip compatible with mt7623
 - reg: physical base address of the controller and length
 - interrupts: Should contain MSDC interrupt number
 - clocks: Should contain phandle for the clock feeding the MMC controller
Signature · 1 line
2.7.4
#4 lore raw

PATCH 2/3 arm: dts: mt7623: update mmc related nodes with the appropriate fallback

In reply to [email protected]

From: Sean Wang <[email protected]>

The current mmc related nodes should be falling back to MT2701 as the dt-binding defines and which has more appropriate setup for MT7623.

---
 arch/arm/boot/dts/mt7623.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/mt7623.dtsi +2 -2
index 0640fb7..343d3b1 100644
@@ -641,7 +641,7 @@
 
 	mmc0: mmc at 11230000 {
 		compatible = "mediatek,mt7623-mmc",
-			     "mediatek,mt8135-mmc";
+			     "mediatek,mt2701-mmc";
 		reg = <0 0x11230000 0 0x1000>;
 		interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>;
 		clocks = <&pericfg CLK_PERI_MSDC30_0>,
@@ -652,7 +652,7 @@
 
 	mmc1: mmc at 11240000 {
 		compatible = "mediatek,mt7623-mmc",
-			     "mediatek,mt8135-mmc";
+			     "mediatek,mt2701-mmc";
 		reg = <0 0x11240000 0 0x1000>;
 		interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_LOW>;
 		clocks = <&pericfg CLK_PERI_MSDC30_1>,
Signature · 1 line
2.7.4
#5 lore raw

PATCH 3/3 arm: dts: mt7623: fix card detection issue on bananapi-r2

In reply to [email protected]

From: Sean Wang <[email protected]>

Fix that bananapi-r2 booting from SD-card would fail since incorrect polarity is applied to the previous setup with GPIO_ACTIVE_HIGH.

Cc stable at vger.kernel.org # v4.14+
Fixes 0eed8d097612 ("arm: dts: mt7623: Add SD-card and EMMC to bananapi-r2")
---
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +1 -1
index 688a863..7bf5aa2 100644
@@ -204,7 +204,7 @@
 	bus-width = <4>;
 	max-frequency = <50000000>;
 	cap-sd-highspeed;
-	cd-gpios = <&pio 261 0>;
+	cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>;
 	vmmc-supply = <&mt6323_vmch_reg>;
 	vqmmc-supply = <&mt6323_vio18_reg>;
 };
Signature · 1 line
2.7.4
maintainer Acked-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] mmc: dt-bindings: add mmc support to MT7623 SoC

In reply to [email protected]
Quoted 15 lines · sean.wang at mediatek.com

From: Sean Wang <[email protected]>

Add the devicetree binding for MT7623 SoC using MT2701 as the fallback.

Cc devicetree at vger.kernel.org
---
 Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/mmc/mtk-sd.txt +0 -0
index 72d2a73..1732588 100644

Documentation/devicetree/bindings/mmc/mtk-sd.txt Required properties: · line 16

Quoted 5 lines
Documentation/devicetree/bindings/mmc/mtk-sd.txt +2 -0
@@ -12,6 +12,8 @@ Required properties:
 	"mediatek,mt8173-mmc": for mmc host ip compatible with mt8173
 	"mediatek,mt2701-mmc": for mmc host ip compatible with mt2701
 	"mediatek,mt2712-mmc": for mmc host ip compatible with mt2712
+	"mediatek,mt7623-mmc",
+	"mediatek,mt2701-mmc": for mmc host ip compatible with mt7623

Those should be on 1 line ideally.

BTW, I find "for mmc host ip compatible with mt7623" to be mostly redundant.

Either way,

Quoted 6 lines
Documentation/devicetree/bindings/mmc/mtk-sd.txt +0 -0
 - reg: physical base address of the controller and length
 - interrupts: Should contain MSDC interrupt number
 - clocks: Should contain phandle for the clock feeding the MMC controller
Signature · 1 line
2.7.4
author
#3 lore raw

Re: [PATCH 1/3] mmc: dt-bindings: add mmc support to MT7623 SoC

Quoted 24 lines · Rob Herring
Quoted 15 lines · sean.wang at mediatek.com

From: Sean Wang <[email protected]>

Add the devicetree binding for MT7623 SoC using MT2701 as the fallback.

Cc devicetree at vger.kernel.org
---
 Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/mmc/mtk-sd.txt +0 -0
index 72d2a73..1732588 100644

Documentation/devicetree/bindings/mmc/mtk-sd.txt Required properties: · line 16

Quoted 5 lines
Documentation/devicetree/bindings/mmc/mtk-sd.txt +2 -0
@@ -12,6 +12,8 @@ Required properties:
 	"mediatek,mt8173-mmc": for mmc host ip compatible with mt8173
 	"mediatek,mt2701-mmc": for mmc host ip compatible with mt2701
 	"mediatek,mt2712-mmc": for mmc host ip compatible with mt2712
+	"mediatek,mt7623-mmc",
+	"mediatek,mt2701-mmc": for mmc host ip compatible with mt7623

Those should be on 1 line ideally.

Quoted 7 lines

BTW, I find "for mmc host ip compatible with mt7623" to be mostly redundant.
Either way,

okay, thanks for your careful guide

These will be fixed with
"mediatek,mt7623-mmc", "mediatek,mt2701-mmc": for MT7623 SoC in the next version

Sean

Quoted 7 lines
Quoted 6 lines
Documentation/devicetree/bindings/mmc/mtk-sd.txt +0 -0
 - reg: physical base address of the controller and length
 - interrupts: Should contain MSDC interrupt number
 - clocks: Should contain phandle for the clock feeding the MMC controller
Signature · 1 line
2.7.4
maintainer Tested-by on v1 3/3
#6 lore raw

Re: [PATCH 3/3] arm: dts: mt7623: fix card detection issue on bananapi-r2

In reply to [email protected]
Quoted 9 lines · sean.wang at mediatek.com

From: Sean Wang <[email protected]>

Fix that bananapi-r2 booting from SD-card would fail since incorrect polarity is applied to the previous setup with GPIO_ACTIVE_HIGH.

Cc stable at vger.kernel.org # v4.14+
Fixes 0eed8d097612 ("arm: dts: mt7623: Add SD-card and EMMC to bananapi-r2")

---

Quoted 17 lines
  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +1 -1
index 688a863..7bf5aa2 100644
@@ -204,7 +204,7 @@
  	bus-width = <4>;
  	max-frequency = <50000000>;
  	cap-sd-highspeed;
-	cd-gpios = <&pio 261 0>;
+	cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>;
  	vmmc-supply = <&mt6323_vmch_reg>;
  	vqmmc-supply = <&mt6323_vio18_reg>;
  };