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