[beagleboard] Re: Does PINCTRL work on BB xM, kernel v. 3.11?

2017-10-20 Thread Minas Dasygenis
Hi, I just posted a guide on this topic on this group that I think that it 
will help you. Read it and let me know if you have a question.

Τη Παρασκευή, 9 Ιουνίου 2017 - 2:09:33 μ.μ. UTC+3, ο χρήστης 
karolf...@gmail.com έγραψε:
>
> Hello, Vladimir. I am a student of computer engineering with some problems 
> to multiplex my BeagleBoard xM. How did you edit your device tree? I feel 
> like I'm at the very beginning of what I need to know to make my GPIO work, 
> but I'd be grateful for any help your experience might bring me.
>
> Thank you.
>
> Em sexta-feira, 15 de novembro de 2013 13:22:26 UTC-2, porkupan escreveu:
>>
>> On 3.12 an attempt to dump 
>> */sys/kernel/debug/pinctrl/48002030.pinmux/pins* continues to cause a 
>> kernel crash (not a complete crash, but bad enough):
>>
>> root@arm:~# cat /sys/kernel/debug/pinctrl/48002030.pinmux/pins
>> Segmentation fault
>>
>> http://paste.ubuntu.com/6421695/
>>
>> [63418.031249] Unhandled fault: external abort on non-linefetch (0x1028) 
>> at 0xfa002268
>> [63418.039337] Internal error: : 1028 [#1] SMP ARM
>> [63418.044128] Modules linked in: ftdi_sio smsc95xx usbnet usbserial 
>> joydev leds_pwm rtc_twl uio_pdrv_genirq gpio_keys phy_generic uio
>> [63418.056762] CPU: 0 PID: 1798 Comm: cat Not tainted 3.12.0-armv7-x8 #2
>> [63418.063537] task: de739600 ti: df082000 task.ti: df082000
>> [63418.069244] PC is at pcs_readw+0x0/0x10
>> [63418.073303] LR is at pcs_pin_dbg_show+0x2c/0x4c
>> [63418.078094] pc : []lr : []psr: a013
>> [63418.078094] sp : df083ee0  ip :   fp : c0961fb5
>> [63418.090209] r10: de16088c  r9 : c077a5e8  r8 : de1608b8
>> [63418.095703] r7 : 011c  r6 : df566a00  r5 : 011c  r4 : df566a00
>> [63418.102600] r3 : c0393d40  r2 : fa002030  r1 : df566a00  r0 : fa002268
>> [63418.109466] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  
>> Segment user
>> [63418.117004] Control: 10c5387d  Table: 9db08019  DAC: 0015
>> [63418.123046] Process cat (pid: 1798, stack limit = 0xdf082248)
>> [63418.129119] Stack: (0xdf083ee0 to 0xdf084000)
>> [63418.133728] 3ee0: de160880 011c df566a00 c038ef24 c038ee88 
>>  df083f20 df566a00
>> [63418.142364] 3f00: 0001 0001 000cf000 df083f80 dd9f1e40 
>> c0139e58  df566a28
>> [63418.151000] 3f20:    dd9f1e40 df083f80 
>> dd9f1e40 000cf000 dd9f1e40
>> [63418.159606] 3f40: df082018 df083f80 0001   
>> c011c1f8 dd9f1e40 000cf000
>> [63418.168243] 3f60:   dd9f1e40  000cf000 
>> 0001  c011c914
>> [63418.176879] 3f80:   0001 0001 000171c4 
>> 000cf000 0003 c000da64
>> [63418.185516] 3fa0: df082000 c000d8e0 0001 000171c4 0003 
>> 000cf000 0001 000cf000
>> [63418.194122] 3fc0: 0001 000171c4 000cf000 0003 7fffe000 
>>  0001 
>> [63418.202758] 3fe0:  bead0574 b581 b6ef6f2c 4010 
>> 0003 ffeb ff7fdfbf
>> [63418.211395] [] (pcs_readw+0x0/0x10) from [] 
>> (pcs_pin_dbg_show+0x2c/0x4c)
>> [63418.220336] [] (pcs_pin_dbg_show+0x2c/0x4c) from 
>> [] (pinctrl_pins_show+0x9c/0xd0)
>> [63418.230072] [] (pinctrl_pins_show+0x9c/0xd0) from 
>> [] (seq_read+0x1b0/0x404)
>> [63418.239257] [] (seq_read+0x1b0/0x404) from [] 
>> (vfs_read+0xa4/0x168)
>> [63418.247711] [] (vfs_read+0xa4/0x168) from [] 
>> (SyS_read+0x38/0x68)
>> [63418.256011] [] (SyS_read+0x38/0x68) from [] 
>> (ret_fast_syscall+0x0/0x30)
>> [63418.264831] Code: e5d03000 e6ef0073 f57ff04f e12fff1e (e1d030b0)
>> [63418.307189] ---[ end trace 12432e5fbd2a5e32 ]---
>> [63418.312133] In-band Error seen by MPU  at address 0
>> [63418.317260] [ cut here ]
>> [63418.322174] WARNING: CPU: 0 PID: 1798 at drivers/bus/omap_l3_smx.c:162 
>> omap3_l3_app_irq+0xcc/0x110()
>> [63418.331787] Modules linked in: ftdi_sio smsc95xx usbnet usbserial 
>> joydev leds_pwm rtc_twl uio_pdrv_genirq gpio_keys phy_generic uio
>> [63418.344390] CPU: 0 PID: 1798 Comm: cat Tainted: G  D  
>> 3.12.0-armv7-x8 #2
>> [63418.352233] [] (unwind_backtrace+0x0/0xdc) from [] 
>> (show_stack+0x10/0x14)
>> [63418.361236] [] (show_stack+0x10/0x14) from [] 
>> (dump_stack+0x70/0x8c)
>> [63418.369781] [] (dump_stack+0x70/0x8c) from [] 
>> (warn_slowpath_common+0x64/0x88)
>> [63418.379241] [] (warn_slowpath_common+0x64/0x88) from 
>> [] (warn_slowpath_null+0x18/0x20)
>> [63418.389434] [] (warn_slowpath_null+0x18/0x20) from 
>> [] (omap3_l3_app_irq+0xcc/0x110)
>> [63418.399353] [] (omap3_l3_app_irq+0xcc/0x110) from 
>> [] (handle_irq_event_percpu+0x6c/0x1fc)
>> [63418.409851] [] (handle_irq_event_percpu+0x6c/0x1fc) from 
>> [] (handle_irq_event+0x40/0x60)
>> [63418.420227] [] (handle_irq_event+0x40/0x60) from 
>> [] (handle_level_irq+0xd4/0xfc)
>> [63418.429840] [] (handle_level_irq+0xd4/0xfc) from 
>> [] (generic_handle_irq+0x20/0x30)
>> [63418.439666] [] (generic_handle_irq+0x20/0x30) from 
>> [] (handle_IRQ+0x68/0x90)
>> [63418.448944] [] (handle_IRQ+0x68/0x90) 

[beagleboard] Re: Does PINCTRL work on BB xM, kernel v. 3.11?

2017-06-09 Thread karolfujimoto
Hello, Vladimir. I am a student of computer engineering with some problems 
to multiplex my BeagleBoard xM. How did you edit your device tree? I feel 
like I'm at the very beginning of what I need to know to make my GPIO work, 
but I'd be grateful for any help your experience might bring me.

Thank you.

Em sexta-feira, 15 de novembro de 2013 13:22:26 UTC-2, porkupan escreveu:
>
> On 3.12 an attempt to dump 
> */sys/kernel/debug/pinctrl/48002030.pinmux/pins* continues to cause a 
> kernel crash (not a complete crash, but bad enough):
>
> root@arm:~# cat /sys/kernel/debug/pinctrl/48002030.pinmux/pins
> Segmentation fault
>
> http://paste.ubuntu.com/6421695/
>
> [63418.031249] Unhandled fault: external abort on non-linefetch (0x1028) 
> at 0xfa002268
> [63418.039337] Internal error: : 1028 [#1] SMP ARM
> [63418.044128] Modules linked in: ftdi_sio smsc95xx usbnet usbserial 
> joydev leds_pwm rtc_twl uio_pdrv_genirq gpio_keys phy_generic uio
> [63418.056762] CPU: 0 PID: 1798 Comm: cat Not tainted 3.12.0-armv7-x8 #2
> [63418.063537] task: de739600 ti: df082000 task.ti: df082000
> [63418.069244] PC is at pcs_readw+0x0/0x10
> [63418.073303] LR is at pcs_pin_dbg_show+0x2c/0x4c
> [63418.078094] pc : []lr : []psr: a013
> [63418.078094] sp : df083ee0  ip :   fp : c0961fb5
> [63418.090209] r10: de16088c  r9 : c077a5e8  r8 : de1608b8
> [63418.095703] r7 : 011c  r6 : df566a00  r5 : 011c  r4 : df566a00
> [63418.102600] r3 : c0393d40  r2 : fa002030  r1 : df566a00  r0 : fa002268
> [63418.109466] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  
> Segment user
> [63418.117004] Control: 10c5387d  Table: 9db08019  DAC: 0015
> [63418.123046] Process cat (pid: 1798, stack limit = 0xdf082248)
> [63418.129119] Stack: (0xdf083ee0 to 0xdf084000)
> [63418.133728] 3ee0: de160880 011c df566a00 c038ef24 c038ee88  
> df083f20 df566a00
> [63418.142364] 3f00: 0001 0001 000cf000 df083f80 dd9f1e40 c0139e58 
>  df566a28
> [63418.151000] 3f20:    dd9f1e40 df083f80 dd9f1e40 
> 000cf000 dd9f1e40
> [63418.159606] 3f40: df082018 df083f80 0001   c011c1f8 
> dd9f1e40 000cf000
> [63418.168243] 3f60:   dd9f1e40  000cf000 0001 
>  c011c914
> [63418.176879] 3f80:   0001 0001 000171c4 000cf000 
> 0003 c000da64
> [63418.185516] 3fa0: df082000 c000d8e0 0001 000171c4 0003 000cf000 
> 0001 000cf000
> [63418.194122] 3fc0: 0001 000171c4 000cf000 0003 7fffe000  
> 0001 
> [63418.202758] 3fe0:  bead0574 b581 b6ef6f2c 4010 0003 
> ffeb ff7fdfbf
> [63418.211395] [] (pcs_readw+0x0/0x10) from [] 
> (pcs_pin_dbg_show+0x2c/0x4c)
> [63418.220336] [] (pcs_pin_dbg_show+0x2c/0x4c) from [] 
> (pinctrl_pins_show+0x9c/0xd0)
> [63418.230072] [] (pinctrl_pins_show+0x9c/0xd0) from 
> [] (seq_read+0x1b0/0x404)
> [63418.239257] [] (seq_read+0x1b0/0x404) from [] 
> (vfs_read+0xa4/0x168)
> [63418.247711] [] (vfs_read+0xa4/0x168) from [] 
> (SyS_read+0x38/0x68)
> [63418.256011] [] (SyS_read+0x38/0x68) from [] 
> (ret_fast_syscall+0x0/0x30)
> [63418.264831] Code: e5d03000 e6ef0073 f57ff04f e12fff1e (e1d030b0)
> [63418.307189] ---[ end trace 12432e5fbd2a5e32 ]---
> [63418.312133] In-band Error seen by MPU  at address 0
> [63418.317260] [ cut here ]
> [63418.322174] WARNING: CPU: 0 PID: 1798 at drivers/bus/omap_l3_smx.c:162 
> omap3_l3_app_irq+0xcc/0x110()
> [63418.331787] Modules linked in: ftdi_sio smsc95xx usbnet usbserial 
> joydev leds_pwm rtc_twl uio_pdrv_genirq gpio_keys phy_generic uio
> [63418.344390] CPU: 0 PID: 1798 Comm: cat Tainted: G  D  
> 3.12.0-armv7-x8 #2
> [63418.352233] [] (unwind_backtrace+0x0/0xdc) from [] 
> (show_stack+0x10/0x14)
> [63418.361236] [] (show_stack+0x10/0x14) from [] 
> (dump_stack+0x70/0x8c)
> [63418.369781] [] (dump_stack+0x70/0x8c) from [] 
> (warn_slowpath_common+0x64/0x88)
> [63418.379241] [] (warn_slowpath_common+0x64/0x88) from 
> [] (warn_slowpath_null+0x18/0x20)
> [63418.389434] [] (warn_slowpath_null+0x18/0x20) from 
> [] (omap3_l3_app_irq+0xcc/0x110)
> [63418.399353] [] (omap3_l3_app_irq+0xcc/0x110) from 
> [] (handle_irq_event_percpu+0x6c/0x1fc)
> [63418.409851] [] (handle_irq_event_percpu+0x6c/0x1fc) from 
> [] (handle_irq_event+0x40/0x60)
> [63418.420227] [] (handle_irq_event+0x40/0x60) from [] 
> (handle_level_irq+0xd4/0xfc)
> [63418.429840] [] (handle_level_irq+0xd4/0xfc) from [] 
> (generic_handle_irq+0x20/0x30)
> [63418.439666] [] (generic_handle_irq+0x20/0x30) from 
> [] (handle_IRQ+0x68/0x90)
> [63418.448944] [] (handle_IRQ+0x68/0x90) from [] 
> (omap3_intc_handle_irq+0x60/0x74)
> [63418.458496] [] (omap3_intc_handle_irq+0x60/0x74) from 
> [] (__irq_svc+0x40/0x50)
> [63418.467956] Exception stack(0xdf083cd8 to 0xdf083d20)
> [63418.473266] 3cc0:   
> df5ca9c4 3572
> [63418.481903] 3ce0: df5ca4c0 0504 

[beagleboard] Re: Does PINCTRL work on BB xM, kernel v. 3.11?

2013-10-31 Thread porkupan
Well, so I think I understand a bit more about the DTS support for GPIO.  I 
configured the pinctrl for GPIO5 channel, and it seems to have some effect 
on the GPIO pins.  After the kernel starts up the LEDs are being turned off.

omap3_pmx_core {
 vvv_gpio_pins: pinmux_gpio_pins {
pinctrl-single,pins = 
0x136 (PIN_OUTPUT | MUX_MODE4)  /* gpio_137 
*/
0x138 (PIN_OUTPUT | MUX_MODE4)  /* gpio_138 
*/
0x13a (PIN_OUTPUT | MUX_MODE4)  /* gpio_139 
*/
;
};
};

gpio5 {
  pinctrl-names = default;
  pinctrl-0 = vvv_gpio_pins;
};

However the GPIO export mechanism from userspace is still not working.  
Basically, no matter what value you try to set gpio137-139, they stay low 
(although the value in the /sys/class/gpio/gpioXXX/value file is being 
changed appropriately.  It's as if gpiochip128 is not really associated 
with gpio5.  

I am also worried about not being able to dump *
/sys/kernel/debug/pinctrl/48002030.pinmux/pins* . The kernel hiccup occurs 
on the base 3.11 DTB file, so it's not my change that's causing it.



On Friday, October 25, 2013 3:13:46 PM UTC-4, porkupan wrote:

 Trying to dump the pinmux states 
 (/sys/kernel/debug/pinctrl/48002030.pinmux/pins) in 3.11 seems to cause a 
 kernel crash:
 http://paste.ubuntu.com/6302171/

 GPIO access via /sys/class/gpio  appears to be nonoperational in 3.11.  It 
 looks like a reasonable assumption that GPIOs may not be muxed into the 
 GPIO pins.  

 I tried to add a devicetree entry to to force-mux GPIOs:

 omap3_pmx_core {
  vvv_gpio_pins: pinmux_gpio_pins {
 pinctrl-single,pins = 
 0x134 (PIN_OUTPUT | MUX_MODE4)  /* 
 gpio_137 */
 0x135 (PIN_OUTPUT | MUX_MODE4)  /* 
 gpio_138 */
 0x136 (PIN_OUTPUT | MUX_MODE4)  /* 
 gpio_139 */
 ;
 };
 };

 ocp {
 gpio_helper: helper {
 compatible = ti,omap3-gpio;
 pinctrl-names = default;
 pinctrl-0 = vvv_gpio_pins;
 status = okay;
 };
 };

 Doesn't seem to do anything.  The only indication that the kernel is 
 actually trying to parse the fake helper device is these lines in the 
 message log:

 [0.369201] omap_gpio helper.26: could not find pctldev for node 
 /ocp/pinmux@48002030/pinmux_gpio_pins, deferring probe
 [0.369232] platform helper.26: Driver omap_gpio requests probe deferral
 ...
 [3.354125] omap_gpio helper.26: Invalid IRQ resource

 Obviously, I have no idea what compatible driver should I chose, 
 omap3_gpio just sounded like something that could fit.  For BBB they 
 reference bone-pinmux-helper, which I assume is BBB-specific?

 Thanks!



-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.