diff options
| -rw-r--r-- | arch/arm/Kconfig | 1 | ||||
| -rw-r--r-- | arch/arm/boot/dts/omap3-h1-ev1.dts | 52 | ||||
| -rw-r--r-- | arch/arm/configs/omap3_h1_defconfig | 88 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3h1.c | 105 | ||||
| -rw-r--r-- | drivers/usb/phy/phy-ulpi.c | 2 |
5 files changed, 203 insertions, 45 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f414eaa38e5..7f7977cf934 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1596,6 +1596,7 @@ config ARCH_NR_GPIO default 352 if ARCH_VT8500 default 288 if ARCH_SUNXI default 264 if MACH_H4700 + default 256 if MACH_OMAP3_H1 default 0 help Maximum number of GPIOs in the system. diff --git a/arch/arm/boot/dts/omap3-h1-ev1.dts b/arch/arm/boot/dts/omap3-h1-ev1.dts index 980c510d559..fc8a507b855 100644 --- a/arch/arm/boot/dts/omap3-h1-ev1.dts +++ b/arch/arm/boot/dts/omap3-h1-ev1.dts @@ -1,7 +1,7 @@ /* * Copyright (C) 2014 Olio Devices, Inc. * Authors: Evan Wilson <evan@oliodevices.com> - * Mattis Fjallstrom <mattis@oliodevices.com> + * Mattis Fjallstrom <mattis@oliodevices.com> * * Modified from omap3-beagle-xm.dts * @@ -12,26 +12,46 @@ /dts-v1/; /include/ "omap36xx.dtsi" - / { model = "Olio OMAP3 H1 Board"; compatible = "olio,omap3-h1", "ti,omap3"; - cpus { - cpu@0 { - cpu0-supply = <&dummy>; - }; - }; - - memory { - device_type = "memory"; - reg = <0x80000000 0x20000000>; /* 512 MB */ + tusb_phy: tusb-usb@0 { + compatible = "ti,tusb-usb"; + gpios = <&gpio5 14 0x1>; /* IRQ gpio-142 GPIOF_DIR_OUT|GPIOF_INIT_HIGH */ + gpio-names = "tusb-cs"; + clk_in = "periph_26mhz"; /* external 26MHz clock */ + reg = <0 0>; }; - - dummy: fixedregulator@0 { - compatible = "regulator-fixed"; - regulator-name = "dummy"; - regulator-boot-on; + + /* Needs to be modified for Olio H1 */ + + /* Consider setting up pad-wkup here, like in Minnow */ + + +}; + +/* Lots of pinmux in the board file, as well */ + +&omap3_pmx_core { + pinctrl-names = "default"; + pinctrl-0 = <&usb_phy_pins>; + + usb_phy_pins: pinmux_usb_phy_pins { + pinctrl-single,pins = < + 0x140 0x4104 /* MCBSP3_CLKX, MODE4 (GPIO-142) | INPUT | OFFWAKEUP */ + 0x5ae 0x004 /* ETK_D1, MODE4 (GPIO_15) | OUTPUT */ + 0x5b0 0x004 /* ETK_D2, MODE4 (GPIO_16) | OUTPUT */ + 0x5c6 0x004 /* EDK_D13, MODE4 (GPIO_27) | OUTPUT */ + >; }; }; + +&usb_otg_hs { + interface-type = <0>; + usb-phy = <&tusb_phy>; + mode = <3>; + power = <50>; + +}; diff --git a/arch/arm/configs/omap3_h1_defconfig b/arch/arm/configs/omap3_h1_defconfig index f026bc906a5..7fc9a33b039 100644 --- a/arch/arm/configs/omap3_h1_defconfig +++ b/arch/arm/configs/omap3_h1_defconfig @@ -313,6 +313,9 @@ CONFIG_OMAP_PACKAGE_CBP=y # # CONFIG_MACH_OMAP3_BEAGLE is not set CONFIG_MACH_OMAP3_H1=y +# CONFIG_MACH_OMAP3_H1_EVT1 is not set +# CONFIG_MACH_OMAP3_H1_EVT2 is not set +CONFIG_MACH_OMAP3_H1_DVT=y # CONFIG_MACH_DEVKIT8000 is not set # CONFIG_MACH_OMAP_LDP is not set # CONFIG_MACH_OMAP3530_LV_SOM is not set @@ -1276,10 +1279,13 @@ CONFIG_INPUT_KEYBOARD=y CONFIG_INPUT_MOUSE=y # CONFIG_MOUSE_PS2 is not set # CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_BCM5974 is not set # CONFIG_MOUSE_CYAPA is not set # CONFIG_MOUSE_VSXXXAA is not set # CONFIG_MOUSE_GPIO is not set # CONFIG_MOUSE_SYNAPTICS_I2C is not set +# CONFIG_MOUSE_SYNAPTICS_USB is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TABLET is not set CONFIG_INPUT_TOUCHSCREEN=y @@ -1313,6 +1319,7 @@ CONFIG_TOUCHSCREEN_ATMEL_MXT=y # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set # CONFIG_TOUCHSCREEN_TOUCHWIN is not set # CONFIG_TOUCHSCREEN_PIXCIR is not set +# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set # CONFIG_TOUCHSCREEN_TSC_SERIO is not set # CONFIG_TOUCHSCREEN_TSC2005 is not set @@ -1327,8 +1334,13 @@ CONFIG_INPUT_MISC=y # CONFIG_INPUT_MPU3050 is not set # CONFIG_INPUT_GP2A is not set # CONFIG_INPUT_GPIO_TILT_POLLED is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set # CONFIG_INPUT_KEYCHORD is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set # CONFIG_INPUT_KXTJ9 is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set CONFIG_INPUT_UINPUT=y # CONFIG_INPUT_GPIO is not set # CONFIG_INPUT_PCF8574 is not set @@ -1563,6 +1575,7 @@ CONFIG_BATTERY_BQ27X00_I2C=y # CONFIG_BATTERY_BQ27X00_PLATFORM is not set # CONFIG_BATTERY_MAX17040 is not set # CONFIG_BATTERY_MAX17042 is not set +# CONFIG_CHARGER_ISP1704 is not set # CONFIG_CHARGER_MAX8903 is not set # CONFIG_CHARGER_LP8727 is not set # CONFIG_CHARGER_GPIO is not set @@ -1877,7 +1890,66 @@ CONFIG_HID_GENERIC=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_USB_ARCH_HAS_XHCI is not set -# CONFIG_USB_SUPPORT is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB is not set +# CONFIG_USB_DWC3 is not set +# CONFIG_USB_CHIPIDEA is not set + +# +# USB port drivers +# +CONFIG_USB_PHY=y +# CONFIG_NOP_USB_XCEIV is not set +CONFIG_OMAP_CONTROL_USB=y +# CONFIG_OMAP_USB2 is not set +# CONFIG_OMAP_USB3 is not set +# CONFIG_SAMSUNG_USBPHY is not set +# CONFIG_SAMSUNG_USB2PHY is not set +# CONFIG_SAMSUNG_USB3PHY is not set +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ISP1301 is not set +# CONFIG_USB_RCAR_PHY is not set +# CONFIG_USB_ULPI is not set +CONFIG_USB_TUSB=y +# CONFIG_CPCAP_USB is not set +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DEBUG=y +CONFIG_USB_GADGET_DEBUG_FILES=y +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_GADGET_VBUS_DRAW=100 +CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 + +# +# USB Peripheral Controller +# +# CONFIG_USB_FUSB300 is not set +# CONFIG_USB_R8A66597 is not set +# CONFIG_USB_PXA27X is not set +# CONFIG_USB_MV_UDC is not set +# CONFIG_USB_MV_U3D is not set +# CONFIG_USB_M66592 is not set +# CONFIG_USB_NET2272 is not set +CONFIG_USB_LIBCOMPOSITE=y +CONFIG_USB_F_ACM=y +CONFIG_USB_U_SERIAL=y +# CONFIG_USB_ZERO is not set +# CONFIG_USB_AUDIO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_G_NCM is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FUNCTIONFS is not set +# CONFIG_USB_MASS_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set +# CONFIG_USB_G_PRINTER is not set +# CONFIG_USB_G_ANDROID is not set +CONFIG_USB_CDC_COMPOSITE=y +# CONFIG_USB_G_ACM_MS is not set +# CONFIG_USB_G_MULTI is not set +# CONFIG_USB_G_HID is not set +# CONFIG_USB_G_DBGP is not set # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set CONFIG_NEW_LEDS=y @@ -2131,6 +2203,9 @@ CONFIG_STAGING=y # CONFIG_IIO_PERIODIC_RTC_TRIGGER is not set # CONFIG_IIO_GPIO_TRIGGER is not set # CONFIG_IIO_SYSFS_TRIGGER is not set +CONFIG_INV_MPU_IIO=y +# CONFIG_INV_IIO_MPU3050_ACCEL_SLAVE_BMA250 is not set +# CONFIG_DTS_INV_MPU_IIO is not set # CONFIG_IIO_SIMPLE_DUMMY is not set # CONFIG_ZSMALLOC is not set # CONFIG_FT1000 is not set @@ -2269,17 +2344,6 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 # CONFIG_ITG3200 is not set # -# Inertial measurement units -# -# CONFIG_ADIS16400 is not set -# CONFIG_ADIS16480 is not set -# CONFIG_INV_MPU6050_IIO is not set -CONFIG_INV_MPU_IIO=y -# CONFIG_INV_IIO_MPU3050_ACCEL_SLAVE_BMA250 is not set -# CONFIG_DTS_INV_MPU_IIO is not set -CONFIG_INV_KERNEL_3_10=y - -# # Light sensors # # CONFIG_ADJD_S311 is not set diff --git a/arch/arm/mach-omap2/board-omap3h1.c b/arch/arm/mach-omap2/board-omap3h1.c index bb357945d2f..e2efe2682a3 100644 --- a/arch/arm/mach-omap2/board-omap3h1.c +++ b/arch/arm/mach-omap2/board-omap3h1.c @@ -26,6 +26,12 @@ #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> #include <linux/mtd/nand.h> + +#include <linux/usb/musb.h> +#include <linux/usb/phy.h> +#include <linux/usb/phy-tusb-h1.h> +#include <linux/usb/nop-usb-xceiv.h> + #include <linux/i2c/atmel_mxt_ts.h> #include <linux/gpio.h> @@ -55,7 +61,10 @@ #include "board-omap3h1.h" #define NAND_CS 0 + #define MPUIRQ_GPIO 31 +#define ATMEL_MXT_GPIO 105 +#define USB_IRQ 124 #ifdef CONFIG_MACH_OMAP3_H1_DVT #define LCD_RESET_GPIO 94 @@ -63,7 +72,7 @@ #define LCD_RESET_GPIO 122 #endif -#define ATMEL_MXT_GPIO 105 + static struct mtd_partition omap3h1_nand_partitions[] = { /* All the partition sizes are listed in terms of NAND block size */ @@ -174,14 +183,44 @@ static struct lm3530_platform_data omap3h1_backlight_platform_data = { static struct mxt_platform_data mxt_data = { - .irqflags = IRQF_TRIGGER_FALLING, -}; + .irqflags = IRQF_TRIGGER_FALLING, +}; static struct platform_device bcm20702_bluetooth_device = { .name = "bcm20702_bluetooth", .id = -1, }; +/* --------------------------------------------------------------------------- */ +/* USB settings + */ + +static struct omap_musb_board_data musb_board_data = { + .interface_type = MUSB_INTERFACE_ULPI, + .mode = MUSB_OTG, + .power = 100, +}; + +static struct nop_usb_xceiv_platform_data nop_plat_data = { + .type = USB_PHY_TYPE_USB2, + .clk_rate = 60000000, /* 60 MHz */ + .needs_vcc = 1, + .needs_reset = 0, +}; + +static struct platform_device nop_phy_device = { + .name = "nop_usb_xceiv", + .id = -1, + .dev = { + .platform_data = &nop_plat_data, + }, +}; + + +/* --------------------------------------------------------------------------- */ +/* REGULATORS + */ + static struct regulator_init_data omap3h1_vbat_data = { .constraints.always_on = true, }; @@ -201,6 +240,10 @@ static struct platform_device omap3h1_vbat = { }, }; +static struct usbhs_omap_platform_data usbhs_bdata __initdata = { + .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, +}; + /* --------------------------------------------------------------------------- */ static struct regulator_init_data tps65910_dummy = { @@ -248,8 +291,6 @@ static struct regulator_init_data tps65910_vibrator = { .consumer_supplies = tps65910_vibrator_supply, }; - - /* --------------------------------------------------------------------------- */ @@ -340,7 +381,7 @@ static struct regulator_init_data tps65910_accel = { .min_uV = 1800000, .max_uV = 1800000, .valid_modes_mask = REGULATOR_MODE_NORMAL, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, .always_on = true, .apply_uV = true, }, @@ -404,17 +445,16 @@ static struct tps65910_board omap3h1_tps65910_pdata = { .tps65910_pmic_init_data[TPS65910_REG_VMMC] = &tps65910_touch3, .tps65910_pmic_init_data[TPS65910_REG_VAUX2] = &tps65910_vibrator, - /* This one is actually connected to BT */ + /* This one is connected to BT */ .tps65910_pmic_init_data[TPS65910_REG_VAUX33] = &tps65910_3v3, - + /* not actually used */ .tps65910_pmic_init_data[TPS65910_REG_VRTC] = &tps65910_dummy, .tps65910_pmic_init_data[TPS65910_REG_VDAC] = &tps65910_dummy, .tps65910_pmic_init_data[TPS65910_REG_VAUX1] = &tps65910_dummy, /* 2v85 */ .tps65910_pmic_init_data[TPS65910_REG_VDD3] = &tps65910_dummy, - }; static struct i2c_board_info __initdata omap3h1_i2c1_board_info[] = { @@ -437,11 +477,11 @@ static struct i2c_board_info __initdata omap3h1_i2c1_board_info[] = { I2C_BOARD_INFO("mXT224", 0x4a), .platform_data = &mxt_data, }, - #ifndef CONFIG_MACH_OMAP3_H1_EVT1 +#ifndef CONFIG_MACH_OMAP3_H1_EVT1 { I2C_BOARD_INFO("bq274xx", 0x55), }, - #endif +#endif }; static struct i2c_board_info __initdata omap3h1_i2c3_board_info[] = { @@ -463,7 +503,7 @@ static int __init omap3_h1_i2c_init(void) gpio_request_one(ATMEL_MXT_GPIO, GPIOF_IN, "atmel_mxt_ts CHG"); omap3h1_i2c1_board_info[3].irq = gpio_to_irq(ATMEL_MXT_GPIO); - gpio_request_one(MPUIRQ_GPIO, GPIOF_IN, "mpu6515"); + gpio_request_one(MPUIRQ_GPIO, GPIOF_IN, "mpu6515 IRQ pin"); omap3h1_i2c1_board_info[1].irq = gpio_to_irq(MPUIRQ_GPIO); /* Register buses */ @@ -476,6 +516,7 @@ static int __init omap3_h1_i2c_init(void) static struct platform_device *omap3h1_devices[] __initdata = { &omap3h1_vbat, &bcm20702_bluetooth_device, + &nop_phy_device, }; #ifdef CONFIG_OMAP_MUX @@ -513,19 +554,43 @@ static struct omap_board_mux board_mux[] __initdata = { OMAP3_MUX(MCSPI1_SOMI, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), - // TOUCH_RESET + /* TOUCH_RESET */ + OMAP3_MUX(CAM_D6, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP), +#ifdef CONFIG_MACH_OMAP3_H1_DVT + /* USB pin settings (mUSB) */ + + OMAP3_MUX(HSUSB0_CLK, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)), + OMAP3_MUX(HSUSB0_DATA0, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)), + OMAP3_MUX(HSUSB0_DATA1, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)), + OMAP3_MUX(HSUSB0_DATA2, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)), + OMAP3_MUX(HSUSB0_DATA3, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)), + OMAP3_MUX(HSUSB0_DATA4, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)), + OMAP3_MUX(HSUSB0_DATA5, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)), + OMAP3_MUX(HSUSB0_DATA6, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)), + OMAP3_MUX(HSUSB0_DATA7, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)), + OMAP3_MUX(HSUSB0_DIR, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)), + OMAP3_MUX(HSUSB0_NXT, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)), + OMAP3_MUX(HSUSB0_STP, (OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT)), +#endif /* CONFIG_MACH_OMAP3_H1_DVT */ + + /* accelerometer */ + OMAP3_MUX(JTAG_EMU1, (OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT)), + + /* USB on */ + OMAP3_MUX(ETK_D7, (OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT)), + { .reg_offset = OMAP_MUX_TERMINATOR }, }; #endif static void __init omap3_h1_init(void) { - omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); + omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); omap3_h1_i2c_init(); - + omap_display_init(&omap3h1_dss_data); omap_serial_init(); omap_sdrc_init(NULL, NULL); @@ -535,8 +600,14 @@ static void __init omap3_h1_init(void) NAND_BUSWIDTH_16, NULL); platform_add_devices(omap3h1_devices, ARRAY_SIZE(omap3h1_devices)); + omap3h1_spi_init(); - //h1_opp_init(); + + usb_bind_phy("musb-hdrc.0.auto", 0, "nop_usb_xceiv"); /* "tusb-usb-h1" */ + usb_musb_init(&musb_board_data); + usbhs_init(&usbhs_bdata); + + /* h1_opp_init(); */ } MACHINE_START(OMAP3_H1, "Olio OMAP3 H1 Board") @@ -549,6 +620,6 @@ MACHINE_START(OMAP3_H1, "Olio OMAP3 H1 Board") .init_machine = omap3_h1_init, .init_late = omap3630_init_late, .init_time = omap3_secure_sync32k_timer_init, - //.dt_compat = omap3_h1_boards_compat, + /* .dt_compat = omap3_h1_boards_compat, */ .restart = omap3xxx_restart, MACHINE_END diff --git a/drivers/usb/phy/phy-ulpi.c b/drivers/usb/phy/phy-ulpi.c index 217339dd7a9..67f48dd8dca 100644 --- a/drivers/usb/phy/phy-ulpi.c +++ b/drivers/usb/phy/phy-ulpi.c @@ -47,6 +47,8 @@ struct ulpi_info { static struct ulpi_info ulpi_ids[] = { ULPI_INFO(ULPI_ID(0x04cc, 0x1504), "NXP ISP1504"), ULPI_INFO(ULPI_ID(0x0424, 0x0006), "SMSC USB331x"), + ULPI_INFO(ULPI_ID(0x0451, 0x1507), "TI TUSB1210"), + ULPI_INFO(ULPI_ID(0x0451, 0x1508), "TI TUSB1211"), }; static int ulpi_set_otg_flags(struct usb_phy *phy) |