1 4 5 6 7 8 Previous Next 114 Replies Latest reply on Jul 31, 2017 12:40 PM by 0andriy Go to original post
      • 105. Re: Newer Kernel on Edison (OpenWrt)
        0andriy

        Hmm... I just have run v4.12-rc6 based eds branch and it has no such issue with enumeration.

        • 106. Re: Newer Kernel on Edison (OpenWrt)
          FerryT

          Hmm. I just booted the original image:

          root@edison:~# journalctl -b | grep pca95

          Jun 25 20:27:31 edison kernel: pca953x 1-0020: failed reading register

          Jun 25 20:27:31 edison kernel: pca953x: probe of 1-0020 failed with error -121

           

          With the original image I can do:

          root@edison:~# i2cdetect -l

          i2c-1  i2c            i2c-designware-1                        I2C adapter

          i2c-2  i2c            i2c-designware-2                        I2C adapter

          i2c-3  i2c            i2c-designware-3                        I2C adapter

          i2c-4  i2c            i2c-designware-4                        I2C adapter

          i2c-5  i2c            i2c-designware-5                        I2C adapter

          i2c-6  i2c            i2c-designware-6                        I2C adapter

          i2c-7  i2c            i2c-designware-7                        I2C adapter

           

          root@edison:~# i2cdetect -r 1

          WARNING! This program can confuse your I2C bus, cause data loss and worse!

          I will probe file /dev/i2c-1 using read byte commands.

          I will probe address range 0x03-0x77.

          Continue? [Y/n]

              0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

          00:          -- -- -- -- -- -- -- -- -- -- -- -- --

          10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

          20: -- UU UU UU -- -- -- -- -- -- -- -- -- -- -- --

          30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

          40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

          50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

          60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

          70: -- -- -- -- -- -- -- --                      

           

          I don't know what that means exactly, but am guessing when probing address 20 there is no response, while 21 - 23 respond with UU.

           

          Now unplugged power cords, boot old image, no errors all 4 devices detected.

           

          Now reboot, kernel 4.11, no errors.

           

          Seems I have been fighting initialization problem all day.

           

          Edison has this problem: not all hardware get's reset on reboot. Sometimes you need to really cut power. Should have thought of that.

           

          But actually this is a kernel bug, on boot you don't know the state of I2C and SPI devices, you need to make them go through the reset sequence.

           

          So, the enumeration problem is solved, but still no communication over /dev/ttyS1

          • 107. Re: Newer Kernel on Edison (OpenWrt)
            FerryT

            I see I'm mixing up the wording:

            TRI_STATE_ALL is actually GPIO214, which is  on gpiochip1 with base 200, which has address 20 on i2c bus 1. It's almost funny :-)

             

            As far as can tell, my sh script is correct, still no luck.

             

            The problem in the end was caused by my script where I had disabled the final TRI_STATE_ALL = high (due to the enumeration problems mentioned above):

             

            echo high > /sys/class/gpio/gpio214/direction

             

            Now following the schematics, TRI_STATE_ALL control the INH pin on the 74LVC2G53 analog multiplexers, but also cuts power to the 74LVC1T45 level translators (by the V_SHIELD_SW signal, a global, and if I may say so, the use of globals in schematics is just as despicable as in software). So effectively by default all analog/digital pin are tri-stated (as the signal name already says).

             

            So, as 0andriy already says: it just works (with the little test software and with 'screen' running on the edison).

            • 108. Re: Newer Kernel on Edison (OpenWrt)
              0andriy

              So, I have rebased on top of v4.12 and basically this branch is now in a freeze. My main work would be related to ACPI (pin muxing, pin configuration) and I would submit stuff to vanilla directly. I might make Edison my test platform for this, though I really need volunteers  for that. I suppose anything interesting which comes up will be also distributed in FerryT's tree: GitHub - htot/meta-intel-edison at morty.

              • 109. Re: Newer Kernel on Edison (OpenWrt)
                FerryT

                I have created a new 4.12 branch from yours (so keeping 4.11 branch) and will experiment with that.  i will probably need to switch to vanilla at the next kernel release and add your patches in the recipie (meh, 40 patches).

                 

                I also intend to try preempt-rt patch and may be switch to 64bit.

                 

                Please use Edison for your ACPI work. I'd like to help but don't know where to start. With some guidance maybe I can be of use? I snatched a Galileo board from a colleague, I believe that already has ACPI support? Maybe we can steel from that?

                • 110. Re: Newer Kernel on Edison (OpenWrt)
                  0andriy

                  FerryT kirjoitti:

                   

                  Please use Edison for your ACPI work. I'd like to help but don't know where to start. With some guidance maybe I can be of use? I snatched a Galileo board from a colleague, I believe that already has ACPI support? Maybe we can steel from that?

                  Now I can answer to your question. What you may do is to download latest ACPI spec (r6.2) and start reading it (couple of first chapters for getting in is a good start).

                  P.S. Spoiler: I have booted ACPI enabled Edison to initramfs stage (after that kernel hangs somewhere by some unknown (yet?) reason. So, overall looks promising.

                  • 111. Re: Newer Kernel on Edison (OpenWrt)
                    FerryT

                    Yeah, I had already downloaded the spec and scanned through the 900+ pages and decided there is no way to implement this, incorporate into u-boot and then get a kernel to boot far enough to get any sensible error message.

                     

                    So hereby, I nominate you, 0andriy for the first Nobel Prize in Software Engineering (as soon as there is one) :-)

                    • 112. Re: Newer Kernel on Edison (OpenWrt)
                      0andriy

                      We don't need of course even a 5th of that, but some mandatory stuff has to be implemented (it's more or less done). DSDT with devices from SFI would be nice to have, though I have no idea (yet?) if we need / may use OperationRegion for I2C related stuff (GPIO expanders).

                       

                      P.S. Pity you gave up so fast...

                       

                      One more spoiler:

                       

                      [    0.000000] ACPI: RSDP 0x00000000000F0000 000024 (v02 U-BOOT)
                      [    0.000000] ACPI: XSDT 0x00000000000F00E0 00003C (v01 U-BOOT U-BOOTBL 00000000 INTL 00000000) 
                      [    0.000000] ACPI: FACP 0x00000000000F0520 0000F4 (v06 U-BOOT U-BOOTBL 00000000 INTL 00000000)
                      [    0.000000] ACPI: DSDT 0x00000000000F0280 00019D (v02 U-BOOT U-BOOTBL 00010000 INTL 20170303)
                      [    0.000000] ACPI: APIC 0x00000000000F0620 000048 (v04 U-BOOT U-BOOTBL 00000000 INTL 00000000)
                      [    0.000000] ACPI: MCFG 0x00000000000F0670 00003C (v01 U-BOOT U-BOOTBL 00000000 INTL 00000000)
                      [    0.000000] ACPI: Local APIC address 0xfee00000
                      • 113. Re: Newer Kernel on Edison (OpenWrt)
                        FerryT

                        Ah, are very far. So how can I help?

                        • 114. Re: Newer Kernel on Edison (OpenWrt)
                          0andriy

                          Almost testing for now. I created a wiki page with a progress regarding ACPI bring up: https://edison.internet-share.com/wiki/ACPI. There is Known issues chapter that might be expanded.

                          1 of 1 people found this helpful
                          1 4 5 6 7 8 Previous Next