Example #1
0
static void gpio_init(void)
{
	/* Set up the I2C busses. */
	exynos_pinmux_i2c0();
	exynos_pinmux_i2c1();
	exynos_pinmux_i2c2();
	exynos_pinmux_i2c3();
	exynos_pinmux_i2c4();
	exynos_pinmux_i2c7();

	/* Set up the GPIOs used to arbitrate for I2C bus 4. */
	gpio_set_pull(GPIO_F03, GPIO_PULL_NONE);
	gpio_set_pull(GPIO_E04, GPIO_PULL_NONE);
	gpio_direction_output(GPIO_F03, 1);
	gpio_direction_input(GPIO_E04);

	/* Set up the GPIO used to enable the audio codec. */
	gpio_set_pull(GPIO_X17, GPIO_PULL_NONE);
	gpio_set_pull(GPIO_X15, GPIO_PULL_NONE);
	gpio_direction_output(GPIO_X17, 1);
	gpio_direction_output(GPIO_X15, 1);

	/* Set up the I2S busses. */
	exynos_pinmux_i2s0();
	exynos_pinmux_i2s1();
}
Example #2
0
static void gpio_init(void)
{
	/* Set up the I2C busses. */
	exynos_pinmux_i2c2();
	exynos_pinmux_i2c4();
	exynos_pinmux_i2c7();
	exynos_pinmux_i2c8();
	exynos_pinmux_i2c9();
	exynos_pinmux_i2c10();
}
Example #3
0
static void parade_dp_bridge_setup(void)
{
	int i;

	gpio_set_value(dp_pd_l, 1);
	gpio_cfg_pin(dp_pd_l, GPIO_OUTPUT);
	gpio_set_pull(dp_pd_l, GPIO_PULL_NONE);

	gpio_set_value(dp_rst_l, 0);
	gpio_cfg_pin(dp_rst_l, GPIO_OUTPUT);
	gpio_set_pull(dp_rst_l, GPIO_PULL_NONE);
	udelay(10);
	gpio_set_value(dp_rst_l, 1);


	gpio_set_pull(dp_hpd, GPIO_PULL_NONE);
	gpio_cfg_pin(dp_hpd, GPIO_INPUT);

	/* De-assert PD (and possibly RST) to power up the bridge. */
	gpio_set_value(dp_pd_l, 1);
	gpio_set_value(dp_rst_l, 1);

	/* Hang around for the bridge to come up. */
	mdelay(40);

	/* Configure the bridge chip. */
	exynos_pinmux_i2c7();
	i2c_init(7, 100000, 0x00);

	parade_ps8625_bridge_setup(7, 0x48, parade_writes,
				   ARRAY_SIZE(parade_writes));
	/* Spin until the display is ready.
	 * It's quite important to try really hard to get the display up,
	 * so be generous. It will typically be ready in only 5 ms. and
	 * we're out of here.
	 * If it's not ready after a second, then we're in big trouble.
	 */
	for(i = 0; i < 1000; i++){
		if (gpio_get_value(dp_hpd))
			break;
		mdelay(1);
	}
}