1938cc3a1SLoc HoDevice Tree Clock bindings for APM X-Gene 2938cc3a1SLoc Ho 3938cc3a1SLoc HoThis binding uses the common clock binding[1]. 4938cc3a1SLoc Ho 5938cc3a1SLoc Ho[1] Documentation/devicetree/bindings/clock/clock-bindings.txt 6938cc3a1SLoc Ho 7938cc3a1SLoc HoRequired properties: 8938cc3a1SLoc Ho- compatible : shall be one of the following: 9938cc3a1SLoc Ho "apm,xgene-socpll-clock" - for a X-Gene SoC PLL clock 10938cc3a1SLoc Ho "apm,xgene-pcppll-clock" - for a X-Gene PCP PLL clock 11938cc3a1SLoc Ho "apm,xgene-device-clock" - for a X-Gene device clock 127b63c567SLoc Ho "apm,xgene-socpll-v2-clock" - for a X-Gene SoC PLL v2 clock 137b63c567SLoc Ho "apm,xgene-pcppll-v2-clock" - for a X-Gene PCP PLL v2 clock 14938cc3a1SLoc Ho 15938cc3a1SLoc HoRequired properties for SoC or PCP PLL clocks: 16938cc3a1SLoc Ho- reg : shall be the physical PLL register address for the pll clock. 17938cc3a1SLoc Ho- clocks : shall be the input parent clock phandle for the clock. This should 18938cc3a1SLoc Ho be the reference clock. 19938cc3a1SLoc Ho- #clock-cells : shall be set to 1. 20938cc3a1SLoc Ho- clock-output-names : shall be the name of the PLL referenced by derive 21938cc3a1SLoc Ho clock. 22938cc3a1SLoc HoOptional properties for PLL clocks: 23938cc3a1SLoc Ho- clock-names : shall be the name of the PLL. If missing, use the device name. 24938cc3a1SLoc Ho 25938cc3a1SLoc HoRequired properties for device clocks: 26938cc3a1SLoc Ho- reg : shall be a list of address and length pairs describing the CSR 27938cc3a1SLoc Ho reset and/or the divider. Either may be omitted, but at least 28938cc3a1SLoc Ho one must be present. 29938cc3a1SLoc Ho - reg-names : shall be a string list describing the reg resource. This 30938cc3a1SLoc Ho may include "csr-reg" and/or "div-reg". If this property 31938cc3a1SLoc Ho is not present, the reg property is assumed to describe 32938cc3a1SLoc Ho only "csr-reg". 33938cc3a1SLoc Ho- clocks : shall be the input parent clock phandle for the clock. 34938cc3a1SLoc Ho- #clock-cells : shall be set to 1. 35938cc3a1SLoc Ho- clock-output-names : shall be the name of the device referenced. 36938cc3a1SLoc HoOptional properties for device clocks: 37938cc3a1SLoc Ho- clock-names : shall be the name of the device clock. If missing, use the 38938cc3a1SLoc Ho device name. 39938cc3a1SLoc Ho- csr-offset : Offset to the CSR reset register from the reset address base. 40938cc3a1SLoc Ho Default is 0. 41938cc3a1SLoc Ho- csr-mask : CSR reset mask bit. Default is 0xF. 42938cc3a1SLoc Ho- enable-offset : Offset to the enable register from the reset address base. 43938cc3a1SLoc Ho Default is 0x8. 44938cc3a1SLoc Ho- enable-mask : CSR enable mask bit. Default is 0xF. 45938cc3a1SLoc Ho- divider-offset : Offset to the divider CSR register from the divider base. 46938cc3a1SLoc Ho Default is 0x0. 47938cc3a1SLoc Ho- divider-width : Width of the divider register. Default is 0. 48938cc3a1SLoc Ho- divider-shift : Bit shift of the divider register. Default is 0. 49938cc3a1SLoc Ho 50938cc3a1SLoc HoFor example: 51938cc3a1SLoc Ho 52938cc3a1SLoc Ho pcppll: pcppll@17000100 { 53938cc3a1SLoc Ho compatible = "apm,xgene-pcppll-clock"; 54938cc3a1SLoc Ho #clock-cells = <1>; 55938cc3a1SLoc Ho clocks = <&refclk 0>; 56938cc3a1SLoc Ho clock-names = "pcppll"; 57938cc3a1SLoc Ho reg = <0x0 0x17000100 0x0 0x1000>; 58938cc3a1SLoc Ho clock-output-names = "pcppll"; 59938cc3a1SLoc Ho type = <0>; 60938cc3a1SLoc Ho }; 61938cc3a1SLoc Ho 62938cc3a1SLoc Ho socpll: socpll@17000120 { 63938cc3a1SLoc Ho compatible = "apm,xgene-socpll-clock"; 64938cc3a1SLoc Ho #clock-cells = <1>; 65938cc3a1SLoc Ho clocks = <&refclk 0>; 66938cc3a1SLoc Ho clock-names = "socpll"; 67938cc3a1SLoc Ho reg = <0x0 0x17000120 0x0 0x1000>; 68938cc3a1SLoc Ho clock-output-names = "socpll"; 69938cc3a1SLoc Ho type = <1>; 70938cc3a1SLoc Ho }; 71938cc3a1SLoc Ho 72938cc3a1SLoc Ho qmlclk: qmlclk { 73938cc3a1SLoc Ho compatible = "apm,xgene-device-clock"; 74938cc3a1SLoc Ho #clock-cells = <1>; 75938cc3a1SLoc Ho clocks = <&socplldiv2 0>; 76938cc3a1SLoc Ho clock-names = "qmlclk"; 77938cc3a1SLoc Ho reg = <0x0 0x1703C000 0x0 0x1000>; 78938cc3a1SLoc Ho reg-name = "csr-reg"; 79938cc3a1SLoc Ho clock-output-names = "qmlclk"; 80938cc3a1SLoc Ho }; 81938cc3a1SLoc Ho 82938cc3a1SLoc Ho ethclk: ethclk { 83938cc3a1SLoc Ho compatible = "apm,xgene-device-clock"; 84938cc3a1SLoc Ho #clock-cells = <1>; 85938cc3a1SLoc Ho clocks = <&socplldiv2 0>; 86938cc3a1SLoc Ho clock-names = "ethclk"; 87938cc3a1SLoc Ho reg = <0x0 0x17000000 0x0 0x1000>; 88938cc3a1SLoc Ho reg-names = "div-reg"; 89938cc3a1SLoc Ho divider-offset = <0x238>; 90938cc3a1SLoc Ho divider-width = <0x9>; 91938cc3a1SLoc Ho divider-shift = <0x0>; 92938cc3a1SLoc Ho clock-output-names = "ethclk"; 93938cc3a1SLoc Ho }; 94938cc3a1SLoc Ho 95938cc3a1SLoc Ho apbclk: apbclk { 96938cc3a1SLoc Ho compatible = "apm,xgene-device-clock"; 97938cc3a1SLoc Ho #clock-cells = <1>; 98938cc3a1SLoc Ho clocks = <&ahbclk 0>; 99938cc3a1SLoc Ho clock-names = "apbclk"; 100938cc3a1SLoc Ho reg = <0x0 0x1F2AC000 0x0 0x1000 101938cc3a1SLoc Ho 0x0 0x1F2AC000 0x0 0x1000>; 102938cc3a1SLoc Ho reg-names = "csr-reg", "div-reg"; 103938cc3a1SLoc Ho csr-offset = <0x0>; 104938cc3a1SLoc Ho csr-mask = <0x200>; 105938cc3a1SLoc Ho enable-offset = <0x8>; 106938cc3a1SLoc Ho enable-mask = <0x200>; 107938cc3a1SLoc Ho divider-offset = <0x10>; 108938cc3a1SLoc Ho divider-width = <0x2>; 109938cc3a1SLoc Ho divider-shift = <0x0>; 110938cc3a1SLoc Ho flags = <0x8>; 111938cc3a1SLoc Ho clock-output-names = "apbclk"; 112938cc3a1SLoc Ho }; 113938cc3a1SLoc Ho 114