blob: fcc8e74f0e8d139f652cd0c16eee16589fb351ef [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Dmitry Baryshkovd6315942008-06-22 12:01:58 +01002/*
3 * Toshiba TC6393XB SoC support
4 *
5 * Copyright(c) 2005-2006 Chris Humbert
6 * Copyright(c) 2005 Dirk Opfer
7 * Copyright(c) 2005 Ian Molton <spyro@f2s.com>
8 * Copyright(c) 2007 Dmitry Baryshkov
9 *
10 * Based on code written by Sharp/Lineo for 2.4 kernels
11 * Based on locomo.c
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010012 */
13
Ian Molton25d6cbd82008-08-10 23:32:07 +020014#ifndef MFD_TC6393XB_H
15#define MFD_TC6393XB_H
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010016
Dmitry Baryshkov9e78cfe2008-10-04 00:50:36 +020017#include <linux/fb.h>
18
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010019/* Also one should provide the CK3P6MI clock */
20struct tc6393xb_platform_data {
21 u16 scr_pll2cr; /* PLL2 Control */
22 u16 scr_gper; /* GP Enable */
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010023
24 int (*enable)(struct platform_device *dev);
25 int (*disable)(struct platform_device *dev);
26 int (*suspend)(struct platform_device *dev);
27 int (*resume)(struct platform_device *dev);
28
Ian Molton25d6cbd82008-08-10 23:32:07 +020029 int irq_base; /* base for subdevice irqs */
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010030 int gpio_base;
Dmitry Baryshkov1c1b6ff2008-09-24 23:36:23 +020031 int (*setup)(struct platform_device *dev);
32 void (*teardown)(struct platform_device *dev);
Dmitry Baryshkovf024ff12008-06-27 10:37:57 +010033
34 struct tmio_nand_data *nand_data;
Dmitry Baryshkov9e78cfe2008-10-04 00:50:36 +020035 struct tmio_fb_data *fb_data;
Dmitry Baryshkovf98a0bd2008-09-24 23:46:10 +020036
37 unsigned resume_restore : 1; /* make special actions
38 to preserve the state
39 on suspend/resume */
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010040};
41
Dmitry Baryshkov9e78cfe2008-10-04 00:50:36 +020042extern int tc6393xb_lcd_mode(struct platform_device *fb,
43 const struct fb_videomode *mode);
44extern int tc6393xb_lcd_set_power(struct platform_device *fb, bool on);
45
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010046/*
47 * Relative to irq_base
48 */
49#define IRQ_TC6393_NAND 0
50#define IRQ_TC6393_MMC 1
Dmitry Baryshkov51a55622008-10-03 20:11:36 +020051#define IRQ_TC6393_OHCI 2
Dmitry Baryshkov9e78cfe2008-10-04 00:50:36 +020052#define IRQ_TC6393_FB 4
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010053
54#define TC6393XB_NR_IRQS 8
55
56#endif