Skip to content

Commit

Permalink
Add TEA5767 FM radio driver. From Karuna Grewal.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkujawa committed Jul 27, 2018
1 parent 8b20b57 commit 5b4f6e5
Show file tree
Hide file tree
Showing 8 changed files with 525 additions and 7 deletions.
5 changes: 4 additions & 1 deletion distrib/sets/lists/man/mi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1601 2018/07/24 15:29:05 christos Exp $
# $NetBSD: mi,v 1.1602 2018/07/27 12:02:26 rkujawa Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
Expand Down Expand Up @@ -1803,6 +1803,7 @@
./usr/share/man/cat4/tcu.0 man-sys-catman .cat
./usr/share/man/cat4/tdfxdrm.0 man-sys-catman .cat
./usr/share/man/cat4/tdvfb.0 man-sys-catman .cat
./usr/share/man/cat4/tea5767radio.0 man-sys-catman .cat
./usr/share/man/cat4/termios.0 man-sys-catman .cat
./usr/share/man/cat4/tfb.0 man-sys-catman .cat
./usr/share/man/cat4/thinkpad.0 man-sys-catman .cat
Expand Down Expand Up @@ -4875,6 +4876,7 @@
./usr/share/man/html4/tcu.html man-sys-htmlman html
./usr/share/man/html4/tdfxdrm.html man-sys-htmlman html
./usr/share/man/html4/tdvfb.html man-sys-htmlman html
./usr/share/man/html4/tea5767radio.html man-sys-htmlman html
./usr/share/man/html4/termios.html man-sys-htmlman html
./usr/share/man/html4/tfb.html man-sys-htmlman html
./usr/share/man/html4/thinkpad.html man-sys-htmlman html
Expand Down Expand Up @@ -7867,6 +7869,7 @@
./usr/share/man/man4/tcu.4 man-sys-man .man
./usr/share/man/man4/tdfxdrm.4 man-sys-man .man
./usr/share/man/man4/tdvfb.4 man-sys-man .man
./usr/share/man/man4/tea5767radio.4 man-sys-man .man
./usr/share/man/man4/termios.4 man-sys-man .man
./usr/share/man/man4/tfb.4 man-sys-man .man
./usr/share/man/man4/thinkpad.4 man-sys-man .man
Expand Down
5 changes: 4 additions & 1 deletion doc/CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2414 $>
# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2415 $>
#
#
# [Note: This file does not mention every change made to the NetBSD source tree.
Expand Down Expand Up @@ -181,3 +181,6 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
arm: Add support for ARMv7 performance event monitoring with tprof(4).
[jmcneill 20180715]
dhcpcd: Import 7.0.7. [roy 20180724]
tea5767radio(4): Add Philips/NXP TEA5767 I2C-controlled stereo FM radio
driver. [rkujawa 20180727]

6 changes: 3 additions & 3 deletions share/man/man4/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.658 2018/07/15 05:16:40 maxv Exp $
# $NetBSD: Makefile,v 1.659 2018/07/27 12:02:26 rkujawa Exp $
# @(#)Makefile 8.1 (Berkeley) 6/18/93

MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
Expand Down Expand Up @@ -61,8 +61,8 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
sm.4 smsh.4 sn.4 sony.4 spc.4 speaker.4 spif.4 sqphy.4 ss.4 \
st.4 ste.4 stge.4 sti.4 stpcide.4 sv.4 strip.4 \
svwsata.4 swsensor.4 swwdog.4 sysmon.4 \
tap.4 tc.4 tcds.4 tcp.4 tcu.4 tdvfb.4 termios.4 tfb.4 thinkpad.4 \
ti.4 tl.4 tlp.4 tlphy.4 tpm.4 tprof.4 tr.4 tra.4 \
tap.4 tc.4 tcds.4 tcp.4 tcu.4 tdvfb.4 tea5767radio.4 termios.4 tfb.4
thinkpad.4 ti.4 tl.4 tlp.4 tlphy.4 tpm.4 tprof.4 tr.4 tra.4 \
trm.4 tsllux.4 tty.4 tun.4 tqphy.4 twa.4 twe.4 txp.4 \
uark.4 ubsec.4 udp.4 uep.4 ug.4 uha.4 uk.4 ukphy.4 unix.4 userconf.4 \
vald.4 valz.4 veriexec.4 vga.4 vge.4 viaide.4 video.4 vioif.4 viomb.4 \
Expand Down
77 changes: 77 additions & 0 deletions share/man/man4/tea5767radio.4
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
.\" $NetBSD: tea5767radio.4,v 1.1 2018/07/27 12:02:26 rkujawa Exp $
.\"
.\" Copyright (c) 2018 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Karuna Grewal.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 6, 2018
.Dt TEA5767RADIO
.Os
.Sh NAME
.Nm tea5767
.Nd Philips/NXP TEA5767 FM Chip
.Sh SYNOPSIS
.Cd "tea5767radio* at iic? addr 0x60 flags 0x00"
.Cd "radio* at tea5767radio?"
.Sh DESCRIPTION
The
.Nm
driver provides support for the Philips/NXP TEA5767 FM stereo radio.
.Pp
The
.Nm
can tune in the range 87.5 \- 108.0 MHz, perform hardware signal search
and supports mono/stereo toggling.
.Pp
The flags control the FM Band, XTAL and PLL values as follows:
.Bl -tag -width Ds
.It 0x01
sets the FM Band to Japan.
.It 0x02
sets the PLL bit.
.It 0x04
sets the XTAL bit.
.It 0x08
force enables hardware search support.
.Sh SEE ALSO
.Xr iic 4 ,
.Xr radio 4 ,
.Xr radio 9 ,
.Rs
.%A TEA5767
.%T Low-power FM stereo radio
.%N Rev. 05
.%D 26 January 2007
.Re
.Sh CAVEATS
Many popular TEA5767 evaluation boards feature low quality 32.768kHz crystals.
The inaccuracy of these crystals may often lead to malfunction of the hardware
search funciton.
Therefore, the
.Nm
driver tries to detect the crystal quality during attachment. If the crystal
of insufficient accuracy was detected, hardware search function is disabled.
It can be forcefully re-enabled by setting the 0x08 flag.
3 changes: 2 additions & 1 deletion sys/dev/DEVNAMES
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: DEVNAMES,v 1.311 2018/06/05 08:03:29 hkenken Exp $
# $NetBSD: DEVNAMES,v 1.312 2018/07/27 12:02:26 rkujawa Exp $
#
# This file contains all used device names and defined attributes in
# alphabetical order. New devices added to the system somewhere should first
Expand Down Expand Up @@ -1325,6 +1325,7 @@ tcx sparc64
tdvfb MI
te vax
tea5757 MI
tea5767radio MI
tfb MI
tga MI
ti MI
Expand Down
8 changes: 7 additions & 1 deletion sys/dev/i2c/files.i2c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: files.i2c,v 1.93 2018/06/26 06:34:55 thorpej Exp $
# $NetBSD: files.i2c,v 1.94 2018/07/27 12:02:26 rkujawa Exp $

obsolete defflag opt_i2cbus.h I2C_SCAN
define i2cbus { }
Expand Down Expand Up @@ -339,3 +339,9 @@ file dev/i2c/imt.c imt
device tsllux: sysmon_envsys
attach tsllux at iic
file dev/i2c/tsl256x.c tsllux

# Philips/NXP TEA5767
device tea5767radio : radiodev
attach tea5767radio at iic
file dev/i2c/tea5767.c tea5767radio

Loading

0 comments on commit 5b4f6e5

Please sign in to comment.