18c2ecf20Sopenharmony_ciRT5677 audio CODEC 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThis device supports I2C only. 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ciRequired properties: 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci- compatible : "realtek,rt5677". 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci- reg : The I2C address of the device. 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci- interrupts : The CODEC's interrupt output. 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci- gpio-controller : Indicates this device is a GPIO controller. 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci- #gpio-cells : Should be two. The first cell is the pin number and the 168c2ecf20Sopenharmony_ci second cell is used to specify optional parameters (currently unused). 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ciOptional properties: 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci- realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin. 218c2ecf20Sopenharmony_ci- realtek,reset-gpio : The GPIO that controls the CODEC's RESET pin. Active low. 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci- realtek,in1-differential 248c2ecf20Sopenharmony_ci- realtek,in2-differential 258c2ecf20Sopenharmony_ci- realtek,lout1-differential 268c2ecf20Sopenharmony_ci- realtek,lout2-differential 278c2ecf20Sopenharmony_ci- realtek,lout3-differential 288c2ecf20Sopenharmony_ci Boolean. Indicate MIC1/2 input and LOUT1/2/3 outputs are differential, 298c2ecf20Sopenharmony_ci rather than single-ended. 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci- realtek,gpio-config 328c2ecf20Sopenharmony_ci Array of six 8bit elements that configures GPIO. 338c2ecf20Sopenharmony_ci 0 - floating (reset value) 348c2ecf20Sopenharmony_ci 1 - pull down 358c2ecf20Sopenharmony_ci 2 - pull up 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci- realtek,jd1-gpio 388c2ecf20Sopenharmony_ci Configures GPIO Mic Jack detection 1. 398c2ecf20Sopenharmony_ci Select 0 ~ 3 as OFF, GPIO1, GPIO2 and GPIO3 respectively. 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci- realtek,jd2-gpio 428c2ecf20Sopenharmony_ci- realtek,jd3-gpio 438c2ecf20Sopenharmony_ci Configures GPIO Mic Jack detection 2 and 3. 448c2ecf20Sopenharmony_ci Select 0 ~ 3 as OFF, GPIO4, GPIO5 and GPIO6 respectively. 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ciPins on the device (for linking into audio routes): 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci * IN1P 498c2ecf20Sopenharmony_ci * IN1N 508c2ecf20Sopenharmony_ci * IN2P 518c2ecf20Sopenharmony_ci * IN2N 528c2ecf20Sopenharmony_ci * MICBIAS1 538c2ecf20Sopenharmony_ci * DMIC1 548c2ecf20Sopenharmony_ci * DMIC2 558c2ecf20Sopenharmony_ci * DMIC3 568c2ecf20Sopenharmony_ci * DMIC4 578c2ecf20Sopenharmony_ci * LOUT1 588c2ecf20Sopenharmony_ci * LOUT2 598c2ecf20Sopenharmony_ci * LOUT3 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ciExample: 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_cirt5677 { 648c2ecf20Sopenharmony_ci compatible = "realtek,rt5677"; 658c2ecf20Sopenharmony_ci reg = <0x2c>; 668c2ecf20Sopenharmony_ci interrupt-parent = <&gpio>; 678c2ecf20Sopenharmony_ci interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>; 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci gpio-controller; 708c2ecf20Sopenharmony_ci #gpio-cells = <2>; 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci realtek,pow-ldo2-gpio = 738c2ecf20Sopenharmony_ci <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; 748c2ecf20Sopenharmony_ci realtek,reset-gpio = <&gpio TEGRA_GPIO(BB, 3) GPIO_ACTIVE_LOW>; 758c2ecf20Sopenharmony_ci realtek,in1-differential = "true"; 768c2ecf20Sopenharmony_ci realtek,gpio-config = /bits/ 8 <0 0 0 0 0 2>; /* pull up GPIO6 */ 778c2ecf20Sopenharmony_ci realtek,jd2-gpio = <3>; /* Enables Jack detection for GPIO6 */ 788c2ecf20Sopenharmony_ci}; 79