1c66ec88fSEmmanuel VadotRT5663 audio CODEC 2c66ec88fSEmmanuel Vadot 3c66ec88fSEmmanuel VadotThis device supports I2C only. 4c66ec88fSEmmanuel Vadot 5c66ec88fSEmmanuel VadotRequired properties: 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadot- compatible : "realtek,rt5663". 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadot- reg : The I2C address of the device. 10c66ec88fSEmmanuel Vadot 11c66ec88fSEmmanuel Vadot- interrupts : The CODEC's interrupt output. 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel Vadot- avdd-supply: Power supply for AVDD, providing 1.8V. 14c66ec88fSEmmanuel Vadot 15c66ec88fSEmmanuel Vadot- cpvdd-supply: Power supply for CPVDD, providing 3.5V. 16c66ec88fSEmmanuel Vadot 17c66ec88fSEmmanuel VadotOptional properties: 18c66ec88fSEmmanuel Vadot 19c66ec88fSEmmanuel Vadot- "realtek,dc_offset_l_manual" 20c66ec88fSEmmanuel Vadot- "realtek,dc_offset_r_manual" 21c66ec88fSEmmanuel Vadot- "realtek,dc_offset_l_manual_mic" 22c66ec88fSEmmanuel Vadot- "realtek,dc_offset_r_manual_mic" 23c66ec88fSEmmanuel Vadot Based on the different PCB layout, add the manual offset value to 24c66ec88fSEmmanuel Vadot compensate the DC offset for each L and R channel, and they are different 25c66ec88fSEmmanuel Vadot between headphone and headset. 26c66ec88fSEmmanuel Vadot- "realtek,impedance_sensing_num" 27c66ec88fSEmmanuel Vadot The matrix row number of the impedance sensing table. 28c66ec88fSEmmanuel Vadot If the value is 0, it means the impedance sensing is not supported. 29c66ec88fSEmmanuel Vadot- "realtek,impedance_sensing_table" 30c66ec88fSEmmanuel Vadot The matrix rows of the impedance sensing table are consisted by impedance 31*aa1a8ff2SEmmanuel Vadot minimum, impedance maximum, volume, DC offset w/o and w/ mic of each L and 32c66ec88fSEmmanuel Vadot R channel accordingly. Example is shown as following. 33c66ec88fSEmmanuel Vadot < 0 300 7 0xffd160 0xffd1c0 0xff8a10 0xff8ab0 34c66ec88fSEmmanuel Vadot 301 65535 4 0xffe470 0xffe470 0xffb8e0 0xffb8e0> 35c66ec88fSEmmanuel Vadot The first and second column are defined for the impedance range. If the 36c66ec88fSEmmanuel Vadot detected impedance value is in the range, then the volume value of the 37c66ec88fSEmmanuel Vadot third column will be set to codec. In our codec design, each volume value 38c66ec88fSEmmanuel Vadot should compensate different DC offset to avoid the pop sound, and it is 39c66ec88fSEmmanuel Vadot also different between headphone and headset. In the example, the 40c66ec88fSEmmanuel Vadot "realtek,impedance_sensing_num" is 2. It means that there are 2 ranges of 41c66ec88fSEmmanuel Vadot impedance in the impedance sensing function. 42c66ec88fSEmmanuel Vadot 43c66ec88fSEmmanuel VadotPins on the device (for linking into audio routes) for RT5663: 44c66ec88fSEmmanuel Vadot 45c66ec88fSEmmanuel Vadot * IN1P 46c66ec88fSEmmanuel Vadot * IN1N 47c66ec88fSEmmanuel Vadot * IN2P 48c66ec88fSEmmanuel Vadot * IN2N 49c66ec88fSEmmanuel Vadot * HPOL 50c66ec88fSEmmanuel Vadot * HPOR 51c66ec88fSEmmanuel Vadot 52c66ec88fSEmmanuel VadotExample: 53c66ec88fSEmmanuel Vadot 54c66ec88fSEmmanuel Vadotrt5663: codec@12 { 55c66ec88fSEmmanuel Vadot compatible = "realtek,rt5663"; 56c66ec88fSEmmanuel Vadot reg = <0x12>; 57c66ec88fSEmmanuel Vadot interrupts = <7 IRQ_TYPE_EDGE_FALLING>; 58c66ec88fSEmmanuel Vadot avdd-supply = <&pp1800_a_alc5662>; 59c66ec88fSEmmanuel Vadot cpvdd-supply = <&pp3500_a_alc5662>; 60c66ec88fSEmmanuel Vadot}; 61