1*c66ec88fSEmmanuel Vadot* Amlogic GXBB AO Clock and Reset Unit 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotThe Amlogic GXBB AO clock controller generates and supplies clock to various 4*c66ec88fSEmmanuel Vadotcontrollers within the Always-On part of the SoC. 5*c66ec88fSEmmanuel Vadot 6*c66ec88fSEmmanuel VadotRequired Properties: 7*c66ec88fSEmmanuel Vadot 8*c66ec88fSEmmanuel Vadot- compatible: value should be different for each SoC family as : 9*c66ec88fSEmmanuel Vadot - GXBB (S905) : "amlogic,meson-gxbb-aoclkc" 10*c66ec88fSEmmanuel Vadot - GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc" 11*c66ec88fSEmmanuel Vadot - GXM (S912) : "amlogic,meson-gxm-aoclkc" 12*c66ec88fSEmmanuel Vadot - AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc" 13*c66ec88fSEmmanuel Vadot - G12A (S905X2, S905D2, S905Y2) : "amlogic,meson-g12a-aoclkc" 14*c66ec88fSEmmanuel Vadot followed by the common "amlogic,meson-gx-aoclkc" 15*c66ec88fSEmmanuel Vadot- clocks: list of clock phandle, one for each entry clock-names. 16*c66ec88fSEmmanuel Vadot- clock-names: should contain the following: 17*c66ec88fSEmmanuel Vadot * "xtal" : the platform xtal 18*c66ec88fSEmmanuel Vadot * "mpeg-clk" : the main clock controller mother clock (aka clk81) 19*c66ec88fSEmmanuel Vadot * "ext-32k-0" : external 32kHz reference #0 if any (optional) 20*c66ec88fSEmmanuel Vadot * "ext-32k-1" : external 32kHz reference #1 if any (optional - gx only) 21*c66ec88fSEmmanuel Vadot * "ext-32k-2" : external 32kHz reference #2 if any (optional - gx only) 22*c66ec88fSEmmanuel Vadot 23*c66ec88fSEmmanuel Vadot- #clock-cells: should be 1. 24*c66ec88fSEmmanuel Vadot 25*c66ec88fSEmmanuel VadotEach clock is assigned an identifier and client nodes can use this identifier 26*c66ec88fSEmmanuel Vadotto specify the clock which they consume. All available clocks are defined as 27*c66ec88fSEmmanuel Vadotpreprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be 28*c66ec88fSEmmanuel Vadotused in device tree sources. 29*c66ec88fSEmmanuel Vadot 30*c66ec88fSEmmanuel Vadot- #reset-cells: should be 1. 31*c66ec88fSEmmanuel Vadot 32*c66ec88fSEmmanuel VadotEach reset is assigned an identifier and client nodes can use this identifier 33*c66ec88fSEmmanuel Vadotto specify the reset which they consume. All available resets are defined as 34*c66ec88fSEmmanuel Vadotpreprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be 35*c66ec88fSEmmanuel Vadotused in device tree sources. 36*c66ec88fSEmmanuel Vadot 37*c66ec88fSEmmanuel VadotParent node should have the following properties : 38*c66ec88fSEmmanuel Vadot- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd" 39*c66ec88fSEmmanuel Vadot- reg: base address and size of the AO system control register space. 40*c66ec88fSEmmanuel Vadot 41*c66ec88fSEmmanuel VadotExample: AO Clock controller node: 42*c66ec88fSEmmanuel Vadot 43*c66ec88fSEmmanuel Vadotao_sysctrl: sys-ctrl@0 { 44*c66ec88fSEmmanuel Vadot compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"; 45*c66ec88fSEmmanuel Vadot reg = <0x0 0x0 0x0 0x100>; 46*c66ec88fSEmmanuel Vadot 47*c66ec88fSEmmanuel Vadot clkc_AO: clock-controller { 48*c66ec88fSEmmanuel Vadot compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc"; 49*c66ec88fSEmmanuel Vadot #clock-cells = <1>; 50*c66ec88fSEmmanuel Vadot #reset-cells = <1>; 51*c66ec88fSEmmanuel Vadot clocks = <&xtal>, <&clkc CLKID_CLK81>; 52*c66ec88fSEmmanuel Vadot clock-names = "xtal", "mpeg-clk"; 53*c66ec88fSEmmanuel Vadot }; 54*c66ec88fSEmmanuel Vadot 55*c66ec88fSEmmanuel VadotExample: UART controller node that consumes the clock and reset generated 56*c66ec88fSEmmanuel Vadot by the clock controller: 57*c66ec88fSEmmanuel Vadot 58*c66ec88fSEmmanuel Vadot uart_AO: serial@4c0 { 59*c66ec88fSEmmanuel Vadot compatible = "amlogic,meson-uart"; 60*c66ec88fSEmmanuel Vadot reg = <0x4c0 0x14>; 61*c66ec88fSEmmanuel Vadot interrupts = <0 90 1>; 62*c66ec88fSEmmanuel Vadot clocks = <&clkc_AO CLKID_AO_UART1>; 63*c66ec88fSEmmanuel Vadot resets = <&clkc_AO RESET_AO_UART1>; 64*c66ec88fSEmmanuel Vadot }; 65