18c2ecf20Sopenharmony_ciMotorola CPCAP PMIC device tree binding 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciRequired properties: 48c2ecf20Sopenharmony_ci- compatible : One or both of "motorola,cpcap" or "ste,6556002" 58c2ecf20Sopenharmony_ci- reg : SPI chip select 68c2ecf20Sopenharmony_ci- interrupts : The interrupt line the device is connected to 78c2ecf20Sopenharmony_ci- interrupt-controller : Marks the device node as an interrupt controller 88c2ecf20Sopenharmony_ci- #interrupt-cells : The number of cells to describe an IRQ, should be 2 98c2ecf20Sopenharmony_ci- #address-cells : Child device offset number of cells, should be 1 108c2ecf20Sopenharmony_ci- #size-cells : Child device size number of cells, should be 0 118c2ecf20Sopenharmony_ci- spi-max-frequency : Typically set to 3000000 128c2ecf20Sopenharmony_ci- spi-cs-high : SPI chip select direction 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciOptional subnodes: 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciThe sub-functions of CPCAP get their own node with their own compatible values, 178c2ecf20Sopenharmony_ciwhich are described in the following files: 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci- ../power/supply/cpcap-battery.txt 208c2ecf20Sopenharmony_ci- ../power/supply/cpcap-charger.txt 218c2ecf20Sopenharmony_ci- ../regulator/cpcap-regulator.txt 228c2ecf20Sopenharmony_ci- ../phy/phy-cpcap-usb.txt 238c2ecf20Sopenharmony_ci- ../input/cpcap-pwrbutton.txt 248c2ecf20Sopenharmony_ci- ../rtc/cpcap-rtc.txt 258c2ecf20Sopenharmony_ci- ../leds/leds-cpcap.txt 268c2ecf20Sopenharmony_ci- ../iio/adc/cpcap-adc.txt 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciThe only exception is the audio codec. Instead of a compatible value its 298c2ecf20Sopenharmony_cinode must be named "audio-codec". 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ciRequired properties for the audio-codec subnode: 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci- #sound-dai-cells = <1>; 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciThe audio-codec provides two DAIs. The first one is connected to the 368c2ecf20Sopenharmony_ciStereo HiFi DAC and the second one is connected to the Voice DAC. 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ciExample: 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci&mcspi1 { 418c2ecf20Sopenharmony_ci cpcap: pmic@0 { 428c2ecf20Sopenharmony_ci compatible = "motorola,cpcap", "ste,6556002"; 438c2ecf20Sopenharmony_ci reg = <0>; /* cs0 */ 448c2ecf20Sopenharmony_ci interrupt-parent = <&gpio1>; 458c2ecf20Sopenharmony_ci interrupts = <7 IRQ_TYPE_EDGE_RISING>; 468c2ecf20Sopenharmony_ci interrupt-controller; 478c2ecf20Sopenharmony_ci #interrupt-cells = <2>; 488c2ecf20Sopenharmony_ci #address-cells = <1>; 498c2ecf20Sopenharmony_ci #size-cells = <0>; 508c2ecf20Sopenharmony_ci spi-max-frequency = <3000000>; 518c2ecf20Sopenharmony_ci spi-cs-high; 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci audio-codec { 548c2ecf20Sopenharmony_ci #sound-dai-cells = <1>; 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci /* HiFi */ 578c2ecf20Sopenharmony_ci port@0 { 588c2ecf20Sopenharmony_ci endpoint { 598c2ecf20Sopenharmony_ci remote-endpoint = <&cpu_dai1>; 608c2ecf20Sopenharmony_ci }; 618c2ecf20Sopenharmony_ci }; 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci /* Voice */ 648c2ecf20Sopenharmony_ci port@1 { 658c2ecf20Sopenharmony_ci endpoint { 668c2ecf20Sopenharmony_ci remote-endpoint = <&cpu_dai2>; 678c2ecf20Sopenharmony_ci }; 688c2ecf20Sopenharmony_ci }; 698c2ecf20Sopenharmony_ci }; 708c2ecf20Sopenharmony_ci }; 718c2ecf20Sopenharmony_ci}; 728c2ecf20Sopenharmony_ci 73