pwm.h 693 B

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