media: dt-bindings: silabs,si470x: Convert to DT schema

Convert the Silicon Labs Si470x FM Radio Receiver bindings to DT schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
Krzysztof Kozlowski 2022-12-09 18:59:26 +01:00 committed by Mauro Carvalho Chehab
parent 6262e80228
commit 59eeb9ad7c
3 changed files with 49 additions and 26 deletions

View File

@ -1,26 +0,0 @@
* Silicon Labs FM Radio receiver
The Silicon Labs Si470x is family of FM radio receivers with receive power scan
supporting 76-108 MHz, programmable through an I2C interface.
Some of them includes an RDS encoder.
Required Properties:
- compatible: Should contain "silabs,si470x"
- reg: the I2C address of the device
Optional Properties:
- interrupts : The interrupt number
- reset-gpios: GPIO specifier for the chips reset line
Example:
&i2c2 {
si470x@63 {
compatible = "silabs,si470x";
reg = <0x63>;
interrupt-parent = <&gpj2>;
interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpj2 5 GPIO_ACTIVE_HIGH>;
};
};

View File

@ -0,0 +1,48 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/silabs,si470x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Silicon Labs Si470x FM Radio Receiver
maintainers:
- Hans Verkuil <hverkuil@xs4all.nl>
- Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
properties:
compatible:
const: silabs,si470x
reg:
maxItems: 1
interrupts:
maxItems: 1
reset-gpios:
maxItems: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
fmradio@10 {
compatible = "silabs,si470x";
reg = <0x10>;
interrupt-parent = <&gpj2>;
interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpj2 5 GPIO_ACTIVE_HIGH>;
};
};

View File

@ -18999,6 +18999,7 @@ L: linux-media@vger.kernel.org
S: Odd Fixes
W: https://linuxtv.org
T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/silabs,si470x.yaml
F: drivers/media/radio/si470x/radio-si470x-i2c.c
SI470X FM RADIO RECEIVER USB DRIVER