12537831bSBen PeledMarvell Armada AP80x System Controller
22537831bSBen Peled======================================
32537831bSBen Peled
42537831bSBen PeledThe AP806/AP807 is one of the two core HW blocks of the Marvell Armada
52537831bSBen Peled7K/8K/931x SoCs. It contains system controllers, which provide several
62537831bSBen Peledregisters giving access to numerous features: clocks, pin-muxing and
72537831bSBen Peledmany other SoC configuration items. This DT binding allows to describe
82537831bSBen Peledthese system controllers.
92537831bSBen Peled
102537831bSBen PeledFor the top level node:
112537831bSBen Peled - compatible: must be: "syscon", "simple-mfd";
122537831bSBen Peled - reg: register area of the AP80x system controller
132537831bSBen Peled
142537831bSBen PeledSYSTEM CONTROLLER 0
152537831bSBen Peled===================
162537831bSBen Peled
172537831bSBen PeledClocks:
182537831bSBen Peled-------
192537831bSBen Peled
202537831bSBen Peled
212537831bSBen PeledThe Device Tree node representing the AP806/AP807 system controller
222537831bSBen Peledprovides a number of clocks:
232537831bSBen Peled
242537831bSBen Peled - 0: reference clock of CPU cluster 0
252537831bSBen Peled - 1: reference clock of CPU cluster 1
262537831bSBen Peled - 2: fixed PLL at 1200 Mhz
272537831bSBen Peled - 3: MSS clock, derived from the fixed PLL
282537831bSBen Peled
292537831bSBen PeledRequired properties:
302537831bSBen Peled
312537831bSBen Peled - compatible: must be one of:
322537831bSBen Peled   * "marvell,ap806-clock"
332537831bSBen Peled   * "marvell,ap807-clock"
342537831bSBen Peled - #clock-cells: must be set to 1
352537831bSBen Peled
362537831bSBen PeledPinctrl:
372537831bSBen Peled--------
382537831bSBen Peled
392537831bSBen PeledFor common binding part and usage, refer to
402537831bSBen PeledDocumentation/devicetree/bindings/pinctrl/marvell,mvebu-pinctrl.txt.
412537831bSBen Peled
422537831bSBen PeledRequired properties:
432537831bSBen Peled- compatible must be "marvell,ap806-pinctrl",
442537831bSBen Peled
452537831bSBen PeledAvailable mpp pins/groups and functions:
462537831bSBen PeledNote: brackets (x) are not part of the mpp name for marvell,function and given
472537831bSBen Peledonly for more detailed description in this document.
482537831bSBen Peled
492537831bSBen Peledname	pins	functions
502537831bSBen Peled================================================================================
512537831bSBen Peledmpp0	0	gpio, sdio(clk), spi0(clk)
522537831bSBen Peledmpp1	1	gpio, sdio(cmd), spi0(miso)
532537831bSBen Peledmpp2	2	gpio, sdio(d0), spi0(mosi)
542537831bSBen Peledmpp3	3	gpio, sdio(d1), spi0(cs0n)
552537831bSBen Peledmpp4	4	gpio, sdio(d2), i2c0(sda)
562537831bSBen Peledmpp5	5	gpio, sdio(d3), i2c0(sdk)
572537831bSBen Peledmpp6	6	gpio, sdio(ds)
582537831bSBen Peledmpp7	7	gpio, sdio(d4), uart1(rxd)
592537831bSBen Peledmpp8	8	gpio, sdio(d5), uart1(txd)
602537831bSBen Peledmpp9	9	gpio, sdio(d6), spi0(cs1n)
612537831bSBen Peledmpp10	10	gpio, sdio(d7)
622537831bSBen Peledmpp11	11	gpio, uart0(txd)
632537831bSBen Peledmpp12	12	gpio, sdio(pw_off), sdio(hw_rst)
642537831bSBen Peledmpp13	13	gpio
652537831bSBen Peledmpp14	14	gpio
662537831bSBen Peledmpp15	15	gpio
672537831bSBen Peledmpp16	16	gpio
682537831bSBen Peledmpp17	17	gpio
692537831bSBen Peledmpp18	18	gpio
702537831bSBen Peledmpp19	19	gpio, uart0(rxd), sdio(pw_off)
712537831bSBen Peled
722537831bSBen PeledGPIO:
732537831bSBen Peled-----
742537831bSBen PeledFor common binding part and usage, refer to
75*1282157aSChris PackhamDocumentation/devicetree/bindings/gpio/gpio-mvebu.yaml.
762537831bSBen Peled
772537831bSBen PeledRequired properties:
782537831bSBen Peled
792537831bSBen Peled- compatible: "marvell,armada-8k-gpio"
802537831bSBen Peled
812537831bSBen Peled- offset: offset address inside the syscon block
822537831bSBen Peled
83ea6fe47fSBaruch SiachOptional properties:
84ea6fe47fSBaruch Siach
85ea6fe47fSBaruch Siach- marvell,pwm-offset: offset address of PWM duration control registers inside
86ea6fe47fSBaruch Siach  the syscon block
87ea6fe47fSBaruch Siach
882537831bSBen PeledExample:
892537831bSBen Peledap_syscon: system-controller@6f4000 {
902537831bSBen Peled	compatible = "syscon", "simple-mfd";
912537831bSBen Peled	reg = <0x6f4000 0x1000>;
922537831bSBen Peled
932537831bSBen Peled	ap_clk: clock {
942537831bSBen Peled		compatible = "marvell,ap806-clock";
952537831bSBen Peled		#clock-cells = <1>;
962537831bSBen Peled	};
972537831bSBen Peled
982537831bSBen Peled	ap_pinctrl: pinctrl {
992537831bSBen Peled		compatible = "marvell,ap806-pinctrl";
1002537831bSBen Peled	};
1012537831bSBen Peled
1022537831bSBen Peled	ap_gpio: gpio {
1032537831bSBen Peled		compatible = "marvell,armada-8k-gpio";
1042537831bSBen Peled		offset = <0x1040>;
1052537831bSBen Peled		ngpios = <19>;
1062537831bSBen Peled		gpio-controller;
1072537831bSBen Peled		#gpio-cells = <2>;
1082537831bSBen Peled		gpio-ranges = <&ap_pinctrl 0 0 19>;
109ea6fe47fSBaruch Siach		marvell,pwm-offset = <0x10c0>;
110ea6fe47fSBaruch Siach		#pwm-cells = <2>;
111ea6fe47fSBaruch Siach		clocks = <&ap_clk 3>;
1122537831bSBen Peled	};
1132537831bSBen Peled};
1142537831bSBen Peled
1152537831bSBen PeledSYSTEM CONTROLLER 1
1162537831bSBen Peled===================
1172537831bSBen Peled
1182537831bSBen PeledThermal:
1192537831bSBen Peled--------
1202537831bSBen Peled
1212537831bSBen PeledFor common binding part and usage, refer to
122cff1d293SAmit KucheriaDocumentation/devicetree/bindings/thermal/thermal*.yaml
1232537831bSBen Peled
1242537831bSBen PeledThe thermal IP can probe the temperature all around the processor. It
1252537831bSBen Peledmay feature several channels, each of them wired to one sensor.
1262537831bSBen Peled
1272537831bSBen PeledIt is possible to setup an overheat interrupt by giving at least one
1282537831bSBen Peledcritical point to any subnode of the thermal-zone node.
1292537831bSBen Peled
1302537831bSBen PeledRequired properties:
1312537831bSBen Peled- compatible: must be one of:
1322537831bSBen Peled  * marvell,armada-ap806-thermal
1332537831bSBen Peled- reg: register range associated with the thermal functions.
1342537831bSBen Peled
1352537831bSBen PeledOptional properties:
1362537831bSBen Peled- interrupts: overheat interrupt handle. Should point to line 18 of the
1372537831bSBen Peled  SEI irqchip. See interrupt-controller/interrupts.txt
1382537831bSBen Peled- #thermal-sensor-cells: shall be <1> when thermal-zones subnodes refer
1392537831bSBen Peled  to this IP and represents the channel ID. There is one sensor per
1402537831bSBen Peled  channel. O refers to the thermal IP internal channel, while positive
1412537831bSBen Peled  IDs refer to each CPU.
1422537831bSBen Peled
1432537831bSBen PeledExample:
1442537831bSBen Peledap_syscon1: system-controller@6f8000 {
1452537831bSBen Peled	compatible = "syscon", "simple-mfd";
1462537831bSBen Peled	reg = <0x6f8000 0x1000>;
1472537831bSBen Peled
1482537831bSBen Peled	ap_thermal: thermal-sensor@80 {
1492537831bSBen Peled		compatible = "marvell,armada-ap806-thermal";
1502537831bSBen Peled		reg = <0x80 0x10>;
1512537831bSBen Peled		interrupt-parent = <&sei>;
1522537831bSBen Peled		interrupts = <18>;
1532537831bSBen Peled		#thermal-sensor-cells = <1>;
1542537831bSBen Peled	};
1552537831bSBen Peled};
1562537831bSBen Peled
1572537831bSBen PeledCluster clocks:
1582537831bSBen Peled---------------
1592537831bSBen Peled
1602537831bSBen PeledDevice Tree Clock bindings for cluster clock of Marvell
1612537831bSBen PeledAP806/AP807. Each cluster contain up to 2 CPUs running at the same
1622537831bSBen Peledfrequency.
1632537831bSBen Peled
1642537831bSBen PeledRequired properties:
1652537831bSBen Peled - compatible: must be one of:
1662537831bSBen Peled   * "marvell,ap806-cpu-clock"
1672537831bSBen Peled   * "marvell,ap807-cpu-clock"
1682537831bSBen Peled- #clock-cells : should be set to 1.
1692537831bSBen Peled
1702537831bSBen Peled- clocks : shall be the input parent clock(s) phandle for the clock
1712537831bSBen Peled           (one per cluster)
1722537831bSBen Peled
1732537831bSBen Peled- reg: register range associated with the cluster clocks
1742537831bSBen Peled
1752537831bSBen Peledap_syscon1: system-controller@6f8000 {
1762537831bSBen Peled	compatible = "marvell,armada-ap806-syscon1", "syscon", "simple-mfd";
1772537831bSBen Peled	reg = <0x6f8000 0x1000>;
1782537831bSBen Peled
1792537831bSBen Peled	cpu_clk: clock-cpu@278 {
1802537831bSBen Peled		compatible = "marvell,ap806-cpu-clock";
1812537831bSBen Peled		clocks = <&ap_clk 0>, <&ap_clk 1>;
1822537831bSBen Peled		#clock-cells = <1>;
1832537831bSBen Peled		reg = <0x278 0xa30>;
1842537831bSBen Peled	};
1852537831bSBen Peled};
186