Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: media: convert Mediatek consumer IR to the json-schema

This helps validating DTS files. Introduced changes:
1. Reworded title
2. Made "bus" clock required on MT7623 as well
3. Added required #include-s and adjusted "reg" & clocks in example

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Rafał Miłecki and committed by
Hans Verkuil
dce30a66 1034ead1

+55 -28
+55
Documentation/devicetree/bindings/media/mediatek,mt7622-cir.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/media/mediatek,mt7622-cir.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MediaTek Consumer Infrared Receiver on-SoC Controller 8 + 9 + maintainers: 10 + - Sean Wang <sean.wang@mediatek.com> 11 + 12 + allOf: 13 + - $ref: rc.yaml# 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - mediatek,mt7622-cir 19 + - mediatek,mt7623-cir 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + interrupts: 25 + maxItems: 1 26 + 27 + clocks: 28 + maxItems: 2 29 + 30 + clock-names: 31 + items: 32 + - const: clk 33 + - const: bus 34 + 35 + required: 36 + - reg 37 + - interrupts 38 + - clocks 39 + - clock-names 40 + 41 + unevaluatedProperties: false 42 + 43 + examples: 44 + - | 45 + #include <dt-bindings/clock/mt2701-clk.h> 46 + #include <dt-bindings/interrupt-controller/arm-gic.h> 47 + 48 + ir@10013000 { 49 + compatible = "mediatek,mt7623-cir"; 50 + reg = <0x10013000 0x1000>; 51 + interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_LOW>; 52 + clocks = <&infracfg CLK_INFRA_IRRX>, <&topckgen CLK_TOP_AXI_SEL>; 53 + clock-names = "clk", "bus"; 54 + linux,rc-map-name = "rc-rc6-mce"; 55 + };
-28
Documentation/devicetree/bindings/media/mtk-cir.txt
··· 1 - Device-Tree bindings for Mediatek consumer IR controller 2 - found in Mediatek SoC family 3 - 4 - Required properties: 5 - - compatible : Should be 6 - "mediatek,mt7623-cir": for MT7623 SoC 7 - "mediatek,mt7622-cir": for MT7622 SoC 8 - - clocks : list of clock specifiers, corresponding to 9 - entries in clock-names property; 10 - - clock-names : should contain 11 - - "clk" entries: for MT7623 SoC 12 - - "clk", "bus" entries: for MT7622 SoC 13 - - interrupts : should contain IR IRQ number; 14 - - reg : should contain IO map address for IR. 15 - 16 - Optional properties: 17 - - linux,rc-map-name : see rc.txt file in the same directory. 18 - 19 - Example: 20 - 21 - cir: cir@10013000 { 22 - compatible = "mediatek,mt7623-cir"; 23 - reg = <0 0x10013000 0 0x1000>; 24 - interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_LOW>; 25 - clocks = <&infracfg CLK_INFRA_IRRX>; 26 - clock-names = "clk"; 27 - linux,rc-map-name = "rc-rc6-mce"; 28 - };