162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * auxio.h: Definitions and code for the Auxiliary I/O registers. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Refactoring for unified NCR/PCIO support 2002 Eric Brower (ebrower@usa.net) 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci#ifndef _SPARC64_AUXIO_H 1062306a36Sopenharmony_ci#define _SPARC64_AUXIO_H 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci/* AUXIO implementations: 1362306a36Sopenharmony_ci * sbus-based NCR89C105 "Slavio" 1462306a36Sopenharmony_ci * LED/Floppy (AUX1) register 1562306a36Sopenharmony_ci * Power (AUX2) register 1662306a36Sopenharmony_ci * 1762306a36Sopenharmony_ci * ebus-based auxio on PCIO 1862306a36Sopenharmony_ci * LED Auxio Register 1962306a36Sopenharmony_ci * Power Auxio Register 2062306a36Sopenharmony_ci * 2162306a36Sopenharmony_ci * Register definitions from NCR _NCR89C105 Chip Specification_ 2262306a36Sopenharmony_ci * 2362306a36Sopenharmony_ci * SLAVIO AUX1 @ 0x1900000 2462306a36Sopenharmony_ci * ------------------------------------------------- 2562306a36Sopenharmony_ci * | (R) | (R) | D | (R) | E | M | T | L | 2662306a36Sopenharmony_ci * ------------------------------------------------- 2762306a36Sopenharmony_ci * (R) - bit 7:6,4 are reserved and should be masked in s/w 2862306a36Sopenharmony_ci * D - Floppy Density Sense (1=high density) R/O 2962306a36Sopenharmony_ci * E - Link Test Enable, directly reflected on AT&T 7213 LTE pin 3062306a36Sopenharmony_ci * M - Monitor/Mouse Mux, directly reflected on MON_MSE_MUX pin 3162306a36Sopenharmony_ci * T - Terminal Count: sends TC pulse to 82077 floppy controller 3262306a36Sopenharmony_ci * L - System LED on front panel (0=off, 1=on) 3362306a36Sopenharmony_ci */ 3462306a36Sopenharmony_ci#define AUXIO_AUX1_MASK 0xc0 /* Mask bits */ 3562306a36Sopenharmony_ci#define AUXIO_AUX1_FDENS 0x20 /* Floppy Density Sense */ 3662306a36Sopenharmony_ci#define AUXIO_AUX1_LTE 0x08 /* Link Test Enable */ 3762306a36Sopenharmony_ci#define AUXIO_AUX1_MMUX 0x04 /* Monitor/Mouse Mux */ 3862306a36Sopenharmony_ci#define AUXIO_AUX1_FTCNT 0x02 /* Terminal Count, */ 3962306a36Sopenharmony_ci#define AUXIO_AUX1_LED 0x01 /* System LED */ 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci/* SLAVIO AUX2 @ 0x1910000 4262306a36Sopenharmony_ci * ------------------------------------------------- 4362306a36Sopenharmony_ci * | (R) | (R) | D | (R) | (R) | (R) | C | F | 4462306a36Sopenharmony_ci * ------------------------------------------------- 4562306a36Sopenharmony_ci * (R) - bits 7:6,4:2 are reserved and should be masked in s/w 4662306a36Sopenharmony_ci * D - Power Failure Detect (1=power fail) 4762306a36Sopenharmony_ci * C - Clear Power Failure Detect Int (1=clear) 4862306a36Sopenharmony_ci * F - Power Off (1=power off) 4962306a36Sopenharmony_ci */ 5062306a36Sopenharmony_ci#define AUXIO_AUX2_MASK 0xdc /* Mask Bits */ 5162306a36Sopenharmony_ci#define AUXIO_AUX2_PFAILDET 0x20 /* Power Fail Detect */ 5262306a36Sopenharmony_ci#define AUXIO_AUX2_PFAILCLR 0x02 /* Clear Pwr Fail Det Intr */ 5362306a36Sopenharmony_ci#define AUXIO_AUX2_PWR_OFF 0x01 /* Power Off */ 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci/* Register definitions from Sun Microsystems _PCIO_ p/n 802-7837 5662306a36Sopenharmony_ci * 5762306a36Sopenharmony_ci * PCIO LED Auxio @ 0x726000 5862306a36Sopenharmony_ci * ------------------------------------------------- 5962306a36Sopenharmony_ci * | 31:1 Unused | LED | 6062306a36Sopenharmony_ci * ------------------------------------------------- 6162306a36Sopenharmony_ci * Bits 31:1 unused 6262306a36Sopenharmony_ci * LED - System LED on front panel (0=off, 1=on) 6362306a36Sopenharmony_ci */ 6462306a36Sopenharmony_ci#define AUXIO_PCIO_LED 0x01 /* System LED */ 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci/* PCIO Power Auxio @ 0x724000 6762306a36Sopenharmony_ci * ------------------------------------------------- 6862306a36Sopenharmony_ci * | 31:2 Unused | CPO | SPO | 6962306a36Sopenharmony_ci * ------------------------------------------------- 7062306a36Sopenharmony_ci * Bits 31:2 unused 7162306a36Sopenharmony_ci * CPO - Courtesy Power Off (1=off) 7262306a36Sopenharmony_ci * SPO - System Power Off (1=off) 7362306a36Sopenharmony_ci */ 7462306a36Sopenharmony_ci#define AUXIO_PCIO_CPWR_OFF 0x02 /* Courtesy Power Off */ 7562306a36Sopenharmony_ci#define AUXIO_PCIO_SPWR_OFF 0x01 /* System Power Off */ 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci#ifndef __ASSEMBLY__ 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ci#define AUXIO_LTE_ON 1 8062306a36Sopenharmony_ci#define AUXIO_LTE_OFF 0 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci/* auxio_set_lte - Set Link Test Enable (TPE Link Detect) 8362306a36Sopenharmony_ci * 8462306a36Sopenharmony_ci * on - AUXIO_LTE_ON or AUXIO_LTE_OFF 8562306a36Sopenharmony_ci */ 8662306a36Sopenharmony_civoid auxio_set_lte(int on); 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci#define AUXIO_LED_ON 1 8962306a36Sopenharmony_ci#define AUXIO_LED_OFF 0 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci/* auxio_set_led - Set system front panel LED 9262306a36Sopenharmony_ci * 9362306a36Sopenharmony_ci * on - AUXIO_LED_ON or AUXIO_LED_OFF 9462306a36Sopenharmony_ci */ 9562306a36Sopenharmony_civoid auxio_set_led(int on); 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci#endif /* ifndef __ASSEMBLY__ */ 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci#endif /* !(_SPARC64_AUXIO_H) */ 100