18c2ecf20Sopenharmony_ciWM1811/WM8994/WM8958 audio CODEC 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThese devices support both I2C and SPI (configured with pin strapping 48c2ecf20Sopenharmony_cion the board). 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciRequired properties: 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci - compatible : One of "wlf,wm1811", "wlf,wm8994" or "wlf,wm8958". 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci - reg : the I2C address of the device for I2C, the chip select 118c2ecf20Sopenharmony_ci number for SPI. 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci - gpio-controller : Indicates this device is a GPIO controller. 148c2ecf20Sopenharmony_ci - #gpio-cells : Must be 2. The first cell is the pin number and the 158c2ecf20Sopenharmony_ci second cell is used to specify optional parameters (currently unused). 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci - power supplies for the device, as covered in 188c2ecf20Sopenharmony_ci Documentation/devicetree/bindings/regulator/regulator.txt, depending 198c2ecf20Sopenharmony_ci on compatible: 208c2ecf20Sopenharmony_ci - for wlf,wm1811 and wlf,wm8958: 218c2ecf20Sopenharmony_ci AVDD1-supply, AVDD2-supply, DBVDD1-supply, DBVDD2-supply, DBVDD3-supply, 228c2ecf20Sopenharmony_ci DCVDD-supply, CPVDD-supply, SPKVDD1-supply, SPKVDD2-supply 238c2ecf20Sopenharmony_ci - for wlf,wm8994: 248c2ecf20Sopenharmony_ci AVDD1-supply, AVDD2-supply, DBVDD-supply, DCVDD-supply, CPVDD-supply, 258c2ecf20Sopenharmony_ci SPKVDD1-supply, SPKVDD2-supply 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciOptional properties: 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci - interrupts : The interrupt line the IRQ signal for the device is 308c2ecf20Sopenharmony_ci connected to. This is optional, if it is not connected then none 318c2ecf20Sopenharmony_ci of the interrupt related properties should be specified. 328c2ecf20Sopenharmony_ci - interrupt-controller : These devices contain interrupt controllers 338c2ecf20Sopenharmony_ci and may provide interrupt services to other devices if they have an 348c2ecf20Sopenharmony_ci interrupt line connected. 358c2ecf20Sopenharmony_ci - #interrupt-cells: the number of cells to describe an IRQ, this should be 2. 368c2ecf20Sopenharmony_ci The first cell is the IRQ number. 378c2ecf20Sopenharmony_ci The second cell is the flags, encoded as the trigger masks from 388c2ecf20Sopenharmony_ci Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci - clocks : A list of up to two phandle and clock specifier pairs 418c2ecf20Sopenharmony_ci - clock-names : A list of clock names sorted in the same order as clocks. 428c2ecf20Sopenharmony_ci Valid clock names are "MCLK1" and "MCLK2". 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci - wlf,gpio-cfg : A list of GPIO configuration register values. If absent, 458c2ecf20Sopenharmony_ci no configuration of these registers is performed. If any value is 468c2ecf20Sopenharmony_ci over 0xffff then the register will be left as default. If present 11 478c2ecf20Sopenharmony_ci values must be supplied. 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci - wlf,micbias-cfg : Two MICBIAS register values for WM1811 or 508c2ecf20Sopenharmony_ci WM8958. If absent the register defaults will be used. 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci - wlf,ldo1ena : GPIO specifier for control of LDO1ENA input to device. 538c2ecf20Sopenharmony_ci - wlf,ldo2ena : GPIO specifier for control of LDO2ENA input to device. 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci - wlf,lineout1-se : If present LINEOUT1 is in single ended mode. 568c2ecf20Sopenharmony_ci - wlf,lineout2-se : If present LINEOUT2 is in single ended mode. 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci - wlf,lineout1-feedback : If present LINEOUT1 has common mode feedback 598c2ecf20Sopenharmony_ci connected. 608c2ecf20Sopenharmony_ci - wlf,lineout2-feedback : If present LINEOUT2 has common mode feedback 618c2ecf20Sopenharmony_ci connected. 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci - wlf,ldoena-always-driven : If present LDOENA is always driven. 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci - wlf,spkmode-pu : If present enable the internal pull-up resistor on 668c2ecf20Sopenharmony_ci the SPKMODE pin. 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci - wlf,csnaddr-pd : If present enable the internal pull-down resistor on 698c2ecf20Sopenharmony_ci the CS/ADDR pin. 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ciPins on the device (for linking into audio routes): 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci * IN1LN 748c2ecf20Sopenharmony_ci * IN1LP 758c2ecf20Sopenharmony_ci * IN2LN 768c2ecf20Sopenharmony_ci * IN2LP:VXRN 778c2ecf20Sopenharmony_ci * IN1RN 788c2ecf20Sopenharmony_ci * IN1RP 798c2ecf20Sopenharmony_ci * IN2RN 808c2ecf20Sopenharmony_ci * IN2RP:VXRP 818c2ecf20Sopenharmony_ci * SPKOUTLP 828c2ecf20Sopenharmony_ci * SPKOUTLN 838c2ecf20Sopenharmony_ci * SPKOUTRP 848c2ecf20Sopenharmony_ci * SPKOUTRN 858c2ecf20Sopenharmony_ci * HPOUT1L 868c2ecf20Sopenharmony_ci * HPOUT1R 878c2ecf20Sopenharmony_ci * HPOUT2P 888c2ecf20Sopenharmony_ci * HPOUT2N 898c2ecf20Sopenharmony_ci * LINEOUT1P 908c2ecf20Sopenharmony_ci * LINEOUT1N 918c2ecf20Sopenharmony_ci * LINEOUT2P 928c2ecf20Sopenharmony_ci * LINEOUT2N 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ciExample: 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ciwm8994: codec@1a { 978c2ecf20Sopenharmony_ci compatible = "wlf,wm8994"; 988c2ecf20Sopenharmony_ci reg = <0x1a>; 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci gpio-controller; 1018c2ecf20Sopenharmony_ci #gpio-cells = <2>; 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci lineout1-se; 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci AVDD1-supply = <®ulator>; 1068c2ecf20Sopenharmony_ci AVDD2-supply = <®ulator>; 1078c2ecf20Sopenharmony_ci CPVDD-supply = <®ulator>; 1088c2ecf20Sopenharmony_ci DBVDD-supply = <®ulator>; 1098c2ecf20Sopenharmony_ci DCVDD-supply = <®ulator>; 1108c2ecf20Sopenharmony_ci SPKVDD1-supply = <®ulator>; 1118c2ecf20Sopenharmony_ci SPKVDD2-supply = <®ulator>; 1128c2ecf20Sopenharmony_ci}; 113