1Motorola CPCAP PMIC device tree binding 2 3Required properties: 4- compatible : One or both of "motorola,cpcap" or "ste,6556002" 5- reg : SPI chip select 6- interrupts : The interrupt line the device is connected to 7- interrupt-controller : Marks the device node as an interrupt controller 8- #interrupt-cells : The number of cells to describe an IRQ, should be 2 9- #address-cells : Child device offset number of cells, should be 1 10- #size-cells : Child device size number of cells, should be 0 11- spi-max-frequency : Typically set to 3000000 12- spi-cs-high : SPI chip select direction 13 14Optional subnodes: 15 16The sub-functions of CPCAP get their own node with their own compatible values, 17which are described in the following files: 18 19- Documentation/devicetree/bindings/power/supply/cpcap-battery.yaml 20- Documentation/devicetree/bindings/power/supply/cpcap-charger.yaml 21- Documentation/devicetree/bindings/regulator/cpcap-regulator.txt 22- Documentation/devicetree/bindings/phy/phy-cpcap-usb.txt 23- Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt 24- Documentation/devicetree/bindings/rtc/cpcap-rtc.txt 25- Documentation/devicetree/bindings/leds/leds-cpcap.txt 26- Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml 27 28The only exception is the audio codec. Instead of a compatible value its 29node must be named "audio-codec". 30 31Required properties for the audio-codec subnode: 32 33- #sound-dai-cells = <1>; 34- interrupts : should contain jack detection interrupts, with headset 35 detect interrupt matching "hs" and microphone bias 2 36 detect interrupt matching "mb2" in interrupt-names. 37- interrupt-names : Contains "hs", "mb2" 38 39The audio-codec provides two DAIs. The first one is connected to the 40Stereo HiFi DAC and the second one is connected to the Voice DAC. 41 42Example: 43 44&mcspi1 { 45 cpcap: pmic@0 { 46 compatible = "motorola,cpcap", "ste,6556002"; 47 reg = <0>; /* cs0 */ 48 interrupt-parent = <&gpio1>; 49 interrupts = <7 IRQ_TYPE_EDGE_RISING>; 50 interrupt-controller; 51 #interrupt-cells = <2>; 52 #address-cells = <1>; 53 #size-cells = <0>; 54 spi-max-frequency = <3000000>; 55 spi-cs-high; 56 57 audio-codec { 58 #sound-dai-cells = <1>; 59 interrupts-extended = <&cpcap 9 0>, <&cpcap 10 0>; 60 interrupt-names = "hs", "mb2"; 61 62 /* HiFi */ 63 port@0 { 64 endpoint { 65 remote-endpoint = <&cpu_dai1>; 66 }; 67 }; 68 69 /* Voice */ 70 port@1 { 71 endpoint { 72 remote-endpoint = <&cpu_dai2>; 73 }; 74 }; 75 }; 76 }; 77}; 78 79