sound: rockchip: Add sound support for jerry
authorSimon Glass <sjg@chromium.org>
Fri, 28 Dec 2018 03:15:23 +0000 (20:15 -0700)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Fri, 1 Feb 2019 15:59:10 +0000 (16:59 +0100)
Jerry uses a max98090 audio codec and the internal SoC I2S peripheral.
Enable sound support and add the required device-tree pieces.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
arch/arm/dts/rk3288-veyron-jerry.dts
arch/arm/dts/rk3288-veyron.dtsi
arch/arm/dts/rk3288.dtsi
configs/chromebook_jerry_defconfig

index 42f52d4d99a6e3993b454f81c9d8373f06271375..c251d9d59424d5e40d98abec4623dfa45ce830aa 100644 (file)
                vin-supply = <&vcc33_sys>;
                startup-delay-us = <15000>;
        };
+
+       sound {
+               compatible = "rockchip,audio-max98090-jerry";
+
+               cpu {
+                       sound-dai = <&i2s 0>;
+               };
+
+               codec {
+                       sound-dai = <&max98090 0>;
+               };
+       };
 };
 
 &dmc {
index 92b68878fd0a52db482e824aca3cd7b359cc3833..49ba3f3f1432c8345dc9f187960e67feb898910a 100644 (file)
        max98090: max98090@10 {
                compatible = "maxim,max98090";
                reg = <0x10>;
+               #sound-dai-cells = <0>;
                interrupt-parent = <&gpio6>;
                interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
                pinctrl-names = "default";
index 273d38c84f5dccb75aff273db225efd1f45c22ef..487d22c9b012aeae73a4afc2240f76e6d9e981bf 100644 (file)
                interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
                #size-cells = <0>;
+               #sound-dai-cells = <1>;
                dmas = <&dmac_bus_s 0>, <&dmac_bus_s 1>;
                dma-names = "tx", "rx";
                clock-names = "i2s_hclk", "i2s_clk";
index 94a1af01be068df78a16b27d8ac26c192871938e..b1e119f9a26ca7aea8a433823f075dd995698229 100644 (file)
@@ -14,6 +14,8 @@ CONFIG_DEBUG_UART=y
 CONFIG_NR_DRAM_BANKS=1
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_SILENT_CONSOLE=y
+CONFIG_LOG=y
+CONFIG_LOG_DEFAULT_LEVEL=7
 CONFIG_DEFAULT_FDT_FILE="rk3288-veyron-jerry.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
@@ -32,6 +34,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_SPL_DOS_PARTITION is not set
@@ -76,6 +79,10 @@ CONFIG_RAM=y
 CONFIG_SPL_RAM=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_ROCKCHIP_SERIAL=y
+CONFIG_SOUND=y
+CONFIG_I2S=y
+CONFIG_I2S_ROCKCHIP=y
+CONFIG_SOUND_MAX98090=y
 CONFIG_ROCKCHIP_SPI=y
 CONFIG_SYSRESET=y
 CONFIG_USB=y