mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-19 15:33:56 +00:00
Enable USB1 (which is EHCI0) for Allwinner A10
Tested by: ganbold@
This commit is contained in:
parent
e589740522
commit
aaa54dd138
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246851
@ -129,6 +129,7 @@ a10_clk_usb_activate(void)
|
||||
/* Gating AHB clock for USB */
|
||||
reg_value = ccm_read_4(sc, CCM_AHB_GATING0);
|
||||
reg_value |= CCM_AHB_GATING_USB0; /* AHB clock gate usb0 */
|
||||
reg_value |= CCM_AHB_GATING_EHCI0; /* AHB clock gate ehci1 */
|
||||
reg_value |= CCM_AHB_GATING_EHCI1; /* AHB clock gate ehci1 */
|
||||
ccm_write_4(sc, CCM_AHB_GATING0, reg_value);
|
||||
|
||||
|
@ -101,6 +101,7 @@
|
||||
#define CCM_MALI400_CLK 0x0154
|
||||
|
||||
#define CCM_AHB_GATING_USB0 (1 << 0)
|
||||
#define CCM_AHB_GATING_EHCI0 (1 << 1)
|
||||
#define CCM_AHB_GATING_EHCI1 (1 << 3)
|
||||
|
||||
#define CCM_USB_PHY (1 << 8)
|
||||
|
@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define SW_AHB_INCRX_ALIGN (1 << 8)
|
||||
#define SW_AHB_INCR4 (1 << 9)
|
||||
#define SW_AHB_INCR8 (1 << 10)
|
||||
#define GPIO_USB1_PWR 230
|
||||
#define GPIO_USB2_PWR 227
|
||||
|
||||
#define A10_READ_4(sc, reg) \
|
||||
@ -182,6 +183,10 @@ a10_ehci_attach(device_t self)
|
||||
GPIO_PIN_SETFLAGS(sc_gpio_dev, GPIO_USB2_PWR, GPIO_PIN_OUTPUT);
|
||||
GPIO_PIN_SET(sc_gpio_dev, GPIO_USB2_PWR, GPIO_PIN_HIGH);
|
||||
|
||||
/* Give power to USB */
|
||||
GPIO_PIN_SETFLAGS(sc_gpio_dev, GPIO_USB1_PWR, GPIO_PIN_OUTPUT);
|
||||
GPIO_PIN_SET(sc_gpio_dev, GPIO_USB1_PWR, GPIO_PIN_HIGH);
|
||||
|
||||
/* Enable passby */
|
||||
reg_value = A10_READ_4(sc, SW_USB_PMU_IRQ_ENABLE);
|
||||
reg_value |= SW_AHB_INCR8; /* AHB INCR8 enable */
|
||||
|
@ -91,7 +91,14 @@
|
||||
interrupt-parent = <&AINTC>;
|
||||
};
|
||||
|
||||
usb1: usb@01c1c000 {
|
||||
usb1: usb@01c14000 {
|
||||
compatible = "allwinner,usb-ehci", "usb-ehci";
|
||||
reg = <0x01c14000 0x1000>;
|
||||
interrupts = < 39 >;
|
||||
interrupt-parent = <&AINTC>;
|
||||
};
|
||||
|
||||
usb2: usb@01c1c000 {
|
||||
compatible = "allwinner,usb-ehci", "usb-ehci";
|
||||
reg = <0x01c1c000 0x1000>;
|
||||
interrupts = < 40 >;
|
||||
|
Loading…
Reference in New Issue
Block a user