All of lore.kernel.org
 help / color / mirror / Atom feed
* boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb
@ 2017-07-05  2:58 Riko Ho
  2017-07-05 17:26 ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Robert Nelson
  0 siblings, 1 reply; 8+ messages in thread
From: Riko Ho @ 2017-07-05  2:58 UTC (permalink / raw)
  To: meta-ti

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

Dear meta-ti Team Member,

Is it possible that I use this dtb with beagle yocto kernel ? if it is, 
how to do that ?

loading */boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb *
-- 
*

/*******/
Sent by Ubuntu LTS 16.04,
Kind regards,
Riko Ho
/*******/

*

[-- Attachment #2: Type: text/html, Size: 648 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb
  2017-07-05  2:58 boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Riko Ho
@ 2017-07-05 17:26 ` Robert Nelson
  2017-07-06  0:03   ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Riko Ho
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Nelson @ 2017-07-05 17:26 UTC (permalink / raw)
  To: Riko Ho; +Cc: meta-ti

On Tue, Jul 4, 2017 at 9:58 PM, Riko Ho <antonius.riko@gmail.com> wrote:
> Dear meta-ti Team Member,
>
> Is it possible that I use this dtb with beagle yocto kernel ? if it is, how
> to do that ?
>
> loading /boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb
> --

Riko,

You can try loading that *.dtb with meta-ti's kernel, but it won't use
the kernel overlay features built-into the *.dtb as the meta-ti tree
lacks those out-of-tree-in-development-etc overlay patches.

Regards,

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb
  2017-07-05 17:26 ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Robert Nelson
@ 2017-07-06  0:03   ` Riko Ho
  2017-07-06  3:30     ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Robert Nelson
  0 siblings, 1 reply; 8+ messages in thread
From: Riko Ho @ 2017-07-06  0:03 UTC (permalink / raw)
  To: Robert Nelson; +Cc: meta-ti

[-- Attachment #1: Type: text/plain, Size: 1276 bytes --]

Dear Meta TI Team Member,

I want to use SPI0 and used kernel from yoc to. I have added SPI0 node
patch on bone*.Black.dts. I ll send later on for verifying. I m not on my
dev computer now.

I can get dev/spidev1.0. did a loopback. It s running. But all 0000. There
s a bug when it was started booting. I ll show you later.
I ve checked the cable. Tested with Debian image, was working.

How can I use meta ti kernel with Linux yocto kernel ? Merging isn't it?
I did menu config on Linux yocto kernel and enable SPI option, was it
right? Or ?

/*******/
Sent by Android 4.4.2,
Regards,
Riko Ho
/*******/
On Jul 6, 2017 1:26 AM, "Robert Nelson" <robertcnelson@gmail.com> wrote:

> On Tue, Jul 4, 2017 at 9:58 PM, Riko Ho <antonius.riko@gmail.com> wrote:
> > Dear meta-ti Team Member,
> >
> > Is it possible that I use this dtb with beagle yocto kernel ? if it is,
> how
> > to do that ?
> >
> > loading /boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb
> > --
>
> Riko,
>
> You can try loading that *.dtb with meta-ti's kernel, but it won't use
> the kernel overlay features built-into the *.dtb as the meta-ti tree
> lacks those out-of-tree-in-development-etc overlay patches.
>
> Regards,
>
> --
> Robert Nelson
> https://rcn-ee.com/
>

[-- Attachment #2: Type: text/html, Size: 1801 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb
  2017-07-06  0:03   ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Riko Ho
@ 2017-07-06  3:30     ` Robert Nelson
  2017-07-06  5:25       ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Riko Ho
                         ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Robert Nelson @ 2017-07-06  3:30 UTC (permalink / raw)
  To: Riko Ho; +Cc: meta-ti

On Wed, Jul 5, 2017 at 7:03 PM, Riko Ho <antonius.riko@gmail.com> wrote:
> Dear Meta TI Team Member,
>
> I want to use SPI0 and used kernel from yoc to. I have added SPI0 node patch
> on bone*.Black.dts. I ll send later on for verifying. I m not on my dev
> computer now.
>
> I can get dev/spidev1.0. did a loopback. It s running. But all 0000. There s
> a bug when it was started booting. I ll show you later.
> I ve checked the cable. Tested with Debian image, was working.

This fixes that bug: (aka the spi maintainer believes what we are
doing with the spidev node is wrong..)

https://github.com/RobertCNelson/ti-linux-kernel-dev/blob/ti-linux-4.4.y/patches/reverts/0001-Revert-spi-spidev-Warn-loudly-if-instantiated-from-D.patch

Regards,

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb
  2017-07-06  3:30     ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Robert Nelson
@ 2017-07-06  5:25       ` Riko Ho
  2017-07-06  6:18       ` The bug is gone but SPI0 still 000000 Riko Ho
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Riko Ho @ 2017-07-06  5:25 UTC (permalink / raw)
  To: meta-ti

[-- Attachment #1: Type: text/plain, Size: 5052 bytes --]

Dear Meta TI Yocto Team Member/ Robert,

Ok, thanks for the fixes.
For that fix, only add into spidev.c, and use linux-yocto kernel, 
without using ti kernel ?

Here's what I got :

====

SPI0 Bug :
spidev spi1.0: buggy DT: spidev listed directly in DT
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at 
/home/bianchi77/poky/build/tmp/work-shared/beaglebone/kernel-source/drivers/spi/spidev.c:758 
spidev_probe+0x74/0x1c8
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 4.10.9-yocto-standard #4
Hardware name: Generic AM33XX (Flattened Device Tree)
[<c010f250>] (unwind_backtrace) from [<c010c0cc>] (show_stack+0x20/0x24)
[<c010c0cc>] (show_stack) from [<c04a450c>] (dump_stack+0x20/0x28)
[<c04a450c>] (dump_stack) from [<c012d734>] (__warn+0xec/0x108)
[<c012d734>] (__warn) from [<c012d820>] (warn_slowpath_null+0x30/0x38)
[<c012d820>] (warn_slowpath_null) from [<c0620e94>] 
(spidev_probe+0x74/0x1c8)
[<c0620e94>] (spidev_probe) from [<c061d1e0>] (spi_drv_probe+0x98/0xb0)
[<c061d1e0>] (spi_drv_probe) from [<c05ab304>] 
(driver_probe_device+0x1fc/0x2c4)
[<c05ab304>] (driver_probe_device) from [<c05ab574>] 
(__device_attach_driver+0xa4/0xbc)
[<c05ab574>] (__device_attach_driver) from [<c05a9688>] 
(bus_for_each_drv+0x98/0xa0)
[<c05a9688>] (bus_for_each_drv) from [<c05ab050>] 
(__device_attach+0xac/0x114)
[<c05ab050>] (__device_attach) from [<c05ab5a8>] 
(device_initial_probe+0x1c/0x20)
[<c05ab5a8>] (device_initial_probe) from [<c05aa5dc>] 
(bus_probe_device+0x38/0x90)
[<c05aa5dc>] (bus_probe_device) from [<c05a8814>] (device_add+0x42c/0x510)
[<c05a8814>] (device_add) from [<c061e3d0>] (spi_add_device+0xf4/0x158)
[<c061e3d0>] (spi_add_device) from [<c061e85c>] 
(of_register_spi_device+0x2a0/0x304)
[<c061e85c>] (of_register_spi_device) from [<c061eea4>] 
(spi_register_master+0x3fc/0x4ac)
[<c061eea4>] (spi_register_master) from [<c061ef98>] 
(devm_spi_register_master+0x44/0x78)
[<c061ef98>] (devm_spi_register_master) from [<c0628068>] 
(omap2_mcspi_probe+0x26c/0x368)
[<c0628068>] (omap2_mcspi_probe) from [<c05ad1e4>] 
(platform_drv_probe+0x60/0xac)
[<c05ad1e4>] (platform_drv_probe) from [<c05ab304>] 
(driver_probe_device+0x1fc/0x2c4)
[<c05ab304>] (driver_probe_device) from [<c05ab458>] 
(__driver_attach+0x8c/0xb8)
[<c05ab458>] (__driver_attach) from [<c05a95b4>] 
(bus_for_each_dev+0x90/0xa0)
[<c05a95b4>] (bus_for_each_dev) from [<c05aacd8>] (driver_attach+0x28/0x30)
[<c05aacd8>] (driver_attach) from [<c05aa8b0>] (bus_add_driver+0x184/0x1f4)
[<c05aa8b0>] (bus_add_driver) from [<c05ac0a8>] (driver_register+0xb0/0xf0)
[<c05ac0a8>] (driver_register) from [<c05ad124>] 
(__platform_driver_register+0x40/0x54)
[<c05ad124>] (__platform_driver_register) from [<c0d3e89c>] 
(omap2_mcspi_driver_init+0x18/0x20)
[<c0d3e89c>] (omap2_mcspi_driver_init) from [<c0101b78>] 
(do_one_initcall+0x134/0x15c)
[<c0101b78>] (do_one_initcall) from [<c0d00ef8>] 
(kernel_init_freeable+0x1c4/0x280)
[<c0d00ef8>] (kernel_init_freeable) from [<c08c3480>] 
(kernel_init+0x18/0x11c)
[<c08c3480>] (kernel_init) from [<c0107798>] (ret_from_fork+0x14/0x3c)
---[ end trace 2ff68809195d7a1f ]---

=====

file = 
work-shared/beaglebone/kernel-source/arch/arm/boot/dts/am335x-boneblack.dts

I added inside &am33xx_pinmux  :

  /*Added by Riko Ho 5 July 2017 for SPI0 Enable BEGIN */
        spi0_pins: spi0_pins {
             pinctrl-single,pins = <
                        0x150 (PIN_OUTPUT_PULLUP | MUX_MODE0)
                        0x154 (PIN_INPUT_PULLUP | MUX_MODE0)
                        0x158 (PIN_INPUT_PULLUP | MUX_MODE0)
                        0x15C (PIN_OUTPUT_PULLUP | MUX_MODE0)
              >;
        };
    /*Added by Riko Ho 5 July 2017 for SPI0 Enable END */

and

// Added SPI0 node
&spi0 {
          status = "okay";
          pinctrl-names = "default";
          pinctrl-0 = <&spi0_pins>;
         spidev@0 {
                   spi-max-frequency = <24000000>;
                   reg = <0>;
                   compatible = "linux,spidev";
         };
};


at the end.

===========


On 06/07/17 11:30, Robert Nelson wrote:
> On Wed, Jul 5, 2017 at 7:03 PM, Riko Ho <antonius.riko@gmail.com> wrote:
>> Dear Meta TI Team Member,
>>
>> I want to use SPI0 and used kernel from yoc to. I have added SPI0 node patch
>> on bone*.Black.dts. I ll send later on for verifying. I m not on my dev
>> computer now.
>>
>> I can get dev/spidev1.0. did a loopback. It s running. But all 0000. There s
>> a bug when it was started booting. I ll show you later.
>> I ve checked the cable. Tested with Debian image, was working.
> This fixes that bug: (aka the spi maintainer believes what we are
> doing with the spidev node is wrong..)
>
> https://github.com/RobertCNelson/ti-linux-kernel-dev/blob/ti-linux-4.4.y/patches/reverts/0001-Revert-spi-spidev-Warn-loudly-if-instantiated-from-D.patch
>
> Regards,
>

-- 
*

/*******/
Sent by Ubuntu LTS 16.04,
Kind regards,
Riko Ho
/*******/

*

[-- Attachment #2: Type: text/html, Size: 7505 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* The bug is gone but SPI0 still 000000
  2017-07-06  3:30     ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Robert Nelson
  2017-07-06  5:25       ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Riko Ho
@ 2017-07-06  6:18       ` Riko Ho
  2017-07-06  7:22       ` Different response if I change the mode of SPI, but not yet right ? Riko Ho
  2017-07-06  7:35       ` ./spidev_test -l ==> setup: unsupported mode bits 20 ? Riko Ho
  3 siblings, 0 replies; 8+ messages in thread
From: Riko Ho @ 2017-07-06  6:18 UTC (permalink / raw)
  To: meta-ti

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

Dear Meta-TI Yocto Member,

The bug is gone but SPI0 still 000000

root@beaglebone:~# ./spidev_test_fromhost -D /dev/spidev1.0
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)

00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00
root@beaglebone:~#

What do I miss here ??

-- 
*

/*******/
Sent by Ubuntu LTS 16.04,
Kind regards,
Riko Ho
/*******/

*

[-- Attachment #2: Type: text/html, Size: 983 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Different response if I change the mode of SPI, but not yet right ?
  2017-07-06  3:30     ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Robert Nelson
  2017-07-06  5:25       ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Riko Ho
  2017-07-06  6:18       ` The bug is gone but SPI0 still 000000 Riko Ho
@ 2017-07-06  7:22       ` Riko Ho
  2017-07-06  7:35       ` ./spidev_test -l ==> setup: unsupported mode bits 20 ? Riko Ho
  3 siblings, 0 replies; 8+ messages in thread
From: Riko Ho @ 2017-07-06  7:22 UTC (permalink / raw)
  To: meta-ti

Dear Team Member,
Different response if I change the mode of SPI, but not yet right ? What 
is the issue ?

root@beaglebone:~# ./spidev_test
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)

00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00
root@beaglebone:~# ./spidev_test -C
spi mode: 4
bits per word: 8
max speed: 500000 Hz (500 KHz)

00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00
root@beaglebone:~# ./spidev_test -CO
spi mode: 6
bits per word: 8
max speed: 500000 Hz (500 KHz)

03 03 03 03 03 03
03 03 03 03 03 03
03 03 03 03 03 03
03 03 03 03 03 03
03 03 03 03 03 03
03 03 03 03 03 03
03 03
root@beaglebone:~# ./spidev_test -CH
spi mode: 5
bits per word: 8
max speed: 500000 Hz (500 KHz)

0F 0F 0F 0F 0F 0F
0F 0F 0F 0F 0F 0F
0F 0F 0F 0F 0F 0F
0F 0F 0F 0F 0F 0F
0F 0F 0F 0F 0F 0F
0F 0F 0F 0F 0F 0F
0F 0F
root@beaglebone:~#



^ permalink raw reply	[flat|nested] 8+ messages in thread

* ./spidev_test -l ==> setup: unsupported mode bits 20 ?
  2017-07-06  3:30     ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Robert Nelson
                         ` (2 preceding siblings ...)
  2017-07-06  7:22       ` Different response if I change the mode of SPI, but not yet right ? Riko Ho
@ 2017-07-06  7:35       ` Riko Ho
  3 siblings, 0 replies; 8+ messages in thread
From: Riko Ho @ 2017-07-06  7:35 UTC (permalink / raw)
  To: meta-ti

Dear Meta-TI Team Member,

I tried with -l parameter but it said
root@beaglebone:~# ./spidev_test -l spidev spi1.0: setup: unsupported 
mode bits 20
What is the cause ?

spidev spi1.0: setup: unsupported mode bits 20
can't set spi mode: Invalid argument
Aborted

Thanks,
Riko


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-07-06  7:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-05  2:58 boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Riko Ho
2017-07-05 17:26 ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Robert Nelson
2017-07-06  0:03   ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Riko Ho
2017-07-06  3:30     ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Robert Nelson
2017-07-06  5:25       ` boot/dtbs/4.4.54-ti-r93/am335x-boneblack.dtb Riko Ho
2017-07-06  6:18       ` The bug is gone but SPI0 still 000000 Riko Ho
2017-07-06  7:22       ` Different response if I change the mode of SPI, but not yet right ? Riko Ho
2017-07-06  7:35       ` ./spidev_test -l ==> setup: unsupported mode bits 20 ? Riko Ho

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.