mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-14 06:35:12 +00:00
arm: omap3: cm-t3517: rtc fix
Fix rtc gpios and mux Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
4912cf04b2
commit
fec5568cbc
1 changed files with 22 additions and 3 deletions
|
@ -124,8 +124,9 @@ static inline void cm_t3517_init_hecc(void) {}
|
||||||
#if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
|
#if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
|
||||||
#define RTC_IO_GPIO (153)
|
#define RTC_IO_GPIO (153)
|
||||||
#define RTC_WR_GPIO (154)
|
#define RTC_WR_GPIO (154)
|
||||||
#define RTC_RD_GPIO (160)
|
#define RTC_RD_GPIO (53)
|
||||||
#define RTC_CS_GPIO (163)
|
#define RTC_CS_GPIO (163)
|
||||||
|
#define RTC_CS_EN_GPIO (160)
|
||||||
|
|
||||||
struct v3020_platform_data cm_t3517_v3020_pdata = {
|
struct v3020_platform_data cm_t3517_v3020_pdata = {
|
||||||
.use_gpio = 1,
|
.use_gpio = 1,
|
||||||
|
@ -145,6 +146,16 @@ static struct platform_device cm_t3517_rtc_device = {
|
||||||
|
|
||||||
static void __init cm_t3517_init_rtc(void)
|
static void __init cm_t3517_init_rtc(void)
|
||||||
{
|
{
|
||||||
|
int err;
|
||||||
|
|
||||||
|
err = gpio_request(RTC_CS_EN_GPIO, "rtc cs en");
|
||||||
|
if (err) {
|
||||||
|
pr_err("CM-T3517: rtc cs en gpio request failed: %d\n", err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
gpio_direction_output(RTC_CS_EN_GPIO, 1);
|
||||||
|
|
||||||
platform_device_register(&cm_t3517_rtc_device);
|
platform_device_register(&cm_t3517_rtc_device);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -256,11 +267,19 @@ static void __init cm_t3517_init_irq(void)
|
||||||
static struct omap_board_mux board_mux[] __initdata = {
|
static struct omap_board_mux board_mux[] __initdata = {
|
||||||
/* GPIO186 - Green LED */
|
/* GPIO186 - Green LED */
|
||||||
OMAP3_MUX(SYS_CLKOUT2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
|
OMAP3_MUX(SYS_CLKOUT2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
|
||||||
/* RTC GPIOs: IO, WR#, RD#, CS# */
|
|
||||||
|
/* RTC GPIOs: */
|
||||||
|
/* IO - GPIO153 */
|
||||||
OMAP3_MUX(MCBSP4_DR, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
OMAP3_MUX(MCBSP4_DR, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
||||||
|
/* WR# - GPIO154 */
|
||||||
OMAP3_MUX(MCBSP4_DX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
OMAP3_MUX(MCBSP4_DX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
||||||
OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
/* RD# - GPIO53 */
|
||||||
|
OMAP3_MUX(GPMC_NCS2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
||||||
|
/* CS# - GPIO163 */
|
||||||
OMAP3_MUX(UART3_CTS_RCTX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
OMAP3_MUX(UART3_CTS_RCTX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
||||||
|
/* CS EN - GPIO160 */
|
||||||
|
OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
||||||
|
|
||||||
/* HSUSB1 RESET */
|
/* HSUSB1 RESET */
|
||||||
OMAP3_MUX(UART2_TX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
|
OMAP3_MUX(UART2_TX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
|
||||||
/* HSUSB2 RESET */
|
/* HSUSB2 RESET */
|
||||||
|
|
Loading…
Reference in a new issue