Date: Tue, 29 Nov 2011 08:39:04 +0800 From: Adrian Chadd <adrian@freebsd.org> To: Stefan Bethke <stb@lassitu.de> Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch Message-ID: <CAJ-Vmo=7uB2FrEad_n2gX9E3xmg%2Bf48weG-rR82y-8aBCb2hrA@mail.gmail.com> In-Reply-To: <5483EFA1-9D7B-4EE6-B888-F024BD1FF3A5@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <5483EFA1-9D7B-4EE6-B888-F024BD1FF3A5@lassitu.de>
next in thread | previous in thread | raw e-mail | index | archive | help
It looks like the code hard-codes: #define SCL_PIN 0 /* gpiobus mapped pin 6 */ #define SDA_PIN 1 /* gpiobus mapped pin 7 */ You could add some printf()s to sys/mips/atheros/ar71xx_gpio.c and log which GPIO pins are being twiddled. That'd answer your question immediately. Are they around the correct way? The wiki says that pin 18 is data and pin 19 is clock, but gpioiic has clock as pin '0' and data as pin '1'. You could try swapping the values of SCL_PIN and SDA_PIN. Ideally the gpiobus assignment above should specify which pins are clock and data via hints, eg: hint.gpioiic.0.at="gpiobus0" hint.gpioiic.0.pins=0xc0000 # Which pin range is being requested; this is parsed by the code in gpiobus? hint.gpioiic.0.datapin=0 # Relative to the above pin set hint.gpioiic.0.clockpin=1 # Relative to the above pin set Adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=7uB2FrEad_n2gX9E3xmg%2Bf48weG-rR82y-8aBCb2hrA>