blob: eebd104de9d6be4ec0798eccc35c0b9591feb01f [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glass142af8c2015-04-14 21:03:22 -06002/*
3 * Tegra pulse width frequency modulator definitions
4 *
5 * Copyright (c) 2011 The Chromium OS Authors.
Simon Glass142af8c2015-04-14 21:03:22 -06006 */
7
8#ifndef __ASM_ARCH_TEGRA_PWM_H
9#define __ASM_ARCH_TEGRA_PWM_H
10
11/* This is a single PWM channel */
12struct pwm_ctlr {
13 uint control; /* Control register */
14 uint reserved[3]; /* Space space */
15};
16
17#define PWM_NUM_CHANNELS 4
18
19/* PWM_CONTROLLER_PWM_CSR_0/1/2/3_0 */
20#define PWM_ENABLE_SHIFT 31
21#define PWM_ENABLE_MASK (0x1 << PWM_ENABLE_SHIFT)
22
23#define PWM_WIDTH_SHIFT 16
24#define PWM_WIDTH_MASK (0x7FFF << PWM_WIDTH_SHIFT)
25
26#define PWM_DIVIDER_SHIFT 0
27#define PWM_DIVIDER_MASK (0x1FFF << PWM_DIVIDER_SHIFT)
28
Simon Glass142af8c2015-04-14 21:03:22 -060029#endif /* __ASM_ARCH_TEGRA_PWM_H */