162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef _ASM_POWERPC_HEATHROW_H
362306a36Sopenharmony_ci#define _ASM_POWERPC_HEATHROW_H
462306a36Sopenharmony_ci#ifdef __KERNEL__
562306a36Sopenharmony_ci/*
662306a36Sopenharmony_ci * heathrow.h: definitions for using the "Heathrow" I/O controller chip.
762306a36Sopenharmony_ci *
862306a36Sopenharmony_ci * Grabbed from Open Firmware definitions on a PowerBook G3 Series
962306a36Sopenharmony_ci *
1062306a36Sopenharmony_ci * Copyright (C) 1997 Paul Mackerras.
1162306a36Sopenharmony_ci */
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci/* Front light color on Yikes/B&W G3. 32 bits */
1462306a36Sopenharmony_ci#define HEATHROW_FRONT_LIGHT		0x32 /* (set to 0 or 0xffffffff) */
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci/* Brightness/contrast (gossamer iMac ?). 8 bits */
1762306a36Sopenharmony_ci#define HEATHROW_BRIGHTNESS_CNTL	0x32
1862306a36Sopenharmony_ci#define HEATHROW_CONTRAST_CNTL		0x33
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci/* offset from ohare base for feature control register */
2162306a36Sopenharmony_ci#define HEATHROW_MBCR			0x34	/* Media bay control */
2262306a36Sopenharmony_ci#define HEATHROW_FCR			0x38	/* Feature control */
2362306a36Sopenharmony_ci#define HEATHROW_AUX_CNTL_REG		0x3c	/* Aux control */
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci/*
2662306a36Sopenharmony_ci * Bits in feature control register.
2762306a36Sopenharmony_ci * Bits postfixed with a _N are in inverse logic
2862306a36Sopenharmony_ci */
2962306a36Sopenharmony_ci#define HRW_SCC_TRANS_EN_N	0x00000001	/* Also controls modem power */
3062306a36Sopenharmony_ci#define HRW_BAY_POWER_N		0x00000002
3162306a36Sopenharmony_ci#define HRW_BAY_PCI_ENABLE	0x00000004
3262306a36Sopenharmony_ci#define HRW_BAY_IDE_ENABLE	0x00000008
3362306a36Sopenharmony_ci#define HRW_BAY_FLOPPY_ENABLE	0x00000010
3462306a36Sopenharmony_ci#define HRW_IDE0_ENABLE		0x00000020
3562306a36Sopenharmony_ci#define HRW_IDE0_RESET_N	0x00000040
3662306a36Sopenharmony_ci#define HRW_BAY_DEV_MASK	0x0000001c
3762306a36Sopenharmony_ci#define HRW_BAY_RESET_N		0x00000080
3862306a36Sopenharmony_ci#define HRW_IOBUS_ENABLE	0x00000100	/* Internal IDE ? */
3962306a36Sopenharmony_ci#define HRW_SCC_ENABLE		0x00000200
4062306a36Sopenharmony_ci#define HRW_MESH_ENABLE		0x00000400
4162306a36Sopenharmony_ci#define HRW_SWIM_ENABLE		0x00000800
4262306a36Sopenharmony_ci#define HRW_SOUND_POWER_N	0x00001000
4362306a36Sopenharmony_ci#define HRW_SOUND_CLK_ENABLE	0x00002000
4462306a36Sopenharmony_ci#define HRW_SCCA_IO		0x00004000
4562306a36Sopenharmony_ci#define HRW_SCCB_IO		0x00008000
4662306a36Sopenharmony_ci#define HRW_PORT_OR_DESK_VIA_N	0x00010000	/* This one is 0 on PowerBook */
4762306a36Sopenharmony_ci#define HRW_PWM_MON_ID_N	0x00020000	/* ??? (0) */
4862306a36Sopenharmony_ci#define HRW_HOOK_MB_CNT_N	0x00040000	/* ??? (0) */
4962306a36Sopenharmony_ci#define HRW_SWIM_CLONE_FLOPPY	0x00080000	/* ??? (0) */
5062306a36Sopenharmony_ci#define HRW_AUD_RUN22		0x00100000	/* ??? (1) */
5162306a36Sopenharmony_ci#define HRW_SCSI_LINK_MODE	0x00200000	/* Read ??? (1) */
5262306a36Sopenharmony_ci#define HRW_ARB_BYPASS		0x00400000	/* Disable internal PCI arbitrer */
5362306a36Sopenharmony_ci#define HRW_IDE1_RESET_N	0x00800000	/* Media bay */
5462306a36Sopenharmony_ci#define HRW_SLOW_SCC_PCLK	0x01000000	/* ??? (0) */
5562306a36Sopenharmony_ci#define HRW_RESET_SCC		0x02000000
5662306a36Sopenharmony_ci#define HRW_MFDC_CELL_ENABLE	0x04000000	/* ??? (0) */
5762306a36Sopenharmony_ci#define HRW_USE_MFDC		0x08000000	/* ??? (0) */
5862306a36Sopenharmony_ci#define HRW_BMAC_IO_ENABLE	0x60000000	/* two bits, not documented in OF */
5962306a36Sopenharmony_ci#define HRW_BMAC_RESET		0x80000000	/* not documented in OF */
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci/* We OR those features at boot on desktop G3s */
6262306a36Sopenharmony_ci#define HRW_DEFAULTS		(HRW_SCCA_IO | HRW_SCCB_IO | HRW_SCC_ENABLE)
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci/* Looks like Heathrow has some sort of GPIOs as well... */
6562306a36Sopenharmony_ci#define HRW_GPIO_MODEM_RESET	0x6d
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci#endif /* __KERNEL__ */
6862306a36Sopenharmony_ci#endif /* _ASM_POWERPC_HEATHROW_H */
69