From: Grazvydas Ignotas Date: Sat, 24 Mar 2012 16:48:12 +0000 (+0200) Subject: add some audio noise prevention measures X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-x-loader.git;a=commitdiff_plain;h=411b049808f7bf7e213525c514185534db53dbe8 add some audio noise prevention measures --- diff --git a/board/pandora/pandora.c b/board/pandora/pandora.c index 9086733..040a783 100644 --- a/board/pandora/pandora.c +++ b/board/pandora/pandora.c @@ -91,22 +91,28 @@ void udelay (unsigned long usecs) { *****************************************/ int board_init(void) { -#if defined(CFG_PRINTF) && defined(CONFIG_DRIVER_OMAP34XX_I2C) +#ifdef CONFIG_DRIVER_OMAP34XX_I2C unsigned char byte; - /* do additional init to prevent trash being output on startup */ - serial_init(); - /* restore GPBR1 for charging to work - * boot ROM or something clears it before us */ byte = 0x90; i2c_write(0x49, 0x91, 1, &byte, 1); + /* disable VSIM to prevent audio noise */ + byte = 0x00; + i2c_write(0x4B, 0x92, 1, &byte, 1); + +#ifdef CFG_PRINTF + /* do additional init to prevent trash being output on startup */ + serial_init(); + /* VAUX3 = 2.8V (AV connector) */ byte = 0x20; i2c_write(0x4B, 0x7A, 1, &byte, 1); byte = 0x03; i2c_write(0x4B, 0x7D, 1, &byte, 1); +#endif #endif return 0; @@ -692,14 +698,18 @@ void per_clocks_enable(void) MUX_VAL(CP(GPMC_WAIT0), (IEN | PTU | EN | M0)) /*GPMC_WAIT0*/\ MUX_VAL(CP(GPMC_WAIT1), (IEN | PTU | EN | M0)) /*GPMC_WAIT1*/\ /*Serial Interface (Peripheral boot, Linux console)*/\ - MUX_VAL(CP(UART3_RX_IRRX ), (IEN | PTD | DIS | M0)) /*UART3_RX*/\ - MUX_VAL(CP(UART3_TX_IRTX ), (IDIS | PTD | DIS | M0)) /*UART3_TX*/\ + MUX_VAL(CP(UART3_RX_IRRX), (IEN | PTU | EN | M0)) /*UART3_RX*/\ + MUX_VAL(CP(UART3_TX_IRTX), (IDIS | PTD | DIS | M0)) /*UART3_TX*/\ /*I2C Ports*/\ MUX_VAL(CP(I2C1_SCL), (IEN | PTU | EN | M0)) /*I2C1_SCL*/\ MUX_VAL(CP(I2C1_SDA), (IEN | PTU | EN | M0)) /*I2C1_SDA*/\ /*LEDs (Controlled by OMAP)*/\ MUX_VAL(CP(MMC1_DAT6), (IDIS | PTD | DIS | M4)) /*GPIO_128*/\ MUX_VAL(CP(MMC1_DAT7), (IDIS | PTD | DIS | M4)) /*GPIO_129*/\ + /*enable pulldowns for peripheral enable until u-boot loads*/\ + MUX_VAL(CP(ETK_D0_ES2), (IDIS | PTD | EN | M4)) /*GPIO_14*/\ + MUX_VAL(CP(McBSP2_DR), (IDIS | PTD | EN | M4)) /*GPIO_118*/\ + MUX_VAL(CP(McBSP1_FSR), (IDIS | PTD | EN | M4)) /*GPIO_157*/\ /********************************************************** * Routine: set_muxconf_regs