diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/dts/omap3-n900.dts | 151 | ||||
-rw-r--r-- | arch/arm/boot/dts/omap34xx.dtsi | 30 | ||||
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 56 | ||||
-rw-r--r-- | arch/arm/mach-omap2/ssi.c | 82 |
6 files changed, 169 insertions, 161 deletions
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index 2cb18a0528f2..6ae19bf4260c 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts @@ -28,7 +28,86 @@ }; +&omap3_pmx_core { + pinctrl-names = "default"; + + uart1_pins: pinmux_uart1_pins { + pinctrl-single,pins = < + 0x152 (PIN_INPUT | MUX_MODE0) /* uart1_rx */ + 0x14c (PIN_OUTPUT |MUX_MODE0) /* uart1_tx */ + >; + }; + + uart2_pins: pinmux_uart2_pins { + pinctrl-single,pins = < + 0x14a (PIN_INPUT | MUX_MODE0) /* uart2_rx */ + 0x148 (PIN_OUTPUT | MUX_MODE0) /* uart2_tx */ + >; + }; + + uart3_pins: pinmux_uart3_pins { + pinctrl-single,pins = < + 0x16e (PIN_INPUT | MUX_MODE0) /* uart3_rx */ + 0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx */ + >; + }; + + i2c1_pins: pinmux_i2c1_pins { + pinctrl-single,pins = < + 0x18a (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */ + 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda */ + >; + }; + + i2c2_pins: pinmux_i2c2_pins { + pinctrl-single,pins = < + 0x18e (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_scl */ + 0x190 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_sda */ + >; + }; + + i2c3_pins: pinmux_i2c3_pins { + pinctrl-single,pins = < + 0x192 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_scl */ + 0x194 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda */ + >; + }; + + mmc1_pins: pinmux_mmc1_pins { + pinctrl-single,pins = < + 0x114 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk */ + 0x116 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_cmd */ + 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat0 */ + 0x11a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1 */ + 0x11c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2 */ + 0x11e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3 */ + 0x120 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat4 */ + 0x122 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat5 */ + 0x124 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat6 */ + 0x126 (PIN_INPUT | MUX_MODE0) /* sdmmc1_dat7 */ + >; + }; + + mmc2_pins: pinmux_mmc2_pins { + pinctrl-single,pins = < + 0x128 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk */ + 0x12a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd */ + 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0 */ + 0x12e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1 */ + 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2 */ + 0x132 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3 */ + 0x134 (PIN_INPUT | MUX_MODE0) /* sdmmc2_dat4 */ + 0x136 (PIN_INPUT | MUX_MODE0) /* sdmmc2_dat5 */ + 0x138 (PIN_INPUT | MUX_MODE0) /* sdmmc2_dat6 */ + 0x13a (PIN_INPUT | MUX_MODE0) /* sdmmc2_dat7 */ + >; + }; +}; + &i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + clock-frequency = <2200000>; twl: twl@48 { @@ -39,6 +118,7 @@ }; #include "twl4030.dtsi" +#include "twl4030_omap3.dtsi" &twl_gpio { ti,pullups = <0x0>; @@ -46,19 +126,34 @@ }; &i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; + clock-frequency = <400000>; }; &i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; + clock-frequency = <100000>; }; + &mmc1 { - status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + vmmc-supply = <&vmmc1>; + vmmc_aux-supply = <&vsim>; + bus-width = <8>; }; &mmc2 { - status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_pins>; + vmmc-supply = <&vmmc2>; + vmmc_aux-supply = <&vsim>; + bus-width = <8>; }; &mmc3 { @@ -93,4 +188,56 @@ &ssi_port1 { ti,ssi-cawake-gpio = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* 151 */ + + clients { + hsi_char: ssi-client@0 { + compatible = "hsi,hsi-char"; + }; + + ssi_protocol: ssi-client@1 { + compatible = "hsi,ssi-protocol"; + + tx { + mode = "frame"; + channels = <4>; + speed = <55000>; + }; + + rx { + arb_mode = "arb_rr"; + mode = "frame"; + channels = <4>; + }; + }; + + cmt_speech: ssi-client@2 { + compatible = "hsi,cmt-speech"; + }; + }; +}; + + +&ssi_port2 { + status = "disabled"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; +}; + +/* +&uart3 { + status = "disabled"; +}; +*/ + +&uart3 { + pinctrl-names = "default"; + pinctrl-0 = <&uart3_pins>; }; diff --git a/arch/arm/boot/dts/omap34xx.dtsi b/arch/arm/boot/dts/omap34xx.dtsi index fdc9a26244a6..393b7a712bc5 100644 --- a/arch/arm/boot/dts/omap34xx.dtsi +++ b/arch/arm/boot/dts/omap34xx.dtsi @@ -27,7 +27,7 @@ }; ocp { - ssi: ssi@48058000 { + ssi: ssi-controller@48058000 { compatible = "ti,omap3-ssi"; ti,hwmods = "ssi"; @@ -36,32 +36,42 @@ reg-names = "sys", "gdd"; - interrupts = <71>; + interrupts = <55>; interrupt-names = "gdd_mpu"; - ssi_port1: ssi-port@4805a000 { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + ssi_port1: ssi-port@0 { + compatible = "ti,omap3-ssi-port"; + reg = <0x4805a000 0x800>, <0x4805a800 0x800>; reg-names = "tx", "rx"; - interrupts = <67>, - <68>; + interrupt-parent = <&intc>; + interrupts = <51>, + <52>; interrupt-names = "mpu_irq0", "mpu_irq1"; - } + }; + + ssi_port2: ssi-port@1 { + compatible = "ti,omap3-ssi-port"; - ssi_port2: ssi-port@4805b000 { reg = <0x4805b000 0x800>, <0x4805b800 0x800>; reg-names = "tx", "rx"; - interrupts = <69>, - <70>; + interrupt-parent = <&intc>; + interrupts = <53>, + <54>; interrupt-names = "mpu_irq0", "mpu_irq1"; - } + }; }; }; }; diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index ace860ded36f..d4f671547c37 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -222,10 +222,6 @@ ifneq ($(CONFIG_DRM_OMAP),) obj-y += drm.o endif -# Synchronous Serial Interface (SSI) -omap-ssi-$(CONFIG_OMAP_SSI) := ssi.o -obj-y += $(omap-ssi-m) $(omap-ssi-y) - # Specific board support obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index e2ca155f5801..32110a09a17d 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -27,7 +27,6 @@ #include <linux/power/isp1704_charger.h> #include <linux/platform_data/spi-omap2-mcspi.h> #include <linux/platform_data/mtd-onenand-omap2.h> -#include <linux/platform_data/hsi-omap-ssi.h> #include <asm/system_info.h> @@ -268,11 +267,6 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { }, }; -static struct omap_ssi_board_config ssi_board_config = { - .num_ports = 1, - .cawake_gpio = { RX51_CAWAKE_GPIO }, -}; - static struct platform_device rx51_battery_device = { .name = "rx51-battery", .id = -1, @@ -1303,7 +1297,6 @@ void __init rx51_peripherals_init(void) if (partition) omap_hsmmc_init(mmc); - omap_ssi_config(&ssi_board_config); rx51_charger_init(); rx51_init_twl4030_hwmon(); } diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 74006c4a8524..b4b9af36b7a2 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3716,65 +3716,10 @@ static struct omap_hwmod_class omap34xx_ssi_hwmod_class = { .sysc = &omap34xx_ssi_sysc, }; -static struct omap_hwmod_irq_info omap34xx_ssi_irqs[] = { - { .name = "ssi_p1_mpu_irq0", .irq = 67 }, - { .name = "ssi_p1_mpu_irq1", .irq = 68 }, - { .name = "ssi_p2_mpu_irq0", .irq = 69 }, - { .name = "ssi_p2_mpu_irq1", .irq = 70 }, - { .name = "ssi_gdd_mpu", .irq = 71 }, - { .irq = -1 }, -}; - -static struct omap_hwmod_addr_space omap34xx_ssi_addrs[] = { - { - .name = "sys", - .pa_start = 0x48058000, - .pa_end = 0x48058fff, - .flags = ADDR_TYPE_RT, - }, - { - /* generic distributed DMA */ - .name = "gdd", - .pa_start = 0x48059000, - .pa_end = 0x48059fff, - .flags = ADDR_TYPE_RT, - }, - { - /* port 1: synchronous serial transmitter */ - .name = "p1_sst", - .pa_start = 0x4805a000, - .pa_end = 0x4805a7ff, - .flags = ADDR_TYPE_RT, - }, - { - /* port 1: synchronous serial receiver */ - .name = "p1_ssr", - .pa_start = 0x4805a800, - .pa_end = 0x4805afff, - .flags = ADDR_TYPE_RT, - }, - { - /* port 2: synchronous serial transmitter */ - .name = "p2_sst", - .pa_start = 0x4805b000, - .pa_end = 0x4805b7ff, - .flags = ADDR_TYPE_RT, - }, - { - /* port 2: synchronous serial receiver */ - .name = "p2_ssr", - .pa_start = 0x4805b800, - .pa_end = 0x4805bfff, - .flags = ADDR_TYPE_RT, - }, - {} -}; - static struct omap_hwmod omap34xx_ssi_hwmod = { .name = "ssi", .class = &omap34xx_ssi_hwmod_class, .clkdm_name = "l3_init_clkdm", - .mpu_irqs = omap34xx_ssi_irqs, .main_clk = "ssi_ssr_fck", .prcm = { .omap2 = { @@ -3792,7 +3737,6 @@ static struct omap_hwmod_ocp_if omap34xx_l3__ssi = { .master = &omap3xxx_l3_main_hwmod, .slave = &omap34xx_ssi_hwmod, .clk = "ssi_ick", - .addr = omap34xx_ssi_addrs, .user = OCP_USER_MPU | OCP_USER_SDMA, }; diff --git a/arch/arm/mach-omap2/ssi.c b/arch/arm/mach-omap2/ssi.c deleted file mode 100644 index a9d6eee1abba..000000000000 --- a/arch/arm/mach-omap2/ssi.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * linux/arch/arm/mach-omap2/ssi.c - * - * Copyright (C) 2010 Nokia Corporation. All rights reserved. - * - * Contact: Carlos Chinea <carlos.chinea@nokia.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * version 2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - */ - -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/err.h> -#include <linux/gpio.h> -#include <linux/platform_device.h> -#include <linux/platform_data/hsi-omap-ssi.h> -#include "omap_hwmod.h" -#include "omap_device.h" -#include "omap-pm.h" - -static struct omap_ssi_platform_data ssi_pdata = { - .num_ports = SSI_NUM_PORTS, - .cawake_gpio = {0}, - .get_dev_context_loss_count = omap_pm_get_dev_context_loss_count, -}; - -int __init omap_ssi_config(struct omap_ssi_board_config *ssi_config) -{ - unsigned int port, offset, cawake_gpio; - int err; - - ssi_pdata.num_ports = ssi_config->num_ports; - - for (port = 0, offset = 7; port < ssi_config->num_ports; port++, offset += 5) { - cawake_gpio = ssi_config->cawake_gpio[port]; - if (!cawake_gpio) - continue; /* Nothing to do */ - err = gpio_request(cawake_gpio, "cawake"); - if (err < 0) - goto rback; - gpio_direction_input(cawake_gpio); - - ssi_pdata.cawake_gpio[port] = ssi_config->cawake_gpio[port]; - } - - return 0; - -rback: - pr_err("omap-ssi: Request cawake (gpio%d) failed\n", cawake_gpio); - while (port > 0) - gpio_free(ssi_config->cawake_gpio[--port]); - - return err; -} - -static int __init omap_ssi_init(void) -{ - struct omap_hwmod *oh; - struct platform_device *pdev; - - oh = omap_hwmod_lookup("ssi"); - if (!oh) - return -EINVAL; - - pdev = omap_device_build("omap_ssi", 0, oh, &ssi_pdata, sizeof(struct omap_ssi_platform_data)); - WARN(IS_ERR(pdev), "Can't build omap_device for omap_ssi\n"); - - return 0; -} -subsys_initcall(omap_ssi_init); |