xref: /freebsd/sys/contrib/device-tree/Bindings/arm/marvell/ap80x-system-controller.txt (revision 5def4c47d4bd90b209b9b4a4ba9faec15846d8fd)
1c66ec88fSEmmanuel VadotMarvell Armada AP80x System Controller
2c66ec88fSEmmanuel Vadot======================================
3c66ec88fSEmmanuel Vadot
4c66ec88fSEmmanuel VadotThe AP806/AP807 is one of the two core HW blocks of the Marvell Armada
5c66ec88fSEmmanuel Vadot7K/8K/931x SoCs. It contains system controllers, which provide several
6c66ec88fSEmmanuel Vadotregisters giving access to numerous features: clocks, pin-muxing and
7c66ec88fSEmmanuel Vadotmany other SoC configuration items. This DT binding allows to describe
8c66ec88fSEmmanuel Vadotthese system controllers.
9c66ec88fSEmmanuel Vadot
10c66ec88fSEmmanuel VadotFor the top level node:
11c66ec88fSEmmanuel Vadot - compatible: must be: "syscon", "simple-mfd";
12c66ec88fSEmmanuel Vadot - reg: register area of the AP80x system controller
13c66ec88fSEmmanuel Vadot
14c66ec88fSEmmanuel VadotSYSTEM CONTROLLER 0
15c66ec88fSEmmanuel Vadot===================
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel VadotClocks:
18c66ec88fSEmmanuel Vadot-------
19c66ec88fSEmmanuel Vadot
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel VadotThe Device Tree node representing the AP806/AP807 system controller
22c66ec88fSEmmanuel Vadotprovides a number of clocks:
23c66ec88fSEmmanuel Vadot
24c66ec88fSEmmanuel Vadot - 0: reference clock of CPU cluster 0
25c66ec88fSEmmanuel Vadot - 1: reference clock of CPU cluster 1
26c66ec88fSEmmanuel Vadot - 2: fixed PLL at 1200 Mhz
27c66ec88fSEmmanuel Vadot - 3: MSS clock, derived from the fixed PLL
28c66ec88fSEmmanuel Vadot
29c66ec88fSEmmanuel VadotRequired properties:
30c66ec88fSEmmanuel Vadot
31c66ec88fSEmmanuel Vadot - compatible: must be one of:
32c66ec88fSEmmanuel Vadot   * "marvell,ap806-clock"
33c66ec88fSEmmanuel Vadot   * "marvell,ap807-clock"
34c66ec88fSEmmanuel Vadot - #clock-cells: must be set to 1
35c66ec88fSEmmanuel Vadot
36c66ec88fSEmmanuel VadotPinctrl:
37c66ec88fSEmmanuel Vadot--------
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel VadotFor common binding part and usage, refer to
40c66ec88fSEmmanuel VadotDocumentation/devicetree/bindings/pinctrl/marvell,mvebu-pinctrl.txt.
41c66ec88fSEmmanuel Vadot
42c66ec88fSEmmanuel VadotRequired properties:
43c66ec88fSEmmanuel Vadot- compatible must be "marvell,ap806-pinctrl",
44c66ec88fSEmmanuel Vadot
45c66ec88fSEmmanuel VadotAvailable mpp pins/groups and functions:
46c66ec88fSEmmanuel VadotNote: brackets (x) are not part of the mpp name for marvell,function and given
47c66ec88fSEmmanuel Vadotonly for more detailed description in this document.
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel Vadotname	pins	functions
50c66ec88fSEmmanuel Vadot================================================================================
51c66ec88fSEmmanuel Vadotmpp0	0	gpio, sdio(clk), spi0(clk)
52c66ec88fSEmmanuel Vadotmpp1	1	gpio, sdio(cmd), spi0(miso)
53c66ec88fSEmmanuel Vadotmpp2	2	gpio, sdio(d0), spi0(mosi)
54c66ec88fSEmmanuel Vadotmpp3	3	gpio, sdio(d1), spi0(cs0n)
55c66ec88fSEmmanuel Vadotmpp4	4	gpio, sdio(d2), i2c0(sda)
56c66ec88fSEmmanuel Vadotmpp5	5	gpio, sdio(d3), i2c0(sdk)
57c66ec88fSEmmanuel Vadotmpp6	6	gpio, sdio(ds)
58c66ec88fSEmmanuel Vadotmpp7	7	gpio, sdio(d4), uart1(rxd)
59c66ec88fSEmmanuel Vadotmpp8	8	gpio, sdio(d5), uart1(txd)
60c66ec88fSEmmanuel Vadotmpp9	9	gpio, sdio(d6), spi0(cs1n)
61c66ec88fSEmmanuel Vadotmpp10	10	gpio, sdio(d7)
62c66ec88fSEmmanuel Vadotmpp11	11	gpio, uart0(txd)
63c66ec88fSEmmanuel Vadotmpp12	12	gpio, sdio(pw_off), sdio(hw_rst)
64c66ec88fSEmmanuel Vadotmpp13	13	gpio
65c66ec88fSEmmanuel Vadotmpp14	14	gpio
66c66ec88fSEmmanuel Vadotmpp15	15	gpio
67c66ec88fSEmmanuel Vadotmpp16	16	gpio
68c66ec88fSEmmanuel Vadotmpp17	17	gpio
69c66ec88fSEmmanuel Vadotmpp18	18	gpio
70c66ec88fSEmmanuel Vadotmpp19	19	gpio, uart0(rxd), sdio(pw_off)
71c66ec88fSEmmanuel Vadot
72c66ec88fSEmmanuel VadotGPIO:
73c66ec88fSEmmanuel Vadot-----
74c66ec88fSEmmanuel VadotFor common binding part and usage, refer to
75c66ec88fSEmmanuel VadotDocumentation/devicetree/bindings/gpio/gpio-mvebu.txt.
76c66ec88fSEmmanuel Vadot
77c66ec88fSEmmanuel VadotRequired properties:
78c66ec88fSEmmanuel Vadot
79c66ec88fSEmmanuel Vadot- compatible: "marvell,armada-8k-gpio"
80c66ec88fSEmmanuel Vadot
81c66ec88fSEmmanuel Vadot- offset: offset address inside the syscon block
82c66ec88fSEmmanuel Vadot
83*5def4c47SEmmanuel VadotOptional properties:
84*5def4c47SEmmanuel Vadot
85*5def4c47SEmmanuel Vadot- marvell,pwm-offset: offset address of PWM duration control registers inside
86*5def4c47SEmmanuel Vadot  the syscon block
87*5def4c47SEmmanuel Vadot
88c66ec88fSEmmanuel VadotExample:
89c66ec88fSEmmanuel Vadotap_syscon: system-controller@6f4000 {
90c66ec88fSEmmanuel Vadot	compatible = "syscon", "simple-mfd";
91c66ec88fSEmmanuel Vadot	reg = <0x6f4000 0x1000>;
92c66ec88fSEmmanuel Vadot
93c66ec88fSEmmanuel Vadot	ap_clk: clock {
94c66ec88fSEmmanuel Vadot		compatible = "marvell,ap806-clock";
95c66ec88fSEmmanuel Vadot		#clock-cells = <1>;
96c66ec88fSEmmanuel Vadot	};
97c66ec88fSEmmanuel Vadot
98c66ec88fSEmmanuel Vadot	ap_pinctrl: pinctrl {
99c66ec88fSEmmanuel Vadot		compatible = "marvell,ap806-pinctrl";
100c66ec88fSEmmanuel Vadot	};
101c66ec88fSEmmanuel Vadot
102c66ec88fSEmmanuel Vadot	ap_gpio: gpio {
103c66ec88fSEmmanuel Vadot		compatible = "marvell,armada-8k-gpio";
104c66ec88fSEmmanuel Vadot		offset = <0x1040>;
105c66ec88fSEmmanuel Vadot		ngpios = <19>;
106c66ec88fSEmmanuel Vadot		gpio-controller;
107c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
108c66ec88fSEmmanuel Vadot		gpio-ranges = <&ap_pinctrl 0 0 19>;
109*5def4c47SEmmanuel Vadot		marvell,pwm-offset = <0x10c0>;
110*5def4c47SEmmanuel Vadot		#pwm-cells = <2>;
111*5def4c47SEmmanuel Vadot		clocks = <&ap_clk 3>;
112c66ec88fSEmmanuel Vadot	};
113c66ec88fSEmmanuel Vadot};
114c66ec88fSEmmanuel Vadot
115c66ec88fSEmmanuel VadotSYSTEM CONTROLLER 1
116c66ec88fSEmmanuel Vadot===================
117c66ec88fSEmmanuel Vadot
118c66ec88fSEmmanuel VadotThermal:
119c66ec88fSEmmanuel Vadot--------
120c66ec88fSEmmanuel Vadot
121c66ec88fSEmmanuel VadotFor common binding part and usage, refer to
122c66ec88fSEmmanuel VadotDocumentation/devicetree/bindings/thermal/thermal*.yaml
123c66ec88fSEmmanuel Vadot
124c66ec88fSEmmanuel VadotThe thermal IP can probe the temperature all around the processor. It
125c66ec88fSEmmanuel Vadotmay feature several channels, each of them wired to one sensor.
126c66ec88fSEmmanuel Vadot
127c66ec88fSEmmanuel VadotIt is possible to setup an overheat interrupt by giving at least one
128c66ec88fSEmmanuel Vadotcritical point to any subnode of the thermal-zone node.
129c66ec88fSEmmanuel Vadot
130c66ec88fSEmmanuel VadotRequired properties:
131c66ec88fSEmmanuel Vadot- compatible: must be one of:
132c66ec88fSEmmanuel Vadot  * marvell,armada-ap806-thermal
133c66ec88fSEmmanuel Vadot- reg: register range associated with the thermal functions.
134c66ec88fSEmmanuel Vadot
135c66ec88fSEmmanuel VadotOptional properties:
136c66ec88fSEmmanuel Vadot- interrupts: overheat interrupt handle. Should point to line 18 of the
137c66ec88fSEmmanuel Vadot  SEI irqchip. See interrupt-controller/interrupts.txt
138c66ec88fSEmmanuel Vadot- #thermal-sensor-cells: shall be <1> when thermal-zones subnodes refer
139c66ec88fSEmmanuel Vadot  to this IP and represents the channel ID. There is one sensor per
140c66ec88fSEmmanuel Vadot  channel. O refers to the thermal IP internal channel, while positive
141c66ec88fSEmmanuel Vadot  IDs refer to each CPU.
142c66ec88fSEmmanuel Vadot
143c66ec88fSEmmanuel VadotExample:
144c66ec88fSEmmanuel Vadotap_syscon1: system-controller@6f8000 {
145c66ec88fSEmmanuel Vadot	compatible = "syscon", "simple-mfd";
146c66ec88fSEmmanuel Vadot	reg = <0x6f8000 0x1000>;
147c66ec88fSEmmanuel Vadot
148c66ec88fSEmmanuel Vadot	ap_thermal: thermal-sensor@80 {
149c66ec88fSEmmanuel Vadot		compatible = "marvell,armada-ap806-thermal";
150c66ec88fSEmmanuel Vadot		reg = <0x80 0x10>;
151c66ec88fSEmmanuel Vadot		interrupt-parent = <&sei>;
152c66ec88fSEmmanuel Vadot		interrupts = <18>;
153c66ec88fSEmmanuel Vadot		#thermal-sensor-cells = <1>;
154c66ec88fSEmmanuel Vadot	};
155c66ec88fSEmmanuel Vadot};
156c66ec88fSEmmanuel Vadot
157c66ec88fSEmmanuel VadotCluster clocks:
158c66ec88fSEmmanuel Vadot---------------
159c66ec88fSEmmanuel Vadot
160c66ec88fSEmmanuel VadotDevice Tree Clock bindings for cluster clock of Marvell
161c66ec88fSEmmanuel VadotAP806/AP807. Each cluster contain up to 2 CPUs running at the same
162c66ec88fSEmmanuel Vadotfrequency.
163c66ec88fSEmmanuel Vadot
164c66ec88fSEmmanuel VadotRequired properties:
165c66ec88fSEmmanuel Vadot - compatible: must be one of:
166c66ec88fSEmmanuel Vadot   * "marvell,ap806-cpu-clock"
167c66ec88fSEmmanuel Vadot   * "marvell,ap807-cpu-clock"
168c66ec88fSEmmanuel Vadot- #clock-cells : should be set to 1.
169c66ec88fSEmmanuel Vadot
170c66ec88fSEmmanuel Vadot- clocks : shall be the input parent clock(s) phandle for the clock
171c66ec88fSEmmanuel Vadot           (one per cluster)
172c66ec88fSEmmanuel Vadot
173c66ec88fSEmmanuel Vadot- reg: register range associated with the cluster clocks
174c66ec88fSEmmanuel Vadot
175c66ec88fSEmmanuel Vadotap_syscon1: system-controller@6f8000 {
176c66ec88fSEmmanuel Vadot	compatible = "marvell,armada-ap806-syscon1", "syscon", "simple-mfd";
177c66ec88fSEmmanuel Vadot	reg = <0x6f8000 0x1000>;
178c66ec88fSEmmanuel Vadot
179c66ec88fSEmmanuel Vadot	cpu_clk: clock-cpu@278 {
180c66ec88fSEmmanuel Vadot		compatible = "marvell,ap806-cpu-clock";
181c66ec88fSEmmanuel Vadot		clocks = <&ap_clk 0>, <&ap_clk 1>;
182c66ec88fSEmmanuel Vadot		#clock-cells = <1>;
183c66ec88fSEmmanuel Vadot		reg = <0x278 0xa30>;
184c66ec88fSEmmanuel Vadot	};
185c66ec88fSEmmanuel Vadot};
186