return 0;
}
+static int exynos5420_set_i2s_clk_source(void)
+{
+ struct exynos5420_clock *clk =
+ (struct exynos5420_clock *)samsung_get_base_clock();
+
+ setbits_le32(&clk->src_top6, EXYNOS5420_CLK_SRC_MOUT_EPLL);
+ clrsetbits_le32(&clk->src_mau, EXYNOS5420_AUDIO0_SEL_MASK,
+ (EXYNOS5420_CLK_SRC_SCLK_EPLL));
+ setbits_le32(EXYNOS5_AUDIOSS_BASE, 1 << 0);
+
+ return 0;
+}
+
int exynos5_set_i2s_clk_source(unsigned int i2s_id)
{
struct exynos5_clock *clk =
int set_i2s_clk_source(unsigned int i2s_id)
{
- if (cpu_is_exynos5())
- return exynos5_set_i2s_clk_source(i2s_id);
+ if (cpu_is_exynos5()) {
+ if (proid_is_exynos542x())
+ return exynos5420_set_i2s_clk_source();
+ else
+ return exynos5_set_i2s_clk_source(i2s_id);
+ }
return 0;
}
#define AUDIO_1_RATIO_MASK 0x0f
#define AUDIO0_SEL_MASK 0xf
+#define EXYNOS5420_AUDIO0_SEL_MASK (0x3 << 28)
#define AUDIO1_SEL_MASK 0xf
#define CLK_SRC_SCLK_EPLL 0x7
+#define EXYNOS5420_CLK_SRC_SCLK_EPLL (0x6 << 28)
#define CLK_SRC_MOUT_EPLL (1<<12)
+#define EXYNOS5420_CLK_SRC_MOUT_EPLL BIT(20)
#define AUDIO_CLKMUX_ASS (1<<0)
/* CON0 bit-fields */
}
}
+static void exynos5420_i2s_config(int peripheral)
+{
+ int i;
+
+ switch (peripheral) {
+ case PERIPH_ID_I2S0:
+ for (i = 0; i < 5; i++)
+ gpio_cfg_pin(EXYNOS5420_GPIO_Z0 + i,
+ S5P_GPIO_FUNC(0x02));
+ break;
+ }
+}
+
+
void exynos5_spi_config(int peripheral)
{
int cfg = 0, pin = 0, i;
case PERIPH_ID_I2C10:
exynos5420_i2c_config(peripheral);
break;
+ case PERIPH_ID_I2S0:
+ exynos5420_i2s_config(peripheral);
+ break;
case PERIPH_ID_PWM0:
gpio_cfg_pin(EXYNOS5420_GPIO_B20, S5P_GPIO_FUNC(2));
break;