|
246 | 246 | regulator-max-microvolt = <1800000>; |
247 | 247 | vin-supply = <&vcc_1v8_s3>; |
248 | 248 | }; |
| 249 | + |
| 250 | + sound { |
| 251 | + compatible = "simple-audio-card"; |
| 252 | + pinctrl-names = "default"; |
| 253 | + pinctrl-0 = <&hp_det>; |
| 254 | + simple-audio-card,name = "On-board Analog ES8388"; |
| 255 | + simple-audio-card,aux-devs = <&hp_power>, <&spk_power>; |
| 256 | + simple-audio-card,bitclock-master = <&masterdai>; |
| 257 | + simple-audio-card,format = "i2s"; |
| 258 | + simple-audio-card,frame-master = <&masterdai>; |
| 259 | + simple-audio-card,hp-det-gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_LOW>; |
| 260 | + simple-audio-card,mclk-fs = <256>; |
| 261 | + simple-audio-card,routing = |
| 262 | + "Headphone Power INL", "LOUT1", |
| 263 | + "Headphone Power INR", "ROUT1", |
| 264 | + "Speaker Power INL", "LOUT2", |
| 265 | + "Speaker Power INR", "ROUT2", |
| 266 | + "Headphones", "Headphone Power OUTL", |
| 267 | + "Headphones", "Headphone Power OUTR", |
| 268 | + "Speaker", "Speaker Power OUTL", |
| 269 | + "Speaker", "Speaker Power OUTR", |
| 270 | + "LINPUT1", "Main Mic", |
| 271 | + "LINPUT2", "Main Mic", |
| 272 | + "RINPUT1", "Headset Mic", |
| 273 | + "RINPUT2", "Headset Mic"; |
| 274 | + simple-audio-card,widgets = |
| 275 | + "Microphone", "Main Mic", |
| 276 | + "Microphone", "Headset Mic", |
| 277 | + "Headphone", "Headphones", |
| 278 | + "Speaker", "Speaker"; |
| 279 | + |
| 280 | + simple-audio-card,cpu { |
| 281 | + sound-dai = <&sai1>; |
| 282 | + }; |
| 283 | + |
| 284 | + masterdai: simple-audio-card,codec { |
| 285 | + sound-dai = <&es8388>; |
| 286 | + system-clock-frequency = <12288000>; |
| 287 | + }; |
| 288 | + }; |
| 289 | + |
| 290 | + hp_power: headphone-amplifier { |
| 291 | + compatible = "simple-audio-amplifier"; |
| 292 | + enable-gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>; |
| 293 | + pinctrl-names = "default"; |
| 294 | + pinctrl-0 = <&hp_ctl>; |
| 295 | + sound-name-prefix = "Headphone Power"; |
| 296 | + }; |
| 297 | + |
| 298 | + spk_power: speaker-amplifier { |
| 299 | + compatible = "simple-audio-amplifier"; |
| 300 | + enable-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>; |
| 301 | + pinctrl-names = "default"; |
| 302 | + pinctrl-0 = <&spk_ctl>; |
| 303 | + sound-name-prefix = "Speaker Power"; |
| 304 | + VCC-supply = <&vcc5v0_device>; |
| 305 | + }; |
249 | 306 | }; |
250 | 307 |
|
251 | 308 | &cpu_l0 { |
|
712 | 769 | }; |
713 | 770 | }; |
714 | 771 |
|
| 772 | +&i2c3 { |
| 773 | + status = "okay"; |
| 774 | + |
| 775 | + es8388: audio-codec@10 { |
| 776 | + compatible = "everest,es8388", "everest,es8328"; |
| 777 | + reg = <0x10>; |
| 778 | + AVDD-supply = <&vcca_3v3_s0>; |
| 779 | + DVDD-supply = <&vcc_1v8_s0>; |
| 780 | + HPVDD-supply = <&vcca_3v3_s0>; |
| 781 | + PVDD-supply = <&vcc_1v8_s0>; |
| 782 | + assigned-clocks = <&cru CLK_SAI1_MCLKOUT_TO_IO>; |
| 783 | + assigned-clock-rates = <12288000>; |
| 784 | + clocks = <&cru CLK_SAI1_MCLKOUT_TO_IO>; |
| 785 | + pinctrl-names = "default"; |
| 786 | + pinctrl-0 = <&sai1m0_mclk>; |
| 787 | + #sound-dai-cells = <0>; |
| 788 | + }; |
| 789 | +}; |
| 790 | + |
715 | 791 | &mdio0 { |
716 | 792 | rgmii_phy0: ethernet-phy@1 { |
717 | 793 | compatible = "ethernet-phy-id001c.c916"; |
|
778 | 854 | }; |
779 | 855 |
|
780 | 856 | &pinctrl { |
| 857 | + audio { |
| 858 | + hp_det: hp-det { |
| 859 | + rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; |
| 860 | + }; |
| 861 | + |
| 862 | + hp_ctl: hp-ctl { |
| 863 | + rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_down>; |
| 864 | + }; |
| 865 | + |
| 866 | + spk_ctl: spk-ctl { |
| 867 | + rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; |
| 868 | + }; |
| 869 | + }; |
| 870 | + |
781 | 871 | bluetooth { |
782 | 872 | bt_reg_on: bt-reg-on { |
783 | 873 | rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>; |
|
839 | 929 | }; |
840 | 930 | }; |
841 | 931 |
|
| 932 | +&sai1 { |
| 933 | + pinctrl-names = "default"; |
| 934 | + pinctrl-0 = <&sai1m0_lrck |
| 935 | + &sai1m0_sclk |
| 936 | + &sai1m0_sdi0 |
| 937 | + &sai1m0_sdo0>; |
| 938 | + status = "okay"; |
| 939 | +}; |
| 940 | + |
842 | 941 | &sai6 { |
843 | 942 | status = "okay"; |
844 | 943 | }; |
|
0 commit comments