Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __MPC83XX_H__
0003 #define __MPC83XX_H__
0004 
0005 #include <linux/init.h>
0006 #include <linux/device.h>
0007 #include <asm/pci-bridge.h>
0008 
0009 /* System Clock Control Register */
0010 #define MPC83XX_SCCR_OFFS          0xA08
0011 #define MPC83XX_SCCR_USB_MASK      0x00f00000
0012 #define MPC83XX_SCCR_USB_MPHCM_11  0x00c00000
0013 #define MPC83XX_SCCR_USB_MPHCM_01  0x00400000
0014 #define MPC83XX_SCCR_USB_MPHCM_10  0x00800000
0015 #define MPC83XX_SCCR_USB_DRCM_11   0x00300000
0016 #define MPC83XX_SCCR_USB_DRCM_01   0x00100000
0017 #define MPC83XX_SCCR_USB_DRCM_10   0x00200000
0018 #define MPC8315_SCCR_USB_MASK      0x00c00000
0019 #define MPC8315_SCCR_USB_DRCM_11   0x00c00000
0020 #define MPC8315_SCCR_USB_DRCM_01   0x00400000
0021 #define MPC837X_SCCR_USB_DRCM_11   0x00c00000
0022 
0023 /* system i/o configuration register low */
0024 #define MPC83XX_SICRL_OFFS         0x114
0025 #define MPC834X_SICRL_USB_MASK     0x60000000
0026 #define MPC834X_SICRL_USB0         0x20000000
0027 #define MPC834X_SICRL_USB1         0x40000000
0028 #define MPC831X_SICRL_USB_MASK     0x00000c00
0029 #define MPC831X_SICRL_USB_ULPI     0x00000800
0030 #define MPC8315_SICRL_USB_MASK     0x000000fc
0031 #define MPC8315_SICRL_USB_ULPI     0x00000054
0032 #define MPC837X_SICRL_USB_MASK     0xf0000000
0033 #define MPC837X_SICRL_USB_ULPI     0x50000000
0034 #define MPC837X_SICRL_USBB_MASK    0x30000000
0035 #define MPC837X_SICRL_SD           0x20000000
0036 
0037 /* system i/o configuration register high */
0038 #define MPC83XX_SICRH_OFFS         0x118
0039 #define MPC8308_SICRH_USB_MASK     0x000c0000
0040 #define MPC8308_SICRH_USB_ULPI     0x00040000
0041 #define MPC834X_SICRH_USB_UTMI     0x00020000
0042 #define MPC831X_SICRH_USB_MASK     0x000000e0
0043 #define MPC831X_SICRH_USB_ULPI     0x000000a0
0044 #define MPC8315_SICRH_USB_MASK     0x0000ff00
0045 #define MPC8315_SICRH_USB_ULPI     0x00000000
0046 #define MPC837X_SICRH_SPI_MASK     0x00000003
0047 #define MPC837X_SICRH_SD           0x00000001
0048 
0049 /* USB Control Register */
0050 #define FSL_USB2_CONTROL_OFFS      0x500
0051 #define CONTROL_UTMI_PHY_EN        0x00000200
0052 #define CONTROL_REFSEL_24MHZ       0x00000040
0053 #define CONTROL_REFSEL_48MHZ       0x00000080
0054 #define CONTROL_PHY_CLK_SEL_ULPI   0x00000400
0055 #define CONTROL_OTG_PORT           0x00000020
0056 
0057 /* USB PORTSC Registers */
0058 #define FSL_USB2_PORTSC1_OFFS      0x184
0059 #define FSL_USB2_PORTSC2_OFFS      0x188
0060 #define PORTSCX_PTW_16BIT          0x10000000
0061 #define PORTSCX_PTS_UTMI           0x00000000
0062 #define PORTSCX_PTS_ULPI           0x80000000
0063 
0064 /*
0065  * Declaration for the various functions exported by the
0066  * mpc83xx_* files. Mostly for use by mpc83xx_setup
0067  */
0068 
0069 extern void __noreturn mpc83xx_restart(char *cmd);
0070 extern long mpc83xx_time_init(void);
0071 int __init mpc837x_usb_cfg(void);
0072 int __init mpc834x_usb_cfg(void);
0073 int __init mpc831x_usb_cfg(void);
0074 extern void mpc83xx_ipic_init_IRQ(void);
0075 
0076 #ifdef CONFIG_PCI
0077 extern void mpc83xx_setup_pci(void);
0078 #else
0079 #define mpc83xx_setup_pci   NULL
0080 #endif
0081 
0082 extern int mpc83xx_declare_of_platform_devices(void);
0083 extern void mpc83xx_setup_arch(void);
0084 
0085 #endif              /* __MPC83XX_H__ */