arm64: dts: exynos5433: add sleep state for BCM4773 sensorhub gpios
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Fri, 2 Sep 2016 02:30:10 +0000 (11:30 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 14 Dec 2016 04:52:42 +0000 (13:52 +0900)
The BCM4773 power pins need to be alive during sleep mode,
because the MCU needs to respond to the external sensors events.

Add a sleep alive state for pins.

 - gpd2-0 (GPS_HUB_EN)
 - gpf2-2 (MCU_AP_INT_2_1.8V)
 - gpf2-3 (AP_MCU_INT_1.8V)

While pins:

 - gpd8-0 (SHUB_SPI_SCK)
 - gpd8-1 (SHUB_SPI_SSN)
 - gpd6-0 (SHUB_SPI_MISO)
 - gpd6-1 (SHUB_SPI_MOSI)

need to be managed when the device goes and resumes from
sleep mode.

Change-Id: If508f5b4526e5de665f76b0adb96ae64779b6eb7
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
arch/arm64/boot/dts/exynos/exynos5433-tm2.dts
arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts

index 7d35f9f..d2853bd 100644 (file)
 
 &pinctrl_alive {
        pinctrl-names = "default";
-       pinctrl-0 = <&initial_alive>;
+       pinctrl-0 = <&initial_alive &sleep_alive>;
 
        initial_alive: initial-state {
                PIN(IN, gpa0-0, DOWN, LV1);     /* CLK_REQ */
                PIN(IN, gpf5-7, DOWN, LV1);     /* COMPANION_RSTN */
        };
 
+       sleep_alive: sleep-state {
+               PIN_SLP(gpf2-2, INPUT, UP);     /* MCU_AP_INT_2_1.8V */
+               PIN_SLP(gpf2-3, OUT0, DOWN);    /* AP_MCU_INT_1.8V */
+       };
+
        nfc_n5_en: nfc-n5-en {
                samsung,pins = "gpf1-4";
                samsung,pin-function = <1>;
                PIN_SLP(gpc0-1, PREV, DOWN);    /* FLASH_LED_STROBE */
                PIN_SLP(gpc0-2, INPUT, DOWN);   /* FLASH_LED_TORCH */
                PIN_SLP(gpd4-0, PREV, DOWN);    /* BT_EN */
+
+               PIN_SLP(gpd8-0, OUT1, UP);      /* SHUB_SPI_SCK */
+               PIN_SLP(gpd8-1, OUT1, UP);      /* SHUB_SPI_SSN */
+               PIN_SLP(gpd6-0, INPUT, DOWN);   /* SHUB_SPI_MISO */
+               PIN_SLP(gpd6-1, OUT1, UP);      /* SHUB_SPI_MOSI */
+               PIN_SLP(gpg2-0, PREV, NONE);    /* GPS_HUB_EN */
        };
 
        fimc_is_ois_hsi2c_on: fimc-is-ois-hsi2c-on {
index 34e0091..13f70a4 100644 (file)
 
 &pinctrl_alive {
        pinctrl-names = "default";
-       pinctrl-0 = <&initial_alive>;
+       pinctrl-0 = <&initial_alive &sleep_alive>;
 
        initial_alive: initial-state {
                PIN(IN, gpa0-0, DOWN, LV1);     /* CLK_REQ */
                PIN(IN, gpf5-7, DOWN, LV1);     /* COMPANION_RSTN */
        };
 
+       sleep_alive: sleep-state {
+               PIN_SLP(gpf2-2, INPUT, UP);     /* MCU_AP_INT_2_1.8V */
+               PIN_SLP(gpf2-3, OUT0, DOWN);    /* AP_MCU_INT_1.8V */
+       };
+
        nfc_n5_en: nfc-n5-en {
                samsung,pins = "gpf1-4";
                samsung,pin-function = <1>;
                PIN_SLP(gpc0-1, PREV, DOWN);    /* FLASH_LED_STROBE */
                PIN_SLP(gpc0-2, INPUT, DOWN);   /* FLASH_LED_TORCH */
                PIN_SLP(gpd4-0, PREV, DOWN);    /* BT_EN */
+
+               PIN_SLP(gpd8-0, OUT1, UP);      /* SHUB_SPI_SCK */
+               PIN_SLP(gpd8-1, OUT1, UP);      /* SHUB_SPI_SSN */
+               PIN_SLP(gpd6-0, INPUT, DOWN);   /* SHUB_SPI_MISO */
+               PIN_SLP(gpd6-1, OUT1, UP);      /* SHUB_SPI_MOSI */
+               PIN_SLP(gpg2-0, PREV, NONE);    /* GPS_HUB_EN */
        };
 
        fimc_is_ois_hsi2c_on: fimc-is-ois-hsi2c-on {