* arch/z80/include/z180/chip.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __ARCH_Z80_INCLUDE_Z180_CHIP_H
#define __ARCH_Z80_INCLUDE_Z180_CHIP_H
* Included Files
****************************************************************************/
#ifndef __ASSEMBLY__
# include <stdint.h>
#endif
* Pre-processor Definitions
****************************************************************************/
#define Z180_C_FLAG 0x01
#define Z180_N_FLAG 0x02
#define Z180_PV_FLAG 0x04
#define Z180_H_FLAG 0x10
#define Z180_Z_FLAG 0x40
#define Z180_S_FLAG 0x80
*
* The 8-bit Z80180 MPU provides the benefits of reduced system costs and
* also provides full backward compatibility with existing ZiLOG Z80 devices.
* Reduced system costs are obtained by incorporating several key system
* functions on-chip with the CPU. These key functions include I/O devices
* such as DMA, UART, and timer channels. Also included on-chip are wait-
* state generators, a clock oscillator, and an interrupt controller. The
* Z80180 MPU is housed in 80-pin QFP, 68-pin PLCC, and 64-pin DIP packages.
*
* Z80180 Features
*
* Enhanced Z80 CPU
* 1 MB MMU
* 2 DMA channels*
* 2 UARTs* (up to 512 Kbps)
* Two 16-Bit Timers
* Clock Serial I/O
* On-Chip Oscillator
* Power-Down Mode*
* Divide-by-One/Divide-by-Two/Multiply-by-Two Clock Options*
* Programmable Driver Strength for EMI Tuning
*
* * Enhanced on the Z8S180 and Z8L180 MPUs
*/
#if defined(CONFIG_ARCH_CHIP_Z8018006VSG) || \
defined(CONFIG_ARCH_CHIP_Z8018010VSG) || \
defined(CONFIG_ARCH_CHIP_Z8018008VSG) || \
defined(CONFIG_ARCH_CHIP_Z8018010FSG) || \
defined(CONFIG_ARCH_CHIP_Z8018008VEG) || \
defined(CONFIG_ARCH_CHIP_Z8018006VEG)
# undef HAVE_Z8S180
# define HAVE_Z8X180 1
# undef HAVE_Z8X181
# undef HAVE_Z8X182
# define HAVE ROM 0
# define HAVE_SERIALIO 1
# undef HAVE_WDT
# define HAVE_NTIMERS16 2
# define HAVE_NCTCS 0
# define HAVE_NDMA 2
# define HAVE_NUARTS 2
# define HAVE_NSCC 0
# define HAVE_NESCC 0
# undef HAVE_16550
# define HAVE_NIOLINES 0
# define HAVE_NPAR8 0
# undef HAVE_IEEE1284
#elif defined(CONFIG_ARCH_CHIP_Z8018006PSG) || \
defined(CONFIG_ARCH_CHIP_Z8018008FSG) || \
defined(CONFIG_ARCH_CHIP_Z8018010PSG) || \
defined(CONFIG_ARCH_CHIP_Z8018006PEG) || \
defined(CONFIG_ARCH_CHIP_Z8018010VEG) || \
defined(CONFIG_ARCH_CHIP_Z8018010PEG) || \
defined(CONFIG_ARCH_CHIP_Z8018008PSG) || \
defined(CONFIG_ARCH_CHIP_Z8018006FSG)
# undef HAVE_Z8S180
# define HAVE_Z8X180 1
# undef HAVE_Z8X181
# undef HAVE_Z8X182
# define HAVE ROM 0
# undef HAVE_SERIALIO
# undef HAVE_WDT
# define HAVE_NTIMERS16 2
# define HAVE_NCTCS 0
# define HAVE_NDMA 2
# define HAVE_NUARTS 2
# define HAVE_NSCC 0
# define HAVE_NESCC 0
# undef HAVE_16550
# define HAVE_NIOLINES 0
# define HAVE_NPAR8 0
# undef HAVE_IEEE1284
#elif defined(CONFIG_ARCH_CHIP_Z8018000XSO)|| \
defined(CONFIG_ARCH_CHIP_Z8018010FEG)|| \
defined(CONFIG_ARCH_CHIP_Z8018000WSO)|| \
defined(CONFIG_ARCH_CHIP_Z8018008PEG)||
# undef HAVE_Z8S180
# define HAVE_Z8X180 1
# undef HAVE_Z8X181
# undef HAVE_Z8X182
# define HAVE ROM 0
# define HAVE_SERIALIO 1
# undef HAVE_WDT
# define HAVE_NTIMERS16 2
# define HAVE_NCTCS 0
# define HAVE_NDMA 2
# define HAVE_NUARTS 2
# define HAVE_NSCC 0
# define HAVE_NESCC 0
# undef HAVE_16550
# define HAVE_NIOLINES 0
# define HAVE_NPAR8 0
# undef HAVE_IEEE1284
*
* The Z80181 SAC Smart Access Controller is an 8-bit CMOS microprocessor
* that combines a Z180-compatible MPU, one channel of the Z85C30 Serial
* Communications Controller, a Z80 CTC, two 8-bit general-purpose parallel
* ports, and two Chip Select signals, into a single 100-pin Quad Flat Pack
* package.
*
* Z80181 Features
*
* Enhanced Z80 CPU
* 1 MB MMU
* 2 DMAs
* 2 UARTs
* Two 16-Bit Timers
* Clock Serial I/O
* 1 Channel SCC
* 1 8-Bit Counter/Timer
* 16 I/O Lines
* Emulation Mode
*/
#elif defined(CONFIG_ARCH_CHIP_Z8018110FEG)
# undef HAVE_Z8S180
# undef HAVE_Z8X180
# define HAVE_Z8X181 1
# undef HAVE_Z8X182
# define HAVE ROM 0
# define HAVE_SERIALIO 1
# undef HAVE_WDT
# define HAVE_NTIMERS16 2
# define HAVE_NCTCS 1
# define HAVE_NDMA 2
# define HAVE_NUARTS 2
# define HAVE_NSCC 1
# define HAVE_NESCC 0
# undef HAVE_16550
# define HAVE_NIOLINES 16
# define HAVE_NPAR8 0
# undef HAVE_IEEE1284
*
* The Z80182 and Z8L182 MPUs are smart peripheral controller ICs for modems,
* fax, voice messaging, and other communications applications. It uses the
* Z80180 microprocessor linked with two channels of the industry-standard
* Z85230 ESCC, 24 bits of parallel I/O, and a 16550 MIMIC for direct
* connection to the IBM PC, XT, or AT bus
*
* Z80182 Features
*
* Enhanced Z80 CPU
* 1 MB MMU
* 2 DMAs
* 2 UARTs (up to 512 Kbps)
* Two 16-Bit Timers
* Clock Serial I/O
* Power-Down Mode
* Divide-by-One/Divide-by-Two/Multiply-by-Two Clock Options
* Enhanced Serial Communication Controller (ESCC)
* (2 Channels) with 32-Bit CRC
* 16550 MIMIC
* 24 Parallel I/O
* 3.3 V and 5 V Version
*/
#elif defined(CONFIG_ARCH_CHIP_Z8018233FSG) || \
defined(CONFIG_ARCH_CHIP_Z8018220AEG) || \
defined(CONFIG_ARCH_CHIP_Z8018216FSG) || \
defined(CONFIG_ARCH_CHIP_Z8018216ASG) || \
defined(CONFIG_ARCH_CHIP_Z8018233ASG)
# undef HAVE_Z8S180
# undef HAVE_Z8X180
# undef HAVE_Z8X181
# define HAVE_Z8X182 1
# define HAVE ROM 0
# define HAVE_SERIALIO 1
# undef HAVE_WDT
# define HAVE_NTIMERS16 2
# define HAVE_NCTCS 0
# define HAVE_NDMA 2
# define HAVE_NUARTS 2
# define HAVE_NSCC 0
# define HAVE_NESCC 2
# define HAVE_16550 1
# define HAVE_NIOLINES 0
# define HAVE_NPAR8 3
# undef HAVE_IEEE1284
*
* The Z80195 MPU is a smart peripheral controller device designed for
* general data communications applications, and architected specifically
* to accommodate all input and output (I/O) requirements for serial and
* parallel connectivity. Combining a high-performance CPU core with a
* variety of system and I/O resources, the Z80195 is useful in a broad
* range of applications.
*
* Z80195 Features
*
* Enhanced Z80 CPU
* 1 MB MMU
* 2 DMAs
* 2 UARTs (up to 512 Kbps)
* Two 16-Bit Timers
* 4 Counter/Timers
* Clock Serial I/O
* Power-Down Mode
* 32 K ROM (185)
* 1 Ch ESCC
* IEEE 1284 Bi-Directional Centronics Parallel Port
* 7 or 24 Bits of I/O
*/
#elif defined(CONFIG_ARCH_CHIP_Z8019520FSG) || \
defined(CONFIG_ARCH_CHIP_Z8019533FSG)
# undef HAVE_Z8S180
# undef HAVE ROM 0
# define HAVE_SERIALIO 1
# defube HAVE_WDT 1
# define HAVE_NTIMERS16 2
# define HAVE_NCTCS 4
# define HAVE_NDMA 2
# define HAVE_NUARTS 2
# define HAVE_NSCC 0
# define HAVE_NESCC 1
# undef HAVE_16550
# define HAVE_NIOLINES 0
# define HAVE_NPAR8 2
# define HAVE_IEEE1284 1
*
* The enhanced Z8S180/Z8L180 significantly improves on previous Z80180
* models, while still providing full backward compatibility with existing
* ZiLOG Z80 devices. The Z8S180/Z8L180 now offers faster execution speeds,
* power-saving modes, and EMI noise reduction.
*
* Z8L180 Features
*
* Enhanced Z80 CPU
* 1 MB MMU
* 2 DMAs*
* 2 UARTs* (up to 512 Kbps)
* Two 16-Bit Timers
* Clock Serial I/O
* On-Chip Oscillator
* Power-Down Mode*
* Divide-by-One/Divide-by-Two/Multiply-by-Two Clock Options*
* Programmable Driver Strength for EMI Tuning
*
* * Enhanced on the Z8S180 and Z8L180 MPUs.
*/
#elif defined(CONFIG_ARCH_CHIP_Z8L18020VSG) || \
defined(CONFIG_ARCH_CHIP_Z8L18020FSG) || \
defined(CONFIG_ARCH_CHIP_Z8L18020PSG)
# define HAVE_Z8S180 1
# define HAVE_Z8X180 1
# undef HAVE_Z8X181
# undef HAVE_Z8X182
# define HAVE ROM 0
# define HAVE_SERIALIO 1
# undef HAVE_WDT
# define HAVE_NTIMERS16 2
# define HAVE_NCTCS 0
# define HAVE_NDMA 2
# define HAVE_NUARTS 2
# define HAVE_NSCC 0
# define HAVE_NESCC 0
# undef HAVE_16550
# define HAVE_NIOLINES 0
# define HAVE_NPAR8 0
# undef HAVE_IEEE1284
*
* The Z80182/Z8L182 is a smart peripheral controller IC for modem (in
* particular V. Fast applications), fax, voice messaging and other
* communications applications. It uses the Z80180 microprocessor (Z8S180
* MPU core) linked with two channels of the industry standard Z85230 ESCC
* (Enhanced Serial Communications Controller), 24 bits of parallel I/O,
* and a 16550 MIMIC for direct connection to the IBM PC, XT, AT bus.
*
* Z8L182 Features
*
* Enhanced Z80 CPU
* 1 MB MMU
* 2 DMAs
* 2 UARTs (up to 512 Kbps)
* Two 16-Bit Timers
* Clock Serial I/O
* Power-Down Mode
* Divide-by-One/Divide-by-Two/Multiply-by-Two Clock Options
* ESCC (2 Channels) with 32-Bit CRC
* 16550 MIMIC
* 24 Parallel I/O
* 3.3 V and 5 V Version
*/
#elif defined(CONFIG_ARCH_CHIP_Z8L18220ASG) || \
defined(CONFIG_ARCH_CHIP_Z8L18220FSG) || \
defined(CONFIG_ARCH_CHIP_Z8L18220AEG)
# define HAVE_Z8S180 1
# undef HAVE_Z8X180
# undef HAVE_Z8X181
# define HAVE_Z8X182 1
# define HAVE ROM 0
# define HAVE_SERIALIO 1
# undef HAVE_WDT
# define HAVE_NTIMERS16 2
# define HAVE_NCTCS 0
# define HAVE_NDMA 2
# define HAVE_NUARTS 2
# define HAVE_NSCC 0
# define HAVE_NESCC 2
# define HAVE_16550 1
# define HAVE_NIOLINES 0
# define HAVE_NPAR8 3
# undef HAVE_IEEE1284
*
* The enhanced Z8S180/Z8L180 significantly improves on previous Z80180
* models, while still providing full backward compatibility with existing
* ZiLOG Z80 devices. The Z8S180/Z8L180 now offers faster execution speeds,
* power-saving modes, and EMI noise reduction.This enhanced Z180 design
* also incorporates additional feature enhancements to the ASCIs, DMAs,
* and STANDBY mode power consumption. With the addition of ESCC-like
* Baud Rate Generators (BRGs), the two ASCIs offer the flexibility and
* capability to transfer data asynchronously at rates of up to 512 Kbps.
*
* Z8S180 Features
*
* External Memory - 1
* Voltage Range - 5.0V
* Communications Controller - CSIO, UART
* Other Features - 1MB MMU, 2xDMAs, 2xUARTs
* Speed (MHz) - 20, 10, 33
* Core / CPU Used - Z180
* Pin Count - 64, 68, 80
* Timers - 2
* I/O - Clock Serial
* Package - DIP, PLCC, QFP
*/
#elif defined(CONFIG_ARCH_CHIP_Z8S18020VSG) || \
defined(CONFIG_ARCH_CHIP_Z8S18020VSG1960) || \
defined(CONFIG_ARCH_CHIP_Z8S18033VSG) || \
defined(CONFIG_ARCH_CHIP_Z8S18010FSG) || \
defined(CONFIG_ARCH_CHIP_Z8S18010VEG) || \
defined(CONFIG_ARCH_CHIP_Z8S18020VEG) || \
defined(CONFIG_ARCH_CHIP_Z8S18010VSG) || \
defined(CONFIG_ARCH_CHIP_Z8S18020PSG) || \
defined(CONFIG_ARCH_CHIP_Z8S18033FSG) || \
defined(CONFIG_ARCH_CHIP_Z8S18033FEG) || \
defined(CONFIG_ARCH_CHIP_Z8S18020FSG) || \
defined(CONFIG_ARCH_CHIP_Z8S18033VEG) || \
defined(CONFIG_ARCH_CHIP_Z8S18010PSG) || \
defined(CONFIG_ARCH_CHIP_Z8S18020FEG) || \
defined(CONFIG_ARCH_CHIP_Z8S18010PEG) || \
defined(CONFIG_ARCH_CHIP_Z8S18010FEG)
# define HAVE_Z8S180 1
# define HAVE_Z8X180 1
# undef HAVE_Z8X181
# undef HAVE_Z8X182
# define HAVE ROM 0
# define HAVE_SERIALIO 1
# undef HAVE_WDT
# define HAVE_NTIMERS16 2
# define HAVE_NCTCS 0
# define HAVE_NDMA 2
# define HAVE_NUARTS 2
# define HAVE_NSCC 0
# define HAVE_NESCC 0
# undef HAVE_16550
# define HAVE_NIOLINES 0
# define HAVE_NPAR8 0
# undef HAVE_IEEE1284
#else
# error "Unrecognized/undefined Z180 chip"
#endif
* Public Types
****************************************************************************/
* Inline functions
****************************************************************************/
* Public Data
****************************************************************************/
* Public Function Prototypes
****************************************************************************/
#endif