Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79f3b65e authored by Satish Kodishala's avatar Satish Kodishala Committed by Vadivel Thekkamalai
Browse files

radio: silabs: Add support for Silabs FM chip



Add support for Silicon Labs' FM chip based
on I2C. Add enable, disable, tune, seek and scan
functionality.

Change-Id: I01627695d0749886211a2651d8bcbf74d21fe8e6
Signed-off-by: default avatarSatish Kodishala <skodisha@codeaurora.org>
parent d86deab8
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
Silicon Labs FM radio device

-FM RX playback with RDS
	FM signal is demodulated then audio L/R samples are sent to external audio codec.
	FM Rx RDS data received sent to host processor on I2C.

Required Properties:
- compatible: "silabs,silabs-fm"

Example:
	silabs,silabs-fm {
		compatible = "silabs,silabs-fm";
	};
+67 −0
Original line number Diff line number Diff line
Silicon Labs Si4705 FM radio

Silabs Si4705 is a FM radio chip which sits on the i2c bus.
This node must live under i2c controller.

Required properties:

 - compatible		: should be "silabs,si4705"
 - reg			: i2c slave address of the device
 - interrupt-parent	: parent of interrupt
 - interrupts		: interrupt to indicate completion of on going tune, seek etc.
 - silabs,int-gpio	: interrupt gpio
 - silabs,reset-gpio	: reset gpio
 - silabs,status-gpio	: status gpio
 - pinctrl-names : This should be defined if a target uses pinctrl framework.
			See "pinctrl" in Documentation/devicetree/bindings/pinctrl/msm-pinctrl.txt.
			It should specify the names of the configs that pinctrl can install in driver.
			Following are the pinctrl configs that can be installed:
			"pmx_fm_active" : Active configuration of pins, this should specify active
					config defined in pin groups of interrupt and reset gpio.
			"pmx_fm_suspend" : Disabled configuration of pins, this should specify sleep
					config defined in pin groups of interrupt and reset gpio.

- pinctrl		: Active and suspend configuration of interrupt and reset pins.

- interrupt-names	: Name of interrupt, must be "silabs_fm_int"

Optional properties:
 - vdd-supply		: Digital power supply needed to power device
 - va-supply		: Analog power supply needed to power device

Example:
	i2c_5: i2c@f9967000 { /* BLSP2 QUP5 */
		compatible = "qcom,i2c-msm-v2";
		#address-cells = <1>;
		#size-cells = <0>;
		reg-names = "qup_phys_addr", "bam_phys_addr";
		reg = <0xf9967000 0x1000>,
		      <0xf9944000 0x19000>;
		interrupt-names = "qup_irq", "bam_irq";
		interrupts = <0 105 0>, <0 239 0>;
		qcom,clk-freq-out = <100000>;
		qcom,clk-freq-in  = <19200000>;
		clock-names = "iface_clk", "core_clk";
		clocks = <&clock_gcc clk_gcc_blsp2_ahb_clk>,
			 <&clock_gcc clk_gcc_blsp2_qup5_i2c_apps_clk>;

		pinctrl-names = "i2c_active", "i2c_sleep";
		pinctrl-0 = <&i2c_5_active>;
		pinctrl-1 = <&i2c_5_sleep>;

		silabs4705@11 { /* SiLabs FM chip, slave id 0x11*/
			status = "ok";
			compatible = "silabs,si4705";
			reg = <0x11>;
			vdd-supply = <&pm8994_s4>;
			pinctrl-names = "pmx_fm_active","pmx_fm_suspend";
			pinctrl-0 = <&fm_int_active &fm_rst_active>;
			pinctrl-1 = <&fm_int_suspend &fm_rst_suspend>;
			silabs,reset-gpio = <&msm_gpio 62 0>;
			silabs,int-gpio = <&msm_gpio 9 0>;
			silabs,status-gpio = <&msm_gpio 11 0>;
			interrupt-parent = <&msm_gpio>;
			interrupts = <9 2>;
			interrupt-names = "silabs_fm_int";
			};
		};
+7 −0
Original line number Diff line number Diff line
@@ -518,4 +518,11 @@ config RADIO_IRIS_TRANSPORT
          To compile this driver as a module, choose M here: the
          module will be called radio-iris-transport.

config RADIO_SILABS
        tristate "SILABS FM"
        depends on I2C && VIDEO_V4L2
        ---help---
          Say Y here if you want to use the SiLabs' FM chip
          with I2C as transport.

endif # RADIO_ADAPTERS
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ obj-$(CONFIG_RADIO_WL1273) += radio-wl1273.o
obj-$(CONFIG_RADIO_WL128X) += wl128x/
obj-$(CONFIG_RADIO_IRIS) += radio-iris.o
obj-$(CONFIG_RADIO_IRIS_TRANSPORT) += radio-iris-transport.o
obj-$(CONFIG_RADIO_SILABS) += silabs/

shark2-objs := radio-shark2.o radio-tea5777.o

+2 −0
Original line number Diff line number Diff line
obj-$(CONFIG_RADIO_SILABS) += radio-silabs-transport.o
obj-$(CONFIG_RADIO_SILABS) += radio-silabs.o
Loading