mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: shangyao lin <shangyao.lin@mediatek.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>
Cc: Shangyao Lin <shangyao.lin@mediatek.com>,
	<linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<dri-devel@lists.freedesktop.org>,
	<linaro-mm-sig@lists.linaro.org>,
	<Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: [PATCH v2 02/13] dt-bindings: media: mediatek: add seninf-core binding
Date: Mon, 7 Jul 2025 09:31:43 +0800	[thread overview]
Message-ID: <20250707013154.4055874-3-shangyao.lin@mediatek.com> (raw)
In-Reply-To: <20250707013154.4055874-1-shangyao.lin@mediatek.com>

From: "shangyao.lin" <shangyao.lin@mediatek.com>

1. Add camera isp7x module device document

---

Changes in v2:
  - Rename binding file to mediatek,mt8188-seninf-core.yaml
  - Various fixes per review comments
  - Update maintainers list

Question for reviewer (CK):

Hi CK,

Thank you for your review and suggestions on this patch, especially for providing the reference patch (https://patchwork.kernel.org/project/linux-mediatek/list/?series=874617) and for mentioning in another patch ([V1,02/10] MEDIA: PLATFORM: MEDIATEK: ADD SENINF CONTROLLER) the suggestion to "Move the phy part to phy/mediatek/ folder. You could refer to phy/mediatek/phy-mtk-mipi-csi-0-5.c".

After reading your comments and the reference patches, my understanding is that only the seninf-core driver should manage all ports internally, and each port corresponds to a PHY. During probe, the driver will parse each port, obtain the corresponding PHY (e.g., devm_phy_get(dev, "csi0"), devm_phy_get(dev, "csi1"), etc.), and operate the PHY for each port individually during stream on/off or power on/off.

Could you please confirm if my understanding is correct?
If you have any additional reference patches or examples, I would greatly appreciate it.

Thank you for your guidance!

Best regards,
Shangyao

Signed-off-by: shangyao.lin <shangyao.lin@mediatek.com>
---
 .../mediatek/mediatek,mt8188-seninf-core.yaml | 121 ++++++++++++++++++
 1 file changed, 121 insertions(+)
 create mode 100755 Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml

diff --git a/Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml b/Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml
new file mode 100755
index 000000000000..763b96b561cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml
@@ -0,0 +1,121 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2023 MediaTek Inc.
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/media/mediatek,seninf-core.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: The seninf-core top unit of MediaTek ISP system
+
+maintainers:
+  - Shangyao Lin <shangyao.lin@mediatek.com>
+  - Shu-hsiang Yang <shu-hsiang.yang@mediatek.com>
+  - Shun-yi Wang <shun-yi.wang@mediatek.com>
+  - Teddy Chen <teddy.chen@mediatek.com>
+
+description: |
+  MediaTek seninf-core is the ISP sensor interface unit in MediaTek SoC.
+  The sensor interface serves as the MIPI-CSI2 top RX controller.
+
+properties:
+  compatible:
+    const: mediatek,mt8188-seninf-core
+
+  reg:
+    minItems: 1
+    maxItems: 1
+    description: |
+      Base address register region.
+
+  reg-names:
+    items:
+      - const: base
+    minItems: 1
+    maxItems: 1
+
+  mtk_csi_phy_ver:
+    description: Describes MediaTek camera Rx controller version
+    $ref: /schemas/types.yaml#/definitions/string
+
+  interrupts:
+    minItems: 1
+    maxItems: 2
+
+  power-domains:
+    minItems: 1
+    maxItems: 4
+
+  clocks:
+    minItems: 4
+    maxItems: 4
+    description: List of clock phandles required by the controller.
+
+  clock-names:
+    items:
+      - const: clk_cam_seninf
+      - const: clk_top_seninf
+      - const: clk_top_seninf1
+      - const: clk_top_camtm
+    minItems: 4
+    maxItems: 4
+
+  mediatek,larbs:
+    description: |
+      List of phandles to the local arbiters in the current SoCs.
+      Refer to bindings/memory-controllers/mediatek,smi-larb.yaml.
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    minItems: 1
+    maxItems: 32
+
+  dma-ranges:
+    description: |
+      Describes the address information of IOMMU mapping to memory.
+      Defines six fields for the MediaTek IOMMU extended iova, pa, and size.
+    minItems: 1
+
+  phys:
+    description: List of phandle and args to the PHY provider.
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+
+  phy-names:
+    description: Names of the PHYs.
+    $ref: /schemas/types.yaml#/definitions/string-array
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - interrupts
+  - power-domains
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/power/mediatek,mt8188-power.h>
+    #include <dt-bindings/clock/mediatek,mt8188-clk.h>
+
+    seninf@16010000 {
+      compatible = "mediatek,mt8188-seninf-core";
+      reg = <0 0x16010000 0 0x8000>;
+      reg-names = "base";
+      mtk_csi_phy_ver = "mtk_csi_phy_2_0";
+      interrupts = <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH 0>;
+      power-domains = <&spm MT8188_POWER_DOMAIN_CSIRX_TOP>,
+                      <&spm MT8188_POWER_DOMAIN_CAM_VCORE>,
+                      <&spm MT8188_POWER_DOMAIN_CAM_MAIN>;
+      clocks = <&camsys CLK_CAM_MAIN_SENINF>,
+               <&topckgen CLK_TOP_SENINF>,
+               <&topckgen CLK_TOP_SENINF1>,
+               <&topckgen CLK_TOP_CAMTM>;
+      clock-names = "clk_cam_seninf",
+                    "clk_top_seninf",
+                    "clk_top_seninf1",
+                    "clk_top_camtm";
+    };
+
+...
\ No newline at end of file
-- 
2.18.0


  parent reply	other threads:[~2025-07-07  1:32 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-07  1:31 [PATCH v2 00/13] Add MediaTek ISP7.x camera system support shangyao lin
2025-07-07  1:31 ` [PATCH v2 01/13] dt-bindings: media: mediatek: add camisp binding shangyao lin
2025-07-07  2:46   ` Rob Herring (Arm)
2025-07-07  5:42   ` Krzysztof Kozlowski
2025-07-15  8:25   ` CK Hu (胡俊光)
2025-07-07  1:31 ` shangyao lin [this message]
2025-07-07  2:46   ` [PATCH v2 02/13] dt-bindings: media: mediatek: add seninf-core binding Rob Herring (Arm)
2025-07-07  5:44   ` Krzysztof Kozlowski
2025-07-15  7:28   ` CK Hu (胡俊光)
2025-07-07  1:31 ` [PATCH v2 03/13] dt-bindings: media: mediatek: add cam-raw binding shangyao lin
2025-07-07  2:46   ` Rob Herring (Arm)
2025-07-07  5:48   ` Krzysztof Kozlowski
2025-07-15  8:13   ` CK Hu (胡俊光)
2025-07-07  1:31 ` [PATCH v2 04/13] dt-bindings: media: mediatek: add cam-yuv binding shangyao lin
2025-07-07  2:46   ` Rob Herring (Arm)
2025-07-07  5:47   ` Krzysztof Kozlowski
2025-07-15  7:41   ` CK Hu (胡俊光)
2025-07-07  1:31 ` [PATCH v2 05/13] media: platform: mediatek: add isp_7x seninf unit shangyao lin
2025-07-07  5:50   ` Krzysztof Kozlowski
2025-07-10  6:39   ` CK Hu (胡俊光)
2025-07-16  4:06   ` CK Hu (胡俊光)
2025-07-07  1:31 ` [PATCH v2 06/13] media: platform: mediatek: add isp_7x state ctrl shangyao lin
2025-07-11  8:56   ` CK Hu (胡俊光)
2025-07-21  1:40   ` CK Hu (胡俊光)
2025-07-07  1:31 ` [PATCH v2 07/13] MEDIA: PLATFORM: MEDIATEK: ADD ISP_7X CAM-RAW UNIT shangyao lin
2025-07-15  4:07   ` CK Hu (胡俊光)
2025-07-07  1:31 ` [PATCH v2 08/13] media: platform: mediatek: add isp_7x camsys unit shangyao lin
2025-07-07  5:58   ` Krzysztof Kozlowski
2025-07-10  5:20   ` CK Hu (胡俊光)
2025-07-10  7:46   ` CK Hu (胡俊光)
2025-07-24  8:36   ` CK Hu (胡俊光)
2025-07-07  1:31 ` [PATCH v2 09/13] media: platform: mediatek: add isp_7x utility shangyao lin
2025-07-22  2:19   ` CK Hu (胡俊光)
2025-07-07  1:31 ` [PATCH v2 10/13] media: platform: mediatek: add isp_7x video ops shangyao lin
2025-08-01  5:45   ` CK Hu (胡俊光)
2025-07-07  1:31 ` [PATCH v2 11/13] media: platform: mediatek: add isp_7x build config shangyao lin
2025-07-07  1:31 ` [PATCH v2 12/13] uapi: linux: add mediatek isp_7x camsys user api shangyao lin
2025-07-08  1:34   ` CK Hu (胡俊光)
2025-07-07  1:31 ` [PATCH v2 13/13] media: uapi: mediatek: document ISP7x camera system and user controls shangyao lin
2025-07-11  3:12   ` CK Hu (胡俊光)
2025-07-07  5:55 ` [PATCH v2 00/13] Add MediaTek ISP7.x camera system support Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250707013154.4055874-3-shangyao.lin@mediatek.com \
    --to=shangyao.lin@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krzk+dt@kernel.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®