pwm.h 693 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Tegra pulse width frequency modulator definitions
  3. *
  4. * Copyright (c) 2011 The Chromium OS Authors.
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef __ASM_ARCH_TEGRA_PWM_H
  9. #define __ASM_ARCH_TEGRA_PWM_H
  10. /* This is a single PWM channel */
  11. struct pwm_ctlr {
  12. uint control; /* Control register */
  13. uint reserved[3]; /* Space space */
  14. };
  15. #define PWM_NUM_CHANNELS 4
  16. /* PWM_CONTROLLER_PWM_CSR_0/1/2/3_0 */
  17. #define PWM_ENABLE_SHIFT 31
  18. #define PWM_ENABLE_MASK (0x1 << PWM_ENABLE_SHIFT)
  19. #define PWM_WIDTH_SHIFT 16
  20. #define PWM_WIDTH_MASK (0x7FFF << PWM_WIDTH_SHIFT)
  21. #define PWM_DIVIDER_SHIFT 0
  22. #define PWM_DIVIDER_MASK (0x1FFF << PWM_DIVIDER_SHIFT)
  23. #endif /* __ASM_ARCH_TEGRA_PWM_H */