162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0+
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * usb_c67x00.h: platform definitions for the Cypress C67X00 USB chip
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2006-2008 Barco N.V.
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#ifndef _LINUX_USB_C67X00_H
962306a36Sopenharmony_ci#define _LINUX_USB_C67X00_H
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci/* SIE configuration */
1262306a36Sopenharmony_ci#define C67X00_SIE_UNUSED	0
1362306a36Sopenharmony_ci#define C67X00_SIE_HOST		1
1462306a36Sopenharmony_ci#define C67X00_SIE_PERIPHERAL_A	2	/* peripheral on A port */
1562306a36Sopenharmony_ci#define C67X00_SIE_PERIPHERAL_B	3	/* peripheral on B port */
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci#define c67x00_sie_config(config, n)  (((config)>>(4*(n)))&0x3)
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci#define C67X00_SIE1_UNUSED	        (C67X00_SIE_UNUSED		<< 0)
2062306a36Sopenharmony_ci#define C67X00_SIE1_HOST	        (C67X00_SIE_HOST		<< 0)
2162306a36Sopenharmony_ci#define C67X00_SIE1_PERIPHERAL_A	(C67X00_SIE_PERIPHERAL_A	<< 0)
2262306a36Sopenharmony_ci#define C67X00_SIE1_PERIPHERAL_B	(C67X00_SIE_PERIPHERAL_B	<< 0)
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci#define C67X00_SIE2_UNUSED		(C67X00_SIE_UNUSED		<< 4)
2562306a36Sopenharmony_ci#define C67X00_SIE2_HOST		(C67X00_SIE_HOST		<< 4)
2662306a36Sopenharmony_ci#define C67X00_SIE2_PERIPHERAL_A	(C67X00_SIE_PERIPHERAL_A	<< 4)
2762306a36Sopenharmony_ci#define C67X00_SIE2_PERIPHERAL_B	(C67X00_SIE_PERIPHERAL_B	<< 4)
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_cistruct c67x00_platform_data {
3062306a36Sopenharmony_ci	int sie_config;			/* SIEs config (C67X00_SIEx_*) */
3162306a36Sopenharmony_ci	unsigned long hpi_regstep;	/* Step between HPI registers  */
3262306a36Sopenharmony_ci};
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci#endif /* _LINUX_USB_C67X00_H */
35