mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 13:48:06 +00:00
omap: remove 3.12 kernel patches
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 42401
This commit is contained in:
parent
1839d1b912
commit
366007c3d8
@ -1,57 +0,0 @@
|
||||
From 29f3723bf62d46c238dcc5436787a8ad6b25a385 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Poeschel <poeschel@lemonage.de>
|
||||
Date: Wed, 7 Aug 2013 13:06:32 +0200
|
||||
Subject: [PATCH 02/14] ARM: dts: AM33xx: Correct gpio #interrupt-cells
|
||||
property
|
||||
|
||||
Following commit ff5c9059 and therefore other omap platforms using
|
||||
the gpio-omap driver correct the #interrupt-cells property on am33xx
|
||||
too. The omap gpio binding documentaion also states that
|
||||
the #interrupt-cells property should be 2.
|
||||
|
||||
Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
|
||||
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
|
||||
Acked-by: Mark Rutland <mark.rutland@arm.com>
|
||||
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
|
||||
---
|
||||
arch/arm/boot/dts/am33xx.dtsi | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -106,7 +106,7 @@
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
- #interrupt-cells = <1>;
|
||||
+ #interrupt-cells = <2>;
|
||||
reg = <0x44e07000 0x1000>;
|
||||
interrupts = <96>;
|
||||
};
|
||||
@@ -117,7 +117,7 @@
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
- #interrupt-cells = <1>;
|
||||
+ #interrupt-cells = <2>;
|
||||
reg = <0x4804c000 0x1000>;
|
||||
interrupts = <98>;
|
||||
};
|
||||
@@ -128,7 +128,7 @@
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
- #interrupt-cells = <1>;
|
||||
+ #interrupt-cells = <2>;
|
||||
reg = <0x481ac000 0x1000>;
|
||||
interrupts = <32>;
|
||||
};
|
||||
@@ -139,7 +139,7 @@
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
- #interrupt-cells = <1>;
|
||||
+ #interrupt-cells = <2>;
|
||||
reg = <0x481ae000 0x1000>;
|
||||
interrupts = <62>;
|
||||
};
|
@ -1,203 +0,0 @@
|
||||
From 884d3962ef4787c8cf0b8a7a673531c623d1dff8 Mon Sep 17 00:00:00 2001
|
||||
From: Darren Etheridge <detheridge@ti.com>
|
||||
Date: Fri, 2 Aug 2013 15:35:36 -0500
|
||||
Subject: [PATCH 334/752] video: da8xx-fb: adding dt support
|
||||
|
||||
Enhancing driver to enable probe triggered by a corresponding dt entry.
|
||||
|
||||
Add da8xx-fb.txt documentation to devicetree section.
|
||||
|
||||
Obtain fb_videomode details for the connected lcd panel using the
|
||||
display timing details present in DT.
|
||||
|
||||
Ensure that platform data is present before checking whether platform
|
||||
callback is present (the one used to control backlight). So far this
|
||||
was not an issue as driver was purely non-DT triggered, but now DT
|
||||
support has been added this check must be performed.
|
||||
|
||||
v2: squashing multiple commits from Afzal Mohammed (afzal@ti.com)
|
||||
v3: remove superfluous cast
|
||||
v4: expose both ti,am3352-lcdc and ti,da830-lcdc for .compatible
|
||||
as driver can use enhanced features of all version of the
|
||||
silicon block.
|
||||
v5: addressed review comments from Prabhakar Lad
|
||||
v6: Changed the .compatible naming to match the existing drm bindings
|
||||
for am33xx devices
|
||||
v7: clarify which compatible to use in the documentation for DA850
|
||||
|
||||
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
|
||||
Signed-off-by: Darren Etheridge <detheridge@ti.com>
|
||||
---
|
||||
.../devicetree/bindings/video/da8xx-fb.txt | 42 +++++++++++++
|
||||
drivers/video/da8xx-fb.c | 66 +++++++++++++++++++-
|
||||
2 files changed, 105 insertions(+), 3 deletions(-)
|
||||
create mode 100644 Documentation/devicetree/bindings/video/da8xx-fb.txt
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/video/da8xx-fb.txt
|
||||
@@ -0,0 +1,42 @@
|
||||
+TI LCD Controller on DA830/DA850/AM335x SoC's
|
||||
+
|
||||
+Required properties:
|
||||
+- compatible:
|
||||
+ DA830, DA850 - "ti,da8xx-tilcdc"
|
||||
+ AM335x SoC's - "ti,am33xx-tilcdc"
|
||||
+- reg: Address range of lcdc register set
|
||||
+- interrupts: lcdc interrupt
|
||||
+- display-timings: typical videomode of lcd panel, represented as child.
|
||||
+ Refer Documentation/devicetree/bindings/video/display-timing.txt for
|
||||
+ display timing binding details. If multiple videomodes are mentioned
|
||||
+ in display timings node, typical videomode has to be mentioned as the
|
||||
+ native mode or it has to be first child (driver cares only for native
|
||||
+ videomode).
|
||||
+
|
||||
+Recommended properties:
|
||||
+- ti,hwmods: Name of the hwmod associated to the LCDC
|
||||
+
|
||||
+Example for am335x SoC's:
|
||||
+
|
||||
+lcdc@4830e000 {
|
||||
+ compatible = "ti,am33xx-tilcdc";
|
||||
+ reg = <0x4830e000 0x1000>;
|
||||
+ interrupts = <36>;
|
||||
+ ti,hwmods = "lcdc";
|
||||
+ status = "okay";
|
||||
+ display-timings {
|
||||
+ 800x480p62 {
|
||||
+ clock-frequency = <30000000>;
|
||||
+ hactive = <800>;
|
||||
+ vactive = <480>;
|
||||
+ hfront-porch = <39>;
|
||||
+ hback-porch = <39>;
|
||||
+ hsync-len = <47>;
|
||||
+ vback-porch = <29>;
|
||||
+ vfront-porch = <13>;
|
||||
+ vsync-len = <2>;
|
||||
+ hsync-active = <1>;
|
||||
+ vsync-active = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/drivers/video/da8xx-fb.c
|
||||
+++ b/drivers/video/da8xx-fb.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/lcm.h>
|
||||
+#include <video/of_display_timing.h>
|
||||
#include <video/da8xx-fb.h>
|
||||
#include <asm/div64.h>
|
||||
|
||||
@@ -1312,12 +1313,54 @@ static struct fb_ops da8xx_fb_ops = {
|
||||
.fb_blank = cfb_blank,
|
||||
};
|
||||
|
||||
+static struct lcd_ctrl_config *da8xx_fb_create_cfg(struct platform_device *dev)
|
||||
+{
|
||||
+ struct lcd_ctrl_config *cfg;
|
||||
+
|
||||
+ cfg = devm_kzalloc(&dev->dev, sizeof(struct fb_videomode), GFP_KERNEL);
|
||||
+ if (!cfg)
|
||||
+ return NULL;
|
||||
+
|
||||
+ /* default values */
|
||||
+
|
||||
+ if (lcd_revision == LCD_VERSION_1)
|
||||
+ cfg->bpp = 16;
|
||||
+ else
|
||||
+ cfg->bpp = 32;
|
||||
+
|
||||
+ /*
|
||||
+ * For panels so far used with this LCDC, below statement is sufficient.
|
||||
+ * For new panels, if required, struct lcd_ctrl_cfg fields to be updated
|
||||
+ * with additional/modified values. Those values would have to be then
|
||||
+ * obtained from dt(requiring new dt bindings).
|
||||
+ */
|
||||
+
|
||||
+ cfg->panel_shade = COLOR_ACTIVE;
|
||||
+
|
||||
+ return cfg;
|
||||
+}
|
||||
+
|
||||
static struct fb_videomode *da8xx_fb_get_videomode(struct platform_device *dev)
|
||||
{
|
||||
struct da8xx_lcdc_platform_data *fb_pdata = dev->dev.platform_data;
|
||||
struct fb_videomode *lcdc_info;
|
||||
+ struct device_node *np = dev->dev.of_node;
|
||||
int i;
|
||||
|
||||
+ if (np) {
|
||||
+ lcdc_info = devm_kzalloc(&dev->dev,
|
||||
+ sizeof(struct fb_videomode),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!lcdc_info)
|
||||
+ return NULL;
|
||||
+
|
||||
+ if (of_get_fb_videomode(np, lcdc_info, OF_USE_NATIVE_MODE)) {
|
||||
+ dev_err(&dev->dev, "timings not available in DT\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ return lcdc_info;
|
||||
+ }
|
||||
+
|
||||
for (i = 0, lcdc_info = known_lcd_panels;
|
||||
i < ARRAY_SIZE(known_lcd_panels); i++, lcdc_info++) {
|
||||
if (strcmp(fb_pdata->type, lcdc_info->name) == 0)
|
||||
@@ -1346,7 +1389,7 @@ static int fb_probe(struct platform_devi
|
||||
int ret;
|
||||
unsigned long ulcm;
|
||||
|
||||
- if (fb_pdata == NULL) {
|
||||
+ if (fb_pdata == NULL && !device->dev.of_node) {
|
||||
dev_err(&device->dev, "Can not get platform data\n");
|
||||
return -ENOENT;
|
||||
}
|
||||
@@ -1386,7 +1429,10 @@ static int fb_probe(struct platform_devi
|
||||
break;
|
||||
}
|
||||
|
||||
- lcd_cfg = (struct lcd_ctrl_config *)fb_pdata->controller_data;
|
||||
+ if (device->dev.of_node)
|
||||
+ lcd_cfg = da8xx_fb_create_cfg(device);
|
||||
+ else
|
||||
+ lcd_cfg = fb_pdata->controller_data;
|
||||
|
||||
if (!lcd_cfg) {
|
||||
ret = -EINVAL;
|
||||
@@ -1405,7 +1451,7 @@ static int fb_probe(struct platform_devi
|
||||
par->dev = &device->dev;
|
||||
par->lcdc_clk = tmp_lcdc_clk;
|
||||
par->lcdc_clk_rate = clk_get_rate(par->lcdc_clk);
|
||||
- if (fb_pdata->panel_power_ctrl) {
|
||||
+ if (fb_pdata && fb_pdata->panel_power_ctrl) {
|
||||
par->panel_power_ctrl = fb_pdata->panel_power_ctrl;
|
||||
par->panel_power_ctrl(1);
|
||||
}
|
||||
@@ -1653,6 +1699,19 @@ static int fb_resume(struct platform_dev
|
||||
#define fb_resume NULL
|
||||
#endif
|
||||
|
||||
+#if IS_ENABLED(CONFIG_OF)
|
||||
+static const struct of_device_id da8xx_fb_of_match[] = {
|
||||
+ /*
|
||||
+ * this driver supports version 1 and version 2 of the
|
||||
+ * Texas Instruments lcd controller (lcdc) hardware block
|
||||
+ */
|
||||
+ {.compatible = "ti,da8xx-tilcdc", },
|
||||
+ {.compatible = "ti,am33xx-tilcdc", },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, da8xx_fb_of_match);
|
||||
+#endif
|
||||
+
|
||||
static struct platform_driver da8xx_fb_driver = {
|
||||
.probe = fb_probe,
|
||||
.remove = fb_remove,
|
||||
@@ -1661,6 +1720,7 @@ static struct platform_driver da8xx_fb_d
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
+ .of_match_table = of_match_ptr(da8xx_fb_of_match),
|
||||
},
|
||||
};
|
||||
|
@ -1,91 +0,0 @@
|
||||
From 9a1a810516ae9cb3259b898b6879901c5b44fa90 Mon Sep 17 00:00:00 2001
|
||||
From: Prathap M S <msprathap@ti.com>
|
||||
Date: Mon, 2 Sep 2013 12:05:23 +0530
|
||||
Subject: [PATCH 343/752] video: da8xx-fb: Add API to register wait for vsync
|
||||
callback
|
||||
|
||||
This patch adds APIs to register and unregister wait for vsync callback.
|
||||
This is derived from commit id 2d44302545da24fd22912d964102bc31a7489e97
|
||||
This commit id was part of 3.2 kernel sources.
|
||||
|
||||
Signed-off-by: Prathap M S <msprathap@ti.com>
|
||||
---
|
||||
drivers/video/da8xx-fb.c | 33 +++++++++++++++++++++++++++++++++
|
||||
include/video/da8xx-fb.h | 4 ++++
|
||||
2 files changed, 37 insertions(+)
|
||||
|
||||
--- a/drivers/video/da8xx-fb.c
|
||||
+++ b/drivers/video/da8xx-fb.c
|
||||
@@ -198,6 +198,9 @@ static struct fb_fix_screeninfo da8xx_fb
|
||||
.accel = FB_ACCEL_NONE
|
||||
};
|
||||
|
||||
+static vsync_callback_t vsync_cb_handler;
|
||||
+static void *vsync_cb_arg;
|
||||
+
|
||||
static struct fb_videomode known_lcd_panels[] = {
|
||||
/* Sharp LCD035Q3DG01 */
|
||||
[0] = {
|
||||
@@ -826,6 +829,32 @@ static int lcd_init(struct da8xx_fb_par
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int register_vsync_cb(vsync_callback_t handler, void *arg, int idx)
|
||||
+{
|
||||
+ if ((vsync_cb_handler == NULL) && (vsync_cb_arg == NULL)) {
|
||||
+ vsync_cb_arg = arg;
|
||||
+ vsync_cb_handler = handler;
|
||||
+ } else {
|
||||
+ return -EEXIST;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL(register_vsync_cb);
|
||||
+
|
||||
+int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx)
|
||||
+{
|
||||
+ if ((vsync_cb_handler == handler) && (vsync_cb_arg == arg)) {
|
||||
+ vsync_cb_handler = NULL;
|
||||
+ vsync_cb_arg = NULL;
|
||||
+ } else {
|
||||
+ return -ENXIO;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL(unregister_vsync_cb);
|
||||
+
|
||||
/* IRQ handler for version 2 of LCDC */
|
||||
static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
|
||||
{
|
||||
@@ -863,6 +892,8 @@ static irqreturn_t lcdc_irq_handler_rev0
|
||||
LCD_DMA_FRM_BUF_CEILING_ADDR_0_REG);
|
||||
par->vsync_flag = 1;
|
||||
wake_up_interruptible(&par->vsync_wait);
|
||||
+ if (vsync_cb_handler)
|
||||
+ vsync_cb_handler(vsync_cb_arg);
|
||||
}
|
||||
|
||||
if (stat & LCD_END_OF_FRAME1) {
|
||||
@@ -938,6 +969,8 @@ static irqreturn_t lcdc_irq_handler_rev0
|
||||
LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG);
|
||||
par->vsync_flag = 1;
|
||||
wake_up_interruptible(&par->vsync_wait);
|
||||
+ if (vsync_cb_handler)
|
||||
+ vsync_cb_handler(vsync_cb_arg);
|
||||
}
|
||||
}
|
||||
|
||||
--- a/include/video/da8xx-fb.h
|
||||
+++ b/include/video/da8xx-fb.h
|
||||
@@ -91,5 +91,9 @@ struct lcd_sync_arg {
|
||||
/* Proprietary FB_SYNC_ flags */
|
||||
#define FB_SYNC_CLK_INVERT 0x40000000
|
||||
|
||||
+typedef void (*vsync_callback_t)(void *arg);
|
||||
+int register_vsync_cb(vsync_callback_t handler, void *arg, int idx);
|
||||
+int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx);
|
||||
+
|
||||
#endif /* ifndef DA8XX_FB_H */
|
||||
|
@ -1,38 +0,0 @@
|
||||
From c99bd415829ef29adf71bb1e1b577650f10e93f5 Mon Sep 17 00:00:00 2001
|
||||
From: Darren Etheridge <detheridge@ti.com>
|
||||
Date: Mon, 4 Nov 2013 12:27:40 -0600
|
||||
Subject: [PATCH 752/752] video/da8xx-fb fix defect with vsync callback
|
||||
invocation
|
||||
|
||||
Fix defect where SGX is running at half of the expected framerate.
|
||||
The original patch (@ commit ID 9a1a810516ae9cb3259b898b6879901c5b44fa90)
|
||||
seems to have a mistake where it only calls the callback
|
||||
for the even or the odd frames depending on the revision of the LCD controller
|
||||
This patch corrects this and invokes the callback for both odd and even frame
|
||||
for just the Rev02 version of the LCDC (won't find an SGX GPU on a Rev01).
|
||||
|
||||
Signed-off-by: Darren Etheridge <detheridge@ti.com>
|
||||
---
|
||||
drivers/video/da8xx-fb.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/video/da8xx-fb.c
|
||||
+++ b/drivers/video/da8xx-fb.c
|
||||
@@ -904,6 +904,8 @@ static irqreturn_t lcdc_irq_handler_rev0
|
||||
LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG);
|
||||
par->vsync_flag = 1;
|
||||
wake_up_interruptible(&par->vsync_wait);
|
||||
+ if (vsync_cb_handler)
|
||||
+ vsync_cb_handler(vsync_cb_arg);
|
||||
}
|
||||
|
||||
/* Set only when controller is disabled and at the end of
|
||||
@@ -969,8 +971,6 @@ static irqreturn_t lcdc_irq_handler_rev0
|
||||
LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG);
|
||||
par->vsync_flag = 1;
|
||||
wake_up_interruptible(&par->vsync_wait);
|
||||
- if (vsync_cb_handler)
|
||||
- vsync_cb_handler(vsync_cb_arg);
|
||||
}
|
||||
}
|
||||
|
@ -1,36 +0,0 @@
|
||||
Adds AM33XX EDMA support to the am33xx.dtsi as documented in
|
||||
Documentation/devicetree/bindings/dma/ti-edma.txt
|
||||
|
||||
[Joel Fernandes <joelf@ti.com>]
|
||||
Drop DT entries that are non-hardware-description as discussed in [1]
|
||||
|
||||
[1] https://patchwork.kernel.org/patch/2226761/
|
||||
|
||||
Signed-off-by: Matt Porter <mporter@ti.com>
|
||||
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/am33xx.dtsi | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -100,6 +100,18 @@
|
||||
reg = <0x48200000 0x1000>;
|
||||
};
|
||||
|
||||
+ edma: edma@49000000 {
|
||||
+ compatible = "ti,edma3";
|
||||
+ ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
|
||||
+ reg = <0x49000000 0x10000>,
|
||||
+ <0x44e10f90 0x10>;
|
||||
+ interrupts = <12 13 14>;
|
||||
+ #dma-cells = <1>;
|
||||
+ dma-channels = <64>;
|
||||
+ ti,edma-regions = <4>;
|
||||
+ ti,edma-slots = <256>;
|
||||
+ };
|
||||
+
|
||||
gpio0: gpio@44e07000 {
|
||||
compatible = "ti,omap4-gpio";
|
||||
ti,hwmods = "gpio1";
|
@ -1,35 +0,0 @@
|
||||
Adds DMA resources to the AM33XX SPI nodes.
|
||||
|
||||
Signed-off-by: Matt Porter <mporter@ti.com>
|
||||
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/am33xx.dtsi | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -335,6 +335,11 @@
|
||||
interrupts = <65>;
|
||||
ti,spi-num-cs = <2>;
|
||||
ti,hwmods = "spi0";
|
||||
+ dmas = <&edma 16
|
||||
+ &edma 17
|
||||
+ &edma 18
|
||||
+ &edma 19>;
|
||||
+ dma-names = "tx0", "rx0", "tx1", "rx1";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -346,6 +351,11 @@
|
||||
interrupts = <125>;
|
||||
ti,spi-num-cs = <2>;
|
||||
ti,hwmods = "spi1";
|
||||
+ dmas = <&edma 42
|
||||
+ &edma 43
|
||||
+ &edma 44
|
||||
+ &edma 45>;
|
||||
+ dma-names = "tx0", "rx0", "tx1", "rx1";
|
||||
status = "disabled";
|
||||
};
|
||||
|
@ -1,166 +0,0 @@
|
||||
Adds AM33XX MMC support for am335x-bone, am335x-evm and am335x-evmsk boards.
|
||||
|
||||
Also added is the DMA binding definitions based on the generic DMA request
|
||||
binding.
|
||||
|
||||
Additional changes made to DTS:
|
||||
* Interrupt, reg and compatible properties added
|
||||
* ti,needs-special-hs-handling added
|
||||
|
||||
Signed-off-by: Matt Porter <mporter@ti.com>
|
||||
Acked-by: Tony Lindgren <tony@atomide.com>
|
||||
Signed-off-by: Joel Fernandes <joelf@ti.com>
|
||||
|
||||
---
|
||||
.../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 26 ++++++++++++++-
|
||||
arch/arm/boot/dts/am335x-bone.dts | 11 +++++++
|
||||
arch/arm/boot/dts/am335x-evm.dts | 7 ++++
|
||||
arch/arm/boot/dts/am335x-evmsk.dts | 7 ++++
|
||||
arch/arm/boot/dts/am33xx.dtsi | 38 ++++++++++++++++++++++
|
||||
5 files changed, 88 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
|
||||
+++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
|
||||
@@ -20,8 +20,29 @@ ti,dual-volt: boolean, supports dual vol
|
||||
ti,non-removable: non-removable slot (like eMMC)
|
||||
ti,needs-special-reset: Requires a special softreset sequence
|
||||
ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed
|
||||
+dmas: List of DMA specifiers with the controller specific format
|
||||
+as described in the generic DMA client binding. A tx and rx
|
||||
+specifier is required.
|
||||
+dma-names: List of DMA request names. These strings correspond
|
||||
+1:1 with the DMA specifiers listed in dmas. The string naming is
|
||||
+to be "rx" and "tx" for RX and TX DMA requests, respectively.
|
||||
+
|
||||
+Examples:
|
||||
+
|
||||
+[hwmod populated DMA resources]
|
||||
+
|
||||
+ mmc1: mmc@0x4809c000 {
|
||||
+ compatible = "ti,omap4-hsmmc";
|
||||
+ reg = <0x4809c000 0x400>;
|
||||
+ ti,hwmods = "mmc1";
|
||||
+ ti,dual-volt;
|
||||
+ bus-width = <4>;
|
||||
+ vmmc-supply = <&vmmc>; /* phandle to regulator node */
|
||||
+ ti,non-removable;
|
||||
+ };
|
||||
+
|
||||
+[generic DMA request binding]
|
||||
|
||||
-Example:
|
||||
mmc1: mmc@0x4809c000 {
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
reg = <0x4809c000 0x400>;
|
||||
@@ -30,4 +51,7 @@ Example:
|
||||
bus-width = <4>;
|
||||
vmmc-supply = <&vmmc>; /* phandle to regulator node */
|
||||
ti,non-removable;
|
||||
+ dmas = <&edma 24
|
||||
+ &edma 25>;
|
||||
+ dma-names = "tx", "rx";
|
||||
};
|
||||
--- a/arch/arm/boot/dts/am335x-bone.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-bone.dts
|
||||
@@ -9,3 +9,14 @@
|
||||
|
||||
#include "am33xx.dtsi"
|
||||
#include "am335x-bone-common.dtsi"
|
||||
+
|
||||
+&ldo3_reg {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+};
|
||||
+
|
||||
+&mmc1 {
|
||||
+ status = "okay";
|
||||
+ vmmc-supply = <&ldo3_reg>;
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/am335x-evm.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evm.dts
|
||||
@@ -477,6 +477,8 @@
|
||||
};
|
||||
|
||||
vmmc_reg: regulator@12 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
@@ -517,3 +519,8 @@
|
||||
ti,adc-channels = <4 5 6 7>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+&mmc1 {
|
||||
+ status = "okay";
|
||||
+ vmmc-supply = <&vmmc_reg>;
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
@@ -393,6 +393,8 @@
|
||||
};
|
||||
|
||||
vmmc_reg: regulator@12 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
@@ -419,3 +421,8 @@
|
||||
phy_id = <&davinci_mdio>, <1>;
|
||||
phy-mode = "rgmii-txid";
|
||||
};
|
||||
+
|
||||
+&mmc1 {
|
||||
+ status = "okay";
|
||||
+ vmmc-supply = <&vmmc_reg>;
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -240,6 +240,44 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ mmc1: mmc@48060000 {
|
||||
+ compatible = "ti,omap4-hsmmc";
|
||||
+ ti,hwmods = "mmc1";
|
||||
+ ti,dual-volt;
|
||||
+ ti,needs-special-reset;
|
||||
+ ti,needs-special-hs-handling;
|
||||
+ dmas = <&edma 24
|
||||
+ &edma 25>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ interrupts = <64>;
|
||||
+ interrupt-parent = <&intc>;
|
||||
+ reg = <0x48060000 0x1000>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ mmc2: mmc@481d8000 {
|
||||
+ compatible = "ti,omap4-hsmmc";
|
||||
+ ti,hwmods = "mmc2";
|
||||
+ ti,needs-special-reset;
|
||||
+ dmas = <&edma 2
|
||||
+ &edma 3>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ interrupts = <28>;
|
||||
+ interrupt-parent = <&intc>;
|
||||
+ reg = <0x481d8000 0x1000>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ mmc3: mmc@47810000 {
|
||||
+ compatible = "ti,omap4-hsmmc";
|
||||
+ ti,hwmods = "mmc3";
|
||||
+ ti,needs-special-reset;
|
||||
+ interrupts = <29>;
|
||||
+ interrupt-parent = <&intc>;
|
||||
+ reg = <0x47810000 0x1000>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
wdt2: wdt@44e35000 {
|
||||
compatible = "ti,omap3-wdt";
|
||||
ti,hwmods = "wd_timer2";
|
@ -1,159 +0,0 @@
|
||||
For modules/IPs/hwmods which do not have
|
||||
-1- sys->class->reset()
|
||||
and
|
||||
-2- hardreset lines
|
||||
and
|
||||
-3- No way to do an ocp reset (no sysc control)
|
||||
the flag 'HWMOD_INIT_NO_RESET' is not much useful.
|
||||
|
||||
Cleanup all such instances across various hwmod data files.
|
||||
|
||||
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 18 +++++++++---------
|
||||
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 6 +++---
|
||||
arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 6 +++---
|
||||
3 files changed, 15 insertions(+), 15 deletions(-)
|
||||
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
|
||||
@@ -52,7 +52,7 @@ static struct omap_hwmod am33xx_emif_hwm
|
||||
.name = "emif",
|
||||
.class = &am33xx_emif_hwmod_class,
|
||||
.clkdm_name = "l3_clkdm",
|
||||
- .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "dpll_ddr_m2_div2_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -74,7 +74,7 @@ static struct omap_hwmod am33xx_l3_main_
|
||||
.name = "l3_main",
|
||||
.class = &am33xx_l3_hwmod_class,
|
||||
.clkdm_name = "l3_clkdm",
|
||||
- .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "l3_gclk",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -96,7 +96,7 @@ static struct omap_hwmod am33xx_l3_instr
|
||||
.name = "l3_instr",
|
||||
.class = &am33xx_l3_hwmod_class,
|
||||
.clkdm_name = "l3_clkdm",
|
||||
- .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "l3_gclk",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -119,7 +119,7 @@ static struct omap_hwmod am33xx_l4_ls_hw
|
||||
.name = "l4_ls",
|
||||
.class = &am33xx_l4_hwmod_class,
|
||||
.clkdm_name = "l4ls_clkdm",
|
||||
- .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "l4ls_gclk",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -134,7 +134,7 @@ static struct omap_hwmod am33xx_l4_hs_hw
|
||||
.name = "l4_hs",
|
||||
.class = &am33xx_l4_hwmod_class,
|
||||
.clkdm_name = "l4hs_clkdm",
|
||||
- .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "l4hs_gclk",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -150,7 +150,7 @@ static struct omap_hwmod am33xx_l4_wkup_
|
||||
.name = "l4_wkup",
|
||||
.class = &am33xx_l4_hwmod_class,
|
||||
.clkdm_name = "l4_wkup_clkdm",
|
||||
- .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_offs = AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
|
||||
@@ -170,7 +170,7 @@ static struct omap_hwmod am33xx_mpu_hwmo
|
||||
.name = "mpu",
|
||||
.class = &am33xx_mpu_hwmod_class,
|
||||
.clkdm_name = "mpu_clkdm",
|
||||
- .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "dpll_mpu_m2_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -450,7 +450,7 @@ static struct omap_hwmod am33xx_ocmcram_
|
||||
.name = "ocmcram",
|
||||
.class = &am33xx_ocmcram_hwmod_class,
|
||||
.clkdm_name = "l3_clkdm",
|
||||
- .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "l3_gclk",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -532,7 +532,7 @@ static struct omap_hwmod am33xx_control_
|
||||
.name = "control",
|
||||
.class = &am33xx_control_hwmod_class,
|
||||
.clkdm_name = "l4_wkup_clkdm",
|
||||
- .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "dpll_core_m4_div2_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
@@ -914,7 +914,7 @@ static struct omap_hwmod omap44xx_emif1_
|
||||
.name = "emif1",
|
||||
.class = &omap44xx_emif_hwmod_class,
|
||||
.clkdm_name = "l3_emif_clkdm",
|
||||
- .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "ddrphy_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -930,7 +930,7 @@ static struct omap_hwmod omap44xx_emif2_
|
||||
.name = "emif2",
|
||||
.class = &omap44xx_emif_hwmod_class,
|
||||
.clkdm_name = "l3_emif_clkdm",
|
||||
- .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "ddrphy_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -2193,7 +2193,7 @@ static struct omap_hwmod omap44xx_mpu_hw
|
||||
.name = "mpu",
|
||||
.class = &omap44xx_mpu_hwmod_class,
|
||||
.clkdm_name = "mpuss_clkdm",
|
||||
- .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "dpll_mpu_m2_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
|
||||
@@ -352,7 +352,7 @@ static struct omap_hwmod omap54xx_emif1_
|
||||
.name = "emif1",
|
||||
.class = &omap54xx_emif_hwmod_class,
|
||||
.clkdm_name = "emif_clkdm",
|
||||
- .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "dpll_core_h11x2_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -368,7 +368,7 @@ static struct omap_hwmod omap54xx_emif2_
|
||||
.name = "emif2",
|
||||
.class = &omap54xx_emif_hwmod_class,
|
||||
.clkdm_name = "emif_clkdm",
|
||||
- .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "dpll_core_h11x2_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -1135,7 +1135,7 @@ static struct omap_hwmod omap54xx_mpu_hw
|
||||
.name = "mpu",
|
||||
.class = &omap54xx_mpu_hwmod_class,
|
||||
.clkdm_name = "mpu_clkdm",
|
||||
- .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
|
||||
+ .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "dpll_mpu_m2_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
@ -1,97 +0,0 @@
|
||||
On OMAP we have co-processor IPs, memory controllers,
|
||||
GPIOs which control regulators and power switches to
|
||||
PMIC, and SoC internal Bus IPs, some or most of which
|
||||
should either not be reset or idled or both at init.
|
||||
(In some cases there are erratas which prevent an IP
|
||||
from being reset)
|
||||
Have a way to pass this information from DT.
|
||||
|
||||
Update the am33xx/omap4 and omap5 dtsi files with the
|
||||
new bindings for modules which either should not be
|
||||
idled. reset or both. A later patch would cleanup the
|
||||
same information that exists today as part of the hwmod
|
||||
data files.
|
||||
|
||||
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
|
||||
|
||||
---
|
||||
.../devicetree/bindings/arm/omap/omap.txt | 3 ++-
|
||||
arch/arm/boot/dts/am33xx.dtsi | 2 ++
|
||||
arch/arm/boot/dts/omap4.dtsi | 3 +++
|
||||
arch/arm/boot/dts/omap5.dtsi | 2 ++
|
||||
4 files changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
|
||||
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
|
||||
@@ -21,7 +21,8 @@ Required properties:
|
||||
Optional properties:
|
||||
- ti,no_idle_on_suspend: When present, it prevents the PM to idle the module
|
||||
during suspend.
|
||||
-
|
||||
+- ti,no-reset-on-init: When present, the module should not be reset at init
|
||||
+- ti,no-idle-on-init: When present, the module should not be idled at init
|
||||
|
||||
Example:
|
||||
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -667,6 +667,7 @@
|
||||
reg = <0x44d00000 0x4000 /* M3 UMEM */
|
||||
0x44d80000 0x2000>; /* M3 DMEM */
|
||||
ti,hwmods = "wkup_m3";
|
||||
+ ti,no-reset-on-init;
|
||||
};
|
||||
|
||||
elm: elm@48080000 {
|
||||
@@ -697,6 +698,7 @@
|
||||
gpmc: gpmc@50000000 {
|
||||
compatible = "ti,am3352-gpmc";
|
||||
ti,hwmods = "gpmc";
|
||||
+ ti,no-idle-on-init;
|
||||
reg = <0x50000000 0x2000>;
|
||||
interrupts = <100>;
|
||||
gpmc,num-cs = <7>;
|
||||
--- a/arch/arm/boot/dts/omap4.dtsi
|
||||
+++ b/arch/arm/boot/dts/omap4.dtsi
|
||||
@@ -214,6 +214,7 @@
|
||||
gpmc,num-cs = <8>;
|
||||
gpmc,num-waitpins = <4>;
|
||||
ti,hwmods = "gpmc";
|
||||
+ ti,no-idle-on-init;
|
||||
};
|
||||
|
||||
uart1: serial@4806a000 {
|
||||
@@ -492,6 +493,7 @@
|
||||
reg = <0x4c000000 0x100>;
|
||||
interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ti,hwmods = "emif1";
|
||||
+ ti,no-idle-on-init;
|
||||
phy-type = <1>;
|
||||
hw-caps-read-idle-ctrl;
|
||||
hw-caps-ll-interface;
|
||||
@@ -503,6 +505,7 @@
|
||||
reg = <0x4d000000 0x100>;
|
||||
interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
|
||||
ti,hwmods = "emif2";
|
||||
+ ti,no-idle-on-init;
|
||||
phy-type = <1>;
|
||||
hw-caps-read-idle-ctrl;
|
||||
hw-caps-ll-interface;
|
||||
--- a/arch/arm/boot/dts/omap5.dtsi
|
||||
+++ b/arch/arm/boot/dts/omap5.dtsi
|
||||
@@ -607,6 +607,7 @@
|
||||
emif1: emif@0x4c000000 {
|
||||
compatible = "ti,emif-4d5";
|
||||
ti,hwmods = "emif1";
|
||||
+ ti,no-idle-on-init;
|
||||
phy-type = <2>; /* DDR PHY type: Intelli PHY */
|
||||
reg = <0x4c000000 0x400>;
|
||||
interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
|
||||
@@ -618,6 +619,7 @@
|
||||
emif2: emif@0x4d000000 {
|
||||
compatible = "ti,emif-4d5";
|
||||
ti,hwmods = "emif2";
|
||||
+ ti,no-idle-on-init;
|
||||
phy-type = <2>; /* DDR PHY type: Intelli PHY */
|
||||
reg = <0x4d000000 0x400>;
|
||||
interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
|
@ -1,85 +0,0 @@
|
||||
From f92d9597f781f6a5a39c73dc71604bd8a21c5299 Mon Sep 17 00:00:00 2001
|
||||
From: Rajendra Nayak <rnayak@ti.com>
|
||||
Date: Wed, 09 Oct 2013 07:26:55 +0000
|
||||
Subject: ARM: OMAP2+: hwmod: Extract no-idle and no-reset info from DT
|
||||
|
||||
Now that we have DT bindings to specify which devices should not
|
||||
be reset and idled during init, make hwmod extract the information
|
||||
(and store them in internal flags) from Device tree.
|
||||
|
||||
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
|
||||
[paul@pwsan.com: updated to apply]
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
|
||||
---
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
@@ -2393,6 +2393,8 @@ static struct device_node *of_dev_hwmod_
|
||||
/**
|
||||
* _init_mpu_rt_base - populate the virtual address for a hwmod
|
||||
* @oh: struct omap_hwmod * to locate the virtual address
|
||||
+ * @data: (unused, caller should pass NULL)
|
||||
+ * @np: struct device_node * of the IP block's device node in the DT data
|
||||
*
|
||||
* Cache the virtual address used by the MPU to access this IP block's
|
||||
* registers. This address is needed early so the OCP registers that
|
||||
@@ -2401,11 +2403,11 @@ static struct device_node *of_dev_hwmod_
|
||||
* Returns 0 on success, -EINVAL if an invalid hwmod is passed, and
|
||||
* -ENXIO on absent or invalid register target address space.
|
||||
*/
|
||||
-static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
|
||||
+static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data,
|
||||
+ struct device_node *np)
|
||||
{
|
||||
struct omap_hwmod_addr_space *mem;
|
||||
void __iomem *va_start = NULL;
|
||||
- struct device_node *np;
|
||||
|
||||
if (!oh)
|
||||
return -EINVAL;
|
||||
@@ -2421,12 +2423,10 @@ static int __init _init_mpu_rt_base(stru
|
||||
oh->name);
|
||||
|
||||
/* Extract the IO space from device tree blob */
|
||||
- if (!of_have_populated_dt())
|
||||
+ if (!np)
|
||||
return -ENXIO;
|
||||
|
||||
- np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh);
|
||||
- if (np)
|
||||
- va_start = of_iomap(np, oh->mpu_rt_idx);
|
||||
+ va_start = of_iomap(np, oh->mpu_rt_idx);
|
||||
} else {
|
||||
va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
|
||||
}
|
||||
@@ -2459,12 +2459,16 @@ static int __init _init_mpu_rt_base(stru
|
||||
static int __init _init(struct omap_hwmod *oh, void *data)
|
||||
{
|
||||
int r;
|
||||
+ struct device_node *np = NULL;
|
||||
|
||||
if (oh->_state != _HWMOD_STATE_REGISTERED)
|
||||
return 0;
|
||||
|
||||
+ if (of_have_populated_dt())
|
||||
+ np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh);
|
||||
+
|
||||
if (oh->class->sysc) {
|
||||
- r = _init_mpu_rt_base(oh, NULL);
|
||||
+ r = _init_mpu_rt_base(oh, NULL, np);
|
||||
if (r < 0) {
|
||||
WARN(1, "omap_hwmod: %s: doesn't have mpu register target base\n",
|
||||
oh->name);
|
||||
@@ -2478,6 +2482,12 @@ static int __init _init(struct omap_hwmo
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ if (np)
|
||||
+ if (of_find_property(np, "ti,no-reset-on-init", NULL))
|
||||
+ oh->flags |= HWMOD_INIT_NO_RESET;
|
||||
+ if (of_find_property(np, "ti,no-idle-on-init", NULL))
|
||||
+ oh->flags |= HWMOD_INIT_NO_IDLE;
|
||||
+
|
||||
oh->_state = _HWMOD_STATE_INITIALIZED;
|
||||
|
||||
return 0;
|
@ -1,86 +0,0 @@
|
||||
With DT bindings to specify which devices should not be idled and reset
|
||||
at init being in place, and the corresponding dtsi files for am33xx/omap4
|
||||
and omap5 updated using those bindings, we can now clean up hwmod internal
|
||||
flags for HWMOD_INIT_NO_RESET and HWMOD_INIT_NO_IDLE which were infact used
|
||||
to specify the exact same information.
|
||||
|
||||
For GPMC, the HWMOD_INIT_NO_RESET flag seems to be added in hwmod not due to
|
||||
any errata around the GPMC IP, but rather because any timings
|
||||
set by the bootloader are not being correctly programmed by the kernel.
|
||||
This seems like something that needs to be fixed as part of GPMC driver
|
||||
in the kernel, and hence the flag is left as is in hwmod, which can be
|
||||
removed once the driver does what its expected to.
|
||||
|
||||
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
|
||||
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 4 ++--
|
||||
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 4 +---
|
||||
arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 2 --
|
||||
3 files changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
|
||||
@@ -198,7 +198,7 @@ static struct omap_hwmod am33xx_wkup_m3_
|
||||
.class = &am33xx_wkup_m3_hwmod_class,
|
||||
.clkdm_name = "l4_wkup_aon_clkdm",
|
||||
/* Keep hardreset asserted */
|
||||
- .flags = HWMOD_INIT_NO_RESET | HWMOD_NO_IDLEST,
|
||||
+ .flags = HWMOD_NO_IDLEST,
|
||||
.main_clk = "dpll_core_m4_div2_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -932,7 +932,7 @@ static struct omap_hwmod am33xx_gpmc_hwm
|
||||
.name = "gpmc",
|
||||
.class = &am33xx_gpmc_hwmod_class,
|
||||
.clkdm_name = "l3s_clkdm",
|
||||
- .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
|
||||
+ .flags = HWMOD_INIT_NO_RESET,
|
||||
.main_clk = "l3s_gclk",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
@@ -914,7 +914,6 @@ static struct omap_hwmod omap44xx_emif1_
|
||||
.name = "emif1",
|
||||
.class = &omap44xx_emif_hwmod_class,
|
||||
.clkdm_name = "l3_emif_clkdm",
|
||||
- .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "ddrphy_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -930,7 +929,6 @@ static struct omap_hwmod omap44xx_emif2_
|
||||
.name = "emif2",
|
||||
.class = &omap44xx_emif_hwmod_class,
|
||||
.clkdm_name = "l3_emif_clkdm",
|
||||
- .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "ddrphy_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -1184,7 +1182,7 @@ static struct omap_hwmod omap44xx_gpmc_h
|
||||
* the kernel from the board file or DT data.
|
||||
* HWMOD_INIT_NO_RESET should be removed ASAP.
|
||||
*/
|
||||
- .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
|
||||
+ .flags = HWMOD_INIT_NO_RESET,
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_offs = OMAP4_CM_L3_2_GPMC_CLKCTRL_OFFSET,
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
|
||||
@@ -352,7 +352,6 @@ static struct omap_hwmod omap54xx_emif1_
|
||||
.name = "emif1",
|
||||
.class = &omap54xx_emif_hwmod_class,
|
||||
.clkdm_name = "emif_clkdm",
|
||||
- .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "dpll_core_h11x2_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
@@ -368,7 +367,6 @@ static struct omap_hwmod omap54xx_emif2_
|
||||
.name = "emif2",
|
||||
.class = &omap54xx_emif_hwmod_class,
|
||||
.clkdm_name = "emif_clkdm",
|
||||
- .flags = HWMOD_INIT_NO_IDLE,
|
||||
.main_clk = "dpll_core_h11x2_ck",
|
||||
.prcm = {
|
||||
.omap4 = {
|
@ -1,22 +0,0 @@
|
||||
Do not reset GPIO0 at boot-up because GPIO0 is used
|
||||
on AM335x EVM-SK to control VTT regulators on DDR3.
|
||||
|
||||
Without this EVM-SK boards fail to boot-up because
|
||||
of DDR3 corruption.
|
||||
|
||||
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/am335x-evmsk.dts | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
@@ -426,3 +426,7 @@
|
||||
status = "okay";
|
||||
vmmc-supply = <&vmmc_reg>;
|
||||
};
|
||||
+
|
||||
+&gpio0 {
|
||||
+ ti,no-reset-on-init;
|
||||
+};
|
@ -1,97 +0,0 @@
|
||||
Add the generic AM33XX SHAM module's device tree data and
|
||||
enable it for the am335x-evm, am335x-evmsk, and am335x-bone
|
||||
platforms. Also add Documentation file describing the data
|
||||
for the SHAM module.
|
||||
|
||||
[joelf@ti.com: Dropped interrupt-parrent property, documentation fixups]
|
||||
CC: Paul Walmsley <paul@pwsan.com>
|
||||
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
|
||||
Acked-by: Mark Rutland <mark.rutland@arm.com>
|
||||
|
||||
---
|
||||
.../devicetree/bindings/crypto/omap-sham.txt | 28 ++++++++++++++++++++++
|
||||
arch/arm/boot/dts/am335x-bone.dts | 4 ++++
|
||||
arch/arm/boot/dts/am335x-evm.dts | 4 ++++
|
||||
arch/arm/boot/dts/am335x-evmsk.dts | 4 ++++
|
||||
arch/arm/boot/dts/am33xx.dtsi | 9 +++++++
|
||||
5 files changed, 49 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/crypto/omap-sham.txt
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/crypto/omap-sham.txt
|
||||
@@ -0,0 +1,28 @@
|
||||
+OMAP SoC SHA crypto Module
|
||||
+
|
||||
+Required properties:
|
||||
+
|
||||
+- compatible : Should contain entries for this and backward compatible
|
||||
+ SHAM versions:
|
||||
+ - "ti,omap2-sham" for OMAP2 & OMAP3.
|
||||
+ - "ti,omap4-sham" for OMAP4 and AM33XX.
|
||||
+ Note that these two versions are incompatible.
|
||||
+- ti,hwmods: Name of the hwmod associated with the SHAM module
|
||||
+- reg : Offset and length of the register set for the module
|
||||
+- interrupts : the interrupt-specifier for the SHAM module.
|
||||
+
|
||||
+Optional properties:
|
||||
+- dmas: DMA specifiers for the rx dma. See the DMA client binding,
|
||||
+ Documentation/devicetree/bindings/dma/dma.txt
|
||||
+- dma-names: DMA request name. Should be "rx" if a dma is present.
|
||||
+
|
||||
+Example:
|
||||
+ /* AM335x */
|
||||
+ sham: sham@53100000 {
|
||||
+ compatible = "ti,omap4-sham";
|
||||
+ ti,hwmods = "sham";
|
||||
+ reg = <0x53100000 0x200>;
|
||||
+ interrupts = <109>;
|
||||
+ dmas = <&edma 36>;
|
||||
+ dma-names = "rx";
|
||||
+ };
|
||||
--- a/arch/arm/boot/dts/am335x-bone.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-bone.dts
|
||||
@@ -20,3 +20,7 @@
|
||||
status = "okay";
|
||||
vmmc-supply = <&ldo3_reg>;
|
||||
};
|
||||
+
|
||||
+&sham {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/am335x-evm.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evm.dts
|
||||
@@ -524,3 +524,7 @@
|
||||
status = "okay";
|
||||
vmmc-supply = <&vmmc_reg>;
|
||||
};
|
||||
+
|
||||
+&sham {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
@@ -430,3 +430,7 @@
|
||||
&gpio0 {
|
||||
ti,no-reset-on-init;
|
||||
};
|
||||
+
|
||||
+&sham {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -707,5 +707,14 @@
|
||||
#size-cells = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ sham: sham@53100000 {
|
||||
+ compatible = "ti,omap4-sham";
|
||||
+ ti,hwmods = "sham";
|
||||
+ reg = <0x53100000 0x200>;
|
||||
+ interrupts = <109>;
|
||||
+ dmas = <&edma 36>;
|
||||
+ dma-names = "rx";
|
||||
+ };
|
||||
};
|
||||
};
|
@ -1,101 +0,0 @@
|
||||
Add the generic AM33XX AES module's device tree data and
|
||||
enable it for the am335x-evm, am335x-evmsk, and am335x-bone
|
||||
platforms. Also add Documentation file describing the data
|
||||
for the AES module.
|
||||
|
||||
[joelf@ti.com: Dropped interrupt-parent propert, documentation fixups]
|
||||
|
||||
CC: Paul Walmsley <paul@pwsan.com>
|
||||
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
|
||||
|
||||
---
|
||||
.../devicetree/bindings/crypto/omap-aes.txt | 31 ++++++++++++++++++++++
|
||||
arch/arm/boot/dts/am335x-bone.dts | 4 +++
|
||||
arch/arm/boot/dts/am335x-evm.dts | 4 +++
|
||||
arch/arm/boot/dts/am335x-evmsk.dts | 4 +++
|
||||
arch/arm/boot/dts/am33xx.dtsi | 10 +++++++
|
||||
5 files changed, 53 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/crypto/omap-aes.txt
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/crypto/omap-aes.txt
|
||||
@@ -0,0 +1,31 @@
|
||||
+OMAP SoC AES crypto Module
|
||||
+
|
||||
+Required properties:
|
||||
+
|
||||
+- compatible : Should contain entries for this and backward compatible
|
||||
+ AES versions:
|
||||
+ - "ti,omap2-aes" for OMAP2.
|
||||
+ - "ti,omap3-aes" for OMAP3.
|
||||
+ - "ti,omap4-aes" for OMAP4 and AM33XX.
|
||||
+ Note that the OMAP2 and 3 versions are compatible (OMAP3 supports
|
||||
+ more algorithms) but they are incompatible with OMAP4.
|
||||
+- ti,hwmods: Name of the hwmod associated with the AES module
|
||||
+- reg : Offset and length of the register set for the module
|
||||
+- interrupts : the interrupt-specifier for the AES module.
|
||||
+
|
||||
+Optional properties:
|
||||
+- dmas: DMA specifiers for tx and rx dma. See the DMA client binding,
|
||||
+ Documentation/devicetree/bindings/dma/dma.txt
|
||||
+- dma-names: DMA request names should include "tx" and "rx" if present.
|
||||
+
|
||||
+Example:
|
||||
+ /* AM335x */
|
||||
+ aes: aes@53500000 {
|
||||
+ compatible = "ti,omap4-aes";
|
||||
+ ti,hwmods = "aes";
|
||||
+ reg = <0x53500000 0xa0>;
|
||||
+ interrupts = <102>;
|
||||
+ dmas = <&edma 6>,
|
||||
+ <&edma 5>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ };
|
||||
--- a/arch/arm/boot/dts/am335x-bone.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-bone.dts
|
||||
@@ -24,3 +24,7 @@
|
||||
&sham {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&aes {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/am335x-evm.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evm.dts
|
||||
@@ -528,3 +528,7 @@
|
||||
&sham {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&aes {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
@@ -434,3 +434,7 @@
|
||||
&sham {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&aes {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -716,5 +716,15 @@
|
||||
dmas = <&edma 36>;
|
||||
dma-names = "rx";
|
||||
};
|
||||
+
|
||||
+ aes: aes@53500000 {
|
||||
+ compatible = "ti,omap4-aes";
|
||||
+ ti,hwmods = "aes";
|
||||
+ reg = <0x53500000 0xa0>;
|
||||
+ interrupts = <102>;
|
||||
+ dmas = <&edma 6>,
|
||||
+ <&edma 5>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ };
|
||||
};
|
||||
};
|
@ -1,21 +0,0 @@
|
||||
AES interrupts were previously not used, but after recent changes to omap-aes
|
||||
driver, its being used. We correct the interrupt number to have working PIO
|
||||
mode.
|
||||
|
||||
Signed-off-by: Joel Fernandes <joelf@ti.com>
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/am33xx.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -721,7 +721,7 @@
|
||||
compatible = "ti,omap4-aes";
|
||||
ti,hwmods = "aes";
|
||||
reg = <0x53500000 0xa0>;
|
||||
- interrupts = <102>;
|
||||
+ interrupts = <103>;
|
||||
dmas = <&edma 6>,
|
||||
<&edma 5>;
|
||||
dma-names = "tx", "rx";
|
@ -1,62 +0,0 @@
|
||||
Add RNG hwmod data for AM33xx SoC.
|
||||
|
||||
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
|
||||
|
||||
---
|
||||
* Made am33xx_l4_per__rng structure as static to fix sparse warning
|
||||
|
||||
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 36 ++++++++++++++++++++++++++++
|
||||
1 file changed, 36 insertions(+)
|
||||
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
|
||||
@@ -2480,6 +2480,41 @@ static struct omap_hwmod_ocp_if am33xx_l
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
+/* rng */
|
||||
+static struct omap_hwmod_class_sysconfig am33xx_rng_sysc = {
|
||||
+ .rev_offs = 0x1fe0,
|
||||
+ .sysc_offs = 0x1fe4,
|
||||
+ .sysc_flags = SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
|
||||
+ .idlemodes = SIDLE_FORCE | SIDLE_NO,
|
||||
+ .sysc_fields = &omap_hwmod_sysc_type1,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_class am33xx_rng_hwmod_class = {
|
||||
+ .name = "rng",
|
||||
+ .sysc = &am33xx_rng_sysc,
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod am33xx_rng_hwmod = {
|
||||
+ .name = "rng",
|
||||
+ .class = &am33xx_rng_hwmod_class,
|
||||
+ .clkdm_name = "l4ls_clkdm",
|
||||
+ .flags = HWMOD_SWSUP_SIDLE,
|
||||
+ .main_clk = "rng_fck",
|
||||
+ .prcm = {
|
||||
+ .omap4 = {
|
||||
+ .clkctrl_offs = AM33XX_CM_PER_RNG_CLKCTRL_OFFSET,
|
||||
+ .modulemode = MODULEMODE_SWCTRL,
|
||||
+ },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct omap_hwmod_ocp_if am33xx_l4_per__rng = {
|
||||
+ .master = &am33xx_l4_ls_hwmod,
|
||||
+ .slave = &am33xx_rng_hwmod,
|
||||
+ .clk = "rng_fck",
|
||||
+ .user = OCP_USER_MPU,
|
||||
+};
|
||||
+
|
||||
static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
|
||||
&am33xx_l3_main__emif,
|
||||
&am33xx_mpu__l3_main,
|
||||
@@ -2559,6 +2594,7 @@ static struct omap_hwmod_ocp_if *am33xx_
|
||||
&am33xx_cpgmac0__mdio,
|
||||
&am33xx_l3_main__sha0,
|
||||
&am33xx_l3_main__aes0,
|
||||
+ &am33xx_l4_per__rng,
|
||||
NULL,
|
||||
};
|
||||
|
@ -1,145 +0,0 @@
|
||||
From 13254d51149ce1a0fdbb38fa229c6cc91bcbe6ec Mon Sep 17 00:00:00 2001
|
||||
From: Jyri Sarha <jsarha@ti.com>
|
||||
Date: Fri, 13 Sep 2013 17:43:18 +0300
|
||||
Subject: [PATCH 211/752] ASoC: davinci-evm: Move sysclk logic away from
|
||||
evm_hw_params
|
||||
|
||||
The sysclk rate does not change runtime so it should be initialized at
|
||||
init time.
|
||||
|
||||
Signed-off-by: Jyri Sarha <jsarha@ti.com>
|
||||
---
|
||||
sound/soc/davinci/davinci-evm.c | 64 +++++++++++++++++++++++++++------------
|
||||
1 file changed, 44 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/sound/soc/davinci/davinci-evm.c
|
||||
+++ b/sound/soc/davinci/davinci-evm.c
|
||||
@@ -27,6 +27,10 @@
|
||||
#include "davinci-i2s.h"
|
||||
#include "davinci-mcasp.h"
|
||||
|
||||
+struct snd_soc_card_drvdata_davinci {
|
||||
+ unsigned sysclk;
|
||||
+};
|
||||
+
|
||||
#define AUDIO_FORMAT (SND_SOC_DAIFMT_DSP_B | \
|
||||
SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF)
|
||||
static int evm_hw_params(struct snd_pcm_substream *substream,
|
||||
@@ -35,27 +39,11 @@ static int evm_hw_params(struct snd_pcm_
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_dai *codec_dai = rtd->codec_dai;
|
||||
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
||||
+ struct snd_soc_codec *codec = rtd->codec;
|
||||
+ struct snd_soc_card *soc_card = codec->card;
|
||||
int ret = 0;
|
||||
- unsigned sysclk;
|
||||
-
|
||||
- /* ASP1 on DM355 EVM is clocked by an external oscillator */
|
||||
- if (machine_is_davinci_dm355_evm() || machine_is_davinci_dm6467_evm() ||
|
||||
- machine_is_davinci_dm365_evm())
|
||||
- sysclk = 27000000;
|
||||
-
|
||||
- /* ASP0 in DM6446 EVM is clocked by U55, as configured by
|
||||
- * board-dm644x-evm.c using GPIOs from U18. There are six
|
||||
- * options; here we "know" we use a 48 KHz sample rate.
|
||||
- */
|
||||
- else if (machine_is_davinci_evm())
|
||||
- sysclk = 12288000;
|
||||
-
|
||||
- else if (machine_is_davinci_da830_evm() ||
|
||||
- machine_is_davinci_da850_evm())
|
||||
- sysclk = 24576000;
|
||||
-
|
||||
- else
|
||||
- return -EINVAL;
|
||||
+ unsigned sysclk = ((struct snd_soc_card_drvdata_davinci *)
|
||||
+ snd_soc_card_get_drvdata(soc_card))->sysclk;
|
||||
|
||||
/* set codec DAI configuration */
|
||||
ret = snd_soc_dai_set_fmt(codec_dai, AUDIO_FORMAT);
|
||||
@@ -243,35 +231,65 @@ static struct snd_soc_dai_link da850_evm
|
||||
};
|
||||
|
||||
/* davinci dm6446 evm audio machine driver */
|
||||
+/*
|
||||
+ * ASP0 in DM6446 EVM is clocked by U55, as configured by
|
||||
+ * board-dm644x-evm.c using GPIOs from U18. There are six
|
||||
+ * options; here we "know" we use a 48 KHz sample rate.
|
||||
+ */
|
||||
+static struct snd_soc_card_drvdata_davinci dm6446_snd_soc_card_drvdata = {
|
||||
+ .sysclk = 12288000,
|
||||
+};
|
||||
+
|
||||
static struct snd_soc_card dm6446_snd_soc_card_evm = {
|
||||
.name = "DaVinci DM6446 EVM",
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = &dm6446_evm_dai,
|
||||
.num_links = 1,
|
||||
+ .drvdata = &dm6446_snd_soc_card_drvdata,
|
||||
};
|
||||
|
||||
/* davinci dm355 evm audio machine driver */
|
||||
+/* ASP1 on DM355 EVM is clocked by an external oscillator */
|
||||
+static struct snd_soc_card_drvdata_davinci dm355_snd_soc_card_drvdata = {
|
||||
+ .sysclk = 27000000,
|
||||
+};
|
||||
+
|
||||
static struct snd_soc_card dm355_snd_soc_card_evm = {
|
||||
.name = "DaVinci DM355 EVM",
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = &dm355_evm_dai,
|
||||
.num_links = 1,
|
||||
+ .drvdata = &dm355_snd_soc_card_drvdata,
|
||||
};
|
||||
|
||||
/* davinci dm365 evm audio machine driver */
|
||||
+static struct snd_soc_card_drvdata_davinci dm365_snd_soc_card_drvdata = {
|
||||
+ .sysclk = 27000000,
|
||||
+};
|
||||
+
|
||||
static struct snd_soc_card dm365_snd_soc_card_evm = {
|
||||
.name = "DaVinci DM365 EVM",
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = &dm365_evm_dai,
|
||||
.num_links = 1,
|
||||
+ .drvdata = &dm365_snd_soc_card_drvdata,
|
||||
};
|
||||
|
||||
/* davinci dm6467 evm audio machine driver */
|
||||
+static struct snd_soc_card_drvdata_davinci dm6467_snd_soc_card_drvdata = {
|
||||
+ .sysclk = 27000000,
|
||||
+};
|
||||
+
|
||||
static struct snd_soc_card dm6467_snd_soc_card_evm = {
|
||||
.name = "DaVinci DM6467 EVM",
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = dm6467_evm_dai,
|
||||
.num_links = ARRAY_SIZE(dm6467_evm_dai),
|
||||
+ .drvdata = &dm6467_snd_soc_card_drvdata,
|
||||
+};
|
||||
+
|
||||
+static struct snd_soc_card_drvdata_davinci da830_snd_soc_card_drvdata = {
|
||||
+ .sysclk = 24576000,
|
||||
};
|
||||
|
||||
static struct snd_soc_card da830_snd_soc_card = {
|
||||
@@ -279,6 +297,11 @@ static struct snd_soc_card da830_snd_soc
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = &da830_evm_dai,
|
||||
.num_links = 1,
|
||||
+ .drvdata = &da830_snd_soc_card_drvdata,
|
||||
+};
|
||||
+
|
||||
+static struct snd_soc_card_drvdata_davinci da850_snd_soc_card_drvdata = {
|
||||
+ .sysclk = 24576000,
|
||||
};
|
||||
|
||||
static struct snd_soc_card da850_snd_soc_card = {
|
||||
@@ -286,6 +309,7 @@ static struct snd_soc_card da850_snd_soc
|
||||
.owner = THIS_MODULE,
|
||||
.dai_link = &da850_evm_dai,
|
||||
.num_links = 1,
|
||||
+ .drvdata = &da850_snd_soc_card_drvdata,
|
||||
};
|
||||
|
||||
static struct platform_device *evm_snd_device;
|
@ -1,253 +0,0 @@
|
||||
From af9ef849e8700327b807361344427a43c38e823a Mon Sep 17 00:00:00 2001
|
||||
From: "Hebbar, Gururaja" <gururaja.hebbar@ti.com>
|
||||
Date: Tue, 31 Jul 2012 21:25:38 +0530
|
||||
Subject: [PATCH 212/752] ASoC: davinci-evm: Add device tree binding
|
||||
|
||||
Device tree support for Davinci Machine driver
|
||||
|
||||
When the board boots with device tree, the driver will receive card,
|
||||
codec, dai interface details (like the card name, DAPM routing map,
|
||||
phandle for the audio components described in the dts file, codec mclk
|
||||
speed). The card will be set up based on this information. Since the
|
||||
routing is provided via DT we can mark the card fully routed so core
|
||||
can take care of disconnecting the unused pins.
|
||||
|
||||
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
|
||||
Signed-off-by: Darren Etheridge <detheridge@ti.com>
|
||||
Signed-off-by: Jyri Sarha <jsarha@ti.com>
|
||||
---
|
||||
.../bindings/sound/davinci-evm-audio.txt | 58 ++++++++++
|
||||
sound/soc/davinci/davinci-evm.c | 120 +++++++++++++++++++-
|
||||
2 files changed, 176 insertions(+), 2 deletions(-)
|
||||
create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
|
||||
@@ -0,0 +1,58 @@
|
||||
+* Texas Instruments SoC audio setups with TLV320AIC3X Codec
|
||||
+
|
||||
+Required properties:
|
||||
+- compatible : "ti,da830-evm-audio" : forDM365/DA8xx/OMAPL1x/AM33xx
|
||||
+- ti,model : The user-visible name of this sound complex.
|
||||
+- ti,audio-codec : The phandle of the TLV320AIC3x audio codec
|
||||
+- ti,mcasp-controller : The phandle of the McASP controller
|
||||
+- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec
|
||||
+- ti,audio-routing : A list of the connections between audio components.
|
||||
+ Each entry is a pair of strings, the first being the connection's sink,
|
||||
+ the second being the connection's source. Valid names for sources and
|
||||
+ sinks are the codec's pins, and the jacks on the board:
|
||||
+
|
||||
+ TLV320AIC3X pins:
|
||||
+
|
||||
+ * LLOUT
|
||||
+ * RLOUT
|
||||
+ * MONO_LOUT
|
||||
+ * HPLOUT
|
||||
+ * HPROUT
|
||||
+ * HPLCOM
|
||||
+ * HPRCOM
|
||||
+ * MIC3L
|
||||
+ * MIC3R
|
||||
+ * LINE1L
|
||||
+ * LINE2L
|
||||
+ * LINE1R
|
||||
+ * LINE2R
|
||||
+
|
||||
+ Board connectors:
|
||||
+
|
||||
+ * Headphone Jack
|
||||
+ * Line Out
|
||||
+ * Mic Jack
|
||||
+ * Line In
|
||||
+
|
||||
+
|
||||
+Example:
|
||||
+
|
||||
+sound {
|
||||
+ compatible = "ti,da830-evm-audio";
|
||||
+ ti,model = "DA830 EVM";
|
||||
+ ti,audio-codec = <&tlv320aic3x>;
|
||||
+ ti,mcasp-controller = <&mcasp1>;
|
||||
+ ti,codec-clock-rate = <12000000>;
|
||||
+ ti,audio-routing =
|
||||
+ "Headphone Jack", "HPLOUT",
|
||||
+ "Headphone Jack", "HPROUT",
|
||||
+ "Line Out", "LLOUT",
|
||||
+ "Line Out", "RLOUT",
|
||||
+ "MIC3L", "Mic Bias 2V",
|
||||
+ "MIC3R", "Mic Bias 2V",
|
||||
+ "Mic Bias 2V", "Mic Jack",
|
||||
+ "LINE1L", "Line In",
|
||||
+ "LINE2L", "Line In",
|
||||
+ "LINE1R", "Line In",
|
||||
+ "LINE2R", "Line In";
|
||||
+};
|
||||
--- a/sound/soc/davinci/davinci-evm.c
|
||||
+++ b/sound/soc/davinci/davinci-evm.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/platform_data/edma.h>
|
||||
#include <linux/i2c.h>
|
||||
+#include <linux/of_platform.h>
|
||||
#include <sound/core.h>
|
||||
#include <sound/pcm.h>
|
||||
#include <sound/soc.h>
|
||||
@@ -23,6 +24,8 @@
|
||||
#include <asm/dma.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
+#include <linux/edma.h>
|
||||
+
|
||||
#include "davinci-pcm.h"
|
||||
#include "davinci-i2s.h"
|
||||
#include "davinci-mcasp.h"
|
||||
@@ -121,13 +124,22 @@ static int evm_aic3x_init(struct snd_soc
|
||||
{
|
||||
struct snd_soc_codec *codec = rtd->codec;
|
||||
struct snd_soc_dapm_context *dapm = &codec->dapm;
|
||||
+ struct device_node *np = codec->card->dev->of_node;
|
||||
+ int ret;
|
||||
|
||||
/* Add davinci-evm specific widgets */
|
||||
snd_soc_dapm_new_controls(dapm, aic3x_dapm_widgets,
|
||||
ARRAY_SIZE(aic3x_dapm_widgets));
|
||||
|
||||
- /* Set up davinci-evm specific audio path audio_map */
|
||||
- snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
|
||||
+ if (np) {
|
||||
+ ret = snd_soc_of_parse_audio_routing(codec->card,
|
||||
+ "ti,audio-routing");
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ } else {
|
||||
+ /* Set up davinci-evm specific audio path audio_map */
|
||||
+ snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
|
||||
+ }
|
||||
|
||||
/* not connected */
|
||||
snd_soc_dapm_disable_pin(dapm, "MONO_LOUT");
|
||||
@@ -312,6 +324,98 @@ static struct snd_soc_card da850_snd_soc
|
||||
.drvdata = &da850_snd_soc_card_drvdata,
|
||||
};
|
||||
|
||||
+#if defined(CONFIG_OF)
|
||||
+
|
||||
+/*
|
||||
+ * The struct is used as place holder. It will be completely
|
||||
+ * filled with data from dt node.
|
||||
+ */
|
||||
+static struct snd_soc_dai_link evm_dai_tlv320aic3x = {
|
||||
+ .name = "TLV320AIC3X",
|
||||
+ .stream_name = "AIC3X",
|
||||
+ .codec_dai_name = "tlv320aic3x-hifi",
|
||||
+ .ops = &evm_ops,
|
||||
+ .init = evm_aic3x_init,
|
||||
+};
|
||||
+
|
||||
+static const struct of_device_id davinci_evm_dt_ids[] = {
|
||||
+ {
|
||||
+ .compatible = "ti,da830-evm-audio",
|
||||
+ .data = (void *) &evm_dai_tlv320aic3x,
|
||||
+ },
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, davinci_evm_dt_ids);
|
||||
+
|
||||
+/* davinci evm audio machine driver */
|
||||
+static struct snd_soc_card evm_soc_card = {
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .num_links = 1,
|
||||
+};
|
||||
+
|
||||
+static int davinci_evm_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device_node *np = pdev->dev.of_node;
|
||||
+ const struct of_device_id *match =
|
||||
+ of_match_device(of_match_ptr(davinci_evm_dt_ids), &pdev->dev);
|
||||
+ struct snd_soc_dai_link *dai = (struct snd_soc_dai_link *) match->data;
|
||||
+ struct snd_soc_card_drvdata_davinci *drvdata = NULL;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ evm_soc_card.dai_link = dai;
|
||||
+
|
||||
+ dai->codec_of_node = of_parse_phandle(np, "ti,audio-codec", 0);
|
||||
+ if (!dai->codec_of_node)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ dai->cpu_of_node = of_parse_phandle(np, "ti,mcasp-controller", 0);
|
||||
+ if (!dai->cpu_of_node)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ dai->platform_of_node = dai->cpu_of_node;
|
||||
+
|
||||
+ evm_soc_card.dev = &pdev->dev;
|
||||
+ ret = snd_soc_of_parse_card_name(&evm_soc_card, "ti,model");
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
|
||||
+ if (!drvdata)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ ret = of_property_read_u32(np, "ti,codec-clock-rate", &drvdata->sysclk);
|
||||
+ if (ret < 0)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ snd_soc_card_set_drvdata(&evm_soc_card, drvdata);
|
||||
+ ret = snd_soc_register_card(&evm_soc_card);
|
||||
+
|
||||
+ if (ret)
|
||||
+ dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int davinci_evm_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct snd_soc_card *card = platform_get_drvdata(pdev);
|
||||
+
|
||||
+ snd_soc_unregister_card(card);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver davinci_evm_driver = {
|
||||
+ .probe = davinci_evm_probe,
|
||||
+ .remove = davinci_evm_remove,
|
||||
+ .driver = {
|
||||
+ .name = "davinci_evm",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .of_match_table = of_match_ptr(davinci_evm_dt_ids),
|
||||
+ },
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
static struct platform_device *evm_snd_device;
|
||||
|
||||
static int __init evm_init(void)
|
||||
@@ -320,6 +424,13 @@ static int __init evm_init(void)
|
||||
int index;
|
||||
int ret;
|
||||
|
||||
+ /*
|
||||
+ * If dtb is there, the devices will be created dynamically.
|
||||
+ * Only register platfrom driver structure.
|
||||
+ */
|
||||
+ if (of_have_populated_dt())
|
||||
+ return platform_driver_register(&davinci_evm_driver);
|
||||
+
|
||||
if (machine_is_davinci_evm()) {
|
||||
evm_snd_dev_data = &dm6446_snd_soc_card_evm;
|
||||
index = 0;
|
||||
@@ -355,6 +466,11 @@ static int __init evm_init(void)
|
||||
|
||||
static void __exit evm_exit(void)
|
||||
{
|
||||
+ if (of_have_populated_dt()) {
|
||||
+ platform_driver_unregister(&davinci_evm_driver);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
platform_device_unregister(evm_snd_device);
|
||||
}
|
||||
|
@ -1,171 +0,0 @@
|
||||
From fb2002dbc326d2e408698038b668b19741567a48 Mon Sep 17 00:00:00 2001
|
||||
From: Jyri Sarha <jsarha@ti.com>
|
||||
Date: Fri, 6 Sep 2013 12:15:00 +0300
|
||||
Subject: [PATCH 213/752] ASoC: davinci-mcasp: Add DMA register locations to
|
||||
DT
|
||||
|
||||
This patch adds DMA register location to mcasp DT bindings. On am33xx
|
||||
SoCs the McASP registers are mapped trough L4 interconnect, which is
|
||||
not accessible by the DMA controller, so McASP data port is mapped
|
||||
trough L3 to a different location.
|
||||
|
||||
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
|
||||
Signed-off-by: Darren Etheridge <detheridge@ti.com>
|
||||
Signed-off-by: Jyri Sarha <jsarha@ti.com>
|
||||
---
|
||||
.../bindings/sound/davinci-mcasp-audio.txt | 8 ++-
|
||||
sound/soc/davinci/davinci-mcasp.c | 59 +++++++++++++-------
|
||||
2 files changed, 46 insertions(+), 21 deletions(-)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
|
||||
+++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
|
||||
@@ -6,7 +6,11 @@ Required properties:
|
||||
"ti,da830-mcasp-audio" : for both DA830 & DA850 platforms
|
||||
"ti,omap2-mcasp-audio" : for OMAP2 platforms (TI81xx, AM33xx)
|
||||
|
||||
-- reg : Should contain McASP registers offset and length
|
||||
+- reg : Should contain McASP registers address and length for mpu and
|
||||
+ optionally for dma controller access.
|
||||
+- reg-names : The mandatory reg-range must be named "mpu" and the optional DMA
|
||||
+ reg-range must be named "dma". For backward compatibility it is
|
||||
+ good to keep "mpu" first in the list.
|
||||
- interrupts : Interrupt number for McASP
|
||||
- op-mode : I2S/DIT ops mode.
|
||||
- tdm-slots : Slots for TDM operation.
|
||||
@@ -15,7 +19,6 @@ Required properties:
|
||||
to "num-serializer" parameter. Each entry is a number indication
|
||||
serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
|
||||
|
||||
-
|
||||
Optional properties:
|
||||
|
||||
- ti,hwmods : Must be "mcasp<n>", n is controller instance starting 0
|
||||
@@ -31,6 +34,7 @@ mcasp0: mcasp0@1d00000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x100000 0x3000>;
|
||||
+ reg-names "mpu";
|
||||
interrupts = <82 83>;
|
||||
op-mode = <0>; /* MCASP_IIS_MODE */
|
||||
tdm-slots = <2>;
|
||||
--- a/sound/soc/davinci/davinci-mcasp.c
|
||||
+++ b/sound/soc/davinci/davinci-mcasp.c
|
||||
@@ -1001,18 +1001,40 @@ static const struct snd_soc_component_dr
|
||||
.name = "davinci-mcasp",
|
||||
};
|
||||
|
||||
+/* Some HW specific values and defaults. The rest is filled in from DT. */
|
||||
+static struct snd_platform_data dm646x_mcasp_pdata = {
|
||||
+ .tx_dma_offset = 0x400,
|
||||
+ .rx_dma_offset = 0x400,
|
||||
+ .asp_chan_q = EVENTQ_0,
|
||||
+ .version = MCASP_VERSION_1,
|
||||
+};
|
||||
+
|
||||
+static struct snd_platform_data da830_mcasp_pdata = {
|
||||
+ .tx_dma_offset = 0x2000,
|
||||
+ .rx_dma_offset = 0x2000,
|
||||
+ .asp_chan_q = EVENTQ_0,
|
||||
+ .version = MCASP_VERSION_2,
|
||||
+};
|
||||
+
|
||||
+static struct snd_platform_data omap2_mcasp_pdata = {
|
||||
+ .tx_dma_offset = 0,
|
||||
+ .rx_dma_offset = 0,
|
||||
+ .asp_chan_q = EVENTQ_0,
|
||||
+ .version = MCASP_VERSION_3,
|
||||
+};
|
||||
+
|
||||
static const struct of_device_id mcasp_dt_ids[] = {
|
||||
{
|
||||
.compatible = "ti,dm646x-mcasp-audio",
|
||||
- .data = (void *)MCASP_VERSION_1,
|
||||
+ .data = &dm646x_mcasp_pdata,
|
||||
},
|
||||
{
|
||||
.compatible = "ti,da830-mcasp-audio",
|
||||
- .data = (void *)MCASP_VERSION_2,
|
||||
+ .data = &da830_mcasp_pdata,
|
||||
},
|
||||
{
|
||||
.compatible = "ti,omap2-mcasp-audio",
|
||||
- .data = (void *)MCASP_VERSION_3,
|
||||
+ .data = &omap2_mcasp_pdata,
|
||||
},
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
@@ -1035,20 +1057,13 @@ static struct snd_platform_data *davinci
|
||||
pdata = pdev->dev.platform_data;
|
||||
return pdata;
|
||||
} else if (match) {
|
||||
- pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
|
||||
- if (!pdata) {
|
||||
- ret = -ENOMEM;
|
||||
- goto nodata;
|
||||
- }
|
||||
+ pdata = (struct snd_platform_data *) match->data;
|
||||
} else {
|
||||
/* control shouldn't reach here. something is wrong */
|
||||
ret = -EINVAL;
|
||||
goto nodata;
|
||||
}
|
||||
|
||||
- if (match->data)
|
||||
- pdata->version = (u8)((int)match->data);
|
||||
-
|
||||
ret = of_property_read_u32(np, "op-mode", &val);
|
||||
if (ret >= 0)
|
||||
pdata->op_mode = val;
|
||||
@@ -1145,10 +1160,15 @@ static int davinci_mcasp_probe(struct pl
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
|
||||
if (!mem) {
|
||||
- dev_err(&pdev->dev, "no mem resource?\n");
|
||||
- return -ENODEV;
|
||||
+ dev_warn(dev->dev,
|
||||
+ "\"mpu\" mem resource not found, using index 0\n");
|
||||
+ mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ if (!mem) {
|
||||
+ dev_err(&pdev->dev, "no mem resource?\n");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
}
|
||||
|
||||
ioarea = devm_request_mem_region(&pdev->dev, mem->start,
|
||||
@@ -1182,13 +1202,16 @@ static int davinci_mcasp_probe(struct pl
|
||||
dev->rxnumevt = pdata->rxnumevt;
|
||||
dev->dev = &pdev->dev;
|
||||
|
||||
+ dma = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dma");
|
||||
+ if (!dma)
|
||||
+ dma = mem;
|
||||
+
|
||||
dma_data = &dev->dma_params[SNDRV_PCM_STREAM_PLAYBACK];
|
||||
dma_data->asp_chan_q = pdata->asp_chan_q;
|
||||
dma_data->ram_chan_q = pdata->ram_chan_q;
|
||||
dma_data->sram_pool = pdata->sram_pool;
|
||||
dma_data->sram_size = pdata->sram_size_playback;
|
||||
- dma_data->dma_addr = (dma_addr_t) (pdata->tx_dma_offset +
|
||||
- mem->start);
|
||||
+ dma_data->dma_addr = dma->start + pdata->tx_dma_offset;
|
||||
|
||||
/* first TX, then RX */
|
||||
res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
|
||||
@@ -1205,8 +1228,7 @@ static int davinci_mcasp_probe(struct pl
|
||||
dma_data->ram_chan_q = pdata->ram_chan_q;
|
||||
dma_data->sram_pool = pdata->sram_pool;
|
||||
dma_data->sram_size = pdata->sram_size_capture;
|
||||
- dma_data->dma_addr = (dma_addr_t)(pdata->rx_dma_offset +
|
||||
- mem->start);
|
||||
+ dma_data->dma_addr = dma->start + pdata->rx_dma_offset;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
|
||||
if (!res) {
|
||||
@@ -1266,4 +1288,3 @@ module_platform_driver(davinci_mcasp_dri
|
||||
MODULE_AUTHOR("Steve Chen");
|
||||
MODULE_DESCRIPTION("TI DAVINCI McASP SoC Interface");
|
||||
MODULE_LICENSE("GPL");
|
||||
-
|
@ -1,128 +0,0 @@
|
||||
From ad5d3e5a1218a599ec02c81a3bd599acedeea00f Mon Sep 17 00:00:00 2001
|
||||
From: Jyri Sarha <jsarha@ti.com>
|
||||
Date: Tue, 17 Sep 2013 12:09:30 +0300
|
||||
Subject: [PATCH 214/752] ASoC: davinci-mcasp: Extract DMA channels directly
|
||||
from DT
|
||||
|
||||
Extract DMA channels directly from DT as they can not be found from
|
||||
platform resources anymore. This is a work-around until davinci audio
|
||||
driver is updated to use dmaengine.
|
||||
|
||||
Signed-off-by: Jyri Sarha <jsarha@ti.com>
|
||||
---
|
||||
.../bindings/sound/davinci-mcasp-audio.txt | 5 +++
|
||||
include/linux/platform_data/davinci_asp.h | 2 +
|
||||
sound/soc/davinci/davinci-mcasp.c | 47 +++++++++++++-------
|
||||
3 files changed, 39 insertions(+), 15 deletions(-)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
|
||||
+++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
|
||||
@@ -18,6 +18,11 @@ Required properties:
|
||||
- serial-dir : A list of serializer pin mode. The list number should be equal
|
||||
to "num-serializer" parameter. Each entry is a number indication
|
||||
serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
|
||||
+- dmas: two element list of DMA controller phandles and DMA request line
|
||||
+ ordered pairs.
|
||||
+- dma-names: identifier string for each DMA request line in the dmas property.
|
||||
+ These strings correspond 1:1 with the ordered pairs in dmas. The dma
|
||||
+ identifiers must be "rx" and "tx".
|
||||
|
||||
Optional properties:
|
||||
|
||||
--- a/include/linux/platform_data/davinci_asp.h
|
||||
+++ b/include/linux/platform_data/davinci_asp.h
|
||||
@@ -84,6 +84,8 @@ struct snd_platform_data {
|
||||
u8 version;
|
||||
u8 txnumevt;
|
||||
u8 rxnumevt;
|
||||
+ int tx_dma_channel;
|
||||
+ int rx_dma_channel;
|
||||
};
|
||||
|
||||
enum {
|
||||
--- a/sound/soc/davinci/davinci-mcasp.c
|
||||
+++ b/sound/soc/davinci/davinci-mcasp.c
|
||||
@@ -1047,6 +1047,7 @@ static struct snd_platform_data *davinci
|
||||
struct snd_platform_data *pdata = NULL;
|
||||
const struct of_device_id *match =
|
||||
of_match_device(mcasp_dt_ids, &pdev->dev);
|
||||
+ struct of_phandle_args dma_spec;
|
||||
|
||||
const u32 *of_serial_dir32;
|
||||
u8 *of_serial_dir;
|
||||
@@ -1109,6 +1110,28 @@ static struct snd_platform_data *davinci
|
||||
pdata->serial_dir = of_serial_dir;
|
||||
}
|
||||
|
||||
+ ret = of_property_match_string(np, "dma-names", "tx");
|
||||
+ if (ret < 0)
|
||||
+ goto nodata;
|
||||
+
|
||||
+ ret = of_parse_phandle_with_args(np, "dmas", "#dma-cells", ret,
|
||||
+ &dma_spec);
|
||||
+ if (ret < 0)
|
||||
+ goto nodata;
|
||||
+
|
||||
+ pdata->tx_dma_channel = dma_spec.args[0];
|
||||
+
|
||||
+ ret = of_property_match_string(np, "dma-names", "rx");
|
||||
+ if (ret < 0)
|
||||
+ goto nodata;
|
||||
+
|
||||
+ ret = of_parse_phandle_with_args(np, "dmas", "#dma-cells", ret,
|
||||
+ &dma_spec);
|
||||
+ if (ret < 0)
|
||||
+ goto nodata;
|
||||
+
|
||||
+ pdata->rx_dma_channel = dma_spec.args[0];
|
||||
+
|
||||
ret = of_property_read_u32(np, "tx-num-evt", &val);
|
||||
if (ret >= 0)
|
||||
pdata->txnumevt = val;
|
||||
@@ -1139,7 +1162,7 @@ nodata:
|
||||
static int davinci_mcasp_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct davinci_pcm_dma_params *dma_data;
|
||||
- struct resource *mem, *ioarea, *res;
|
||||
+ struct resource *mem, *ioarea, *res, *dma;
|
||||
struct snd_platform_data *pdata;
|
||||
struct davinci_audio_dev *dev;
|
||||
int ret;
|
||||
@@ -1213,15 +1236,11 @@ static int davinci_mcasp_probe(struct pl
|
||||
dma_data->sram_size = pdata->sram_size_playback;
|
||||
dma_data->dma_addr = dma->start + pdata->tx_dma_offset;
|
||||
|
||||
- /* first TX, then RX */
|
||||
res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
|
||||
- if (!res) {
|
||||
- dev_err(&pdev->dev, "no DMA resource\n");
|
||||
- ret = -ENODEV;
|
||||
- goto err_release_clk;
|
||||
- }
|
||||
-
|
||||
- dma_data->channel = res->start;
|
||||
+ if (res)
|
||||
+ dma_data->channel = res->start;
|
||||
+ else
|
||||
+ dma_data->channel = pdata->tx_dma_channel;
|
||||
|
||||
dma_data = &dev->dma_params[SNDRV_PCM_STREAM_CAPTURE];
|
||||
dma_data->asp_chan_q = pdata->asp_chan_q;
|
||||
@@ -1231,13 +1250,11 @@ static int davinci_mcasp_probe(struct pl
|
||||
dma_data->dma_addr = dma->start + pdata->rx_dma_offset;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
|
||||
- if (!res) {
|
||||
- dev_err(&pdev->dev, "no DMA resource\n");
|
||||
- ret = -ENODEV;
|
||||
- goto err_release_clk;
|
||||
- }
|
||||
+ if (res)
|
||||
+ dma_data->channel = res->start;
|
||||
+ else
|
||||
+ dma_data->channel = pdata->rx_dma_channel;
|
||||
|
||||
- dma_data->channel = res->start;
|
||||
dev_set_drvdata(&pdev->dev, dev);
|
||||
ret = snd_soc_register_component(&pdev->dev, &davinci_mcasp_component,
|
||||
&davinci_mcasp_dai[pdata->op_mode], 1);
|
@ -1,42 +0,0 @@
|
||||
From 0ecb275625447180dd615256d0c324a0c0c6e76a Mon Sep 17 00:00:00 2001
|
||||
From: Jyri Sarha <jsarha@ti.com>
|
||||
Date: Thu, 19 Sep 2013 13:20:26 +0300
|
||||
Subject: [PATCH 215/752] ASoC: davinci-mcasp: Interrupts property to optional
|
||||
and add interrupt-names
|
||||
|
||||
Makes interrupts property optional as the interrupts are not currently
|
||||
used by the driver and adds interrupt-names property to name listed
|
||||
interrupts. Currently know interrupt names are "tx" and "rx".
|
||||
|
||||
Signed-off-by: Jyri Sarha <jsarha@ti.com>
|
||||
---
|
||||
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
|
||||
+++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
|
||||
@@ -11,7 +11,6 @@ Required properties:
|
||||
- reg-names : The mandatory reg-range must be named "mpu" and the optional DMA
|
||||
reg-range must be named "dma". For backward compatibility it is
|
||||
good to keep "mpu" first in the list.
|
||||
-- interrupts : Interrupt number for McASP
|
||||
- op-mode : I2S/DIT ops mode.
|
||||
- tdm-slots : Slots for TDM operation.
|
||||
- num-serializer : Serializers used by McASP.
|
||||
@@ -31,6 +30,8 @@ Optional properties:
|
||||
- rx-num-evt : FIFO levels.
|
||||
- sram-size-playback : size of sram to be allocated during playback
|
||||
- sram-size-capture : size of sram to be allocated during capture
|
||||
+- interrupts : Interrupt numbers for McASP, currently not used by the driver
|
||||
+- interrupt-names : Known interrupt names are "tx" and "rx"
|
||||
|
||||
Example:
|
||||
|
||||
@@ -41,6 +42,7 @@ mcasp0: mcasp0@1d00000 {
|
||||
reg = <0x100000 0x3000>;
|
||||
reg-names "mpu";
|
||||
interrupts = <82 83>;
|
||||
+ interrupts-names = "tx", "rx";
|
||||
op-mode = <0>; /* MCASP_IIS_MODE */
|
||||
tdm-slots = <2>;
|
||||
num-serializer = <16>;
|
@ -1,60 +0,0 @@
|
||||
From 8f3e1fa024017a6b3d7fd8c2a75ee6ff5e4127f8 Mon Sep 17 00:00:00 2001
|
||||
From: "Hebbar, Gururaja" <gururaja.hebbar@ti.com>
|
||||
Date: Wed, 1 Aug 2012 12:04:22 +0530
|
||||
Subject: [PATCH 216/752] ASoC: davinci: Add support for AM33xx SoC Audio
|
||||
|
||||
AM33xx uses same McASP IP as the Davinci Platform. This patch updates
|
||||
Kconfig and makefile to enable build for McASP, PCM & Codec drivers.
|
||||
|
||||
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
|
||||
Signed-off-by: Darren Etheridge <detheridge@ti.com>
|
||||
Signed-off-by: Jyri Sarha <jsarha@ti.com>
|
||||
---
|
||||
sound/soc/davinci/Kconfig | 18 +++++++++++++++---
|
||||
sound/soc/davinci/Makefile | 1 +
|
||||
2 files changed, 16 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/sound/soc/davinci/Kconfig
|
||||
+++ b/sound/soc/davinci/Kconfig
|
||||
@@ -1,9 +1,10 @@
|
||||
config SND_DAVINCI_SOC
|
||||
- tristate "SoC Audio for the TI DAVINCI chip"
|
||||
- depends on ARCH_DAVINCI
|
||||
+ tristate "SoC Audio for the TI DAVINCI or AM33XX chip"
|
||||
+ depends on ARCH_DAVINCI || SOC_AM33XX
|
||||
help
|
||||
+ Platform driver for daVinci or AM33xx
|
||||
Say Y or M if you want to add support for codecs attached to
|
||||
- the DAVINCI AC97 or I2S interface. You will also need
|
||||
+ the DAVINCI AC97, I2S, or McASP interface. You will also need
|
||||
to select the audio interfaces to support below.
|
||||
|
||||
config SND_DAVINCI_SOC_I2S
|
||||
@@ -15,6 +16,17 @@ config SND_DAVINCI_SOC_MCASP
|
||||
config SND_DAVINCI_SOC_VCIF
|
||||
tristate
|
||||
|
||||
+config SND_AM33XX_SOC_EVM
|
||||
+ tristate "SoC Audio for the AM33XX chip based boards"
|
||||
+ depends on SND_DAVINCI_SOC && SOC_AM33XX
|
||||
+ select SND_SOC_TLV320AIC3X
|
||||
+ select SND_DAVINCI_SOC_MCASP
|
||||
+ help
|
||||
+ Say Y or M if you want to add support for SoC audio on AM33XX
|
||||
+ boards using McASP and TLV320AIC3X codec. For example AM335X-EVM,
|
||||
+ AM335X-EVMSK, and BeagelBone with AudioCape boards have this
|
||||
+ setup.
|
||||
+
|
||||
config SND_DAVINCI_SOC_EVM
|
||||
tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM"
|
||||
depends on SND_DAVINCI_SOC
|
||||
--- a/sound/soc/davinci/Makefile
|
||||
+++ b/sound/soc/davinci/Makefile
|
||||
@@ -13,6 +13,7 @@ obj-$(CONFIG_SND_DAVINCI_SOC_VCIF) += sn
|
||||
snd-soc-evm-objs := davinci-evm.o
|
||||
|
||||
obj-$(CONFIG_SND_DAVINCI_SOC_EVM) += snd-soc-evm.o
|
||||
+obj-$(CONFIG_SND_AM33XX_SOC_EVM) += snd-soc-evm.o
|
||||
obj-$(CONFIG_SND_DM6467_SOC_EVM) += snd-soc-evm.o
|
||||
obj-$(CONFIG_SND_DA830_SOC_EVM) += snd-soc-evm.o
|
||||
obj-$(CONFIG_SND_DA850_SOC_EVM) += snd-soc-evm.o
|
@ -1,33 +0,0 @@
|
||||
From 2e8f45c820bc025bac3a5257478f16f73b38d54c Mon Sep 17 00:00:00 2001
|
||||
From: Jyri Sarha <jsarha@ti.com>
|
||||
Date: Wed, 11 Sep 2013 15:04:56 +0300
|
||||
Subject: [PATCH 217/752] ASoC: tlv320aic3x: Add regulators to DT bindings
|
||||
document
|
||||
|
||||
Add regulator properties to tlv320aic3x DT bindings document.
|
||||
|
||||
Signed-off-by: Jyri Sarha <jsarha@ti.com>
|
||||
---
|
||||
Documentation/devicetree/bindings/sound/tlv320aic3x.txt | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
|
||||
+++ b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
|
||||
@@ -24,10 +24,17 @@ Optional properties:
|
||||
3 - MICBIAS output is connected to AVDD,
|
||||
If this node is not mentioned or if the value is incorrect, then MicBias
|
||||
is powered down.
|
||||
+- AVDD-supply, IOVDD-supply, DRVDD-supply, DVDD-supply : power supplies for the
|
||||
+ device as covered in Documentation/devicetree/bindings/regulator/regulator.txt
|
||||
|
||||
Example:
|
||||
|
||||
tlv320aic3x: tlv320aic3x@1b {
|
||||
compatible = "ti,tlv320aic3x";
|
||||
reg = <0x1b>;
|
||||
+
|
||||
+ AVDD-supply = <®ulator>;
|
||||
+ IOVDD-supply = <®ulator>;
|
||||
+ DRVDD-supply = <®ulator>;
|
||||
+ DVDD-supply = <®ulator>;
|
||||
};
|
@ -1,41 +0,0 @@
|
||||
From 6afd5cb1f92a1965ffa3c0f304f95ab19b49fa84 Mon Sep 17 00:00:00 2001
|
||||
From: Jyri Sarha <jsarha@ti.com>
|
||||
Date: Thu, 12 Sep 2013 14:37:08 +0300
|
||||
Subject: [PATCH 218/752] ASoC: tlv320aic3x: Add codec pins to DT bindings
|
||||
document
|
||||
|
||||
Add list of codec pins to tlv320aic3x DT bindings document.
|
||||
|
||||
Signed-off-by: Jyri Sarha <jsarha@ti.com>
|
||||
---
|
||||
.../devicetree/bindings/sound/tlv320aic3x.txt | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
|
||||
+++ b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
|
||||
@@ -27,6 +27,25 @@ Optional properties:
|
||||
- AVDD-supply, IOVDD-supply, DRVDD-supply, DVDD-supply : power supplies for the
|
||||
device as covered in Documentation/devicetree/bindings/regulator/regulator.txt
|
||||
|
||||
+CODEC output pins:
|
||||
+ * LLOUT
|
||||
+ * RLOUT
|
||||
+ * MONO_LOUT
|
||||
+ * HPLOUT
|
||||
+ * HPROUT
|
||||
+ * HPLCOM
|
||||
+ * HPRCOM
|
||||
+
|
||||
+CODEC input pins:
|
||||
+ * MIC3L
|
||||
+ * MIC3R
|
||||
+ * LINE1L
|
||||
+ * LINE2L
|
||||
+ * LINE1R
|
||||
+ * LINE2R
|
||||
+
|
||||
+The pins can be used in referring sound node's audio-routing property.
|
||||
+
|
||||
Example:
|
||||
|
||||
tlv320aic3x: tlv320aic3x@1b {
|
@ -1,42 +0,0 @@
|
||||
From a049ce751e60451b47fa744342db84db44883e57 Mon Sep 17 00:00:00 2001
|
||||
From: Pantelis Antoniou <panto@antoniou-consulting.com>
|
||||
Date: Thu, 10 Jan 2013 20:37:45 +0200
|
||||
Subject: [PATCH 219/752] ARM/dts: am33xx: Add mcasp0 and mcasp1 device tree
|
||||
entries
|
||||
|
||||
Add missing mcasp entries in the am33xx.dtsi include file.
|
||||
|
||||
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
|
||||
Signed-off-by: Darren Etheridge <detheridge@ti.com>
|
||||
Signed-off-by: Jyri Sarha <jsarha@ti.com>
|
||||
---
|
||||
arch/arm/boot/dts/am33xx.dtsi | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -726,5 +726,24 @@
|
||||
<&edma 5>;
|
||||
dma-names = "tx", "rx";
|
||||
};
|
||||
+
|
||||
+ mcasp0: mcasp@48038000 {
|
||||
+ compatible = "ti,omap2-mcasp-audio";
|
||||
+ ti,hwmods = "mcasp0";
|
||||
+ reg = <0x48038000 0x2000>;
|
||||
+ interrupts = <80 81>;
|
||||
+ interrupts-names = "tx", "rx";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ mcasp1: mcasp@4803C000 {
|
||||
+ compatible = "ti,omap2-mcasp-audio";
|
||||
+ ti,hwmods = "mcasp1";
|
||||
+ reg = <0x4803C000 0x2000>;
|
||||
+ interrupts = <82 83>;
|
||||
+ interrupts-names = "tx", "rx";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
};
|
||||
};
|
@ -1,51 +0,0 @@
|
||||
From 15ffa765da3f2427b506472baa72d0f3a90b6be5 Mon Sep 17 00:00:00 2001
|
||||
From: Jyri Sarha <jsarha@ti.com>
|
||||
Date: Thu, 5 Sep 2013 21:49:35 +0300
|
||||
Subject: [PATCH 220/752] ARM/dts: am33xx: mcasp: Add new dma register
|
||||
location to reg-property
|
||||
|
||||
This patch adds an optional address range to reg property. The range
|
||||
describes the register location for DMA controller on am33xx. The both
|
||||
address ranges are named accordingly in the reg-names property.
|
||||
|
||||
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
|
||||
Signed-off-by: Darren Etheridge <detheridge@ti.com>
|
||||
Signed-off-by: Jyri Sarha <jsarha@ti.com>
|
||||
---
|
||||
arch/arm/boot/dts/am33xx.dtsi | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -730,19 +730,29 @@
|
||||
mcasp0: mcasp@48038000 {
|
||||
compatible = "ti,omap2-mcasp-audio";
|
||||
ti,hwmods = "mcasp0";
|
||||
- reg = <0x48038000 0x2000>;
|
||||
+ reg = <0x48038000 0x2000>,
|
||||
+ <0x46400000 0x400000>;
|
||||
+ reg-names = "mpu", "dma";
|
||||
interrupts = <80 81>;
|
||||
interrupts-names = "tx", "rx";
|
||||
status = "disabled";
|
||||
+ dmas = <&edma 8
|
||||
+ &edma 9>;
|
||||
+ dma-names = "tx", "rx";
|
||||
};
|
||||
|
||||
mcasp1: mcasp@4803C000 {
|
||||
compatible = "ti,omap2-mcasp-audio";
|
||||
ti,hwmods = "mcasp1";
|
||||
- reg = <0x4803C000 0x2000>;
|
||||
+ reg = <0x4803C000 0x2000>,
|
||||
+ <0x46400000 0x400000>;
|
||||
+ reg-names = "mpu", "dma";
|
||||
interrupts = <82 83>;
|
||||
interrupts-names = "tx", "rx";
|
||||
status = "disabled";
|
||||
+ dmas = <&edma 10
|
||||
+ &edma 11>;
|
||||
+ dma-names = "tx", "rx";
|
||||
};
|
||||
|
||||
};
|
@ -1,101 +0,0 @@
|
||||
From 2bf66a74b322deebc7c8bba11cab58c18b745608 Mon Sep 17 00:00:00 2001
|
||||
From: Darren Etheridge <detheridge@ti.com>
|
||||
Date: Wed, 31 Jul 2013 12:38:26 -0500
|
||||
Subject: [PATCH 221/752] ARM/dts: am335x-evm: Add audio support for
|
||||
am335x-evm.dts
|
||||
|
||||
Adds sound, tlv320aic3x, mcasp1, and am335x_evm_audio_pin nodes.
|
||||
|
||||
Signed-off-by: Darren Etheridge <detheridge@ti.com>
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Signed-off-by: Jyri Sarha <jsarha@ti.com>
|
||||
---
|
||||
arch/arm/boot/dts/am335x-evm.dts | 56 ++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 56 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/am335x-evm.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evm.dts
|
||||
@@ -149,6 +149,16 @@
|
||||
0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
+
|
||||
+ am335x_evm_audio_pins: am335x_evm_audio_pins {
|
||||
+ pinctrl-single,pins = <
|
||||
+ 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rx_dv.mcasp1_aclkx */
|
||||
+ 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_txd3.mcasp1_fsx */
|
||||
+ 0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
|
||||
+ 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
ocp {
|
||||
@@ -244,6 +254,19 @@
|
||||
compatible = "ti,tmp275";
|
||||
reg = <0x48>;
|
||||
};
|
||||
+
|
||||
+ tlv320aic3x: tlv320aic3x@1b {
|
||||
+ compatible = "ti,tlv320aic3x";
|
||||
+ reg = <0x1b>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ /* Regulators */
|
||||
+ AVDD-supply = <&vaux2_reg>;
|
||||
+ IOVDD-supply = <&vaux2_reg>;
|
||||
+ DRVDD-supply = <&vaux2_reg>;
|
||||
+ DVDD-supply = <&vbat>;
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
elm: elm@48080000 {
|
||||
@@ -340,6 +363,20 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "ti,da830-evm-audio";
|
||||
+ ti,model = "DA830 EVM";
|
||||
+ ti,audio-codec = <&tlv320aic3x>;
|
||||
+ ti,mcasp-controller = <&mcasp1>;
|
||||
+ ti,codec-clock-rate = <12000000>;
|
||||
+ ti,audio-routing =
|
||||
+ "Headphone Jack", "HPLOUT",
|
||||
+ "Headphone Jack", "HPROUT",
|
||||
+ "LINE1L", "Line In",
|
||||
+ "LINE1R", "Line In";
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
vbat: fixedregulator@0 {
|
||||
@@ -407,6 +444,25 @@
|
||||
|
||||
#include "tps65910.dtsi"
|
||||
|
||||
+&mcasp1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&am335x_evm_audio_pins>;
|
||||
+
|
||||
+ status = "okay";
|
||||
+
|
||||
+ op-mode = <0>; /* MCASP_IIS_MODE */
|
||||
+ tdm-slots = <2>;
|
||||
+ num-serializer = <16>;
|
||||
+ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
|
||||
+ 0 0 1 2
|
||||
+ 0 0 0 0
|
||||
+ 0 0 0 0
|
||||
+ 0 0 0 0
|
||||
+ >;
|
||||
+ tx-num-evt = <1>;
|
||||
+ rx-num-evt = <1>;
|
||||
+};
|
||||
+
|
||||
&tps {
|
||||
vcc1-supply = <&vbat>;
|
||||
vcc2-supply = <&vbat>;
|
@ -1,30 +0,0 @@
|
||||
From 76b54fecdd214b32f568b2f97102fc1ab5745fa1 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Mon, 23 Sep 2013 10:34:06 +0300
|
||||
Subject: [PATCH 222/752] ARM/dts: am335x-evm: Remove blank lines
|
||||
|
||||
Clean up the blank lines where they are not needed.
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
---
|
||||
arch/arm/boot/dts/am335x-evm.dts | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/am335x-evm.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evm.dts
|
||||
@@ -266,7 +266,6 @@
|
||||
DRVDD-supply = <&vaux2_reg>;
|
||||
DVDD-supply = <&vbat>;
|
||||
};
|
||||
-
|
||||
};
|
||||
|
||||
elm: elm@48080000 {
|
||||
@@ -376,7 +375,6 @@
|
||||
"LINE1L", "Line In",
|
||||
"LINE1R", "Line In";
|
||||
};
|
||||
-
|
||||
};
|
||||
|
||||
vbat: fixedregulator@0 {
|
@ -1,35 +0,0 @@
|
||||
From df3fbecdac2b46b7716c16c185cba357cc55d00a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Mon, 23 Sep 2013 10:34:07 +0300
|
||||
Subject: [PATCH 223/752] ARM/dts: am335x-evm: Clarify the audio codec node
|
||||
|
||||
The board have tlv320aic3106 codec. Use this name in the dts file instead
|
||||
of the generic ltv320aic3x.
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
---
|
||||
arch/arm/boot/dts/am335x-evm.dts | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/am335x-evm.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evm.dts
|
||||
@@ -255,8 +255,8 @@
|
||||
reg = <0x48>;
|
||||
};
|
||||
|
||||
- tlv320aic3x: tlv320aic3x@1b {
|
||||
- compatible = "ti,tlv320aic3x";
|
||||
+ tlv320aic3106: tlv320aic3106@1b {
|
||||
+ compatible = "ti,tlv320aic3106";
|
||||
reg = <0x1b>;
|
||||
status = "okay";
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
sound {
|
||||
compatible = "ti,da830-evm-audio";
|
||||
ti,model = "DA830 EVM";
|
||||
- ti,audio-codec = <&tlv320aic3x>;
|
||||
+ ti,audio-codec = <&tlv320aic3106>;
|
||||
ti,mcasp-controller = <&mcasp1>;
|
||||
ti,codec-clock-rate = <12000000>;
|
||||
ti,audio-routing =
|
@ -1,27 +0,0 @@
|
||||
From d4b7ebbadccb4632ad16f07a19cee57aa7b73cdb Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Mon, 23 Sep 2013 10:34:08 +0300
|
||||
Subject: [PATCH 224/752] ARM/dts: am335x-evm: Add unique name for the sound
|
||||
card
|
||||
|
||||
Change the name of the sound card to 'AM335x-EVM' from 'DA830 EVM'.
|
||||
User space might need to differentiate between the boards when it comes to
|
||||
audio setup (mixer config, PCM lookup, etc).
|
||||
It is better to use unique name for different boards.
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
---
|
||||
arch/arm/boot/dts/am335x-evm.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/am335x-evm.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evm.dts
|
||||
@@ -365,7 +365,7 @@
|
||||
|
||||
sound {
|
||||
compatible = "ti,da830-evm-audio";
|
||||
- ti,model = "DA830 EVM";
|
||||
+ ti,model = "AM335x-EVM";
|
||||
ti,audio-codec = <&tlv320aic3106>;
|
||||
ti,mcasp-controller = <&mcasp1>;
|
||||
ti,codec-clock-rate = <12000000>;
|
@ -1,95 +0,0 @@
|
||||
From d4c71e652f457077eac1ad83a9e32d3f11fc99b2 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Mon, 23 Sep 2013 10:34:09 +0300
|
||||
Subject: [PATCH 225/752] ARM/dts: am335x-evmsk: Audio support
|
||||
|
||||
AM335x EVM-SK have only support for audio playback (stereo jack on the
|
||||
board) via tlv320aic3106 codec connected to McASP1.
|
||||
Enable the support for audio playback on the board:
|
||||
- McASP1 configuration
|
||||
- tlv320aic3106 configuration
|
||||
- Machine driver.
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
---
|
||||
arch/arm/boot/dts/am335x-evmsk.dts | 51 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 51 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
@@ -158,6 +158,15 @@
|
||||
0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
+
|
||||
+ mcasp1_pins: mcasp1_pins {
|
||||
+ pinctrl-single,pins = <
|
||||
+ 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */
|
||||
+ 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */
|
||||
+ 0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
|
||||
+ 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
|
||||
+ >;
|
||||
+ };
|
||||
};
|
||||
|
||||
ocp {
|
||||
@@ -206,6 +215,18 @@
|
||||
st,max-limit-y = <550>;
|
||||
st,max-limit-z = <750>;
|
||||
};
|
||||
+
|
||||
+ tlv320aic3106: tlv320aic3106@1b {
|
||||
+ compatible = "ti,tlv320aic3106";
|
||||
+ reg = <0x1b>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ /* Regulators */
|
||||
+ AVDD-supply = <&vaux2_reg>;
|
||||
+ IOVDD-supply = <&vaux2_reg>;
|
||||
+ DRVDD-supply = <&vaux2_reg>;
|
||||
+ DVDD-supply = <&vbat>;
|
||||
+ };
|
||||
};
|
||||
|
||||
musb: usb@47400000 {
|
||||
@@ -233,6 +254,17 @@
|
||||
pinctrl-0 = <&ecap2_pins>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "ti,da830-evm-audio";
|
||||
+ ti,model = "AM335x-EVMSK";
|
||||
+ ti,audio-codec = <&tlv320aic3106>;
|
||||
+ ti,mcasp-controller = <&mcasp1>;
|
||||
+ ti,codec-clock-rate = <24576000>;
|
||||
+ ti,audio-routing =
|
||||
+ "Headphone Jack", "HPLOUT",
|
||||
+ "Headphone Jack", "HPROUT";
|
||||
+ };
|
||||
};
|
||||
|
||||
vbat: fixedregulator@0 {
|
||||
@@ -438,3 +470,22 @@
|
||||
&aes {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&mcasp1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mcasp1_pins>;
|
||||
+
|
||||
+ status = "okay";
|
||||
+
|
||||
+ op-mode = <0>; /* MCASP_IIS_MODE */
|
||||
+ tdm-slots = <2>;
|
||||
+ num-serializer = <16>;
|
||||
+ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
|
||||
+ 0 0 1 2
|
||||
+ 0 0 0 0
|
||||
+ 0 0 0 0
|
||||
+ 0 0 0 0
|
||||
+ >;
|
||||
+ tx-num-evt = <1>;
|
||||
+ rx-num-evt = <1>;
|
||||
+};
|
@ -1,90 +0,0 @@
|
||||
From fdb8d3521ecae71865df66a84a1cbe13f7daa6f5 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Mon, 23 Sep 2013 11:25:02 +0300
|
||||
Subject: [PATCH 226/752] ASoC: davinci: mcasp: Remove redundant
|
||||
num-serializer DT parameter
|
||||
|
||||
The serial-dir array gives this information so there is no need to have the
|
||||
num-serializer property in DT description.
|
||||
Just ignore the property in the driver the DTS files can be updated
|
||||
separately without regression.
|
||||
Update the documentation at the same time for davinci-mcasp
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
---
|
||||
.../bindings/sound/davinci-mcasp-audio.txt | 8 +++----
|
||||
sound/soc/davinci/davinci-mcasp.c | 22 +++++---------------
|
||||
2 files changed, 8 insertions(+), 22 deletions(-)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
|
||||
+++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
|
||||
@@ -13,10 +13,9 @@ Required properties:
|
||||
good to keep "mpu" first in the list.
|
||||
- op-mode : I2S/DIT ops mode.
|
||||
- tdm-slots : Slots for TDM operation.
|
||||
-- num-serializer : Serializers used by McASP.
|
||||
-- serial-dir : A list of serializer pin mode. The list number should be equal
|
||||
- to "num-serializer" parameter. Each entry is a number indication
|
||||
- serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
|
||||
+- serial-dir : A list of serializer configuration. Each entry is a number
|
||||
+ indication serializer pin direction.
|
||||
+ (0 - INACTIVE, 1 - TX, 2 - RX)
|
||||
- dmas: two element list of DMA controller phandles and DMA request line
|
||||
ordered pairs.
|
||||
- dma-names: identifier string for each DMA request line in the dmas property.
|
||||
@@ -45,7 +44,6 @@ mcasp0: mcasp0@1d00000 {
|
||||
interrupts-names = "tx", "rx";
|
||||
op-mode = <0>; /* MCASP_IIS_MODE */
|
||||
tdm-slots = <2>;
|
||||
- num-serializer = <16>;
|
||||
serial-dir = <
|
||||
0 0 0 0 /* 0: INACTIVE, 1: TX, 2: RX */
|
||||
0 0 0 0
|
||||
--- a/sound/soc/davinci/davinci-mcasp.c
|
||||
+++ b/sound/soc/davinci/davinci-mcasp.c
|
||||
@@ -1050,7 +1050,6 @@ static struct snd_platform_data *davinci
|
||||
struct of_phandle_args dma_spec;
|
||||
|
||||
const u32 *of_serial_dir32;
|
||||
- u8 *of_serial_dir;
|
||||
u32 val;
|
||||
int i, ret = 0;
|
||||
|
||||
@@ -1081,32 +1080,21 @@ static struct snd_platform_data *davinci
|
||||
pdata->tdm_slots = val;
|
||||
}
|
||||
|
||||
- ret = of_property_read_u32(np, "num-serializer", &val);
|
||||
- if (ret >= 0)
|
||||
- pdata->num_serializer = val;
|
||||
-
|
||||
of_serial_dir32 = of_get_property(np, "serial-dir", &val);
|
||||
val /= sizeof(u32);
|
||||
- if (val != pdata->num_serializer) {
|
||||
- dev_err(&pdev->dev,
|
||||
- "num-serializer(%d) != serial-dir size(%d)\n",
|
||||
- pdata->num_serializer, val);
|
||||
- ret = -EINVAL;
|
||||
- goto nodata;
|
||||
- }
|
||||
-
|
||||
if (of_serial_dir32) {
|
||||
- of_serial_dir = devm_kzalloc(&pdev->dev,
|
||||
- (sizeof(*of_serial_dir) * val),
|
||||
- GFP_KERNEL);
|
||||
+ u8 *of_serial_dir = devm_kzalloc(&pdev->dev,
|
||||
+ (sizeof(*of_serial_dir) * val),
|
||||
+ GFP_KERNEL);
|
||||
if (!of_serial_dir) {
|
||||
ret = -ENOMEM;
|
||||
goto nodata;
|
||||
}
|
||||
|
||||
- for (i = 0; i < pdata->num_serializer; i++)
|
||||
+ for (i = 0; i < val; i++)
|
||||
of_serial_dir[i] = be32_to_cpup(&of_serial_dir32[i]);
|
||||
|
||||
+ pdata->num_serializer = val;
|
||||
pdata->serial_dir = of_serial_dir;
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
From 7fd70076a17c2a5b1b4bac0175a25e5d04075e43 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Mon, 23 Sep 2013 11:25:03 +0300
|
||||
Subject: [PATCH 227/752] ARM/dts: am335x-evm: Remove num-serializer property
|
||||
for mcasp node
|
||||
|
||||
The num-serializer property is redundant and the driver no longer needs it.
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
---
|
||||
arch/arm/boot/dts/am335x-evm.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/am335x-evm.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evm.dts
|
||||
@@ -450,7 +450,7 @@
|
||||
|
||||
op-mode = <0>; /* MCASP_IIS_MODE */
|
||||
tdm-slots = <2>;
|
||||
- num-serializer = <16>;
|
||||
+ /* 16 serializer */
|
||||
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
|
||||
0 0 1 2
|
||||
0 0 0 0
|
@ -1,24 +0,0 @@
|
||||
From 97977a1534ef27247acc9549f5433ef288f208eb Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Mon, 23 Sep 2013 11:25:04 +0300
|
||||
Subject: [PATCH 228/752] ARM/dts: am335x-evmsk: Remove num-serializer
|
||||
property for mcasp node
|
||||
|
||||
The num-serializer property is redundant and the driver no longer needs it.
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
---
|
||||
arch/arm/boot/dts/am335x-evmsk.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
@@ -479,7 +479,7 @@
|
||||
|
||||
op-mode = <0>; /* MCASP_IIS_MODE */
|
||||
tdm-slots = <2>;
|
||||
- num-serializer = <16>;
|
||||
+ /* 16 serializer */
|
||||
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
|
||||
0 0 1 2
|
||||
0 0 0 0
|
@ -1,18 +0,0 @@
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -678,6 +678,15 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ lcdc: lcdc@4830e000 {
|
||||
+ compatible = "ti,am33xx-tilcdc";
|
||||
+ reg = <0x4830e000 0x1000>;
|
||||
+ interrupt-parent = <&intc>;
|
||||
+ interrupts = <36>;
|
||||
+ ti,hwmods = "lcdc";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
tscadc: tscadc@44e0d000 {
|
||||
compatible = "ti,am3359-tscadc";
|
||||
reg = <0x44e0d000 0x1000>;
|
File diff suppressed because it is too large
Load Diff
@ -1,57 +0,0 @@
|
||||
From patchwork Thu Aug 29 23:27:52 2013
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [2/3] crypto: omap-des: Add config and build options
|
||||
From: Joel Fernandes <joelf@ti.com>
|
||||
X-Patchwork-Id: 2851671
|
||||
Message-Id: <1377818873-21174-3-git-send-email-joelf@ti.com>
|
||||
To: Herbert Xu <herbert@gondor.hengli.com.au>, "David S. Miller"
|
||||
<davem@davemloft.net>, Mark Greer <mgreer@animalcreek.com>, Tony Lindgren
|
||||
<tony@atomide.com>, Lokesh Vutla <lokeshvutla@ti.com>
|
||||
Cc: Joel Fernandes <joelf@ti.com>,
|
||||
Linux OMAP List <linux-omap@vger.kernel.org>,
|
||||
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
|
||||
Linux ARM Kernel List <linux-arm-kernel@lists.infradead.org>,
|
||||
Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
|
||||
Date: Thu, 29 Aug 2013 18:27:52 -0500
|
||||
|
||||
Add config and build options for the newly added omap-des driver.
|
||||
|
||||
Signed-off-by: Joel Fernandes <joelf@ti.com>
|
||||
|
||||
---
|
||||
drivers/crypto/Kconfig | 11 +++++++++++
|
||||
drivers/crypto/Makefile | 1 +
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
--- a/drivers/crypto/Kconfig
|
||||
+++ b/drivers/crypto/Kconfig
|
||||
@@ -263,6 +263,17 @@ config CRYPTO_DEV_OMAP_AES
|
||||
OMAP processors have AES module accelerator. Select this if you
|
||||
want to use the OMAP module for AES algorithms.
|
||||
|
||||
+config CRYPTO_DEV_OMAP_DES
|
||||
+ tristate "Support for OMAP DES3DES hw engine"
|
||||
+ depends on ARCH_OMAP2PLUS
|
||||
+ select CRYPTO_DES
|
||||
+ select CRYPTO_BLKCIPHER2
|
||||
+ help
|
||||
+ OMAP processors have DES/3DES module accelerator. Select this if you
|
||||
+ want to use the OMAP module for DES and 3DES algorithms. Currently
|
||||
+ the ECB and CBC modes of operation supported by the driver. Also
|
||||
+ accesses made on unaligned boundaries are also supported.
|
||||
+
|
||||
config CRYPTO_DEV_PICOXCELL
|
||||
tristate "Support for picoXcell IPSEC and Layer2 crypto engines"
|
||||
depends on ARCH_PICOXCELL && HAVE_CLK
|
||||
--- a/drivers/crypto/Makefile
|
||||
+++ b/drivers/crypto/Makefile
|
||||
@@ -11,6 +11,7 @@ obj-$(CONFIG_CRYPTO_DEV_IXP4XX) += ixp4x
|
||||
obj-$(CONFIG_CRYPTO_DEV_PPC4XX) += amcc/
|
||||
obj-$(CONFIG_CRYPTO_DEV_OMAP_SHAM) += omap-sham.o
|
||||
obj-$(CONFIG_CRYPTO_DEV_OMAP_AES) += omap-aes.o
|
||||
+obj-$(CONFIG_CRYPTO_DEV_OMAP_DES) += omap-des.o
|
||||
obj-$(CONFIG_CRYPTO_DEV_PICOXCELL) += picoxcell_crypto.o
|
||||
obj-$(CONFIG_CRYPTO_DEV_SAHARA) += sahara.o
|
||||
obj-$(CONFIG_CRYPTO_DEV_DCP) += dcp.o
|
@ -1,111 +0,0 @@
|
||||
From patchwork Thu Aug 29 23:27:53 2013
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [3/3] crypto: omap-des: Add triple DES (des3_ede) support to driver
|
||||
From: Joel Fernandes <joelf@ti.com>
|
||||
X-Patchwork-Id: 2851679
|
||||
Message-Id: <1377818873-21174-4-git-send-email-joelf@ti.com>
|
||||
To: Herbert Xu <herbert@gondor.hengli.com.au>, "David S. Miller"
|
||||
<davem@davemloft.net>, Mark Greer <mgreer@animalcreek.com>, Tony Lindgren
|
||||
<tony@atomide.com>, Lokesh Vutla <lokeshvutla@ti.com>
|
||||
Cc: Joel Fernandes <joelf@ti.com>,
|
||||
Linux OMAP List <linux-omap@vger.kernel.org>,
|
||||
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
|
||||
Linux ARM Kernel List <linux-arm-kernel@lists.infradead.org>,
|
||||
Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
|
||||
Date: Thu, 29 Aug 2013 18:27:53 -0500
|
||||
|
||||
OMAP DES module supports 3DES operation where 3 64-bit keys are used to
|
||||
perform a DES encrypt-decrypt-encrypt (ede) operation on a buffer.
|
||||
|
||||
Signed-off-by: Joel Fernandes <joelf@ti.com>
|
||||
|
||||
---
|
||||
drivers/crypto/omap-des.c | 53 ++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 50 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/crypto/omap-des.c
|
||||
+++ b/drivers/crypto/omap-des.c
|
||||
@@ -83,7 +83,7 @@ struct omap_des_ctx {
|
||||
struct omap_des_dev *dd;
|
||||
|
||||
int keylen;
|
||||
- u32 key[DES_KEY_SIZE / sizeof(u32)];
|
||||
+ u32 key[(3 * DES_KEY_SIZE) / sizeof(u32)];
|
||||
unsigned long flags;
|
||||
};
|
||||
|
||||
@@ -265,8 +265,10 @@ static int omap_des_write_ctrl(struct om
|
||||
val |= DES_REG_CTRL_CBC;
|
||||
if (dd->flags & FLAGS_ENCRYPT)
|
||||
val |= DES_REG_CTRL_DIRECTION;
|
||||
+ if (key32 == 6)
|
||||
+ val |= DES_REG_CTRL_TDES;
|
||||
|
||||
- mask |= DES_REG_CTRL_CBC | DES_REG_CTRL_DIRECTION;
|
||||
+ mask |= DES_REG_CTRL_CBC | DES_REG_CTRL_DIRECTION | DES_REG_CTRL_TDES;
|
||||
|
||||
omap_des_write_mask(dd, DES_REG_CTRL(dd), val, mask);
|
||||
|
||||
@@ -725,7 +727,7 @@ static int omap_des_setkey(struct crypto
|
||||
{
|
||||
struct omap_des_ctx *ctx = crypto_ablkcipher_ctx(tfm);
|
||||
|
||||
- if (keylen != DES_KEY_SIZE)
|
||||
+ if (keylen != DES_KEY_SIZE && keylen != (3*DES_KEY_SIZE))
|
||||
return -EINVAL;
|
||||
|
||||
pr_debug("enter, keylen: %d\n", keylen);
|
||||
@@ -815,6 +817,51 @@ static struct crypto_alg algs_ecb_cbc[]
|
||||
.ivsize = DES_BLOCK_SIZE,
|
||||
.setkey = omap_des_setkey,
|
||||
.encrypt = omap_des_cbc_encrypt,
|
||||
+ .decrypt = omap_des_cbc_decrypt,
|
||||
+ }
|
||||
+},
|
||||
+{
|
||||
+ .cra_name = "ecb(des3_ede)",
|
||||
+ .cra_driver_name = "ecb-des3-omap",
|
||||
+ .cra_priority = 100,
|
||||
+ .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
|
||||
+ CRYPTO_ALG_KERN_DRIVER_ONLY |
|
||||
+ CRYPTO_ALG_ASYNC,
|
||||
+ .cra_blocksize = DES_BLOCK_SIZE,
|
||||
+ .cra_ctxsize = sizeof(struct omap_des_ctx),
|
||||
+ .cra_alignmask = 0,
|
||||
+ .cra_type = &crypto_ablkcipher_type,
|
||||
+ .cra_module = THIS_MODULE,
|
||||
+ .cra_init = omap_des_cra_init,
|
||||
+ .cra_exit = omap_des_cra_exit,
|
||||
+ .cra_u.ablkcipher = {
|
||||
+ .min_keysize = 3*DES_KEY_SIZE,
|
||||
+ .max_keysize = 3*DES_KEY_SIZE,
|
||||
+ .setkey = omap_des_setkey,
|
||||
+ .encrypt = omap_des_ecb_encrypt,
|
||||
+ .decrypt = omap_des_ecb_decrypt,
|
||||
+ }
|
||||
+},
|
||||
+{
|
||||
+ .cra_name = "cbc(des3_ede)",
|
||||
+ .cra_driver_name = "cbc-des3-omap",
|
||||
+ .cra_priority = 100,
|
||||
+ .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER |
|
||||
+ CRYPTO_ALG_KERN_DRIVER_ONLY |
|
||||
+ CRYPTO_ALG_ASYNC,
|
||||
+ .cra_blocksize = DES_BLOCK_SIZE,
|
||||
+ .cra_ctxsize = sizeof(struct omap_des_ctx),
|
||||
+ .cra_alignmask = 0,
|
||||
+ .cra_type = &crypto_ablkcipher_type,
|
||||
+ .cra_module = THIS_MODULE,
|
||||
+ .cra_init = omap_des_cra_init,
|
||||
+ .cra_exit = omap_des_cra_exit,
|
||||
+ .cra_u.ablkcipher = {
|
||||
+ .min_keysize = 3*DES_KEY_SIZE,
|
||||
+ .max_keysize = 3*DES_KEY_SIZE,
|
||||
+ .ivsize = DES_BLOCK_SIZE,
|
||||
+ .setkey = omap_des_setkey,
|
||||
+ .encrypt = omap_des_cbc_encrypt,
|
||||
.decrypt = omap_des_cbc_decrypt,
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
From c1bac171c4f203101611110869bd2511c8153974 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Thu, 10 Oct 2013 16:44:41 +0000
|
||||
Subject: ARM: dts: omap4-panda-es: Do not reset gpio1
|
||||
|
||||
Do not reset GPIO1 at boot-up because GPIO 7 in GPIO1 block is used on
|
||||
OMAP4460 PandaBoard-ES to select voltage register in TPS62361 which
|
||||
supplies VDD_MPU.
|
||||
|
||||
Without this, OMAP4460 PandaBoard-ES boards fail to boot-up because
|
||||
MPU voltage switches over to VSET0 voltage value (boot voltage) which
|
||||
is not sufficient to operate the device at OPP100.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
|
||||
---
|
||||
--- a/arch/arm/boot/dts/omap4-panda-es.dts
|
||||
+++ b/arch/arm/boot/dts/omap4-panda-es.dts
|
||||
@@ -62,3 +62,7 @@
|
||||
gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+&gpio1 {
|
||||
+ ti,no-reset-on-init;
|
||||
+};
|
@ -1,40 +0,0 @@
|
||||
From e7243b7673a20ac28cfdc78c8862587ea8173a39 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Pargmann <mpa@pengutronix.de>
|
||||
Date: Mon, 14 Oct 2013 12:49:21 +0000
|
||||
Subject: ARM: dts: am33xx, change usb ctrl module label
|
||||
|
||||
Control module is not usb specific.
|
||||
Changes the label to usb_ctrl_mod.
|
||||
|
||||
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
||||
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
|
||||
---
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -406,7 +406,7 @@
|
||||
ti,hwmods = "usb_otg_hs";
|
||||
status = "disabled";
|
||||
|
||||
- ctrl_mod: control@44e10000 {
|
||||
+ usb_ctrl_mod: control@44e10000 {
|
||||
compatible = "ti,am335x-usb-ctrl-module";
|
||||
reg = <0x44e10620 0x10
|
||||
0x44e10648 0x4>;
|
||||
@@ -419,7 +419,7 @@
|
||||
reg = <0x47401300 0x100>;
|
||||
reg-names = "phy";
|
||||
status = "disabled";
|
||||
- ti,ctrl_mod = <&ctrl_mod>;
|
||||
+ ti,ctrl_mod = <&usb_ctrl_mod>;
|
||||
};
|
||||
|
||||
usb0: usb@47401000 {
|
||||
@@ -467,7 +467,7 @@
|
||||
reg = <0x47401b00 0x100>;
|
||||
reg-names = "phy";
|
||||
status = "disabled";
|
||||
- ti,ctrl_mod = <&ctrl_mod>;
|
||||
+ ti,ctrl_mod = <&usb_ctrl_mod>;
|
||||
};
|
||||
|
||||
usb1: usb@47401800 {
|
@ -1,36 +0,0 @@
|
||||
From 92d51856d7405fa55bcf3d6f20d7e97e0bf2656c Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Wed, 16 Oct 2013 15:39:01 +0000
|
||||
Subject: ARM: OMAP3+: do not register non-dt OPP tables for device tree boot
|
||||
|
||||
OMAP3+ supports both device tree and non-device tree boot.
|
||||
Device tree bindings for OMAP3+ is supposed to be added via dts following:
|
||||
Documentation/devicetree/bindings/power/opp.txt
|
||||
|
||||
Since we now have device tree entries for OMAP3+ cpu OPPs,
|
||||
The current code wrongly adds duplicate OPPs. So, dont register OPPs
|
||||
when booting using device tree.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
--- a/arch/arm/mach-omap2/opp.c
|
||||
+++ b/arch/arm/mach-omap2/opp.c
|
||||
@@ -17,6 +17,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
#include <linux/opp.h>
|
||||
#include <linux/cpu.h>
|
||||
|
||||
@@ -40,6 +41,9 @@ int __init omap_init_opp_table(struct om
|
||||
{
|
||||
int i, r;
|
||||
|
||||
+ if (of_have_populated_dt())
|
||||
+ return -EINVAL;
|
||||
+
|
||||
if (!opp_def || !opp_def_size) {
|
||||
pr_err("%s: invalid params!\n", __func__);
|
||||
return -EINVAL;
|
@ -1,127 +0,0 @@
|
||||
From 765e7a067eebf372687048ba0242e27f43cf0d71 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Wed, 16 Oct 2013 15:39:02 +0000
|
||||
Subject: ARM: OMAP2+: add missing lateinit hook for calling pm late init
|
||||
|
||||
AM335x, AM43xx, OMAP5 and DRA7 have missing late init hook. Introduce
|
||||
SoC specific hook with a call to OMAP2+ generic lateinit hook. This
|
||||
allows the generic late initializations such as cpufreq hooks to be
|
||||
active.
|
||||
|
||||
Based on out-of-tree patches that need to be introduced in
|
||||
mainline, this introduction allows us to provide the foundation for
|
||||
further SoC specific features as they are developed.
|
||||
|
||||
Cc: Benoit Cousson <bcousson@baylibre.com>
|
||||
Cc: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
Cc: Paul Walmsley <paul@pwsan.com>
|
||||
Cc: Tony Lindgren <tony@atomide.com>
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
--- a/arch/arm/mach-omap2/board-generic.c
|
||||
+++ b/arch/arm/mach-omap2/board-generic.c
|
||||
@@ -180,6 +180,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM3
|
||||
.init_irq = omap_intc_of_init,
|
||||
.handle_irq = omap3_intc_handle_irq,
|
||||
.init_machine = omap_generic_init,
|
||||
+ .init_late = am33xx_init_late,
|
||||
.init_time = omap3_gptimer_timer_init,
|
||||
.dt_compat = am33xx_boards_compat,
|
||||
.restart = am33xx_restart,
|
||||
@@ -219,6 +220,7 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP
|
||||
.init_early = omap5_init_early,
|
||||
.init_irq = omap_gic_of_init,
|
||||
.init_machine = omap_generic_init,
|
||||
+ .init_late = omap5_init_late,
|
||||
.init_time = omap5_realtime_timer_init,
|
||||
.dt_compat = omap5_boards_compat,
|
||||
.restart = omap44xx_restart,
|
||||
@@ -234,6 +236,7 @@ static const char *am43_boards_compat[]
|
||||
DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)")
|
||||
.map_io = am33xx_map_io,
|
||||
.init_early = am43xx_init_early,
|
||||
+ .init_late = am43xx_init_late,
|
||||
.init_irq = omap_gic_of_init,
|
||||
.init_machine = omap_generic_init,
|
||||
.init_time = omap3_sync32k_timer_init,
|
||||
@@ -252,6 +255,7 @@ DT_MACHINE_START(DRA7XX_DT, "Generic DRA
|
||||
.smp = smp_ops(omap4_smp_ops),
|
||||
.map_io = omap5_map_io,
|
||||
.init_early = dra7xx_init_early,
|
||||
+ .init_late = dra7xx_init_late,
|
||||
.init_irq = omap_gic_of_init,
|
||||
.init_machine = omap_generic_init,
|
||||
.init_time = omap5_realtime_timer_init,
|
||||
--- a/arch/arm/mach-omap2/common.h
|
||||
+++ b/arch/arm/mach-omap2/common.h
|
||||
@@ -98,6 +98,7 @@ void am35xx_init_early(void);
|
||||
void ti81xx_init_early(void);
|
||||
void am33xx_init_early(void);
|
||||
void am43xx_init_early(void);
|
||||
+void am43xx_init_late(void);
|
||||
void omap4430_init_early(void);
|
||||
void omap5_init_early(void);
|
||||
void omap3_init_late(void); /* Do not use this one */
|
||||
@@ -109,8 +110,11 @@ void omap35xx_init_late(void);
|
||||
void omap3630_init_late(void);
|
||||
void am35xx_init_late(void);
|
||||
void ti81xx_init_late(void);
|
||||
+void am33xx_init_late(void);
|
||||
+void omap5_init_late(void);
|
||||
int omap2_common_pm_late_init(void);
|
||||
void dra7xx_init_early(void);
|
||||
+void dra7xx_init_late(void);
|
||||
|
||||
#ifdef CONFIG_SOC_BUS
|
||||
void omap_soc_device_init(void);
|
||||
--- a/arch/arm/mach-omap2/io.c
|
||||
+++ b/arch/arm/mach-omap2/io.c
|
||||
@@ -583,6 +583,11 @@ void __init am33xx_init_early(void)
|
||||
omap_hwmod_init_postsetup();
|
||||
omap_clk_init = am33xx_clk_init;
|
||||
}
|
||||
+
|
||||
+void __init am33xx_init_late(void)
|
||||
+{
|
||||
+ omap_common_late_init();
|
||||
+}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOC_AM43XX
|
||||
@@ -596,6 +601,11 @@ void __init am43xx_init_early(void)
|
||||
omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE), NULL);
|
||||
omap3xxx_check_revision();
|
||||
}
|
||||
+
|
||||
+void __init am43xx_init_late(void)
|
||||
+{
|
||||
+ omap_common_late_init();
|
||||
+}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP4
|
||||
@@ -651,6 +661,11 @@ void __init omap5_init_early(void)
|
||||
omap54xx_hwmod_init();
|
||||
omap_hwmod_init_postsetup();
|
||||
}
|
||||
+
|
||||
+void __init omap5_init_late(void)
|
||||
+{
|
||||
+ omap_common_late_init();
|
||||
+}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOC_DRA7XX
|
||||
@@ -671,6 +686,11 @@ void __init dra7xx_init_early(void)
|
||||
dra7xx_hwmod_init();
|
||||
omap_hwmod_init_postsetup();
|
||||
}
|
||||
+
|
||||
+void __init dra7xx_init_late(void)
|
||||
+{
|
||||
+ omap_common_late_init();
|
||||
+}
|
||||
#endif
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
From 60c5fc86d01154e2a005bf701f495426ebc81f73 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Wed, 16 Oct 2013 15:39:03 +0000
|
||||
Subject: ARM: OMAP3+: use cpu0-cpufreq driver in device tree supported boot
|
||||
|
||||
With OMAP3+ and AM33xx supported SoC having defined CPU device tree
|
||||
entries with operating-points and clock nodes defined, we can now use
|
||||
the SoC generic cpufreq-cpu0 driver by registering appropriate device.
|
||||
|
||||
Cc: Benoit Cousson <bcousson@baylibre.com>
|
||||
Cc: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
Cc: Paul Walmsley <paul@pwsan.com>
|
||||
Cc: Tony Lindgren <tony@atomide.com>
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
--- a/arch/arm/mach-omap2/pm.c
|
||||
+++ b/arch/arm/mach-omap2/pm.c
|
||||
@@ -266,7 +266,12 @@ static void __init omap4_init_voltages(v
|
||||
|
||||
static inline void omap_init_cpufreq(void)
|
||||
{
|
||||
- struct platform_device_info devinfo = { .name = "omap-cpufreq", };
|
||||
+ struct platform_device_info devinfo = { };
|
||||
+
|
||||
+ if (!of_have_populated_dt())
|
||||
+ devinfo.name = "omap-cpufreq";
|
||||
+ else
|
||||
+ devinfo.name = "cpufreq-cpu0";
|
||||
platform_device_register_full(&devinfo);
|
||||
}
|
||||
|
||||
@@ -300,10 +305,11 @@ int __init omap2_common_pm_late_init(voi
|
||||
/* Smartreflex device init */
|
||||
omap_devinit_smartreflex();
|
||||
|
||||
- /* cpufreq dummy device instantiation */
|
||||
- omap_init_cpufreq();
|
||||
}
|
||||
|
||||
+ /* cpufreq dummy device instantiation */
|
||||
+ omap_init_cpufreq();
|
||||
+
|
||||
#ifdef CONFIG_SUSPEND
|
||||
suspend_set_ops(&omap_pm_ops);
|
||||
#endif
|
@ -1,78 +0,0 @@
|
||||
From b86684d70f1e45cae4a85686e6f78d5db341fa85 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sre@debian.org>
|
||||
Date: Tue, 22 Oct 2013 22:49:37 +0000
|
||||
Subject: ARM: dts: TWL4030: Add missing regulators
|
||||
|
||||
The twl4030.dtsi is missing some regulators. This patch adds
|
||||
the missing ones and orders the regulators alphabetically.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sre@debian.org>
|
||||
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
|
||||
---
|
||||
--- a/arch/arm/boot/dts/twl4030.dtsi
|
||||
+++ b/arch/arm/boot/dts/twl4030.dtsi
|
||||
@@ -23,6 +23,22 @@
|
||||
compatible = "ti,twl4030-wdt";
|
||||
};
|
||||
|
||||
+ vaux1: regulator-vaux1 {
|
||||
+ compatible = "ti,twl4030-vaux1";
|
||||
+ };
|
||||
+
|
||||
+ vaux2: regulator-vaux2 {
|
||||
+ compatible = "ti,twl4030-vaux2";
|
||||
+ };
|
||||
+
|
||||
+ vaux3: regulator-vaux3 {
|
||||
+ compatible = "ti,twl4030-vaux3";
|
||||
+ };
|
||||
+
|
||||
+ vaux4: regulator-vaux4 {
|
||||
+ compatible = "ti,twl4030-vaux4";
|
||||
+ };
|
||||
+
|
||||
vcc: regulator-vdd1 {
|
||||
compatible = "ti,twl4030-vdd1";
|
||||
regulator-min-microvolt = <600000>;
|
||||
@@ -35,10 +51,20 @@
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
- vpll2: regulator-vpll2 {
|
||||
- compatible = "ti,twl4030-vpll2";
|
||||
- regulator-min-microvolt = <1800000>;
|
||||
- regulator-max-microvolt = <1800000>;
|
||||
+ vio: regulator-vio {
|
||||
+ compatible = "ti,twl4030-vio";
|
||||
+ };
|
||||
+
|
||||
+ vintana1: regulator-vintana1 {
|
||||
+ compatible = "ti,twl4030-vintana1";
|
||||
+ };
|
||||
+
|
||||
+ vintana2: regulator-vintana2 {
|
||||
+ compatible = "ti,twl4030-vintana2";
|
||||
+ };
|
||||
+
|
||||
+ vintdig: regulator-vintdig {
|
||||
+ compatible = "ti,twl4030-vintdig";
|
||||
};
|
||||
|
||||
vmmc1: regulator-vmmc1 {
|
||||
@@ -65,6 +91,16 @@
|
||||
compatible = "ti,twl4030-vusb3v1";
|
||||
};
|
||||
|
||||
+ vpll1: regulator-vpll1 {
|
||||
+ compatible = "ti,twl4030-vpll1";
|
||||
+ };
|
||||
+
|
||||
+ vpll2: regulator-vpll2 {
|
||||
+ compatible = "ti,twl4030-vpll2";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ };
|
||||
+
|
||||
vsim: regulator-vsim {
|
||||
compatible = "ti,twl4030-vsim";
|
||||
regulator-min-microvolt = <1800000>;
|
@ -1,22 +0,0 @@
|
||||
From a3317d4f2fcd064071bc188cbbc2769dda73e487 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sre@debian.org>
|
||||
Date: Tue, 22 Oct 2013 22:49:43 +0000
|
||||
Subject: ARM: dts: TWL4030: Add power button support
|
||||
|
||||
Enable support for the power button.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sre@debian.org>
|
||||
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
|
||||
---
|
||||
--- a/arch/arm/boot/dts/twl4030.dtsi
|
||||
+++ b/arch/arm/boot/dts/twl4030.dtsi
|
||||
@@ -133,4 +133,9 @@
|
||||
compatible = "ti,twl4030-pwmled";
|
||||
#pwm-cells = <2>;
|
||||
};
|
||||
+
|
||||
+ twl_pwrbutton: pwrbutton {
|
||||
+ compatible = "ti,twl4030-pwrbutton";
|
||||
+ interrupts = <8>;
|
||||
+ };
|
||||
};
|
@ -1,26 +0,0 @@
|
||||
From d4cbe80db468dcfaa058f9f00a332784e5dff316 Mon Sep 17 00:00:00 2001
|
||||
From: Suman Anna <s-anna@ti.com>
|
||||
Date: Thu, 10 Oct 2013 21:15:35 +0000
|
||||
Subject: ARM: dts: AM33XX: Add hwspinlock node
|
||||
|
||||
Add the hwspinlock device tree node for AM33xx family
|
||||
of SoCs.
|
||||
|
||||
Signed-off-by: Suman Anna <s-anna@ti.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -278,6 +278,12 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ hwspinlock: spinlock@480ca000 {
|
||||
+ compatible = "ti,omap4-hwspinlock";
|
||||
+ reg = <0x480ca000 0x1000>;
|
||||
+ ti,hwmods = "spinlock";
|
||||
+ };
|
||||
+
|
||||
wdt2: wdt@44e35000 {
|
||||
compatible = "ti,omap3-wdt";
|
||||
ti,hwmods = "wd_timer2";
|
@ -1,52 +0,0 @@
|
||||
From ed845d6b78bf32b396f7f1278eed0b87446934b1 Mon Sep 17 00:00:00 2001
|
||||
From: Lokesh Vutla <lokeshvutla@ti.com>
|
||||
Date: Thu, 29 Aug 2013 12:52:09 +0000
|
||||
Subject: ARM: dts: AM33xx: Add RNG node
|
||||
|
||||
Add the AM33xx RNG module's device tree data.
|
||||
Also add Documentation file describing the data
|
||||
for the RNG module.
|
||||
|
||||
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
|
||||
@@ -0,0 +1,22 @@
|
||||
+OMAP SoC HWRNG Module
|
||||
+
|
||||
+Required properties:
|
||||
+
|
||||
+- compatible : Should contain entries for this and backward compatible
|
||||
+ RNG versions:
|
||||
+ - "ti,omap2-rng" for OMAP2.
|
||||
+ - "ti,omap4-rng" for OMAP4, OMAP5 and AM33XX.
|
||||
+ Note that these two versions are incompatible.
|
||||
+- ti,hwmods: Name of the hwmod associated with the RNG module
|
||||
+- reg : Offset and length of the register set for the module
|
||||
+- interrupts : the interrupt number for the RNG module.
|
||||
+ Only used for "ti,omap4-rng".
|
||||
+
|
||||
+Example:
|
||||
+/* AM335x */
|
||||
+rng: rng@48310000 {
|
||||
+ compatible = "ti,omap4-rng";
|
||||
+ ti,hwmods = "rng";
|
||||
+ reg = <0x48310000 0x2000>;
|
||||
+ interrupts = <111>;
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||
@@ -770,5 +770,12 @@
|
||||
dma-names = "tx", "rx";
|
||||
};
|
||||
|
||||
+ rng: rng@48310000 {
|
||||
+ compatible = "ti,omap4-rng";
|
||||
+ ti,hwmods = "rng";
|
||||
+ reg = <0x48310000 0x2000>;
|
||||
+ interrupts = <111>;
|
||||
+ };
|
||||
+
|
||||
};
|
||||
};
|
@ -1,155 +0,0 @@
|
||||
When running with DT, we no longer have a board file that can set up the
|
||||
platform data for wlcore. Allow this data to be passed from DT.
|
||||
|
||||
Since some platforms use a gpio-irq, add support for passing either the
|
||||
irq number or the gpio number. For the latter case, the driver will
|
||||
request the gpio and convert it to the irq number. If an irq is
|
||||
specified, it'll be used as is.
|
||||
|
||||
[Arik - the pdev_data pointer does not belong to us and is freed when
|
||||
the device is released. Dereference to our private data first.]
|
||||
|
||||
Signed-off-by: Ido Yariv <ido@wizery.com>
|
||||
Signed-off-by: Arik Nemtsov <arik@wizery.com>
|
||||
---
|
||||
drivers/net/wireless/ti/wlcore/sdio.c | 71 ++++++++++++++++++++++++++++++++---
|
||||
include/linux/wl12xx.h | 3 +-
|
||||
2 files changed, 67 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ti/wlcore/sdio.c
|
||||
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <linux/wl12xx.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/printk.h>
|
||||
+#include <linux/of.h>
|
||||
|
||||
#include "wlcore.h"
|
||||
#include "wl12xx_80211.h"
|
||||
@@ -214,6 +215,61 @@ static struct wl1271_if_operations sdio_
|
||||
.set_block_size = wl1271_sdio_set_block_size,
|
||||
};
|
||||
|
||||
+static const struct of_device_id wlcore_of_match[] = {
|
||||
+ {
|
||||
+ .compatible = "wlcore",
|
||||
+ },
|
||||
+ {}
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, wlcore_of_match);
|
||||
+
|
||||
+static struct wl12xx_platform_data *get_platform_data(struct device *dev)
|
||||
+{
|
||||
+ struct wl12xx_platform_data *pdata;
|
||||
+ struct device_node *np;
|
||||
+ u32 gpio;
|
||||
+
|
||||
+ pdata = wl12xx_get_platform_data();
|
||||
+ if (!IS_ERR(pdata))
|
||||
+ return kmemdup(pdata, sizeof(*pdata), GFP_KERNEL);
|
||||
+
|
||||
+ np = of_find_matching_node(NULL, wlcore_of_match);
|
||||
+ if (!np) {
|
||||
+ dev_err(dev, "No platform data set\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
|
||||
+ if (!pdata) {
|
||||
+ dev_err(dev, "Can't allocate platform data\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (of_property_read_u32(np, "irq", &pdata->irq)) {
|
||||
+ if (!of_property_read_u32(np, "gpio", &gpio) &&
|
||||
+ !gpio_request_one(gpio, GPIOF_IN, "wlcore_irq")) {
|
||||
+ pdata->gpio = gpio;
|
||||
+ pdata->irq = gpio_to_irq(gpio);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Optional fields */
|
||||
+ pdata->use_eeprom = of_property_read_bool(np, "use-eeprom");
|
||||
+ of_property_read_u32(np, "board-ref-clock", &pdata->board_ref_clock);
|
||||
+ of_property_read_u32(np, "board-tcxo-clock", &pdata->board_tcxo_clock);
|
||||
+ of_property_read_u32(np, "platform-quirks", &pdata->platform_quirks);
|
||||
+
|
||||
+ return pdata;
|
||||
+}
|
||||
+
|
||||
+static void del_platform_data(struct wl12xx_platform_data *pdata)
|
||||
+{
|
||||
+ if (pdata->gpio)
|
||||
+ gpio_free(pdata->gpio);
|
||||
+
|
||||
+ kfree(pdata);
|
||||
+}
|
||||
+
|
||||
static int wl1271_probe(struct sdio_func *func,
|
||||
const struct sdio_device_id *id)
|
||||
{
|
||||
@@ -248,12 +304,9 @@ static int wl1271_probe(struct sdio_func
|
||||
/* Use block mode for transferring over one block size of data */
|
||||
func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE;
|
||||
|
||||
- pdev_data->pdata = wl12xx_get_platform_data();
|
||||
- if (IS_ERR(pdev_data->pdata)) {
|
||||
- ret = PTR_ERR(pdev_data->pdata);
|
||||
- dev_err(glue->dev, "missing wlan platform data: %d\n", ret);
|
||||
+ pdev_data->pdata = get_platform_data(&func->dev);
|
||||
+ if (!(pdev_data->pdata))
|
||||
goto out_free_glue;
|
||||
- }
|
||||
|
||||
/* if sdio can keep power while host is suspended, enable wow */
|
||||
mmcflags = sdio_get_host_pm_caps(func);
|
||||
@@ -282,7 +335,7 @@ static int wl1271_probe(struct sdio_func
|
||||
if (!glue->core) {
|
||||
dev_err(glue->dev, "can't allocate platform_device");
|
||||
ret = -ENOMEM;
|
||||
- goto out_free_glue;
|
||||
+ goto out_free_pdata;
|
||||
}
|
||||
|
||||
glue->core->dev.parent = &func->dev;
|
||||
@@ -316,6 +369,9 @@ static int wl1271_probe(struct sdio_func
|
||||
out_dev_put:
|
||||
platform_device_put(glue->core);
|
||||
|
||||
+out_free_pdata:
|
||||
+ del_platform_data(pdev_data->pdata);
|
||||
+
|
||||
out_free_glue:
|
||||
kfree(glue);
|
||||
|
||||
@@ -329,11 +385,14 @@ out:
|
||||
static void wl1271_remove(struct sdio_func *func)
|
||||
{
|
||||
struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func);
|
||||
+ struct wlcore_platdev_data *pdev_data = glue->core->dev.platform_data;
|
||||
+ struct wl12xx_platform_data *pdata = pdev_data->pdata;
|
||||
|
||||
/* Undo decrement done above in wl1271_probe */
|
||||
pm_runtime_get_noresume(&func->dev);
|
||||
|
||||
platform_device_unregister(glue->core);
|
||||
+ del_platform_data(pdata);
|
||||
kfree(glue);
|
||||
}
|
||||
|
||||
--- a/include/linux/wl12xx.h
|
||||
+++ b/include/linux/wl12xx.h
|
||||
@@ -51,11 +51,12 @@ enum {
|
||||
struct wl12xx_platform_data {
|
||||
void (*set_power)(bool enable);
|
||||
/* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */
|
||||
+ int gpio;
|
||||
int irq;
|
||||
bool use_eeprom;
|
||||
int board_ref_clock;
|
||||
int board_tcxo_clock;
|
||||
- unsigned long platform_quirks;
|
||||
+ u32 platform_quirks;
|
||||
bool pwr_in_suspend;
|
||||
};
|
||||
|
@ -1,81 +0,0 @@
|
||||
From 157c4071cb8a588c4e619b69447010a0ee68d844 Mon Sep 17 00:00:00 2001
|
||||
From: Darren Etheridge <detheridge@ti.com>
|
||||
Date: Thu, 17 Oct 2013 14:53:37 -0500
|
||||
Subject: [PATCH 568/752] arm: dts: am335x-evmsk: add support for lcd panel
|
||||
|
||||
Add the necessary DT entries for probing the LCDC in fbdev and
|
||||
setting the correct timings for the NHD-4.3 LCD panel.
|
||||
---
|
||||
arch/arm/boot/dts/am335x-evmsk.dts | 54 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 54 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
@@ -35,6 +35,39 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gpio_keys_s0 &clkout2_pin>;
|
||||
|
||||
+ lcd_pins_s0: lcd_pins_s0 {
|
||||
+ pinctrl-single,pins = <
|
||||
+ 0x20 0x01 /* gpmc_ad8.lcd_data16, OUTPUT | MODE1 */
|
||||
+ 0x24 0x01 /* gpmc_ad9.lcd_data17, OUTPUT | MODE1 */
|
||||
+ 0x28 0x01 /* gpmc_ad10.lcd_data18, OUTPUT | MODE1 */
|
||||
+ 0x2c 0x01 /* gpmc_ad11.lcd_data19, OUTPUT | MODE1 */
|
||||
+ 0x30 0x01 /* gpmc_ad12.lcd_data20, OUTPUT | MODE1 */
|
||||
+ 0x34 0x01 /* gpmc_ad13.lcd_data21, OUTPUT | MODE1 */
|
||||
+ 0x38 0x01 /* gpmc_ad14.lcd_data22, OUTPUT | MODE1 */
|
||||
+ 0x3c 0x01 /* gpmc_ad15.lcd_data23, OUTPUT | MODE1 */
|
||||
+ 0xa0 0x00 /* lcd_data0.lcd_data0, OUTPUT | MODE0 */
|
||||
+ 0xa4 0x00 /* lcd_data1.lcd_data1, OUTPUT | MODE0 */
|
||||
+ 0xa8 0x00 /* lcd_data2.lcd_data2, OUTPUT | MODE0 */
|
||||
+ 0xac 0x00 /* lcd_data3.lcd_data3, OUTPUT | MODE0 */
|
||||
+ 0xb0 0x00 /* lcd_data4.lcd_data4, OUTPUT | MODE0 */
|
||||
+ 0xb4 0x00 /* lcd_data5.lcd_data5, OUTPUT | MODE0 */
|
||||
+ 0xb8 0x00 /* lcd_data6.lcd_data6, OUTPUT | MODE0 */
|
||||
+ 0xbc 0x00 /* lcd_data7.lcd_data7, OUTPUT | MODE0 */
|
||||
+ 0xc0 0x00 /* lcd_data8.lcd_data8, OUTPUT | MODE0 */
|
||||
+ 0xc4 0x00 /* lcd_data9.lcd_data9, OUTPUT | MODE0 */
|
||||
+ 0xc8 0x00 /* lcd_data10.lcd_data10, OUTPUT | MODE0 */
|
||||
+ 0xcc 0x00 /* lcd_data11.lcd_data11, OUTPUT | MODE0 */
|
||||
+ 0xd0 0x00 /* lcd_data12.lcd_data12, OUTPUT | MODE0 */
|
||||
+ 0xd4 0x00 /* lcd_data13.lcd_data13, OUTPUT | MODE0 */
|
||||
+ 0xd8 0x00 /* lcd_data14.lcd_data14, OUTPUT | MODE0 */
|
||||
+ 0xdc 0x00 /* lcd_data15.lcd_data15, OUTPUT | MODE0 */
|
||||
+ 0xe0 0x00 /* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */
|
||||
+ 0xe4 0x00 /* lcd_hsync.lcd_hsync, OUTPUT | MODE0 */
|
||||
+ 0xe8 0x00 /* lcd_pclk.lcd_pclk, OUTPUT | MODE0 */
|
||||
+ 0xec 0x00 /* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
user_leds_s0: user_leds_s0 {
|
||||
pinctrl-single,pins = <
|
||||
0x10 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad4.gpio1_4 */
|
||||
@@ -255,6 +288,27 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ lcdc: lcdc@4830e000 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&lcd_pins_s0>;
|
||||
+ status = "okay";
|
||||
+ display-timings {
|
||||
+ 480x272 {
|
||||
+ hactive = <480>;
|
||||
+ vactive = <272>;
|
||||
+ hback-porch = <43>;
|
||||
+ hfront-porch = <8>;
|
||||
+ hsync-len = <4>;
|
||||
+ vback-porch = <12>;
|
||||
+ vfront-porch = <4>;
|
||||
+ vsync-len = <10>;
|
||||
+ clock-frequency = <9000000>;
|
||||
+ hsync-active = <0>;
|
||||
+ vsync-active = <0>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
sound {
|
||||
compatible = "ti,da830-evm-audio";
|
||||
ti,model = "AM335x-EVMSK";
|
@ -1,32 +0,0 @@
|
||||
From 588b7a5db74c02bcf0b3ac57b6391debffbff74c Mon Sep 17 00:00:00 2001
|
||||
From: Felipe Balbi <balbi@ti.com>
|
||||
Date: Mon, 21 Oct 2013 15:06:54 -0500
|
||||
Subject: [PATCH 582/752] arm: dts: am335x sk: add touchscreen support
|
||||
|
||||
Add missing nodes for the touchscreen available
|
||||
on AM335x EVM SK.
|
||||
|
||||
Signed-off-by: Felipe Balbi <balbi@ti.com>
|
||||
---
|
||||
arch/arm/boot/dts/am335x-evmsk.dts | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
@@ -513,6 +513,16 @@
|
||||
vmmc-supply = <&vmmc_reg>;
|
||||
};
|
||||
|
||||
+&tscadc {
|
||||
+ status = "okay";
|
||||
+ tsc {
|
||||
+ ti,wires = <4>;
|
||||
+ ti,x-plate-resistance = <200>;
|
||||
+ ti,coordinate-readouts = <5>;
|
||||
+ ti,wire-config = <0x00 0x11 0x22 0x33>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&gpio0 {
|
||||
ti,no-reset-on-init;
|
||||
};
|
@ -1,71 +0,0 @@
|
||||
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||
@@ -14,6 +14,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "am33xx.dtsi"
|
||||
+#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
/ {
|
||||
@@ -200,6 +201,26 @@
|
||||
0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
|
||||
>;
|
||||
};
|
||||
+
|
||||
+ wilink_pins: pinmux_wilink_pins {
|
||||
+ pinctrl-single,pins = <
|
||||
+ 0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_31 */
|
||||
+ 0x7c (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_csn0.gpio1_29 */
|
||||
+ 0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
|
||||
+ 0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
|
||||
+ 0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
|
||||
+ 0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
|
||||
+ 0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
|
||||
+ 0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
|
||||
+ >;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ wlan {
|
||||
+ compatible = "wlcore";
|
||||
+ gpio = <31>;
|
||||
+
|
||||
+ board-ref-clock = <4>;
|
||||
};
|
||||
|
||||
ocp {
|
||||
@@ -335,6 +356,16 @@
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
+ vmmc_wl: fixedregulator@2 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vmmc-wl";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ gpio = <&gpio1 29 0>;
|
||||
+ startup-delay-us = <70000>;
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&user_leds_s0>;
|
||||
@@ -535,6 +566,16 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&mmc2 {
|
||||
+ status = "okay";
|
||||
+ vmmc-supply = <&vmmc_wl>;
|
||||
+ bus-width = <4>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wilink_pins>;
|
||||
+ ti,non-removable;
|
||||
+ keep-power-in-suspend;
|
||||
+};
|
||||
+
|
||||
&mcasp1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mcasp1_pins>;
|
Loading…
Reference in New Issue
Block a user