dm: sound: exynos: Correct codec bus addresses
authorSimon Glass <sjg@chromium.org>
Mon, 10 Dec 2018 17:37:30 +0000 (10:37 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 13 Dec 2018 23:32:49 +0000 (16:32 -0700)
For snow the codec is at address 0x11 on the i2c bus, in 7-bit format.
The device tree and code are in 8-bit format (i.e. shifted left one bit).
Fix both. Fix pit in a similar way.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/arm/dts/exynos5250-snow.dts
arch/arm/dts/exynos5420-peach-pit.dts
arch/arm/dts/exynos5800-peach-pi.dts
drivers/sound/max98095.c

index e99f6e72bf604d3057942ae819a92b7751b150b8..cb5067b9669e640ef027c5649b05e5111ca0cc5a 100644 (file)
                        };
                };
 
-               soundcodec@22 {
-                       reg = <0x22>;
+               soundcodec@11 {
+                       reg = <0x11>;
                        compatible = "maxim,max98095-codec";
                };
        };
index c86f9d9035d9c66757e825939d61858142b891c7..bd0a9c116d4795b69648ca30164afff3fa05f73e 100644 (file)
 
        i2c@12CD0000 { /* i2c7 */
                clock-frequency = <100000>;
-              soundcodec@20 {
-                     reg = <0x20>;
-                     compatible = "maxim,max98090-codec";
-              };
+               soundcodec@10 {
+                       reg = <0x10>;
+                       compatible = "maxim,max98090-codec";
+               };
 
                edp-lvds-bridge@48 {
                        compatible = "parade,ps8625";
index 7498519d6c681e283c580ffcd8505891980b4801..239781b34bba047a3bace9b9a3b588784c7b8ce8 100644 (file)
 
        i2c@12CD0000 { /* i2c7 */
                clock-frequency = <100000>;
-              soundcodec@20 {
-                     reg = <0x20>;
-                     compatible = "maxim,max98090-codec";
-              };
+               soundcodec@10 {
+                       reg = <0x10>;
+                       compatible = "maxim,max98090-codec";
+               };
        };
 
         sound@3830000 {
index 6a98dac04bba48c39520287c98efb46ddfc9dc75..7a3dbd098403041fb39c7149255628ebd8597d8f 100644 (file)
@@ -569,8 +569,7 @@ int max98095_init(const void *blob, enum en_max_audio_interface aif_id,
 
        i2c_set_bus_num(pcodec_info.i2c_bus);
 
-       /* shift the device address by 1 for 7 bit addressing */
-       max98095_info.i2c_addr = pcodec_info.i2c_dev_addr >> 1;
+       max98095_info.i2c_addr = pcodec_info.i2c_dev_addr;
        ret = max98095_device_init(&max98095_info);
        if (ret < 0) {
                debug("%s: max98095 codec chip init failed\n", __func__);