powerpc: dts: add QorIQ DPAA 1 FMan for P2041
[oweals/u-boot.git] / arch / arm / mach-exynos / pinmux.c
index f6743ca0f6ed4ab0c249656aa870fa6162fbce08..ad3fbf2da7a86d1089bfddb67994c36d7f05fdc7 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <asm/gpio.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/sromc.h>
@@ -378,6 +379,20 @@ static void exynos5_i2s_config(int peripheral)
        }
 }
 
+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;
@@ -550,6 +565,9 @@ static int exynos5420_pinmux_config(int peripheral, int flags)
        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;
@@ -863,7 +881,7 @@ static int exynos4x12_pinmux_config(int peripheral, int flags)
 int exynos_pinmux_config(int peripheral, int flags)
 {
        if (cpu_is_exynos5()) {
-               if (proid_is_exynos5420() || proid_is_exynos5422())
+               if (proid_is_exynos542x())
                        return exynos5420_pinmux_config(peripheral, flags);
                else if (proid_is_exynos5250())
                        return exynos5_pinmux_config(peripheral, flags);