x86: Add sound support for samus
authorSimon Glass <sjg@chromium.org>
Sun, 17 Feb 2019 03:25:07 +0000 (20:25 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Wed, 20 Feb 2019 07:27:11 +0000 (15:27 +0800)
Enable sound on samus using the broadwell I2S and an RT5677 audio codec.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/dts/chromebook_samus.dts
configs/chromebook_samus_defconfig
drivers/sound/Makefile

index b58936b4ac979735eb1fada31292d7661608b2dd..ad687ce2cc3511816cb1728f8e0ae8a628597353 100644 (file)
                        intel,pre-graphics-delay = <200>;
                };
 
-               me@16,0 {
-                       reg = <0x0000b000 0 0 0 0>;
-                       compatible = "intel,me";
-                       u-boot,dm-pre-reloc;
+               adsp@13,0 {
+                       reg = <0x00009800 0 0 0 0>;
+                       compatible = "intel,wildcatpoint-adsp";
+                       intel,adsp-d3-pg-enable = <0>;
+                       intel,adsp-sram-pg-enable = <0>;
+                       intel,sio-acpi-mode;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       i2s: shim {
+                               compatible = "intel,broadwell-i2s";
+                               #sound-dai-cells = <1>;
+                               reg = <0xfb000 0xfc000 0xfd000>;
+                       };
                };
 
                usb_1: usb@14,0 {
                        compatible = "xhci-pci";
                };
 
+               i2c0: i2c@15,1 {
+                       reg = <0x0000a900 0 0 0 0>;
+                       compatible = "snps,designware-i2c";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       rt5677: rt5677@2c {
+                               compatible = "realtek,rt5677";
+                               #sound-dai-cells = <1>;
+                               reg = <0x2c>;
+                       };
+               };
+
+               me@16,0 {
+                       reg = <0x0000b000 0 0 0 0>;
+                       compatible = "intel,me";
+                       u-boot,dm-pre-reloc;
+               };
+
                usb_0: usb@1d,0 {
                        status = "disabled";
                        reg = <0x0000e800 0 0 0 0>;
                };
        };
 
+       sound {
+               compatible = "google,samus-sound";
+               codec-enable-gpio = <&gpio_b 11 GPIO_ACTIVE_HIGH>;
+               cpu {
+                       sound-dai = <&i2s 0>;
+               };
+
+               codec {
+                       sound-dai = <&rt5677 0>;
+               };
+       };
+
 };
index 745cb3db0a62e208c0d1ed26b029ad70d5926e07..7e2453f24408aa130a3468f3f361376dbd0c1e85 100644 (file)
@@ -17,6 +17,7 @@ CONFIG_BOOTSTAGE_REPORT=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
+CONFIG_LOG_DEFAULT_LEVEL=7
 CONFIG_MISC_INIT_R=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_LAST_STAGE_INIT=y
@@ -24,7 +25,9 @@ CONFIG_HUSH_PARSER=y
 CONFIG_CMD_CPU=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
 CONFIG_CMD_PART=y
+CONFIG_CMD_SATA=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -33,6 +36,7 @@ CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_PING=y
 CONFIG_CMD_TIME=y
+CONFIG_CMD_SOUND=y
 CONFIG_CMD_BOOTSTAGE=y
 CONFIG_CMD_TPM=y
 CONFIG_CMD_TPM_TEST=y
@@ -48,9 +52,14 @@ CONFIG_DEFAULT_DEVICE_TREE="chromebook_samus"
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_CPU=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_DW=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_LPC=y
 CONFIG_SYS_NS16550=y
+CONFIG_SOUND=y
+CONFIG_SOUND_I8254=y
+CONFIG_SOUND_RT5677=y
 CONFIG_SPI=y
 CONFIG_TPM_TIS_LPC=y
 CONFIG_USB_STORAGE=y
index 452a5a17616fa69ef238565c441ce915e9304da4..e155041ff5f9d14ac0dbd5577ae545f013cc6ae2 100644 (file)
@@ -18,5 +18,5 @@ obj-$(CONFIG_SOUND_MAX98095)  += max98095.o maxim_codec.o
 obj-$(CONFIG_SOUND_INTEL_HDA)  += hda_codec.o
 obj-$(CONFIG_SOUND_I8254)      += i8254_beep.o
 obj-$(CONFIG_SOUND_RT5677)     += rt5677.o
-obj-$(CONFIG_INTEL_BROADWELL)  += broadwell_i2s.o #broadwell_sound.o
+obj-$(CONFIG_INTEL_BROADWELL)  += broadwell_i2s.o broadwell_sound.o
 obj-$(CONFIG_SOUND_IVYBRIDGE)  += ivybridge_sound.o