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
On Mon, 2025-07-07 at 09:31 +0800, shangyao lin wrote: > 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://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=874617__;!!CTRNKA9wMg0ARbw!lK62bVQ9-iOIdvsqy3Y0MZIGQl5Szp23K-rB_IB5uffV-tfbML9p144Cgt-4xTpgeYQWungRDBzhfuY1fYflBnk$ ) 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. I'm not expert on seninf and I find previous link [1] is invalid now. I provide [2] here for your reference. I don't know the relation of port and phy. You may find some hint in that link. [1] https://patchwork.kernel.org/project/linux-mediatek/list/?series=874617 [2] https://patchwork.kernel.org/project/linux-mediatek/patch/20241121-add-mtk-isp-3-0-support-v7-3-b04dc9610619@baylibre.com/ > > Thank you for your guidance! > > Best regards, > Shangyao > > Signed-off-by: shangyao.lin <shangyao.lin@mediatek.com> > --- [snip] > + > +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"; mtk_csi_phy_ver is not necessary. compatible imply this. So drop this. Regards, CK > + 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
On Mon, Jul 07, 2025 at 09:31:43AM +0800, shangyao lin wrote: > From: "shangyao.lin" <shangyao.lin@mediatek.com> > > 1. Add camera isp7x module device document > Still no SoB, still not tested, still no checkpatch... and also: ... > + > +... > \ No newline at end of file Look, you have patch warnings. Review your patches before you post them. You should reach internally to mediatek colleagues to explain you how this process works. I really do not understand why mediatek has so poor quality of work and cannot improve over last 1-2 years! > -- > 2.18.0 >
On Mon, 07 Jul 2025 09:31:43 +0800, shangyao lin wrote: > 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 > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: ./Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml:6:10: [error] string value is redundantly quoted with any quotes (quoted-strings) ./Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml:121:4: [error] no new line character at the end of file (new-line-at-end-of-file) dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml: properties:clock-names: {'items': [{'const': 'clk_cam_seninf'}, {'const': 'clk_top_seninf'}, {'const': 'clk_top_seninf1'}, {'const': 'clk_top_camtm'}], 'minItems': 4, 'maxItems': 4} should not be valid under {'required': ['maxItems']} hint: "maxItems" is not needed with an "items" list from schema $id: http://devicetree.org/meta-schemas/items.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml: properties:clock-names: 'oneOf' conditional failed, one must be fixed: [{'const': 'clk_cam_seninf'}, {'const': 'clk_top_seninf'}, {'const': 'clk_top_seninf1'}, {'const': 'clk_top_camtm'}] is too long [{'const': 'clk_cam_seninf'}, {'const': 'clk_top_seninf'}, {'const': 'clk_top_seninf1'}, {'const': 'clk_top_camtm'}] is too short False schema does not allow 4 1 was expected 4 is greater than the maximum of 2 4 is greater than the maximum of 3 hint: "minItems" is only needed if less than the "items" list length from schema $id: http://devicetree.org/meta-schemas/items.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml: properties:reg-names: {'items': [{'const': 'base'}], 'minItems': 1, 'maxItems': 1} should not be valid under {'required': ['maxItems']} hint: "maxItems" is not needed with an "items" list from schema $id: http://devicetree.org/meta-schemas/items.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml: properties:reg-names: 'oneOf' conditional failed, one must be fixed: [{'const': 'base'}] is too short False schema does not allow 1 hint: "minItems" is only needed if less than the "items" list length from schema $id: http://devicetree.org/meta-schemas/items.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml: properties:reg: 'anyOf' conditional failed, one must be fixed: 'minItems' is not one of ['maxItems', 'description', 'deprecated'] hint: Only "maxItems" is required for a single entry if there are no constraints defined for the values. 'minItems' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'multipleOf', 'default', '$ref', 'oneOf'] 'maxItems' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'multipleOf', 'default', '$ref', 'oneOf'] 1 is less than the minimum of 2 hint: Arrays must be described with a combination of minItems/maxItems/items hint: cell array properties must define how many entries and what the entries are when there is more than one entry. from schema $id: http://devicetree.org/meta-schemas/core.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml: $id: Cannot determine base path from $id, relative path/filename doesn't match actual path or filename $id: http://devicetree.org/schemas/media/mediatek,seninf-core.yaml file: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/mediatek/mediatek,mt8188-seninf-core.example.dtb: seninf@16010000 (mediatek,mt8188-seninf-core): reg: [[0, 369164288], [0, 32768]] is too long from schema $id: http://devicetree.org/schemas/media/mediatek,seninf-core.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250707013154.4055874-3-shangyao.lin@mediatek.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
© 2016 - 2025 Red Hat, Inc.