11.0-BETA2: PWM on Beagle Bone Black kernel panic?

Benny Goemans benny.goemans at belgacom.net
Sun Jul 31 11:55:54 UTC 2016


On 31-07-2016 13:17, Benny Goemans wrote:
> All,
>
> I've tried enabling PWM on a Beagle Bone Black (tried both PWM 1 & 2)
> by modifying the DTS. Once I reboot the boot ends with a kernel panic.
> Now, I might simply be doing something wrong which is why I haven't
> created a bug for this yet. I haven't used PWM with FreeBSD in quite a
> long time.
> Kernel output is attached below. No other changes were made to the
> default BETA2 image, downloaded from
> ftp://ftp.freebsd.org/pub/FreeBSD/releases/arm/armv6/ISO-IMAGES/11.0/FreeBSD-11.0-BETA2-arm-armv6-BEAGLEBONE.img.xz).
>
> If anyone needs more information, please ask.
>
> What I added in the default beaglebone-black.dts:
> &am33xx_pinmux {
>         /* other stuff snipped here */
>         ehrpwm2_pins: pinmux_ehrpwm2_pins {
>                 pinctrl-single,pins = <
>                         AM33XX_IOPAD(0x820, PIN_OUTPUT |
> MUX_MODE4)             /* gpmc_ad9.ehrpwm2a */
>                         AM33XX_IOPAD(0x824, PIN_OUTPUT |
> MUX_MODE4)             /* gpmc_ad8.ehrpwm2b */
>                 >;
>         };
> }
>
> /* other stuff snipped */
>
> &ehrpwm2 {
>         status = "okay";
>         pinctrl-names = "default";
>         pinctrl-0 = <&ehrpwm2_pins>;
> };
>
> Recompiled with 'make builddtb' and then copied to /boot/dtb
>
> Kind regards,
> Benny Goemans
>
>
>
> Full output from serial console:
>
> U-Boot SPL 2014.10 (Jul 22 2016 - 09:57:50)
> MMC: block number 0x100 exceeds max(0x0)
> MMC: block number 0x200 exceeds max(0x0)
> *** Error - No Valid Environment Area found
> Using default environment
>
> reading u-boot.img
> reading u-boot.img
>
>
> U-Boot 2014.10 (Jul 22 2016 - 09:57:50)
>
>        Watchdog enabled
> I2C:   ready
> DRAM:  512 MiB
> MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
> reading u-boot.env
>
> ** Unable to read "u-boot.env" from mmc0:1 **
> Using default environment
>
> Net:   <ethaddr> not set. Validating first E-fuse MAC
> cpsw, usb_ether
> reading uEnv.txt
> ** Unable to read file uEnv.txt **
> Hit any key to stop autoboot:  0
> Booting from: mmc 0 ubldr
> reading ubldr
> 271821 bytes read in 31 ms (8.4 MiB/s)
> ## Starting application at 0x88000098 ...
> Consoles: U-Boot console
> Compatible U-Boot API signature found @0x9e731510
>
> FreeBSD/armv6 U-Boot loader, Revision 1.2
> (root at releng2.nyi.freebsd.org, Fri Jul 22 10:12:56 UTC 2016)
>
> DRAM: 512MB
> Number of U-Boot devices: 3
> U-Boot env: loaderdev='mmc 0'
> Found U-Boot device: disk
>   Checking unit=0 slice=<auto> partition=<auto>... good.
> Booting from disk0s2a:
> /boot/kernel/kernel data=0x6cbfe4+0xc401c syms=[0x4+0x7e0f0+0x4+0x9120e]
>
> Hit [Enter] to boot immediately, or any other key for command prompt.
> Booting [/boot/kernel/kernel]...
> /boot/dtb/beaglebone-black.dtb size=0x8566
> Loaded DTB from file 'beaglebone-black.dtb'.
> Kernel entry at 0x0x88200100...
> Kernel args: (null)
> Copyright (c) 1992-2016 The FreeBSD Project.
> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
>         The Regents of the University of California. All rights reserved.
> FreeBSD is a registered trademark of The FreeBSD Foundation.
> FreeBSD 11.0-BETA2 #0 r303168: Fri Jul 22 10:19:10 UTC 2016
>    
> root at releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/BEAGLEBONE
> arm
> FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on
> LLVM
> 3.8.0                                                              
>                                                                         
>                        )
> VT: init without driver.
> CPU: Cortex A8-r3 rev 2 (Cortex-A core)
>  Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
>  WB enabled LABT branch prediction disabled
> LoUU:2 LoC:3 LoUIS:1
> Cache level 1:
>  32KB/64B 4-way data cache WT WB Read-Alloc
>  32KB/64B 4-way instruction cache Read-Alloc
> Cache level 2:
>  256KB/64B 8-way unified cache WT WB Read-Alloc Write-Alloc
> real memory  = 536870912 (512 MB)
> avail memory = 514383872 (490 MB)
> Texas Instruments AM335x Processor, Revision ES1.2
> random: entropy device external interface
> kbd0 at kbdmux0
> ofwbus0: <Open Firmware Device Tree>
> simplebus0: <Flattened device tree simple bus> on ofwbus0
> simplebus1: <Flattened device tree simple bus> on simplebus0
> simplebus2: <Flattened device tree simple bus> mem 0x210000-0x211fff
> on
> simplebu                                                                
>                                                                         
>                      s1
> ti_scm0: <TI Control Module> mem 0-0x7ff on simplebus2
> aintc0: <TI AINTC Interrupt Controller> mem 0x48200000-0x48200fff on
> simplebus0
> aintc0: Revision 5.0
> cpulist0: <Open Firmware CPU Group> on ofwbus0
> cpu0: <Open Firmware CPU> on cpulist0
> pmu0: <Performance Monitoring Unit> on ofwbus0
> am335x_prcm0: <AM335x Power and Clock Management> mem
> 0x200000-0x203fff on
> simpl                                                                
>                                                                         
>                      ebus1
> am335x_prcm0: Clocks: System 24.0 MHz, CPU 1000 MHz
> ti_pinmux0: <TI Pinmux Module> mem 0x800-0xa37 on simplebus2
> gpio0: <TI AM335x General Purpose I/O (GPIO)> mem
> 0x44e07000-0x44e07fff on
> simpl                                                                
>                                                                         
>                      ebus0
> gpiobus0: <OFW GPIO bus> on gpio0
> gpioc0: <GPIO controller> on gpio0
> gpio1: <TI AM335x General Purpose I/O (GPIO)> mem
> 0x4804c000-0x4804cfff on
> simpl                                                                
>                                                                         
>                      ebus0
> gpiobus1: <OFW GPIO bus> on gpio1
> gpioled0: <GPIO led> at pin 21 on gpiobus1
> gpioled1: <GPIO led> at pin 22 on gpiobus1
> gpioled2: <GPIO led> at pin 23 on gpiobus1
> gpioled3: <GPIO led> at pin 24 on gpiobus1
> gpioc1: <GPIO controller> on gpio1
> gpio2: <TI AM335x General Purpose I/O (GPIO)> mem
> 0x481ac000-0x481acfff on
> simpl                                                                
>                                                                         
>                      ebus0
> gpiobus2: <OFW GPIO bus> on gpio2
> gpioc2: <GPIO controller> on gpio2
> gpio3: <TI AM335x General Purpose I/O (GPIO)> mem
> 0x481ae000-0x481aefff on
> simpl                                                                
>                                                                         
>                      ebus0
> gpiobus3: <OFW GPIO bus> on gpio3
> gpioc3: <GPIO controller> on gpio3
> uart0: <TI UART (16550 compatible)> mem 0x44e09000-0x44e0afff on
> simplebus0
> uart0: console (115384,n,8,1)
> iichb0: <TI I2C Controller> mem 0x44e0b000-0x44e0bfff on simplebus0
> iichb0: I2C revision 4.0 FIFO size: 32 bytes
> iicbus0: <OFW I2C bus> on iichb0
> iic0: <I2C generic I/O> on iicbus0
> am335x_pmic0: <TI TPS65217 Power Management IC> at addr 0x48 on iicbus0
> iicbus0: <unknown card> at addr 0xa0
> tda0 at addr 0xe0 on iicbus0
> tda1 at addr 0xe0 on iicbus0
> iichb1: <TI I2C Controller> mem 0x4802a000-0x4802afff on simplebus0
> iichb1: I2C revision 4.0 FIFO size: 32 bytes
> iicbus1: <OFW I2C bus> on iichb1
> iic1: <I2C generic I/O> on iicbus1
> iichb2: <TI I2C Controller> mem 0x4819c000-0x4819cfff on simplebus0
> iichb2: I2C revision 4.0 FIFO size: 32 bytes
> iicbus2: <OFW I2C bus> on iichb2
> iic2: <I2C generic I/O> on iicbus2
> iicbus2: <unknown card> at addr 0xa8
> iicbus2: <unknown card> at addr 0xaa
> iicbus2: <unknown card> at addr 0xac
> iicbus2: <unknown card> at addr 0xae
> sdhci_ti0: <TI MMCHS (SDHCI 2.0)> mem 0x48060000-0x48060fff on simplebus0
> mmc0: <MMC/SD bus> on sdhci_ti0
> sdhci_ti1: <TI MMCHS (SDHCI 2.0)> mem 0x481d8000-0x481d8fff on simplebus0
> mmc1: <MMC/SD bus> on sdhci_ti1
> ti_wdt0: <TI Watchdog Timer> mem 0x44e35000-0x44e35fff on simplebus0
> ti_mbox0: <TI System Mailbox> mem 0x480c8000-0x480c81ff on simplebus0
> ti_mbox0: revision 4.0
> am335x_dmtimer0: <AM335x DMTimer2> mem 0x48040000-0x480403ff on
> simplebus0
> Event timer "DMTimer2" frequency 24000000 Hz quality 500
> am335x_dmtimer1: <AM335x DMTimer3> mem 0x48042000-0x480423ff on
> simplebus0
> Timecounter "DMTimer3" frequency 24000000 Hz quality 500
> am335x_rtc0: <AM335x RTC (power management mode)> mem
> 0x44e3e000-0x44e3efff on simplebus0
> am335x_rtc0: AM335X RTC v1.0.6
> spi0: <TI McSPI controller> mem 0x481a0000-0x481a03ff on simplebus0
> spi0: scheme: 0x1 func: 0x30 rtl: 1 rev: 2.11 custom rev: 0
> spibus0: <OFW SPI bus> on spi0
> usbss0: <TI AM33xx integrated USB OTG controller> mem
> 0x47400000-0x47400fff on simplebus0
> usbss0: TI AM335X USBSS v0.0.13
> musbotg0: <TI AM33xx integrated USB OTG controller> mem
> 0x47401400-0x474017ff,0x47401000-0x474011ff on usbss0
> usbus0: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
> usbus0 on musbotg0
> musbotg1: <TI AM33xx integrated USB OTG controller> mem
> 0x47401c00-0x47401fff,0x47401800-0x474019ff on usbss0
> usbus1: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
> usbus1 on musbotg1
> am335x_pwmss0: <AM335x PWM> mem 0x48304000-0x4830400f on simplebus0
> am335x_ehrpwm0: <AM335x EHRPWM> mem 0x48304200-0x4830427f on
> am335x_pwmss0
> cpswss0: <3-port Switch Ethernet Subsystem> mem
> 0x4a100000-0x4a1007ff,0x4a101200-0x4a1012ff on simplebus0
> cpswss0: CPSW SS Version 1.12 (0)
> cpswss0: Initial queue size TX=128 RX=384
> cpsw0: <Ethernet Switch Port> on cpswss0
> miibus0: <MII bus> on cpsw0
> smscphy0: <SMC LAN8710A 10/100 interface> PHY 0 on miibus0
> smscphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> cpsw0: Ethernet address: 1c:ba:8c:a8:8c:1c
> fb0: <AM335x LCD controller> mem 0x4830e000-0x4830efff on simplebus0
> ti_adc0: <TI ADC controller> mem 0x44e0d000-0x44e0dfff disabled on
> simplebus0
> ti_adc0: scheme: 0x1 func: 0x730 rtl: 0 rev: 0.1 custom rev: 0
> ti_pruss0: <TI Programmable Realtime Unit Subsystem> mem
> 0x4a300000-0x4a37ffff on simplebus0
> ti_pruss0: AM33xx PRU-ICSS
> cryptosoft0: <software crypto>
> Timecounters tick every 10.000 msec
> usbus0: 480Mbps High Speed USB v2.0
> usbus1: 480Mbps High Speed USB v2.0
> am335x_pmic0: TPS65217C ver 1.2 powered by AC
> tda0: TDA19988
> ugen0.1: <Mentor Graphics> at usbus0
> uhub0: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr
> 1> on usbus0
> ugen1.1: <Mentor Graphics> at usbus1
> uhub1: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr
> 1> on usbus1
> uhub0: 1 port with 1 removable, self powered
> uhub1: 1 port with 1 removable, self powered
> tda0: failed to read EDID
> tda1: TDA19988
> tda1: failed to read EDID
> mmcsd0: 8GB <SDHC SU08G 8.0 SN 0E8E8105 MFG 04/2011 by 3 SD> at mmc0
> 24.0MHz/4bit/65535-block
> mmcsd1: 2GB <MMC MMC02G 4.2 SN DE6390C6 MFG 02/1998 by 254 0x004e> at
> mmc1 48.0MHz/8bit/65535-block
> Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
> WARNING: / was not properly dismounted
> warning: no time-of-day clock registered, system time will not be set
> accurately
> Setting hostuuid: 1662bbe9-4ff6-11e6-8cda-1cba8ca88c1c.
> Setting hostid: 0x4d53055b.
> Starting file system checks:
> /dev/ufs/rootfs: 32999 files, 283298 used, 1594709 free (325 frags,
> 199298 blocks, 0.0% fragmentation)
> Mounting local filesystems:.
> ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib
> /usr/local/lib/perl5/5.20/mach/CORE
> random: unblocking device.
> Soft Float compatibility ldconfig path:
> Setting hostname: beaglebone.
> Setting up harvesting:
> [UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED
> Feeding entropy: .
> cpsw0: link state changed to DOWN
> cpsw0: link state changed to UP
> Starting Network: lo0 cpsw0.
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>         options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
>         inet6 ::1 prefixlen 128
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
>         inet 127.0.0.1 netmask 0xff000000
>         groups: lo
>         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> cpsw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu
> 1500
>         options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
>         ether 1c:ba:8c:a8:8c:1c
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
>         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> Starting devd.
> Fatal kernel mode data abort: 'Translation Fault (L2)' on read
> trapframe: 0xde3bdc48
> FSR=00000007, FAR=00000000, spsr=20000013
> r0 =00000001, r1 =00000000, r2 =00000001, r3 =c2c7d6e0
> r4 =de3bddb8, r5 =c29e5cc0, r6 =00000001, r7 =c0960424
> r8 =00000000, r9 =c2c7d6e0, r10=de3bddb8, r11=de3bdcf8
> r12=fefefeff, ssp=de3bdcd8, slr=00008080, pc =c04f8b74
>
> panic: Fatal abort
> Uptime: 17s
> Automatic reboot in 15 seconds - press a key on the console to abort
> --> Press a key on the console to reboot,
> --> or switch off the system now.
>
>
> _______________________________________________
> freebsd-arm at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"

Small addition, I forgot to mention that I also have the following in
the DTS file:

&epwmss2 {
        status = "okay";
};

Another thing I just noticed, this does seem to be working correctly
when I disable devd. The clue came from the "Starting devd." right
before the crash of course. I suppose this isn't intented, but at least
there's a possible workaround.

Regards,
Benny Goemans





More information about the freebsd-arm mailing list