Beaglebone cape support

beaglebone

#1

I’m trying to get my Beaglebone (green) to enable ttyS4. I’m running 2.15.1+rev1-dev - the latest download from balenaCloud.

If I try to enable it manually by ‘echo BB-UART4-RS485 > /sys/devices/platform/bone_capemgr/slots’ I get a kernel oops in __of_overlay_create:

[ 265.832538] bone_capemgr bone_capemgr: part_number ‘BB-UART2-RTSCTS’, version ‘N/A’
[ 265.842181] bone_capemgr bone_capemgr: slot #4: override
[ 265.857452] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[ 265.887764] bone_capemgr bone_capemgr: slot #4: ‘Override Board Name,00A0,Override Manuf,BB-UART2-RTSCTS’
[ 265.907736] Unable to handle kernel NULL pointer dereference at virtual address 0000000c
[ 265.919845] pgd = c7950000
[ 265.922680] [0000000c] *pgd=00000000
[ 265.931816] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 265.937176] Modules linked in: ipt_REJECT nf_reject_ipv4 ipt_MASQUERADE nf_nat_masquerade_ipv4 br_netfilter nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo evdev uio_pdrv_genirq uio nls_ascii nls_cp437 sch_fq_codel
[ 265.956643] CPU: 0 PID: 1690 Comm: sh Not tainted 4.14.53+ #2
[ 265.962418] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 265.968540] task: dc799e00 task.stack: c79d0000
[ 265.973120] PC is at __of_overlay_create+0x43c/0xb60
[ 265.978113] LR is at __of_overlay_create+0x448/0xb60
[ 265.983101] pc : [] lr : [] psr: 20070013
[ 265.989397] sp : c79d1d58 ip : c79d5298 fp : c79d1dec

[ 266.216921] [] (__of_overlay_create) from [] (of_overlay_create+0x20/0x24)
[ 266.225595] [] (of_overlay_create) from [] (capemgr_load_slot+0x480/0x5d0)
[ 266.234259] [] (capemgr_load_slot) from [] (slots_store+0x150/0x328)
[ 266.242403] [] (slots_store) from [] (dev_attr_store+0x28/0x34)
[ 266.250110] [] (dev_attr_store) from [] (sysfs_kf_write+0x50/0x54)
[ 266.258074] [] (sysfs_kf_write) from [] (kernfs_fop_write+0xf8/0x1d4)
[ 266.266302] [] (kernfs_fop_write) from [] (__vfs_write+0x28/0x48)
[ 266.274178] [] (__vfs_write) from [] (vfs_write+0xb4/0x1c0)
[ 266.281528] [] (vfs_write) from [] (SyS_write+0x5c/0xbc)
[ 266.288625] [] (SyS_write) from [] (__sys_trace_return+0x0/0x10)
[ 266.296415] Code: e584902c e5843034 e584403c e584a028 (e590500c)
[ 266.478799] —[ end trace b1ba7d0f614b6dcb ]—

Should this work - is this the correct way of enabling it?

Thanks.