cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jdefields
Explorer
Explorer
199 Views
Registered: ‎12-02-2014

Zynq7000: cadence i2c recovery if busses are EMIO


Hi all, one of our projects has the i2c0 and i2c1 busses running on EMIO, rather than MIO.

Is it possible to use the cadence i2c bus recovery method, and if so, what does the device tree entry look like for that?

Here's what the MIO version looks like:

 

&pinctrl0 {
	status = "okay";

	pinctrl_i2c0_default: i2c0-default {
		mux {
			groups = "i2c0_6_grp";
			function = "i2c0";
		};

		conf {
			groups = "i2c0_6_grp";
			bias-pull-up;
			slew-rate = <SLEW_RATE_SLOW>;
			io-standard = <IO_STANDARD_LVCMOS18>;
		};
	};

	pinctrl_i2c0_gpio: i2c0-gpio {
		mux {
			groups = "gpio0_26_grp", "gpio0_27_grp";
			function = "gpio0";
		};

		conf {
			groups = "gpio0_26_grp", "gpio0_27_grp";
			slew-rate = <SLEW_RATE_SLOW>;
			io-standard = <IO_STANDARD_LVCMOS18>;
		};
	};
};
&i2c0 {
	clock-frequency = <100000>;
	status = "okay";
	pinctrl-names = "default", "gpio";
	pinctrl-0 = <&pinctrl_i2c0_default>;
	pinctrl-1 = <&pinctrl_i2c0_gpio>;
	scl-gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
	sda-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;

 

 

 

 

0 Kudos
1 Reply
jdefields
Explorer
Explorer
112 Views
Registered: ‎12-02-2014


BUMP, still looking for a solution to this.

Alternatively, If it's not possible to use the device tree / pinctrl, is there a way to switch EMIO i2c to a "GPIO mode" and then toggle the lines as needed?  I.e. using devmem commands from the command line, if there is no driver support.

0 Kudos