Letux Kernel

Issue 667: device tree: enable Si4721

Reported by Nikolaus Schaller, Nov 6, 2014

We need some entries in the device tree to correctly initialize the 
McBSP interface. In the board file variant it was a little tricky to 
make both directions work since we only have 5 wires and not 6. This 
needs to correctly set up the FSX, FSR and CLKX, CLKS lines.

An example how to do this setup for the McBSP is here:

229 &control_devconf0 {
230         mcbsp1_pins: pinmux_mcbsp1_pins {
231                 pinctrl-single,bits = <
232                         0x00 0x18 0x18 /* FSR/CLKR signal from 
FSX/CLKX pin */
233                 >;
234         };
235 
236         mcbsp2_clks_pins: pinmux_mcbsp2_clks_pins {
237                 pinctrl-single,bits = <
238                         0x00 0x40 0x40 /* McBSP2 CLKS from 
McBSP_CLKS pin */
239                 >;
240         };
241 
242 };

156 control_devconf0: pinmux@48002274 {
157         compatible = "pinctrl-single";
158         reg = <0x48002274 4>;   /* Single register */
159         #address-cells = <1>;
160         #size-cells = <0>;
161         pinctrl-single,bit-per-mux;
162         pinctrl-single,register-width = <32>;
163         pinctrl-single,function-mask = <0x5F>;
164 };
165 

The exact register values we need have to be derived from our old 
board file:

http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=arch/arm/mach-o
map2/board-omap3gta04.c;h=d1f947044279bc8d00b5a16fdfcef76d31256234;hb
=refs/heads/3.12.7#l1755

Comment 1 by Nikolaus Schaller, Nov 25, 2015

Most likey the FCLK from McBSP is missing to make the chip respond 
on I2C. Currently it can't be found through i2c-detect.

Comment 2 by Nikolaus Schaller, Dec 17, 2016

Recently reviewed, modified and tested but I2C access still does not 
work:

http://git.goldelico.com/?p=gta04-kernel.git;a=commit;h=bd7f6aa050cba
958faa508642df6d7fc4e371b0d

Probably the pinmux is still wrong.

We should boot the old 3.12 kernel and devmem2 the pinmux and McBSP 
fclk special settings and compare.

Comment 3 by Nikolaus Schaller, Nov 10, 2017

i2c now works. Was a bug in the si4721.c tool.
Status: Fixed
Relations: is related to 483

Created: 5 years 10 months ago by Nikolaus Schaller

Updated: 2 years 10 months ago

Status: Fixed

Labels:
Type:Defect
Priority:Low

This issue is related to
483 - fm-...am does not work in 3.11