dm: exynos: sound: Convert to use driver model
authorSimon Glass <sjg@chromium.org>
Mon, 10 Dec 2018 17:37:44 +0000 (10:37 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 13 Dec 2018 23:36:30 +0000 (16:36 -0700)
Update snow's device tree and config to use driver model for sound. Also
update the others as best we can.

Spring does not appear to have audio support in the kernel. The smdk5250
and smdk5420 boards use a wolfson codec which I cannot test with. So the
only boards that is tested and known to work are snow, pit and pi.

Signed-off-by: Simon Glass <sjg@chromium.org>
15 files changed:
arch/arm/dts/exynos5250-smdk5250.dts
arch/arm/dts/exynos5250-snow.dts
arch/arm/dts/exynos5250-spring.dts
arch/arm/dts/exynos5250.dtsi
arch/arm/dts/exynos5420-peach-pit.dts
arch/arm/dts/exynos5420-smdk5420.dts
arch/arm/dts/exynos54xx.dtsi
arch/arm/dts/exynos5800-peach-pi.dts
configs/arndale_defconfig
configs/peach-pi_defconfig
configs/peach-pit_defconfig
configs/smdk5250_defconfig
configs/snow_defconfig
configs/spring_defconfig
drivers/sound/samsung_sound.c

index bf60b82d4492366696dac5d3cd0786ae8975d530..e542a7907610ae4f615ff81333bd318f1fea4c96 100644 (file)
        };
 
        i2c@12C70000 {
-               soundcodec@1a {
+               wm8994: soundcodec@1a {
                        reg = <0x1a>;
                        u-boot,i2c-offset-len = <2>;
-                       compatible = "wolfson,wm8994-codec";
+                       compatible = "wolfson,wm8994";
+                       #sound-dai-cells = <1>;
+               };
+       };
+
+       sound {
+               compatible = "google,smdk5250-audio-wm8994";
+
+               samsung,model = "SMDK5250-I2S-WM8994";
+               samsung,audio-codec = <&wm8994>;
+
+               cpu {
+                       sound-dai = <&i2s0 0>;
+               };
+
+               codec {
+                       sound-dai = <&wm8994 0>;
                };
        };
 
index cb5067b9669e640ef027c5649b05e5111ca0cc5a..7587dc0ff24dd5c1cc2a75c5a07dad4c134d3388 100644 (file)
@@ -40,7 +40,6 @@
                mmc3 = "/mmc@12230000";
                serial0 = "/serial@12C30000";
                console = "/serial@12C30000";
-               i2s = "/sound@3830000";
        };
 
         memory {
                        };
                };
 
-               soundcodec@11 {
+               max98095: codec@11 {
+                       compatible = "maxim,max98095";
                        reg = <0x11>;
-                       compatible = "maxim,max98095-codec";
+                       #sound-dai-cells = <1>;
                };
        };
 
                };
        };
 
-       sound@3830000 {
-               samsung,codec-type = "max98095";
+       sound {
+               compatible = "google,snow-audio-max98095";
+
+               samsung,model = "Snow-I2S-MAX98095";
+               samsung,audio-codec = <&max98095>;
                codec-enable-gpio = <&gpx1 7 GPIO_ACTIVE_HIGH>;
+
+               cpu {
+                       sound-dai = <&i2s0 0>;
+               };
+
+               codec {
+                       sound-dai = <&max98095 0>;
+               };
        };
 
        sound@12d60000 {
index 7633d36874ff23c978c4744802640c19cfc1bf9f..191e12af6a15bcfcf99f0c2effead5ee6bdd3af5 100644 (file)
@@ -34,7 +34,6 @@
                mmc0 = "/mmc@12200000";
                serial0 = "/serial@12C30000";
                console = "/serial@12C30000";
-               i2s = "/sound@3830000";
        };
 
        memory {
                };
        };
 
-       soundcodec@20 {
-               reg = <0x20>;
-               compatible = "maxim,max98088-codec";
+       max98095: soundcodec@10 {
+               reg = <0x10>;
+               compatible = "maxim,max98095";
+               #sound-dai-cells = <1>;
        };
+
+       sound {
+               compatible = "google,spring-audio-max98095";
+
+               samsung,model = "Spring-I2S-MAX98095";
+               samsung,audio-codec = <&max98095>;
+
+               cpu {
+                       sound-dai = <&i2s0 0>;
+               };
+
+               codec {
+                       sound-dai = <&max98095 0>;
+               };
+       };
+
 };
 
 #include "cros-ec-keyboard.dtsi"
index 502c687802ebfeb15c1d60b8f086cc6b399b9ee5..66c5b6dca95edddb0b9fe2d171377344b4f0baf4 100644 (file)
                #size-cells = <0>;
        };
 
-       sound@3830000 {
-               compatible = "samsung,exynos-sound";
-               reg = <0x3830000 0x50>;
+       i2s0: i2s@3830000 {
+               compatible = "samsung,s5pv210-i2s";
+               reg = <0x03830000 0x100>;
+               samsung,idma-addr = <0x03000000>;
+               #clock-cells = <1>;
+               #sound-dai-cells = <1>;
                samsung,i2s-epll-clock-frequency = <192000000>;
                samsung,i2s-sampling-rate = <48000>;
                samsung,i2s-bits-per-sample = <16>;
                samsung,i2s-id = <0>;
        };
 
-       sound@12d60000 {
-               compatible = "samsung,exynos-sound";
+       i2s1: i2s@12d60000 {
+               compatible = "samsung,s5pv210-i2s";
                reg = <0x12d60000 0x20>;
+               #clock-cells = <1>;
+               #sound-dai-cells = <1>;
                samsung,i2s-epll-clock-frequency = <192000000>;
                samsung,i2s-sampling-rate = <48000>;
                samsung,i2s-bits-per-sample = <16>;
index bd0a9c116d4795b69648ca30164afff3fa05f73e..4a96a18110a2fe85085ad9745bc14c267ca60a75 100644 (file)
                };
        };
 
+       sound {
+               compatible = "google,peach-audio-max98090";
+
+               samsung,model = "PEACH-I2S-MAX98090";
+               samsung,audio-codec = <&max98090>;
+
+               cpu {
+                       sound-dai = <&i2s0 0>;
+               };
+
+               codec {
+                       sound-dai = <&max98090 0>;
+               };
+       };
+
        i2c@12CD0000 { /* i2c7 */
                clock-frequency = <100000>;
-               soundcodec@10 {
+               max98090: soundcodec@10 {
                        reg = <0x10>;
-                       compatible = "maxim,max98090-codec";
+                       compatible = "maxim,max98090";
+                       #sound-dai-cells = <1>;
                };
 
                edp-lvds-bridge@48 {
index daaa4666964273b0ce3d376243a13b877fd741b6..7a5da674fbedebccbab8177a297dab0c2be4402a 100644 (file)
        };
 
        i2c@12C70000 {
-               soundcodec@1a {
+               wm8994: soundcodec@1a {
                        reg = <0x1a>;
                        u-boot,i2c-offset-len = <2>;
-                       compatible = "wolfson,wm8994-codec";
+                       compatible = "wolfson,wm8994";
+                       #sound-dai-cells = <1>;
+               };
+       };
+
+       sound {
+               compatible = "samsung,smdk5420-audio-wm8994";
+
+               samsung,model = "Snow-I2S-MAX98095";
+               samsung,audio-codec = <&wm8994>;
+
+               cpu {
+                       sound-dai = <&i2s0 0>;
+               };
+
+               codec {
+                       sound-dai = <&wm8994 0>;
                };
        };
 
index 09bef56e6c2cbefcd39e1fc53f1c6edfcc150b03..221da8b4850b58fb2778ee83819ca8cce4f0e9a7 100644 (file)
                interrupts = <0 203 0>;
        };
 
+       i2s0: i2s@3830000 {
+               compatible = "samsung,s5pv210-i2s";
+               reg = <0x03830000 0x100>;
+               #sound-dai-cells = <1>;
+               samsung,idma-addr = <0x03000000>;
+               samsung,i2s-epll-clock-frequency = <192000000>;
+               samsung,i2s-sampling-rate = <48000>;
+               samsung,i2s-bits-per-sample = <16>;
+               samsung,i2s-channels = <2>;
+               samsung,i2s-lr-clk-framesize = <256>;
+               samsung,i2s-bit-clk-framesize = <32>;
+               samsung,i2s-id = <0>;
+       };
+
        mmc@12200000 {
                samsung,bus-width = <8>;
                samsung,timing = <1 3 3>;
index 239781b34bba047a3bace9b9a3b588784c7b8ce8..63c0b186e426ffa9d05a9d7c560764158304dd0f 100644 (file)
                };
        };
 
+       sound {
+               compatible = "google,peach-audio-max98090";
+
+               samsung,model = "PEACH-I2S-MAX98090";
+               samsung,audio-codec = <&max98090>;
+
+               cpu {
+                       sound-dai = <&i2s0 0>;
+               };
+
+               codec {
+                       sound-dai = <&max98090 0>;
+               };
+       };
+
        i2c@12CD0000 { /* i2c7 */
                clock-frequency = <100000>;
-               soundcodec@10 {
+               max98090: soundcodec@10 {
                        reg = <0x10>;
-                       compatible = "maxim,max98090-codec";
+                       compatible = "maxim,max98090";
+                       #sound-dai-cells = <1>;
                };
        };
 
index 2b6af4b2215d18032e9dda6d1204cf5815a4176e..22881c3a2c679084bc1d99c842248b8079c879d3 100644 (file)
@@ -31,6 +31,7 @@ CONFIG_MMC_SDHCI_S5P=y
 CONFIG_SMC911X=y
 CONFIG_SMC911X_BASE=0x5000000
 CONFIG_SOUND=y
+CONFIG_DM_SOUND=y
 CONFIG_I2S=y
 CONFIG_I2S_SAMSUNG=y
 CONFIG_SOUND_MAX98095=y
index 338eae20b41bccb5548d11a595780423497365f0..5ced342316004875283cdbf8f97f609162f5a879 100644 (file)
@@ -21,6 +21,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
+CONFIG_CMD_SOUND=y
 CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_TPM=y
@@ -50,8 +51,10 @@ CONFIG_REGULATOR_TPS65090=y
 CONFIG_DM_PWM=y
 CONFIG_PWM_EXYNOS=y
 CONFIG_SOUND=y
+CONFIG_DM_SOUND=y
 CONFIG_I2S=y
 CONFIG_I2S_SAMSUNG=y
+CONFIG_SOUND_MAX98090=y
 CONFIG_SOUND_MAX98095=y
 CONFIG_SOUND_WM8994=y
 CONFIG_EXYNOS_SPI=y
index 933c823ea86f51fd6f53dffbda97898006c7d701..b1fe3f73abb33bd5429adcc9e6f942fd303886a3 100644 (file)
@@ -20,6 +20,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
+CONFIG_CMD_SOUND=y
 CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_TPM=y
@@ -49,8 +50,10 @@ CONFIG_REGULATOR_TPS65090=y
 CONFIG_DM_PWM=y
 CONFIG_PWM_EXYNOS=y
 CONFIG_SOUND=y
+CONFIG_DM_SOUND=y
 CONFIG_I2S=y
 CONFIG_I2S_SAMSUNG=y
+CONFIG_SOUND_MAX98090=y
 CONFIG_SOUND_MAX98095=y
 CONFIG_SOUND_WM8994=y
 CONFIG_EXYNOS_SPI=y
index 161454b33fdca571567b732c65743e7bc5002d53..90ee0ffbc9d1c5ab3c4eae6012c246580436e902 100644 (file)
@@ -44,6 +44,7 @@ CONFIG_DM_PMIC_MAX77686=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_MAX77686=y
 CONFIG_SOUND=y
+CONFIG_DM_SOUND=y
 CONFIG_I2S=y
 CONFIG_I2S_SAMSUNG=y
 CONFIG_SOUND_MAX98095=y
index 21080091a7dda7bdd251ee43a88f097f6f349381..4d1c53d4291808a6a7aee6a12c6db44f0075a325 100644 (file)
@@ -61,6 +61,7 @@ CONFIG_DM_PWM=y
 CONFIG_PWM_EXYNOS=y
 CONFIG_DEBUG_UART_S5P=y
 CONFIG_SOUND=y
+CONFIG_DM_SOUND=y
 CONFIG_I2S=y
 CONFIG_I2S_SAMSUNG=y
 CONFIG_SOUND_MAX98095=y
index ca1799895e898ca2cb66ab774c2177e991b77210..8f9436c74af3ba8ab9c6731acb6d218f2f0e0adc 100644 (file)
@@ -61,6 +61,7 @@ CONFIG_DM_PWM=y
 CONFIG_PWM_EXYNOS=y
 CONFIG_DEBUG_UART_S5P=y
 CONFIG_SOUND=y
+CONFIG_DM_SOUND=y
 CONFIG_I2S=y
 CONFIG_I2S_SAMSUNG=y
 CONFIG_SOUND_MAX98095=y
index 23b467c1de0cc67bff7063cab7df8f6af1e90573..1d711c8732201a94254a77917f89cf50f2ebd96c 100644 (file)
@@ -89,6 +89,9 @@ static const struct sound_ops samsung_sound_ops = {
 
 static const struct udevice_id samsung_sound_ids[] = {
        { .compatible = "google,snow-audio-max98095" },
+       { .compatible = "google,spring-audio-max98095" },
+       { .compatible = "samsung,smdk5420-audio-wm8994" },
+       { .compatible = "google,peach-audio-max98090" },
        { }
 };