Esempio n. 1
0
static void mainboard_init(device_t dev)
{
    set_clock_sources();

    clock_external_output(1); /* For external MAX98090 audio codec. */

    /*
     * Confirmed by NVIDIA hardware team, we need to take ALL audio devices
     * conntected to AHUB (AUDIO, APBIF, I2S, DAM, AMX, ADX, SPDIF, AFC) out
     * of reset and clock-enabled, otherwise reading AHUB devices (In our
     * case, I2S/APBIF/AUDIO<XBAR>) will hang.
     *
     * Note that CLK_H_MEM (MC) and CLK_H_EMC should be already either
     * initialized by BootROM, or in romstage SDRAM initialization.
     */
    clock_enable_clear_reset(CLK_L_GPIO | CLK_L_I2C1 | CLK_L_SDMMC4 |
                             CLK_L_I2S0 | CLK_L_I2S1 | CLK_L_I2S2 |
                             CLK_L_SPDIF | CLK_L_USBD | CLK_L_DISP1 |
                             CLK_L_HOST1X | CLK_L_PWM,

                             CLK_H_I2C2 | CLK_H_PMC | CLK_H_USB3,

                             CLK_U_CSITE | CLK_U_SDMMC3,

                             CLK_V_I2C4 | CLK_V_EXTPERIPH1 | CLK_V_APBIF |
                             CLK_V_AUDIO | CLK_V_I2S3 | CLK_V_I2S4 |
                             CLK_V_DAM0 | CLK_V_DAM1 | CLK_V_DAM2,

                             CLK_W_DVFS | CLK_W_AMX0 | CLK_W_ADX0,

                             CLK_X_DPAUX | CLK_X_SOR0 | CLK_X_AMX1 |
                             CLK_X_ADX1 | CLK_X_AFC0 | CLK_X_AFC1 |
                             CLK_X_AFC2 | CLK_X_AFC3 | CLK_X_AFC4 |
                             CLK_X_AFC5);

    usb_setup_utmip((void*)TEGRA_USBD_BASE);
    /* USB2 is the camera, we don't need it in firmware */
    usb_setup_utmip((void*)TEGRA_USB3_BASE);

    setup_pinmux();

    i2c_init(0);
    i2c_init(1);
    i2c_init(3);

    setup_kernel_info();
    clock_init_arm_generic_timer();
    setup_ec_spi();
#if CONFIG_ELOG
    elog_init();
    elog_add_boot_reason();
#endif
}
Esempio n. 2
0
static void mainboard_init(device_t dev)
{
	gpio_output(GPIO_RESET, 0);

	configure_usb();
	configure_emmc();
	configure_codec();
	/* No video. */

	elog_init();
	elog_add_watchdog_reset();
	elog_add_boot_reason();
}
Esempio n. 3
0
static void mainboard_init(device_t dev)
{
	gpio_output(GPIO_RESET, 0);

	configure_usb();
	configure_emmc();
	configure_codec();
	configure_3g();
	/* No video. */

	elog_init();
	elog_add_watchdog_reset();
	elog_add_boot_reason();

	/* If recovery mode is detected, reduce frequency and voltage to reduce
	 * heat in case machine is left unattended. chrome-os-partner:41201. */
	if (recovery_mode_enabled())  {
		printk(BIOS_DEBUG, "Reducing APLL freq for recovery mode.\n");
		rkclk_configure_cpu(APLL_600_MHZ);
		rk808_configure_buck(1, 900);
	}
}
Esempio n. 4
0
static void mainboard_init(device_t dev)
{
	soc_configure_funits(funits, ARRAY_SIZE(funits));

	/* I2C6 bus (audio, etc.) */
	soc_configure_i2c6pad();
	i2c_init(I2C6_BUS);

	setup_audio();
	/* Temp hack for P1 board: Enable speaker amp (powerup, etc.) */
	enable_ad4567_spkr_amp();

	elog_init();
	elog_add_boot_reason();

	fix_ec_sw_sync();

	/* configure panel gpio pads */
	soc_configure_pads(lcd_gpio_padcfgs, ARRAY_SIZE(lcd_gpio_padcfgs));

	/* if panel needs to bringup */
	if (!vboot_skip_display_init())
		configure_display_blocks();
}