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