|
4 | 4 | *
|
5 | 5 | * Copyright (C) 2025 Marek Vasut < [email protected]>
|
6 | 6 | */
|
| 7 | +/* |
| 8 | + * DA7212 Codec settings |
| 9 | + * |
| 10 | + * for Playback |
| 11 | + * > amixer set "Headphone" 40% |
| 12 | + * > amixer set "Headphone" on |
| 13 | + * > amixer set "Mixout Left DAC Left" on |
| 14 | + * > amixer set "Mixout Right DAC Right" on |
| 15 | + * > aplay xxx.wav |
| 16 | + * |
| 17 | + * for Capture (Aux/Mic) |
| 18 | + * |
| 19 | + * on/off (B) |
| 20 | + * CONN3 (HeadSet) ---+----> MSIOF1 |
| 21 | + * | |
| 22 | + * CONN4 AUX ---------+ on/off (A) |
| 23 | + * |
| 24 | + * > amixer set "Mixin PGA" on |
| 25 | + * > amixer set "Mixin PGA" 50% |
| 26 | + * > amixer set "ADC" on |
| 27 | + * > amixer set "ADC" 80% |
| 28 | + * > amixer set "Aux" on ^ |
| 29 | + * > amixer set "Aux" 80% | (A) |
| 30 | + * > amixer set "Mixin Left Aux Left" on | |
| 31 | + * > amixer set "Mixin Right Aux Right" on v |
| 32 | + * > amixer set "Mic 1" on ^ |
| 33 | + * > amixer set "Mic 1" 80% | (B) |
| 34 | + * > amixer set "Mixin Left Mic 1" on | |
| 35 | + * > amixer set "Mixin Right Mic 1" on v |
| 36 | + * > arecord -f cd xxx.wav |
| 37 | + */ |
7 | 38 |
|
8 | 39 | /dts-v1/;
|
9 | 40 | #include <dt-bindings/gpio/gpio.h>
|
|
133 | 164 | clock-frequency = <38400000>;
|
134 | 165 | };
|
135 | 166 |
|
| 167 | + /* Page 30 / Audio_Codec */ |
| 168 | + sound_card: sound { |
| 169 | + compatible = "audio-graph-card2"; |
| 170 | + links = <&msiof1_snd>; |
| 171 | + }; |
| 172 | + |
136 | 173 | /* Page 17 uSD-Slot */
|
137 | 174 | vcc_sdhi: regulator-vcc-sdhi {
|
138 | 175 | compatible = "regulator-gpio";
|
|
145 | 182 | };
|
146 | 183 | };
|
147 | 184 |
|
| 185 | +&audio_clkin { |
| 186 | + clock-frequency = <24576000>; |
| 187 | +}; |
| 188 | + |
148 | 189 | /* Page 22 / Ether_AVB0 */
|
149 | 190 | &avb0 {
|
150 | 191 | pinctrl-0 = <&avb0_pins>;
|
|
334 | 375 | reg = <1>;
|
335 | 376 | #address-cells = <1>;
|
336 | 377 | #size-cells = <0>;
|
| 378 | + |
| 379 | + /* Page 30 / Audio_Codec */ |
| 380 | + codec@1a { |
| 381 | + compatible = "dlg,da7212"; |
| 382 | + |
| 383 | + #sound-dai-cells = <0>; |
| 384 | + reg = <0x1a>; |
| 385 | + |
| 386 | + clocks = <&rcar_sound>; |
| 387 | + clock-names = "mclk"; |
| 388 | + |
| 389 | + VDDA-supply = <®_1p8v>; |
| 390 | + VDDMIC-supply = <®_3p3v>; |
| 391 | + VDDIO-supply = <®_3p3v>; |
| 392 | + |
| 393 | + port { |
| 394 | + da7212_endpoint: endpoint { |
| 395 | + bitclock-master; |
| 396 | + frame-master; |
| 397 | + remote-endpoint = <&msiof1_snd_endpoint>; |
| 398 | + }; |
| 399 | + }; |
| 400 | + }; |
337 | 401 | };
|
338 | 402 |
|
339 | 403 | i2c0_mux2: i2c@2 {
|
|
404 | 468 | status = "okay";
|
405 | 469 | };
|
406 | 470 |
|
| 471 | +&msiof1 { |
| 472 | + pinctrl-0 = <&msiof1_pins>; |
| 473 | + pinctrl-names = "default"; |
| 474 | + |
| 475 | + status = "okay"; |
| 476 | + |
| 477 | + /* ignore DT warning */ |
| 478 | + /delete-property/#address-cells; |
| 479 | + /delete-property/#size-cells; |
| 480 | + |
| 481 | + msiof1_snd: port { |
| 482 | + msiof1_snd_endpoint: endpoint { |
| 483 | + remote-endpoint = <&da7212_endpoint>; |
| 484 | + }; |
| 485 | + }; |
| 486 | +}; |
| 487 | + |
407 | 488 | /* Page 26 / 2230 Key M M.2 */
|
408 | 489 | &pcie0_clkref {
|
409 | 490 | clock-frequency = <100000000>;
|
|
584 | 665 | function = "mmc";
|
585 | 666 | power-source = <1800>;
|
586 | 667 | };
|
| 668 | + |
| 669 | + /* Page 30 / Audio_Codec */ |
| 670 | + msiof1_pins: sound { |
| 671 | + groups = "msiof1_clk", "msiof1_sync", "msiof1_txd", "msiof1_rxd"; |
| 672 | + function = "msiof1"; |
| 673 | + }; |
| 674 | + |
| 675 | + /* Page 30 / Audio_Codec */ |
| 676 | + sound_clk_pins: sound-clk { |
| 677 | + groups = "audio_clkin", "audio_clkout"; |
| 678 | + function = "audio_clk"; |
| 679 | + }; |
| 680 | +}; |
| 681 | + |
| 682 | +/* Page 30 / Audio_Codec */ |
| 683 | +&rcar_sound { |
| 684 | + pinctrl-0 = <&sound_clk_pins>; |
| 685 | + pinctrl-names = "default"; |
| 686 | + |
| 687 | + /* It is used for ADG output as DA7212_MCLK */ |
| 688 | + |
| 689 | + /* audio_clkout */ |
| 690 | + clock-frequency = <12288000>; /* 48 kHz groups */ |
| 691 | + |
| 692 | + status = "okay"; |
587 | 693 | };
|
588 | 694 |
|
589 | 695 | /* Page 31 / FAN */
|
|
0 commit comments