Skip to contentSkip to conversation

Add MMCIF0 support for r8a7743/iwg20m

PATCH New Chris Paterson 6 participants 21 messages Jul 12, 2017 – Jul 14, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Add MMCIF0 support for r8a7743/iwg20m

This series adds MMCIF0 support for the r8a7743 SoC and the iWave-RZG1M-20M Qseven SOM.

This series is based on renesas-devel-20170711-v4.12.

Chris Paterson (3):
dt-bindings: mmc: sh_mmcif: Document r8a7743 DT bindings
ARM: dts: r8a7743: Add MMCIF0 support
ARM: dts: iwg20m: Add MMCIF0 support

 .../devicetree/bindings/mmc/renesas,mmcif.txt      |  3 ++-
 arch/arm/boot/dts/r8a7743-iwg20m.dtsi              | 26 ++++++++++++++++++++++
 arch/arm/boot/dts/r8a7743.dtsi                     | 16 +++++++++++++
 3 files changed, 44 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/3 dt-bindings: mmc: sh_mmcif: Document r8a7743 DT bindings

Documentation/devicetree/bindings/mmc/renesas,mmcif.txt +2 -1
index c32dc5a..703e18c 100644
@@ -11,6 +11,7 @@ Required properties:
 	- "renesas,mmcif-r7s72100" for the MMCIF found in r7s72100 SoCs
 	- "renesas,mmcif-r8a73a4" for the MMCIF found in r8a73a4 SoCs
 	- "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs
+	- "renesas,mmcif-r8a7743" for the MMCIF found in r8a7743 SoCs
 	- "renesas,mmcif-r8a7778" for the MMCIF found in r8a7778 SoCs
 	- "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs
 	- "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs
@@ -21,7 +22,7 @@ Required properties:
 - interrupts: Some SoCs have only 1 shared interrupt, while others have either
   2 or 3 individual interrupts (error, int, card detect). Below is the number
   of interrupts for each SoC:
-    1: r8a73a4, r8a7778, r8a7790, r8a7791, r8a7793, r8a7794
+    1: r8a73a4, r8a7743, r8a7778, r8a7790, r8a7791, r8a7793, r8a7794
     2: r8a7740, sh73a0
     3: r7s72100
 
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/3 dt-bindings: mmc: sh_mmcif: Document r8a7743 DT bindings

Quoted 1 line · Chris Paterson

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#4 lore raw

PATCH 1/3 dt-bindings: mmc: sh_mmcif: Document r8a7743 DT bindings

Hi Simon,

Quoted 8 lines · Simon Horman
Quoted 5 lines · Geert Uytterhoeven
Quoted 1 line · Chris Paterson

Thanks, applied for v4.14.

Shouldn't this be applied by Ulf to the MMC tree?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#5 lore raw

PATCH 1/3 dt-bindings: mmc: sh_mmcif: Document r8a7743 DT bindings

Quoted 6 lines · Geert Uytterhoeven

Hi Simon,

Quoted 3 lines · Simon Horman
Quoted 2 lines · Geert Uytterhoeven

On Wed, Jul 12, 2017 at 12:03 PM, Chris Paterson
<[email protected]> wrote:

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Thanks, applied for v4.14.

Shouldn't this be applied by Ulf to the MMC tree?

Sorry, my bad. I have dropped this from the renesas tree.

Ulf, please consider this patch for the mmc tree.

Applied
#6 lore raw

PATCH 1/3 dt-bindings: mmc: sh_mmcif: Document r8a7743 DT bindings

In reply to Chris Paterson
Quoted 24 lines · Chris Paterson
Documentation/devicetree/bindings/mmc/renesas,mmcif.txt +2 -2
index c32dc5a..703e18c 100644
@@ -11,6 +11,7 @@ Required properties:
        - "renesas,mmcif-r7s72100" for the MMCIF found in r7s72100 SoCs
        - "renesas,mmcif-r8a73a4" for the MMCIF found in r8a73a4 SoCs
        - "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs
+       - "renesas,mmcif-r8a7743" for the MMCIF found in r8a7743 SoCs
        - "renesas,mmcif-r8a7778" for the MMCIF found in r8a7778 SoCs
        - "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs
        - "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs
@@ -21,7 +22,7 @@ Required properties:
 - interrupts: Some SoCs have only 1 shared interrupt, while others have either
   2 or 3 individual interrupts (error, int, card detect). Below is the number
   of interrupts for each SoC:
-    1: r8a73a4, r8a7778, r8a7790, r8a7791, r8a7793, r8a7794
+    1: r8a73a4, r8a7743, r8a7778, r8a7790, r8a7791, r8a7793, r8a7794
     2: r8a7740, sh73a0
     3: r7s72100
 
--
Quoted 2 lines

1.9.1

Thanks, applied for next!

Kind regards
Uffe

#7 lore raw

PATCH 2/3 ARM: dts: r8a7743: Add MMCIF0 support

In reply to Chris Paterson

Add the MMCIF0 device to the r8a7743 device tree.

arch/arm/boot/dts/r8a7743.dtsi +16 -0
index 0d02191..f62e858 100644
@@ -641,6 +641,22 @@
 			#size-cells = <0>;
 			status = "disabled";
 		};
+
+		mmcif0: mmc at ee200000 {
+			compatible = "renesas,mmcif-r8a7743",
+				     "renesas,sh-mmcif";
+			reg = <0 0xee200000 0 0x80>;
+			interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 315>;
+			dmas = <&dmac0 0xd1>, <&dmac0 0xd2>,
+			       <&dmac1 0xd1>, <&dmac1 0xd2>;
+			dma-names = "tx", "rx", "tx", "rx";
+			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+			resets = <&cpg 315>;
+			reg-io-width = <4>;
+			max-frequency = <97500000>;
+			status = "disabled";
+		};
 	};
 
 	/* External root clock */
Signature · 1 line
1.9.1
#8 lore raw

PATCH 2/3 ARM: dts: r8a7743: Add MMCIF0 support

Quoted 3 lines · Chris Paterson

Add the MMCIF0 device to the r8a7743 device tree.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#10 lore raw

PATCH 3/3 ARM: dts: iwg20m: Add MMCIF0 support

In reply to Chris Paterson

Define the iwg20m board dependent part of the MMCIF0 device node.

arch/arm/boot/dts/r8a7743-iwg20m.dtsi +26 -0
index 001ca91..ffce1b6 100644
@@ -22,8 +22,34 @@
 		device_type = "memory";
 		reg = <2 0x00000000 0 0x20000000>;
 	};
+
+	reg_3p3v: 3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "3P3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &extal_clk {
 	clock-frequency = <20000000>;
 };
+
+&pfc {
+	mmcif0_pins: mmc {
+		groups = "mmc_data8", "mmc_ctrl";
+		function = "mmc";
+	};
+};
+
+&mmcif0 {
+		pinctrl-0 = <&mmcif0_pins>;
+		pinctrl-names = "default";
+
+		vmmc-supply = <&reg_3p3v>;
+		bus-width = <8>;
+		non-removable;
+		status = "okay";
+};
Signature · 1 line
1.9.1
#11 lore raw

PATCH 3/3 ARM: dts: iwg20m: Add MMCIF0 support

Hi Chris,

arch/arm/boot/dts/r8a7743-iwg20m.dtsi line 42

Quoted 12 lines · Chris Paterson

Define the iwg20m board dependent part of the MMCIF0 device node.

arch/arm/boot/dts/r8a7743-iwg20m.dtsi +3 -0
index 001ca91..ffce1b6 100644
 
+&pfc {
+       mmcif0_pins: mmc {
+               groups = "mmc_data8", "mmc_ctrl";

"mmc_data8" is not correct, as D6/D7 of the eMMC are not connected to GP6_28 resp. GP6_29, but to GP6_6 resp. GP6_7.
So it should be "mmc_data8_b".

Unfortunately the latter pin group isn't supported by the PFC driver yet. Cooking a patch...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#12 lore raw

PATCH 3/3 ARM: dts: iwg20m: Add MMCIF0 support

Quoted 17 lines · Geert Uytterhoeven

Hi Chris,

arch/arm/boot/dts/r8a7743-iwg20m.dtsi line 42

Quoted 12 lines · Chris Paterson

Define the iwg20m board dependent part of the MMCIF0 device node.

arch/arm/boot/dts/r8a7743-iwg20m.dtsi +3 -0
index 001ca91..ffce1b6 100644
 
+&pfc {
+       mmcif0_pins: mmc {
+               groups = "mmc_data8", "mmc_ctrl";
Quoted 6 lines

"mmc_data8" is not correct, as D6/D7 of the eMMC are not connected to GP6_28 resp. GP6_29, but to GP6_6 resp. GP6_7.
So it should be "mmc_data8_b".

Unfortunately the latter pin group isn't supported by the PFC driver yet. Cooking a patch...

The above notwithstanding I have applied this patch for v4.14.

This is under the assumption that:
a) the relevant (pfc) driver changes will appear in v4.14 and;
b) there is no regression introduced in having this change present without the driver changes

An implication of the above is that the new feature will not work until both the driver and DTS changes are in the same tree. But that the trees with each of those changes continue to work at least as well as they did before.

Please test the devel branch that I push later today to make sure there are no regressions.

#13 lore raw

PATCH 3/3 ARM: dts: iwg20m: Add MMCIF0 support

Quoted 18 lines · Simon Horman
Quoted 17 lines · Geert Uytterhoeven

Hi Chris,

Quoted 12 lines · Chris Paterson

Define the iwg20m board dependent part of the MMCIF0 device node.

arch/arm/boot/dts/r8a7743-iwg20m.dtsi +3 -0
index 001ca91..ffce1b6 100644
 
+&pfc {
+       mmcif0_pins: mmc {
+               groups = "mmc_data8", "mmc_ctrl";
Quoted 8 lines
Quoted 6 lines

"mmc_data8" is not correct, as D6/D7 of the eMMC are not connected to GP6_28 resp. GP6_29, but to GP6_6 resp. GP6_7.
So it should be "mmc_data8_b".

Unfortunately the latter pin group isn't supported by the PFC driver yet. Cooking a patch...

The above notwithstanding I have applied this patch for v4.14.

...

Sorry, I think I need more coffee.

I misread Geert's comment above. I have dropped this patch. Please post a corrected v2 of this patch.

#14 lore raw

PATCH 3/3 ARM: dts: iwg20m: Add MMCIF0 support

Quoted 31 lines

From: Simon Horman [mailto:horms at verge.net.au]
Sent: 13 July 2017 09:12

Quoted 25 lines · Simon Horman
Quoted 24 lines · Geert Uytterhoeven

Hi Chris,

arch/arm/boot/dts/r8a7743-iwg20m.dtsi line 42

Quoted 13 lines · Chris Paterson

Define the iwg20m board dependent part of the MMCIF0 device node.

arch/arm/boot/dts/r8a7743-iwg20m.dtsi +3 -0
index 001ca91..ffce1b6 100644
 
+&pfc {
+       mmcif0_pins: mmc {
+               groups = "mmc_data8", "mmc_ctrl";

"mmc_data8" is not correct, as D6/D7 of the eMMC are not connected to GP6_28 resp. GP6_29, but to GP6_6 resp. GP6_7.
So it should be "mmc_data8_b".

Unfortunately the latter pin group isn't supported by the PFC driver yet. Cooking a patch...

Thanks for your review Geert. Sorry I missed this.

Quoted 6 lines
Quoted 2 lines

The above notwithstanding I have applied this patch for v4.14.

...

Sorry, I think I need more coffee.

No worries!

Quoted 3 lines

I misread Geert's comment above. I have dropped this patch. Please post a corrected v2 of this patch.

Will do.

#15 lore raw

[PATCH 3/3] ARM: dts: iwg20m: Add MMCIF0 support

In reply to Chris Paterson
reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross…

Hi Chris,

[auto build test ERROR on renesas/next]
[also build test ERROR on next-20170712]
[cannot apply to v4.12]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chris-Paterson/Add-MMCIF0-support-for-r8a7743-iwg20m/20170713-042814
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705

reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All errors (new ones prefixed by >>):

>> Error: arch/arm/boot/dts/r8a7743-iwg20m.dtsi:40.1-5 Label or path pfc not found

FATAL ERROR: Syntax error parsing input tree

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 22761 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170713/a6646c4c/attachment-0001.gz>

#16 lore raw

PATCH 3/3 ARM: dts: iwg20m: Add MMCIF0 support

Quoted 17 lines · kbuild test robot

Hi Chris,

[auto build test ERROR on renesas/next]
[also build test ERROR on next-20170712]
[cannot apply to v4.12]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chris-Paterson/Add-MMCIF0-support-for-r8a7743-iwg20m/20170713-042814
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705

reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

Quoted 4 lines

All errors (new ones prefixed by >>):

Quoted 1 line
Quoted 1 line

Error: arch/arm/boot/dts/r8a7743-iwg20m.dtsi:40.1-5 Label or path pfc not found

FATAL ERROR: Syntax error parsing input tree

This seems to be a false positive. The node in question is present in the devel branch which is the base of these changes.

#17 lore raw

PATCH 3/3 ARM: dts: iwg20m: Add MMCIF0 support

Quoted 18 lines · Simon Horman
Quoted 17 lines · kbuild test robot

Hi Chris,

[auto build test ERROR on renesas/next]
[also build test ERROR on next-20170712]
[cannot apply to v4.12]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chris-Paterson/Add-MMCIF0-support-for-r8a7743-iwg20m/20170713-042814
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705

reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

Quoted 7 lines
Quoted 4 lines

All errors (new ones prefixed by >>):

Quoted 1 line
Quoted 1 line

Error: arch/arm/boot/dts/r8a7743-iwg20m.dtsi:40.1-5 Label or path pfc not found

FATAL ERROR: Syntax error parsing input tree

This seems to be a false positive. The node in question is present in the devel branch which is the base of these changes.

Thanks for the feedback, we'll update 0day's configuration accordingly.

Thanks,
Xiaolong

Quoted 6 lines

_______________________________________________
kbuild-all mailing list
kbuild-all at lists.01.org
https://lists.01.org/mailman/listinfo/kbuild-all

#18 lore raw

PATCH v2 1/1 ARM: dts: iwg20m: Add MMCIF0 support

In reply to Chris Paterson

Define the iwg20m board dependent part of the MMCIF0 device node.

---
This patch is based on:
renesas-devel-20170713-v4.12
+ pinctrl: sh-pfc: r8a7791: Add R8A7743 support
+ pinctrl: sh-pfc: r8a7791: Add missing mmc_data8_b pin group

v1->v2:
- Corrected data pin group to mmc_data8_b - Thanks Geert.

 arch/arm/boot/dts/r8a7743-iwg20m.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/r8a7743-iwg20m.dtsi +26 -0
index 001ca91..f78dbc5 100644
@@ -22,8 +22,34 @@
 		device_type = "memory";
 		reg = <2 0x00000000 0 0x20000000>;
 	};
+
+	reg_3p3v: 3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "3P3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &extal_clk {
 	clock-frequency = <20000000>;
 };
+
+&pfc {
+	mmcif0_pins: mmc {
+		groups = "mmc_data8_b", "mmc_ctrl";
+		function = "mmc";
+	};
+};
+
+&mmcif0 {
+		pinctrl-0 = <&mmcif0_pins>;
+		pinctrl-names = "default";
+
+		vmmc-supply = <&reg_3p3v>;
+		bus-width = <8>;
+		non-removable;
+		status = "okay";
+};
Signature · 1 line
1.9.1
#19 lore raw

PATCH v2 1/1 ARM: dts: iwg20m: Add MMCIF0 support

Quoted 3 lines · Chris Paterson

Define the iwg20m board dependent part of the MMCIF0 device node.

Quoted 2 lines

v1->v2:
- Corrected data pin group to mmc_data8_b - Thanks Geert.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds