diff options
Diffstat (limited to 'arch/powerpc/platforms/83xx')
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc83xx.h | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/usb.c | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index 68065e62fc3d..88a3b5cabb18 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #define MPC83XX_SCCR_USB_DRCM_10 0x00200000 | 16 | #define MPC83XX_SCCR_USB_DRCM_10 0x00200000 |
17 | #define MPC8315_SCCR_USB_MASK 0x00c00000 | 17 | #define MPC8315_SCCR_USB_MASK 0x00c00000 |
18 | #define MPC8315_SCCR_USB_DRCM_11 0x00c00000 | 18 | #define MPC8315_SCCR_USB_DRCM_11 0x00c00000 |
19 | #define MPC8315_SCCR_USB_DRCM_01 0x00400000 | ||
19 | #define MPC837X_SCCR_USB_DRCM_11 0x00c00000 | 20 | #define MPC837X_SCCR_USB_DRCM_11 0x00c00000 |
20 | 21 | ||
21 | /* system i/o configuration register low */ | 22 | /* system i/o configuration register low */ |
@@ -37,6 +38,7 @@ | |||
37 | /* USB Control Register */ | 38 | /* USB Control Register */ |
38 | #define FSL_USB2_CONTROL_OFFS 0x500 | 39 | #define FSL_USB2_CONTROL_OFFS 0x500 |
39 | #define CONTROL_UTMI_PHY_EN 0x00000200 | 40 | #define CONTROL_UTMI_PHY_EN 0x00000200 |
41 | #define CONTROL_REFSEL_24MHZ 0x00000040 | ||
40 | #define CONTROL_REFSEL_48MHZ 0x00000080 | 42 | #define CONTROL_REFSEL_48MHZ 0x00000080 |
41 | #define CONTROL_PHY_CLK_SEL_ULPI 0x00000400 | 43 | #define CONTROL_PHY_CLK_SEL_ULPI 0x00000400 |
42 | #define CONTROL_OTG_PORT 0x00000020 | 44 | #define CONTROL_OTG_PORT 0x00000020 |
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c index 471fdd8f4108..64bcf0a33c71 100644 --- a/arch/powerpc/platforms/83xx/usb.c +++ b/arch/powerpc/platforms/83xx/usb.c | |||
@@ -129,7 +129,7 @@ int mpc831x_usb_cfg(void) | |||
129 | if (immr_node && of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) | 129 | if (immr_node && of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) |
130 | clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, | 130 | clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, |
131 | MPC8315_SCCR_USB_MASK, | 131 | MPC8315_SCCR_USB_MASK, |
132 | MPC8315_SCCR_USB_DRCM_11); | 132 | MPC8315_SCCR_USB_DRCM_01); |
133 | else | 133 | else |
134 | clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, | 134 | clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, |
135 | MPC83XX_SCCR_USB_MASK, | 135 | MPC83XX_SCCR_USB_MASK, |
@@ -164,9 +164,15 @@ int mpc831x_usb_cfg(void) | |||
164 | /* Using on-chip PHY */ | 164 | /* Using on-chip PHY */ |
165 | if (prop && (!strcmp(prop, "utmi_wide") || | 165 | if (prop && (!strcmp(prop, "utmi_wide") || |
166 | !strcmp(prop, "utmi"))) { | 166 | !strcmp(prop, "utmi"))) { |
167 | /* Set UTMI_PHY_EN, REFSEL to 48MHZ */ | 167 | u32 refsel; |
168 | |||
169 | if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) | ||
170 | refsel = CONTROL_REFSEL_24MHZ; | ||
171 | else | ||
172 | refsel = CONTROL_REFSEL_48MHZ; | ||
173 | /* Set UTMI_PHY_EN and REFSEL */ | ||
168 | out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, | 174 | out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, |
169 | CONTROL_UTMI_PHY_EN | CONTROL_REFSEL_48MHZ); | 175 | CONTROL_UTMI_PHY_EN | refsel); |
170 | /* Using external UPLI PHY */ | 176 | /* Using external UPLI PHY */ |
171 | } else if (prop && !strcmp(prop, "ulpi")) { | 177 | } else if (prop && !strcmp(prop, "ulpi")) { |
172 | /* Set PHY_CLK_SEL to ULPI */ | 178 | /* Set PHY_CLK_SEL to ULPI */ |