linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jic23@kernel.org (Jonathan Cameron)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv3 2/3] ARM: mxs: cfa10049: Switch bus i2c1 to bitbanging
Date: Sat, 06 Jul 2013 11:26:46 +0100	[thread overview]
Message-ID: <51D7F0E6.2000008@kernel.org> (raw)
In-Reply-To: <1372094699-3832-3-git-send-email-alexandre.belloni@free-electrons.com>

On 06/24/2013 06:24 PM, Alexandre Belloni wrote:
> From: Maxime Ripard <maxime.ripard@free-electrons.com>
> 
> The ADCs connected to this bus have been experiencing some timeout
> issues when using the iMX28 i2c controller. Switching back to bitbanging
> solves this.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

As there are no disadvantages in taking the driver through IIO and these changes
through the appropriate arch trees, I'd not propose to take these through IIO
(even when the discussion is done) unless specifically asked to.

Jonathan
> ---
>  arch/arm/boot/dts/imx28-cfa10049.dts | 108 +++++++++++++++++++++--------------
>  1 file changed, 65 insertions(+), 43 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx28-cfa10049.dts b/arch/arm/boot/dts/imx28-cfa10049.dts
> index 05ae549..d3758c2 100644
> --- a/arch/arm/boot/dts/imx28-cfa10049.dts
> +++ b/arch/arm/boot/dts/imx28-cfa10049.dts
> @@ -139,6 +139,17 @@
>  					fsl,pull-up = <0>; /* 0 will enable the keeper */
>  				};
>  
> +				i2c1_pins_cfa10049: i2c1 at 0 {
> +					reg = <0>;
> +					fsl,pinmux-ids = <
> +						0x3103 /* MX28_PAD_PWM0__GPIO */
> +						0x3113 /* MX28_PAD_PWM1__I2C1_SDA */
> +					>;
> +					fsl,drive-strength = <1>;
> +					fsl,voltage = <1>;
> +					fsl,pull-up = <1>;
> +				};
> +
>  				fiq_pins_cfa10049: fiq at 0 {
>  					reg = <0>;
>  					fsl,pinmux-ids = <
> @@ -199,49 +210,6 @@
>  				status = "okay";
>  			};
>  
> -			i2c1: i2c at 8005a000 {
> -				pinctrl-names = "default";
> -				pinctrl-0 = <&i2c1_pins_a>;
> -				status = "okay";
> -			};
> -
> -			i2cmux {
> -				compatible = "i2c-mux-gpio";
> -				#address-cells = <1>;
> -				#size-cells = <0>;
> -				mux-gpios = <&gpio1 22 0 &gpio1 23 0>;
> -				i2c-parent = <&i2c1>;
> -
> -				i2c at 0 {
> -					reg = <0>;
> -				};
> -
> -				i2c at 1 {
> -					reg = <1>;
> -				};
> -
> -				i2c at 2 {
> -					reg = <2>;
> -				};
> -
> -				i2c at 3 {
> -					reg = <3>;
> -					#address-cells = <1>;
> -					#size-cells = <0>;
> -
> -					pca9555: pca9555 at 20 {
> -						compatible = "nxp,pca9555";
> -						interrupt-parent = <&gpio2>;
> -						interrupts = <19 0x2>;
> -						gpio-controller;
> -						#gpio-cells = <2>;
> -						interrupt-controller;
> -						#interrupt-cells = <2>;
> -						reg = <0x20>;
> -					};
> -				};
> -			};
> -
>  			usbphy1: usbphy at 8007e000 {
>  				status = "okay";
>  			};
> @@ -366,6 +334,60 @@
>  		rotary-encoder,relative-axis;
>  	};
>  
> +	i2c1gpio: i2c at 0 {
> +		compatible = "i2c-gpio";
> +		pinctrl-0 = <&i2c1_pins_cfa10049>;
> +		pinctrl-names = "default";
> +		gpios = <
> +			&gpio3 17 0 /* sda */
> +			&gpio3 16 0 /* scl */
> +			 >;
> +		i2c-gpio,delay-us = <2>;	/* ~100 kHz */
> +	};
> +
> +	i2cmux {
> +		compatible = "i2c-mux-gpio";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		mux-gpios = <&gpio1 22 0 &gpio1 23 0>;
> +		i2c-parent = <&i2c1gpio>;
> +
> +		i2c at 0 {
> +			reg = <0>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		i2c at 1 {
> +			reg = <1>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		i2c at 2 {
> +			reg = <2>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		i2c at 3 {
> +			reg = <3>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			pca9555: pca9555 at 20 {
> +				compatible = "nxp,pca9555";
> +				interrupt-parent = <&gpio2>;
> +				interrupts = <19 0x2>;
> +				gpio-controller;
> +				#gpio-cells = <2>;
> +				interrupt-controller;
> +				#interrupt-cells = <2>;
> +				reg = <0x20>;
> +			};
> +		};
> +	};
> +
>  	backlight {
>  		compatible = "pwm-backlight";
>  		pwms = <&pwm 3 5000000>;
> 

  parent reply	other threads:[~2013-07-06 10:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24 17:24 [PATCHv3 0/3] Add support for the Nuvoton NAU7802 ADC to the cfa10049 Alexandre Belloni
2013-06-24 17:24 ` [PATCHv3 1/3] iio: Add Nuvoton NAU7802 ADC driver Alexandre Belloni
2013-07-04  9:08   ` Lars-Peter Clausen
2013-07-06 10:24     ` Jonathan Cameron
2013-07-09 14:04       ` Alexandre Belloni
2013-07-09 17:43         ` Jonathan Cameron
2013-06-24 17:24 ` [PATCHv3 2/3] ARM: mxs: cfa10049: Switch bus i2c1 to bitbanging Alexandre Belloni
2013-07-02  2:45   ` Fabio Estevam
2013-07-02 11:35     ` Alexandre Belloni
2013-07-02 11:45       ` Fabio Estevam
2013-07-02 11:50         ` Alexandre Belloni
2013-07-02 14:06           ` Alexandre Belloni
2013-07-02 16:33             ` Marek Vasut
2013-07-02 17:15               ` Alexandre Belloni
2013-07-06 10:26   ` Jonathan Cameron [this message]
2013-07-07  8:47     ` Alexandre Belloni
2013-06-24 17:24 ` [PATCHv3 3/3] ARM: mxs: cfa10049: Add NAU7802 ADCs to the device tree Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51D7F0E6.2000008@kernel.org \
    --to=jic23@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).