diff options
author | Hyungwoo Yang <hyungwooy@nvidia.com> | 2011-10-24 15:06:17 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:33 -0800 |
commit | 187ada86d745a7f4fed96cd6017275dbe9b21fbb (patch) | |
tree | b12a924a37dd17cd0dcb6fd705e3b8f02af1887a /arch/arm/mach-tegra/board-cardhu-pinmux.c | |
parent | b04d67acb91dc0f388675f85a28bfa955c25d978 (diff) |
video: tegra: support display board PM313
This change supports PM313 with 19X12 panel.
The change uses PM313 in "Single input to Dual output" mode
Bug ID : 822980
Reviewed-on: http://git-master/r/50215
(cherry picked from commit b83e795747fa860b5b7fb66b2067ebe4f15bcfd0)
Change-Id: Iabf707ded2976e9877481c215d0b1f1940781f14
Reviewed-on: http://git-master/r/60085
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: Re8eadc35c75fa21b0a5f3cb3bee0e8cb77dc3238
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-pinmux.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-pinmux.c | 71 |
1 files changed, 57 insertions, 14 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-pinmux.c b/arch/arm/mach-tegra/board-cardhu-pinmux.c index cb3344d4e002..c07d8d5be280 100644 --- a/arch/arm/mach-tegra/board-cardhu-pinmux.c +++ b/arch/arm/mach-tegra/board-cardhu-pinmux.c @@ -213,9 +213,7 @@ static __initdata struct tegra_pingroup_config cardhu_pinmux_common[] = { DEFAULT_PINMUX(LCD_SDIN, DISPLAYA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(LCD_SDOUT, DISPLAYA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(LCD_WR_N, DISPLAYA, NORMAL, NORMAL, INPUT), - DEFAULT_PINMUX(LCD_CS0_N, DISPLAYA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(LCD_DC0, DISPLAYA, NORMAL, NORMAL, INPUT), - DEFAULT_PINMUX(LCD_SCK, DISPLAYA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(LCD_PWR0, DISPLAYA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(LCD_PCLK, DISPLAYA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(LCD_DE, DISPLAYA, NORMAL, NORMAL, INPUT), @@ -245,8 +243,6 @@ static __initdata struct tegra_pingroup_config cardhu_pinmux_common[] = { DEFAULT_PINMUX(LCD_D21, DISPLAYA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(LCD_D22, DISPLAYA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(LCD_D23, DISPLAYA, NORMAL, NORMAL, INPUT), - DEFAULT_PINMUX(LCD_CS1_N, DISPLAYA, NORMAL, NORMAL, INPUT), - DEFAULT_PINMUX(LCD_M1, DISPLAYA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(LCD_DC1, DISPLAYA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(CRT_HSYNC, CRT, NORMAL, NORMAL, OUTPUT), DEFAULT_PINMUX(CRT_VSYNC, CRT, NORMAL, NORMAL, OUTPUT), @@ -318,9 +314,7 @@ static __initdata struct tegra_pingroup_config cardhu_pinmux_common[] = { DEFAULT_PINMUX(GMI_OE_N, NAND, NORMAL, NORMAL, OUTPUT), DEFAULT_PINMUX(GMI_DQS, NAND, NORMAL, NORMAL, INPUT), #else - DEFAULT_PINMUX(GMI_CS2_N, RSVD1, PULL_UP, NORMAL, INPUT), /* EN_VDD_BL1 */ DEFAULT_PINMUX(GMI_AD8, PWM0, NORMAL, NORMAL, OUTPUT), /* LCD1_BL_PWM */ - DEFAULT_PINMUX(GMI_AD10, NAND, NORMAL, NORMAL, OUTPUT), /* LCD1_BL_EN */ #endif DEFAULT_PINMUX(GMI_A16, SPI4, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(GMI_A17, SPI4, NORMAL, NORMAL, INPUT), @@ -424,12 +418,20 @@ static __initdata struct tegra_pingroup_config cardhu_pinmux_common[] = { static __initdata struct tegra_pingroup_config cardhu_pinmux_e118x[] = { /* Power rails GPIO */ DEFAULT_PINMUX(SPI2_SCK, SPI2, NORMAL, NORMAL, INPUT), - DEFAULT_PINMUX(GMI_CS2_N, NAND, NORMAL, NORMAL, OUTPUT), DEFAULT_PINMUX(GMI_RST_N, RSVD3, PULL_UP, TRISTATE, INPUT), DEFAULT_PINMUX(GMI_AD15, NAND, PULL_UP, TRISTATE, INPUT), }; static __initdata struct tegra_pingroup_config cardhu_pinmux_cardhu[] = { + DEFAULT_PINMUX(LCD_CS0_N, DISPLAYA, NORMAL, NORMAL, INPUT), + DEFAULT_PINMUX(LCD_SCK, DISPLAYA, NORMAL, NORMAL, INPUT), + DEFAULT_PINMUX(LCD_CS1_N, DISPLAYA, NORMAL, NORMAL, INPUT), + DEFAULT_PINMUX(LCD_M1, DISPLAYA, NORMAL, NORMAL, INPUT), + + DEFAULT_PINMUX(GMI_CS2_N, RSVD1, PULL_UP, NORMAL, INPUT), + DEFAULT_PINMUX(GMI_AD8, PWM0, NORMAL, NORMAL, OUTPUT), + DEFAULT_PINMUX(GMI_AD10, NAND, NORMAL, NORMAL, OUTPUT), + /* Power rails GPIO */ DEFAULT_PINMUX(GMI_CS2_N, NAND, NORMAL, NORMAL, OUTPUT), DEFAULT_PINMUX(GMI_RST_N, RSVD3, PULL_UP, TRISTATE, INPUT), @@ -442,6 +444,15 @@ static __initdata struct tegra_pingroup_config cardhu_pinmux_cardhu[] = { }; static __initdata struct tegra_pingroup_config cardhu_pinmux_cardhu_a03[] = { + DEFAULT_PINMUX(LCD_CS0_N, DISPLAYA, NORMAL, NORMAL, INPUT), + DEFAULT_PINMUX(LCD_SCK, DISPLAYA, NORMAL, NORMAL, INPUT), + DEFAULT_PINMUX(LCD_CS1_N, DISPLAYA, NORMAL, NORMAL, INPUT), + DEFAULT_PINMUX(LCD_M1, DISPLAYA, NORMAL, NORMAL, INPUT), + + DEFAULT_PINMUX(GMI_CS2_N, RSVD1, PULL_UP, NORMAL, INPUT), + DEFAULT_PINMUX(GMI_AD8, PWM0, NORMAL, NORMAL, OUTPUT), + DEFAULT_PINMUX(GMI_AD10, NAND, NORMAL, NORMAL, OUTPUT), + /* Power rails GPIO */ DEFAULT_PINMUX(PEX_L0_PRSNT_N, PCIE, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(PEX_L0_CLKREQ_N, PCIE, NORMAL, NORMAL, INPUT), @@ -454,6 +465,15 @@ static __initdata struct tegra_pingroup_config cardhu_pinmux_e1291_a04[] = { }; static __initdata struct tegra_pingroup_config cardhu_pinmux_e1198[] = { + DEFAULT_PINMUX(LCD_CS0_N, DISPLAYA, NORMAL, NORMAL, INPUT), + DEFAULT_PINMUX(LCD_SCK, DISPLAYA, NORMAL, NORMAL, INPUT), + DEFAULT_PINMUX(LCD_CS1_N, DISPLAYA, NORMAL, NORMAL, INPUT), + DEFAULT_PINMUX(LCD_M1, DISPLAYA, NORMAL, NORMAL, INPUT), + + DEFAULT_PINMUX(GMI_CS2_N, RSVD1, PULL_UP, NORMAL, INPUT), + DEFAULT_PINMUX(GMI_AD8, PWM0, NORMAL, NORMAL, OUTPUT), + DEFAULT_PINMUX(GMI_AD10, NAND, NORMAL, NORMAL, OUTPUT), + /* SPI2 */ DEFAULT_PINMUX(SPI2_SCK, SPI2, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(SPI2_MOSI, SPI2, PULL_UP, NORMAL, INPUT), @@ -646,19 +666,21 @@ int __init cardhu_pinmux_init(void) struct gpio_init_pin_info pin_lpm_cardhu_common[] = { PIN_GPIO_LPM("GMI_CS3_N", TEGRA_GPIO_PK4, 0, 0), PIN_GPIO_LPM("GMI_CS4_N", TEGRA_GPIO_PK2, 1, 0), - PIN_GPIO_LPM("GMI_AD9", TEGRA_GPIO_PH1, 0, 0), - PIN_GPIO_LPM("GMI_AD11", TEGRA_GPIO_PH3, 0, 0), PIN_GPIO_LPM("GMI_CS7", TEGRA_GPIO_PI6, 1, 0), PIN_GPIO_LPM("GMI_CS0", TEGRA_GPIO_PJ0, 1, 0), PIN_GPIO_LPM("GMI_CS1", TEGRA_GPIO_PJ2, 1, 0), PIN_GPIO_LPM("GMI_WP_N", TEGRA_GPIO_PC7, 1, 0), }; +/* E1198 without PM313 display board */ +struct gpio_init_pin_info pin_lpm_cardhu_common_wo_pm313[] = { + PIN_GPIO_LPM("GMI_AD9", TEGRA_GPIO_PH1, 0, 0), + PIN_GPIO_LPM("GMI_AD11", TEGRA_GPIO_PH3, 0, 0), +}; + struct gpio_init_pin_info vddio_gmi_pins_pm269[] = { - PIN_GPIO_LPM("GMI_CS2", TEGRA_GPIO_PK3, 1, 0), PIN_GPIO_LPM("GMI_CS3_N", TEGRA_GPIO_PK4, 0, 0), PIN_GPIO_LPM("GMI_CS4_N", TEGRA_GPIO_PK2, 1, 0), - PIN_GPIO_LPM("GMI_AD9", TEGRA_GPIO_PH1, 0, 0), PIN_GPIO_LPM("GMI_CS7", TEGRA_GPIO_PI6, 1, 0), PIN_GPIO_LPM("GMI_CS0", TEGRA_GPIO_PJ0, 1, 0), PIN_GPIO_LPM("GMI_CS1", TEGRA_GPIO_PJ2, 1, 0), @@ -669,6 +691,12 @@ struct gpio_init_pin_info vddio_gmi_pins_pm269[] = { PIN_GPIO_LPM("GMI_A19", TEGRA_GPIO_PK7, 0, 0), }; +/* PM269 without PM313 display board */ +struct gpio_init_pin_info vddio_gmi_pins_pm269_wo_pm313[] = { + PIN_GPIO_LPM("GMI_CS2", TEGRA_GPIO_PK3, 1, 0), + PIN_GPIO_LPM("GMI_AD9", TEGRA_GPIO_PH1, 0, 0), +}; + static void set_unused_pin_gpio(struct gpio_init_pin_info *lpm_pin_info, int list_count) { @@ -707,18 +735,33 @@ static void set_unused_pin_gpio(struct gpio_init_pin_info *lpm_pin_info, int __init cardhu_pins_state_init(void) { struct board_info board_info; + struct board_info display_board_info; tegra_get_board_info(&board_info); + tegra_get_display_board_info(&display_board_info); if ((board_info.board_id == BOARD_E1291) || - (board_info.board_id == BOARD_E1198)) + (board_info.board_id == BOARD_E1198)) { set_unused_pin_gpio(&pin_lpm_cardhu_common[0], ARRAY_SIZE(pin_lpm_cardhu_common)); + if (display_board_info.board_id != BOARD_DISPLAY_PM313) { + set_unused_pin_gpio(&pin_lpm_cardhu_common_wo_pm313[0], + ARRAY_SIZE(pin_lpm_cardhu_common_wo_pm313)); + } + } + if ((board_info.board_id == BOARD_PM269) || (board_info.board_id == BOARD_E1257) || (board_info.board_id == BOARD_PM305) || - (board_info.board_id == BOARD_PM311)) - set_unused_pin_gpio(&vddio_gmi_pins_pm269[0], + (board_info.board_id == BOARD_PM311)) { + set_unused_pin_gpio(&vddio_gmi_pins_pm269[0], ARRAY_SIZE(vddio_gmi_pins_pm269)); + + if (display_board_info.board_id != BOARD_DISPLAY_PM313) { + set_unused_pin_gpio(&vddio_gmi_pins_pm269_wo_pm313[0], + ARRAY_SIZE(vddio_gmi_pins_pm269_wo_pm313)); + } + } + return 0; } |