Chinaunix首页 | 论坛 | 博客
  • 博客访问: 248031
  • 博文数量: 66
  • 博客积分: 290
  • 博客等级: 入伍新兵
  • 技术积分: 342
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-27 15:44
文章分类

全部博文(66)

文章存档

2013年(19)

2012年(47)

分类: LINUX

2013-05-30 10:26:25

Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4

AM335x开发板

红色为注释了的

蓝色为添加上的

PATH 表示当前修改文件的路径

line  表示要修改的代码在当前文件的开始行

 

1,在原来的开发板上

1,修改 LCD 的分辨率:

ti-sdk-am335x-evm/board-support/linux-3.2-psp04.06.00.07.sdk/drivers/video/da8xx-fb.c

//@line 275

[3] = {

              .name = "HANSTAR_HSD070IDW1_A",

//@@             .width = 800,

//@@             .height = 480,

              .width = 800,  //@@

              .height = 600, //@@

 

              .hfp = 210,

              .hbp = 46,

              .hsw = 40,

              .vfp = 12,

              .vbp = 23,

              .vsw = 20,

              .pxl_clk = 40000000,

              .invert_pxl_clk = 0,

       },

/* add end */

 

2,修改 LCD 显示ide颜色位,从24 变为 16

1,先修改 bpp 的取值范围

ti-sdk-am335x-evm/board-support/linux-3.2-psp04.06.00.07.sdk/arch/arm/mach-omap2

/board-am335xevm.c

//@line 127

static const struct display_panel disp_panel = {

       WVGA,

 

//@@      32,

       32,                 //@@max_bpp

//@@      32,

       8,                  //@@min_bpp

 

       COLOR_ACTIVE,

};

 

2,再修改当前 LCD 配置的 bpp 大小

ti-sdk-am335x-evm/board-support/linux-3.2-psp04.06.00.07.sdk/arch/arm/mach-omap2

/board-am335xevm.c

//@line 154

static struct lcd_ctrl_config lcd_cfg = {

       &disp_panel,

       .ac_bias          = 255,

       .ac_bias_intrpt              = 0,

       .dma_burst_sz              = 16,

 

//@@      .bpp               = 32,

       .bpp               = 16,       //@@

 

       .fdd               = 0x80,

       .tft_alt_mode         = 0,

 

       .stn_565_mode             = 0,

 

       .mono_8bit_mode          = 0,

       .invert_line_clock   = 1,

       .invert_frm_clock   = 1,

       .sync_edge            = 0,

       .sync_ctrl              = 1,

       .raster_order          = 0,

};

 

 

3,使能 uart2

需要修改 uart2 rxdtxd pin 属性

1,  硬件上修改

焊接 R486R487

 

 

2,  软件上修改

1,  uart2 pin 配置

PATH: linux-3.2-psp04.06.07.sdk/arch/arm/mach-omap2/board-am335xevm.c

//line 668

/* Module pin mux for uart2 */

static struct pinmux_config uart2_pin_mux[] = {

/*@@

{"spi0_sclk.uart2_rxd", OMAP_MUX_MODE1 | AM33XX_SLEWCTRL_SLOW |

                                    AM33XX_PIN_INPUT_PULLUP},

{"spi0_d0.uart2_txd", OMAP_MUX_MODE1 | AM33XX_PULL_UP |

                                    AM33XX_PULL_DISA |

                                    AM33XX_SLEWCTRL_SLOW},

@@*/

{"spi0_sclk.uart2_rxd", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP},

{"spi0_d0.uart2_txd",OMAP_MUX_MODE1 | AM33XX_PULL_UP | AM33XX_PULL_ENBL},

{NULL, 0},

 

};

 

2,  失能 spi0

PATH: linux-3.2-psp04.06.07.sdk/arch/arm/mach-omap2/board-am335xevm.c

//line 1795 @@

//@@      {spi0_init,       DEV_ON_DGHTR_BRD, PROFILE_2};     //uart2_rxd/txd_mux3

 

 

3,修改当前 uart2 使用的板子类型

PATH: linux-3.2-psp04.06.07.sdk/arch/arm/mach-omap2/board-am335xevm.c

// line 1802

//@@       {uart2_init,     DEV_ON_DGHTR_BRD, PROFILE_3},

       {uart2_init,     DEV_ON_BASEBOARD, PROFILE_ALL}, //@@

 

 

 

4,  使能 uart4

1,  硬件上的修改

1,  焊接上 R362,使 uart4 txd 端可以发送数据

2,  断开 R364 的连接(这是 U18 ROUT2 端,uart4 通过该端口接收数据),

断开 R61 的连接(U4 pin 45 连接着 AM335X_UART0_CTSn,这会使 uart4 无法接收数据),把(R364 MCU 的连接端)与 J52 pin 5)相连接,使 uart4 rxd端可以通过 UART0_CTSn 接收数据

 

2,  软件上的修改

1,  UART0_CTSN pin 上添加 uart4 rxd

UART0_RTSN pin 上添加 uart4 txd

PATHlinux-3.2-psp04.06.00.07.sdk/arch/arm/mach-omap2

//line 302 @@

/*@@

       _AM33XX_MUXENTRY(UART0_CTSN, 0,

              "uart0_ctsn", NULL, "d_can1_tx", "i2c1_sda",

              "spi1_d0", NULL, NULL, "gpio1_8"),

       _AM33XX_MUXENTRY(UART0_RTSN, 0,

              "uart0_rtsn", NULL, "d_can1_rx", "i2c1_scl",

              "spi1_d1", "spi1_cs0", NULL, "gpio1_9"),

@@*/

       //@@

       _AM33XX_MUXENTRY(UART0_CTSN, 0,                    

              "uart0_ctsn", "uart4_rxd", "d_can1_tx", "i2c1_sda",

              "spi1_d0", NULL, NULL, "gpio1_8"),

       _AM33XX_MUXENTRY(UART0_RTSN, 0,

              "uart0_rtsn", "uart4_txd", "d_can1_rx", "i2c1_scl",

              "spi1_d1", "spi1_cs0", NULL, "gpio1_9"),

       //@@

 

 

2,  添加 uart4 的配置等

PATH: linux-3.2-psp04.06.07.sdk/arch/arm/mach-omap2/board-am335xevm.c

1,  添加 uart4 的配置

//line 683 @@

/*@@ uart4*/

static struct pinmux_config uart4_pin_mux[] = {

  {"uart0_ctsn.uart4_rxd",OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP},

  {"uart0_rtsn.uart4_txd",OMAP_MUX_MODE1 | AM33XX_PULL_ENBL},

  {NULL, 0},

};

 

2,  添加 uart4 的初始化

//line 1073 @@

/*@@ setup uart4 */

static void uart4_init(int evm_id, int profile)

{

  setup_pin_mux(uart4_pin_mux);

  return;

}

 

3,  uart4 的初始化添加到开机启动中

//line 1086 @@

  {uart4_init,     DEV_ON_BASEBOARD, PROFILE_ALL}, //@@

 

4,  失能 d_can_init,其会影响 uart4 收发

//line 1800

//@@      {d_can_init,    DEV_ON_DGHTR_BRD, PROFILE_1},     //uart4_rxd/txd_mux1

 

 

5,使能 uart3

1,  硬件上修改

1,焊接 J51 上的 R495,使 ECAP0_IN_PWM0_OUT 管脚可以复用为 UART3_TXD

2,断开 J4 MMC0 上的 R380,使 AM335x_SPI0_CS1 管脚可以复用为 UART_RXD。把(R380中连接MMC0 卡套端)与(TP69AM335X_MCASP0_ACLKX))相连接,使能MMC0,使系统可以从 SD卡启动

 

2,  软件上修改

PATH: linux-3.2-psp04.06.07.sdk/arch/arm/mach-omap2/board-am335xevm.c

1,  重新配置 MMC0

//line 607 @@

/* Module pin mux for mmc0 */

 

/* Module pin mux for mmc0 */

static struct pinmux_config mmc0_pin_mux[] = {

       {"mmc0_dat3.mmc0_dat3",  OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},

       {"mmc0_dat2.mmc0_dat2",  OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},

       {"mmc0_dat1.mmc0_dat1",  OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},

       {"mmc0_dat0.mmc0_dat0",  OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},

       {"mmc0_clk.mmc0_clk",      OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},

       {"mmc0_cmd.mmc0_cmd",  OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},

       {"mcasp0_aclkr.mmc0_sdwp",OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP},

//@@注释      {"spi0_cs1.mmc0_sdcd", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP},

       {"mcasp0_aclkx.mmc0_sdcd", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP},//@@添加

       {NULL, 0},

};

 

2,  uart3 的初始化添加到开机启动中

//line 1805

  {uart3_init,     DEV_ON_BASEBOARD, PROFILE_ALL}, //@@

/* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}
阅读(6956) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~