Re: [beagleboard] Re: I2C woes

2018-02-10 Thread Graham Haddock
On the PocketBeagle, both I2C-1 and I2C-2 are both brought out to the
headers and both enabled by default.
I don't know that there is any reason to prefer one over the other on the
PocketBeagle.

--- Graham

==

On Sat, Feb 10, 2018 at 7:55 PM, Stuart Longland  wrote:

> On 11/02/18 11:43, Graham wrote:
> > I am not an expert at Device Tree stuff, but this is what I think I know.
> > I2C-0 is intended for internal board management, so sort of reserved,
> > except as a last resort.
> > I2C-1 is available, but not enabled, on the BBB and is
> > enabled/implemented on the PocketBeagle, so you could always look at the
> > PocketBeagle implementation.
>
> I figure then, if we want to hook our own stuff up, then I²C1 is the
> preferred port to use?  In my case I'm running a PocketBeagle, and while
> I've hooked up headers to I²C0, I haven't yet exposed those.
> --
> Stuart Longland (aka Redhatter, VK4MSL)
>
> I haven't lost my mind...
>   ...it's backed up on a tape somewhere.
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "BeagleBoard" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/beagleboard/RU6TUpBEwpI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beagleboard/84e8df94-7cfc-e50c-d188-b9507631cdb9%
> 40longlandclan.id.au.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CANN_KV7f9sHCb697Tf4MLYWKOD7bc7EJufNpOD%3DgeUni0cbO3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: I2C woes

2018-02-10 Thread evilwulfie
Robert nelson had answered this back in december
I searched this once and must have missed this.



Robert Nelson   
12/27/17

Other recipients: simo...@gmail.com
- show quoted text -
We've moved to u-boot overlays, to achieve the same follow:

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays



and set:

uboot_overlay_addr0=/lib/
firmware/BB-I2C1-00A0.dtbo

in /boot/uEnv.txt

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

once done its working great now.


its odd that there is a /dev/i2c-1 file before this overlay is loaded.
Its what threw me for a loop.



On 2/10/2018 6:43 PM, Graham wrote:
> Wulfie:
>
> I am not an expert at Device Tree stuff, but this is what I think I know.
> I2C-0 is intended for internal board management, so sort of reserved,
> except as a last resort.
> I2C-1 is available, but not enabled, on the BBB and is
> enabled/implemented on the PocketBeagle, so you could always look at
> the PocketBeagle implementation.
> The I2C-1 pins are default assigned to other things, so they will need
> to be re-assigned to the I2C-1 peripheral if used.
> It would make sense that I2C-1 was not enabled, if not used by default
> on the BBB.
> I2C-2 is enabled/implemented on the BBB and the PocketBeagle.  It is
> the primary bus for cape memory access, so it is always there.
> The DTB you were looking at seems to have an off-by-one number
> assignment, with respect to the bus numbers used by Linux.
> I don't understand why or how.
> There was a definite off-by-one issue with the I2C bus assignments for
> Debian 7 and prior.
>
> --- Graham
>
> ==
>
> On Saturday, February 10, 2018 at 4:27:17 PM UTC-6, Wulf Man wrote:
>
> I will keep looking into this.
> more infos
>
> I took the current DTB file and decompiled it
> I looked at the I2C sections
>
> i2c0 = "/ocp/i2c@44e0b000";
> i2c1 = "/ocp/i2c@4802a000";
> i2c2 = "/ocp/i2c@4819c000";
>
>
>     i2c@44e0b000 {
>     compatible = "ti,omap4-i2c";
>     #address-cells = <0x1>;
>     #size-cells = <0x0>;
>     ti,hwmods = "i2c1";
>     reg = <0x44e0b000 0x1000>;
>     interrupts = <0x46>;
>     status = "okay";
>     pinctrl-names = "default";
>     pinctrl-0 = <0x32>;
>     clock-frequency = <0x61a80>;
>     linux,phandle = <0xa0>;
>     phandle = <0xa0>;
>
>
>                         with PMIC infos below this
>
>
>    i2c@4802a000 {
>     compatible = "ti,omap4-i2c";
>     #address-cells = <0x1>;
>     #size-cells = <0x0>;
>     ti,hwmods = "i2c2";
>     reg = <0x4802a000 0x1000>;
>     interrupts = <0x47>;
>     status =
> "disabled";   
> <---  anybody know why this is listed as
> disabled ?
>     linux,phandle = <0xa9>;
>     phandle = <0xa9>;
>
> nothing below this as the processor pins are not connected to
> anything
> except  
> "P9.18",    /* i2c1_sda */         "P9.17", /* i2c1_scl */
>
>
>  i2c@4819c000 {
>     compatible = "ti,omap4-i2c";
>     #address-cells = <0x1>;
>     #size-cells = <0x0>;
>     ti,hwmods = "i2c3";
>     reg = <0x4819c000 0x1000>;
>     interrupts = <0x1e>;
>     status = "okay";
>     pinctrl-names = "default";
>     pinctrl-0;
>     clock-frequency = <0x186a0>;
>     linux,phandle = <0xaa>;
>     phandle = <0xaa>;
>
>     With cape eprom infos below.
>
> It would seem to me that even though we have a /dev/I2C-1 its somehow
> not enabled for use
> IF i do a i2cdetect and grep dmesg it just repeats a bus timeout
>
> I am at a dead end on this for my knowledge any help would be
> appreciated
>
>    
>
>
> -- 
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google
> Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to beagleboard+unsubscr...@googlegroups.com
> .
> To view this discussion on the 

Re: [beagleboard] Re: I2C woes

2018-02-10 Thread evilwulfie
This is the DTB file on the green  downloaded yesterday.
I dont understand that if its disabled why is there a /dev/i2c-1 file ?
They fixed the numbering starting with the 9.1 images from what i can read.
If it needs to be enabled how would one go about enabling it ?

On 2/10/2018 6:43 PM, Graham wrote:
> Wulfie:
>
> I am not an expert at Device Tree stuff, but this is what I think I know.
> I2C-0 is intended for internal board management, so sort of reserved,
> except as a last resort.
> I2C-1 is available, but not enabled, on the BBB and is
> enabled/implemented on the PocketBeagle, so you could always look at
> the PocketBeagle implementation.
> The I2C-1 pins are default assigned to other things, so they will need
> to be re-assigned to the I2C-1 peripheral if used.
> It would make sense that I2C-1 was not enabled, if not used by default
> on the BBB.
> I2C-2 is enabled/implemented on the BBB and the PocketBeagle.  It is
> the primary bus for cape memory access, so it is always there.
> The DTB you were looking at seems to have an off-by-one number
> assignment, with respect to the bus numbers used by Linux.
> I don't understand why or how.
> There was a definite off-by-one issue with the I2C bus assignments for
> Debian 7 and prior.
>
> --- Graham
>
> ==
>
> On Saturday, February 10, 2018 at 4:27:17 PM UTC-6, Wulf Man wrote:
>
> I will keep looking into this.
> more infos
>
> I took the current DTB file and decompiled it
> I looked at the I2C sections
>
> i2c0 = "/ocp/i2c@44e0b000";
> i2c1 = "/ocp/i2c@4802a000";
> i2c2 = "/ocp/i2c@4819c000";
>
>
>     i2c@44e0b000 {
>     compatible = "ti,omap4-i2c";
>     #address-cells = <0x1>;
>     #size-cells = <0x0>;
>     ti,hwmods = "i2c1";
>     reg = <0x44e0b000 0x1000>;
>     interrupts = <0x46>;
>     status = "okay";
>     pinctrl-names = "default";
>     pinctrl-0 = <0x32>;
>     clock-frequency = <0x61a80>;
>     linux,phandle = <0xa0>;
>     phandle = <0xa0>;
>
>
>                         with PMIC infos below this
>
>
>    i2c@4802a000 {
>     compatible = "ti,omap4-i2c";
>     #address-cells = <0x1>;
>     #size-cells = <0x0>;
>     ti,hwmods = "i2c2";
>     reg = <0x4802a000 0x1000>;
>     interrupts = <0x47>;
>     status =
> "disabled";   
> <---  anybody know why this is listed as
> disabled ?
>     linux,phandle = <0xa9>;
>     phandle = <0xa9>;
>
> nothing below this as the processor pins are not connected to
> anything
> except  
> "P9.18",    /* i2c1_sda */         "P9.17", /* i2c1_scl */
>
>
>  i2c@4819c000 {
>     compatible = "ti,omap4-i2c";
>     #address-cells = <0x1>;
>     #size-cells = <0x0>;
>     ti,hwmods = "i2c3";
>     reg = <0x4819c000 0x1000>;
>     interrupts = <0x1e>;
>     status = "okay";
>     pinctrl-names = "default";
>     pinctrl-0;
>     clock-frequency = <0x186a0>;
>     linux,phandle = <0xaa>;
>     phandle = <0xaa>;
>
>     With cape eprom infos below.
>
> It would seem to me that even though we have a /dev/I2C-1 its somehow
> not enabled for use
> IF i do a i2cdetect and grep dmesg it just repeats a bus timeout
>
> I am at a dead end on this for my knowledge any help would be
> appreciated
>
>    
>
>
> -- 
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google
> Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to beagleboard+unsubscr...@googlegroups.com
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/ffb81f8b-92dd-4c7d-bde8-42ddcf981e92%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To 

Re: [beagleboard] Re: I2C woes

2018-02-10 Thread Stuart Longland
On 11/02/18 11:43, Graham wrote:
> I am not an expert at Device Tree stuff, but this is what I think I know.
> I2C-0 is intended for internal board management, so sort of reserved,
> except as a last resort.
> I2C-1 is available, but not enabled, on the BBB and is
> enabled/implemented on the PocketBeagle, so you could always look at the
> PocketBeagle implementation.

I figure then, if we want to hook our own stuff up, then I²C1 is the
preferred port to use?  In my case I'm running a PocketBeagle, and while
I've hooked up headers to I²C0, I haven't yet exposed those.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/84e8df94-7cfc-e50c-d188-b9507631cdb9%40longlandclan.id.au.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: I2C woes

2018-02-10 Thread Graham
Wulfie:

I am not an expert at Device Tree stuff, but this is what I think I know.
I2C-0 is intended for internal board management, so sort of reserved, 
except as a last resort.
I2C-1 is available, but not enabled, on the BBB and is enabled/implemented 
on the PocketBeagle, so you could always look at the PocketBeagle 
implementation.
The I2C-1 pins are default assigned to other things, so they will need to 
be re-assigned to the I2C-1 peripheral if used.
It would make sense that I2C-1 was not enabled, if not used by default on 
the BBB.
I2C-2 is enabled/implemented on the BBB and the PocketBeagle.  It is the 
primary bus for cape memory access, so it is always there.
The DTB you were looking at seems to have an off-by-one number assignment, 
with respect to the bus numbers used by Linux.
I don't understand why or how.
There was a definite off-by-one issue with the I2C bus assignments for 
Debian 7 and prior.

--- Graham

==

On Saturday, February 10, 2018 at 4:27:17 PM UTC-6, Wulf Man wrote:
>
> I will keep looking into this. 
> more infos 
>
> I took the current DTB file and decompiled it 
> I looked at the I2C sections 
>
> i2c0 = "/ocp/i2c@44e0b000"; 
> i2c1 = "/ocp/i2c@4802a000"; 
> i2c2 = "/ocp/i2c@4819c000"; 
>
>
> i2c@44e0b000 { 
> compatible = "ti,omap4-i2c"; 
> #address-cells = <0x1>; 
> #size-cells = <0x0>; 
> ti,hwmods = "i2c1"; 
> reg = <0x44e0b000 0x1000>; 
> interrupts = <0x46>; 
> status = "okay"; 
> pinctrl-names = "default"; 
> pinctrl-0 = <0x32>; 
> clock-frequency = <0x61a80>; 
> linux,phandle = <0xa0>; 
> phandle = <0xa0>; 
>
>
> with PMIC infos below this 
>
>
>i2c@4802a000 { 
> compatible = "ti,omap4-i2c"; 
> #address-cells = <0x1>; 
> #size-cells = <0x0>; 
> ti,hwmods = "i2c2"; 
> reg = <0x4802a000 0x1000>; 
> interrupts = <0x47>; 
> status = "disabled";
> <---  anybody know why this is listed as disabled 
> ? 
> linux,phandle = <0xa9>; 
> phandle = <0xa9>; 
>
> nothing below this as the processor pins are not connected to anything 
> except   
> "P9.18",/* i2c1_sda */ "P9.17", /* i2c1_scl */ 
>
>
>  i2c@4819c000 { 
> compatible = "ti,omap4-i2c"; 
> #address-cells = <0x1>; 
> #size-cells = <0x0>; 
> ti,hwmods = "i2c3"; 
> reg = <0x4819c000 0x1000>; 
> interrupts = <0x1e>; 
> status = "okay"; 
> pinctrl-names = "default"; 
> pinctrl-0; 
> clock-frequency = <0x186a0>; 
> linux,phandle = <0xaa>; 
> phandle = <0xaa>; 
>
> With cape eprom infos below. 
>
> It would seem to me that even though we have a /dev/I2C-1 its somehow 
> not enabled for use 
> IF i do a i2cdetect and grep dmesg it just repeats a bus timeout 
>
> I am at a dead end on this for my knowledge any help would be appreciated 
>
> 
>
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/ffb81f8b-92dd-4c7d-bde8-42ddcf981e92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.