xref: /linux/include/uapi/linux/nubus.h (revision 552c69b36ebd966186573b9c7a286b390935cce1)
1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2607ca46eSDavid Howells /*
3607ca46eSDavid Howells   nubus.h: various definitions and prototypes for NuBus drivers to use.
4607ca46eSDavid Howells 
5607ca46eSDavid Howells   Originally written by Alan Cox.
6607ca46eSDavid Howells 
7607ca46eSDavid Howells   Hacked to death by C. Scott Ananian and David Huggins-Daines.
8607ca46eSDavid Howells 
9607ca46eSDavid Howells   Some of the constants in here are from the corresponding
10607ca46eSDavid Howells   NetBSD/OpenBSD header file, by Allen Briggs.  We figured out the
11607ca46eSDavid Howells   rest of them on our own. */
12607ca46eSDavid Howells 
13607ca46eSDavid Howells #ifndef _UAPILINUX_NUBUS_H
14607ca46eSDavid Howells #define _UAPILINUX_NUBUS_H
15607ca46eSDavid Howells 
16607ca46eSDavid Howells #include <linux/types.h>
17607ca46eSDavid Howells 
18607ca46eSDavid Howells enum nubus_category {
19607ca46eSDavid Howells 	NUBUS_CAT_BOARD          = 0x0001,
20607ca46eSDavid Howells 	NUBUS_CAT_DISPLAY        = 0x0003,
21607ca46eSDavid Howells 	NUBUS_CAT_NETWORK        = 0x0004,
22607ca46eSDavid Howells 	NUBUS_CAT_COMMUNICATIONS = 0x0006,
23607ca46eSDavid Howells 	NUBUS_CAT_FONT           = 0x0009,
24607ca46eSDavid Howells 	NUBUS_CAT_CPU            = 0x000A,
25607ca46eSDavid Howells 	/* For lack of a better name */
26607ca46eSDavid Howells 	NUBUS_CAT_DUODOCK        = 0x0020
27607ca46eSDavid Howells };
28607ca46eSDavid Howells 
29607ca46eSDavid Howells enum nubus_type_network {
30607ca46eSDavid Howells 	NUBUS_TYPE_ETHERNET      = 0x0001,
31607ca46eSDavid Howells 	NUBUS_TYPE_RS232         = 0x0002
32607ca46eSDavid Howells };
33607ca46eSDavid Howells 
34607ca46eSDavid Howells enum nubus_type_display {
35607ca46eSDavid Howells 	NUBUS_TYPE_VIDEO         = 0x0001
36607ca46eSDavid Howells };
37607ca46eSDavid Howells 
38607ca46eSDavid Howells enum nubus_type_cpu {
39607ca46eSDavid Howells 	NUBUS_TYPE_68020         = 0x0003,
40607ca46eSDavid Howells 	NUBUS_TYPE_68030         = 0x0004,
41607ca46eSDavid Howells 	NUBUS_TYPE_68040         = 0x0005
42607ca46eSDavid Howells };
43607ca46eSDavid Howells 
44607ca46eSDavid Howells /* Known <Cat,Type,SW,HW> tuples: (according to TattleTech and Slots)
45607ca46eSDavid Howells  *  68030 motherboards: <10,4,0,24>
46607ca46eSDavid Howells  *  68040 motherboards: <10,5,0,24>
47607ca46eSDavid Howells  *  DuoDock Plus: <32,1,1,2>
48607ca46eSDavid Howells  *
49607ca46eSDavid Howells  *  Toby Frame Buffer card: <3,1,1,1>
50607ca46eSDavid Howells  *  RBV built-in video (IIci): <3,1,1,24>
51607ca46eSDavid Howells  *  Valkyrie built-in video (Q630): <3,1,1,46>
52607ca46eSDavid Howells  *  Macintosh Display Card: <3,1,1,25>
53607ca46eSDavid Howells  *  Sonora built-in video (P460): <3,1,1,34>
54607ca46eSDavid Howells  *  Jet framebuffer (DuoDock Plus): <3,1,1,41>
55607ca46eSDavid Howells  *
56607ca46eSDavid Howells  *  SONIC comm-slot/on-board and DuoDock Ethernet: <4,1,1,272>
57607ca46eSDavid Howells  *  SONIC LC-PDS Ethernet (Dayna, but like Apple 16-bit, sort of): <4,1,1,271>
58607ca46eSDavid Howells  *  Apple SONIC LC-PDS Ethernet ("Apple Ethernet LC Twisted-Pair Card"): <4,1,0,281>
59607ca46eSDavid Howells  *  Sonic Systems Ethernet A-Series Card: <4,1,268,256>
60607ca46eSDavid Howells  *  Asante MacCon NuBus-A: <4,1,260,256> (alpha-1.0,1.1 revision)
61607ca46eSDavid Howells  *   ROM on the above card: <2,1,0,0>
62607ca46eSDavid Howells  *  Cabletron ethernet card: <4,1,1,265>
63607ca46eSDavid Howells  *  Farallon ethernet card: <4,1,268,256> (identical to Sonic Systems card)
64607ca46eSDavid Howells  *  Kinetics EtherPort IIN: <4,1,259,262>
65607ca46eSDavid Howells  *  API Engineering EtherRun_LCa PDS enet card: <4,1,282,256>
66607ca46eSDavid Howells  *
67607ca46eSDavid Howells  *  Add your devices to the list!  You can obtain the "Slots" utility
68607ca46eSDavid Howells  *  from Apple's FTP site at:
69607ca46eSDavid Howells  *  ftp://dev.apple.com/devworld/Tool_Chest/Devices_-_Hardware/NuBus_Slot_Manager/
70607ca46eSDavid Howells  *
71607ca46eSDavid Howells  *  Alternately, TattleTech can be found at any Info-Mac mirror site.
72607ca46eSDavid Howells  *  or from its distribution site: ftp://ftp.decismkr.com/dms
73607ca46eSDavid Howells  */
74607ca46eSDavid Howells 
75607ca46eSDavid Howells /* DrSW: Uniquely identifies the software interface to a board.  This
76607ca46eSDavid Howells    is usually the one you want to look at when writing a driver.  It's
77607ca46eSDavid Howells    not as useful as you think, though, because as we should know by
78607ca46eSDavid Howells    now (duh), "Apple Compatible" can mean a lot of things... */
79607ca46eSDavid Howells 
80607ca46eSDavid Howells /* Add known DrSW values here */
81607ca46eSDavid Howells enum nubus_drsw {
82607ca46eSDavid Howells 	/* NUBUS_CAT_DISPLAY */
83607ca46eSDavid Howells 	NUBUS_DRSW_APPLE        = 0x0001,
84607ca46eSDavid Howells 	NUBUS_DRSW_APPLE_HIRES  = 0x0013, /* MacII HiRes card driver */
85607ca46eSDavid Howells 
86607ca46eSDavid Howells 	/* NUBUS_CAT_NETWORK */
87607ca46eSDavid Howells 	NUBUS_DRSW_3COM         = 0x0000,
88607ca46eSDavid Howells 	NUBUS_DRSW_CABLETRON    = 0x0001,
89607ca46eSDavid Howells 	NUBUS_DRSW_SONIC_LC     = 0x0001,
90607ca46eSDavid Howells 	NUBUS_DRSW_KINETICS     = 0x0103,
91607ca46eSDavid Howells 	NUBUS_DRSW_ASANTE       = 0x0104,
92607ca46eSDavid Howells 	NUBUS_DRSW_TECHWORKS    = 0x0109,
93607ca46eSDavid Howells 	NUBUS_DRSW_DAYNA        = 0x010b,
94607ca46eSDavid Howells 	NUBUS_DRSW_FARALLON     = 0x010c,
95607ca46eSDavid Howells 	NUBUS_DRSW_APPLE_SN     = 0x010f,
96607ca46eSDavid Howells 	NUBUS_DRSW_DAYNA2       = 0x0115,
97607ca46eSDavid Howells 	NUBUS_DRSW_FOCUS        = 0x011a,
98607ca46eSDavid Howells 	NUBUS_DRSW_ASANTE_CS    = 0x011d, /* use asante SMC9194 driver */
99607ca46eSDavid Howells 	NUBUS_DRSW_DAYNA_LC     = 0x011e,
100607ca46eSDavid Howells 
101607ca46eSDavid Howells 	/* NUBUS_CAT_CPU */
102607ca46eSDavid Howells 	NUBUS_DRSW_NONE         = 0x0000,
103607ca46eSDavid Howells };
104607ca46eSDavid Howells 
105607ca46eSDavid Howells /* DrHW: Uniquely identifies the hardware interface to a board (or at
106607ca46eSDavid Howells    least, it should...  some video cards are known to incorrectly
107607ca46eSDavid Howells    identify themselves as Toby cards) */
108607ca46eSDavid Howells 
109607ca46eSDavid Howells /* Add known DrHW values here */
110607ca46eSDavid Howells enum nubus_drhw {
111607ca46eSDavid Howells 	/* NUBUS_CAT_DISPLAY */
112607ca46eSDavid Howells 	NUBUS_DRHW_APPLE_TFB      = 0x0001, /* Toby frame buffer card */
113607ca46eSDavid Howells 	NUBUS_DRHW_APPLE_WVC      = 0x0006, /* Apple Workstation Video Card */
114607ca46eSDavid Howells 	NUBUS_DRHW_SIGMA_CLRMAX   = 0x0007, /* Sigma Design ColorMax */
115607ca46eSDavid Howells 	NUBUS_DRHW_APPLE_SE30     = 0x0009, /* Apple SE/30 video */
116607ca46eSDavid Howells 	NUBUS_DRHW_APPLE_HRVC     = 0x0013, /* Mac II High-Res Video Card */
117f6ab4d59SFinn Thain 	NUBUS_DRHW_APPLE_MVC      = 0x0014, /* Mac II Monochrome Video Card */
118607ca46eSDavid Howells 	NUBUS_DRHW_APPLE_PVC      = 0x0017, /* Mac II Portrait Video Card */
119607ca46eSDavid Howells 	NUBUS_DRHW_APPLE_RBV1     = 0x0018, /* IIci RBV video */
120607ca46eSDavid Howells 	NUBUS_DRHW_APPLE_MDC      = 0x0019, /* Macintosh Display Card */
121f6ab4d59SFinn Thain 	NUBUS_DRHW_APPLE_VSC      = 0x0020, /* Duo MiniDock ViSC framebuffer */
122607ca46eSDavid Howells 	NUBUS_DRHW_APPLE_SONORA   = 0x0022, /* Sonora built-in video */
123f6ab4d59SFinn Thain 	NUBUS_DRHW_APPLE_JET      = 0x0029, /* Jet framebuffer (DuoDock) */
124607ca46eSDavid Howells 	NUBUS_DRHW_APPLE_24AC     = 0x002b, /* Mac 24AC Video Card */
125607ca46eSDavid Howells 	NUBUS_DRHW_APPLE_VALKYRIE = 0x002e,
126607ca46eSDavid Howells 	NUBUS_DRHW_SMAC_GFX       = 0x0105, /* SuperMac GFX */
127607ca46eSDavid Howells 	NUBUS_DRHW_RASTER_CB264   = 0x013B, /* RasterOps ColorBoard 264 */
128607ca46eSDavid Howells 	NUBUS_DRHW_MICRON_XCEED   = 0x0146, /* Micron Exceed color */
129607ca46eSDavid Howells 	NUBUS_DRHW_RDIUS_GSC      = 0x0153, /* Radius GS/C */
130607ca46eSDavid Howells 	NUBUS_DRHW_SMAC_SPEC8     = 0x017B, /* SuperMac Spectrum/8 */
131607ca46eSDavid Howells 	NUBUS_DRHW_SMAC_SPEC24    = 0x017C, /* SuperMac Spectrum/24 */
132607ca46eSDavid Howells 	NUBUS_DRHW_RASTER_CB364   = 0x026F, /* RasterOps ColorBoard 364 */
133607ca46eSDavid Howells 	NUBUS_DRHW_RDIUS_DCGX     = 0x027C, /* Radius DirectColor/GX */
134607ca46eSDavid Howells 	NUBUS_DRHW_RDIUS_PC8      = 0x0291, /* Radius PrecisionColor 8 */
135607ca46eSDavid Howells 	NUBUS_DRHW_LAPIS_PCS8     = 0x0292, /* Lapis ProColorServer 8 */
136607ca46eSDavid Howells 	NUBUS_DRHW_RASTER_24XLI   = 0x02A0, /* RasterOps 8/24 XLi */
137607ca46eSDavid Howells 	NUBUS_DRHW_RASTER_PBPGT   = 0x02A5, /* RasterOps PaintBoard Prism GT */
138607ca46eSDavid Howells 	NUBUS_DRHW_EMACH_FSX      = 0x02AE, /* E-Machines Futura SX */
139607ca46eSDavid Howells 	NUBUS_DRHW_RASTER_24XLTV  = 0x02B7, /* RasterOps 24XLTV */
140607ca46eSDavid Howells 	NUBUS_DRHW_SMAC_THUND24   = 0x02CB, /* SuperMac Thunder/24 */
141607ca46eSDavid Howells 	NUBUS_DRHW_SMAC_THUNDLGHT = 0x03D9, /* SuperMac ThunderLight */
142607ca46eSDavid Howells 	NUBUS_DRHW_RDIUS_PC24XP   = 0x0406, /* Radius PrecisionColor 24Xp */
143607ca46eSDavid Howells 	NUBUS_DRHW_RDIUS_PC24X    = 0x040A, /* Radius PrecisionColor 24X */
144607ca46eSDavid Howells 	NUBUS_DRHW_RDIUS_PC8XJ    = 0x040B, /* Radius PrecisionColor 8XJ */
145607ca46eSDavid Howells 
146607ca46eSDavid Howells 	/* NUBUS_CAT_NETWORK */
147607ca46eSDavid Howells 	NUBUS_DRHW_INTERLAN       = 0x0100,
148607ca46eSDavid Howells 	NUBUS_DRHW_SMC9194        = 0x0101,
149607ca46eSDavid Howells 	NUBUS_DRHW_KINETICS       = 0x0106,
150607ca46eSDavid Howells 	NUBUS_DRHW_CABLETRON      = 0x0109,
151607ca46eSDavid Howells 	NUBUS_DRHW_ASANTE_LC      = 0x010f,
152607ca46eSDavid Howells 	NUBUS_DRHW_SONIC          = 0x0110,
153607ca46eSDavid Howells 	NUBUS_DRHW_TECHWORKS      = 0x0112,
154607ca46eSDavid Howells 	NUBUS_DRHW_APPLE_SONIC_NB = 0x0118,
155607ca46eSDavid Howells 	NUBUS_DRHW_APPLE_SONIC_LC = 0x0119,
156607ca46eSDavid Howells 	NUBUS_DRHW_FOCUS          = 0x011c,
157607ca46eSDavid Howells 	NUBUS_DRHW_SONNET         = 0x011d,
158607ca46eSDavid Howells };
159607ca46eSDavid Howells 
160607ca46eSDavid Howells /* Resource IDs: These are the identifiers for the various weird and
161607ca46eSDavid Howells    wonderful tidbits of information that may or may not reside in the
162607ca46eSDavid Howells    NuBus ROM directory. */
163607ca46eSDavid Howells enum nubus_res_id {
164607ca46eSDavid Howells 	NUBUS_RESID_TYPE         = 0x0001,
165607ca46eSDavid Howells 	NUBUS_RESID_NAME         = 0x0002,
166607ca46eSDavid Howells 	NUBUS_RESID_ICON         = 0x0003,
167607ca46eSDavid Howells 	NUBUS_RESID_DRVRDIR      = 0x0004,
168607ca46eSDavid Howells 	NUBUS_RESID_LOADREC      = 0x0005,
169607ca46eSDavid Howells 	NUBUS_RESID_BOOTREC      = 0x0006,
170607ca46eSDavid Howells 	NUBUS_RESID_FLAGS        = 0x0007,
171607ca46eSDavid Howells 	NUBUS_RESID_HWDEVID      = 0x0008,
172607ca46eSDavid Howells 	NUBUS_RESID_MINOR_BASEOS = 0x000a,
173607ca46eSDavid Howells 	NUBUS_RESID_MINOR_LENGTH = 0x000b,
174607ca46eSDavid Howells 	NUBUS_RESID_MAJOR_BASEOS = 0x000c,
175607ca46eSDavid Howells 	NUBUS_RESID_MAJOR_LENGTH = 0x000d,
176607ca46eSDavid Howells 	NUBUS_RESID_CICN         = 0x000f,
177607ca46eSDavid Howells 	NUBUS_RESID_ICL8         = 0x0010,
178607ca46eSDavid Howells 	NUBUS_RESID_ICL4         = 0x0011,
179607ca46eSDavid Howells };
180607ca46eSDavid Howells 
181607ca46eSDavid Howells /* Category-specific resources. */
182607ca46eSDavid Howells enum nubus_board_res_id {
183607ca46eSDavid Howells 	NUBUS_RESID_BOARDID      = 0x0020,
184607ca46eSDavid Howells 	NUBUS_RESID_PRAMINITDATA = 0x0021,
185607ca46eSDavid Howells 	NUBUS_RESID_PRIMARYINIT  = 0x0022,
186607ca46eSDavid Howells 	NUBUS_RESID_TIMEOUTCONST = 0x0023,
187607ca46eSDavid Howells 	NUBUS_RESID_VENDORINFO   = 0x0024,
188607ca46eSDavid Howells 	NUBUS_RESID_BOARDFLAGS   = 0x0025,
189607ca46eSDavid Howells 	NUBUS_RESID_SECONDINIT   = 0x0026,
190607ca46eSDavid Howells 
191607ca46eSDavid Howells 	/* Not sure why Apple put these next two in here */
192607ca46eSDavid Howells 	NUBUS_RESID_VIDNAMES     = 0x0041,
193607ca46eSDavid Howells 	NUBUS_RESID_VIDMODES     = 0x007e
194607ca46eSDavid Howells };
195607ca46eSDavid Howells 
196607ca46eSDavid Howells /* Fields within the vendor info directory */
197607ca46eSDavid Howells enum nubus_vendor_res_id {
198607ca46eSDavid Howells 	NUBUS_RESID_VEND_ID     = 0x0001,
199607ca46eSDavid Howells 	NUBUS_RESID_VEND_SERIAL = 0x0002,
200607ca46eSDavid Howells 	NUBUS_RESID_VEND_REV    = 0x0003,
201607ca46eSDavid Howells 	NUBUS_RESID_VEND_PART   = 0x0004,
202607ca46eSDavid Howells 	NUBUS_RESID_VEND_DATE   = 0x0005
203607ca46eSDavid Howells };
204607ca46eSDavid Howells 
205607ca46eSDavid Howells enum nubus_net_res_id {
206607ca46eSDavid Howells 	NUBUS_RESID_MAC_ADDRESS  = 0x0080
207607ca46eSDavid Howells };
208607ca46eSDavid Howells 
209607ca46eSDavid Howells enum nubus_cpu_res_id {
210607ca46eSDavid Howells 	NUBUS_RESID_MEMINFO      = 0x0081,
211607ca46eSDavid Howells 	NUBUS_RESID_ROMINFO      = 0x0082
212607ca46eSDavid Howells };
213607ca46eSDavid Howells 
214607ca46eSDavid Howells enum nubus_display_res_id {
215607ca46eSDavid Howells 	NUBUS_RESID_GAMMADIR    = 0x0040,
216607ca46eSDavid Howells 	NUBUS_RESID_FIRSTMODE   = 0x0080,
217607ca46eSDavid Howells 	NUBUS_RESID_SECONDMODE  = 0x0081,
218607ca46eSDavid Howells 	NUBUS_RESID_THIRDMODE   = 0x0082,
219607ca46eSDavid Howells 	NUBUS_RESID_FOURTHMODE  = 0x0083,
220607ca46eSDavid Howells 	NUBUS_RESID_FIFTHMODE   = 0x0084,
221607ca46eSDavid Howells 	NUBUS_RESID_SIXTHMODE   = 0x0085
222607ca46eSDavid Howells };
223607ca46eSDavid Howells 
224607ca46eSDavid Howells #endif /* _UAPILINUX_NUBUS_H */
225