xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/arm/marvell/ap80x-system-controller.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunMarvell Armada AP80x System Controller
2*4882a593Smuzhiyun======================================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunThe AP806/AP807 is one of the two core HW blocks of the Marvell Armada
5*4882a593Smuzhiyun7K/8K/931x SoCs. It contains system controllers, which provide several
6*4882a593Smuzhiyunregisters giving access to numerous features: clocks, pin-muxing and
7*4882a593Smuzhiyunmany other SoC configuration items. This DT binding allows to describe
8*4882a593Smuzhiyunthese system controllers.
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunFor the top level node:
11*4882a593Smuzhiyun - compatible: must be: "syscon", "simple-mfd";
12*4882a593Smuzhiyun - reg: register area of the AP80x system controller
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunSYSTEM CONTROLLER 0
15*4882a593Smuzhiyun===================
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunClocks:
18*4882a593Smuzhiyun-------
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunThe Device Tree node representing the AP806/AP807 system controller
22*4882a593Smuzhiyunprovides a number of clocks:
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun - 0: reference clock of CPU cluster 0
25*4882a593Smuzhiyun - 1: reference clock of CPU cluster 1
26*4882a593Smuzhiyun - 2: fixed PLL at 1200 Mhz
27*4882a593Smuzhiyun - 3: MSS clock, derived from the fixed PLL
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunRequired properties:
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun - compatible: must be one of:
32*4882a593Smuzhiyun   * "marvell,ap806-clock"
33*4882a593Smuzhiyun   * "marvell,ap807-clock"
34*4882a593Smuzhiyun - #clock-cells: must be set to 1
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunPinctrl:
37*4882a593Smuzhiyun--------
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunFor common binding part and usage, refer to
40*4882a593SmuzhiyunDocumentation/devicetree/bindings/pinctrl/marvell,mvebu-pinctrl.txt.
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunRequired properties:
43*4882a593Smuzhiyun- compatible must be "marvell,ap806-pinctrl",
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunAvailable mpp pins/groups and functions:
46*4882a593SmuzhiyunNote: brackets (x) are not part of the mpp name for marvell,function and given
47*4882a593Smuzhiyunonly for more detailed description in this document.
48*4882a593Smuzhiyun
49*4882a593Smuzhiyunname	pins	functions
50*4882a593Smuzhiyun================================================================================
51*4882a593Smuzhiyunmpp0	0	gpio, sdio(clk), spi0(clk)
52*4882a593Smuzhiyunmpp1	1	gpio, sdio(cmd), spi0(miso)
53*4882a593Smuzhiyunmpp2	2	gpio, sdio(d0), spi0(mosi)
54*4882a593Smuzhiyunmpp3	3	gpio, sdio(d1), spi0(cs0n)
55*4882a593Smuzhiyunmpp4	4	gpio, sdio(d2), i2c0(sda)
56*4882a593Smuzhiyunmpp5	5	gpio, sdio(d3), i2c0(sdk)
57*4882a593Smuzhiyunmpp6	6	gpio, sdio(ds)
58*4882a593Smuzhiyunmpp7	7	gpio, sdio(d4), uart1(rxd)
59*4882a593Smuzhiyunmpp8	8	gpio, sdio(d5), uart1(txd)
60*4882a593Smuzhiyunmpp9	9	gpio, sdio(d6), spi0(cs1n)
61*4882a593Smuzhiyunmpp10	10	gpio, sdio(d7)
62*4882a593Smuzhiyunmpp11	11	gpio, uart0(txd)
63*4882a593Smuzhiyunmpp12	12	gpio, sdio(pw_off), sdio(hw_rst)
64*4882a593Smuzhiyunmpp13	13	gpio
65*4882a593Smuzhiyunmpp14	14	gpio
66*4882a593Smuzhiyunmpp15	15	gpio
67*4882a593Smuzhiyunmpp16	16	gpio
68*4882a593Smuzhiyunmpp17	17	gpio
69*4882a593Smuzhiyunmpp18	18	gpio
70*4882a593Smuzhiyunmpp19	19	gpio, uart0(rxd), sdio(pw_off)
71*4882a593Smuzhiyun
72*4882a593SmuzhiyunGPIO:
73*4882a593Smuzhiyun-----
74*4882a593SmuzhiyunFor common binding part and usage, refer to
75*4882a593SmuzhiyunDocumentation/devicetree/bindings/gpio/gpio-mvebu.txt.
76*4882a593Smuzhiyun
77*4882a593SmuzhiyunRequired properties:
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun- compatible: "marvell,armada-8k-gpio"
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun- offset: offset address inside the syscon block
82*4882a593Smuzhiyun
83*4882a593SmuzhiyunExample:
84*4882a593Smuzhiyunap_syscon: system-controller@6f4000 {
85*4882a593Smuzhiyun	compatible = "syscon", "simple-mfd";
86*4882a593Smuzhiyun	reg = <0x6f4000 0x1000>;
87*4882a593Smuzhiyun
88*4882a593Smuzhiyun	ap_clk: clock {
89*4882a593Smuzhiyun		compatible = "marvell,ap806-clock";
90*4882a593Smuzhiyun		#clock-cells = <1>;
91*4882a593Smuzhiyun	};
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun	ap_pinctrl: pinctrl {
94*4882a593Smuzhiyun		compatible = "marvell,ap806-pinctrl";
95*4882a593Smuzhiyun	};
96*4882a593Smuzhiyun
97*4882a593Smuzhiyun	ap_gpio: gpio {
98*4882a593Smuzhiyun		compatible = "marvell,armada-8k-gpio";
99*4882a593Smuzhiyun		offset = <0x1040>;
100*4882a593Smuzhiyun		ngpios = <19>;
101*4882a593Smuzhiyun		gpio-controller;
102*4882a593Smuzhiyun		#gpio-cells = <2>;
103*4882a593Smuzhiyun		gpio-ranges = <&ap_pinctrl 0 0 19>;
104*4882a593Smuzhiyun	};
105*4882a593Smuzhiyun};
106*4882a593Smuzhiyun
107*4882a593SmuzhiyunSYSTEM CONTROLLER 1
108*4882a593Smuzhiyun===================
109*4882a593Smuzhiyun
110*4882a593SmuzhiyunThermal:
111*4882a593Smuzhiyun--------
112*4882a593Smuzhiyun
113*4882a593SmuzhiyunFor common binding part and usage, refer to
114*4882a593SmuzhiyunDocumentation/devicetree/bindings/thermal/thermal*.yaml
115*4882a593Smuzhiyun
116*4882a593SmuzhiyunThe thermal IP can probe the temperature all around the processor. It
117*4882a593Smuzhiyunmay feature several channels, each of them wired to one sensor.
118*4882a593Smuzhiyun
119*4882a593SmuzhiyunIt is possible to setup an overheat interrupt by giving at least one
120*4882a593Smuzhiyuncritical point to any subnode of the thermal-zone node.
121*4882a593Smuzhiyun
122*4882a593SmuzhiyunRequired properties:
123*4882a593Smuzhiyun- compatible: must be one of:
124*4882a593Smuzhiyun  * marvell,armada-ap806-thermal
125*4882a593Smuzhiyun- reg: register range associated with the thermal functions.
126*4882a593Smuzhiyun
127*4882a593SmuzhiyunOptional properties:
128*4882a593Smuzhiyun- interrupts: overheat interrupt handle. Should point to line 18 of the
129*4882a593Smuzhiyun  SEI irqchip. See interrupt-controller/interrupts.txt
130*4882a593Smuzhiyun- #thermal-sensor-cells: shall be <1> when thermal-zones subnodes refer
131*4882a593Smuzhiyun  to this IP and represents the channel ID. There is one sensor per
132*4882a593Smuzhiyun  channel. O refers to the thermal IP internal channel, while positive
133*4882a593Smuzhiyun  IDs refer to each CPU.
134*4882a593Smuzhiyun
135*4882a593SmuzhiyunExample:
136*4882a593Smuzhiyunap_syscon1: system-controller@6f8000 {
137*4882a593Smuzhiyun	compatible = "syscon", "simple-mfd";
138*4882a593Smuzhiyun	reg = <0x6f8000 0x1000>;
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun	ap_thermal: thermal-sensor@80 {
141*4882a593Smuzhiyun		compatible = "marvell,armada-ap806-thermal";
142*4882a593Smuzhiyun		reg = <0x80 0x10>;
143*4882a593Smuzhiyun		interrupt-parent = <&sei>;
144*4882a593Smuzhiyun		interrupts = <18>;
145*4882a593Smuzhiyun		#thermal-sensor-cells = <1>;
146*4882a593Smuzhiyun	};
147*4882a593Smuzhiyun};
148*4882a593Smuzhiyun
149*4882a593SmuzhiyunCluster clocks:
150*4882a593Smuzhiyun---------------
151*4882a593Smuzhiyun
152*4882a593SmuzhiyunDevice Tree Clock bindings for cluster clock of Marvell
153*4882a593SmuzhiyunAP806/AP807. Each cluster contain up to 2 CPUs running at the same
154*4882a593Smuzhiyunfrequency.
155*4882a593Smuzhiyun
156*4882a593SmuzhiyunRequired properties:
157*4882a593Smuzhiyun - compatible: must be one of:
158*4882a593Smuzhiyun   * "marvell,ap806-cpu-clock"
159*4882a593Smuzhiyun   * "marvell,ap807-cpu-clock"
160*4882a593Smuzhiyun- #clock-cells : should be set to 1.
161*4882a593Smuzhiyun
162*4882a593Smuzhiyun- clocks : shall be the input parent clock(s) phandle for the clock
163*4882a593Smuzhiyun           (one per cluster)
164*4882a593Smuzhiyun
165*4882a593Smuzhiyun- reg: register range associated with the cluster clocks
166*4882a593Smuzhiyun
167*4882a593Smuzhiyunap_syscon1: system-controller@6f8000 {
168*4882a593Smuzhiyun	compatible = "marvell,armada-ap806-syscon1", "syscon", "simple-mfd";
169*4882a593Smuzhiyun	reg = <0x6f8000 0x1000>;
170*4882a593Smuzhiyun
171*4882a593Smuzhiyun	cpu_clk: clock-cpu@278 {
172*4882a593Smuzhiyun		compatible = "marvell,ap806-cpu-clock";
173*4882a593Smuzhiyun		clocks = <&ap_clk 0>, <&ap_clk 1>;
174*4882a593Smuzhiyun		#clock-cells = <1>;
175*4882a593Smuzhiyun		reg = <0x278 0xa30>;
176*4882a593Smuzhiyun	};
177*4882a593Smuzhiyun};
178