ARM: shmobile: kzm9g-reference: Move pinctrl mappings to device tree
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 9 May 2013 15:41:59 +0000 (17:41 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Mon, 22 Jul 2013 01:12:40 +0000 (10:12 +0900)
Replace the pinctrl mappings in board code by device tree mappings.
For devices that are still instantiated from board code reference the
mappings as the default pin controller state to apply them at boot time.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
arch/arm/mach-shmobile/board-kzm9g-reference.c

index b6f759e830ed3fb35dfc4284f838d776aa6c760f..11ae9ade5513c154f33c2493ac8a87b7a1af0909 100644 (file)
        };
 };
 
+&i2c3 {
+       pinctrl-0 = <&i2c3_pins>;
+       pinctrl-names = "default";
+};
+
 &mmcif {
+       pinctrl-0 = <&mmcif_pins>;
+       pinctrl-names = "default";
+
        bus-width = <8>;
        vmmc-supply = <&reg_1p8v>;
        status = "okay";
 };
 
+&pfc {
+       pinctrl-0 = <&scifa4_pins>;
+       pinctrl-names = "default";
+
+       i2c3_pins: i2c3 {
+               renesas,groups = "i2c3_1";
+               renesas,function = "i2c3";
+       };
+
+       mmcif_pins: mmcif {
+               mux {
+                       renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0";
+                       renesas,function = "mmc0";
+               };
+               cfg {
+                       renesas,groups = "mmc0_data8_0";
+                       renesas,pins = "PORT279";
+                       bias-pull-up;
+               };
+       };
+
+       scifa4_pins: scifa4 {
+               renesas,groups = "scifa4_data", "scifa4_ctrl";
+               renesas,function = "scifa4";
+       };
+
+       sdhi0_pins: sdhi0 {
+               renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd", "sdhi0_wp";
+               renesas,function = "sdhi0";
+       };
+
+       sdhi2_pins: sdhi2 {
+               renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
+               renesas,function = "sdhi2";
+       };
+};
+
 &sdhi0 {
+       pinctrl-0 = <&sdhi0_pins>;
+       pinctrl-names = "default";
+
        vmmc-supply = <&reg_3p3v>;
        bus-width = <4>;
        status = "okay";
 };
 
 &sdhi2 {
+       pinctrl-0 = <&sdhi2_pins>;
+       pinctrl-names = "default";
+
        vmmc-supply = <&reg_3p3v>;
        bus-width = <4>;
        broken-cd;
index 6ff6ca2740a32bd7518e186665b213237c1f3849..fc2bb3778f3d3ffc45b12c1c6389fb8fd29ab152 100644 (file)
 #include <linux/irqchip.h>
 #include <linux/input.h>
 #include <linux/of_platform.h>
-#include <linux/pinctrl/machine.h>
-#include <linux/pinctrl/pinconf-generic.h>
 #include <mach/sh73a0.h>
 #include <mach/common.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-static unsigned long pin_pullup_conf[] = {
-       PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_UP, 0),
-};
-
-static const struct pinctrl_map kzm_pinctrl_map[] = {
-       PIN_MAP_MUX_GROUP_DEFAULT("e6826000.i2c", "e6050000.pfc",
-                                 "i2c3_1", "i2c3"),
-       /* MMCIF */
-       PIN_MAP_MUX_GROUP_DEFAULT("e6bd0000.mmcif", "e6050000.pfc",
-                                 "mmc0_data8_0", "mmc0"),
-       PIN_MAP_MUX_GROUP_DEFAULT("e6bd0000.mmcif", "e6050000.pfc",
-                                 "mmc0_ctrl_0", "mmc0"),
-       PIN_MAP_CONFIGS_PIN_DEFAULT("e6bd0000.mmcif", "e6050000.pfc",
-                                   "PORT279", pin_pullup_conf),
-       PIN_MAP_CONFIGS_GROUP_DEFAULT("e6bd0000.mmcif", "e6050000.pfc",
-                                     "mmc0_data8_0", pin_pullup_conf),
-       /* SCIFA4 */
-       PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "e6050000.pfc",
-                                 "scifa4_data", "scifa4"),
-       PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "e6050000.pfc",
-                                 "scifa4_ctrl", "scifa4"),
-       /* SDHI0 */
-       PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "e6050000.pfc",
-                                 "sdhi0_data4", "sdhi0"),
-       PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "e6050000.pfc",
-                                 "sdhi0_ctrl", "sdhi0"),
-       PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "e6050000.pfc",
-                                 "sdhi0_cd", "sdhi0"),
-       PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "e6050000.pfc",
-                                 "sdhi0_wp", "sdhi0"),
-       /* SDHI2 */
-       PIN_MAP_MUX_GROUP_DEFAULT("ee140000.sdhi", "e6050000.pfc",
-                                 "sdhi2_data4", "sdhi2"),
-       PIN_MAP_MUX_GROUP_DEFAULT("ee140000.sdhi", "e6050000.pfc",
-                                 "sdhi2_ctrl", "sdhi2"),
-};
-
 static void __init kzm_init(void)
 {
        sh73a0_add_standard_devices_dt();
-       pinctrl_register_mappings(kzm_pinctrl_map, ARRAY_SIZE(kzm_pinctrl_map));
 
        /* enable SD */
        gpio_request_one(15, GPIOF_OUT_INIT_HIGH, NULL); /* power */
This page took 0.027704 seconds and 5 git commands to generate.