1 #ifndef __ASM_ARCH_YOPY_H__
2 #define __ASM_ARCH_YOPY_H__
4 /******************************************************************************
6 ******************************************************************************/
9 #define YOPY_FLASH0_BASE_P (0x00000000) /* CS0 */
10 #define YOPY_FLASH0_BASE_V (0xe8000000)
11 #define YOPY_FLASH0_BASE YOPY_FLASH0_BASE_V
12 #define YOPY_FLASH0_SIZE (0x04000000) /* map 64MB */
14 #define YOPY_FLASH1_BASE_P (0x08000000) /* CS1 */
15 #define YOPY_FLASH1_BASE_V (YOPY_FLASH0_BASE_V + YOPY_FLASH0_SIZE)
16 #define YOPY_FLASH1_BASE YOPY_FLASH1_BASE_V
17 #define YOPY_FLASH1_SIZE (0x04000000) /* map 64MB */
20 #define YOPY_LCD_IO_BASE_P (0x48000000) /* CS5 */
21 #define YOPY_LCD_IO_BASE_V (0xf0000000)
23 #define YOPY_LCD_IO_BASE YOPY_LCD_IO_BASE_V
24 #define YOPY_LCD_IO_RANGE (0x00208000)
27 #define YOPY_EGPIO_BASE_P (0x10000000) /* CS2 */
28 #define YOPY_EGPIO_BASE_V (0xf1000000)
30 #define YOPY_EGPIO_BASE YOPY_EGPIO_BASE_V
31 #define YOPY_EGPIO_RANGE 4
33 #define YOPY_EGPIO (*((volatile Word *)YOPY_EGPIO_BASE))
36 /******************************************************************************
38 ******************************************************************************/
40 #define GPIO_UCB1200_IRQ GPIO_GPIO0
41 #define GPIO_UCB1200_RESET GPIO_GPIO22
43 #define GPIO_CF_IREQ GPIO_GPIO2
44 #define GPIO_CF_CD GPIO_GPIO3
45 #define GPIO_CF_BVD1 GPIO_GPIO4
46 #define GPIO_CF_BVD2 GPIO_GPIO5
47 #define GPIO_CF_CSEL GPIO_GPIO6
48 #define GPIO_CF_READY GPIO_CF_IREQ
49 #define GPIO_CF_STSCHG GPIO_CF_BVD1
50 #define GPIO_CF_SPKR GPIO_CF_BVD2
52 #define GPIO_MASK(io) (1 << (io))
54 #define GPIO_YOPY_PLL_ML PPC_LDD7
55 #define GPIO_YOPY_PLL_MC PPC_L_LCLK
56 #define GPIO_YOPY_PLL_MD PPC_L_FCLK
58 #define GPIO_YOPY_L3_MODE PPC_LDD4
59 #define GPIO_YOPY_L3_CLOCK PPC_LDD5
60 #define GPIO_YOPY_L3_DATA PPC_LDD6
62 #define GPIO_CF_RESET 0
63 #define GPIO_CLKDIV_CLR1 1
64 #define GPIO_CLKDIV_CLR2 2
65 #define GPIO_SPEAKER_MUTE 5
66 #define GPIO_CF_POWER 8
67 #define GPIO_AUDIO_OPAMP_POWER 11
68 #define GPIO_AUDIO_CODEC_POWER 12
69 #define GPIO_AUDIO_POWER 13
71 #define GPIO_IRDA_POWER PPC_L_PCLK
72 #define GPIO_IRDA_FIR PPC_LDD0
75 extern int yopy_gpio_test(unsigned int gpio
);
76 extern void yopy_gpio_set(unsigned int gpio
, int level
);
80 /******************************************************************************
82 ******************************************************************************/
84 /* for our old drivers */
85 #define IRQ_SP0_UDC 13
86 #define IRQ_SP1_SDLC 14
87 #define IRQ_SP1_UART 15
88 #define IRQ_SP2_ICP 16
89 #define IRQ_SP2_UART 16
90 #define IRQ_SP3_UART 17
91 #define IRQ_SP4_MCP 18
92 #define IRQ_SP4_SSP 19
94 #define IRQ_RTC_ALARM 31
97 #define IRQ_GPIO_UCB1200_IRQ IRQ_GPIO0
99 #define IRQ_CF_IREQ IRQ_GPIO2
100 #define IRQ_CF_CD IRQ_GPIO3
101 #define IRQ_CF_BVD1 IRQ_GPIO4
102 #define IRQ_CF_BVD2 IRQ_GPIO5
104 #define IRQ_UART_CTS IRQ_GPIO7
105 #define IRQ_UART_DCD IRQ_GPIO8
106 #define IRQ_UART_DSR IRQ_GPIO9
108 #define IRQ_FLASH_STATUS IRQ_GPIO23
110 #define IRQ_BUTTON_POWER IRQ_GPIO1
111 #define IRQ_BUTTON_UP IRQ_GPIO14
112 #define IRQ_BUTTON_DOWN IRQ_GPIO15
113 #define IRQ_BUTTON_LEFT IRQ_GPIO16
114 #define IRQ_BUTTON_RIGHT IRQ_GPIO17
115 #define IRQ_BUTTON_SHOT0 IRQ_GPIO18
116 #define IRQ_BUTTON_SHOT1 IRQ_GPIO20
117 #define IRQ_BUTTON_PIMS IRQ_UCB1200_IO1
118 #define IRQ_BUTTON_MP3 IRQ_UCB1200_IO2
119 #define IRQ_BUTTON_RECORD IRQ_UCB1200_IO3
120 #define IRQ_BUTTON_PREV IRQ_UCB1200_IO4
121 #define IRQ_BUTTON_SELECT IRQ_UCB1200_IO5
122 #define IRQ_BUTTON_NEXT IRQ_UCB1200_IO6
123 #define IRQ_BUTTON_CANCEL IRQ_UCB1200_IO7
124 #define IRQ_BUTTON_REMOTE IRQ_UCB1200_IO8