xref: /openbmc/linux/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt (revision 762f99f4f3cb41a775b5157dd761217beba65873)
156e1d40dSTony LindgrenMotorola CPCAP PMIC device tree binding
256e1d40dSTony Lindgren
356e1d40dSTony LindgrenRequired properties:
456e1d40dSTony Lindgren- compatible		: One or both of "motorola,cpcap" or "ste,6556002"
556e1d40dSTony Lindgren- reg			: SPI chip select
656e1d40dSTony Lindgren- interrupts		: The interrupt line the device is connected to
756e1d40dSTony Lindgren- interrupt-controller	: Marks the device node as an interrupt controller
856e1d40dSTony Lindgren- #interrupt-cells	: The number of cells to describe an IRQ, should be 2
956e1d40dSTony Lindgren- #address-cells	: Child device offset number of cells, should be 1
1056e1d40dSTony Lindgren- #size-cells		: Child device size number of cells, should be 0
1156e1d40dSTony Lindgren- spi-max-frequency	: Typically set to 3000000
1256e1d40dSTony Lindgren- spi-cs-high		: SPI chip select direction
1356e1d40dSTony Lindgren
14fab54649SSebastian ReichelOptional subnodes:
15fab54649SSebastian Reichel
16fab54649SSebastian ReichelThe sub-functions of CPCAP get their own node with their own compatible values,
17fab54649SSebastian Reichelwhich are described in the following files:
18fab54649SSebastian Reichel
1994dac76dSMauro Carvalho Chehab- Documentation/devicetree/bindings/power/supply/cpcap-battery.yaml
20*b5205bb4SMauro Carvalho Chehab- Documentation/devicetree/bindings/power/supply/cpcap-charger.yaml
21f6d6c699SMauro Carvalho Chehab- Documentation/devicetree/bindings/regulator/cpcap-regulator.txt
22f6d6c699SMauro Carvalho Chehab- Documentation/devicetree/bindings/phy/phy-cpcap-usb.txt
23f6d6c699SMauro Carvalho Chehab- Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt
24f6d6c699SMauro Carvalho Chehab- Documentation/devicetree/bindings/rtc/cpcap-rtc.txt
25f6d6c699SMauro Carvalho Chehab- Documentation/devicetree/bindings/leds/leds-cpcap.txt
2621d6ff39SMauro Carvalho Chehab- Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml
27fab54649SSebastian Reichel
28fab54649SSebastian ReichelThe only exception is the audio codec. Instead of a compatible value its
29fab54649SSebastian Reichelnode must be named "audio-codec".
30fab54649SSebastian Reichel
31fab54649SSebastian ReichelRequired properties for the audio-codec subnode:
32fab54649SSebastian Reichel
33fab54649SSebastian Reichel- #sound-dai-cells = <1>;
34fab54649SSebastian Reichel
35fab54649SSebastian ReichelThe audio-codec provides two DAIs. The first one is connected to the
36fab54649SSebastian ReichelStereo HiFi DAC and the second one is connected to the Voice DAC.
37fab54649SSebastian Reichel
3856e1d40dSTony LindgrenExample:
3956e1d40dSTony Lindgren
4056e1d40dSTony Lindgren&mcspi1 {
4156e1d40dSTony Lindgren	cpcap: pmic@0 {
4256e1d40dSTony Lindgren		compatible = "motorola,cpcap", "ste,6556002";
4356e1d40dSTony Lindgren		reg = <0>;	/* cs0 */
4456e1d40dSTony Lindgren		interrupt-parent = <&gpio1>;
4556e1d40dSTony Lindgren		interrupts = <7 IRQ_TYPE_EDGE_RISING>;
4656e1d40dSTony Lindgren		interrupt-controller;
4756e1d40dSTony Lindgren		#interrupt-cells = <2>;
4856e1d40dSTony Lindgren		#address-cells = <1>;
4956e1d40dSTony Lindgren		#size-cells = <0>;
5056e1d40dSTony Lindgren		spi-max-frequency = <3000000>;
5156e1d40dSTony Lindgren		spi-cs-high;
52fab54649SSebastian Reichel
53fab54649SSebastian Reichel		audio-codec {
54fab54649SSebastian Reichel			#sound-dai-cells = <1>;
55fab54649SSebastian Reichel
56fab54649SSebastian Reichel			/* HiFi */
57fab54649SSebastian Reichel			port@0 {
58fab54649SSebastian Reichel				endpoint {
59fab54649SSebastian Reichel					remote-endpoint = <&cpu_dai1>;
60fab54649SSebastian Reichel				};
61fab54649SSebastian Reichel			};
62fab54649SSebastian Reichel
63fab54649SSebastian Reichel			/* Voice */
64fab54649SSebastian Reichel			port@1 {
65fab54649SSebastian Reichel				endpoint {
66fab54649SSebastian Reichel					remote-endpoint = <&cpu_dai2>;
67fab54649SSebastian Reichel				};
68fab54649SSebastian Reichel			};
69fab54649SSebastian Reichel		};
7056e1d40dSTony Lindgren	};
7156e1d40dSTony Lindgren};
7256e1d40dSTony Lindgren
73