18c2ecf20Sopenharmony_ciRT5640/RT5639 audio CODEC 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThis device supports I2C only. 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ciRequired properties: 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci- compatible : One of "realtek,rt5640" or "realtek,rt5639". 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci- reg : The I2C address of the device. 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci- interrupts : The CODEC's interrupt output. 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciOptional properties: 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci- clocks: The phandle of the master clock to the CODEC 168c2ecf20Sopenharmony_ci- clock-names: Should be "mclk" 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci- realtek,in1-differential 198c2ecf20Sopenharmony_ci- realtek,in2-differential 208c2ecf20Sopenharmony_ci- realtek,in3-differential 218c2ecf20Sopenharmony_ci Boolean. Indicate MIC1/2/3 input are differential, rather than single-ended. 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci- realtek,dmic1-data-pin 268c2ecf20Sopenharmony_ci 0: dmic1 is not used 278c2ecf20Sopenharmony_ci 1: using IN1P pin as dmic1 data pin 288c2ecf20Sopenharmony_ci 2: using GPIO3 pin as dmic1 data pin 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci- realtek,dmic2-data-pin 318c2ecf20Sopenharmony_ci 0: dmic2 is not used 328c2ecf20Sopenharmony_ci 1: using IN1N pin as dmic2 data pin 338c2ecf20Sopenharmony_ci 2: using GPIO4 pin as dmic2 data pin 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci- realtek,jack-detect-source 368c2ecf20Sopenharmony_ci u32. Valid values: 378c2ecf20Sopenharmony_ci 0: jack-detect is not used 388c2ecf20Sopenharmony_ci 1: Use GPIO1 for jack-detect 398c2ecf20Sopenharmony_ci 2: Use JD1_IN4P for jack-detect 408c2ecf20Sopenharmony_ci 3: Use JD2_IN4N for jack-detect 418c2ecf20Sopenharmony_ci 4: Use GPIO2 for jack-detect 428c2ecf20Sopenharmony_ci 5: Use GPIO3 for jack-detect 438c2ecf20Sopenharmony_ci 6: Use GPIO4 for jack-detect 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci- realtek,jack-detect-not-inverted 468c2ecf20Sopenharmony_ci bool. Normal jack-detect switches give an inverted signal, set this bool 478c2ecf20Sopenharmony_ci in the rare case you've a jack-detect switch which is not inverted. 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci- realtek,over-current-threshold-microamp 508c2ecf20Sopenharmony_ci u32, micbias over-current detection threshold in µA, valid values are 518c2ecf20Sopenharmony_ci 600, 1500 and 2000µA. 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci- realtek,over-current-scale-factor 548c2ecf20Sopenharmony_ci u32, micbias over-current detection scale-factor, valid values are: 558c2ecf20Sopenharmony_ci 0: Scale current by 0.5 568c2ecf20Sopenharmony_ci 1: Scale current by 0.75 578c2ecf20Sopenharmony_ci 2: Scale current by 1.0 588c2ecf20Sopenharmony_ci 3: Scale current by 1.5 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ciPins on the device (for linking into audio routes) for RT5639/RT5640: 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci * DMIC1 638c2ecf20Sopenharmony_ci * DMIC2 648c2ecf20Sopenharmony_ci * MICBIAS1 658c2ecf20Sopenharmony_ci * IN1P 668c2ecf20Sopenharmony_ci * IN1N 678c2ecf20Sopenharmony_ci * IN2P 688c2ecf20Sopenharmony_ci * IN2N 698c2ecf20Sopenharmony_ci * IN3P 708c2ecf20Sopenharmony_ci * IN3N 718c2ecf20Sopenharmony_ci * HPOL 728c2ecf20Sopenharmony_ci * HPOR 738c2ecf20Sopenharmony_ci * LOUTL 748c2ecf20Sopenharmony_ci * LOUTR 758c2ecf20Sopenharmony_ci * SPOLP 768c2ecf20Sopenharmony_ci * SPOLN 778c2ecf20Sopenharmony_ci * SPORP 788c2ecf20Sopenharmony_ci * SPORN 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ciAdditional pins on the device for RT5640: 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci * MONOP 838c2ecf20Sopenharmony_ci * MONON 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ciExample: 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_cirt5640 { 888c2ecf20Sopenharmony_ci compatible = "realtek,rt5640"; 898c2ecf20Sopenharmony_ci reg = <0x1c>; 908c2ecf20Sopenharmony_ci interrupt-parent = <&gpio>; 918c2ecf20Sopenharmony_ci interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>; 928c2ecf20Sopenharmony_ci realtek,ldo1-en-gpios = 938c2ecf20Sopenharmony_ci <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; 948c2ecf20Sopenharmony_ci}; 95