* [RFC PATCH V5 2/3] dt-bindings: mt8183: Add sensor interface dt-bindings
2020-01-29 8:16 [RFC PATCH V5 0/3] media: support Mediatek sensor interface driver Louis Kuo
@ 2020-01-29 8:16 ` Louis Kuo
2020-02-06 17:22 ` Rob Herring
2020-01-29 8:16 ` [RFC PATCH V5 3/3] dts: arm64: mt8183: Add sensor interface nodes Louis Kuo
2020-02-19 21:17 ` [RFC PATCH V5 0/3] media: support Mediatek sensor interface driver Helen Koike
2 siblings, 1 reply; 5+ messages in thread
From: Louis Kuo @ 2020-01-29 8:16 UTC (permalink / raw)
To: hans.verkuil, laurent.pinchart+renesas, tfiga, keiichiw,
matthias.bgg, mchehab
Cc: yuzhao, zwisler, linux-mediatek, linux-arm-kernel, Sean.Cheng,
sj.huang, christie.yu, louis.kuo, frederic.chen, Jerry-ch.Chen,
jungo.lin, Rynn.Wu, linux-media, srv_heupstream, devicetree
This patch adds the DT binding documentation for the sensor interface
module in Mediatek SoCs.
Signed-off-by: Louis Kuo <louis.kuo@mediatek.com>
---
.../bindings/media/mediatek-seninf.txt | 66 +++++++++++++++++++
1 file changed, 66 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/mediatek-seninf.txt
diff --git a/Documentation/devicetree/bindings/media/mediatek-seninf.txt b/Documentation/devicetree/bindings/media/mediatek-seninf.txt
new file mode 100644
index 000000000000..85a990814bdf
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/mediatek-seninf.txt
@@ -0,0 +1,66 @@
+ ca* Mediatek seninf MIPI-CSI2 host driver
+
+Seninf MIPI-CSI2 host driver is a HW camera interface controller. It support
+a widely adopted, simple, high-speed protocol primarily intended for
+point-to-point image and video transmission between cameras and host devices.
+
+Required properties:
+ - compatible: "mediatek,mt8183-seninf"
+ - reg: Must contain an entry for each entry in reg-names.
+ - reg-names: Must include the following entries:
+ "base": seninf registers base
+ "rx": Rx analog registers base
+ - interrupts: interrupt number to the cpu.
+ - clocks : clock name from clock manager.
+ - clock-names: must be CLK_CAM_SENINF and CLK_TOP_MUX_SENINF,
+ It is the clocks of seninf.
+ - ports : list port node of endpoint.
+ - port : describe endpoint for each remote device port connected to this
+ port.
+ reg : port reg 0 must be main camera, port reg 1 must be sub camera,
+ since seninf driver support upto 4 cameras, so camisp is reg 4.
+
+Example:
+ seninf: seninf@1a040000 {
+ compatible = "mediatek,mt8183-seninf";
+ reg = <0 0x1a040000 0 0x8000>,
+ <0 0x11c80000 0 0x6000>;
+ reg-names = "base", "rx";
+ interrupts = <GIC_SPI 251 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&scpsys MT8183_POWER_DOMAIN_CAM>;
+ clocks = <&camsys CLK_CAM_SENINF>,
+ <&topckgen CLK_TOP_MUX_SENINF>;
+ clock-names = "CLK_CAM_SENINF", "CLK_TOP_MUX_SENINF";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ seninf_port0_endpoint: endpoint {
+ data-lanes = <0 1 3 4>;
+ remote-endpoint = <&ov8856_endpoint>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ seninf_port1_endpoint: endpoint {
+ data-lanes = <1>;
+ remote-endpoint = <&ov02a10_endpoint>;
+ };
+ };
+
+ port@4 {
+ reg = <4>;
+
+ seninf_camisp_endpoint: endpoint {
+ remote-endpoint = <&camisp_endpoint>;
+ };
+ };
+ };
+ };
+
--
2.18.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFC PATCH V5 2/3] dt-bindings: mt8183: Add sensor interface dt-bindings
2020-01-29 8:16 ` [RFC PATCH V5 2/3] dt-bindings: mt8183: Add sensor interface dt-bindings Louis Kuo
@ 2020-02-06 17:22 ` Rob Herring
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2020-02-06 17:22 UTC (permalink / raw)
To: Louis Kuo
Cc: hans.verkuil, laurent.pinchart+renesas, tfiga, keiichiw,
matthias.bgg, mchehab, yuzhao, zwisler, linux-mediatek,
linux-arm-kernel, Sean.Cheng, sj.huang, christie.yu,
frederic.chen, Jerry-ch.Chen, jungo.lin, Rynn.Wu, linux-media,
srv_heupstream, devicetree
On Wed, Jan 29, 2020 at 04:16:49PM +0800, Louis Kuo wrote:
> This patch adds the DT binding documentation for the sensor interface
> module in Mediatek SoCs.
>
> Signed-off-by: Louis Kuo <louis.kuo@mediatek.com>
> ---
> .../bindings/media/mediatek-seninf.txt | 66 +++++++++++++++++++
> 1 file changed, 66 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/mediatek-seninf.txt
Bindings have moved to DT schema. Please convert this to a schema.
Sorry to ask for this on a v5, but I don't recall seeing an earlier
version recently.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RFC PATCH V5 3/3] dts: arm64: mt8183: Add sensor interface nodes
2020-01-29 8:16 [RFC PATCH V5 0/3] media: support Mediatek sensor interface driver Louis Kuo
2020-01-29 8:16 ` [RFC PATCH V5 2/3] dt-bindings: mt8183: Add sensor interface dt-bindings Louis Kuo
@ 2020-01-29 8:16 ` Louis Kuo
2020-02-19 21:17 ` [RFC PATCH V5 0/3] media: support Mediatek sensor interface driver Helen Koike
2 siblings, 0 replies; 5+ messages in thread
From: Louis Kuo @ 2020-01-29 8:16 UTC (permalink / raw)
To: hans.verkuil, laurent.pinchart+renesas, tfiga, keiichiw,
matthias.bgg, mchehab
Cc: yuzhao, zwisler, linux-mediatek, linux-arm-kernel, Sean.Cheng,
sj.huang, christie.yu, louis.kuo, frederic.chen, Jerry-ch.Chen,
jungo.lin, Rynn.Wu, linux-media, srv_heupstream, devicetree
Add nodes for Mediatek's sensor interface device. Sensor interface module
embedded in Mediatek SOCs, works as a HW camera interface controller
intended for image and data transmission between cameras and host devices.
Signed-off-by: Louis Kuo <louis.kuo@mediatek.com>
---
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
index 66aaa07f6cec..ae89386afe56 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
@@ -505,5 +505,17 @@
reg = <0 0x1a000000 0 0x1000>;
#clock-cells = <1>;
};
+ seninf: seninf@1a040000 {
+ compatible = "mediatek,mt8183-seninf";
+ reg = <0 0x1a040000 0 0x8000>,
+ <0 0x11c80000 0 0x6000>;
+ reg-names = "base", "rx";
+ interrupts = <GIC_SPI 251 IRQ_TYPE_LEVEL_LOW>;
+ power-domains = <&scpsys MT8183_POWER_DOMAIN_CAM>;
+ clocks = <&camsys CLK_CAM_SENINF>,
+ <&topckgen CLK_TOP_MUX_SENINF>;
+ clock-names = "CLK_CAM_SENINF", "CLK_TOP_MUX_SENINF";
+ status = "disabled";
+ };
};
};
--
2.18.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFC PATCH V5 0/3] media: support Mediatek sensor interface driver
2020-01-29 8:16 [RFC PATCH V5 0/3] media: support Mediatek sensor interface driver Louis Kuo
2020-01-29 8:16 ` [RFC PATCH V5 2/3] dt-bindings: mt8183: Add sensor interface dt-bindings Louis Kuo
2020-01-29 8:16 ` [RFC PATCH V5 3/3] dts: arm64: mt8183: Add sensor interface nodes Louis Kuo
@ 2020-02-19 21:17 ` Helen Koike
2 siblings, 0 replies; 5+ messages in thread
From: Helen Koike @ 2020-02-19 21:17 UTC (permalink / raw)
To: Louis Kuo, hans.verkuil, laurent.pinchart+renesas, tfiga,
keiichiw, matthias.bgg, mchehab
Cc: yuzhao, zwisler, linux-mediatek, linux-arm-kernel, Sean.Cheng,
sj.huang, christie.yu, frederic.chen, Jerry-ch.Chen, jungo.lin,
Rynn.Wu, linux-media, srv_heupstream, devicetree, kernel
Hi Louis,
On 1/29/20 6:16 AM, Louis Kuo wrote:
> Hello,
>
> This is the RFC patch adding Sensor Inferface(seninf) driver on Mediatek mt8183 SoC, which will be used
> in camera features on CrOS application.
> It belongs to the first Mediatek's camera driver series based on V4L2 and media controller framework.
> I posted the main part of the seninf driver as RFC to discuss first and would like some review comments
> on the overall structure of the driver.
>
> The driver is implemented with V4L2 framework.
> 1. Register as a V4L2 sub-device.
> 2. Only one entity with sink pads linked to camera sensors for choosing desired camera sensor by setup link
> and with source pads linked to cam-io for routing different types of decoded packet datas to PASS1 driver
> to generate sensor image frame and meta-data.
If I understood correctly, the subdevice represents a bridge, with 4 sink pads and 8 source pads (12 total) right?
And you can only route a sink to a source at a time and you can't use multiple sensors simultaneously, correct?
>
> The overall file structure of the seninf driver is as following:
>
> * mtk_seninf.c: Implement software and HW control flow of seninf driver.
> * mtk_seninf_def.h: Define data structure and enumeration.
> * mtk_seninf_reg.h: Define HW register R/W macros and HW register names.
>
> [ V5: use recommended coding style, revise DT binding documentation]
>
> media: platform: mtk-isp: Add Mediatek sensor interface driver
It looks like patch 1/3 didn't reach linux-media mailing list
https://patchwork.linuxtv.org/project/linux-media/list/?series=1706
I guess it's because of its size, you might need to break it into smaller patches.
I see that mtk_seninf_reg.h is really big and not all of it is used, maybe you can split it up.
> dt-bindings: mt8183: Add sensor interface dt-bindings
> dts: arm64: mt8183: Add sensor interface nodes
>
> .../bindings/media/mediatek-seninf.txt | 66 +
> arch/arm64/boot/dts/mediatek/mt8183.dtsi | 12 +
> drivers/media/platform/Makefile | 1 +
> drivers/media/platform/mtk-isp/Kconfig | 17 +
> .../media/platform/mtk-isp/isp_50/Makefile | 3 +
> .../platform/mtk-isp/isp_50/seninf/Makefile | 6 +
> .../mtk-isp/isp_50/seninf/mtk_seninf.c | 1112 +++
> .../mtk-isp/isp_50/seninf/mtk_seninf_def.h | 72 +
> .../mtk-isp/isp_50/seninf/mtk_seninf_reg.h | 7747 +++++++++++++++++
> 9 files changed, 9036 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/mediatek-seninf.txt
> create mode 100644 drivers/media/platform/mtk-isp/Kconfig
> create mode 100644 drivers/media/platform/mtk-isp/isp_50/Makefile
> create mode 100644 drivers/media/platform/mtk-isp/isp_50/seninf/Makefile
> create mode 100644 drivers/media/platform/mtk-isp/isp_50/seninf/mtk_seninf.c
> create mode 100644 drivers/media/platform/mtk-isp/isp_50/seninf/mtk_seninf_def.h
> create mode 100644 drivers/media/platform/mtk-isp/isp_50/seninf/mtk_seninf_reg.h
>
Thanks
Helen
^ permalink raw reply [flat|nested] 5+ messages in thread