* [PATCH v2 0/6] ARM: davinci: da850: add/enable video capture
@ 2017-01-09 20:55 Kevin Hilman
2017-01-09 20:55 ` [PATCH v2 1/6] ARM: dts: davinci: da850: VPIF: add node and muxing Kevin Hilman
` (5 more replies)
0 siblings, 6 replies; 14+ messages in thread
From: Kevin Hilman @ 2017-01-09 20:55 UTC (permalink / raw)
To: linux-arm-kernel
Add support for VPIF video capture using DT (partially.)
The main VPIF device, and its pin muxing are using DT, but legacy
platform_data is still required for the vpif_capture driver. Passing
legacy platform_data is required until the V4L2 framework, and
subdevice drivers (such as the tvp514x) grow a way of selecting input
and output routing (c.f. V4L2 s_routing API)
Dependencies:
- VPIF driver changes:
[PATCH v6 0/5] davinci: VPIF: add DT support
https://marc.info/?l=linux-arm-kernel&m=148113556200610
Changes since v1:
- split DT patches into separate SoC and board patches
- split pdata-quirks into base/skeleton driver and da8xx
Kevin Hilman (6):
ARM: dts: davinci: da850: VPIF: add node and muxing
ARM: dts: davinci: da850-evm: enable VPIF
ARM: dts: davinci: da850-lcdk: enable VPIF
ARM: davinci: add skeleton for pdata-quirks
ARM: davinci: da8xx: add pdata-quirks, use for VPIF capture
ARM: davinci: board-da850-evm: add I2C ID for VPIF
arch/arm/boot/dts/da850-evm.dts | 20 ++++
arch/arm/boot/dts/da850-lcdk.dts | 13 +++
arch/arm/boot/dts/da850.dtsi | 26 ++++-
arch/arm/mach-davinci/Makefile | 2 +-
arch/arm/mach-davinci/board-da850-evm.c | 1 +
arch/arm/mach-davinci/da8xx-dt.c | 2 +
arch/arm/mach-davinci/include/mach/common.h | 2 +
arch/arm/mach-davinci/pdata-quirks.c | 154 ++++++++++++++++++++++++++++
8 files changed, 218 insertions(+), 2 deletions(-)
create mode 100644 arch/arm/mach-davinci/pdata-quirks.c
--
2.9.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 1/6] ARM: dts: davinci: da850: VPIF: add node and muxing
2017-01-09 20:55 [PATCH v2 0/6] ARM: davinci: da850: add/enable video capture Kevin Hilman
@ 2017-01-09 20:55 ` Kevin Hilman
2017-01-10 9:35 ` Sekhar Nori
2017-01-09 20:55 ` [PATCH v2 2/6] ARM: dts: davinci: da850-evm: enable VPIF Kevin Hilman
` (4 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Kevin Hilman @ 2017-01-09 20:55 UTC (permalink / raw)
To: linux-arm-kernel
Add VPIF node an pins to da850 SoC. VPIF has two input channels which
can be described using the standard DT ports and enpoints.
Signed-off-by: Kevin Hilman <khilman@baylibre•com>
---
arch/arm/boot/dts/da850.dtsi | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 104155d12c2f..edab8bb92ec5 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -208,7 +208,18 @@
0x4c 0x02000022 0x0f0000ff
>;
};
-
+ vpif_capture_pins: vpif_capture_pins {
+ pinctrl-single,bits = <
+ /* VP_DIN[2..7], VP_CLKIN1, VP_CLKIN0 */
+ 0x38 0x11111111 0xffffffff
+ /* VP_DIN[10..15,0..1] */
+ 0x3c 0x11111111 0xffffffff
+ /* VP_DIN[8..9] */
+ 0x40 0x00000011 0x000000ff
+ /* VP_CLKIN3, VP_CLKIN2 */
+ 0x4c 0x00010100 0x000f0f00
+ >;
+ };
};
prictrl: priority-controller at 14110 {
compatible = "ti,da850-mstpri";
@@ -324,6 +335,18 @@
dma-names = "rx", "tx";
status = "disabled";
};
+ vpif: video at 217000 {
+ compatible = "ti,da850-vpif";
+ reg = <0x217000 0x1000>;
+ interrupts = <92>;
+ status = "disabled";
+
+ /* VPIF capture port */
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
mmc1: mmc at 21b000 {
compatible = "ti,da830-mmc";
reg = <0x21b000 0x1000>;
@@ -465,6 +488,7 @@
status = "disabled";
};
};
+
aemif: aemif at 68000000 {
compatible = "ti,da850-aemif";
#address-cells = <2>;
--
2.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 2/6] ARM: dts: davinci: da850-evm: enable VPIF
2017-01-09 20:55 [PATCH v2 0/6] ARM: davinci: da850: add/enable video capture Kevin Hilman
2017-01-09 20:55 ` [PATCH v2 1/6] ARM: dts: davinci: da850: VPIF: add node and muxing Kevin Hilman
@ 2017-01-09 20:55 ` Kevin Hilman
2017-01-10 9:37 ` Sekhar Nori
2017-01-09 20:55 ` [PATCH v2 3/6] ARM: dts: davinci: da850-lcdk: " Kevin Hilman
` (3 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Kevin Hilman @ 2017-01-09 20:55 UTC (permalink / raw)
To: linux-arm-kernel
Enable VPIF node for video capture, and configure ports. EVM board
uses channel 0 for composite input and channel 1 S-Video input.
Signed-off-by: Kevin Hilman <khilman@baylibre•com>
---
arch/arm/boot/dts/da850-evm.dts | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 41de15fe15a2..cea36ee6fd07 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -289,3 +289,23 @@
};
};
};
+
+&vpif {
+ pinctrl-names = "default";
+ pinctrl-0 = <&vpif_capture_pins>;
+ status = "okay";
+
+ /* VPIF capture port */
+ port {
+ vpif_ch0: endpoint at 0 {
+ reg = <0>;
+ bus-width = <8>;
+ };
+
+ vpif_ch1: endpoint at 1 {
+ reg = <1>;
+ bus-width = <8>;
+ data-shift = <8>;
+ };
+ };
+};
--
2.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 3/6] ARM: dts: davinci: da850-lcdk: enable VPIF
2017-01-09 20:55 [PATCH v2 0/6] ARM: davinci: da850: add/enable video capture Kevin Hilman
2017-01-09 20:55 ` [PATCH v2 1/6] ARM: dts: davinci: da850: VPIF: add node and muxing Kevin Hilman
2017-01-09 20:55 ` [PATCH v2 2/6] ARM: dts: davinci: da850-evm: enable VPIF Kevin Hilman
@ 2017-01-09 20:55 ` Kevin Hilman
2017-01-10 9:39 ` Sekhar Nori
2017-01-09 20:55 ` [PATCH v2 4/6] ARM: davinci: add skeleton for pdata-quirks Kevin Hilman
` (2 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Kevin Hilman @ 2017-01-09 20:55 UTC (permalink / raw)
To: linux-arm-kernel
Enable VPIF for video captpure and configure input channel 0, used for
composite input.
Signed-off-by: Kevin Hilman <khilman@baylibre•com>
---
arch/arm/boot/dts/da850-lcdk.dts | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/arch/arm/boot/dts/da850-lcdk.dts
index afcb4821deb1..9b1f3695607c 100644
--- a/arch/arm/boot/dts/da850-lcdk.dts
+++ b/arch/arm/boot/dts/da850-lcdk.dts
@@ -236,3 +236,16 @@
&memctrl {
status = "okay";
};
+
+&vpif {
+ pinctrl-names = "default";
+ pinctrl-0 = <&vpif_capture_pins>;
+ status = "okay";
+
+ /* VPIF capture port */
+ port {
+ vpif_ch0: endpoint {
+ bus-width = <8>;
+ };
+ };
+};
--
2.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 4/6] ARM: davinci: add skeleton for pdata-quirks
2017-01-09 20:55 [PATCH v2 0/6] ARM: davinci: da850: add/enable video capture Kevin Hilman
` (2 preceding siblings ...)
2017-01-09 20:55 ` [PATCH v2 3/6] ARM: dts: davinci: da850-lcdk: " Kevin Hilman
@ 2017-01-09 20:55 ` Kevin Hilman
2017-01-10 10:26 ` Sekhar Nori
2017-01-09 20:55 ` [PATCH v2 5/6] ARM: davinci: da8xx: add pdata-quirks, use for VPIF capture Kevin Hilman
2017-01-09 20:55 ` [PATCH v2 6/6] ARM: davinci: board-da850-evm: add I2C ID for VPIF Kevin Hilman
5 siblings, 1 reply; 14+ messages in thread
From: Kevin Hilman @ 2017-01-09 20:55 UTC (permalink / raw)
To: linux-arm-kernel
Add skeleton pdata-quirks for for davinci.
Signed-off-by: Kevin Hilman <khilman@baylibre•com>
---
arch/arm/mach-davinci/include/mach/common.h | 2 ++
arch/arm/mach-davinci/pdata-quirks.c | 39 +++++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
create mode 100644 arch/arm/mach-davinci/pdata-quirks.c
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index 0b3c169758ed..037aa66bcac1 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -102,6 +102,8 @@ int davinci_pm_init(void);
static inline int davinci_pm_init(void) { return 0; }
#endif
+void __init pdata_quirks_init(void);
+
#define SRAM_SIZE SZ_128K
#endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */
diff --git a/arch/arm/mach-davinci/pdata-quirks.c b/arch/arm/mach-davinci/pdata-quirks.c
new file mode 100644
index 000000000000..5b57da475065
--- /dev/null
+++ b/arch/arm/mach-davinci/pdata-quirks.c
@@ -0,0 +1,39 @@
+/*
+ * Legacy platform_data quirks
+ *
+ * Copyright (C) 2016 BayLibre, Inc
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/kernel.h>
+#include <linux/of_platform.h>
+
+#include <mach/common.h>
+
+struct pdata_init {
+ const char *compatible;
+ void (*fn)(void);
+};
+
+static void pdata_quirks_check(struct pdata_init *quirks)
+{
+ while (quirks->compatible) {
+ if (of_machine_is_compatible(quirks->compatible)) {
+ if (quirks->fn)
+ quirks->fn();
+ break;
+ }
+ quirks++;
+ }
+}
+
+static struct pdata_init pdata_quirks[] __initdata = {
+ { /* sentinel */ },
+};
+
+void __init pdata_quirks_init(void)
+{
+ pdata_quirks_check(pdata_quirks);
+}
--
2.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 5/6] ARM: davinci: da8xx: add pdata-quirks, use for VPIF capture
2017-01-09 20:55 [PATCH v2 0/6] ARM: davinci: da850: add/enable video capture Kevin Hilman
` (3 preceding siblings ...)
2017-01-09 20:55 ` [PATCH v2 4/6] ARM: davinci: add skeleton for pdata-quirks Kevin Hilman
@ 2017-01-09 20:55 ` Kevin Hilman
2017-01-10 10:41 ` Sekhar Nori
2017-01-09 20:55 ` [PATCH v2 6/6] ARM: davinci: board-da850-evm: add I2C ID for VPIF Kevin Hilman
5 siblings, 1 reply; 14+ messages in thread
From: Kevin Hilman @ 2017-01-09 20:55 UTC (permalink / raw)
To: linux-arm-kernel
For da8xx DT platforms, use pdata-quirks to add legacy platform data for
vpif_capture driver.
Passing legacy platform_data is required until the V4L2 framework, and
subdevice drivers (such as the tvp514x) grow a way of selecting input
and output routing (c.f. V4L2 s_routing API)
Signed-off-by: Kevin Hilman <khilman@baylibre•com>
---
arch/arm/mach-davinci/Makefile | 2 +-
arch/arm/mach-davinci/da8xx-dt.c | 2 +
arch/arm/mach-davinci/pdata-quirks.c | 115 +++++++++++++++++++++++++++++++++++
3 files changed, 118 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
index 0a2e6da45f28..df96ca9eab6d 100644
--- a/arch/arm/mach-davinci/Makefile
+++ b/arch/arm/mach-davinci/Makefile
@@ -21,7 +21,7 @@ obj-$(CONFIG_AINTC) += irq.o
obj-$(CONFIG_CP_INTC) += cp_intc.o
# Board specific
-obj-$(CONFIG_MACH_DA8XX_DT) += da8xx-dt.o
+obj-$(CONFIG_MACH_DA8XX_DT) += da8xx-dt.o pdata-quirks.o
obj-$(CONFIG_MACH_DAVINCI_EVM) += board-dm644x-evm.o
obj-$(CONFIG_MACH_SFFSDR) += board-sffsdr.o
obj-$(CONFIG_MACH_NEUROS_OSD2) += board-neuros-osd2.o
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 9ee44da6eb7b..fe4a9e30d937 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -42,6 +42,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci-da8xx", NULL),
OF_DEV_AUXDATA("ti,da830-musb", 0x01e00000, "musb-da8xx", NULL),
OF_DEV_AUXDATA("ti,da830-usb-phy", 0x01c1417c, "da8xx-usb-phy", NULL),
+ OF_DEV_AUXDATA("ti,da850-vpif", 0x01e17000, "vpif", NULL),
{}
};
@@ -62,6 +63,7 @@ static void __init da850_init_machine(void)
of_platform_default_populate(NULL, da850_auxdata_lookup, NULL);
davinci_pm_init();
+ pdata_quirks_init();
}
static const char *const da850_boards_compat[] __initconst = {
diff --git a/arch/arm/mach-davinci/pdata-quirks.c b/arch/arm/mach-davinci/pdata-quirks.c
index 5b57da475065..142a2684c445 100644
--- a/arch/arm/mach-davinci/pdata-quirks.c
+++ b/arch/arm/mach-davinci/pdata-quirks.c
@@ -10,13 +10,122 @@
#include <linux/kernel.h>
#include <linux/of_platform.h>
+#include <media/i2c/tvp514x.h>
+
#include <mach/common.h>
+#include <mach/da8xx.h>
struct pdata_init {
const char *compatible;
void (*fn)(void);
};
+#if IS_ENABLED(CONFIG_VIDEO_DAVINCI_VPIF_CAPTURE)
+
+#define TVP5147_CH0 "tvp514x-0"
+#define TVP5147_CH1 "tvp514x-1"
+
+/* VPIF capture configuration */
+static struct tvp514x_platform_data tvp5146_pdata = {
+ .clk_polarity = 0,
+ .hs_polarity = 1,
+ .vs_polarity = 1,
+};
+
+#define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
+
+static const struct vpif_input da850_ch0_inputs[] = {
+ {
+ .input = {
+ .index = 0,
+ .name = "Composite",
+ .type = V4L2_INPUT_TYPE_CAMERA,
+ .capabilities = V4L2_IN_CAP_STD,
+ .std = TVP514X_STD_ALL,
+ },
+ .input_route = INPUT_CVBS_VI2B,
+ .output_route = OUTPUT_10BIT_422_EMBEDDED_SYNC,
+ .subdev_name = TVP5147_CH0,
+ },
+};
+
+static const struct vpif_input da850_ch1_inputs[] = {
+ {
+ .input = {
+ .index = 0,
+ .name = "S-Video",
+ .type = V4L2_INPUT_TYPE_CAMERA,
+ .capabilities = V4L2_IN_CAP_STD,
+ .std = TVP514X_STD_ALL,
+ },
+ .input_route = INPUT_SVIDEO_VI2C_VI1C,
+ .output_route = OUTPUT_10BIT_422_EMBEDDED_SYNC,
+ .subdev_name = TVP5147_CH1,
+ },
+};
+
+static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = {
+ {
+ .name = TVP5147_CH0,
+ .board_info = {
+ I2C_BOARD_INFO("tvp5146", 0x5d),
+ .platform_data = &tvp5146_pdata,
+ },
+ },
+ {
+ .name = TVP5147_CH1,
+ .board_info = {
+ I2C_BOARD_INFO("tvp5146", 0x5c),
+ .platform_data = &tvp5146_pdata,
+ },
+ },
+};
+
+static struct vpif_capture_config da850_vpif_capture_config = {
+ .subdev_info = da850_vpif_capture_sdev_info,
+ .subdev_count = ARRAY_SIZE(da850_vpif_capture_sdev_info),
+ .chan_config[0] = {
+ .inputs = da850_ch0_inputs,
+ .input_count = ARRAY_SIZE(da850_ch0_inputs),
+ .vpif_if = {
+ .if_type = VPIF_IF_BT656,
+ .hd_pol = 1,
+ .vd_pol = 1,
+ .fid_pol = 0,
+ },
+ },
+ .chan_config[1] = {
+ .inputs = da850_ch1_inputs,
+ .input_count = ARRAY_SIZE(da850_ch1_inputs),
+ .vpif_if = {
+ .if_type = VPIF_IF_BT656,
+ .hd_pol = 1,
+ .vd_pol = 1,
+ .fid_pol = 0,
+ },
+ },
+ .card_name = "DA850/OMAP-L138 Video Capture",
+};
+
+static void __init da850_vpif_legacy_init(void)
+{
+ int ret;
+
+ /* LCDK doesn't have the 2nd TVP514x on CH1 */
+ if (of_machine_is_compatible("ti,da850-lcdk"))
+ da850_vpif_capture_config.subdev_count = 1;
+
+ /* EVM (UI card) uses i2c adapter 1 (not default: zero) */
+ if (of_machine_is_compatible("ti,da850-evm"))
+ da850_vpif_capture_config.i2c_adapter_id = 1;
+
+ ret = da850_register_vpif_capture(&da850_vpif_capture_config);
+ if (ret)
+ pr_warn("%s: VPIF capture setup failed: %d\n",
+ __func__, ret);
+}
+#endif
+
static void pdata_quirks_check(struct pdata_init *quirks)
{
while (quirks->compatible) {
@@ -30,6 +139,12 @@ static void pdata_quirks_check(struct pdata_init *quirks)
}
static struct pdata_init pdata_quirks[] __initdata = {
+#if IS_ENABLED(CONFIG_VIDEO_DAVINCI_VPIF_CAPTURE)
+ { "ti,da850-lcdk", da850_vpif_legacy_init, },
+#if defined(CONFIG_DA850_UI_SD_VIDEO_PORT)
+ { "ti,da850-evm", da850_vpif_legacy_init, },
+#endif
+#endif
{ /* sentinel */ },
};
--
2.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 6/6] ARM: davinci: board-da850-evm: add I2C ID for VPIF
2017-01-09 20:55 [PATCH v2 0/6] ARM: davinci: da850: add/enable video capture Kevin Hilman
` (4 preceding siblings ...)
2017-01-09 20:55 ` [PATCH v2 5/6] ARM: davinci: da8xx: add pdata-quirks, use for VPIF capture Kevin Hilman
@ 2017-01-09 20:55 ` Kevin Hilman
5 siblings, 0 replies; 14+ messages in thread
From: Kevin Hilman @ 2017-01-09 20:55 UTC (permalink / raw)
To: linux-arm-kernel
VPIF capture driver now has a way to specific I2C adapter ID (was
previously hard-coded.) Use the new interface.
Signed-off-by: Kevin Hilman <khilman@baylibre•com>
---
arch/arm/mach-davinci/board-da850-evm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index aac3ab1a044f..e5d4ded38d12 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1212,6 +1212,7 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = {
static struct vpif_capture_config da850_vpif_capture_config = {
.subdev_info = da850_vpif_capture_sdev_info,
.subdev_count = ARRAY_SIZE(da850_vpif_capture_sdev_info),
+ .i2c_adapter_id = 1,
.chan_config[0] = {
.inputs = da850_ch0_inputs,
.input_count = ARRAY_SIZE(da850_ch0_inputs),
--
2.9.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 1/6] ARM: dts: davinci: da850: VPIF: add node and muxing
2017-01-09 20:55 ` [PATCH v2 1/6] ARM: dts: davinci: da850: VPIF: add node and muxing Kevin Hilman
@ 2017-01-10 9:35 ` Sekhar Nori
0 siblings, 0 replies; 14+ messages in thread
From: Sekhar Nori @ 2017-01-10 9:35 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 10 January 2017 02:25 AM, Kevin Hilman wrote:
> Add VPIF node an pins to da850 SoC. VPIF has two input channels which
s/an/and
> can be described using the standard DT ports and enpoints.
s/enpoints/endpoints
>
> Signed-off-by: Kevin Hilman <khilman@baylibre•com>
> @@ -465,6 +488,7 @@
> status = "disabled";
> };
> };
> +
This seems like a stray newline addition. I dropped it while applying to
v4.11/dt
Thanks,
Sekhar
> aemif: aemif at 68000000 {
> compatible = "ti,da850-aemif";
> #address-cells = <2>;
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 2/6] ARM: dts: davinci: da850-evm: enable VPIF
2017-01-09 20:55 ` [PATCH v2 2/6] ARM: dts: davinci: da850-evm: enable VPIF Kevin Hilman
@ 2017-01-10 9:37 ` Sekhar Nori
0 siblings, 0 replies; 14+ messages in thread
From: Sekhar Nori @ 2017-01-10 9:37 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 10 January 2017 02:25 AM, Kevin Hilman wrote:
> Enable VPIF node for video capture, and configure ports. EVM board
> uses channel 0 for composite input and channel 1 S-Video input.
>
> Signed-off-by: Kevin Hilman <khilman@baylibre•com>
Applied to v4.11/dt
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 3/6] ARM: dts: davinci: da850-lcdk: enable VPIF
2017-01-09 20:55 ` [PATCH v2 3/6] ARM: dts: davinci: da850-lcdk: " Kevin Hilman
@ 2017-01-10 9:39 ` Sekhar Nori
0 siblings, 0 replies; 14+ messages in thread
From: Sekhar Nori @ 2017-01-10 9:39 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 10 January 2017 02:25 AM, Kevin Hilman wrote:
> Enable VPIF for video captpure and configure input channel 0, used for
> composite input.
>
> Signed-off-by: Kevin Hilman <khilman@baylibre•com>
Applied to v4.11/dt
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 4/6] ARM: davinci: add skeleton for pdata-quirks
2017-01-09 20:55 ` [PATCH v2 4/6] ARM: davinci: add skeleton for pdata-quirks Kevin Hilman
@ 2017-01-10 10:26 ` Sekhar Nori
2017-01-10 10:50 ` Sekhar Nori
0 siblings, 1 reply; 14+ messages in thread
From: Sekhar Nori @ 2017-01-10 10:26 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 10 January 2017 02:25 AM, Kevin Hilman wrote:
> Add skeleton pdata-quirks for for davinci.
s/for for/for
>
> Signed-off-by: Kevin Hilman <khilman@baylibre•com>
Applied to v4.11/soc
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 5/6] ARM: davinci: da8xx: add pdata-quirks, use for VPIF capture
2017-01-09 20:55 ` [PATCH v2 5/6] ARM: davinci: da8xx: add pdata-quirks, use for VPIF capture Kevin Hilman
@ 2017-01-10 10:41 ` Sekhar Nori
0 siblings, 0 replies; 14+ messages in thread
From: Sekhar Nori @ 2017-01-10 10:41 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 10 January 2017 02:25 AM, Kevin Hilman wrote:
> For da8xx DT platforms, use pdata-quirks to add legacy platform data for
> vpif_capture driver.
>
> Passing legacy platform_data is required until the V4L2 framework, and
> subdevice drivers (such as the tvp514x) grow a way of selecting input
> and output routing (c.f. V4L2 s_routing API)
>
> Signed-off-by: Kevin Hilman <khilman@baylibre•com>
> ---
> arch/arm/mach-davinci/Makefile | 2 +-
> arch/arm/mach-davinci/da8xx-dt.c | 2 +
> arch/arm/mach-davinci/pdata-quirks.c | 115 +++++++++++++++++++++++++++++++++++
> 3 files changed, 118 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
> index 0a2e6da45f28..df96ca9eab6d 100644
> --- a/arch/arm/mach-davinci/Makefile
> +++ b/arch/arm/mach-davinci/Makefile
> @@ -21,7 +21,7 @@ obj-$(CONFIG_AINTC) += irq.o
> obj-$(CONFIG_CP_INTC) += cp_intc.o
>
> # Board specific
> -obj-$(CONFIG_MACH_DA8XX_DT) += da8xx-dt.o
> +obj-$(CONFIG_MACH_DA8XX_DT) += da8xx-dt.o pdata-quirks.o
This should be done in 4/6 along with addition of pdata-quirks.c
> obj-$(CONFIG_MACH_DAVINCI_EVM) += board-dm644x-evm.o
> obj-$(CONFIG_MACH_SFFSDR) += board-sffsdr.o
> obj-$(CONFIG_MACH_NEUROS_OSD2) += board-neuros-osd2.o
> diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
> index 9ee44da6eb7b..fe4a9e30d937 100644
> --- a/arch/arm/mach-davinci/da8xx-dt.c
> +++ b/arch/arm/mach-davinci/da8xx-dt.c
> @@ -42,6 +42,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
> OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci-da8xx", NULL),
> OF_DEV_AUXDATA("ti,da830-musb", 0x01e00000, "musb-da8xx", NULL),
> OF_DEV_AUXDATA("ti,da830-usb-phy", 0x01c1417c, "da8xx-usb-phy", NULL),
> + OF_DEV_AUXDATA("ti,da850-vpif", 0x01e17000, "vpif", NULL),
> {}
> };
>
> @@ -62,6 +63,7 @@ static void __init da850_init_machine(void)
>
> of_platform_default_populate(NULL, da850_auxdata_lookup, NULL);
> davinci_pm_init();
> + pdata_quirks_init();
This too belongs to 4/6.
Rest of the patch looks good to me. But I cannot apply it until I get a
branch from Mauro with driver changes hosted.
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 4/6] ARM: davinci: add skeleton for pdata-quirks
2017-01-10 10:26 ` Sekhar Nori
@ 2017-01-10 10:50 ` Sekhar Nori
2017-01-10 18:18 ` Kevin Hilman
0 siblings, 1 reply; 14+ messages in thread
From: Sekhar Nori @ 2017-01-10 10:50 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 10 January 2017 03:56 PM, Sekhar Nori wrote:
> On Tuesday 10 January 2017 02:25 AM, Kevin Hilman wrote:
>> Add skeleton pdata-quirks for for davinci.
>
> s/for for/for
>
>>
>> Signed-off-by: Kevin Hilman <khilman@baylibre•com>
>
> Applied to v4.11/soc
After reviewing 5/6, I think some parts of that patch should actually
be part of basic pdata-quirks support addition. I have moved them here.
Here is the updated patch. Let me know if it looks fine.
Thanks,
Sekhar
---8<---
Author: Kevin Hilman <khilman@baylibre•com>
AuthorDate: Mon Jan 9 12:55:29 2017 -0800
Commit: Sekhar Nori <nsekhar@ti•com>
CommitDate: Tue Jan 10 16:12:22 2017 +0530
ARM: davinci: add skeleton for pdata-quirks
Add skeleton pdata-quirks for davinci.
Signed-off-by: Kevin Hilman <khilman@baylibre•com>
[nsekhar at ti.com: move changes to build pdata-quirks.c and call
to pdata_quirks_init() to this patch]
Signed-off-by: Sekhar Nori <nsekhar@ti•com>
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
index 0a2e6da45f28..df96ca9eab6d 100644
--- a/arch/arm/mach-davinci/Makefile
+++ b/arch/arm/mach-davinci/Makefile
@@ -21,7 +21,7 @@ obj-$(CONFIG_AINTC) += irq.o
obj-$(CONFIG_CP_INTC) += cp_intc.o
# Board specific
-obj-$(CONFIG_MACH_DA8XX_DT) += da8xx-dt.o
+obj-$(CONFIG_MACH_DA8XX_DT) += da8xx-dt.o pdata-quirks.o
obj-$(CONFIG_MACH_DAVINCI_EVM) += board-dm644x-evm.o
obj-$(CONFIG_MACH_SFFSDR) += board-sffsdr.o
obj-$(CONFIG_MACH_NEUROS_OSD2) += board-neuros-osd2.o
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 9ee44da6eb7b..d2be1941a687 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -62,6 +62,7 @@ static void __init da850_init_machine(void)
of_platform_default_populate(NULL, da850_auxdata_lookup, NULL);
davinci_pm_init();
+ pdata_quirks_init();
}
static const char *const da850_boards_compat[] __initconst = {
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index 0b3c169758ed..037aa66bcac1 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -102,6 +102,8 @@ int davinci_pm_init(void);
static inline int davinci_pm_init(void) { return 0; }
#endif
+void __init pdata_quirks_init(void);
+
#define SRAM_SIZE SZ_128K
#endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */
diff --git a/arch/arm/mach-davinci/pdata-quirks.c b/arch/arm/mach-davinci/pdata-quirks.c
new file mode 100644
index 000000000000..5b57da475065
--- /dev/null
+++ b/arch/arm/mach-davinci/pdata-quirks.c
@@ -0,0 +1,39 @@
+/*
+ * Legacy platform_data quirks
+ *
+ * Copyright (C) 2016 BayLibre, Inc
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/kernel.h>
+#include <linux/of_platform.h>
+
+#include <mach/common.h>
+
+struct pdata_init {
+ const char *compatible;
+ void (*fn)(void);
+};
+
+static void pdata_quirks_check(struct pdata_init *quirks)
+{
+ while (quirks->compatible) {
+ if (of_machine_is_compatible(quirks->compatible)) {
+ if (quirks->fn)
+ quirks->fn();
+ break;
+ }
+ quirks++;
+ }
+}
+
+static struct pdata_init pdata_quirks[] __initdata = {
+ { /* sentinel */ },
+};
+
+void __init pdata_quirks_init(void)
+{
+ pdata_quirks_check(pdata_quirks);
+}
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v2 4/6] ARM: davinci: add skeleton for pdata-quirks
2017-01-10 10:50 ` Sekhar Nori
@ 2017-01-10 18:18 ` Kevin Hilman
0 siblings, 0 replies; 14+ messages in thread
From: Kevin Hilman @ 2017-01-10 18:18 UTC (permalink / raw)
To: linux-arm-kernel
Sekhar Nori <nsekhar@ti•com> writes:
> On Tuesday 10 January 2017 03:56 PM, Sekhar Nori wrote:
>> On Tuesday 10 January 2017 02:25 AM, Kevin Hilman wrote:
>>> Add skeleton pdata-quirks for for davinci.
>>
>> s/for for/for
>>
>>>
>>> Signed-off-by: Kevin Hilman <khilman@baylibre•com>
>>
>> Applied to v4.11/soc
>
> After reviewing 5/6, I think some parts of that patch should actually
> be part of basic pdata-quirks support addition. I have moved them here.
> Here is the updated patch. Let me know if it looks fine.
It looks fine. I hesitated with that part, but I'm OK either way.
Kevin
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2017-01-10 18:18 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-09 20:55 [PATCH v2 0/6] ARM: davinci: da850: add/enable video capture Kevin Hilman
2017-01-09 20:55 ` [PATCH v2 1/6] ARM: dts: davinci: da850: VPIF: add node and muxing Kevin Hilman
2017-01-10 9:35 ` Sekhar Nori
2017-01-09 20:55 ` [PATCH v2 2/6] ARM: dts: davinci: da850-evm: enable VPIF Kevin Hilman
2017-01-10 9:37 ` Sekhar Nori
2017-01-09 20:55 ` [PATCH v2 3/6] ARM: dts: davinci: da850-lcdk: " Kevin Hilman
2017-01-10 9:39 ` Sekhar Nori
2017-01-09 20:55 ` [PATCH v2 4/6] ARM: davinci: add skeleton for pdata-quirks Kevin Hilman
2017-01-10 10:26 ` Sekhar Nori
2017-01-10 10:50 ` Sekhar Nori
2017-01-10 18:18 ` Kevin Hilman
2017-01-09 20:55 ` [PATCH v2 5/6] ARM: davinci: da8xx: add pdata-quirks, use for VPIF capture Kevin Hilman
2017-01-10 10:41 ` Sekhar Nori
2017-01-09 20:55 ` [PATCH v2 6/6] ARM: davinci: board-da850-evm: add I2C ID for VPIF Kevin Hilman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox