diff options
| author | Evan Wilson <evan@oliodevices.com> | 2015-06-16 08:40:55 -0700 |
|---|---|---|
| committer | Evan Wilson <evan@oliodevices.com> | 2015-06-16 08:40:55 -0700 |
| commit | d296766cc02b611071716e2e566c7bedd2da4233 (patch) | |
| tree | 25720e49e974d59e830dd1f0f7ef9f390872d0d7 | |
| parent | 08ff40216d991727807e36e0442acaac8fe44f72 (diff) | |
| download | olio-linux-3.10-d296766cc02b611071716e2e566c7bedd2da4233.tar.xz olio-linux-3.10-d296766cc02b611071716e2e566c7bedd2da4233.zip | |
Moving serial ports back to board file, so that Bluetooth initializes properly.
The Bluetooth was getting HCI timeouts because of something happening with Device tree initialization
Also for wake_peer functionality (to be added in next commit) we need to use a board file.
Change-Id: I14e8447af08ba5fbadd8a8334ad35ae776b2995b
| -rw-r--r-- | arch/arm/boot/dts/omap3.dtsi | 6 | ||||
| -rw-r--r-- | arch/arm/boot/dts/omap3_h1.dts | 34 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3h1-bluetooth.c | 24 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3h1.c | 10 |
4 files changed, 22 insertions, 52 deletions
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 78e97bea7af..4b59bcb8017 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -13,12 +13,13 @@ / { compatible = "ti,omap3430", "ti,omap3"; interrupt-parent = <&intc>; - +/* aliases { serial0 = &uart1; serial1 = &uart2; serial2 = &uart3; }; + */ cpus { cpu@0 { @@ -207,7 +208,7 @@ <&omap3_pmx_core 26 0xd9 1>, <&omap3_pmx_core 28 0xc1 4>; }; - +/* uart1: serial@4806a000 { compatible = "ti,omap3-uart"; ti,hwmods = "uart1"; @@ -225,6 +226,7 @@ ti,hwmods = "uart3"; clock-frequency = <48000000>; }; + */ /* i2c1: i2c@48070000 { compatible = "ti,omap3-i2c"; diff --git a/arch/arm/boot/dts/omap3_h1.dts b/arch/arm/boot/dts/omap3_h1.dts index c0551e82502..ea9e68f77ae 100644 --- a/arch/arm/boot/dts/omap3_h1.dts +++ b/arch/arm/boot/dts/omap3_h1.dts @@ -143,6 +143,7 @@ 0x188 0x100 /* HSUSB0_DATA7, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT) */ /* pin for controlling bluetooth chip, settings from uboot */ + 0x1a8 0x004 /* CONTROL_PADCONF_MCSPI2_SIMO, (IDIS | PI | M4 ) */ 0x1aa 0x004 /* CONTROL_PADCONF_MCSPI2_SOMI, (IDIS | PI | M4 ) */ /* BT_WAKE_GPIO - for waking up BT */ @@ -154,23 +155,6 @@ OMAP_PIN_OFF_WAKEUPENABLE */ >; }; - - uart1_pins: pinmux_uart1_pins { - pinctrl-single,pins = < - /* uart1 */ - 0x152 0x118 /* UART1_RX, MODEO | (uboot: ien, pullup, m0 */ - 0x146 0x000 /* UART1_TX, MODE0 | OUTPUT, MODE0 */ - >; - }; - - uart3_pins: pinmux_uart3_pins { - pinctrl-single,pins = < - /* uart3 */ - 0x16e 0x4118 /* UART3_RX, MODEO | INPUT_PULLUP | OFFWAKEUP*/ - 0x170 0x000 /* UART3_TX, MODE0 | OUTPUT */ - >; - }; - }; @@ -289,19 +273,3 @@ }; #endif - -&uart1 { - pinctrl-0 = <&uart1_pins>; - pinctrl-names = "default"; -}; - -&uart2 { - status = "disabled"; -}; - -&uart3 { - pinctrl-0 = <&uart3_pins>; - pinctrl-names = "default"; - autosuspend-delay = <(-1)>; /* -1 = infinity. Negative value needs parens */ - wakeup-capable; -}; diff --git a/arch/arm/mach-omap2/board-omap3h1-bluetooth.c b/arch/arm/mach-omap2/board-omap3h1-bluetooth.c index 3cec4bee656..68b3d80d290 100644 --- a/arch/arm/mach-omap2/board-omap3h1-bluetooth.c +++ b/arch/arm/mach-omap2/board-omap3h1-bluetooth.c @@ -42,6 +42,7 @@ static void update_host_wake_locked(int); +#define BT_RESET_GPIO 179 #define BT_REG_GPIO 180 #define BT_WAKE_GPIO 93 #define BT_HOST_WAKE_GPIO 11 @@ -74,12 +75,13 @@ static int bcm20702_bt_rfkill_set_power(void *data, bool blocked) regulator_enable(clk32ksys_reg); gpio_set_value(BT_REG_GPIO, 1); + gpio_set_value(BT_RESET_GPIO, 1); } else { // Chip won't toggle host_wake after reset. Make sure // we don't hold the wake_lock until chip wakes up again. update_host_wake_locked(0); - + gpio_set_value(BT_RESET_GPIO, 0); gpio_set_value(BT_REG_GPIO, 0); if (clk32ksys_reg && bt_enabled) regulator_disable(clk32ksys_reg); @@ -256,14 +258,14 @@ static int bcm20702_bluetooth_probe(struct platform_device *pdev) int rc = 0; int ret = 0; -// rc = gpio_request(BT_RESET_GPIO, "bcm20702_nreset_gpip"); -// if (unlikely(rc)) { -// return rc; -// } + rc = gpio_request(BT_RESET_GPIO, "bcm20702_nreset_gpip"); + if (unlikely(rc)) { + return rc; + } rc = gpio_request(BT_REG_GPIO, "bcm20702_nshutdown_gpio"); if (unlikely(rc)) { - //gpio_free(BT_RESET_GPIO); + gpio_free(BT_RESET_GPIO); return rc; } @@ -274,14 +276,14 @@ static int bcm20702_bluetooth_probe(struct platform_device *pdev) } gpio_direction_output(BT_REG_GPIO, 1); - //gpio_direction_output(BT_RESET_GPIO, 1); + gpio_direction_output(BT_RESET_GPIO, 1); bt_rfkill = rfkill_alloc("bcm20702 Bluetooth", &pdev->dev, RFKILL_TYPE_BLUETOOTH, &bcm20702_bt_rfkill_ops, NULL); if (unlikely(!bt_rfkill)) { - //gpio_free(BT_RESET_GPIO); + gpio_free(BT_RESET_GPIO); gpio_free(BT_REG_GPIO); return -ENOMEM; } @@ -291,7 +293,7 @@ static int bcm20702_bluetooth_probe(struct platform_device *pdev) if (unlikely(rc)) { rfkill_destroy(bt_rfkill); - //gpio_free(BT_RESET_GPIO); + gpio_free(BT_RESET_GPIO); gpio_free(BT_REG_GPIO); return -1; } @@ -301,7 +303,7 @@ static int bcm20702_bluetooth_probe(struct platform_device *pdev) rfkill_unregister(bt_rfkill); rfkill_destroy(bt_rfkill); - //gpio_free(BT_RESET_GPIO); + gpio_free(BT_RESET_GPIO); gpio_free(BT_REG_GPIO); } @@ -322,7 +324,7 @@ static int bcm20702_bluetooth_remove(struct platform_device *pdev) debugfs_remove(btdebugdent); gpio_free(BT_REG_GPIO); - //gpio_free(BT_RESET_GPIO); + gpio_free(BT_RESET_GPIO); gpio_free(BT_WAKE_GPIO); gpio_free(BT_HOST_WAKE_GPIO); regulator_put(clk32ksys_reg); diff --git a/arch/arm/mach-omap2/board-omap3h1.c b/arch/arm/mach-omap2/board-omap3h1.c index 54cf6126f10..ff621b2a86c 100644 --- a/arch/arm/mach-omap2/board-omap3h1.c +++ b/arch/arm/mach-omap2/board-omap3h1.c @@ -1009,15 +1009,15 @@ static struct omap_uart_port_info omap_uart_ports[] = { .dma_rx_buf_size = DEFAULT_RXDMA_BUFSIZE, .dma_rx_timeout = DEFAULT_RXDMA_TIMEOUT, .dma_rx_poll_rate = DEFAULT_RXDMA_POLLRATE, - .autosuspend_timeout = 5000, - .wakeup_capable = false, + .autosuspend_timeout = 1000, + .wakeup_capable = true, }, { .dma_enabled = false, /* To specify DMA Mode */ .dma_rx_buf_size = DEFAULT_RXDMA_BUFSIZE, .dma_rx_timeout = DEFAULT_RXDMA_TIMEOUT, .dma_rx_poll_rate = DEFAULT_RXDMA_POLLRATE, - .autosuspend_timeout = 5000, + .autosuspend_timeout = 0, .wakeup_capable = false, }, { @@ -1033,7 +1033,7 @@ static struct omap_uart_port_info omap_uart_ports[] = { .dma_rx_buf_size = DEFAULT_RXDMA_BUFSIZE, .dma_rx_timeout = DEFAULT_RXDMA_TIMEOUT, .dma_rx_poll_rate = DEFAULT_RXDMA_POLLRATE, - .autosuspend_timeout = 5000, + .autosuspend_timeout = 0, .wakeup_capable = false, }, }; @@ -1206,9 +1206,7 @@ static void __init omap3_h1_init(void) omap3h1_spi_init(); -#if 0 omap_serial_board_init(omap_uart_ports); -#endif omap_display_init(&omap3h1_dss_data); |