silabs,usart-i2s

Description

These nodes are “i2s” bus nodes.

Silicon Labs Series 2 I2S (Inter-Integrated Circuit Sound)

Silicon Labs Series 2 USART in I2S mode. Pins are TX, RX, CLK (bit clock),
and CS (word select / LRCLK). Enable this compatible on a USART instance only
in a board or application overlay (not the shared SoC DTSI), since SPI and
I2S cannot share the same USART.

The driver currently supports TX (stereo and mono). RX is not supported yet
(``i2s_configure(I2S_DIR_RX)`` returns ``-ENOTSUP``).

Examples

/* Optional codec MCLK from CMU CLKOUT0 via silabs,mclk-out. */
&pinctrl {
  clkout_default: clkout_default {
    group0 {
      pins = <CMU_CLKOUT0_PC1>;
      drive-push-pull;
      output-low;
    };
  };

  usart0_i2s_default: usart0_i2s_default {
    group0 {
      pins = <USART0_TX_PC0>, <USART0_CLK_PC2>, <USART0_CS_PB2>;
      drive-push-pull;
      output-high;
    };

    group1 {
      pins = <USART0_RX_PC1>;
      input-enable;
    };
  };
};

&clkout {
  pinctrl-0 = <&clkout_default>;
  pinctrl-names = "default";
  status = "okay";
};

&clkout0 {
  clocks = <&exportclk>;
  status = "okay";
};

&usart0 {
  compatible = "silabs,usart-i2s";
  status = "okay";
  pinctrl-0 = <&usart0_i2s_default>;
  pinctrl-names = "default";
  silabs,mclk-out = <&clkout0>;
  dmas = <&dma0 DMA_REQSEL_USART0TXBL>,
         <&dma0 DMA_REQSEL_USART0TXBLRIGHT>;
  dma-names = "txbl", "txblright";
};

Properties

Properties not inherited from the base binding file.

Name

Type

Details

silabs,mclk-out

phandle

Optional phandle to a ``clock-output@N`` child under
``silabs,series-clock-output`` that supplies codec MCLK.

silabs,mono-tx-slot

string

Which mono TX slot carries audio when ``channels = 1`` (the other is
silence).

Default value: right

Legal values: left, right

pinctrl-0

phandles

Pin configuration/s for the first state. Content is specific to the
selected pin controller driver implementation.

pinctrl-1

phandles

Pin configuration/s for the second state. See pinctrl-0.

pinctrl-2

phandles

Pin configuration/s for the third state. See pinctrl-0.

pinctrl-3

phandles

Pin configuration/s for the fourth state. See pinctrl-0.

pinctrl-4

phandles

Pin configuration/s for the fifth state. See pinctrl-0.

pinctrl-names

string-array

Names for the provided states. The number of names needs to match the
number of states.