1*4882a593SmuzhiyunBinding for TI mux clock. 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunBinding status: Unstable - ABI compatibility may be broken in the future 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunThis binding uses the common clock binding[1]. It assumes a 6*4882a593Smuzhiyunregister-mapped multiplexer with multiple input clock signals or 7*4882a593Smuzhiyunparents, one of which can be selected as output. This clock does not 8*4882a593Smuzhiyungate or adjust the parent rate via a divider or multiplier. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunBy default the "clocks" property lists the parents in the same order 11*4882a593Smuzhiyunas they are programmed into the regster. E.g: 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun clocks = <&foo_clock>, <&bar_clock>, <&baz_clock>; 14*4882a593Smuzhiyun 15*4882a593Smuzhiyunresults in programming the register as follows: 16*4882a593Smuzhiyun 17*4882a593Smuzhiyunregister value selected parent clock 18*4882a593Smuzhiyun0 foo_clock 19*4882a593Smuzhiyun1 bar_clock 20*4882a593Smuzhiyun2 baz_clock 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunSome clock controller IPs do not allow a value of zero to be programmed 23*4882a593Smuzhiyuninto the register, instead indexing begins at 1. The optional property 24*4882a593Smuzhiyun"index-starts-at-one" modified the scheme as follows: 25*4882a593Smuzhiyun 26*4882a593Smuzhiyunregister value selected clock parent 27*4882a593Smuzhiyun1 foo_clock 28*4882a593Smuzhiyun2 bar_clock 29*4882a593Smuzhiyun3 baz_clock 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunThe binding must provide the register to control the mux. Optionally 32*4882a593Smuzhiyunthe number of bits to shift the control field in the register can be 33*4882a593Smuzhiyunsupplied. If the shift value is missing it is the same as supplying 34*4882a593Smuzhiyuna zero shift. 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun[1] Documentation/devicetree/bindings/clock/clock-bindings.txt 37*4882a593Smuzhiyun 38*4882a593SmuzhiyunRequired properties: 39*4882a593Smuzhiyun- compatible : shall be "ti,mux-clock" or "ti,composite-mux-clock". 40*4882a593Smuzhiyun- #clock-cells : from common clock binding; shall be set to 0. 41*4882a593Smuzhiyun- clocks : link phandles of parent clocks 42*4882a593Smuzhiyun- reg : register offset for register controlling adjustable mux 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunOptional properties: 45*4882a593Smuzhiyun- ti,bit-shift : number of bits to shift the bit-mask, defaults to 46*4882a593Smuzhiyun 0 if not present 47*4882a593Smuzhiyun- ti,index-starts-at-one : valid input select programming starts at 1, not 48*4882a593Smuzhiyun zero 49*4882a593Smuzhiyun- ti,set-rate-parent : clk_set_rate is propagated to parent clock, 50*4882a593Smuzhiyun not supported by the composite-mux-clock subtype 51*4882a593Smuzhiyun- ti,latch-bit : latch the mux value to HW, only needed if the register 52*4882a593Smuzhiyun access requires this. As an example, dra7x DPLL_GMAC H14 muxing 53*4882a593Smuzhiyun implements such behavior. 54*4882a593Smuzhiyun 55*4882a593SmuzhiyunExamples: 56*4882a593Smuzhiyun 57*4882a593Smuzhiyunsys_clkin_ck: sys_clkin_ck@4a306110 { 58*4882a593Smuzhiyun #clock-cells = <0>; 59*4882a593Smuzhiyun compatible = "ti,mux-clock"; 60*4882a593Smuzhiyun clocks = <&virt_12000000_ck>, <&virt_13000000_ck>, <&virt_16800000_ck>, <&virt_19200000_ck>, <&virt_26000000_ck>, <&virt_27000000_ck>, <&virt_38400000_ck>; 61*4882a593Smuzhiyun reg = <0x0110>; 62*4882a593Smuzhiyun ti,index-starts-at-one; 63*4882a593Smuzhiyun}; 64*4882a593Smuzhiyun 65*4882a593Smuzhiyunabe_dpll_bypass_clk_mux_ck: abe_dpll_bypass_clk_mux_ck@4a306108 { 66*4882a593Smuzhiyun #clock-cells = <0>; 67*4882a593Smuzhiyun compatible = "ti,mux-clock"; 68*4882a593Smuzhiyun clocks = <&sys_clkin_ck>, <&sys_32k_ck>; 69*4882a593Smuzhiyun ti,bit-shift = <24>; 70*4882a593Smuzhiyun reg = <0x0108>; 71*4882a593Smuzhiyun}; 72*4882a593Smuzhiyun 73*4882a593Smuzhiyunmcbsp5_mux_fck: mcbsp5_mux_fck { 74*4882a593Smuzhiyun #clock-cells = <0>; 75*4882a593Smuzhiyun compatible = "ti,composite-mux-clock"; 76*4882a593Smuzhiyun clocks = <&core_96m_fck>, <&mcbsp_clks>; 77*4882a593Smuzhiyun ti,bit-shift = <4>; 78*4882a593Smuzhiyun reg = <0x02d8>; 79*4882a593Smuzhiyun}; 80