blob: 5a2d9f3a9c1e7105d1759611b2c5b253e31b70f5 [file] [log] [blame]
Simon Glass1c82c2f2015-04-14 21:03:22 -06001/*
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
9#ifndef __ASM_ARCH_TEGRA_PWM_H
10#define __ASM_ARCH_TEGRA_PWM_H
11
12/* This is a single PWM channel */
13struct pwm_ctlr {
14 uint control; /* Control register */
15 uint reserved[3]; /* Space space */
16};
17
18#define PWM_NUM_CHANNELS 4
19
20/* PWM_CONTROLLER_PWM_CSR_0/1/2/3_0 */
21#define PWM_ENABLE_SHIFT 31
22#define PWM_ENABLE_MASK (0x1 << PWM_ENABLE_SHIFT)
23
24#define PWM_WIDTH_SHIFT 16
25#define PWM_WIDTH_MASK (0x7FFF << PWM_WIDTH_SHIFT)
26
27#define PWM_DIVIDER_SHIFT 0
28#define PWM_DIVIDER_MASK (0x1FFF << PWM_DIVIDER_SHIFT)
29
Simon Glass1c82c2f2015-04-14 21:03:22 -060030#endif /* __ASM_ARCH_TEGRA_PWM_H */