#define TOUCH_SCREEN_DISPLAY_PIN INVALID_GPIO
#define TOUCH_SCREEN_DISPLAY_VALUE GPIO_HIGH
-#if 1
-void key_gpio_pullupdown_enable(void)
-{ gpio_pull_updown(RK29_PIN6_PA0, 0);
- gpio_pull_updown(RK29_PIN6_PA1, 0);
- gpio_pull_updown(RK29_PIN6_PA2, 0);
- gpio_pull_updown(RK29_PIN6_PA3, 0);
- gpio_pull_updown(RK29_PIN6_PA4, 0);
- gpio_pull_updown(RK29_PIN6_PA5, 0);
- gpio_pull_updown(RK29_PIN6_PA6, 0);
-
-}
-void key_gpio_pullupdown_disable(void)
-{
- gpio_pull_updown(RK29_PIN6_PA0, 1);
- gpio_pull_updown(RK29_PIN6_PA1, 1);
- gpio_pull_updown(RK29_PIN6_PA2, 1);
- gpio_pull_updown(RK29_PIN6_PA3, 1);
- gpio_pull_updown(RK29_PIN6_PA4, 1);
- gpio_pull_updown(RK29_PIN6_PA5, 1);
- gpio_pull_updown(RK29_PIN6_PA6, 1);
-}
-void rk29_setgpio_suspend_board(void)
-{
-
- key_gpio_pullupdown_enable();
-
-}
-
-void rk29_setgpio_resume_board(void)
-{
-
- key_gpio_pullupdown_disable();
-
- }
-#endif
-
-
-
#ifdef CONFIG_FB_RK29
/*****************************************************************************************
* lcd devices
#endif
+#if defined(CONFIG_RK29_GPIO_SUSPEND)
+void key_gpio_pullupdown_enable(void)
+{ gpio_pull_updown(RK29_PIN6_PA0, 0);
+ gpio_pull_updown(RK29_PIN6_PA1, 0);
+ gpio_pull_updown(RK29_PIN6_PA2, 0);
+ gpio_pull_updown(RK29_PIN6_PA3, 0);
+ gpio_pull_updown(RK29_PIN6_PA4, 0);
+ gpio_pull_updown(RK29_PIN6_PA5, 0);
+ gpio_pull_updown(RK29_PIN6_PA6, 0);
+
+}
+void key_gpio_pullupdown_disable(void)
+{
+ gpio_pull_updown(RK29_PIN6_PA0, 1);
+ gpio_pull_updown(RK29_PIN6_PA1, 1);
+ gpio_pull_updown(RK29_PIN6_PA2, 1);
+ gpio_pull_updown(RK29_PIN6_PA3, 1);
+ gpio_pull_updown(RK29_PIN6_PA4, 1);
+ gpio_pull_updown(RK29_PIN6_PA5, 1);
+ gpio_pull_updown(RK29_PIN6_PA6, 1);
+}
+void rk29_setgpio_suspend_board(void)
+{
+
+ key_gpio_pullupdown_enable();
+
+}
+
+void rk29_setgpio_resume_board(void)
+{
+
+ key_gpio_pullupdown_disable();
+
+ }
+#else
+void rk29_setgpio_suspend_board(void)
+{}
+void rk29_setgpio_resume_board(void)
+{}
+#endif
+
#if defined(CONFIG_RK_IRDA) || defined(CONFIG_BU92747GUW_CIR)
#define BU92747GUW_RESET_PIN RK29_PIN3_PD4// INVALID_GPIO //
#define BU92747GUW_RESET_MUX_NAME GPIO3D4_HOSTWRN_NAME//NULL //
#endif
+#if defined(CONFIG_SDMMC0_RK29_WRITE_PROTECT)
+#define SDMMC0_WRITE_PROTECT_PIN RK29_PIN6_PB0 //According to your own project to set the value of write-protect-pin.
+#endif
+
+
+#if defined(CONFIG_SDMMC1_RK29_WRITE_PROTECT)
+#define SDMMC1_WRITE_PROTECT_PIN RK29_PIN6_PB0 //According to your own project to set the value of write-protect-pin.
+#endif
+
/*****************************************************************************************
* SDMMC devices
*****************************************************************************************/
#else
gpio_direction_output(RK29_PIN5_PD5,GPIO_LOW);
#endif
+
+#if defined(CONFIG_SDMMC0_RK29_WRITE_PROTECT)
+ gpio_request(SDMMC0_WRITE_PROTECT_PIN,"sdmmc-wp");
+ gpio_direction_input(SDMMC0_WRITE_PROTECT_PIN);
+#endif
+
return 0;
}
#endif
.detect_irq = RK29_PIN2_PA2, // INVALID_GPIO
.enable_sd_wakeup = 0,
+
+#if defined(CONFIG_SDMMC0_RK29_WRITE_PROTECT)
+ .write_prt = SDMMC0_WRITE_PROTECT_PIN,
+#else
+ .write_prt = INVALID_GPIO,
+#endif
};
#endif
#ifdef CONFIG_SDMMC1_RK29
rk29_mux_api_set(GPIO1C5_SDMMC1DATA2_NAME, GPIO1H_SDMMC1_DATA2);
rk29_mux_api_set(GPIO1C6_SDMMC1DATA3_NAME, GPIO1H_SDMMC1_DATA3);
//rk29_mux_api_set(GPIO1C0_UART0CTSN_SDMMC1DETECTN_NAME, GPIO1H_SDMMC1_DETECT_N);
+
+#if defined(CONFIG_SDMMC1_RK29_WRITE_PROTECT)
+ gpio_request(SDMMC1_WRITE_PROTECT_PIN,"sdio-wp");
+ gpio_direction_input(SDMMC1_WRITE_PROTECT_PIN);
+#endif
return 0;
}
#if 0
.detect_irq = RK29SDK_WIFI_SDIO_CARD_DETECT_N,
#endif
+
+#if defined(CONFIG_SDMMC1_RK29_WRITE_PROTECT)
+ .write_prt = SDMMC1_WRITE_PROTECT_PIN,
+#else
+ .write_prt = INVALID_GPIO,
+#endif
+
};
#endif