using i.mx6ul processor.
I want to use ic2c4 for my project purpose.
I modified the device tree to enable i2c4 in ALT mode 2, UART2_RXD, UART2_TXD as i2c data and clock respectively.
Please review my device tree code and let me know any modifications need to do to use i2c4.
&i2c2 {
clock_frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2>;
status = "okay";codec: wm8960@1a {
#sound-dai-cells = <0>;
compatible = "wlf,wm8960";
reg = <0x1a>;
wlf,shared-lrclk;
clocks = <&clks IMX6UL_CLK_SAI2>;
clock-names = "mclk";
};ov5640: ov5640@3c {
compatible = "ovti,ov5640";
reg = <0x3c>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi1>;
clocks = <&clks IMX6UL_CLK_CSI>;
clock-names = "csi_mclk";
pwn-gpios = <&gpio_spi 6 1>;
rst-gpios = <&gpio_spi 5 0>;
csi_id = <0>;
mclk = <24000000>;
mclk_source = <0>;
status = "disabled";
port {
ov5640_ep: endpoint {
remote-endpoint = <&csi1_ep>;
};
};
};
};pinctrl_i2c2: i2c2grp {
fsl,pins = <
MX6UL_PAD_UART2_TX_DATA__I2C4_SCL 0x4001b8b0
MX6UL_PAD_UART2_RX_DATA__I2C4_SDA 0x4001b8b0
>;
};
Also what is this address?
MX6UL_PAD_UART2_TX_DATA__I2C4_SCL 0x4001b8b0
Where it is derived?
Regards,
Rineet
Hi Rineet
"0x4001b8b0 " is pad register value described in sect.30.5.196 SW_PAD_CTL_PAD_
UART2_TX_DATA SW PAD Control Register (IOMUXC_SW_PAD_CTL_PAD_UART2_TX_DATA)
i.MX6UL Reference Manual
http://www.nxp.com/docs/en/reference-manual/IMX6ULRM.pdf
Description and i2c4 example can be found in
linux/Documentation/devicetree/bindings/pinctrl
fsl,imx-pinctrl.txt\pinctrl\bindings\devicetree\Documentation - linux-imx - i.MX Linux kernel
imx6ul-14x14-ddr3-arm2.dts\dts\boot\arm\arch - linux-imx - i.MX Linux kernel
imx6ul.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------