mux.txt 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Binding for TI mux clock.
  2. Binding status: Unstable - ABI compatibility may be broken in the future
  3. This binding uses the common clock binding[1]. It assumes a
  4. register-mapped multiplexer with multiple input clock signals or
  5. parents, one of which can be selected as output. This clock does not
  6. gate or adjust the parent rate via a divider or multiplier.
  7. By default the "clocks" property lists the parents in the same order
  8. as they are programmed into the regster. E.g:
  9. clocks = <&foo_clock>, <&bar_clock>, <&baz_clock>;
  10. results in programming the register as follows:
  11. register value selected parent clock
  12. 0 foo_clock
  13. 1 bar_clock
  14. 2 baz_clock
  15. Some clock controller IPs do not allow a value of zero to be programmed
  16. into the register, instead indexing begins at 1. The optional property
  17. "index-starts-at-one" modified the scheme as follows:
  18. register value selected clock parent
  19. 1 foo_clock
  20. 2 bar_clock
  21. 3 baz_clock
  22. The binding must provide the register to control the mux. Optionally
  23. the number of bits to shift the control field in the register can be
  24. supplied. If the shift value is missing it is the same as supplying
  25. a zero shift.
  26. [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
  27. Required properties:
  28. - compatible : shall be "ti,mux-clock" or "ti,composite-mux-clock".
  29. - #clock-cells : from common clock binding; shall be set to 0.
  30. - clocks : link phandles of parent clocks
  31. - reg : register offset for register controlling adjustable mux
  32. Optional properties:
  33. - ti,bit-shift : number of bits to shift the bit-mask, defaults to
  34. 0 if not present
  35. - ti,index-starts-at-one : valid input select programming starts at 1, not
  36. zero
  37. - ti,set-rate-parent : clk_set_rate is propagated to parent clock,
  38. not supported by the composite-mux-clock subtype
  39. Examples:
  40. sys_clkin_ck: sys_clkin_ck@4a306110 {
  41. #clock-cells = <0>;
  42. compatible = "ti,mux-clock";
  43. clocks = <&virt_12000000_ck>, <&virt_13000000_ck>, <&virt_16800000_ck>, <&virt_19200000_ck>, <&virt_26000000_ck>, <&virt_27000000_ck>, <&virt_38400000_ck>;
  44. reg = <0x0110>;
  45. ti,index-starts-at-one;
  46. };
  47. abe_dpll_bypass_clk_mux_ck: abe_dpll_bypass_clk_mux_ck@4a306108 {
  48. #clock-cells = <0>;
  49. compatible = "ti,mux-clock";
  50. clocks = <&sys_clkin_ck>, <&sys_32k_ck>;
  51. ti,bit-shift = <24>;
  52. reg = <0x0108>;
  53. };
  54. mcbsp5_mux_fck: mcbsp5_mux_fck {
  55. #clock-cells = <0>;
  56. compatible = "ti,composite-mux-clock";
  57. clocks = <&core_96m_fck>, <&mcbsp_clks>;
  58. ti,bit-shift = <4>;
  59. reg = <0x02d8>;
  60. };