[omap]: replace the TI patch with a smaller patchset
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38816 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
6bf4a75ce9
commit
b041af2c64
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,211 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/video/da8xx-fb.txt b/Documentation/devicetree/bindings/video/da8xx-fb.txt
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..d86afe7
|
||||||
|
--- /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>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
|
||||||
|
index e030e17..74cc2dc 100644
|
||||||
|
--- 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_device *device)
|
||||||
|
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_device *device)
|
||||||
|
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_device *device)
|
||||||
|
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_device *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_driver = {
|
||||||
|
.driver = {
|
||||||
|
.name = DRIVER_NAME,
|
||||||
|
.owner = THIS_MODULE,
|
||||||
|
+ .of_match_table = of_match_ptr(da8xx_fb_of_match),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
|
@ -0,0 +1,98 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
|
||||||
|
index c534d45..77dc477 100644
|
||||||
|
--- a/drivers/video/da8xx-fb.c
|
||||||
|
+++ b/drivers/video/da8xx-fb.c
|
||||||
|
@@ -235,6 +235,9 @@ static struct fb_fix_screeninfo da8xx_fb_fix = {
|
||||||
|
.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] = {
|
||||||
|
@@ -916,6 +919,32 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg,
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
@@ -953,6 +982,8 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
|
||||||
|
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) {
|
||||||
|
@@ -1028,6 +1059,8 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg)
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/include/video/da8xx-fb.h b/include/video/da8xx-fb.h
|
||||||
|
index 74c986a..2a0c739 100644
|
||||||
|
--- a/include/video/da8xx-fb.h
|
||||||
|
+++ b/include/video/da8xx-fb.h
|
||||||
|
@@ -106,5 +106,9 @@ void da8xx_register_encoder(struct da8xx_encoder *encoder);
|
||||||
|
void da8xx_unregister_encoder(struct da8xx_encoder *encoder);
|
||||||
|
|
||||||
|
|
||||||
|
+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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
|
||||||
|
index 212d2ac..d6825e4 100644
|
||||||
|
--- a/drivers/video/da8xx-fb.c
|
||||||
|
+++ b/drivers/video/da8xx-fb.c
|
||||||
|
@@ -993,6 +993,8 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
|
||||||
|
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
|
||||||
|
@@ -1058,8 +1060,6 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg)
|
||||||
|
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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
index f9c5da9..19a1c1d 100644
|
||||||
|
--- 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";
|
|
@ -0,0 +1,37 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
index 19a1c1d..9ce85e5 100644
|
||||||
|
--- 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";
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,176 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
|
||||||
|
index ed271fc..8c8908a 100644
|
||||||
|
--- 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 voltage cards
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
|
||||||
|
index 7993c48..d5f43fe 100644
|
||||||
|
--- 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>;
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
|
||||||
|
index e8ec875..bc4a69d 100644
|
||||||
|
--- 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>;
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
index 4f339fa..55fd194 100644
|
||||||
|
--- 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>;
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
index 9ce85e5..0a82fca 100644
|
||||||
|
--- 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";
|
|
@ -0,0 +1,165 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
|
||||||
|
index 215894f..2815a91 100644
|
||||||
|
--- 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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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 = {
|
||||||
|
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||||
|
index 9c3b504..1e5b12c 100644
|
||||||
|
--- 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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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 = {
|
||||||
|
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
|
||||||
|
index cde4155..e3caee1 100644
|
||||||
|
--- 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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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 = {
|
|
@ -0,0 +1,105 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
|
||||||
|
index 91b7049..808c154 100644
|
||||||
|
--- 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:
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
index f9c5da9..ec33ea0 100644
|
||||||
|
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
@@ -607,6 +607,7 @@
|
||||||
|
reg = <0x44d00000 0x4000 /* M3 UMEM */
|
||||||
|
0x44d80000 0x2000>; /* M3 DMEM */
|
||||||
|
ti,hwmods = "wkup_m3";
|
||||||
|
+ ti,no-reset-on-init;
|
||||||
|
};
|
||||||
|
|
||||||
|
elm: elm@48080000 {
|
||||||
|
@@ -637,6 +638,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>;
|
||||||
|
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
|
||||||
|
index 22d9f2b..e8fe797 100644
|
||||||
|
--- 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;
|
||||||
|
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
|
||||||
|
index 7cdea1b..a9d49df 100644
|
||||||
|
--- 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>;
|
|
@ -0,0 +1,75 @@
|
||||||
|
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>
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm/mach-omap2/omap_hwmod.c | 23 ++++++++++++++++-------
|
||||||
|
1 file changed, 16 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
|
||||||
|
index d9ee0ff..b55923a 100644
|
||||||
|
--- a/arch/arm/mach-omap2/omap_hwmod.c
|
||||||
|
+++ b/arch/arm/mach-omap2/omap_hwmod.c
|
||||||
|
@@ -2363,11 +2363,11 @@ static struct device_node *of_dev_hwmod_lookup(struct device_node *np,
|
||||||
|
* are part of the device's address space can be ioremapped properly.
|
||||||
|
* No return value.
|
||||||
|
*/
|
||||||
|
-static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
|
||||||
|
+static void __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;
|
||||||
|
@@ -2383,12 +2383,10 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
|
||||||
|
oh->name);
|
||||||
|
|
||||||
|
/* Extract the IO space from device tree blob */
|
||||||
|
- if (!of_have_populated_dt())
|
||||||
|
+ if (!np)
|
||||||
|
return;
|
||||||
|
|
||||||
|
- 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);
|
||||||
|
}
|
||||||
|
@@ -2420,12 +2418,16 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
|
||||||
|
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)
|
||||||
|
- _init_mpu_rt_base(oh, NULL);
|
||||||
|
+ _init_mpu_rt_base(oh, NULL, np);
|
||||||
|
|
||||||
|
r = _init_clocks(oh, NULL);
|
||||||
|
if (r < 0) {
|
||||||
|
@@ -2433,6 +2435,13 @@ static int __init _init(struct omap_hwmod *oh, void *data)
|
||||||
|
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;
|
|
@ -0,0 +1,92 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
|
||||||
|
index 2815a91..e8dc72d 100644
|
||||||
|
--- 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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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 = {
|
||||||
|
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||||
|
index 1e5b12c..a507a70 100644
|
||||||
|
--- 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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
* 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,
|
||||||
|
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
|
||||||
|
index e3caee1..e47f24d 100644
|
||||||
|
--- 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_hwmod = {
|
||||||
|
.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_hwmod = {
|
||||||
|
.name = "emif2",
|
||||||
|
.class = &omap54xx_emif_hwmod_class,
|
||||||
|
.clkdm_name = "emif_clkdm",
|
||||||
|
- .flags = HWMOD_INIT_NO_IDLE,
|
||||||
|
.main_clk = "dpll_core_h11x2_ck",
|
||||||
|
.prcm = {
|
||||||
|
.omap4 = {
|
|
@ -0,0 +1,24 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
index 4f339fa..0e44d29 100644
|
||||||
|
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
@@ -419,3 +419,7 @@
|
||||||
|
phy_id = <&davinci_mdio>, <1>;
|
||||||
|
phy-mode = "rgmii-txid";
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+&gpio0 {
|
||||||
|
+ ti,no-reset-on-init;
|
||||||
|
+};
|
|
@ -0,0 +1,108 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/crypto/omap-sham.txt b/Documentation/devicetree/bindings/crypto/omap-sham.txt
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..f839acd
|
||||||
|
--- /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";
|
||||||
|
+ };
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
|
||||||
|
index 0d63348..8a9802e 100644
|
||||||
|
--- a/arch/arm/boot/dts/am335x-bone.dts
|
||||||
|
+++ b/arch/arm/boot/dts/am335x-bone.dts
|
||||||
|
@@ -19,3 +19,7 @@
|
||||||
|
&mmc1 {
|
||||||
|
vmmc-supply = <&ldo3_reg>;
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+&sham {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
|
||||||
|
index 23b0a3e..d59e51c 100644
|
||||||
|
--- a/arch/arm/boot/dts/am335x-evm.dts
|
||||||
|
+++ b/arch/arm/boot/dts/am335x-evm.dts
|
||||||
|
@@ -522,3 +522,7 @@
|
||||||
|
status = "okay";
|
||||||
|
vmmc-supply = <&vmmc_reg>;
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+&sham {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
index bc93895..d45a330 100644
|
||||||
|
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
@@ -424,3 +424,7 @@
|
||||||
|
status = "okay";
|
||||||
|
vmmc-supply = <&vmmc_reg>;
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+&sham {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
index 553adc6..299710b 100644
|
||||||
|
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
@@ -710,5 +710,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";
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,112 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/crypto/omap-aes.txt b/Documentation/devicetree/bindings/crypto/omap-aes.txt
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..fd97176
|
||||||
|
--- /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";
|
||||||
|
+ };
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
|
||||||
|
index 8a9802e..94ee427 100644
|
||||||
|
--- a/arch/arm/boot/dts/am335x-bone.dts
|
||||||
|
+++ b/arch/arm/boot/dts/am335x-bone.dts
|
||||||
|
@@ -23,3 +23,7 @@
|
||||||
|
&sham {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+&aes {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
|
||||||
|
index d59e51c..86463fa 100644
|
||||||
|
--- a/arch/arm/boot/dts/am335x-evm.dts
|
||||||
|
+++ b/arch/arm/boot/dts/am335x-evm.dts
|
||||||
|
@@ -526,3 +526,7 @@
|
||||||
|
&sham {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+&aes {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
index d45a330..f577e65 100644
|
||||||
|
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
@@ -428,3 +428,7 @@
|
||||||
|
&sham {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+&aes {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
index 299710b..2664da9 100644
|
||||||
|
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
@@ -719,5 +719,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";
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,23 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
index 2664da9..5c2d6c1 100644
|
||||||
|
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
@@ -724,7 +724,7 @@
|
||||||
|
compatible = "ti,omap4-aes";
|
||||||
|
ti,hwmods = "aes";
|
||||||
|
reg = <0x53500000 0xa0>;
|
||||||
|
- interrupts = <102>;
|
||||||
|
+ interrupts = <103>;
|
||||||
|
dmas = <&edma 6>,
|
||||||
|
<&edma 5>;
|
||||||
|
dma-names = "tx", "rx";
|
|
@ -0,0 +1,64 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
|
||||||
|
index 215894f..3e32f45 100644
|
||||||
|
--- 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_l3_main__aes0 = {
|
||||||
|
.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_hwmod_ocp_ifs[] __initdata = {
|
||||||
|
&am33xx_cpgmac0__mdio,
|
||||||
|
&am33xx_l3_main__sha0,
|
||||||
|
&am33xx_l3_main__aes0,
|
||||||
|
+ &am33xx_l4_per__rng,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,150 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
|
||||||
|
index fd7c45b..2f8161c 100644
|
||||||
|
--- 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_substream *substream,
|
||||||
|
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_dai = {
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 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_card = {
|
||||||
|
.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_card = {
|
||||||
|
.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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,261 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt b/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..e6b61ff
|
||||||
|
--- /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";
|
||||||
|
+};
|
||||||
|
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
|
||||||
|
index 2f8161c..340a68d 100644
|
||||||
|
--- 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_pcm_runtime *rtd)
|
||||||
|
{
|
||||||
|
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_card = {
|
||||||
|
.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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,178 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
|
||||||
|
index 374e145..63b67ae 100644
|
||||||
|
--- 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>;
|
||||||
|
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
|
||||||
|
index 32ddb7f..a056fc5 100644
|
||||||
|
--- a/sound/soc/davinci/davinci-mcasp.c
|
||||||
|
+++ b/sound/soc/davinci/davinci-mcasp.c
|
||||||
|
@@ -1001,18 +1001,40 @@ static const struct snd_soc_component_driver davinci_mcasp_component = {
|
||||||
|
.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_mcasp_set_pdata_from_of(
|
||||||
|
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 platform_device *pdev)
|
||||||
|
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 platform_device *pdev)
|
||||||
|
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 platform_device *pdev)
|
||||||
|
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_driver);
|
||||||
|
MODULE_AUTHOR("Steve Chen");
|
||||||
|
MODULE_DESCRIPTION("TI DAVINCI McASP SoC Interface");
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
|
-
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
|
@ -0,0 +1,137 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
|
||||||
|
index 63b67ae..68e0f47 100644
|
||||||
|
--- 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:
|
||||||
|
|
||||||
|
diff --git a/include/linux/platform_data/davinci_asp.h b/include/linux/platform_data/davinci_asp.h
|
||||||
|
index 8db5ae0..689a856 100644
|
||||||
|
--- 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 {
|
||||||
|
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
|
||||||
|
index a056fc5..acbf5f8 100644
|
||||||
|
--- a/sound/soc/davinci/davinci-mcasp.c
|
||||||
|
+++ b/sound/soc/davinci/davinci-mcasp.c
|
||||||
|
@@ -1047,6 +1047,7 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
|
||||||
|
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_mcasp_set_pdata_from_of(
|
||||||
|
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 platform_device *pdev)
|
||||||
|
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 platform_device *pdev)
|
||||||
|
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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
|
||||||
|
index 68e0f47..2fd0bf2 100644
|
||||||
|
--- 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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig
|
||||||
|
index c82f89c..95970f5 100644
|
||||||
|
--- 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
|
||||||
|
diff --git a/sound/soc/davinci/Makefile b/sound/soc/davinci/Makefile
|
||||||
|
index a396ab6..bc81e79 100644
|
||||||
|
--- a/sound/soc/davinci/Makefile
|
||||||
|
+++ b/sound/soc/davinci/Makefile
|
||||||
|
@@ -13,6 +13,7 @@ obj-$(CONFIG_SND_DAVINCI_SOC_VCIF) += snd-soc-davinci-vcif.o
|
||||||
|
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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
|
||||||
|
index 705a6b1..ba26477 100644
|
||||||
|
--- 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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
|
||||||
|
index ba26477..5e6040c 100644
|
||||||
|
--- 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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
index 6eb809c..4fb3521 100644
|
||||||
|
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
@@ -839,6 +839,25 @@
|
||||||
|
clocks = <&rng_fck>;
|
||||||
|
clock-names = "fck";
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ 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";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
};
|
||||||
|
|
||||||
|
clocks {
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
index 4fb3521..b9e2ff3 100644
|
||||||
|
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
@@ -843,19 +843,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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
|
||||||
|
index bc4a69d..664fa2a 100644
|
||||||
|
--- 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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
|
||||||
|
index 664fa2a..baeb805 100644
|
||||||
|
--- 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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
|
||||||
|
index baeb805..e52d09c 100644
|
||||||
|
--- 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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
|
||||||
|
index e52d09c..47613fd 100644
|
||||||
|
--- 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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,100 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
index 879981d..b87ce7f 100644
|
||||||
|
--- 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 {
|
||||||
|
@@ -430,3 +462,22 @@
|
||||||
|
status = "okay";
|
||||||
|
vmmc-supply = <&vmmc_reg>;
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+&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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,97 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
|
||||||
|
index 2fd0bf2..be6cf94 100644
|
||||||
|
--- 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
|
||||||
|
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
|
||||||
|
index acbf5f8..69e662e 100644
|
||||||
|
--- a/sound/soc/davinci/davinci-mcasp.c
|
||||||
|
+++ b/sound/soc/davinci/davinci-mcasp.c
|
||||||
|
@@ -1050,7 +1050,6 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
|
||||||
|
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_mcasp_set_pdata_from_of(
|
||||||
|
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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
|
||||||
|
index 47613fd..c4494a2 100644
|
||||||
|
--- 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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
index b87ce7f..354c0e5 100644
|
||||||
|
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
@@ -471,7 +471,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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
@@ -682,6 +682,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
|
@ -0,0 +1,61 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
|
||||||
|
index e289afa..119a8e5 100644
|
||||||
|
--- a/drivers/crypto/Kconfig
|
||||||
|
+++ b/drivers/crypto/Kconfig
|
||||||
|
@@ -259,6 +259,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
|
||||||
|
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
|
||||||
|
index 38ce13d..ada440f 100644
|
||||||
|
--- a/drivers/crypto/Makefile
|
||||||
|
+++ b/drivers/crypto/Makefile
|
||||||
|
@@ -11,6 +11,7 @@ obj-$(CONFIG_CRYPTO_DEV_IXP4XX) += ixp4xx_crypto.o
|
||||||
|
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_S5P) += s5p-sss.o
|
|
@ -0,0 +1,113 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c
|
||||||
|
index 6a9a25f..0df60cb 100644
|
||||||
|
--- 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 omap_des_dev *dd)
|
||||||
|
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_ablkcipher *tfm, const u8 *key,
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
@@ -817,6 +819,51 @@ static struct crypto_alg algs_ecb_cbc[] = {
|
||||||
|
.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,
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
diff --git a/arch/arm/boot/dts/omap4-panda-es.dts b/arch/arm/boot/dts/omap4-panda-es.dts
|
||||||
|
index 56c4354..816d1c9 100644
|
||||||
|
--- 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;
|
||||||
|
+};
|
||||||
|
--
|
||||||
|
cgit v0.9.2
|
|
@ -0,0 +1,28 @@
|
||||||
|
From 0bebda684857f76548ea48c8886785198701d8d3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Markus Pargmann <mpa@pengutronix.de>
|
||||||
|
Date: Thu, 17 Oct 2013 07:18:38 +0000
|
||||||
|
Subject: ARM: OMAP2+: irq, AM33XX add missing register check
|
||||||
|
|
||||||
|
am33xx has a INTC_PENDING_IRQ3 register that is not checked for pending
|
||||||
|
interrupts. This patch adds AM33XX to the ifdef of SOCs that have to
|
||||||
|
check this register.
|
||||||
|
|
||||||
|
Cc: stable@vger.kernel.org
|
||||||
|
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
|
||||||
|
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||||
|
---
|
||||||
|
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
|
||||||
|
index 3926f37..e022a86 100644
|
||||||
|
--- a/arch/arm/mach-omap2/irq.c
|
||||||
|
+++ b/arch/arm/mach-omap2/irq.c
|
||||||
|
@@ -233,7 +233,7 @@ static inline void omap_intc_handle_irq(void __iomem *base_addr, struct pt_regs
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
irqnr = readl_relaxed(base_addr + 0xd8);
|
||||||
|
-#ifdef CONFIG_SOC_TI81XX
|
||||||
|
+#if IS_ENABLED(CONFIG_SOC_TI81XX) || IS_ENABLED(CONFIG_SOC_AM33XX)
|
||||||
|
if (irqnr)
|
||||||
|
goto out;
|
||||||
|
irqnr = readl_relaxed(base_addr + 0xf8);
|
||||||
|
--
|
||||||
|
cgit v0.9.2
|
|
@ -0,0 +1,44 @@
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
index 97f5019..0ca13ad 100644
|
||||||
|
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
@@ -416,7 +416,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>;
|
||||||
|
@@ -429,7 +429,7 @@
|
||||||
|
reg = <0x47401300 0x100>;
|
||||||
|
reg-names = "phy";
|
||||||
|
status = "disabled";
|
||||||
|
- ti,ctrl_mod = <&ctrl_mod>;
|
||||||
|
+ ti,ctrl_mod = <&usb_ctrl_mod>;
|
||||||
|
};
|
||||||
|
|
||||||
|
usb0: usb@47401000 {
|
||||||
|
@@ -477,7 +477,7 @@
|
||||||
|
reg = <0x47401b00 0x100>;
|
||||||
|
reg-names = "phy";
|
||||||
|
status = "disabled";
|
||||||
|
- ti,ctrl_mod = <&ctrl_mod>;
|
||||||
|
+ ti,ctrl_mod = <&usb_ctrl_mod>;
|
||||||
|
};
|
||||||
|
|
||||||
|
usb1: usb@47401800 {
|
||||||
|
--
|
||||||
|
cgit v0.9.2
|
|
@ -0,0 +1,40 @@
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c
|
||||||
|
index bd41d59..82fd8c7 100644
|
||||||
|
--- 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 omap_opp_def *opp_def,
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
--
|
||||||
|
cgit v0.9.2
|
|
@ -0,0 +1,135 @@
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
|
||||||
|
index 3896b12..19f1652 100644
|
||||||
|
--- a/arch/arm/mach-omap2/board-generic.c
|
||||||
|
+++ b/arch/arm/mach-omap2/board-generic.c
|
||||||
|
@@ -146,6 +146,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
|
||||||
|
.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,
|
||||||
|
@@ -185,6 +186,7 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
|
||||||
|
.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,
|
||||||
|
@@ -200,6 +202,7 @@ static const char *am43_boards_compat[] __initdata = {
|
||||||
|
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,
|
||||||
|
@@ -218,6 +221,7 @@ DT_MACHINE_START(DRA7XX_DT, "Generic DRA7XX (Flattened Device Tree)")
|
||||||
|
.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,
|
||||||
|
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
|
||||||
|
index c6aebf0..f7644fe 100644
|
||||||
|
--- 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);
|
||||||
|
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
|
||||||
|
index ff2113c..a2cbb44 100644
|
||||||
|
--- 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
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
cgit v0.9.2
|
|
@ -0,0 +1,50 @@
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
|
||||||
|
index e742118..360b2da 100644
|
||||||
|
--- a/arch/arm/mach-omap2/pm.c
|
||||||
|
+++ b/arch/arm/mach-omap2/pm.c
|
||||||
|
@@ -266,7 +266,12 @@ static void __init omap4_init_voltages(void)
|
||||||
|
|
||||||
|
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(void)
|
||||||
|
/* 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
|
||||||
|
--
|
||||||
|
cgit v0.9.2
|
|
@ -0,0 +1,82 @@
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
diff --git a/arch/arm/boot/dts/twl4030.dtsi b/arch/arm/boot/dts/twl4030.dtsi
|
||||||
|
index ae6a17a..cb5afcd 100644
|
||||||
|
--- 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>;
|
||||||
|
--
|
||||||
|
cgit v0.9.2
|
|
@ -0,0 +1,26 @@
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
diff --git a/arch/arm/boot/dts/twl4030.dtsi b/arch/arm/boot/dts/twl4030.dtsi
|
||||||
|
index cb5afcd..af7fa40 100644
|
||||||
|
--- 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>;
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
--
|
||||||
|
cgit v0.9.2
|
|
@ -0,0 +1,30 @@
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
index 0ca13ad..9ae258e 100644
|
||||||
|
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
@@ -288,6 +288,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";
|
||||||
|
--
|
||||||
|
cgit v0.9.2
|
|
@ -0,0 +1,60 @@
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
diff --git a/Documentation/devicetree/bindings/hwrng/omap_rng.txt b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..6a62acd
|
||||||
|
--- /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>;
|
||||||
|
+};
|
||||||
|
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
index 9ae258e..fcb9c8e 100644
|
||||||
|
--- a/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/am33xx.dtsi
|
||||||
|
@@ -750,5 +750,12 @@
|
||||||
|
<&edma 11>;
|
||||||
|
dma-names = "tx", "rx";
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ rng: rng@48310000 {
|
||||||
|
+ compatible = "ti,omap4-rng";
|
||||||
|
+ ti,hwmods = "rng";
|
||||||
|
+ reg = <0x48310000 0x2000>;
|
||||||
|
+ interrupts = <111>;
|
||||||
|
+ };
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
--
|
||||||
|
cgit v0.9.2
|
|
@ -0,0 +1,86 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
index 354c0e5..ae18889 100644
|
||||||
|
--- 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.7.10.4
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
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(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
index 7fae4e0..ddbf6ca 100644
|
||||||
|
--- a/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
|
||||||
|
@@ -454,6 +454,16 @@
|
||||||
|
phy-mode = "rgmii-txid";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&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;
|
||||||
|
};
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
Loading…
Reference in New Issue