Message ID | 20180713171151.24699-1-pbrobinson@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Peter, On Fri, Jul 13, 2018 at 2:11 PM, Peter Robinson <pbrobinson@gmail.com> wrote: > +&i2c4 { /* Onboard Motion sensors */ > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_i2c4>; > + clock-frequency = <100000>; > + status = "okay"; > +}; Would it be possible to add i2c4 to the common dtsi file instead? I haven't checked the schematics, but if it is only the imx6sx-udoo-neo-basic.dts that does not have the i2c4 node, then maybe you could add i2c4 to the dtsi and disable it inside imx6sx-udoo-neo-basic.dts?
Hi Fabio, On Fri, Jul 13, 2018 at 7:08 PM, Fabio Estevam <festevam@gmail.com> wrote: > Hi Peter, > > On Fri, Jul 13, 2018 at 2:11 PM, Peter Robinson <pbrobinson@gmail.com> wrote: > >> +&i2c4 { /* Onboard Motion sensors */ >> + pinctrl-names = "default"; >> + pinctrl-0 = <&pinctrl_i2c4>; >> + clock-frequency = <100000>; >> + status = "okay"; >> +}; > > Would it be possible to add i2c4 to the common dtsi file instead? > > I haven't checked the schematics, but if it is only the > imx6sx-udoo-neo-basic.dts that does not have the i2c4 node, then > maybe you could add i2c4 to the dtsi and disable it inside > imx6sx-udoo-neo-basic.dts? Enabling it to turn around and then disable it again seemed counter intuitive to me hence the way I did, the WiFi in done that way even though it's not on all boards and I would imagine it would cause errors on the devices where there isn't wifi although I don't have those model(s) to verify. Peter
Hi Peter, On Mon, Jul 16, 2018 at 11:43 AM, Peter Robinson <pbrobinson@gmail.com> wrote: > Enabling it to turn around and then disable it again seemed counter Other option would be to put i2c4 with status = "disabled" in the common file and enable i2c4 on the two dts files that suport it. > intuitive to me hence the way I did, the WiFi in done that way even > though it's not on all boards and I would imagine it would cause > errors on the devices where there isn't wifi although I don't have > those model(s) to verify. If the Wifi is not present, then it will not be probed, so it would not cause problems.
Hi Fabio, > > Enabling it to turn around and then disable it again seemed counter > > Other option would be to put i2c4 with status = "disabled" in the common file > and enable i2c4 on the two dts files that suport it. I've (finally) revisited this again and also got bluetooth working, will send a new series out shortly. Peter > > intuitive to me hence the way I did, the WiFi in done that way even > > though it's not on all boards and I would imagine it would cause > > errors on the devices where there isn't wifi although I don't have > > those model(s) to verify. > > If the Wifi is not present, then it will not be probed, so it would > not cause problems.
diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo-extended.dts b/arch/arm/boot/dts/imx6sx-udoo-neo-extended.dts index 42bfc8f8f7f6b..9ef424f48c523 100644 --- a/arch/arm/boot/dts/imx6sx-udoo-neo-extended.dts +++ b/arch/arm/boot/dts/imx6sx-udoo-neo-extended.dts @@ -52,3 +52,10 @@ reg = <0x80000000 0x40000000>; }; }; + +&i2c4 { /* Onboard Motion sensors */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c4>; + clock-frequency = <100000>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo-full.dts b/arch/arm/boot/dts/imx6sx-udoo-neo-full.dts index c84c877f09d49..a3d3b731ac9ed 100644 --- a/arch/arm/boot/dts/imx6sx-udoo-neo-full.dts +++ b/arch/arm/boot/dts/imx6sx-udoo-neo-full.dts @@ -67,3 +67,10 @@ }; }; }; + +&i2c4 { /* Onboard Motion sensors */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c4>; + clock-frequency = <100000>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi index 53b3eac94f0de..dad8611cc2851 100644 --- a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi +++ b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi @@ -225,6 +225,13 @@ }; }; +&i2c2 { /* Brick snap in sensors connector */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c2>; + clock-frequency = <100000>; + status = "okay"; +}; + &iomuxc { pinctrl_bt_reg: btreggrp { fsl,pins = @@ -256,6 +263,18 @@ <MX6SX_PAD_GPIO1_IO01__I2C1_SDA 0x4001b8b1>; }; + pinctrl_i2c2: i2c2grp { + fsl,pins = + <MX6SX_PAD_GPIO1_IO03__I2C2_SDA 0x4001b8b1>, + <MX6SX_PAD_GPIO1_IO02__I2C2_SCL 0x4001b8b1>; + }; + + pinctrl_i2c4: i2c4grp { + fsl,pins = + <MX6SX_PAD_USB_H_DATA__I2C4_SDA 0x4001b8b1>, + <MX6SX_PAD_USB_H_STROBE__I2C4_SCL 0x4001b8b1>; + }; + pinctrl_uart1: uart1grp { fsl,pins = <MX6SX_PAD_GPIO1_IO04__UART1_TX 0x1b0b1>,
The i2c2 bus has a external plug which enables the easy connection of external "bricks" with sensors of various kinds, while i2c4 on the Extended/Full boards has a pair of on board motion sensors, accelerometer and magnetometer on one chip and gyroscope on another so it makes sense to enable these i2c buses for use. Tested on UDOO Neo Full. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> --- .../arm/boot/dts/imx6sx-udoo-neo-extended.dts | 7 +++++++ arch/arm/boot/dts/imx6sx-udoo-neo-full.dts | 7 +++++++ arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 19 +++++++++++++++++++ 3 files changed, 33 insertions(+)