media: dt-bindings: media: microchip,dim2: Add MediaLB DIM2 binding
Subsystems (3)
PATCH v3 1/1 media: dt-bindings: media: microchip,dim2: Add MediaLB DIM2 binding
From: Harsh Daniel <[email protected]>
Add device tree binding documentation for the MediaLB DIM2 module found in Microchip (formerly SMSC/K2L) IP, used in Freescale i.MX6Q, Renesas R-Car Gen2/Gen3 SoCs, and Xilinx FPGAs.
This consolidates the previously proposed separate bindings into a single document as they share the same hardware block.
--- .../bindings/media/microchip,dim2.yaml | 136 ++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 137 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/microchip,dim2.yaml
Documentation/devicetree/bindings/media/microchip,dim2.yaml new file +136 -0
@@ -0,0 +1,136 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/microchip,dim2.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip MediaLB DIM2 Controller + +maintainers: + - Andrey Shvetsov <[email protected]> + +description: + MediaLB DIM2 module found in Freescale i.MX6Q, Renesas R-Car Gen2 and + Gen3 SoCs, and Xilinx FPGAs. + +properties: + compatible: + enum: + - fsl,imx6q-mlb150 + - renesas,rcar-gen3-mlp + - xlnx,axi4-os62420_3pin-1.00.a + - xlnx,axi4-os62420_6pin-1.00.a + + reg: + maxItems: 1 + + interrupts: + items: + - description: MediaLB Interrupt + - description: AHB0 Interrupt + + clocks: + minItems: 1 + maxItems: 2 + + clock-names: + minItems: 1 + items: + - const: core + - const: pll8_mlb + + microchip,clock-frequency: + $ref: /schemas/types.yaml#/definitions/string + enum: + - 256fs + - 512fs + - 1024fs + - 2048fs + - 3072fs + - 4096fs + - 6144fs + - 8192fs + description: + DIM2 clock speed as a multiple of the frame sync frequency. + +required: + - compatible + - reg + - interrupts + - microchip,clock-frequency + +allOf: + - if: + properties: + compatible: + contains: + const: fsl,imx6q-mlb150 + then: + required: + - clocks + - clock-names + properties: + clocks: + minItems: 2 + clock-names: + minItems: 2 + + - if: + properties: + compatible: + contains: + const: renesas,rcar-gen3-mlp + then: + required: + - clocks + properties: + clocks: + maxItems: 1 + clock-names: false + + - if: + properties: + compatible: + contains: + enum: + - xlnx,axi4-os62420_3pin-1.00.a + - xlnx,axi4-os62420_6pin-1.00.a + then: + properties: + clocks: false + clock-names: false + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + mlb@218e000 { + compatible = "fsl,imx6q-mlb150"; + reg = <0x0218e000 0x4000>; + interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>, + <0 151 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clks 1>, <&clks 2>; + clock-names = "core", "pll8_mlb"; + microchip,clock-frequency = "2048fs"; + }; + - | + /* Renesas example */ + mlp@e6050000 { + compatible = "renesas,rcar-gen3-mlp"; + reg = <0xe6050000 0x1000>; + interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg 123>; + microchip,clock-frequency = "2048fs"; + }; + - | + /* Xilinx example */ + dim2@43c00000 { + compatible = "xlnx,axi4-os62420_3pin-1.00.a"; + reg = <0x43c00000 0x10000>; + interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>, + <0 145 IRQ_TYPE_LEVEL_HIGH>; + microchip,clock-frequency = "2048fs"; + };
MAINTAINERS +1 -0
@@ -17650,6 +17650,7 @@ M: Christian Gromm <[email protected]> S: Maintained F: Documentation/ABI/testing/configfs-most F: Documentation/ABI/testing/sysfs-bus-most +F: Documentation/devicetree/bindings/media/microchip,dim2.yaml F: drivers/most/ F: drivers/staging/most/ F: include/linux/most.h
Signature · 1 line
2.52.0
Quoted 5 lines · On Tue, Feb 03, 2026 at 09:43:25AM +0530, [email protected] wrote:
From: Harsh Daniel <[email protected]>
Add device tree binding documentation for the MediaLB DIM2 module found in Microchip (formerly SMSC/K2L) IP, used in Freescale i.MX6Q, Renesas R-Car Gen2/Gen3 SoCs, and Xilinx FPGAs.
Why? Thre is no user of this... or is there? Then commit msg should explain that.
Quoted 2 lines
This consolidates the previously proposed separate bindings into a single document as they share the same hardware block.
How is this relevant to git history? What are you referring to?
Quoted 3 lines
Signed-off-by Harsh Daniel <[email protected]>---
This is v3, so where is the changelog? See submitting patches or just use b4...
Quoted 43 lines
.../bindings/media/microchip,dim2.yaml | 136 ++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 137 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/microchip,dim2.yamlDocumentation/devicetree/bindings/media/microchip,dim2.yaml new file +32
-0@@ -0,0 +1,136 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/microchip,dim2.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip MediaLB DIM2 Controller + +maintainers: + - Andrey Shvetsov <[email protected]> + +description: + MediaLB DIM2 module found in Freescale i.MX6Q, Renesas R-Car Gen2 and + Gen3 SoCs, and Xilinx FPGAs. + +properties: + compatible: + enum: + - fsl,imx6q-mlb150 + - renesas,rcar-gen3-mlp + - xlnx,axi4-os62420_3pin-1.00.a + - xlnx,axi4-os62420_6pin-1.00.a + + reg: + maxItems: 1 + + interrupts: + items: + - description: MediaLB Interrupt + - description: AHB0 Interrupt + + clocks:
Documentation/devicetree/bindings/media/microchip,dim2.yaml line 42
Quoted 10 lines
Documentation/devicetree/bindings/media/microchip,dim2.yaml new file +10
-0+ minItems: 1 + maxItems: 2 + + clock-names: + minItems: 1 + items: + - const: core + - const: pll8_mlb + + microchip,clock-frequency:
No, that's not string but -hz... or some other number if justified correctly.
Anyway, setting clock frequency as astatic is deprecated - it is not suitable for DT. Use Common Clock Framework to get your clock frequency.
Maybe I miss the context here, but nothing in commit msg explained me that. You also CANNOT use existing drivers as reason to document poor API.
Quoted 57 lines
Documentation/devicetree/bindings/media/microchip,dim2.yaml new file +57
-0+ $ref: /schemas/types.yaml#/definitions/string + enum: + - 256fs + - 512fs + - 1024fs + - 2048fs + - 3072fs + - 4096fs + - 6144fs + - 8192fs + description: + DIM2 clock speed as a multiple of the frame sync frequency. + +required: + - compatible + - reg + - interrupts + - microchip,clock-frequency + +allOf: + - if: + properties: + compatible: + contains: + const: fsl,imx6q-mlb150 + then: + required: + - clocks + - clock-names + properties: + clocks: + minItems: 2 + clock-names: + minItems: 2 + + - if: + properties: + compatible: + contains: + const: renesas,rcar-gen3-mlp + then: + required: + - clocks + properties: + clocks: + maxItems: 1 + clock-names: false + + - if: + properties: + compatible: + contains: + enum: + - xlnx,axi4-os62420_3pin-1.00.a + - xlnx,axi4-os62420_6pin-1.00.a + then: + properties:
Documentation/devicetree/bindings/media/microchip,dim2.yaml line 109
Quoted 10 lines
Documentation/devicetree/bindings/media/microchip,dim2.yaml new file +10
-0+ clocks: false + clock-names: false + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + mlb@218e000 {
Node names should be generic. See also an explanation and list of examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
If you cannot find a name matching your device, please check in kernel sources for similar cases or you can grow the spec (via pull request to DT spec repo).
Documentation/devicetree/bindings/media/microchip,dim2.yaml line 119
Quoted 10 lines
Documentation/devicetree/bindings/media/microchip,dim2.yaml new file +10
-0+ compatible = "fsl,imx6q-mlb150"; + reg = <0x0218e000 0x4000>; + interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>, + <0 151 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clks 1>, <&clks 2>; + clock-names = "core", "pll8_mlb"; + microchip,clock-frequency = "2048fs"; + }; + - | + /* Renesas example */
Drop comment.
Documentation/devicetree/bindings/media/microchip,dim2.yaml line 126
Quoted 7 lines
Documentation/devicetree/bindings/media/microchip,dim2.yaml new file +7
-0+ mlp@e6050000 { + compatible = "renesas,rcar-gen3-mlp"; + reg = <0xe6050000 0x1000>; + interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg 123>; + microchip,clock-frequency = "2048fs";
One or two examples are enough.
Quoted 15 lines
Documentation/devicetree/bindings/media/microchip,dim2.yaml new file +10
-0+ }; + - | + /* Xilinx example */ + dim2@43c00000 { + compatible = "xlnx,axi4-os62420_3pin-1.00.a"; + reg = <0x43c00000 0x10000>; + interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>, + <0 145 IRQ_TYPE_LEVEL_HIGH>; + microchip,clock-frequency = "2048fs"; + };MAINTAINERS +0
-0
MAINTAINERS M: Christian Gromm <[email protected]> · line 17653
Quoted 4 lines
MAINTAINERS +1
-0@@ -17650,6 +17650,7 @@ M: Christian Gromm <[email protected]> S: Maintained F: Documentation/ABI/testing/configfs-most F: Documentation/ABI/testing/sysfs-bus-most +F: Documentation/devicetree/bindings/media/microchip,dim2.yaml
So now I learn that you do it for some existing driver? Why nothing in commit msg explains that?
Best regards,
Krzysztof
Quoted 5 lines · On Tue, Feb 03, 2026 at 09:43:25AM +0530, [email protected] wrote:
From: Harsh Daniel <[email protected]>
Add device tree binding documentation for the MediaLB DIM2 module found in Microchip (formerly SMSC/K2L) IP, used in Freescale i.MX6Q, Renesas R-Car Gen2/Gen3 SoCs, and Xilinx FPGAs.
Please use subject prefixes matching the subsystem. You can get them for example with 'git log --oneline -- DIRECTORY_OR_FILE' on the directory your patch is touching. For bindings, the preferred subjects are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
One media is enough. No need to call it media: media: media: media:
right? :)
Also:
A nit, subject: drop second/last, redundant "binding". The "dt-bindings" prefix is already stating that these are bindings. See also:
https://elixir.bootlin.com/linux/v6.17-rc3/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
Best regards,
Krzysztof