18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Aztech AZT1605 Driver
48c2ecf20Sopenharmony_ci * Copyright (C) 2007,2010  Rene Herman
58c2ecf20Sopenharmony_ci */
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#define AZT1605
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#define CRD_NAME "Aztech AZT1605"
108c2ecf20Sopenharmony_ci#define DRV_NAME "AZT1605"
118c2ecf20Sopenharmony_ci#define DEV_NAME "azt1605"
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#define GALAXY_DSP_MAJOR		2
148c2ecf20Sopenharmony_ci#define GALAXY_DSP_MINOR		1
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_SIZE		3
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci/*
198c2ecf20Sopenharmony_ci * 24-bit config register
208c2ecf20Sopenharmony_ci */
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_SBA_220		(0 << 0)
238c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_SBA_240		(1 << 0)
248c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_SBA_260		(2 << 0)
258c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_SBA_280		(3 << 0)
268c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_SBA_MASK		GALAXY_CONFIG_SBA_280
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_MPUA_300		(0 << 2)
298c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_MPUA_330		(1 << 2)
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_MPU_ENABLE	(1 << 3)
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_GAME_ENABLE	(1 << 4)
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_CD_PANASONIC	(1 << 5)
368c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_CD_MITSUMI	(1 << 6)
378c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_CD_MASK		(\
388c2ecf20Sopenharmony_ci	GALAXY_CONFIG_CD_PANASONIC | GALAXY_CONFIG_CD_MITSUMI)
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_UNUSED		(1 << 7)
418c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_UNUSED_MASK	GALAXY_CONFIG_UNUSED
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_SBIRQ_2		(1 << 8)
448c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_SBIRQ_3		(1 << 9)
458c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_SBIRQ_5		(1 << 10)
468c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_SBIRQ_7		(1 << 11)
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_MPUIRQ_2		(1 << 12)
498c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_MPUIRQ_3		(1 << 13)
508c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_MPUIRQ_5		(1 << 14)
518c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_MPUIRQ_7		(1 << 15)
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_WSSA_530		(0 << 16)
548c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_WSSA_604		(1 << 16)
558c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_WSSA_E80		(2 << 16)
568c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_WSSA_F40		(3 << 16)
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_WSS_ENABLE	(1 << 18)
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_CDIRQ_11		(1 << 19)
618c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_CDIRQ_12		(1 << 20)
628c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_CDIRQ_15		(1 << 21)
638c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_CDIRQ_MASK	(\
648c2ecf20Sopenharmony_ci	GALAXY_CONFIG_CDIRQ_11 | GALAXY_CONFIG_CDIRQ_12 |\
658c2ecf20Sopenharmony_ci	GALAXY_CONFIG_CDIRQ_15)
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_CDDMA_DISABLE	(0 << 22)
688c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_CDDMA_0		(1 << 22)
698c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_CDDMA_1		(2 << 22)
708c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_CDDMA_3		(3 << 22)
718c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_CDDMA_MASK	GALAXY_CONFIG_CDDMA_3
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci#define GALAXY_CONFIG_MASK		(\
748c2ecf20Sopenharmony_ci	GALAXY_CONFIG_SBA_MASK | GALAXY_CONFIG_CD_MASK |\
758c2ecf20Sopenharmony_ci	GALAXY_CONFIG_UNUSED_MASK | GALAXY_CONFIG_CDIRQ_MASK |\
768c2ecf20Sopenharmony_ci	GALAXY_CONFIG_CDDMA_MASK)
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci#include "galaxy.c"
79