All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/8] ARM: shmobile: pinctrl and DT extensions
@ 2013-01-23 16:37 ` Guennadi Liakhovetski
  0 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

This is v3 of the patch series [1], addressing minor issues in 3 out of 8 
patches.

[1] http://thread.gmane.org/gmane.linux.ports.sh.devel/18729

Guennadi Liakhovetski (8):
  pinctrl: add SDHI and MMCIF pin groups to r8a7740
  pinctrl: add SDHI and MMCIF pin groups to sh7372
  ARM: shmobile: simplify armadillo800eva and kzm9g Kconfig
    dependencies
  ARM: shmobile: add MMCIF and SDHI DT clock aliases to sh73a0 and
    r8a7740
  ARM: shmobile: add a GPIO controller DT node for sh7372
  ARM: shmobile: use GPIO SD-card detection on armadillo800eva
  ARM: shmobile: completely switch MMC interfaces on mackerel-reference
    to DT
  ARM: shmobile: completely switch MMC interfaces on
    armadillo800eva-reference to DT

 .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 +++++++++
 arch/arm/boot/dts/sh7372-mackerel-reference.dts    |   42 +++-
 arch/arm/boot/dts/sh7372.dtsi                      |    8 +
 arch/arm/mach-shmobile/Kconfig                     |   12 +-
 .../board-armadillo800eva-reference.c              |    5 +-
 arch/arm/mach-shmobile/board-armadillo800eva.c     |   10 +-
 arch/arm/mach-shmobile/board-mackerel-reference.c  |   46 ----
 arch/arm/mach-shmobile/clock-r8a7740.c             |    4 +
 arch/arm/mach-shmobile/clock-sh73a0.c              |    3 +
 drivers/pinctrl/sh-pfc/pfc-r8a7740.c               |  248 ++++++++++++++++++++
 drivers/pinctrl/sh-pfc/pfc-sh7372.c                |  205 ++++++++++++++++
 11 files changed, 626 insertions(+), 64 deletions(-)

-- 
1.7.2.5

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v3 0/8] ARM: shmobile: pinctrl and DT extensions
@ 2013-01-23 16:37 ` Guennadi Liakhovetski
  0 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

This is v3 of the patch series [1], addressing minor issues in 3 out of 8 
patches.

[1] http://thread.gmane.org/gmane.linux.ports.sh.devel/18729

Guennadi Liakhovetski (8):
  pinctrl: add SDHI and MMCIF pin groups to r8a7740
  pinctrl: add SDHI and MMCIF pin groups to sh7372
  ARM: shmobile: simplify armadillo800eva and kzm9g Kconfig
    dependencies
  ARM: shmobile: add MMCIF and SDHI DT clock aliases to sh73a0 and
    r8a7740
  ARM: shmobile: add a GPIO controller DT node for sh7372
  ARM: shmobile: use GPIO SD-card detection on armadillo800eva
  ARM: shmobile: completely switch MMC interfaces on mackerel-reference
    to DT
  ARM: shmobile: completely switch MMC interfaces on
    armadillo800eva-reference to DT

 .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 +++++++++
 arch/arm/boot/dts/sh7372-mackerel-reference.dts    |   42 +++-
 arch/arm/boot/dts/sh7372.dtsi                      |    8 +
 arch/arm/mach-shmobile/Kconfig                     |   12 +-
 .../board-armadillo800eva-reference.c              |    5 +-
 arch/arm/mach-shmobile/board-armadillo800eva.c     |   10 +-
 arch/arm/mach-shmobile/board-mackerel-reference.c  |   46 ----
 arch/arm/mach-shmobile/clock-r8a7740.c             |    4 +
 arch/arm/mach-shmobile/clock-sh73a0.c              |    3 +
 drivers/pinctrl/sh-pfc/pfc-r8a7740.c               |  248 ++++++++++++++++++++
 drivers/pinctrl/sh-pfc/pfc-sh7372.c                |  205 ++++++++++++++++
 11 files changed, 626 insertions(+), 64 deletions(-)

-- 
1.7.2.5

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v3 1/8] pinctrl: add SDHI and MMCIF pin groups to r8a7740
  2013-01-23 16:37 ` Guennadi Liakhovetski
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Add pin groups for the first two SDHI interfaces and two alternative pin
groups for the MMCIF interface on the r8a7740 SoC.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

v3: swapped two pin numbers for MMCIF, as spotted by Laurent, thanks.

 drivers/pinctrl/sh-pfc/pfc-r8a7740.c |  248 ++++++++++++++++++++++++++++++++++
 1 files changed, 248 insertions(+), 0 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
index d0b7165..4c92af8 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
@@ -1870,6 +1870,188 @@ static const unsigned int lcd1_sys_mux[] = {
 	LCD1_CS_MARK, LCD1_WR_MARK, LCD1_RD_MARK, LCD1_RS_MARK,
 };
 
+static const unsigned int sdhi0_data1_pins[] = {
+	/* D0 */
+	77,
+};
+static const unsigned int sdhi0_data1_mux[] = {
+	SDHI0_D0_MARK,
+};
+static const unsigned int sdhi0_data4_pins[] = {
+	/* D[0:3] */
+	77, 78, 79, 80,
+};
+static const unsigned int sdhi0_data4_mux[] = {
+	SDHI0_D0_MARK, SDHI0_D1_MARK, SDHI0_D2_MARK, SDHI0_D3_MARK,
+};
+static const unsigned int sdhi0_ctrl_pins[] = {
+	/* CMD, CLK */
+	76, 82,
+};
+static const unsigned int sdhi0_ctrl_mux[] = {
+	SDHI0_CMD_MARK, SDHI0_CLK_MARK,
+};
+static const unsigned int sdhi0_cd_pins[] = {
+	/* CD */
+	81,
+};
+static const unsigned int sdhi0_cd_mux[] = {
+	SDHI0_CD_MARK,
+};
+static const unsigned int sdhi0_wp_pins[] = {
+	/* WP */
+	83,
+};
+static const unsigned int sdhi0_wp_mux[] = {
+	SDHI0_WP_MARK,
+};
+
+static const unsigned int sdhi1_data1_pins[] = {
+	/* D0 */
+	68,
+};
+static const unsigned int sdhi1_data1_mux[] = {
+	SDHI1_D0_MARK,
+};
+static const unsigned int sdhi1_data4_pins[] = {
+	/* D[0:3] */
+	68, 69, 70, 71,
+};
+static const unsigned int sdhi1_data4_mux[] = {
+	SDHI1_D0_MARK, SDHI1_D1_MARK, SDHI1_D2_MARK, SDHI1_D3_MARK,
+};
+static const unsigned int sdhi1_ctrl_pins[] = {
+	/* CMD, CLK */
+	67, 66,
+};
+static const unsigned int sdhi1_ctrl_mux[] = {
+	SDHI1_CMD_MARK, SDHI1_CLK_MARK,
+};
+static const unsigned int sdhi1_cd_pins[] = {
+	/* CD */
+	72,
+};
+static const unsigned int sdhi1_cd_mux[] = {
+	SDHI1_CD_MARK,
+};
+static const unsigned int sdhi1_wp_pins[] = {
+	/* WP */
+	73,
+};
+static const unsigned int sdhi1_wp_mux[] = {
+	SDHI1_WP_MARK,
+};
+
+static const unsigned int sdhi2_data1_pins[] = {
+	/* D0 */
+	205,
+};
+static const unsigned int sdhi2_data1_mux[] = {
+	SDHI2_D0_MARK,
+};
+static const unsigned int sdhi2_data4_pins[] = {
+	/* D[0:3] */
+	205, 206, 207, 208,
+};
+static const unsigned int sdhi2_data4_mux[] = {
+	SDHI2_D0_MARK, SDHI2_D1_MARK, SDHI2_D2_MARK, SDHI2_D3_MARK,
+};
+static const unsigned int sdhi2_ctrl_pins[] = {
+	/* CMD, CLK */
+	204, 203,
+};
+static const unsigned int sdhi2_ctrl_mux[] = {
+	SDHI2_CMD_MARK, SDHI2_CLK_MARK,
+};
+static const unsigned int sdhi2_cd_0_pins[] = {
+	/* CD */
+	202,
+};
+static const unsigned int sdhi2_cd_0_mux[] = {
+	SDHI2_CD_PORT202_MARK,
+};
+static const unsigned int sdhi2_wp_0_pins[] = {
+	/* WP */
+	177,
+};
+static const unsigned int sdhi2_wp_0_mux[] = {
+	SDHI2_WP_PORT177_MARK,
+};
+static const unsigned int sdhi2_cd_1_pins[] = {
+	/* CD */
+	24,
+};
+static const unsigned int sdhi2_cd_1_mux[] = {
+	SDHI2_CD_PORT24_MARK,
+};
+static const unsigned int sdhi2_wp_1_pins[] = {
+	/* WP */
+	25,
+};
+static const unsigned int sdhi2_wp_1_mux[] = {
+	SDHI2_WP_PORT25_MARK,
+};
+
+static const unsigned int mmc0_data1_0_pins[] = {
+	/* D[0] */
+	68,
+};
+static const unsigned int mmc0_data1_0_mux[] = {
+	MMC0_D0_PORT68_MARK,
+};
+static const unsigned int mmc0_data4_0_pins[] = {
+	/* D[0:3] */
+	68, 69, 70, 71,
+};
+static const unsigned int mmc0_data4_0_mux[] = {
+	MMC0_D0_PORT68_MARK, MMC0_D1_PORT69_MARK, MMC0_D2_PORT70_MARK, MMC0_D3_PORT71_MARK,
+};
+static const unsigned int mmc0_data8_0_pins[] = {
+	/* D[0:7] */
+	68, 69, 70, 71, 72, 73, 74, 75,
+};
+static const unsigned int mmc0_data8_0_mux[] = {
+	MMC0_D0_PORT68_MARK, MMC0_D1_PORT69_MARK, MMC0_D2_PORT70_MARK, MMC0_D3_PORT71_MARK,
+	MMC0_D4_PORT72_MARK, MMC0_D5_PORT73_MARK, MMC0_D6_PORT74_MARK, MMC0_D7_PORT75_MARK,
+};
+static const unsigned int mmc0_ctrl_0_pins[] = {
+	/* CMD, CLK */
+	67, 66,
+};
+static const unsigned int mmc0_ctrl_0_mux[] = {
+	MMC0_CMD_PORT67_MARK, MMC0_CLK_PORT66_MARK,
+};
+
+static const unsigned int mmc0_data1_1_pins[] = {
+	/* D[0] */
+	149,
+};
+static const unsigned int mmc0_data1_1_mux[] = {
+	MMC1_D0_PORT149_MARK,
+};
+static const unsigned int mmc0_data4_1_pins[] = {
+	/* D[0:3] */
+	149, 148, 147, 146,
+};
+static const unsigned int mmc0_data4_1_mux[] = {
+	MMC1_D0_PORT149_MARK, MMC1_D1_PORT148_MARK, MMC1_D2_PORT147_MARK, MMC1_D3_PORT146_MARK,
+};
+static const unsigned int mmc0_data8_1_pins[] = {
+	/* D[0:7] */
+	149, 148, 147, 146, 145, 144, 143, 142,
+};
+static const unsigned int mmc0_data8_1_mux[] = {
+	MMC1_D0_PORT149_MARK, MMC1_D1_PORT148_MARK, MMC1_D2_PORT147_MARK, MMC1_D3_PORT146_MARK,
+	MMC1_D4_PORT145_MARK, MMC1_D5_PORT144_MARK, MMC1_D6_PORT143_MARK, MMC1_D7_PORT142_MARK,
+};
+static const unsigned int mmc0_ctrl_1_pins[] = {
+	/* CMD, CLK */
+	104, 103,
+};
+static const unsigned int mmc0_ctrl_1_mux[] = {
+	MMC1_CMD_PORT104_MARK, MMC1_CLK_PORT103_MARK,
+};
+
 static const struct sh_pfc_pin_group pinmux_groups[] = {
 	SH_PFC_PIN_GROUP(lcd0_data8),
 	SH_PFC_PIN_GROUP(lcd0_data9),
@@ -1893,6 +2075,31 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
 	SH_PFC_PIN_GROUP(lcd1_lclk),
 	SH_PFC_PIN_GROUP(lcd1_sync),
 	SH_PFC_PIN_GROUP(lcd1_sys),
+	SH_PFC_PIN_GROUP(sdhi0_data1),
+	SH_PFC_PIN_GROUP(sdhi0_data4),
+	SH_PFC_PIN_GROUP(sdhi0_ctrl),
+	SH_PFC_PIN_GROUP(sdhi0_cd),
+	SH_PFC_PIN_GROUP(sdhi0_wp),
+	SH_PFC_PIN_GROUP(sdhi1_data1),
+	SH_PFC_PIN_GROUP(sdhi1_data4),
+	SH_PFC_PIN_GROUP(sdhi1_ctrl),
+	SH_PFC_PIN_GROUP(sdhi1_cd),
+	SH_PFC_PIN_GROUP(sdhi1_wp),
+	SH_PFC_PIN_GROUP(sdhi2_data1),
+	SH_PFC_PIN_GROUP(sdhi2_data4),
+	SH_PFC_PIN_GROUP(sdhi2_ctrl),
+	SH_PFC_PIN_GROUP(sdhi2_cd_0),
+	SH_PFC_PIN_GROUP(sdhi2_wp_0),
+	SH_PFC_PIN_GROUP(sdhi2_cd_1),
+	SH_PFC_PIN_GROUP(sdhi2_wp_1),
+	SH_PFC_PIN_GROUP(mmc0_data1_0),
+	SH_PFC_PIN_GROUP(mmc0_data4_0),
+	SH_PFC_PIN_GROUP(mmc0_data8_0),
+	SH_PFC_PIN_GROUP(mmc0_ctrl_0),
+	SH_PFC_PIN_GROUP(mmc0_data1_1),
+	SH_PFC_PIN_GROUP(mmc0_data4_1),
+	SH_PFC_PIN_GROUP(mmc0_data8_1),
+	SH_PFC_PIN_GROUP(mmc0_ctrl_1),
 };
 
 static const char * const lcd0_groups[] = {
@@ -1923,9 +2130,50 @@ static const char * const lcd1_groups[] = {
 	"lcd1_sys",
 };
 
+static const char * const sdhi0_groups[] = {
+	"sdhi0_data1",
+	"sdhi0_data4",
+	"sdhi0_ctrl",
+	"sdhi0_cd",
+	"sdhi0_wp",
+};
+
+static const char * const sdhi1_groups[] = {
+	"sdhi1_data1",
+	"sdhi1_data4",
+	"sdhi1_ctrl",
+	"sdhi1_cd",
+	"sdhi1_wp",
+};
+
+static const char * const sdhi2_groups[] = {
+	"sdhi2_data1",
+	"sdhi2_data4",
+	"sdhi2_ctrl",
+	"sdhi2_cd_0",
+	"sdhi2_wp_0",
+	"sdhi2_cd_1",
+	"sdhi2_wp_1",
+};
+
+static const char * const mmc0_groups[] = {
+	"mmc0_data1_0",
+	"mmc0_data4_0",
+	"mmc0_data8_0",
+	"mmc0_ctrl_0",
+	"mmc0_data1_1",
+	"mmc0_data4_1",
+	"mmc0_data8_1",
+	"mmc0_ctrl_1",
+};
+
 static const struct sh_pfc_function pinmux_functions[] = {
 	SH_PFC_FUNCTION(lcd0),
 	SH_PFC_FUNCTION(lcd1),
+	SH_PFC_FUNCTION(sdhi0),
+	SH_PFC_FUNCTION(sdhi1),
+	SH_PFC_FUNCTION(sdhi2),
+	SH_PFC_FUNCTION(mmc0),
 };
 
 #define PINMUX_FN_BASE	ARRAY_SIZE(pinmux_pins)
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 1/8] pinctrl: add SDHI and MMCIF pin groups to r8a7740
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Add pin groups for the first two SDHI interfaces and two alternative pin
groups for the MMCIF interface on the r8a7740 SoC.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

v3: swapped two pin numbers for MMCIF, as spotted by Laurent, thanks.

 drivers/pinctrl/sh-pfc/pfc-r8a7740.c |  248 ++++++++++++++++++++++++++++++++++
 1 files changed, 248 insertions(+), 0 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
index d0b7165..4c92af8 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
@@ -1870,6 +1870,188 @@ static const unsigned int lcd1_sys_mux[] = {
 	LCD1_CS_MARK, LCD1_WR_MARK, LCD1_RD_MARK, LCD1_RS_MARK,
 };
 
+static const unsigned int sdhi0_data1_pins[] = {
+	/* D0 */
+	77,
+};
+static const unsigned int sdhi0_data1_mux[] = {
+	SDHI0_D0_MARK,
+};
+static const unsigned int sdhi0_data4_pins[] = {
+	/* D[0:3] */
+	77, 78, 79, 80,
+};
+static const unsigned int sdhi0_data4_mux[] = {
+	SDHI0_D0_MARK, SDHI0_D1_MARK, SDHI0_D2_MARK, SDHI0_D3_MARK,
+};
+static const unsigned int sdhi0_ctrl_pins[] = {
+	/* CMD, CLK */
+	76, 82,
+};
+static const unsigned int sdhi0_ctrl_mux[] = {
+	SDHI0_CMD_MARK, SDHI0_CLK_MARK,
+};
+static const unsigned int sdhi0_cd_pins[] = {
+	/* CD */
+	81,
+};
+static const unsigned int sdhi0_cd_mux[] = {
+	SDHI0_CD_MARK,
+};
+static const unsigned int sdhi0_wp_pins[] = {
+	/* WP */
+	83,
+};
+static const unsigned int sdhi0_wp_mux[] = {
+	SDHI0_WP_MARK,
+};
+
+static const unsigned int sdhi1_data1_pins[] = {
+	/* D0 */
+	68,
+};
+static const unsigned int sdhi1_data1_mux[] = {
+	SDHI1_D0_MARK,
+};
+static const unsigned int sdhi1_data4_pins[] = {
+	/* D[0:3] */
+	68, 69, 70, 71,
+};
+static const unsigned int sdhi1_data4_mux[] = {
+	SDHI1_D0_MARK, SDHI1_D1_MARK, SDHI1_D2_MARK, SDHI1_D3_MARK,
+};
+static const unsigned int sdhi1_ctrl_pins[] = {
+	/* CMD, CLK */
+	67, 66,
+};
+static const unsigned int sdhi1_ctrl_mux[] = {
+	SDHI1_CMD_MARK, SDHI1_CLK_MARK,
+};
+static const unsigned int sdhi1_cd_pins[] = {
+	/* CD */
+	72,
+};
+static const unsigned int sdhi1_cd_mux[] = {
+	SDHI1_CD_MARK,
+};
+static const unsigned int sdhi1_wp_pins[] = {
+	/* WP */
+	73,
+};
+static const unsigned int sdhi1_wp_mux[] = {
+	SDHI1_WP_MARK,
+};
+
+static const unsigned int sdhi2_data1_pins[] = {
+	/* D0 */
+	205,
+};
+static const unsigned int sdhi2_data1_mux[] = {
+	SDHI2_D0_MARK,
+};
+static const unsigned int sdhi2_data4_pins[] = {
+	/* D[0:3] */
+	205, 206, 207, 208,
+};
+static const unsigned int sdhi2_data4_mux[] = {
+	SDHI2_D0_MARK, SDHI2_D1_MARK, SDHI2_D2_MARK, SDHI2_D3_MARK,
+};
+static const unsigned int sdhi2_ctrl_pins[] = {
+	/* CMD, CLK */
+	204, 203,
+};
+static const unsigned int sdhi2_ctrl_mux[] = {
+	SDHI2_CMD_MARK, SDHI2_CLK_MARK,
+};
+static const unsigned int sdhi2_cd_0_pins[] = {
+	/* CD */
+	202,
+};
+static const unsigned int sdhi2_cd_0_mux[] = {
+	SDHI2_CD_PORT202_MARK,
+};
+static const unsigned int sdhi2_wp_0_pins[] = {
+	/* WP */
+	177,
+};
+static const unsigned int sdhi2_wp_0_mux[] = {
+	SDHI2_WP_PORT177_MARK,
+};
+static const unsigned int sdhi2_cd_1_pins[] = {
+	/* CD */
+	24,
+};
+static const unsigned int sdhi2_cd_1_mux[] = {
+	SDHI2_CD_PORT24_MARK,
+};
+static const unsigned int sdhi2_wp_1_pins[] = {
+	/* WP */
+	25,
+};
+static const unsigned int sdhi2_wp_1_mux[] = {
+	SDHI2_WP_PORT25_MARK,
+};
+
+static const unsigned int mmc0_data1_0_pins[] = {
+	/* D[0] */
+	68,
+};
+static const unsigned int mmc0_data1_0_mux[] = {
+	MMC0_D0_PORT68_MARK,
+};
+static const unsigned int mmc0_data4_0_pins[] = {
+	/* D[0:3] */
+	68, 69, 70, 71,
+};
+static const unsigned int mmc0_data4_0_mux[] = {
+	MMC0_D0_PORT68_MARK, MMC0_D1_PORT69_MARK, MMC0_D2_PORT70_MARK, MMC0_D3_PORT71_MARK,
+};
+static const unsigned int mmc0_data8_0_pins[] = {
+	/* D[0:7] */
+	68, 69, 70, 71, 72, 73, 74, 75,
+};
+static const unsigned int mmc0_data8_0_mux[] = {
+	MMC0_D0_PORT68_MARK, MMC0_D1_PORT69_MARK, MMC0_D2_PORT70_MARK, MMC0_D3_PORT71_MARK,
+	MMC0_D4_PORT72_MARK, MMC0_D5_PORT73_MARK, MMC0_D6_PORT74_MARK, MMC0_D7_PORT75_MARK,
+};
+static const unsigned int mmc0_ctrl_0_pins[] = {
+	/* CMD, CLK */
+	67, 66,
+};
+static const unsigned int mmc0_ctrl_0_mux[] = {
+	MMC0_CMD_PORT67_MARK, MMC0_CLK_PORT66_MARK,
+};
+
+static const unsigned int mmc0_data1_1_pins[] = {
+	/* D[0] */
+	149,
+};
+static const unsigned int mmc0_data1_1_mux[] = {
+	MMC1_D0_PORT149_MARK,
+};
+static const unsigned int mmc0_data4_1_pins[] = {
+	/* D[0:3] */
+	149, 148, 147, 146,
+};
+static const unsigned int mmc0_data4_1_mux[] = {
+	MMC1_D0_PORT149_MARK, MMC1_D1_PORT148_MARK, MMC1_D2_PORT147_MARK, MMC1_D3_PORT146_MARK,
+};
+static const unsigned int mmc0_data8_1_pins[] = {
+	/* D[0:7] */
+	149, 148, 147, 146, 145, 144, 143, 142,
+};
+static const unsigned int mmc0_data8_1_mux[] = {
+	MMC1_D0_PORT149_MARK, MMC1_D1_PORT148_MARK, MMC1_D2_PORT147_MARK, MMC1_D3_PORT146_MARK,
+	MMC1_D4_PORT145_MARK, MMC1_D5_PORT144_MARK, MMC1_D6_PORT143_MARK, MMC1_D7_PORT142_MARK,
+};
+static const unsigned int mmc0_ctrl_1_pins[] = {
+	/* CMD, CLK */
+	104, 103,
+};
+static const unsigned int mmc0_ctrl_1_mux[] = {
+	MMC1_CMD_PORT104_MARK, MMC1_CLK_PORT103_MARK,
+};
+
 static const struct sh_pfc_pin_group pinmux_groups[] = {
 	SH_PFC_PIN_GROUP(lcd0_data8),
 	SH_PFC_PIN_GROUP(lcd0_data9),
@@ -1893,6 +2075,31 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
 	SH_PFC_PIN_GROUP(lcd1_lclk),
 	SH_PFC_PIN_GROUP(lcd1_sync),
 	SH_PFC_PIN_GROUP(lcd1_sys),
+	SH_PFC_PIN_GROUP(sdhi0_data1),
+	SH_PFC_PIN_GROUP(sdhi0_data4),
+	SH_PFC_PIN_GROUP(sdhi0_ctrl),
+	SH_PFC_PIN_GROUP(sdhi0_cd),
+	SH_PFC_PIN_GROUP(sdhi0_wp),
+	SH_PFC_PIN_GROUP(sdhi1_data1),
+	SH_PFC_PIN_GROUP(sdhi1_data4),
+	SH_PFC_PIN_GROUP(sdhi1_ctrl),
+	SH_PFC_PIN_GROUP(sdhi1_cd),
+	SH_PFC_PIN_GROUP(sdhi1_wp),
+	SH_PFC_PIN_GROUP(sdhi2_data1),
+	SH_PFC_PIN_GROUP(sdhi2_data4),
+	SH_PFC_PIN_GROUP(sdhi2_ctrl),
+	SH_PFC_PIN_GROUP(sdhi2_cd_0),
+	SH_PFC_PIN_GROUP(sdhi2_wp_0),
+	SH_PFC_PIN_GROUP(sdhi2_cd_1),
+	SH_PFC_PIN_GROUP(sdhi2_wp_1),
+	SH_PFC_PIN_GROUP(mmc0_data1_0),
+	SH_PFC_PIN_GROUP(mmc0_data4_0),
+	SH_PFC_PIN_GROUP(mmc0_data8_0),
+	SH_PFC_PIN_GROUP(mmc0_ctrl_0),
+	SH_PFC_PIN_GROUP(mmc0_data1_1),
+	SH_PFC_PIN_GROUP(mmc0_data4_1),
+	SH_PFC_PIN_GROUP(mmc0_data8_1),
+	SH_PFC_PIN_GROUP(mmc0_ctrl_1),
 };
 
 static const char * const lcd0_groups[] = {
@@ -1923,9 +2130,50 @@ static const char * const lcd1_groups[] = {
 	"lcd1_sys",
 };
 
+static const char * const sdhi0_groups[] = {
+	"sdhi0_data1",
+	"sdhi0_data4",
+	"sdhi0_ctrl",
+	"sdhi0_cd",
+	"sdhi0_wp",
+};
+
+static const char * const sdhi1_groups[] = {
+	"sdhi1_data1",
+	"sdhi1_data4",
+	"sdhi1_ctrl",
+	"sdhi1_cd",
+	"sdhi1_wp",
+};
+
+static const char * const sdhi2_groups[] = {
+	"sdhi2_data1",
+	"sdhi2_data4",
+	"sdhi2_ctrl",
+	"sdhi2_cd_0",
+	"sdhi2_wp_0",
+	"sdhi2_cd_1",
+	"sdhi2_wp_1",
+};
+
+static const char * const mmc0_groups[] = {
+	"mmc0_data1_0",
+	"mmc0_data4_0",
+	"mmc0_data8_0",
+	"mmc0_ctrl_0",
+	"mmc0_data1_1",
+	"mmc0_data4_1",
+	"mmc0_data8_1",
+	"mmc0_ctrl_1",
+};
+
 static const struct sh_pfc_function pinmux_functions[] = {
 	SH_PFC_FUNCTION(lcd0),
 	SH_PFC_FUNCTION(lcd1),
+	SH_PFC_FUNCTION(sdhi0),
+	SH_PFC_FUNCTION(sdhi1),
+	SH_PFC_FUNCTION(sdhi2),
+	SH_PFC_FUNCTION(mmc0),
 };
 
 #define PINMUX_FN_BASE	ARRAY_SIZE(pinmux_pins)
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 2/8] pinctrl: add SDHI and MMCIF pin groups to sh7372
  2013-01-23 16:37 ` Guennadi Liakhovetski
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Add pin groups for all three SDHI interfaces and two alternative pin
groups for the MMCIF interface on the sh7372 SoC.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---

v3: fixed indentation.

 drivers/pinctrl/sh-pfc/pfc-sh7372.c |  205 +++++++++++++++++++++++++++++++++++
 1 files changed, 205 insertions(+), 0 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7372.c b/drivers/pinctrl/sh-pfc/pfc-sh7372.c
index 847e0cd..b4b54a0 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7372.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7372.c
@@ -933,6 +933,206 @@ static struct sh_pfc_pin pinmux_pins[] = {
 	GPIO_PORT_ALL(),
 };
 
+static const unsigned int sdhi0_data1_pins[] = {
+	/* D0 */
+	173,
+};
+static const unsigned int sdhi0_data1_mux[] = {
+	SDHID0_0_MARK,
+};
+static const unsigned int sdhi0_data4_pins[] = {
+	/* D[0:3] */
+	173, 174, 175, 176,
+};
+static const unsigned int sdhi0_data4_mux[] = {
+	SDHID0_0_MARK, SDHID0_1_MARK, SDHID0_2_MARK, SDHID0_3_MARK,
+};
+static const unsigned int sdhi0_ctrl_pins[] = {
+	/* CMD, CLK */
+	177, 171,
+};
+static const unsigned int sdhi0_ctrl_mux[] = {
+	SDHICMD0_MARK, SDHICLK0_MARK,
+};
+static const unsigned int sdhi0_cd_pins[] = {
+	/* CD */
+	172,
+};
+static const unsigned int sdhi0_cd_mux[] = {
+	SDHICD0_MARK,
+};
+static const unsigned int sdhi0_wp_pins[] = {
+	/* WP */
+	178,
+};
+static const unsigned int sdhi0_wp_mux[] = {
+	SDHIWP0_MARK,
+};
+
+static const unsigned int sdhi1_data1_pins[] = {
+	/* D0 */
+	180,
+};
+static const unsigned int sdhi1_data1_mux[] = {
+	SDHID1_0_MARK,
+};
+static const unsigned int sdhi1_data4_pins[] = {
+	/* D[0:3] */
+	180, 181, 182, 183,
+};
+static const unsigned int sdhi1_data4_mux[] = {
+	SDHID1_0_MARK, SDHID1_1_MARK, SDHID1_2_MARK, SDHID1_3_MARK,
+};
+static const unsigned int sdhi1_ctrl_pins[] = {
+	/* CMD, CLK */
+	184, 179,
+};
+static const unsigned int sdhi1_ctrl_mux[] = {
+	SDHICMD1_MARK, SDHICLK1_MARK,
+};
+
+static const unsigned int sdhi2_data1_pins[] = {
+	/* D0 */
+	186,
+};
+static const unsigned int sdhi2_data1_mux[] = {
+	SDHID2_0_MARK,
+};
+static const unsigned int sdhi2_data4_pins[] = {
+	/* D[0:3] */
+	186, 187, 188, 189,
+};
+static const unsigned int sdhi2_data4_mux[] = {
+	SDHID2_0_MARK, SDHID2_1_MARK, SDHID2_2_MARK, SDHID2_3_MARK,
+};
+static const unsigned int sdhi2_ctrl_pins[] = {
+	/* CMD, CLK */
+	190, 185,
+};
+static const unsigned int sdhi2_ctrl_mux[] = {
+	SDHICMD2_MARK, SDHICLK2_MARK,
+};
+
+static const unsigned int mmc0_data1_0_pins[] = {
+	/* D[0] */
+	84,
+};
+static const unsigned int mmc0_data1_0_mux[] = {
+	MMCD0_0_MARK,
+};
+static const unsigned int mmc0_data4_0_pins[] = {
+	/* D[0:3] */
+	84, 85, 86, 87,
+};
+static const unsigned int mmc0_data4_0_mux[] = {
+	MMCD0_0_MARK, MMCD0_1_MARK, MMCD0_2_MARK, MMCD0_3_MARK,
+};
+static const unsigned int mmc0_data8_0_pins[] = {
+	/* D[0:7] */
+	84, 85, 86, 87, 88, 89, 90, 91,
+};
+static const unsigned int mmc0_data8_0_mux[] = {
+	MMCD0_0_MARK, MMCD0_1_MARK, MMCD0_2_MARK, MMCD0_3_MARK,
+	MMCD0_4_MARK, MMCD0_5_MARK, MMCD0_6_MARK, MMCD0_7_MARK,
+};
+static const unsigned int mmc0_ctrl_0_pins[] = {
+	/* CMD, CLK */
+	92, 99,
+};
+static const unsigned int mmc0_ctrl_0_mux[] = {
+	MMCCMD0_MARK, MMCCLK0_MARK,
+};
+
+static const unsigned int mmc0_data1_1_pins[] = {
+	/* D[0] */
+	54,
+};
+static const unsigned int mmc0_data1_1_mux[] = {
+	MMCD1_0_MARK,
+};
+static const unsigned int mmc0_data4_1_pins[] = {
+	/* D[0:3] */
+	54, 55, 56, 57,
+};
+static const unsigned int mmc0_data4_1_mux[] = {
+	MMCD1_0_MARK, MMCD1_1_MARK, MMCD1_2_MARK, MMCD1_3_MARK,
+};
+static const unsigned int mmc0_data8_1_pins[] = {
+	/* D[0:7] */
+	54, 55, 56, 57, 58, 59, 60, 61,
+};
+static const unsigned int mmc0_data8_1_mux[] = {
+	MMCD1_0_MARK, MMCD1_1_MARK, MMCD1_2_MARK, MMCD1_3_MARK,
+	MMCD1_4_MARK, MMCD1_5_MARK, MMCD1_6_MARK, MMCD1_7_MARK,
+};
+static const unsigned int mmc0_ctrl_1_pins[] = {
+	/* CMD, CLK */
+	67, 66,
+};
+static const unsigned int mmc0_ctrl_1_mux[] = {
+	MMCCMD1_MARK, MMCCLK1_MARK,
+};
+
+static const struct sh_pfc_pin_group pinmux_groups[] = {
+	SH_PFC_PIN_GROUP(sdhi0_data1),
+	SH_PFC_PIN_GROUP(sdhi0_data4),
+	SH_PFC_PIN_GROUP(sdhi0_ctrl),
+	SH_PFC_PIN_GROUP(sdhi0_cd),
+	SH_PFC_PIN_GROUP(sdhi0_wp),
+	SH_PFC_PIN_GROUP(sdhi1_data1),
+	SH_PFC_PIN_GROUP(sdhi1_data4),
+	SH_PFC_PIN_GROUP(sdhi1_ctrl),
+	SH_PFC_PIN_GROUP(sdhi2_data1),
+	SH_PFC_PIN_GROUP(sdhi2_data4),
+	SH_PFC_PIN_GROUP(sdhi2_ctrl),
+	SH_PFC_PIN_GROUP(mmc0_data1_0),
+	SH_PFC_PIN_GROUP(mmc0_data4_0),
+	SH_PFC_PIN_GROUP(mmc0_data8_0),
+	SH_PFC_PIN_GROUP(mmc0_ctrl_0),
+	SH_PFC_PIN_GROUP(mmc0_data1_1),
+	SH_PFC_PIN_GROUP(mmc0_data4_1),
+	SH_PFC_PIN_GROUP(mmc0_data8_1),
+	SH_PFC_PIN_GROUP(mmc0_ctrl_1),
+};
+
+static const char * const sdhi0_groups[] = {
+	"sdhi0_data1",
+	"sdhi0_data4",
+	"sdhi0_ctrl",
+	"sdhi0_cd",
+	"sdhi0_wp",
+};
+
+static const char * const sdhi1_groups[] = {
+	"sdhi1_data1",
+	"sdhi1_data4",
+	"sdhi1_ctrl",
+};
+
+static const char * const sdhi2_groups[] = {
+	"sdhi2_data1",
+	"sdhi2_data4",
+	"sdhi2_ctrl",
+};
+
+static const char * const mmc0_groups[] = {
+	"mmc0_data1_0",
+	"mmc0_data4_0",
+	"mmc0_data8_0",
+	"mmc0_ctrl_0",
+	"mmc0_data1_1",
+	"mmc0_data4_1",
+	"mmc0_data8_1",
+	"mmc0_ctrl_1",
+};
+
+static const struct sh_pfc_function pinmux_functions[] = {
+	SH_PFC_FUNCTION(sdhi0),
+	SH_PFC_FUNCTION(sdhi1),
+	SH_PFC_FUNCTION(sdhi2),
+	SH_PFC_FUNCTION(mmc0),
+};
+
 #define PINMUX_FN_BASE	ARRAY_SIZE(pinmux_pins)
 
 static struct pinmux_func pinmux_func_gpios[] = {
@@ -1644,6 +1844,11 @@ struct sh_pfc_soc_info sh7372_pinmux_info = {
 
 	.pins = pinmux_pins,
 	.nr_pins = ARRAY_SIZE(pinmux_pins),
+	.groups = pinmux_groups,
+	.nr_groups = ARRAY_SIZE(pinmux_groups),
+	.functions = pinmux_functions,
+	.nr_functions = ARRAY_SIZE(pinmux_functions),
+
 	.func_gpios = pinmux_func_gpios,
 	.nr_func_gpios = ARRAY_SIZE(pinmux_func_gpios),
 
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 2/8] pinctrl: add SDHI and MMCIF pin groups to sh7372
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Add pin groups for all three SDHI interfaces and two alternative pin
groups for the MMCIF interface on the sh7372 SoC.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---

v3: fixed indentation.

 drivers/pinctrl/sh-pfc/pfc-sh7372.c |  205 +++++++++++++++++++++++++++++++++++
 1 files changed, 205 insertions(+), 0 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7372.c b/drivers/pinctrl/sh-pfc/pfc-sh7372.c
index 847e0cd..b4b54a0 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7372.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7372.c
@@ -933,6 +933,206 @@ static struct sh_pfc_pin pinmux_pins[] = {
 	GPIO_PORT_ALL(),
 };
 
+static const unsigned int sdhi0_data1_pins[] = {
+	/* D0 */
+	173,
+};
+static const unsigned int sdhi0_data1_mux[] = {
+	SDHID0_0_MARK,
+};
+static const unsigned int sdhi0_data4_pins[] = {
+	/* D[0:3] */
+	173, 174, 175, 176,
+};
+static const unsigned int sdhi0_data4_mux[] = {
+	SDHID0_0_MARK, SDHID0_1_MARK, SDHID0_2_MARK, SDHID0_3_MARK,
+};
+static const unsigned int sdhi0_ctrl_pins[] = {
+	/* CMD, CLK */
+	177, 171,
+};
+static const unsigned int sdhi0_ctrl_mux[] = {
+	SDHICMD0_MARK, SDHICLK0_MARK,
+};
+static const unsigned int sdhi0_cd_pins[] = {
+	/* CD */
+	172,
+};
+static const unsigned int sdhi0_cd_mux[] = {
+	SDHICD0_MARK,
+};
+static const unsigned int sdhi0_wp_pins[] = {
+	/* WP */
+	178,
+};
+static const unsigned int sdhi0_wp_mux[] = {
+	SDHIWP0_MARK,
+};
+
+static const unsigned int sdhi1_data1_pins[] = {
+	/* D0 */
+	180,
+};
+static const unsigned int sdhi1_data1_mux[] = {
+	SDHID1_0_MARK,
+};
+static const unsigned int sdhi1_data4_pins[] = {
+	/* D[0:3] */
+	180, 181, 182, 183,
+};
+static const unsigned int sdhi1_data4_mux[] = {
+	SDHID1_0_MARK, SDHID1_1_MARK, SDHID1_2_MARK, SDHID1_3_MARK,
+};
+static const unsigned int sdhi1_ctrl_pins[] = {
+	/* CMD, CLK */
+	184, 179,
+};
+static const unsigned int sdhi1_ctrl_mux[] = {
+	SDHICMD1_MARK, SDHICLK1_MARK,
+};
+
+static const unsigned int sdhi2_data1_pins[] = {
+	/* D0 */
+	186,
+};
+static const unsigned int sdhi2_data1_mux[] = {
+	SDHID2_0_MARK,
+};
+static const unsigned int sdhi2_data4_pins[] = {
+	/* D[0:3] */
+	186, 187, 188, 189,
+};
+static const unsigned int sdhi2_data4_mux[] = {
+	SDHID2_0_MARK, SDHID2_1_MARK, SDHID2_2_MARK, SDHID2_3_MARK,
+};
+static const unsigned int sdhi2_ctrl_pins[] = {
+	/* CMD, CLK */
+	190, 185,
+};
+static const unsigned int sdhi2_ctrl_mux[] = {
+	SDHICMD2_MARK, SDHICLK2_MARK,
+};
+
+static const unsigned int mmc0_data1_0_pins[] = {
+	/* D[0] */
+	84,
+};
+static const unsigned int mmc0_data1_0_mux[] = {
+	MMCD0_0_MARK,
+};
+static const unsigned int mmc0_data4_0_pins[] = {
+	/* D[0:3] */
+	84, 85, 86, 87,
+};
+static const unsigned int mmc0_data4_0_mux[] = {
+	MMCD0_0_MARK, MMCD0_1_MARK, MMCD0_2_MARK, MMCD0_3_MARK,
+};
+static const unsigned int mmc0_data8_0_pins[] = {
+	/* D[0:7] */
+	84, 85, 86, 87, 88, 89, 90, 91,
+};
+static const unsigned int mmc0_data8_0_mux[] = {
+	MMCD0_0_MARK, MMCD0_1_MARK, MMCD0_2_MARK, MMCD0_3_MARK,
+	MMCD0_4_MARK, MMCD0_5_MARK, MMCD0_6_MARK, MMCD0_7_MARK,
+};
+static const unsigned int mmc0_ctrl_0_pins[] = {
+	/* CMD, CLK */
+	92, 99,
+};
+static const unsigned int mmc0_ctrl_0_mux[] = {
+	MMCCMD0_MARK, MMCCLK0_MARK,
+};
+
+static const unsigned int mmc0_data1_1_pins[] = {
+	/* D[0] */
+	54,
+};
+static const unsigned int mmc0_data1_1_mux[] = {
+	MMCD1_0_MARK,
+};
+static const unsigned int mmc0_data4_1_pins[] = {
+	/* D[0:3] */
+	54, 55, 56, 57,
+};
+static const unsigned int mmc0_data4_1_mux[] = {
+	MMCD1_0_MARK, MMCD1_1_MARK, MMCD1_2_MARK, MMCD1_3_MARK,
+};
+static const unsigned int mmc0_data8_1_pins[] = {
+	/* D[0:7] */
+	54, 55, 56, 57, 58, 59, 60, 61,
+};
+static const unsigned int mmc0_data8_1_mux[] = {
+	MMCD1_0_MARK, MMCD1_1_MARK, MMCD1_2_MARK, MMCD1_3_MARK,
+	MMCD1_4_MARK, MMCD1_5_MARK, MMCD1_6_MARK, MMCD1_7_MARK,
+};
+static const unsigned int mmc0_ctrl_1_pins[] = {
+	/* CMD, CLK */
+	67, 66,
+};
+static const unsigned int mmc0_ctrl_1_mux[] = {
+	MMCCMD1_MARK, MMCCLK1_MARK,
+};
+
+static const struct sh_pfc_pin_group pinmux_groups[] = {
+	SH_PFC_PIN_GROUP(sdhi0_data1),
+	SH_PFC_PIN_GROUP(sdhi0_data4),
+	SH_PFC_PIN_GROUP(sdhi0_ctrl),
+	SH_PFC_PIN_GROUP(sdhi0_cd),
+	SH_PFC_PIN_GROUP(sdhi0_wp),
+	SH_PFC_PIN_GROUP(sdhi1_data1),
+	SH_PFC_PIN_GROUP(sdhi1_data4),
+	SH_PFC_PIN_GROUP(sdhi1_ctrl),
+	SH_PFC_PIN_GROUP(sdhi2_data1),
+	SH_PFC_PIN_GROUP(sdhi2_data4),
+	SH_PFC_PIN_GROUP(sdhi2_ctrl),
+	SH_PFC_PIN_GROUP(mmc0_data1_0),
+	SH_PFC_PIN_GROUP(mmc0_data4_0),
+	SH_PFC_PIN_GROUP(mmc0_data8_0),
+	SH_PFC_PIN_GROUP(mmc0_ctrl_0),
+	SH_PFC_PIN_GROUP(mmc0_data1_1),
+	SH_PFC_PIN_GROUP(mmc0_data4_1),
+	SH_PFC_PIN_GROUP(mmc0_data8_1),
+	SH_PFC_PIN_GROUP(mmc0_ctrl_1),
+};
+
+static const char * const sdhi0_groups[] = {
+	"sdhi0_data1",
+	"sdhi0_data4",
+	"sdhi0_ctrl",
+	"sdhi0_cd",
+	"sdhi0_wp",
+};
+
+static const char * const sdhi1_groups[] = {
+	"sdhi1_data1",
+	"sdhi1_data4",
+	"sdhi1_ctrl",
+};
+
+static const char * const sdhi2_groups[] = {
+	"sdhi2_data1",
+	"sdhi2_data4",
+	"sdhi2_ctrl",
+};
+
+static const char * const mmc0_groups[] = {
+	"mmc0_data1_0",
+	"mmc0_data4_0",
+	"mmc0_data8_0",
+	"mmc0_ctrl_0",
+	"mmc0_data1_1",
+	"mmc0_data4_1",
+	"mmc0_data8_1",
+	"mmc0_ctrl_1",
+};
+
+static const struct sh_pfc_function pinmux_functions[] = {
+	SH_PFC_FUNCTION(sdhi0),
+	SH_PFC_FUNCTION(sdhi1),
+	SH_PFC_FUNCTION(sdhi2),
+	SH_PFC_FUNCTION(mmc0),
+};
+
 #define PINMUX_FN_BASE	ARRAY_SIZE(pinmux_pins)
 
 static struct pinmux_func pinmux_func_gpios[] = {
@@ -1644,6 +1844,11 @@ struct sh_pfc_soc_info sh7372_pinmux_info = {
 
 	.pins = pinmux_pins,
 	.nr_pins = ARRAY_SIZE(pinmux_pins),
+	.groups = pinmux_groups,
+	.nr_groups = ARRAY_SIZE(pinmux_groups),
+	.functions = pinmux_functions,
+	.nr_functions = ARRAY_SIZE(pinmux_functions),
+
 	.func_gpios = pinmux_func_gpios,
 	.nr_func_gpios = ARRAY_SIZE(pinmux_func_gpios),
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 3/8] ARM: shmobile: simplify armadillo800eva and kzm9g Kconfig dependencies
  2013-01-23 16:37 ` Guennadi Liakhovetski
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Reference kernel configurations for armadillo800eva and kzm9g boards do not
have to depend on their respective "legacy" configurations, doing device
instantiation in .c, they can be configured and built independently.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 arch/arm/mach-shmobile/Kconfig |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 5f61e8f..927eecc 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -106,7 +106,11 @@ config MACH_ARMADILLO800EVA
 
 config MACH_ARMADILLO800EVA_REFERENCE
 	bool "Armadillo-800 EVA board - Reference Device Tree Implementation"
-	depends on MACH_ARMADILLO800EVA
+	depends on ARCH_R8A7740
+	select ARCH_REQUIRE_GPIOLIB
+	select REGULATOR_FIXED_VOLTAGE if REGULATOR
+	select SND_SOC_WM8978 if SND_SIMPLE_CARD
+	select USE_OF
 	---help---
 	  Use reference implementation of Aramdillo800 EVA board support
 	  which makes a greater use of device tree at the expense
@@ -136,7 +140,11 @@ config MACH_KZM9G
 
 config MACH_KZM9G_REFERENCE
 	bool "KZM-A9-GT board - Reference Device Tree Implementation"
-	depends on MACH_KZM9G
+	depends on ARCH_SH73A0
+	select ARCH_REQUIRE_GPIOLIB
+	select REGULATOR_FIXED_VOLTAGE if REGULATOR
+	select SND_SOC_AK4642 if SND_SIMPLE_CARD
+	select USE_OF
 	---help---
 	   Use reference implementation of KZM-A9-GT board support
 	   which makes as greater use of device tree at the expense
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 3/8] ARM: shmobile: simplify armadillo800eva and kzm9g Kconfig dependencies
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Reference kernel configurations for armadillo800eva and kzm9g boards do not
have to depend on their respective "legacy" configurations, doing device
instantiation in .c, they can be configured and built independently.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 arch/arm/mach-shmobile/Kconfig |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 5f61e8f..927eecc 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -106,7 +106,11 @@ config MACH_ARMADILLO800EVA
 
 config MACH_ARMADILLO800EVA_REFERENCE
 	bool "Armadillo-800 EVA board - Reference Device Tree Implementation"
-	depends on MACH_ARMADILLO800EVA
+	depends on ARCH_R8A7740
+	select ARCH_REQUIRE_GPIOLIB
+	select REGULATOR_FIXED_VOLTAGE if REGULATOR
+	select SND_SOC_WM8978 if SND_SIMPLE_CARD
+	select USE_OF
 	---help---
 	  Use reference implementation of Aramdillo800 EVA board support
 	  which makes a greater use of device tree at the expense
@@ -136,7 +140,11 @@ config MACH_KZM9G
 
 config MACH_KZM9G_REFERENCE
 	bool "KZM-A9-GT board - Reference Device Tree Implementation"
-	depends on MACH_KZM9G
+	depends on ARCH_SH73A0
+	select ARCH_REQUIRE_GPIOLIB
+	select REGULATOR_FIXED_VOLTAGE if REGULATOR
+	select SND_SOC_AK4642 if SND_SIMPLE_CARD
+	select USE_OF
 	---help---
 	   Use reference implementation of KZM-A9-GT board support
 	   which makes as greater use of device tree at the expense
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 4/8] ARM: shmobile: add MMCIF and SDHI DT clock aliases to sh73a0 and r8a7740
  2013-01-23 16:37 ` Guennadi Liakhovetski
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Add clock lookup entries for SDHI and MMCIF device names, for the FDT case.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 arch/arm/mach-shmobile/clock-r8a7740.c |    4 ++++
 arch/arm/mach-shmobile/clock-sh73a0.c  |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index 8765a76..83209bf 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -611,12 +611,16 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("i2c-sh_mobile.1",	&mstp_clks[MSTP323]),
 	CLKDEV_DEV_ID("renesas_usbhs",		&mstp_clks[MSTP320]),
 	CLKDEV_DEV_ID("sh_mobile_sdhi.0",	&mstp_clks[MSTP314]),
+	CLKDEV_DEV_ID("e6850000.sdhi",		&mstp_clks[MSTP314]),
 	CLKDEV_DEV_ID("sh_mobile_sdhi.1",	&mstp_clks[MSTP313]),
+	CLKDEV_DEV_ID("e6860000.sdhi",		&mstp_clks[MSTP313]),
 	CLKDEV_DEV_ID("sh_mmcif",		&mstp_clks[MSTP312]),
+	CLKDEV_DEV_ID("e6bd0000.mmcif",		&mstp_clks[MSTP312]),
 	CLKDEV_DEV_ID("sh-eth",			&mstp_clks[MSTP309]),
 	CLKDEV_DEV_ID("e9a00000.sh-eth",	&mstp_clks[MSTP309]),
 
 	CLKDEV_DEV_ID("sh_mobile_sdhi.2",	&mstp_clks[MSTP415]),
+	CLKDEV_DEV_ID("e6870000.sdhi",		&mstp_clks[MSTP415]),
 
 	/* ICK */
 	CLKDEV_ICK_ID("host",	"renesas_usbhs",	&mstp_clks[MSTP416]),
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
index afa5423..5fa106b 100644
--- a/arch/arm/mach-shmobile/clock-sh73a0.c
+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
@@ -581,10 +581,13 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("e6822000.i2c", &mstp_clks[MSTP323]), /* I2C1 */
 	CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP322]), /* USB */
 	CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */
+	CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]), /* SDHI0 */
 	CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
+	CLKDEV_DEV_ID("ee120000.sdhi", &mstp_clks[MSTP313]), /* SDHI1 */
 	CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */
 	CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), /* MMCIF0 */
 	CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]), /* SDHI2 */
+	CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP311]), /* SDHI2 */
 	CLKDEV_DEV_ID("leds-renesas-tpu.12", &mstp_clks[MSTP303]), /* TPU1 */
 	CLKDEV_DEV_ID("leds-renesas-tpu.21", &mstp_clks[MSTP302]), /* TPU2 */
 	CLKDEV_DEV_ID("leds-renesas-tpu.30", &mstp_clks[MSTP301]), /* TPU3 */
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 4/8] ARM: shmobile: add MMCIF and SDHI DT clock aliases to sh73a0 and r8a7740
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Add clock lookup entries for SDHI and MMCIF device names, for the FDT case.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 arch/arm/mach-shmobile/clock-r8a7740.c |    4 ++++
 arch/arm/mach-shmobile/clock-sh73a0.c  |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index 8765a76..83209bf 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -611,12 +611,16 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("i2c-sh_mobile.1",	&mstp_clks[MSTP323]),
 	CLKDEV_DEV_ID("renesas_usbhs",		&mstp_clks[MSTP320]),
 	CLKDEV_DEV_ID("sh_mobile_sdhi.0",	&mstp_clks[MSTP314]),
+	CLKDEV_DEV_ID("e6850000.sdhi",		&mstp_clks[MSTP314]),
 	CLKDEV_DEV_ID("sh_mobile_sdhi.1",	&mstp_clks[MSTP313]),
+	CLKDEV_DEV_ID("e6860000.sdhi",		&mstp_clks[MSTP313]),
 	CLKDEV_DEV_ID("sh_mmcif",		&mstp_clks[MSTP312]),
+	CLKDEV_DEV_ID("e6bd0000.mmcif",		&mstp_clks[MSTP312]),
 	CLKDEV_DEV_ID("sh-eth",			&mstp_clks[MSTP309]),
 	CLKDEV_DEV_ID("e9a00000.sh-eth",	&mstp_clks[MSTP309]),
 
 	CLKDEV_DEV_ID("sh_mobile_sdhi.2",	&mstp_clks[MSTP415]),
+	CLKDEV_DEV_ID("e6870000.sdhi",		&mstp_clks[MSTP415]),
 
 	/* ICK */
 	CLKDEV_ICK_ID("host",	"renesas_usbhs",	&mstp_clks[MSTP416]),
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
index afa5423..5fa106b 100644
--- a/arch/arm/mach-shmobile/clock-sh73a0.c
+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
@@ -581,10 +581,13 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("e6822000.i2c", &mstp_clks[MSTP323]), /* I2C1 */
 	CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP322]), /* USB */
 	CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */
+	CLKDEV_DEV_ID("ee100000.sdhi", &mstp_clks[MSTP314]), /* SDHI0 */
 	CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
+	CLKDEV_DEV_ID("ee120000.sdhi", &mstp_clks[MSTP313]), /* SDHI1 */
 	CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */
 	CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), /* MMCIF0 */
 	CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]), /* SDHI2 */
+	CLKDEV_DEV_ID("ee140000.sdhi", &mstp_clks[MSTP311]), /* SDHI2 */
 	CLKDEV_DEV_ID("leds-renesas-tpu.12", &mstp_clks[MSTP303]), /* TPU1 */
 	CLKDEV_DEV_ID("leds-renesas-tpu.21", &mstp_clks[MSTP302]), /* TPU2 */
 	CLKDEV_DEV_ID("leds-renesas-tpu.30", &mstp_clks[MSTP301]), /* TPU3 */
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 5/8] ARM: shmobile: add a GPIO controller DT node for sh7372
  2013-01-23 16:37 ` Guennadi Liakhovetski
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Add a missing GPIO controller node to sh7372.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

v3: fix second memory area size.

 arch/arm/boot/dts/sh7372.dtsi |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/sh7372.dtsi b/arch/arm/boot/dts/sh7372.dtsi
index 582fdec..3598e57 100644
--- a/arch/arm/boot/dts/sh7372.dtsi
+++ b/arch/arm/boot/dts/sh7372.dtsi
@@ -19,6 +19,14 @@
 		};
 	};
 
+	gpio: pfc@e6050000 {
+		compatible = "renesas,pfc-sh7372";
+		reg = <0xe6050000 0x8000>,
+		      <0xe605800c 0x1c>;
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
 	soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 5/8] ARM: shmobile: add a GPIO controller DT node for sh7372
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Add a missing GPIO controller node to sh7372.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

v3: fix second memory area size.

 arch/arm/boot/dts/sh7372.dtsi |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/sh7372.dtsi b/arch/arm/boot/dts/sh7372.dtsi
index 582fdec..3598e57 100644
--- a/arch/arm/boot/dts/sh7372.dtsi
+++ b/arch/arm/boot/dts/sh7372.dtsi
@@ -19,6 +19,14 @@
 		};
 	};
 
+	gpio: pfc at e6050000 {
+		compatible = "renesas,pfc-sh7372";
+		reg = <0xe6050000 0x8000>,
+		      <0xe605800c 0x1c>;
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
 	soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 6/8] ARM: shmobile: use GPIO SD-card detection on armadillo800eva
  2013-01-23 16:37 ` Guennadi Liakhovetski
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Switch SDHI0 and SDHI1 SD-card interfaces on armadillo800eva to using GPIO
card detection, which provides maximum power saving and automatically
selects IRQ or polling mode, depending on the CD GPIO capability.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 arch/arm/mach-shmobile/board-armadillo800eva.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index e657a7a..1cf1157 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -580,10 +580,10 @@ static struct regulator_consumer_supply fixed3v3_power_consumers[]  static struct sh_mobile_sdhi_info sdhi0_info = {
 	.dma_slave_tx	= SHDMA_SLAVE_SDHI0_TX,
 	.dma_slave_rx	= SHDMA_SLAVE_SDHI0_RX,
-	.tmio_caps	= MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |\
-			  MMC_CAP_NEEDS_POLL,
+	.tmio_caps	= MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
 	.tmio_ocr_mask	= MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
-	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT,
+	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
+	.cd_gpio	= GPIO_PORT167,
 };
 
 static struct resource sdhi0_resources[] = {
@@ -624,7 +624,9 @@ static struct sh_mobile_sdhi_info sdhi1_info = {
 	.dma_slave_rx	= SHDMA_SLAVE_SDHI1_RX,
 	.tmio_caps	= MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
 	.tmio_ocr_mask	= MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
-	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT,
+	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
+	/* Port72 cannot generate IRQs, will be used in polling mode. */
+	.cd_gpio	= GPIO_PORT72,
 };
 
 static struct resource sdhi1_resources[] = {
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 6/8] ARM: shmobile: use GPIO SD-card detection on armadillo800eva
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Switch SDHI0 and SDHI1 SD-card interfaces on armadillo800eva to using GPIO
card detection, which provides maximum power saving and automatically
selects IRQ or polling mode, depending on the CD GPIO capability.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 arch/arm/mach-shmobile/board-armadillo800eva.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index e657a7a..1cf1157 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -580,10 +580,10 @@ static struct regulator_consumer_supply fixed3v3_power_consumers[] =
 static struct sh_mobile_sdhi_info sdhi0_info = {
 	.dma_slave_tx	= SHDMA_SLAVE_SDHI0_TX,
 	.dma_slave_rx	= SHDMA_SLAVE_SDHI0_RX,
-	.tmio_caps	= MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |\
-			  MMC_CAP_NEEDS_POLL,
+	.tmio_caps	= MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
 	.tmio_ocr_mask	= MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
-	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT,
+	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
+	.cd_gpio	= GPIO_PORT167,
 };
 
 static struct resource sdhi0_resources[] = {
@@ -624,7 +624,9 @@ static struct sh_mobile_sdhi_info sdhi1_info = {
 	.dma_slave_rx	= SHDMA_SLAVE_SDHI1_RX,
 	.tmio_caps	= MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
 	.tmio_ocr_mask	= MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
-	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT,
+	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
+	/* Port72 cannot generate IRQs, will be used in polling mode. */
+	.cd_gpio	= GPIO_PORT72,
 };
 
 static struct resource sdhi1_resources[] = {
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 7/8] ARM: shmobile: completely switch MMC interfaces on mackerel-reference to DT
  2013-01-23 16:37 ` Guennadi Liakhovetski
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Switch MMCIF, SDHI0 and SDHI2 to complete DT initialisation: use DT
bindings to configure interface pins, card-detect GPIOs, various
interface configuration parameters. Notice, since MMCIF and SDHI1 share
the same card slot, both devices cannot be successfully probed
simultaneously: they both would try to get the card-detection GPIO and only
one would succeed. Ideally it should be possible to let the user decide
which device to enable by, possibly, patching the DT at run-time. As long as
this is unsupported, we choose to enable MMCIF and remove SDHI1 from DT
completely.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 arch/arm/boot/dts/sh7372-mackerel-reference.dts   |   42 +++++++++++++++----
 arch/arm/mach-shmobile/board-mackerel-reference.c |   46 ---------------------
 2 files changed, 33 insertions(+), 55 deletions(-)

diff --git a/arch/arm/boot/dts/sh7372-mackerel-reference.dts b/arch/arm/boot/dts/sh7372-mackerel-reference.dts
index 2fd1eff..aa72309 100644
--- a/arch/arm/boot/dts/sh7372-mackerel-reference.dts
+++ b/arch/arm/boot/dts/sh7372-mackerel-reference.dts
@@ -75,6 +75,11 @@
 		interrupt-parent = <&intca>;
 		interrupts = <0x1ac0 0x1ae0>;
 		vmmc-supply = <&reg_1p8v>;
+		bus-width = <8>;
+		cd-gpios = <&gpio 41 1>;
+		broken-cd;
+		pinctrl-names = "default";
+		pinctrl-0 = <&mmc0_pins>;
 	};
 
 	sdhi0: sdhi@0xe6850000 {
@@ -83,22 +88,26 @@
 		interrupt-parent = <&intca>;
 		interrupts = <0x0e00 0x0e20 0x0e40>;
 		vmmc-supply = <&reg_3p3v>;
-	};
-
-	sdhi1: sdhi@0xe6860000 {
-		compatible = "renesas,shmobile-sdhi";
-		reg = <0xe6860000 0x100>;
-		interrupt-parent = <&intca>;
-		interrupts = <0x0e80 0x0ea0 0x0ec0>;
-		vmmc-supply = <&reg_1p8v>;
+		bus-width = <4>;
+		cd-gpios = <&gpio 172 1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdhi0_pins>;
+		toshiba,mmc-cap-sdio-irq;
 	};
 
 	sdhi2: sdhi@0xe6870000 {
 		compatible = "renesas,shmobile-sdhi";
 		reg = <0xe6870000 0x100>;
 		interrupt-parent = <&intca>;
-		interrupts = <0x1200 0x1220 0x1240>;
+		interrupts = <0x1220 0x1240>;
 		vmmc-supply = <&reg_3p3v>;
+		bus-width = <4>;
+		cd-gpios = <&gpio 162 1>;
+		broken-cd;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdhi2_pins>;
+		toshiba,mmc-wrprotect-disable;
+		toshiba,mmc-cap-sdio-irq;
 	};
 
 	flash@2000000 {
@@ -129,3 +138,18 @@
 		};
 	};
 };
+
+&gpio {
+	sdhi0_pins: pfc_sdhi0_pins {
+		renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
+		renesas,function = "sdhi0";
+	};
+	sdhi2_pins: pfc_sdhi2_pins {
+		renesas,pins = "sdhi2_data4", "sdhi2_ctrl";
+		renesas,function = "sdhi2";
+	};
+	mmc0_pins: pfc_mmc0_pins {
+		renesas,pins = "mmc0_data8_0", "mmc0_ctrl_0";
+		renesas,function = "mmc0";
+	};
+};
diff --git a/arch/arm/mach-shmobile/board-mackerel-reference.c b/arch/arm/mach-shmobile/board-mackerel-reference.c
index 1d83653..323a812 100644
--- a/arch/arm/mach-shmobile/board-mackerel-reference.c
+++ b/arch/arm/mach-shmobile/board-mackerel-reference.c
@@ -42,8 +42,6 @@ static void __init mackerel_init(void)
 	/* External clock source */
 	clk_set_rate(&sh7372_dv_clki_clk, 27000000);
 
-	sh7372_pinmux_init();
-
 	/* enable SCIFA0 */
 	gpio_request(GPIO_FN_SCIFA0_TXD, NULL);
 	gpio_request(GPIO_FN_SCIFA0_RXD, NULL);
@@ -59,50 +57,6 @@ static void __init mackerel_init(void)
 	/* enable Accelerometer */
 	gpio_request(GPIO_FN_IRQ21,	NULL);
 	irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
-
-	/* enable SDHI0 */
-	gpio_request(GPIO_FN_SDHIWP0, NULL);
-	gpio_request(GPIO_FN_SDHICMD0, NULL);
-	gpio_request(GPIO_FN_SDHICLK0, NULL);
-	gpio_request(GPIO_FN_SDHID0_3, NULL);
-	gpio_request(GPIO_FN_SDHID0_2, NULL);
-	gpio_request(GPIO_FN_SDHID0_1, NULL);
-	gpio_request(GPIO_FN_SDHID0_0, NULL);
-
-	/* SDHI0 PORT172 card-detect IRQ26 */
-	gpio_request(GPIO_FN_IRQ26_172, NULL);
-
-	/* enable SDHI1 */
-	gpio_request(GPIO_FN_SDHICMD1, NULL);
-	gpio_request(GPIO_FN_SDHICLK1, NULL);
-	gpio_request(GPIO_FN_SDHID1_3, NULL);
-	gpio_request(GPIO_FN_SDHID1_2, NULL);
-	gpio_request(GPIO_FN_SDHID1_1, NULL);
-	gpio_request(GPIO_FN_SDHID1_0, NULL);
-
-	/* enable SDHI2 */
-	gpio_request(GPIO_FN_SDHICMD2, NULL);
-	gpio_request(GPIO_FN_SDHICLK2, NULL);
-	gpio_request(GPIO_FN_SDHID2_3, NULL);
-	gpio_request(GPIO_FN_SDHID2_2, NULL);
-	gpio_request(GPIO_FN_SDHID2_1, NULL);
-	gpio_request(GPIO_FN_SDHID2_0, NULL);
-
-	/* card detect pin for microSD slot (CN23) */
-	gpio_request(GPIO_PORT162, NULL);
-	gpio_direction_input(GPIO_PORT162);
-
-	/* MMCIF */
-	gpio_request(GPIO_FN_MMCD0_0, NULL);
-	gpio_request(GPIO_FN_MMCD0_1, NULL);
-	gpio_request(GPIO_FN_MMCD0_2, NULL);
-	gpio_request(GPIO_FN_MMCD0_3, NULL);
-	gpio_request(GPIO_FN_MMCD0_4, NULL);
-	gpio_request(GPIO_FN_MMCD0_5, NULL);
-	gpio_request(GPIO_FN_MMCD0_6, NULL);
-	gpio_request(GPIO_FN_MMCD0_7, NULL);
-	gpio_request(GPIO_FN_MMCCMD0, NULL);
-	gpio_request(GPIO_FN_MMCCLK0, NULL);
 }
 
 static const char *mackerel_compat_dt[] __initdata = {
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 7/8] ARM: shmobile: completely switch MMC interfaces on mackerel-reference to DT
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Switch MMCIF, SDHI0 and SDHI2 to complete DT initialisation: use DT
bindings to configure interface pins, card-detect GPIOs, various
interface configuration parameters. Notice, since MMCIF and SDHI1 share
the same card slot, both devices cannot be successfully probed
simultaneously: they both would try to get the card-detection GPIO and only
one would succeed. Ideally it should be possible to let the user decide
which device to enable by, possibly, patching the DT at run-time. As long as
this is unsupported, we choose to enable MMCIF and remove SDHI1 from DT
completely.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 arch/arm/boot/dts/sh7372-mackerel-reference.dts   |   42 +++++++++++++++----
 arch/arm/mach-shmobile/board-mackerel-reference.c |   46 ---------------------
 2 files changed, 33 insertions(+), 55 deletions(-)

diff --git a/arch/arm/boot/dts/sh7372-mackerel-reference.dts b/arch/arm/boot/dts/sh7372-mackerel-reference.dts
index 2fd1eff..aa72309 100644
--- a/arch/arm/boot/dts/sh7372-mackerel-reference.dts
+++ b/arch/arm/boot/dts/sh7372-mackerel-reference.dts
@@ -75,6 +75,11 @@
 		interrupt-parent = <&intca>;
 		interrupts = <0x1ac0 0x1ae0>;
 		vmmc-supply = <&reg_1p8v>;
+		bus-width = <8>;
+		cd-gpios = <&gpio 41 1>;
+		broken-cd;
+		pinctrl-names = "default";
+		pinctrl-0 = <&mmc0_pins>;
 	};
 
 	sdhi0: sdhi at 0xe6850000 {
@@ -83,22 +88,26 @@
 		interrupt-parent = <&intca>;
 		interrupts = <0x0e00 0x0e20 0x0e40>;
 		vmmc-supply = <&reg_3p3v>;
-	};
-
-	sdhi1: sdhi at 0xe6860000 {
-		compatible = "renesas,shmobile-sdhi";
-		reg = <0xe6860000 0x100>;
-		interrupt-parent = <&intca>;
-		interrupts = <0x0e80 0x0ea0 0x0ec0>;
-		vmmc-supply = <&reg_1p8v>;
+		bus-width = <4>;
+		cd-gpios = <&gpio 172 1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdhi0_pins>;
+		toshiba,mmc-cap-sdio-irq;
 	};
 
 	sdhi2: sdhi at 0xe6870000 {
 		compatible = "renesas,shmobile-sdhi";
 		reg = <0xe6870000 0x100>;
 		interrupt-parent = <&intca>;
-		interrupts = <0x1200 0x1220 0x1240>;
+		interrupts = <0x1220 0x1240>;
 		vmmc-supply = <&reg_3p3v>;
+		bus-width = <4>;
+		cd-gpios = <&gpio 162 1>;
+		broken-cd;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdhi2_pins>;
+		toshiba,mmc-wrprotect-disable;
+		toshiba,mmc-cap-sdio-irq;
 	};
 
 	flash at 2000000 {
@@ -129,3 +138,18 @@
 		};
 	};
 };
+
+&gpio {
+	sdhi0_pins: pfc_sdhi0_pins {
+		renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
+		renesas,function = "sdhi0";
+	};
+	sdhi2_pins: pfc_sdhi2_pins {
+		renesas,pins = "sdhi2_data4", "sdhi2_ctrl";
+		renesas,function = "sdhi2";
+	};
+	mmc0_pins: pfc_mmc0_pins {
+		renesas,pins = "mmc0_data8_0", "mmc0_ctrl_0";
+		renesas,function = "mmc0";
+	};
+};
diff --git a/arch/arm/mach-shmobile/board-mackerel-reference.c b/arch/arm/mach-shmobile/board-mackerel-reference.c
index 1d83653..323a812 100644
--- a/arch/arm/mach-shmobile/board-mackerel-reference.c
+++ b/arch/arm/mach-shmobile/board-mackerel-reference.c
@@ -42,8 +42,6 @@ static void __init mackerel_init(void)
 	/* External clock source */
 	clk_set_rate(&sh7372_dv_clki_clk, 27000000);
 
-	sh7372_pinmux_init();
-
 	/* enable SCIFA0 */
 	gpio_request(GPIO_FN_SCIFA0_TXD, NULL);
 	gpio_request(GPIO_FN_SCIFA0_RXD, NULL);
@@ -59,50 +57,6 @@ static void __init mackerel_init(void)
 	/* enable Accelerometer */
 	gpio_request(GPIO_FN_IRQ21,	NULL);
 	irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
-
-	/* enable SDHI0 */
-	gpio_request(GPIO_FN_SDHIWP0, NULL);
-	gpio_request(GPIO_FN_SDHICMD0, NULL);
-	gpio_request(GPIO_FN_SDHICLK0, NULL);
-	gpio_request(GPIO_FN_SDHID0_3, NULL);
-	gpio_request(GPIO_FN_SDHID0_2, NULL);
-	gpio_request(GPIO_FN_SDHID0_1, NULL);
-	gpio_request(GPIO_FN_SDHID0_0, NULL);
-
-	/* SDHI0 PORT172 card-detect IRQ26 */
-	gpio_request(GPIO_FN_IRQ26_172, NULL);
-
-	/* enable SDHI1 */
-	gpio_request(GPIO_FN_SDHICMD1, NULL);
-	gpio_request(GPIO_FN_SDHICLK1, NULL);
-	gpio_request(GPIO_FN_SDHID1_3, NULL);
-	gpio_request(GPIO_FN_SDHID1_2, NULL);
-	gpio_request(GPIO_FN_SDHID1_1, NULL);
-	gpio_request(GPIO_FN_SDHID1_0, NULL);
-
-	/* enable SDHI2 */
-	gpio_request(GPIO_FN_SDHICMD2, NULL);
-	gpio_request(GPIO_FN_SDHICLK2, NULL);
-	gpio_request(GPIO_FN_SDHID2_3, NULL);
-	gpio_request(GPIO_FN_SDHID2_2, NULL);
-	gpio_request(GPIO_FN_SDHID2_1, NULL);
-	gpio_request(GPIO_FN_SDHID2_0, NULL);
-
-	/* card detect pin for microSD slot (CN23) */
-	gpio_request(GPIO_PORT162, NULL);
-	gpio_direction_input(GPIO_PORT162);
-
-	/* MMCIF */
-	gpio_request(GPIO_FN_MMCD0_0, NULL);
-	gpio_request(GPIO_FN_MMCD0_1, NULL);
-	gpio_request(GPIO_FN_MMCD0_2, NULL);
-	gpio_request(GPIO_FN_MMCD0_3, NULL);
-	gpio_request(GPIO_FN_MMCD0_4, NULL);
-	gpio_request(GPIO_FN_MMCD0_5, NULL);
-	gpio_request(GPIO_FN_MMCD0_6, NULL);
-	gpio_request(GPIO_FN_MMCD0_7, NULL);
-	gpio_request(GPIO_FN_MMCCMD0, NULL);
-	gpio_request(GPIO_FN_MMCCLK0, NULL);
 }
 
 static const char *mackerel_compat_dt[] __initdata = {
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT
  2013-01-23 16:37 ` Guennadi Liakhovetski
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Switch MMCIF, SDHI0 and SDHI1 to complete DT initialisation: use DT
bindings to configure regulators, interface pins, card-detect GPIOs,
various interface configuration parameters.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

v3: add missing regulator and SDHI properties

 .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 ++++++++++++++++++++
 .../board-armadillo800eva-reference.c              |    5 +-
 2 files changed, 109 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
index 319af9b..11cb0f9 100644
--- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
@@ -30,4 +30,111 @@
 		sh-eth,register-type = "gigabit";
 		sh-eth,phy-id = <0>;
 	};
+
+	reg_3p3v: regulator@0 {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
+	mmcif0: mmcif@0xe6bd0000 {
+		compatible = "renesas,sh-mmcif", "renesas,sh7372-mmcif";
+		reg = <0xe6bd0000 0x100>;
+		interrupt-parent = <&intca>;
+		interrupts = <0x1ac0 0x1ae0>;
+		vmmc-supply = <&reg_3p3v>;
+		bus-width = <8>;
+		non-removable;
+		pinctrl-names = "default";
+		pinctrl-0 = <&mmc0_pins>;
+	};
+
+	vcc_sdhi0: regulator@1 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "vcc-sdhi0";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&gpio 75 0>;
+		enable-active-high;
+	};
+
+	vcc_sdhi1: regulator@2 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "vcc-sdhi1";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&gpio 16 0>;
+		enable-active-high;
+	};
+
+	vccq_sdhi0: gpio-regulator@0 {
+		compatible = "regulator-gpio";
+
+		regulator-name = "vccq-sdhi0";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&vcc_sdhi0>;
+
+		enable-gpio = <&gpio 74 0>;
+		gpios = <&gpio 17 0>;
+		states = <3300000 0
+			  1800000 1>;
+
+		enable-active-high;
+	};
+
+	sdhi0: sdhi@0xe6850000 {
+		compatible = "renesas,shmobile-sdhi";
+		reg = <0xe6850000 0x100>;
+		interrupt-parent = <&intca>;
+		interrupts = <0xe20 0xe40>;
+		vmmc-supply = <&vcc_sdhi0>;
+		vqmmc-supply = <&vccq_sdhi0>;
+		bus-width = <4>;
+		cd-gpios = <&gpio 167 1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdhi0_pins>;
+		cap-sd-highspeed;
+		cap-power-off-card;
+		toshiba,mmc-has-idle-wait;
+		toshiba,mmc-cap-sdio-irq;
+	};
+
+	sdhi1: sdhi@0xe6860000 {
+		compatible = "renesas,shmobile-sdhi";
+		reg = <0xe6860000 0x100>;
+		interrupt-parent = <&intca>;
+		interrupts = <0xea0 0xec0>;
+		vmmc-supply = <&vcc_sdhi1>;
+		bus-width = <4>;
+		cd-gpios = <&gpio 72 1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdhi1_pins>;
+		cap-sd-highspeed;
+		cap-power-off-card;
+		toshiba,mmc-has-idle-wait;
+		toshiba,mmc-cap-sdio-irq;
+	};
+};
+
+&gpio {
+	sdhi0_pins: pfc_sdhi0_pins {
+		renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
+		renesas,function = "sdhi0";
+	};
+	sdhi1_pins: pfc_sdhi1_pins {
+		renesas,pins = "sdhi1_data4", "sdhi1_ctrl", "sdhi1_wp";
+		renesas,function = "sdhi1";
+	};
+	mmc0_pins: pfc_mmc0_pins {
+		renesas,pins = "mmc0_data8_1", "mmc0_ctrl_1";
+		renesas,function = "mmc0";
+	};
 };
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
index c206612..f929931 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
@@ -107,9 +107,10 @@
  */
 static void __init eva_init(void)
 {
-	r8a7740_pinmux_init();
 	r8a7740_meram_workaround();
 
+	r8a7740_add_standard_devices_dt();
+
 	/* SCIFA1 */
 	gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
 	gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
@@ -142,8 +143,6 @@ static void __init eva_init(void)
 	/* Early BRESP enable, Shared attribute override enable, 32K*8way */
 	l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
 #endif
-
-	r8a7740_add_standard_devices_dt();
 }
 
 #define RESCNT2 IOMEM(0xe6188020)
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT
@ 2013-01-23 16:37   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-01-23 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Switch MMCIF, SDHI0 and SDHI1 to complete DT initialisation: use DT
bindings to configure regulators, interface pins, card-detect GPIOs,
various interface configuration parameters.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

v3: add missing regulator and SDHI properties

 .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 ++++++++++++++++++++
 .../board-armadillo800eva-reference.c              |    5 +-
 2 files changed, 109 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
index 319af9b..11cb0f9 100644
--- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
@@ -30,4 +30,111 @@
 		sh-eth,register-type = "gigabit";
 		sh-eth,phy-id = <0>;
 	};
+
+	reg_3p3v: regulator at 0 {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
+	mmcif0: mmcif at 0xe6bd0000 {
+		compatible = "renesas,sh-mmcif", "renesas,sh7372-mmcif";
+		reg = <0xe6bd0000 0x100>;
+		interrupt-parent = <&intca>;
+		interrupts = <0x1ac0 0x1ae0>;
+		vmmc-supply = <&reg_3p3v>;
+		bus-width = <8>;
+		non-removable;
+		pinctrl-names = "default";
+		pinctrl-0 = <&mmc0_pins>;
+	};
+
+	vcc_sdhi0: regulator at 1 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "vcc-sdhi0";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&gpio 75 0>;
+		enable-active-high;
+	};
+
+	vcc_sdhi1: regulator at 2 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "vcc-sdhi1";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&gpio 16 0>;
+		enable-active-high;
+	};
+
+	vccq_sdhi0: gpio-regulator at 0 {
+		compatible = "regulator-gpio";
+
+		regulator-name = "vccq-sdhi0";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&vcc_sdhi0>;
+
+		enable-gpio = <&gpio 74 0>;
+		gpios = <&gpio 17 0>;
+		states = <3300000 0
+			  1800000 1>;
+
+		enable-active-high;
+	};
+
+	sdhi0: sdhi at 0xe6850000 {
+		compatible = "renesas,shmobile-sdhi";
+		reg = <0xe6850000 0x100>;
+		interrupt-parent = <&intca>;
+		interrupts = <0xe20 0xe40>;
+		vmmc-supply = <&vcc_sdhi0>;
+		vqmmc-supply = <&vccq_sdhi0>;
+		bus-width = <4>;
+		cd-gpios = <&gpio 167 1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdhi0_pins>;
+		cap-sd-highspeed;
+		cap-power-off-card;
+		toshiba,mmc-has-idle-wait;
+		toshiba,mmc-cap-sdio-irq;
+	};
+
+	sdhi1: sdhi at 0xe6860000 {
+		compatible = "renesas,shmobile-sdhi";
+		reg = <0xe6860000 0x100>;
+		interrupt-parent = <&intca>;
+		interrupts = <0xea0 0xec0>;
+		vmmc-supply = <&vcc_sdhi1>;
+		bus-width = <4>;
+		cd-gpios = <&gpio 72 1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdhi1_pins>;
+		cap-sd-highspeed;
+		cap-power-off-card;
+		toshiba,mmc-has-idle-wait;
+		toshiba,mmc-cap-sdio-irq;
+	};
+};
+
+&gpio {
+	sdhi0_pins: pfc_sdhi0_pins {
+		renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
+		renesas,function = "sdhi0";
+	};
+	sdhi1_pins: pfc_sdhi1_pins {
+		renesas,pins = "sdhi1_data4", "sdhi1_ctrl", "sdhi1_wp";
+		renesas,function = "sdhi1";
+	};
+	mmc0_pins: pfc_mmc0_pins {
+		renesas,pins = "mmc0_data8_1", "mmc0_ctrl_1";
+		renesas,function = "mmc0";
+	};
 };
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
index c206612..f929931 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
@@ -107,9 +107,10 @@
  */
 static void __init eva_init(void)
 {
-	r8a7740_pinmux_init();
 	r8a7740_meram_workaround();
 
+	r8a7740_add_standard_devices_dt();
+
 	/* SCIFA1 */
 	gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
 	gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
@@ -142,8 +143,6 @@ static void __init eva_init(void)
 	/* Early BRESP enable, Shared attribute override enable, 32K*8way */
 	l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
 #endif
-
-	r8a7740_add_standard_devices_dt();
 }
 
 #define RESCNT2 IOMEM(0xe6188020)
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [PATCH v3 0/8] ARM: shmobile: pinctrl and DT extensions
  2013-01-23 16:37 ` Guennadi Liakhovetski
@ 2013-01-24 10:23   ` Laurent Pinchart
  -1 siblings, 0 replies; 32+ messages in thread
From: Laurent Pinchart @ 2013-01-24 10:23 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Guennadi,

Thanks for the patches.

For the whole set,

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

On Wednesday 23 January 2013 17:37:43 Guennadi Liakhovetski wrote:
> This is v3 of the patch series [1], addressing minor issues in 3 out of 8
> patches.
> 
> [1] http://thread.gmane.org/gmane.linux.ports.sh.devel/18729
> 
> Guennadi Liakhovetski (8):
>   pinctrl: add SDHI and MMCIF pin groups to r8a7740
>   pinctrl: add SDHI and MMCIF pin groups to sh7372
>   ARM: shmobile: simplify armadillo800eva and kzm9g Kconfig
>     dependencies
>   ARM: shmobile: add MMCIF and SDHI DT clock aliases to sh73a0 and
>     r8a7740
>   ARM: shmobile: add a GPIO controller DT node for sh7372
>   ARM: shmobile: use GPIO SD-card detection on armadillo800eva
>   ARM: shmobile: completely switch MMC interfaces on mackerel-reference
>     to DT
>   ARM: shmobile: completely switch MMC interfaces on
>     armadillo800eva-reference to DT
> 
>  .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 +++++++++
>  arch/arm/boot/dts/sh7372-mackerel-reference.dts    |   42 +++-
>  arch/arm/boot/dts/sh7372.dtsi                      |    8 +
>  arch/arm/mach-shmobile/Kconfig                     |   12 +-
>  .../board-armadillo800eva-reference.c              |    5 +-
>  arch/arm/mach-shmobile/board-armadillo800eva.c     |   10 +-
>  arch/arm/mach-shmobile/board-mackerel-reference.c  |   46 ----
>  arch/arm/mach-shmobile/clock-r8a7740.c             |    4 +
>  arch/arm/mach-shmobile/clock-sh73a0.c              |    3 +
>  drivers/pinctrl/sh-pfc/pfc-r8a7740.c               |  248 +++++++++++++++++
>  drivers/pinctrl/sh-pfc/pfc-sh7372.c                |  205 ++++++++++++++++
>  11 files changed, 626 insertions(+), 64 deletions(-)

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v3 0/8] ARM: shmobile: pinctrl and DT extensions
@ 2013-01-24 10:23   ` Laurent Pinchart
  0 siblings, 0 replies; 32+ messages in thread
From: Laurent Pinchart @ 2013-01-24 10:23 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Guennadi,

Thanks for the patches.

For the whole set,

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

On Wednesday 23 January 2013 17:37:43 Guennadi Liakhovetski wrote:
> This is v3 of the patch series [1], addressing minor issues in 3 out of 8
> patches.
> 
> [1] http://thread.gmane.org/gmane.linux.ports.sh.devel/18729
> 
> Guennadi Liakhovetski (8):
>   pinctrl: add SDHI and MMCIF pin groups to r8a7740
>   pinctrl: add SDHI and MMCIF pin groups to sh7372
>   ARM: shmobile: simplify armadillo800eva and kzm9g Kconfig
>     dependencies
>   ARM: shmobile: add MMCIF and SDHI DT clock aliases to sh73a0 and
>     r8a7740
>   ARM: shmobile: add a GPIO controller DT node for sh7372
>   ARM: shmobile: use GPIO SD-card detection on armadillo800eva
>   ARM: shmobile: completely switch MMC interfaces on mackerel-reference
>     to DT
>   ARM: shmobile: completely switch MMC interfaces on
>     armadillo800eva-reference to DT
> 
>  .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 +++++++++
>  arch/arm/boot/dts/sh7372-mackerel-reference.dts    |   42 +++-
>  arch/arm/boot/dts/sh7372.dtsi                      |    8 +
>  arch/arm/mach-shmobile/Kconfig                     |   12 +-
>  .../board-armadillo800eva-reference.c              |    5 +-
>  arch/arm/mach-shmobile/board-armadillo800eva.c     |   10 +-
>  arch/arm/mach-shmobile/board-mackerel-reference.c  |   46 ----
>  arch/arm/mach-shmobile/clock-r8a7740.c             |    4 +
>  arch/arm/mach-shmobile/clock-sh73a0.c              |    3 +
>  drivers/pinctrl/sh-pfc/pfc-r8a7740.c               |  248 +++++++++++++++++
>  drivers/pinctrl/sh-pfc/pfc-sh7372.c                |  205 ++++++++++++++++
>  11 files changed, 626 insertions(+), 64 deletions(-)

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v3 1/8] pinctrl: add SDHI and MMCIF pin groups to r8a7740
  2013-01-23 16:37   ` Guennadi Liakhovetski
@ 2013-01-25 10:37     ` Linus Walleij
  -1 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2013-01-25 10:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 23, 2013 at 5:37 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:

> Add pin groups for the first two SDHI interfaces and two alternative pin
> groups for the MMCIF interface on the r8a7740 SoC.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

The series:
Acked-by: Linus Walleij <linus.walleij@linaro.org>

(For those not already ACKed.)

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v3 1/8] pinctrl: add SDHI and MMCIF pin groups to r8a7740
@ 2013-01-25 10:37     ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2013-01-25 10:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 23, 2013 at 5:37 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:

> Add pin groups for the first two SDHI interfaces and two alternative pin
> groups for the MMCIF interface on the r8a7740 SoC.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

The series:
Acked-by: Linus Walleij <linus.walleij@linaro.org>

(For those not already ACKed.)

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to D
  2013-01-23 16:37   ` Guennadi Liakhovetski
@ 2013-02-18 19:10     ` Bastian Hecht
  -1 siblings, 0 replies; 32+ messages in thread
From: Bastian Hecht @ 2013-02-18 19:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I'm looking for a branch to test out my new SCI DT version on my
Armadillo. I saw that topic/intc-of features the armadillo-reference
implementation so I wanted to use that. But "make dtbs" fails with:

Error: arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:152.2-3
label or path, 'gpio', not found
FATAL ERROR: Syntax error parsing input tree

The error is introduced by this commit. I'm unsure if it is the patch
itself or the branch stacking though.

Thanks,

 Bastian


2013/1/23 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> Switch MMCIF, SDHI0 and SDHI1 to complete DT initialisation: use DT
> bindings to configure regulators, interface pins, card-detect GPIOs,
> various interface configuration parameters.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>
> v3: add missing regulator and SDHI properties
>
>  .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 ++++++++++++++++++++
>  .../board-armadillo800eva-reference.c              |    5 +-
>  2 files changed, 109 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> index 319af9b..11cb0f9 100644
> --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> @@ -30,4 +30,111 @@
>                 sh-eth,register-type = "gigabit";
>                 sh-eth,phy-id = <0>;
>         };
> +
> +       reg_3p3v: regulator@0 {
> +               compatible = "regulator-fixed";
> +               regulator-name = "fixed-3.3V";
> +               regulator-min-microvolt = <3300000>;
> +               regulator-max-microvolt = <3300000>;
> +               regulator-always-on;
> +               regulator-boot-on;
> +       };
> +
> +       mmcif0: mmcif@0xe6bd0000 {
> +               compatible = "renesas,sh-mmcif", "renesas,sh7372-mmcif";
> +               reg = <0xe6bd0000 0x100>;
> +               interrupt-parent = <&intca>;
> +               interrupts = <0x1ac0 0x1ae0>;
> +               vmmc-supply = <&reg_3p3v>;
> +               bus-width = <8>;
> +               non-removable;
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&mmc0_pins>;
> +       };
> +
> +       vcc_sdhi0: regulator@1 {
> +               compatible = "regulator-fixed";
> +
> +               regulator-name = "vcc-sdhi0";
> +               regulator-min-microvolt = <3300000>;
> +               regulator-max-microvolt = <3300000>;
> +
> +               gpio = <&gpio 75 0>;
> +               enable-active-high;
> +       };
> +
> +       vcc_sdhi1: regulator@2 {
> +               compatible = "regulator-fixed";
> +
> +               regulator-name = "vcc-sdhi1";
> +               regulator-min-microvolt = <3300000>;
> +               regulator-max-microvolt = <3300000>;
> +
> +               gpio = <&gpio 16 0>;
> +               enable-active-high;
> +       };
> +
> +       vccq_sdhi0: gpio-regulator@0 {
> +               compatible = "regulator-gpio";
> +
> +               regulator-name = "vccq-sdhi0";
> +               regulator-min-microvolt = <1800000>;
> +               regulator-max-microvolt = <3300000>;
> +               vin-supply = <&vcc_sdhi0>;
> +
> +               enable-gpio = <&gpio 74 0>;
> +               gpios = <&gpio 17 0>;
> +               states = <3300000 0
> +                         1800000 1>;
> +
> +               enable-active-high;
> +       };
> +
> +       sdhi0: sdhi@0xe6850000 {
> +               compatible = "renesas,shmobile-sdhi";
> +               reg = <0xe6850000 0x100>;
> +               interrupt-parent = <&intca>;
> +               interrupts = <0xe20 0xe40>;
> +               vmmc-supply = <&vcc_sdhi0>;
> +               vqmmc-supply = <&vccq_sdhi0>;
> +               bus-width = <4>;
> +               cd-gpios = <&gpio 167 1>;
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&sdhi0_pins>;
> +               cap-sd-highspeed;
> +               cap-power-off-card;
> +               toshiba,mmc-has-idle-wait;
> +               toshiba,mmc-cap-sdio-irq;
> +       };
> +
> +       sdhi1: sdhi@0xe6860000 {
> +               compatible = "renesas,shmobile-sdhi";
> +               reg = <0xe6860000 0x100>;
> +               interrupt-parent = <&intca>;
> +               interrupts = <0xea0 0xec0>;
> +               vmmc-supply = <&vcc_sdhi1>;
> +               bus-width = <4>;
> +               cd-gpios = <&gpio 72 1>;
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&sdhi1_pins>;
> +               cap-sd-highspeed;
> +               cap-power-off-card;
> +               toshiba,mmc-has-idle-wait;
> +               toshiba,mmc-cap-sdio-irq;
> +       };
> +};
> +
> +&gpio {
> +       sdhi0_pins: pfc_sdhi0_pins {
> +               renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
> +               renesas,function = "sdhi0";
> +       };
> +       sdhi1_pins: pfc_sdhi1_pins {
> +               renesas,pins = "sdhi1_data4", "sdhi1_ctrl", "sdhi1_wp";
> +               renesas,function = "sdhi1";
> +       };
> +       mmc0_pins: pfc_mmc0_pins {
> +               renesas,pins = "mmc0_data8_1", "mmc0_ctrl_1";
> +               renesas,function = "mmc0";
> +       };
>  };
> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
> index c206612..f929931 100644
> --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
> +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
> @@ -107,9 +107,10 @@
>   */
>  static void __init eva_init(void)
>  {
> -       r8a7740_pinmux_init();
>         r8a7740_meram_workaround();
>
> +       r8a7740_add_standard_devices_dt();
> +
>         /* SCIFA1 */
>         gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
>         gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
> @@ -142,8 +143,6 @@ static void __init eva_init(void)
>         /* Early BRESP enable, Shared attribute override enable, 32K*8way */
>         l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
>  #endif
> -
> -       r8a7740_add_standard_devices_dt();
>  }
>
>  #define RESCNT2 IOMEM(0xe6188020)
> --
> 1.7.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT
@ 2013-02-18 19:10     ` Bastian Hecht
  0 siblings, 0 replies; 32+ messages in thread
From: Bastian Hecht @ 2013-02-18 19:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I'm looking for a branch to test out my new SCI DT version on my
Armadillo. I saw that topic/intc-of features the armadillo-reference
implementation so I wanted to use that. But "make dtbs" fails with:

Error: arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:152.2-3
label or path, 'gpio', not found
FATAL ERROR: Syntax error parsing input tree

The error is introduced by this commit. I'm unsure if it is the patch
itself or the branch stacking though.

Thanks,

 Bastian


2013/1/23 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> Switch MMCIF, SDHI0 and SDHI1 to complete DT initialisation: use DT
> bindings to configure regulators, interface pins, card-detect GPIOs,
> various interface configuration parameters.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>
> v3: add missing regulator and SDHI properties
>
>  .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 ++++++++++++++++++++
>  .../board-armadillo800eva-reference.c              |    5 +-
>  2 files changed, 109 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> index 319af9b..11cb0f9 100644
> --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> @@ -30,4 +30,111 @@
>                 sh-eth,register-type = "gigabit";
>                 sh-eth,phy-id = <0>;
>         };
> +
> +       reg_3p3v: regulator at 0 {
> +               compatible = "regulator-fixed";
> +               regulator-name = "fixed-3.3V";
> +               regulator-min-microvolt = <3300000>;
> +               regulator-max-microvolt = <3300000>;
> +               regulator-always-on;
> +               regulator-boot-on;
> +       };
> +
> +       mmcif0: mmcif at 0xe6bd0000 {
> +               compatible = "renesas,sh-mmcif", "renesas,sh7372-mmcif";
> +               reg = <0xe6bd0000 0x100>;
> +               interrupt-parent = <&intca>;
> +               interrupts = <0x1ac0 0x1ae0>;
> +               vmmc-supply = <&reg_3p3v>;
> +               bus-width = <8>;
> +               non-removable;
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&mmc0_pins>;
> +       };
> +
> +       vcc_sdhi0: regulator at 1 {
> +               compatible = "regulator-fixed";
> +
> +               regulator-name = "vcc-sdhi0";
> +               regulator-min-microvolt = <3300000>;
> +               regulator-max-microvolt = <3300000>;
> +
> +               gpio = <&gpio 75 0>;
> +               enable-active-high;
> +       };
> +
> +       vcc_sdhi1: regulator at 2 {
> +               compatible = "regulator-fixed";
> +
> +               regulator-name = "vcc-sdhi1";
> +               regulator-min-microvolt = <3300000>;
> +               regulator-max-microvolt = <3300000>;
> +
> +               gpio = <&gpio 16 0>;
> +               enable-active-high;
> +       };
> +
> +       vccq_sdhi0: gpio-regulator at 0 {
> +               compatible = "regulator-gpio";
> +
> +               regulator-name = "vccq-sdhi0";
> +               regulator-min-microvolt = <1800000>;
> +               regulator-max-microvolt = <3300000>;
> +               vin-supply = <&vcc_sdhi0>;
> +
> +               enable-gpio = <&gpio 74 0>;
> +               gpios = <&gpio 17 0>;
> +               states = <3300000 0
> +                         1800000 1>;
> +
> +               enable-active-high;
> +       };
> +
> +       sdhi0: sdhi at 0xe6850000 {
> +               compatible = "renesas,shmobile-sdhi";
> +               reg = <0xe6850000 0x100>;
> +               interrupt-parent = <&intca>;
> +               interrupts = <0xe20 0xe40>;
> +               vmmc-supply = <&vcc_sdhi0>;
> +               vqmmc-supply = <&vccq_sdhi0>;
> +               bus-width = <4>;
> +               cd-gpios = <&gpio 167 1>;
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&sdhi0_pins>;
> +               cap-sd-highspeed;
> +               cap-power-off-card;
> +               toshiba,mmc-has-idle-wait;
> +               toshiba,mmc-cap-sdio-irq;
> +       };
> +
> +       sdhi1: sdhi at 0xe6860000 {
> +               compatible = "renesas,shmobile-sdhi";
> +               reg = <0xe6860000 0x100>;
> +               interrupt-parent = <&intca>;
> +               interrupts = <0xea0 0xec0>;
> +               vmmc-supply = <&vcc_sdhi1>;
> +               bus-width = <4>;
> +               cd-gpios = <&gpio 72 1>;
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&sdhi1_pins>;
> +               cap-sd-highspeed;
> +               cap-power-off-card;
> +               toshiba,mmc-has-idle-wait;
> +               toshiba,mmc-cap-sdio-irq;
> +       };
> +};
> +
> +&gpio {
> +       sdhi0_pins: pfc_sdhi0_pins {
> +               renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
> +               renesas,function = "sdhi0";
> +       };
> +       sdhi1_pins: pfc_sdhi1_pins {
> +               renesas,pins = "sdhi1_data4", "sdhi1_ctrl", "sdhi1_wp";
> +               renesas,function = "sdhi1";
> +       };
> +       mmc0_pins: pfc_mmc0_pins {
> +               renesas,pins = "mmc0_data8_1", "mmc0_ctrl_1";
> +               renesas,function = "mmc0";
> +       };
>  };
> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
> index c206612..f929931 100644
> --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
> +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
> @@ -107,9 +107,10 @@
>   */
>  static void __init eva_init(void)
>  {
> -       r8a7740_pinmux_init();
>         r8a7740_meram_workaround();
>
> +       r8a7740_add_standard_devices_dt();
> +
>         /* SCIFA1 */
>         gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
>         gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
> @@ -142,8 +143,6 @@ static void __init eva_init(void)
>         /* Early BRESP enable, Shared attribute override enable, 32K*8way */
>         l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
>  #endif
> -
> -       r8a7740_add_standard_devices_dt();
>  }
>
>  #define RESCNT2 IOMEM(0xe6188020)
> --
> 1.7.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to D
  2013-02-18 19:10     ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT Bastian Hecht
@ 2013-02-18 19:34       ` Bastian Hecht
  -1 siblings, 0 replies; 32+ messages in thread
From: Bastian Hecht @ 2013-02-18 19:34 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

I got out of place by 1 commit in the intc-of branch:
It's "ARM: shmobile: move pin configuration on
armadillo800eva-reference to DT" not "ARM: shmobile: completely switch
MMC interfaces on armadillo800eva-reference to DT" that breaks "make
dtbs".

Thanks,

 Bastian


2013/2/18 Bastian Hecht <hechtb@gmail.com>:
> Hello,
>
> I'm looking for a branch to test out my new SCI DT version on my
> Armadillo. I saw that topic/intc-of features the armadillo-reference
> implementation so I wanted to use that. But "make dtbs" fails with:
>
> Error: arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:152.2-3
> label or path, 'gpio', not found
> FATAL ERROR: Syntax error parsing input tree
>
> The error is introduced by this commit. I'm unsure if it is the patch
> itself or the branch stacking though.
>
> Thanks,
>
>  Bastian
>
>
> 2013/1/23 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
>> Switch MMCIF, SDHI0 and SDHI1 to complete DT initialisation: use DT
>> bindings to configure regulators, interface pins, card-detect GPIOs,
>> various interface configuration parameters.
>>
>> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>> ---
>>
>> v3: add missing regulator and SDHI properties
>>
>>  .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 ++++++++++++++++++++
>>  .../board-armadillo800eva-reference.c              |    5 +-
>>  2 files changed, 109 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> index 319af9b..11cb0f9 100644
>> --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> @@ -30,4 +30,111 @@
>>                 sh-eth,register-type = "gigabit";
>>                 sh-eth,phy-id = <0>;
>>         };
>> +
>> +       reg_3p3v: regulator@0 {
>> +               compatible = "regulator-fixed";
>> +               regulator-name = "fixed-3.3V";
>> +               regulator-min-microvolt = <3300000>;
>> +               regulator-max-microvolt = <3300000>;
>> +               regulator-always-on;
>> +               regulator-boot-on;
>> +       };
>> +
>> +       mmcif0: mmcif@0xe6bd0000 {
>> +               compatible = "renesas,sh-mmcif", "renesas,sh7372-mmcif";
>> +               reg = <0xe6bd0000 0x100>;
>> +               interrupt-parent = <&intca>;
>> +               interrupts = <0x1ac0 0x1ae0>;
>> +               vmmc-supply = <&reg_3p3v>;
>> +               bus-width = <8>;
>> +               non-removable;
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&mmc0_pins>;
>> +       };
>> +
>> +       vcc_sdhi0: regulator@1 {
>> +               compatible = "regulator-fixed";
>> +
>> +               regulator-name = "vcc-sdhi0";
>> +               regulator-min-microvolt = <3300000>;
>> +               regulator-max-microvolt = <3300000>;
>> +
>> +               gpio = <&gpio 75 0>;
>> +               enable-active-high;
>> +       };
>> +
>> +       vcc_sdhi1: regulator@2 {
>> +               compatible = "regulator-fixed";
>> +
>> +               regulator-name = "vcc-sdhi1";
>> +               regulator-min-microvolt = <3300000>;
>> +               regulator-max-microvolt = <3300000>;
>> +
>> +               gpio = <&gpio 16 0>;
>> +               enable-active-high;
>> +       };
>> +
>> +       vccq_sdhi0: gpio-regulator@0 {
>> +               compatible = "regulator-gpio";
>> +
>> +               regulator-name = "vccq-sdhi0";
>> +               regulator-min-microvolt = <1800000>;
>> +               regulator-max-microvolt = <3300000>;
>> +               vin-supply = <&vcc_sdhi0>;
>> +
>> +               enable-gpio = <&gpio 74 0>;
>> +               gpios = <&gpio 17 0>;
>> +               states = <3300000 0
>> +                         1800000 1>;
>> +
>> +               enable-active-high;
>> +       };
>> +
>> +       sdhi0: sdhi@0xe6850000 {
>> +               compatible = "renesas,shmobile-sdhi";
>> +               reg = <0xe6850000 0x100>;
>> +               interrupt-parent = <&intca>;
>> +               interrupts = <0xe20 0xe40>;
>> +               vmmc-supply = <&vcc_sdhi0>;
>> +               vqmmc-supply = <&vccq_sdhi0>;
>> +               bus-width = <4>;
>> +               cd-gpios = <&gpio 167 1>;
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&sdhi0_pins>;
>> +               cap-sd-highspeed;
>> +               cap-power-off-card;
>> +               toshiba,mmc-has-idle-wait;
>> +               toshiba,mmc-cap-sdio-irq;
>> +       };
>> +
>> +       sdhi1: sdhi@0xe6860000 {
>> +               compatible = "renesas,shmobile-sdhi";
>> +               reg = <0xe6860000 0x100>;
>> +               interrupt-parent = <&intca>;
>> +               interrupts = <0xea0 0xec0>;
>> +               vmmc-supply = <&vcc_sdhi1>;
>> +               bus-width = <4>;
>> +               cd-gpios = <&gpio 72 1>;
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&sdhi1_pins>;
>> +               cap-sd-highspeed;
>> +               cap-power-off-card;
>> +               toshiba,mmc-has-idle-wait;
>> +               toshiba,mmc-cap-sdio-irq;
>> +       };
>> +};
>> +
>> +&gpio {
>> +       sdhi0_pins: pfc_sdhi0_pins {
>> +               renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
>> +               renesas,function = "sdhi0";
>> +       };
>> +       sdhi1_pins: pfc_sdhi1_pins {
>> +               renesas,pins = "sdhi1_data4", "sdhi1_ctrl", "sdhi1_wp";
>> +               renesas,function = "sdhi1";
>> +       };
>> +       mmc0_pins: pfc_mmc0_pins {
>> +               renesas,pins = "mmc0_data8_1", "mmc0_ctrl_1";
>> +               renesas,function = "mmc0";
>> +       };
>>  };
>> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> index c206612..f929931 100644
>> --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> @@ -107,9 +107,10 @@
>>   */
>>  static void __init eva_init(void)
>>  {
>> -       r8a7740_pinmux_init();
>>         r8a7740_meram_workaround();
>>
>> +       r8a7740_add_standard_devices_dt();
>> +
>>         /* SCIFA1 */
>>         gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
>>         gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
>> @@ -142,8 +143,6 @@ static void __init eva_init(void)
>>         /* Early BRESP enable, Shared attribute override enable, 32K*8way */
>>         l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
>>  #endif
>> -
>> -       r8a7740_add_standard_devices_dt();
>>  }
>>
>>  #define RESCNT2 IOMEM(0xe6188020)
>> --
>> 1.7.2.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT
@ 2013-02-18 19:34       ` Bastian Hecht
  0 siblings, 0 replies; 32+ messages in thread
From: Bastian Hecht @ 2013-02-18 19:34 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

I got out of place by 1 commit in the intc-of branch:
It's "ARM: shmobile: move pin configuration on
armadillo800eva-reference to DT" not "ARM: shmobile: completely switch
MMC interfaces on armadillo800eva-reference to DT" that breaks "make
dtbs".

Thanks,

 Bastian


2013/2/18 Bastian Hecht <hechtb@gmail.com>:
> Hello,
>
> I'm looking for a branch to test out my new SCI DT version on my
> Armadillo. I saw that topic/intc-of features the armadillo-reference
> implementation so I wanted to use that. But "make dtbs" fails with:
>
> Error: arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:152.2-3
> label or path, 'gpio', not found
> FATAL ERROR: Syntax error parsing input tree
>
> The error is introduced by this commit. I'm unsure if it is the patch
> itself or the branch stacking though.
>
> Thanks,
>
>  Bastian
>
>
> 2013/1/23 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
>> Switch MMCIF, SDHI0 and SDHI1 to complete DT initialisation: use DT
>> bindings to configure regulators, interface pins, card-detect GPIOs,
>> various interface configuration parameters.
>>
>> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>> ---
>>
>> v3: add missing regulator and SDHI properties
>>
>>  .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 ++++++++++++++++++++
>>  .../board-armadillo800eva-reference.c              |    5 +-
>>  2 files changed, 109 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> index 319af9b..11cb0f9 100644
>> --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> @@ -30,4 +30,111 @@
>>                 sh-eth,register-type = "gigabit";
>>                 sh-eth,phy-id = <0>;
>>         };
>> +
>> +       reg_3p3v: regulator at 0 {
>> +               compatible = "regulator-fixed";
>> +               regulator-name = "fixed-3.3V";
>> +               regulator-min-microvolt = <3300000>;
>> +               regulator-max-microvolt = <3300000>;
>> +               regulator-always-on;
>> +               regulator-boot-on;
>> +       };
>> +
>> +       mmcif0: mmcif at 0xe6bd0000 {
>> +               compatible = "renesas,sh-mmcif", "renesas,sh7372-mmcif";
>> +               reg = <0xe6bd0000 0x100>;
>> +               interrupt-parent = <&intca>;
>> +               interrupts = <0x1ac0 0x1ae0>;
>> +               vmmc-supply = <&reg_3p3v>;
>> +               bus-width = <8>;
>> +               non-removable;
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&mmc0_pins>;
>> +       };
>> +
>> +       vcc_sdhi0: regulator at 1 {
>> +               compatible = "regulator-fixed";
>> +
>> +               regulator-name = "vcc-sdhi0";
>> +               regulator-min-microvolt = <3300000>;
>> +               regulator-max-microvolt = <3300000>;
>> +
>> +               gpio = <&gpio 75 0>;
>> +               enable-active-high;
>> +       };
>> +
>> +       vcc_sdhi1: regulator at 2 {
>> +               compatible = "regulator-fixed";
>> +
>> +               regulator-name = "vcc-sdhi1";
>> +               regulator-min-microvolt = <3300000>;
>> +               regulator-max-microvolt = <3300000>;
>> +
>> +               gpio = <&gpio 16 0>;
>> +               enable-active-high;
>> +       };
>> +
>> +       vccq_sdhi0: gpio-regulator at 0 {
>> +               compatible = "regulator-gpio";
>> +
>> +               regulator-name = "vccq-sdhi0";
>> +               regulator-min-microvolt = <1800000>;
>> +               regulator-max-microvolt = <3300000>;
>> +               vin-supply = <&vcc_sdhi0>;
>> +
>> +               enable-gpio = <&gpio 74 0>;
>> +               gpios = <&gpio 17 0>;
>> +               states = <3300000 0
>> +                         1800000 1>;
>> +
>> +               enable-active-high;
>> +       };
>> +
>> +       sdhi0: sdhi at 0xe6850000 {
>> +               compatible = "renesas,shmobile-sdhi";
>> +               reg = <0xe6850000 0x100>;
>> +               interrupt-parent = <&intca>;
>> +               interrupts = <0xe20 0xe40>;
>> +               vmmc-supply = <&vcc_sdhi0>;
>> +               vqmmc-supply = <&vccq_sdhi0>;
>> +               bus-width = <4>;
>> +               cd-gpios = <&gpio 167 1>;
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&sdhi0_pins>;
>> +               cap-sd-highspeed;
>> +               cap-power-off-card;
>> +               toshiba,mmc-has-idle-wait;
>> +               toshiba,mmc-cap-sdio-irq;
>> +       };
>> +
>> +       sdhi1: sdhi at 0xe6860000 {
>> +               compatible = "renesas,shmobile-sdhi";
>> +               reg = <0xe6860000 0x100>;
>> +               interrupt-parent = <&intca>;
>> +               interrupts = <0xea0 0xec0>;
>> +               vmmc-supply = <&vcc_sdhi1>;
>> +               bus-width = <4>;
>> +               cd-gpios = <&gpio 72 1>;
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&sdhi1_pins>;
>> +               cap-sd-highspeed;
>> +               cap-power-off-card;
>> +               toshiba,mmc-has-idle-wait;
>> +               toshiba,mmc-cap-sdio-irq;
>> +       };
>> +};
>> +
>> +&gpio {
>> +       sdhi0_pins: pfc_sdhi0_pins {
>> +               renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
>> +               renesas,function = "sdhi0";
>> +       };
>> +       sdhi1_pins: pfc_sdhi1_pins {
>> +               renesas,pins = "sdhi1_data4", "sdhi1_ctrl", "sdhi1_wp";
>> +               renesas,function = "sdhi1";
>> +       };
>> +       mmc0_pins: pfc_mmc0_pins {
>> +               renesas,pins = "mmc0_data8_1", "mmc0_ctrl_1";
>> +               renesas,function = "mmc0";
>> +       };
>>  };
>> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> index c206612..f929931 100644
>> --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> @@ -107,9 +107,10 @@
>>   */
>>  static void __init eva_init(void)
>>  {
>> -       r8a7740_pinmux_init();
>>         r8a7740_meram_workaround();
>>
>> +       r8a7740_add_standard_devices_dt();
>> +
>>         /* SCIFA1 */
>>         gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
>>         gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
>> @@ -142,8 +143,6 @@ static void __init eva_init(void)
>>         /* Early BRESP enable, Shared attribute override enable, 32K*8way */
>>         l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
>>  #endif
>> -
>> -       r8a7740_add_standard_devices_dt();
>>  }
>>
>>  #define RESCNT2 IOMEM(0xe6188020)
>> --
>> 1.7.2.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to D
  2013-02-18 19:34       ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT Bastian Hecht
@ 2013-02-18 19:55         ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-02-18 19:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bastian

On Mon, 18 Feb 2013, Bastian Hecht wrote:

> Hi,
> 
> I got out of place by 1 commit in the intc-of branch:
> It's "ARM: shmobile: move pin configuration on
> armadillo800eva-reference to DT" not "ARM: shmobile: completely switch
> MMC interfaces on armadillo800eva-reference to DT" that breaks "make
> dtbs".

Could you please try the topic/all+next branch? It should contain all 
other branches and as such be the most complete one.

Thanks
Guennadi

> 
> Thanks,
> 
>  Bastian
> 
> 
> 2013/2/18 Bastian Hecht <hechtb@gmail.com>:
> > Hello,
> >
> > I'm looking for a branch to test out my new SCI DT version on my
> > Armadillo. I saw that topic/intc-of features the armadillo-reference
> > implementation so I wanted to use that. But "make dtbs" fails with:
> >
> > Error: arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:152.2-3
> > label or path, 'gpio', not found
> > FATAL ERROR: Syntax error parsing input tree
> >
> > The error is introduced by this commit. I'm unsure if it is the patch
> > itself or the branch stacking though.
> >
> > Thanks,
> >
> >  Bastian
> >
> >
> > 2013/1/23 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> >> Switch MMCIF, SDHI0 and SDHI1 to complete DT initialisation: use DT
> >> bindings to configure regulators, interface pins, card-detect GPIOs,
> >> various interface configuration parameters.
> >>
> >> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> >> ---
> >>
> >> v3: add missing regulator and SDHI properties
> >>
> >>  .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 ++++++++++++++++++++
> >>  .../board-armadillo800eva-reference.c              |    5 +-
> >>  2 files changed, 109 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> >> index 319af9b..11cb0f9 100644
> >> --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> >> +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> >> @@ -30,4 +30,111 @@
> >>                 sh-eth,register-type = "gigabit";
> >>                 sh-eth,phy-id = <0>;
> >>         };
> >> +
> >> +       reg_3p3v: regulator@0 {
> >> +               compatible = "regulator-fixed";
> >> +               regulator-name = "fixed-3.3V";
> >> +               regulator-min-microvolt = <3300000>;
> >> +               regulator-max-microvolt = <3300000>;
> >> +               regulator-always-on;
> >> +               regulator-boot-on;
> >> +       };
> >> +
> >> +       mmcif0: mmcif@0xe6bd0000 {
> >> +               compatible = "renesas,sh-mmcif", "renesas,sh7372-mmcif";
> >> +               reg = <0xe6bd0000 0x100>;
> >> +               interrupt-parent = <&intca>;
> >> +               interrupts = <0x1ac0 0x1ae0>;
> >> +               vmmc-supply = <&reg_3p3v>;
> >> +               bus-width = <8>;
> >> +               non-removable;
> >> +               pinctrl-names = "default";
> >> +               pinctrl-0 = <&mmc0_pins>;
> >> +       };
> >> +
> >> +       vcc_sdhi0: regulator@1 {
> >> +               compatible = "regulator-fixed";
> >> +
> >> +               regulator-name = "vcc-sdhi0";
> >> +               regulator-min-microvolt = <3300000>;
> >> +               regulator-max-microvolt = <3300000>;
> >> +
> >> +               gpio = <&gpio 75 0>;
> >> +               enable-active-high;
> >> +       };
> >> +
> >> +       vcc_sdhi1: regulator@2 {
> >> +               compatible = "regulator-fixed";
> >> +
> >> +               regulator-name = "vcc-sdhi1";
> >> +               regulator-min-microvolt = <3300000>;
> >> +               regulator-max-microvolt = <3300000>;
> >> +
> >> +               gpio = <&gpio 16 0>;
> >> +               enable-active-high;
> >> +       };
> >> +
> >> +       vccq_sdhi0: gpio-regulator@0 {
> >> +               compatible = "regulator-gpio";
> >> +
> >> +               regulator-name = "vccq-sdhi0";
> >> +               regulator-min-microvolt = <1800000>;
> >> +               regulator-max-microvolt = <3300000>;
> >> +               vin-supply = <&vcc_sdhi0>;
> >> +
> >> +               enable-gpio = <&gpio 74 0>;
> >> +               gpios = <&gpio 17 0>;
> >> +               states = <3300000 0
> >> +                         1800000 1>;
> >> +
> >> +               enable-active-high;
> >> +       };
> >> +
> >> +       sdhi0: sdhi@0xe6850000 {
> >> +               compatible = "renesas,shmobile-sdhi";
> >> +               reg = <0xe6850000 0x100>;
> >> +               interrupt-parent = <&intca>;
> >> +               interrupts = <0xe20 0xe40>;
> >> +               vmmc-supply = <&vcc_sdhi0>;
> >> +               vqmmc-supply = <&vccq_sdhi0>;
> >> +               bus-width = <4>;
> >> +               cd-gpios = <&gpio 167 1>;
> >> +               pinctrl-names = "default";
> >> +               pinctrl-0 = <&sdhi0_pins>;
> >> +               cap-sd-highspeed;
> >> +               cap-power-off-card;
> >> +               toshiba,mmc-has-idle-wait;
> >> +               toshiba,mmc-cap-sdio-irq;
> >> +       };
> >> +
> >> +       sdhi1: sdhi@0xe6860000 {
> >> +               compatible = "renesas,shmobile-sdhi";
> >> +               reg = <0xe6860000 0x100>;
> >> +               interrupt-parent = <&intca>;
> >> +               interrupts = <0xea0 0xec0>;
> >> +               vmmc-supply = <&vcc_sdhi1>;
> >> +               bus-width = <4>;
> >> +               cd-gpios = <&gpio 72 1>;
> >> +               pinctrl-names = "default";
> >> +               pinctrl-0 = <&sdhi1_pins>;
> >> +               cap-sd-highspeed;
> >> +               cap-power-off-card;
> >> +               toshiba,mmc-has-idle-wait;
> >> +               toshiba,mmc-cap-sdio-irq;
> >> +       };
> >> +};
> >> +
> >> +&gpio {
> >> +       sdhi0_pins: pfc_sdhi0_pins {
> >> +               renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
> >> +               renesas,function = "sdhi0";
> >> +       };
> >> +       sdhi1_pins: pfc_sdhi1_pins {
> >> +               renesas,pins = "sdhi1_data4", "sdhi1_ctrl", "sdhi1_wp";
> >> +               renesas,function = "sdhi1";
> >> +       };
> >> +       mmc0_pins: pfc_mmc0_pins {
> >> +               renesas,pins = "mmc0_data8_1", "mmc0_ctrl_1";
> >> +               renesas,function = "mmc0";
> >> +       };
> >>  };
> >> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
> >> index c206612..f929931 100644
> >> --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
> >> +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
> >> @@ -107,9 +107,10 @@
> >>   */
> >>  static void __init eva_init(void)
> >>  {
> >> -       r8a7740_pinmux_init();
> >>         r8a7740_meram_workaround();
> >>
> >> +       r8a7740_add_standard_devices_dt();
> >> +
> >>         /* SCIFA1 */
> >>         gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
> >>         gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
> >> @@ -142,8 +143,6 @@ static void __init eva_init(void)
> >>         /* Early BRESP enable, Shared attribute override enable, 32K*8way */
> >>         l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
> >>  #endif
> >> -
> >> -       r8a7740_add_standard_devices_dt();
> >>  }
> >>
> >>  #define RESCNT2 IOMEM(0xe6188020)
> >> --
> >> 1.7.2.5
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT
@ 2013-02-18 19:55         ` Guennadi Liakhovetski
  0 siblings, 0 replies; 32+ messages in thread
From: Guennadi Liakhovetski @ 2013-02-18 19:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bastian

On Mon, 18 Feb 2013, Bastian Hecht wrote:

> Hi,
> 
> I got out of place by 1 commit in the intc-of branch:
> It's "ARM: shmobile: move pin configuration on
> armadillo800eva-reference to DT" not "ARM: shmobile: completely switch
> MMC interfaces on armadillo800eva-reference to DT" that breaks "make
> dtbs".

Could you please try the topic/all+next branch? It should contain all 
other branches and as such be the most complete one.

Thanks
Guennadi

> 
> Thanks,
> 
>  Bastian
> 
> 
> 2013/2/18 Bastian Hecht <hechtb@gmail.com>:
> > Hello,
> >
> > I'm looking for a branch to test out my new SCI DT version on my
> > Armadillo. I saw that topic/intc-of features the armadillo-reference
> > implementation so I wanted to use that. But "make dtbs" fails with:
> >
> > Error: arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:152.2-3
> > label or path, 'gpio', not found
> > FATAL ERROR: Syntax error parsing input tree
> >
> > The error is introduced by this commit. I'm unsure if it is the patch
> > itself or the branch stacking though.
> >
> > Thanks,
> >
> >  Bastian
> >
> >
> > 2013/1/23 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> >> Switch MMCIF, SDHI0 and SDHI1 to complete DT initialisation: use DT
> >> bindings to configure regulators, interface pins, card-detect GPIOs,
> >> various interface configuration parameters.
> >>
> >> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> >> ---
> >>
> >> v3: add missing regulator and SDHI properties
> >>
> >>  .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 ++++++++++++++++++++
> >>  .../board-armadillo800eva-reference.c              |    5 +-
> >>  2 files changed, 109 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> >> index 319af9b..11cb0f9 100644
> >> --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> >> +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
> >> @@ -30,4 +30,111 @@
> >>                 sh-eth,register-type = "gigabit";
> >>                 sh-eth,phy-id = <0>;
> >>         };
> >> +
> >> +       reg_3p3v: regulator at 0 {
> >> +               compatible = "regulator-fixed";
> >> +               regulator-name = "fixed-3.3V";
> >> +               regulator-min-microvolt = <3300000>;
> >> +               regulator-max-microvolt = <3300000>;
> >> +               regulator-always-on;
> >> +               regulator-boot-on;
> >> +       };
> >> +
> >> +       mmcif0: mmcif at 0xe6bd0000 {
> >> +               compatible = "renesas,sh-mmcif", "renesas,sh7372-mmcif";
> >> +               reg = <0xe6bd0000 0x100>;
> >> +               interrupt-parent = <&intca>;
> >> +               interrupts = <0x1ac0 0x1ae0>;
> >> +               vmmc-supply = <&reg_3p3v>;
> >> +               bus-width = <8>;
> >> +               non-removable;
> >> +               pinctrl-names = "default";
> >> +               pinctrl-0 = <&mmc0_pins>;
> >> +       };
> >> +
> >> +       vcc_sdhi0: regulator at 1 {
> >> +               compatible = "regulator-fixed";
> >> +
> >> +               regulator-name = "vcc-sdhi0";
> >> +               regulator-min-microvolt = <3300000>;
> >> +               regulator-max-microvolt = <3300000>;
> >> +
> >> +               gpio = <&gpio 75 0>;
> >> +               enable-active-high;
> >> +       };
> >> +
> >> +       vcc_sdhi1: regulator at 2 {
> >> +               compatible = "regulator-fixed";
> >> +
> >> +               regulator-name = "vcc-sdhi1";
> >> +               regulator-min-microvolt = <3300000>;
> >> +               regulator-max-microvolt = <3300000>;
> >> +
> >> +               gpio = <&gpio 16 0>;
> >> +               enable-active-high;
> >> +       };
> >> +
> >> +       vccq_sdhi0: gpio-regulator at 0 {
> >> +               compatible = "regulator-gpio";
> >> +
> >> +               regulator-name = "vccq-sdhi0";
> >> +               regulator-min-microvolt = <1800000>;
> >> +               regulator-max-microvolt = <3300000>;
> >> +               vin-supply = <&vcc_sdhi0>;
> >> +
> >> +               enable-gpio = <&gpio 74 0>;
> >> +               gpios = <&gpio 17 0>;
> >> +               states = <3300000 0
> >> +                         1800000 1>;
> >> +
> >> +               enable-active-high;
> >> +       };
> >> +
> >> +       sdhi0: sdhi at 0xe6850000 {
> >> +               compatible = "renesas,shmobile-sdhi";
> >> +               reg = <0xe6850000 0x100>;
> >> +               interrupt-parent = <&intca>;
> >> +               interrupts = <0xe20 0xe40>;
> >> +               vmmc-supply = <&vcc_sdhi0>;
> >> +               vqmmc-supply = <&vccq_sdhi0>;
> >> +               bus-width = <4>;
> >> +               cd-gpios = <&gpio 167 1>;
> >> +               pinctrl-names = "default";
> >> +               pinctrl-0 = <&sdhi0_pins>;
> >> +               cap-sd-highspeed;
> >> +               cap-power-off-card;
> >> +               toshiba,mmc-has-idle-wait;
> >> +               toshiba,mmc-cap-sdio-irq;
> >> +       };
> >> +
> >> +       sdhi1: sdhi at 0xe6860000 {
> >> +               compatible = "renesas,shmobile-sdhi";
> >> +               reg = <0xe6860000 0x100>;
> >> +               interrupt-parent = <&intca>;
> >> +               interrupts = <0xea0 0xec0>;
> >> +               vmmc-supply = <&vcc_sdhi1>;
> >> +               bus-width = <4>;
> >> +               cd-gpios = <&gpio 72 1>;
> >> +               pinctrl-names = "default";
> >> +               pinctrl-0 = <&sdhi1_pins>;
> >> +               cap-sd-highspeed;
> >> +               cap-power-off-card;
> >> +               toshiba,mmc-has-idle-wait;
> >> +               toshiba,mmc-cap-sdio-irq;
> >> +       };
> >> +};
> >> +
> >> +&gpio {
> >> +       sdhi0_pins: pfc_sdhi0_pins {
> >> +               renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
> >> +               renesas,function = "sdhi0";
> >> +       };
> >> +       sdhi1_pins: pfc_sdhi1_pins {
> >> +               renesas,pins = "sdhi1_data4", "sdhi1_ctrl", "sdhi1_wp";
> >> +               renesas,function = "sdhi1";
> >> +       };
> >> +       mmc0_pins: pfc_mmc0_pins {
> >> +               renesas,pins = "mmc0_data8_1", "mmc0_ctrl_1";
> >> +               renesas,function = "mmc0";
> >> +       };
> >>  };
> >> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
> >> index c206612..f929931 100644
> >> --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
> >> +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
> >> @@ -107,9 +107,10 @@
> >>   */
> >>  static void __init eva_init(void)
> >>  {
> >> -       r8a7740_pinmux_init();
> >>         r8a7740_meram_workaround();
> >>
> >> +       r8a7740_add_standard_devices_dt();
> >> +
> >>         /* SCIFA1 */
> >>         gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
> >>         gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
> >> @@ -142,8 +143,6 @@ static void __init eva_init(void)
> >>         /* Early BRESP enable, Shared attribute override enable, 32K*8way */
> >>         l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
> >>  #endif
> >> -
> >> -       r8a7740_add_standard_devices_dt();
> >>  }
> >>
> >>  #define RESCNT2 IOMEM(0xe6188020)
> >> --
> >> 1.7.2.5
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> >> the body of a message to majordomo at vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to D
  2013-02-18 19:55         ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT Guennadi Liakhovetski
@ 2013-02-18 19:59           ` Bastian Hecht
  -1 siblings, 0 replies; 32+ messages in thread
From: Bastian Hecht @ 2013-02-18 19:59 UTC (permalink / raw)
  To: linux-arm-kernel

2013/2/18 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> Hi Bastian
>
> On Mon, 18 Feb 2013, Bastian Hecht wrote:
>
>> Hi,
>>
>> I got out of place by 1 commit in the intc-of branch:
>> It's "ARM: shmobile: move pin configuration on
>> armadillo800eva-reference to DT" not "ARM: shmobile: completely switch
>> MMC interfaces on armadillo800eva-reference to DT" that breaks "make
>> dtbs".
>
> Could you please try the topic/all+next branch? It should contain all
> other branches and as such be the most complete one.

Oh great, thanks for pointing out the correct branch to me! This one
looks good for my testing purposes.

> Thanks
> Guennadi
>
>>
>> Thanks,
>>
>>  Bastian
>>
>>
>> 2013/2/18 Bastian Hecht <hechtb@gmail.com>:
>> > Hello,
>> >
>> > I'm looking for a branch to test out my new SCI DT version on my
>> > Armadillo. I saw that topic/intc-of features the armadillo-reference
>> > implementation so I wanted to use that. But "make dtbs" fails with:
>> >
>> > Error: arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:152.2-3
>> > label or path, 'gpio', not found
>> > FATAL ERROR: Syntax error parsing input tree
>> >
>> > The error is introduced by this commit. I'm unsure if it is the patch
>> > itself or the branch stacking though.
>> >
>> > Thanks,
>> >
>> >  Bastian
>> >
>> >
>> > 2013/1/23 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
>> >> Switch MMCIF, SDHI0 and SDHI1 to complete DT initialisation: use DT
>> >> bindings to configure regulators, interface pins, card-detect GPIOs,
>> >> various interface configuration parameters.
>> >>
>> >> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>> >> ---
>> >>
>> >> v3: add missing regulator and SDHI properties
>> >>
>> >>  .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 ++++++++++++++++++++
>> >>  .../board-armadillo800eva-reference.c              |    5 +-
>> >>  2 files changed, 109 insertions(+), 3 deletions(-)
>> >>
>> >> diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> >> index 319af9b..11cb0f9 100644
>> >> --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> >> +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> >> @@ -30,4 +30,111 @@
>> >>                 sh-eth,register-type = "gigabit";
>> >>                 sh-eth,phy-id = <0>;
>> >>         };
>> >> +
>> >> +       reg_3p3v: regulator@0 {
>> >> +               compatible = "regulator-fixed";
>> >> +               regulator-name = "fixed-3.3V";
>> >> +               regulator-min-microvolt = <3300000>;
>> >> +               regulator-max-microvolt = <3300000>;
>> >> +               regulator-always-on;
>> >> +               regulator-boot-on;
>> >> +       };
>> >> +
>> >> +       mmcif0: mmcif@0xe6bd0000 {
>> >> +               compatible = "renesas,sh-mmcif", "renesas,sh7372-mmcif";
>> >> +               reg = <0xe6bd0000 0x100>;
>> >> +               interrupt-parent = <&intca>;
>> >> +               interrupts = <0x1ac0 0x1ae0>;
>> >> +               vmmc-supply = <&reg_3p3v>;
>> >> +               bus-width = <8>;
>> >> +               non-removable;
>> >> +               pinctrl-names = "default";
>> >> +               pinctrl-0 = <&mmc0_pins>;
>> >> +       };
>> >> +
>> >> +       vcc_sdhi0: regulator@1 {
>> >> +               compatible = "regulator-fixed";
>> >> +
>> >> +               regulator-name = "vcc-sdhi0";
>> >> +               regulator-min-microvolt = <3300000>;
>> >> +               regulator-max-microvolt = <3300000>;
>> >> +
>> >> +               gpio = <&gpio 75 0>;
>> >> +               enable-active-high;
>> >> +       };
>> >> +
>> >> +       vcc_sdhi1: regulator@2 {
>> >> +               compatible = "regulator-fixed";
>> >> +
>> >> +               regulator-name = "vcc-sdhi1";
>> >> +               regulator-min-microvolt = <3300000>;
>> >> +               regulator-max-microvolt = <3300000>;
>> >> +
>> >> +               gpio = <&gpio 16 0>;
>> >> +               enable-active-high;
>> >> +       };
>> >> +
>> >> +       vccq_sdhi0: gpio-regulator@0 {
>> >> +               compatible = "regulator-gpio";
>> >> +
>> >> +               regulator-name = "vccq-sdhi0";
>> >> +               regulator-min-microvolt = <1800000>;
>> >> +               regulator-max-microvolt = <3300000>;
>> >> +               vin-supply = <&vcc_sdhi0>;
>> >> +
>> >> +               enable-gpio = <&gpio 74 0>;
>> >> +               gpios = <&gpio 17 0>;
>> >> +               states = <3300000 0
>> >> +                         1800000 1>;
>> >> +
>> >> +               enable-active-high;
>> >> +       };
>> >> +
>> >> +       sdhi0: sdhi@0xe6850000 {
>> >> +               compatible = "renesas,shmobile-sdhi";
>> >> +               reg = <0xe6850000 0x100>;
>> >> +               interrupt-parent = <&intca>;
>> >> +               interrupts = <0xe20 0xe40>;
>> >> +               vmmc-supply = <&vcc_sdhi0>;
>> >> +               vqmmc-supply = <&vccq_sdhi0>;
>> >> +               bus-width = <4>;
>> >> +               cd-gpios = <&gpio 167 1>;
>> >> +               pinctrl-names = "default";
>> >> +               pinctrl-0 = <&sdhi0_pins>;
>> >> +               cap-sd-highspeed;
>> >> +               cap-power-off-card;
>> >> +               toshiba,mmc-has-idle-wait;
>> >> +               toshiba,mmc-cap-sdio-irq;
>> >> +       };
>> >> +
>> >> +       sdhi1: sdhi@0xe6860000 {
>> >> +               compatible = "renesas,shmobile-sdhi";
>> >> +               reg = <0xe6860000 0x100>;
>> >> +               interrupt-parent = <&intca>;
>> >> +               interrupts = <0xea0 0xec0>;
>> >> +               vmmc-supply = <&vcc_sdhi1>;
>> >> +               bus-width = <4>;
>> >> +               cd-gpios = <&gpio 72 1>;
>> >> +               pinctrl-names = "default";
>> >> +               pinctrl-0 = <&sdhi1_pins>;
>> >> +               cap-sd-highspeed;
>> >> +               cap-power-off-card;
>> >> +               toshiba,mmc-has-idle-wait;
>> >> +               toshiba,mmc-cap-sdio-irq;
>> >> +       };
>> >> +};
>> >> +
>> >> +&gpio {
>> >> +       sdhi0_pins: pfc_sdhi0_pins {
>> >> +               renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
>> >> +               renesas,function = "sdhi0";
>> >> +       };
>> >> +       sdhi1_pins: pfc_sdhi1_pins {
>> >> +               renesas,pins = "sdhi1_data4", "sdhi1_ctrl", "sdhi1_wp";
>> >> +               renesas,function = "sdhi1";
>> >> +       };
>> >> +       mmc0_pins: pfc_mmc0_pins {
>> >> +               renesas,pins = "mmc0_data8_1", "mmc0_ctrl_1";
>> >> +               renesas,function = "mmc0";
>> >> +       };
>> >>  };
>> >> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> >> index c206612..f929931 100644
>> >> --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> >> +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> >> @@ -107,9 +107,10 @@
>> >>   */
>> >>  static void __init eva_init(void)
>> >>  {
>> >> -       r8a7740_pinmux_init();
>> >>         r8a7740_meram_workaround();
>> >>
>> >> +       r8a7740_add_standard_devices_dt();
>> >> +
>> >>         /* SCIFA1 */
>> >>         gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
>> >>         gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
>> >> @@ -142,8 +143,6 @@ static void __init eva_init(void)
>> >>         /* Early BRESP enable, Shared attribute override enable, 32K*8way */
>> >>         l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
>> >>  #endif
>> >> -
>> >> -       r8a7740_add_standard_devices_dt();
>> >>  }
>> >>
>> >>  #define RESCNT2 IOMEM(0xe6188020)
>> >> --
>> >> 1.7.2.5
>> >>
>> >> --
>> >> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
>> >> the body of a message to majordomo@vger.kernel.org
>> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT
@ 2013-02-18 19:59           ` Bastian Hecht
  0 siblings, 0 replies; 32+ messages in thread
From: Bastian Hecht @ 2013-02-18 19:59 UTC (permalink / raw)
  To: linux-arm-kernel

2013/2/18 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> Hi Bastian
>
> On Mon, 18 Feb 2013, Bastian Hecht wrote:
>
>> Hi,
>>
>> I got out of place by 1 commit in the intc-of branch:
>> It's "ARM: shmobile: move pin configuration on
>> armadillo800eva-reference to DT" not "ARM: shmobile: completely switch
>> MMC interfaces on armadillo800eva-reference to DT" that breaks "make
>> dtbs".
>
> Could you please try the topic/all+next branch? It should contain all
> other branches and as such be the most complete one.

Oh great, thanks for pointing out the correct branch to me! This one
looks good for my testing purposes.

> Thanks
> Guennadi
>
>>
>> Thanks,
>>
>>  Bastian
>>
>>
>> 2013/2/18 Bastian Hecht <hechtb@gmail.com>:
>> > Hello,
>> >
>> > I'm looking for a branch to test out my new SCI DT version on my
>> > Armadillo. I saw that topic/intc-of features the armadillo-reference
>> > implementation so I wanted to use that. But "make dtbs" fails with:
>> >
>> > Error: arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:152.2-3
>> > label or path, 'gpio', not found
>> > FATAL ERROR: Syntax error parsing input tree
>> >
>> > The error is introduced by this commit. I'm unsure if it is the patch
>> > itself or the branch stacking though.
>> >
>> > Thanks,
>> >
>> >  Bastian
>> >
>> >
>> > 2013/1/23 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
>> >> Switch MMCIF, SDHI0 and SDHI1 to complete DT initialisation: use DT
>> >> bindings to configure regulators, interface pins, card-detect GPIOs,
>> >> various interface configuration parameters.
>> >>
>> >> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>> >> ---
>> >>
>> >> v3: add missing regulator and SDHI properties
>> >>
>> >>  .../boot/dts/r8a7740-armadillo800eva-reference.dts |  107 ++++++++++++++++++++
>> >>  .../board-armadillo800eva-reference.c              |    5 +-
>> >>  2 files changed, 109 insertions(+), 3 deletions(-)
>> >>
>> >> diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> >> index 319af9b..11cb0f9 100644
>> >> --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> >> +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
>> >> @@ -30,4 +30,111 @@
>> >>                 sh-eth,register-type = "gigabit";
>> >>                 sh-eth,phy-id = <0>;
>> >>         };
>> >> +
>> >> +       reg_3p3v: regulator at 0 {
>> >> +               compatible = "regulator-fixed";
>> >> +               regulator-name = "fixed-3.3V";
>> >> +               regulator-min-microvolt = <3300000>;
>> >> +               regulator-max-microvolt = <3300000>;
>> >> +               regulator-always-on;
>> >> +               regulator-boot-on;
>> >> +       };
>> >> +
>> >> +       mmcif0: mmcif at 0xe6bd0000 {
>> >> +               compatible = "renesas,sh-mmcif", "renesas,sh7372-mmcif";
>> >> +               reg = <0xe6bd0000 0x100>;
>> >> +               interrupt-parent = <&intca>;
>> >> +               interrupts = <0x1ac0 0x1ae0>;
>> >> +               vmmc-supply = <&reg_3p3v>;
>> >> +               bus-width = <8>;
>> >> +               non-removable;
>> >> +               pinctrl-names = "default";
>> >> +               pinctrl-0 = <&mmc0_pins>;
>> >> +       };
>> >> +
>> >> +       vcc_sdhi0: regulator at 1 {
>> >> +               compatible = "regulator-fixed";
>> >> +
>> >> +               regulator-name = "vcc-sdhi0";
>> >> +               regulator-min-microvolt = <3300000>;
>> >> +               regulator-max-microvolt = <3300000>;
>> >> +
>> >> +               gpio = <&gpio 75 0>;
>> >> +               enable-active-high;
>> >> +       };
>> >> +
>> >> +       vcc_sdhi1: regulator at 2 {
>> >> +               compatible = "regulator-fixed";
>> >> +
>> >> +               regulator-name = "vcc-sdhi1";
>> >> +               regulator-min-microvolt = <3300000>;
>> >> +               regulator-max-microvolt = <3300000>;
>> >> +
>> >> +               gpio = <&gpio 16 0>;
>> >> +               enable-active-high;
>> >> +       };
>> >> +
>> >> +       vccq_sdhi0: gpio-regulator at 0 {
>> >> +               compatible = "regulator-gpio";
>> >> +
>> >> +               regulator-name = "vccq-sdhi0";
>> >> +               regulator-min-microvolt = <1800000>;
>> >> +               regulator-max-microvolt = <3300000>;
>> >> +               vin-supply = <&vcc_sdhi0>;
>> >> +
>> >> +               enable-gpio = <&gpio 74 0>;
>> >> +               gpios = <&gpio 17 0>;
>> >> +               states = <3300000 0
>> >> +                         1800000 1>;
>> >> +
>> >> +               enable-active-high;
>> >> +       };
>> >> +
>> >> +       sdhi0: sdhi at 0xe6850000 {
>> >> +               compatible = "renesas,shmobile-sdhi";
>> >> +               reg = <0xe6850000 0x100>;
>> >> +               interrupt-parent = <&intca>;
>> >> +               interrupts = <0xe20 0xe40>;
>> >> +               vmmc-supply = <&vcc_sdhi0>;
>> >> +               vqmmc-supply = <&vccq_sdhi0>;
>> >> +               bus-width = <4>;
>> >> +               cd-gpios = <&gpio 167 1>;
>> >> +               pinctrl-names = "default";
>> >> +               pinctrl-0 = <&sdhi0_pins>;
>> >> +               cap-sd-highspeed;
>> >> +               cap-power-off-card;
>> >> +               toshiba,mmc-has-idle-wait;
>> >> +               toshiba,mmc-cap-sdio-irq;
>> >> +       };
>> >> +
>> >> +       sdhi1: sdhi at 0xe6860000 {
>> >> +               compatible = "renesas,shmobile-sdhi";
>> >> +               reg = <0xe6860000 0x100>;
>> >> +               interrupt-parent = <&intca>;
>> >> +               interrupts = <0xea0 0xec0>;
>> >> +               vmmc-supply = <&vcc_sdhi1>;
>> >> +               bus-width = <4>;
>> >> +               cd-gpios = <&gpio 72 1>;
>> >> +               pinctrl-names = "default";
>> >> +               pinctrl-0 = <&sdhi1_pins>;
>> >> +               cap-sd-highspeed;
>> >> +               cap-power-off-card;
>> >> +               toshiba,mmc-has-idle-wait;
>> >> +               toshiba,mmc-cap-sdio-irq;
>> >> +       };
>> >> +};
>> >> +
>> >> +&gpio {
>> >> +       sdhi0_pins: pfc_sdhi0_pins {
>> >> +               renesas,pins = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
>> >> +               renesas,function = "sdhi0";
>> >> +       };
>> >> +       sdhi1_pins: pfc_sdhi1_pins {
>> >> +               renesas,pins = "sdhi1_data4", "sdhi1_ctrl", "sdhi1_wp";
>> >> +               renesas,function = "sdhi1";
>> >> +       };
>> >> +       mmc0_pins: pfc_mmc0_pins {
>> >> +               renesas,pins = "mmc0_data8_1", "mmc0_ctrl_1";
>> >> +               renesas,function = "mmc0";
>> >> +       };
>> >>  };
>> >> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> >> index c206612..f929931 100644
>> >> --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> >> +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
>> >> @@ -107,9 +107,10 @@
>> >>   */
>> >>  static void __init eva_init(void)
>> >>  {
>> >> -       r8a7740_pinmux_init();
>> >>         r8a7740_meram_workaround();
>> >>
>> >> +       r8a7740_add_standard_devices_dt();
>> >> +
>> >>         /* SCIFA1 */
>> >>         gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
>> >>         gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
>> >> @@ -142,8 +143,6 @@ static void __init eva_init(void)
>> >>         /* Early BRESP enable, Shared attribute override enable, 32K*8way */
>> >>         l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
>> >>  #endif
>> >> -
>> >> -       r8a7740_add_standard_devices_dt();
>> >>  }
>> >>
>> >>  #define RESCNT2 IOMEM(0xe6188020)
>> >> --
>> >> 1.7.2.5
>> >>
>> >> --
>> >> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
>> >> the body of a message to majordomo at vger.kernel.org
>> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to D
  2013-02-18 19:59           ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT Bastian Hecht
@ 2013-02-19  1:18             ` Simon Horman
  -1 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2013-02-19  1:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 18, 2013 at 01:59:56PM -0600, Bastian Hecht wrote:
> 2013/2/18 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> > Hi Bastian
> >
> > On Mon, 18 Feb 2013, Bastian Hecht wrote:
> >
> >> Hi,
> >>
> >> I got out of place by 1 commit in the intc-of branch:
> >> It's "ARM: shmobile: move pin configuration on
> >> armadillo800eva-reference to DT" not "ARM: shmobile: completely switch
> >> MMC interfaces on armadillo800eva-reference to DT" that breaks "make
> >> dtbs".

Thanks for pointing that out.

I have resolved this problem by rebasing the topic/intc-of branch
on a merge that includes the topic/pinmux branch. topic/pinmux includes
the following patch which provides 'gpio'.

* ARM: shmobile: r8a7740: Add pin control device in device tree

> > Could you please try the topic/all+next branch? It should contain all
> > other branches and as such be the most complete one.

Yes, it is the most complete one.

> Oh great, thanks for pointing out the correct branch to me! This one
> looks good for my testing purposes.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT
@ 2013-02-19  1:18             ` Simon Horman
  0 siblings, 0 replies; 32+ messages in thread
From: Simon Horman @ 2013-02-19  1:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 18, 2013 at 01:59:56PM -0600, Bastian Hecht wrote:
> 2013/2/18 Guennadi Liakhovetski <g.liakhovetski@gmx.de>:
> > Hi Bastian
> >
> > On Mon, 18 Feb 2013, Bastian Hecht wrote:
> >
> >> Hi,
> >>
> >> I got out of place by 1 commit in the intc-of branch:
> >> It's "ARM: shmobile: move pin configuration on
> >> armadillo800eva-reference to DT" not "ARM: shmobile: completely switch
> >> MMC interfaces on armadillo800eva-reference to DT" that breaks "make
> >> dtbs".

Thanks for pointing that out.

I have resolved this problem by rebasing the topic/intc-of branch
on a merge that includes the topic/pinmux branch. topic/pinmux includes
the following patch which provides 'gpio'.

* ARM: shmobile: r8a7740: Add pin control device in device tree

> > Could you please try the topic/all+next branch? It should contain all
> > other branches and as such be the most complete one.

Yes, it is the most complete one.

> Oh great, thanks for pointing out the correct branch to me! This one
> looks good for my testing purposes.

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2013-02-19  1:18 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-23 16:37 [PATCH v3 0/8] ARM: shmobile: pinctrl and DT extensions Guennadi Liakhovetski
2013-01-23 16:37 ` Guennadi Liakhovetski
2013-01-23 16:37 ` [PATCH v3 1/8] pinctrl: add SDHI and MMCIF pin groups to r8a7740 Guennadi Liakhovetski
2013-01-23 16:37   ` Guennadi Liakhovetski
2013-01-25 10:37   ` Linus Walleij
2013-01-25 10:37     ` Linus Walleij
2013-01-23 16:37 ` [PATCH v3 2/8] pinctrl: add SDHI and MMCIF pin groups to sh7372 Guennadi Liakhovetski
2013-01-23 16:37   ` Guennadi Liakhovetski
2013-01-23 16:37 ` [PATCH v3 3/8] ARM: shmobile: simplify armadillo800eva and kzm9g Kconfig dependencies Guennadi Liakhovetski
2013-01-23 16:37   ` Guennadi Liakhovetski
2013-01-23 16:37 ` [PATCH v3 4/8] ARM: shmobile: add MMCIF and SDHI DT clock aliases to sh73a0 and r8a7740 Guennadi Liakhovetski
2013-01-23 16:37   ` Guennadi Liakhovetski
2013-01-23 16:37 ` [PATCH v3 5/8] ARM: shmobile: add a GPIO controller DT node for sh7372 Guennadi Liakhovetski
2013-01-23 16:37   ` Guennadi Liakhovetski
2013-01-23 16:37 ` [PATCH v3 6/8] ARM: shmobile: use GPIO SD-card detection on armadillo800eva Guennadi Liakhovetski
2013-01-23 16:37   ` Guennadi Liakhovetski
2013-01-23 16:37 ` [PATCH v3 7/8] ARM: shmobile: completely switch MMC interfaces on mackerel-reference to DT Guennadi Liakhovetski
2013-01-23 16:37   ` Guennadi Liakhovetski
2013-01-23 16:37 ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference " Guennadi Liakhovetski
2013-01-23 16:37   ` Guennadi Liakhovetski
2013-02-18 19:10   ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to D Bastian Hecht
2013-02-18 19:10     ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT Bastian Hecht
2013-02-18 19:34     ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to D Bastian Hecht
2013-02-18 19:34       ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT Bastian Hecht
2013-02-18 19:55       ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to D Guennadi Liakhovetski
2013-02-18 19:55         ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT Guennadi Liakhovetski
2013-02-18 19:59         ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to D Bastian Hecht
2013-02-18 19:59           ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT Bastian Hecht
2013-02-19  1:18           ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to D Simon Horman
2013-02-19  1:18             ` [PATCH v3 8/8] ARM: shmobile: completely switch MMC interfaces on armadillo800eva-reference to DT Simon Horman
2013-01-24 10:23 ` [PATCH v3 0/8] ARM: shmobile: pinctrl and DT extensions Laurent Pinchart
2013-01-24 10:23   ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.