clk_synthesizer.h 929 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * clk-synthesizer.h
  4. *
  5. * Clock synthesizer header
  6. *
  7. * Copyright (C) 2016, Texas Instruments, Incorporated - http://www.ti.com/
  8. */
  9. #ifndef __CLK_SYNTHESIZER_H
  10. #define __CLK_SYNTHESIZER_H
  11. #include <common.h>
  12. #define CLK_SYNTHESIZER_ID_REG 0x0
  13. #define CLK_SYNTHESIZER_XCSEL 0x05
  14. #define CLK_SYNTHESIZER_MUX_REG 0x14
  15. #define CLK_SYNTHESIZER_PDIV2_REG 0x16
  16. #define CLK_SYNTHESIZER_PDIV3_REG 0x17
  17. #define CLK_SYNTHESIZER_BYTE_MODE 0x80
  18. /**
  19. * struct clk_synth: This structure holds data neeed for configuring
  20. * for clock synthesizer.
  21. * @id: The id of synthesizer
  22. * @capacitor: value of the capacitor attached
  23. * @mux: mux settings.
  24. * @pdiv2: Div to be applied to second output
  25. * @pdiv3: Div to be applied to third output
  26. */
  27. struct clk_synth {
  28. u32 id;
  29. u32 capacitor;
  30. u32 mux;
  31. u32 pdiv2;
  32. u32 pdiv3;
  33. };
  34. int setup_clock_synthesizer(struct clk_synth *data);
  35. #endif