Message ID | 20230731142135.108477-5-francesco@dolcini.it (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: dts: ti: Enable Audio on Verdin AM62 | expand |
On Jul 31, 2023 at 16:21:35 +0200, Francesco Dolcini wrote: > From: Francesco Dolcini <francesco.dolcini@toradex.com> > > Add WM8904 based analog sound card to Dahlia carrier board. > > Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Jai Luthra <j-luthra@ti.com> > --- > .../boot/dts/ti/k3-am62-verdin-dahlia.dtsi | 53 +++++++++++++++++++ > 1 file changed, 53 insertions(+) > > diff --git a/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi b/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi > index 3abd8d1d6761..e59235d6a8e6 100644 > --- a/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi > +++ b/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi > @@ -8,6 +8,43 @@ > * https://www.toradex.com/products/carrier-board/dahlia-carrier-board-kit > */ > > +/ { > + reg_1v8_sw: regulator-1v8-sw { > + compatible = "regulator-fixed"; > + regulator-max-microvolt = <1800000>; > + regulator-min-microvolt = <1800000>; > + regulator-name = "On-carrier +V1.8_SW"; > + }; > + > + sound { > + compatible = "simple-audio-card"; > + simple-audio-card,bitclock-master = <&codec_dai>; > + simple-audio-card,format = "i2s"; > + simple-audio-card,frame-master = <&codec_dai>; > + simple-audio-card,name = "verdin-wm8904"; > + simple-audio-card,routing = > + "Headphone Jack", "HPOUTL", > + "Headphone Jack", "HPOUTR", > + "IN2L", "Line In Jack", > + "IN2R", "Line In Jack", > + "Headphone Jack", "MICBIAS", > + "IN1L", "Headphone Jack"; > + simple-audio-card,widgets = > + "Microphone", "Headphone Jack", > + "Headphone", "Headphone Jack", > + "Line", "Line In Jack"; > + > + codec_dai: simple-audio-card,codec { > + clocks = <&audio_refclk1>; > + sound-dai = <&wm8904_1a>; > + }; > + > + simple-audio-card,cpu { > + sound-dai = <&mcasp0>; > + }; > + }; > +}; > + > /* Verdin ETHs */ > &cpsw3g { > status = "okay"; > @@ -46,6 +83,22 @@ &main_gpio0 { > &main_i2c1 { > status = "okay"; > > + /* Audio Codec */ > + wm8904_1a: audio-codec@1a { > + compatible = "wlf,wm8904"; > + reg = <0x1a>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_i2s1_mclk>; > + #sound-dai-cells = <0>; > + clocks = <&audio_refclk1>; > + clock-names = "mclk"; > + AVDD-supply = <®_1v8_sw>; > + CPVDD-supply = <®_1v8_sw>; > + DBVDD-supply = <®_1v8_sw>; > + DCVDD-supply = <®_1v8_sw>; > + MICVDD-supply = <®_1v8_sw>; > + }; > + > /* Current measurement into module VCC */ > hwmon@40 { > compatible = "ti,ina219"; > -- > 2.25.1 > >
diff --git a/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi b/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi index 3abd8d1d6761..e59235d6a8e6 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi @@ -8,6 +8,43 @@ * https://www.toradex.com/products/carrier-board/dahlia-carrier-board-kit */ +/ { + reg_1v8_sw: regulator-1v8-sw { + compatible = "regulator-fixed"; + regulator-max-microvolt = <1800000>; + regulator-min-microvolt = <1800000>; + regulator-name = "On-carrier +V1.8_SW"; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,bitclock-master = <&codec_dai>; + simple-audio-card,format = "i2s"; + simple-audio-card,frame-master = <&codec_dai>; + simple-audio-card,name = "verdin-wm8904"; + simple-audio-card,routing = + "Headphone Jack", "HPOUTL", + "Headphone Jack", "HPOUTR", + "IN2L", "Line In Jack", + "IN2R", "Line In Jack", + "Headphone Jack", "MICBIAS", + "IN1L", "Headphone Jack"; + simple-audio-card,widgets = + "Microphone", "Headphone Jack", + "Headphone", "Headphone Jack", + "Line", "Line In Jack"; + + codec_dai: simple-audio-card,codec { + clocks = <&audio_refclk1>; + sound-dai = <&wm8904_1a>; + }; + + simple-audio-card,cpu { + sound-dai = <&mcasp0>; + }; + }; +}; + /* Verdin ETHs */ &cpsw3g { status = "okay"; @@ -46,6 +83,22 @@ &main_gpio0 { &main_i2c1 { status = "okay"; + /* Audio Codec */ + wm8904_1a: audio-codec@1a { + compatible = "wlf,wm8904"; + reg = <0x1a>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2s1_mclk>; + #sound-dai-cells = <0>; + clocks = <&audio_refclk1>; + clock-names = "mclk"; + AVDD-supply = <®_1v8_sw>; + CPVDD-supply = <®_1v8_sw>; + DBVDD-supply = <®_1v8_sw>; + DCVDD-supply = <®_1v8_sw>; + MICVDD-supply = <®_1v8_sw>; + }; + /* Current measurement into module VCC */ hwmon@40 { compatible = "ti,ina219";