Skip to contentSkip to conversation

ARM: shmobile: Add pinctrl_register_mappings() for Koelsch

PATCH In review Magnus Damm 2 participants 3 messages Nov 20, 2013 – Nov 21, 2013

Subsystems (4)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

PATCH 1/1 ARM: shmobile: Add pinctrl_register_mappings() for Koelsch

From: Magnus Damm <[email protected]>

Add code to setup the r8a7791 PFC for the Koelsch board.

At this point serial consoles are added, and in the near future other platform-device-only devices will be added here like for instance the r8a7791 DU.

---

 arch/arm/mach-shmobile/board-koelsch.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/mach-shmobile/board-koelsch.c +12 -0
@@ -24,6 +24,7 @@
 #include <linux/input.h>
 #include <linux/kernel.h>
 #include <linux/leds.h>
+#include <linux/pinctrl/machine.h>
 #include <linux/platform_data/gpio-rcar.h>
 #include <linux/platform_device.h>
 #include <mach/common.h>
@@ -78,9 +79,20 @@ static const struct gpio_keys_platform_d
 	.nbuttons	= ARRAY_SIZE(gpio_buttons),
 };
 
+static const struct pinctrl_map koelsch_pinctrl_map[] = {
+	/* SCIF0 (CN19: DEBUG SERIAL0) */
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7791",
+				  "scif0_data_d", "scif0"),
+	/* SCIF1 (CN20: DEBUG SERIAL1) */
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7791",
+				  "scif1_data_d", "scif1"),
+};
+
 static void __init koelsch_add_standard_devices(void)
 {
 	r8a7791_clock_init();
+	pinctrl_register_mappings(koelsch_pinctrl_map,
+				  ARRAY_SIZE(koelsch_pinctrl_map));
 	r8a7791_pinmux_init();
 	r8a7791_add_standard_devices();
 	platform_device_register_data(&platform_bus, "leds-gpio", -1,
#1 lore raw
Quoted 8 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Add code to setup the r8a7791 PFC for the Koelsch board.

At this point serial consoles are added, and in the near future other platform-device-only devices will be added here like for instance the r8a7791 DU.

Quoted 5 lines

---

 arch/arm/mach-shmobile/board-koelsch.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Thanks, I will queue this up.
Assuming all goes will I plan to push this and other updates today or tomorrow.

Quoted 33 lines
arch/arm/mach-shmobile/board-koelsch.c +12 -0
@@ -24,6 +24,7 @@
 #include <linux/input.h>
 #include <linux/kernel.h>
 #include <linux/leds.h>
+#include <linux/pinctrl/machine.h>
 #include <linux/platform_data/gpio-rcar.h>
 #include <linux/platform_device.h>
 #include <mach/common.h>
@@ -78,9 +79,20 @@ static const struct gpio_keys_platform_d
 	.nbuttons	= ARRAY_SIZE(gpio_buttons),
 };
 
+static const struct pinctrl_map koelsch_pinctrl_map[] = {
+	/* SCIF0 (CN19: DEBUG SERIAL0) */
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7791",
+				  "scif0_data_d", "scif0"),
+	/* SCIF1 (CN20: DEBUG SERIAL1) */
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7791",
+				  "scif1_data_d", "scif1"),
+};
+
 static void __init koelsch_add_standard_devices(void)
 {
 	r8a7791_clock_init();
+	pinctrl_register_mappings(koelsch_pinctrl_map,
+				  ARRAY_SIZE(koelsch_pinctrl_map));
 	r8a7791_pinmux_init();
 	r8a7791_add_standard_devices();
 	platform_device_register_data(&platform_bus, "leds-gpio", -1,
#2 lore raw
Quoted 12 lines · Simon Horman
Quoted 11 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Add code to setup the r8a7791 PFC for the Koelsch board.

At this point serial consoles are added, and in the near future other platform-device-only devices will be added here like for instance the r8a7791 DU.

---

Quoted 6 lines
Quoted 2 lines
 arch/arm/mach-shmobile/board-koelsch.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Thanks, I will queue this up.
Assuming all goes will I plan to push this and other updates today or tomorrow.

Unfortunately with this patch applied I am no longer able to boot my Koelsch board using the koelsch defconfig. Am I missing something?

I am dropping this patch for now.

Quoted 39 lines
Quoted 24 lines
arch/arm/mach-shmobile/board-koelsch.c +8 -0
@@ -24,6 +24,7 @@
 #include <linux/input.h>
 #include <linux/kernel.h>
 #include <linux/leds.h>
+#include <linux/pinctrl/machine.h>
 #include <linux/platform_data/gpio-rcar.h>
 #include <linux/platform_device.h>
 #include <mach/common.h>
@@ -78,9 +79,20 @@ static const struct gpio_keys_platform_d
 	.nbuttons	= ARRAY_SIZE(gpio_buttons),
 };
 
+static const struct pinctrl_map koelsch_pinctrl_map[] = {
+	/* SCIF0 (CN19: DEBUG SERIAL0) */
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7791",
+				  "scif0_data_d", "scif0"),
+	/* SCIF1 (CN20: DEBUG SERIAL1) */
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7791",
+				  "scif1_data_d", "scif1"),

arch/arm/mach-shmobile/board-koelsch.c static const struct gpio_keys_platform_d · line 98

Quoted 10 lines
arch/arm/mach-shmobile/board-koelsch.c +4 -0
+};
+
 static void __init koelsch_add_standard_devices(void)
 {
 	r8a7791_clock_init();
+	pinctrl_register_mappings(koelsch_pinctrl_map,
+				  ARRAY_SIZE(koelsch_pinctrl_map));
 	r8a7791_pinmux_init();
 	r8a7791_add_standard_devices();
 	platform_device_register_data(&platform_bus, "leds-gpio", -1,

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html