公司设计的板子,设备树文件参考BBB板的进行修改,其中backlight启动以后/sys/class/backlight为空,直接修改/sys/class/下pwm没效果(同样配置的蜂鸣器正常工作)。内核启动提示pwm-backlight error,各位能帮忙看下怎么回事么?
backlight配置:
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&ehrpwm1 0 500000 0>;
brightness-levels = <0 10 20 30 40 50 60 70 80 90 99>;
default-brightness-level = <99>;
enable-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
};
&epwmss1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pwm1_pins>;
ecap@48302100 {
status = "disable";
};
pwm@48302200 {
status = "okay"; /* ehrpwm1 */
};
};
pwm1_pins: pinmux_pwm1_pins {
pinctrl-single,pins = <
0x0048 (MUX_MODE6 | PIN_OUTPUT)
>;
};
使用ehrpwm1A输出,GPIO1_15使能默认拉高。
内核启动信息:
U-Boot SPL 2016.05-00319-gcf14e635d7-dirty (Jul 11 2017 - 23:46:00)
#### current i2c = 0 #####
Trying to boot from MMC1
spl: mmc boot mode: fs
Card doesn't support part_switch
MMC partition switch failed
*** Warning - MMC partition switch failed, using default environment
reading u-boot.img
reading u-boot.img
U-Boot 2016.05-00319-gcf14e635d7-dirty (Jul 11 2017 - 23:46:00 -0400)
CPU : AM335X-GP rev 2.1
Watchdog enabled
I2C: ready
DRAM: 512 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Net: Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading boot.scr
** Unable to read file boot.scr **
reading uEnv.txt
** Unable to read file uEnv.txt **
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
3474864 bytes read in 205 ms (16.2 MiB/s)
39899 bytes read in 13 ms (2.9 MiB/s)
Kernel image @ 0x82000000 [ 0x000000 - 0x3505b0 ]
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8fff3000, end 8ffffbda ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.41-gf9f6f0db2d (ice@Ice) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #4 PREEMPT Mon Jul 10 03:27:30 EDT 2017
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: TI AM335x BeagleBone Black
[ 0.000000] cma: Reserved 48 MiB at 0x9d000000
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (sgx neon )
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129920
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=00000000-02 rw rootfstype=ext4 rootwait
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 459988K/524288K available (6603K kernel code, 317K rwdata, 2344K rodata, 264K init, 265K bss, 15148K reserved, 49152K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc08c5004 (8949 kB)
[ 0.000000] .init : 0xc08c6000 - 0xc0908000 ( 264 kB)
[ 0.000000] .data : 0xc0908000 - 0xc09574b0 ( 318 kB)
[ 0.000000] .bss : 0xc09574b0 - 0xc0999bd8 ( 266 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[ 0.000015] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000036] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000045] OMAP clocksource: timer1 at 24000000 Hz
[ 0.000201] clocksource_probe: no matching clocksources found
[ 0.000374] Console: colour dummy device 80x30
[ 0.000398] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[ 0.000403] This ensures that you still see kernel messages. Please
[ 0.000408] update your kernel commandline.
[ 0.000424] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[ 0.089193] pid_max: default: 32768 minimum: 301
[ 0.089314] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.089324] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.089998] Initializing cgroup subsys io
[ 0.090030] Initializing cgroup subsys memory
[ 0.090065] Initializing cgroup subsys devices
[ 0.090079] Initializing cgroup subsys freezer
[ 0.090092] Initializing cgroup subsys perf_event
[ 0.090103] Initializing cgroup subsys pids
[ 0.090129] CPU: Testing write buffer coherency: ok
[ 0.090539] Setting up static identity map for 0x80008200 - 0x80008260
[ 0.092420] devtmpfs: initialized
[ 0.103542] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.116744] omap_hwmod: debugss: _wait_target_disable failed
[ 0.172180] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.175977] pinctrl core: initialized pinctrl subsystem
[ 0.177267] NET: Registered protocol family 16
[ 0.179427] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.209186] cpuidle: using governor ladder
[ 0.239175] cpuidle: using governor menu
[ 0.242775] GPIO line 19 (ethphy_nreset) hogged as output/high
[ 0.243173] OMAP GPIO hardware version 0.1
[ 0.243534] GPIO line 37 (backlight_enable) hogged as output/high
[ 0.243552] GPIO line 57 (uart3_flow_inv) hogged as output/low
[ 0.244222] GPIO line 65 (lcd_enable) hogged as output/low
[ 0.244891] GPIO line 111 (can1_inv) hogged as output/low
[ 0.244907] GPIO line 96 (uart2_flow_inv) hogged as output/low
[ 0.253165] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.286642] edma 49000000.edma: TI EDMA DMA engine driver
[ 0.290533] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[ 0.290591] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring probe
[ 0.290622] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
[ 0.290737] media: Linux media interface: v0.10
[ 0.290791] Linux video capture interface: v2.00
[ 0.290836] pps_core: LinuxPPS API ver. 1 registered
[ 0.290843] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.290868] PTP clock support registered
[ 0.290917] EDAC MC: Ver: 3.0.0
[ 0.292046] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[ 0.292387] Advanced Linux Sound Architecture Driver Initialized.
[ 0.293476] clocksource: Switched to clocksource timer1
[ 0.303056] NET: Registered protocol family 2
[ 0.303854] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.303903] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.303940] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.304023] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.304039] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.304181] NET: Registered protocol family 1
[ 0.304583] RPC: Registered named UNIX socket transport module.
[ 0.304597] RPC: Registered udp transport module.
[ 0.304603] RPC: Registered tcp transport module.
[ 0.304608] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.305561] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[ 0.307416] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.314649] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.315397] NFS: Registering the id_resolver key type
[ 0.315470] Key type id_resolver registered
[ 0.315477] Key type id_legacy registered
[ 0.315540] ntfs: driver 2.1.32 [Flags: R/O].
[ 0.319035] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 0.319063] io scheduler noop registered
[ 0.319073] io scheduler deadline registered
[ 0.319218] io scheduler cfq registered (default)
[ 0.320573] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 0.324389] pwm-backlight: probe of backlight failed with error -16
[ 0.377330] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[ 0.381113] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
[ 1.041771] console [ttyS0] enabled
[ 1.046534] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 159, base_baud = 3000000) is a 8250
[ 1.056514] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 160, base_baud = 3000000) is a 8250
[ 1.066457] [drm] Initialized drm 1.1.0 20060810
[ 1.073232] tilcdc 4830e000.lcdc: no encoders/connectors found
[ 1.086235] loop: module loaded
[ 1.091567] libphy: Fixed MDIO Bus: probed
[ 1.111421] pinctrl-single 44e10800.pinmux: pin 44e10948.0 already requested by 4a100000.ethernet; cannot claim for 4a101000.mdio
[ 1.123188] pinctrl-single 44e10800.pinmux: pin-82 (4a101000.mdio) status -22
[ 1.130371] pinctrl-single 44e10800.pinmux: could not request pin 82 (44e10948.0) from group davinci_mdio_default on device pinctrl-single
[ 1.142956] davinci_mdio 4a101000.mdio: Error applying setting, reverse things back
[ 1.193524] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 1.199651] davinci_mdio 4a101000.mdio: detected phy mask fffffffd
[ 1.206763] libphy: 4a101000.mdio: probed
[ 1.210808] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver NS DP83848C 10/100 Mbps PHY
[ 1.221416] cpsw 4a100000.ethernet: Detected MACID = 78:a5:04:b7:db:d2
[ 1.228223] cpsw 4a100000.ethernet: cpts: overflow check period 850
[ 1.236328] mousedev: PS/2 mouse device common for all mice
[ 1.242491] i2c /dev entries driver
[ 1.247172] cpuidle: enable-method property 'ti,am3352' found operations
[ 1.254759] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 1.334862] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.344037] NET: Registered protocol family 10
[ 1.349829] sit: IPv6 over IPv4 tunneling driver
[ 1.355356] NET: Registered protocol family 17
[ 1.360147] Key type dns_resolver registered
[ 1.364820] omap_voltage_late_init: Voltage driver support not added
[ 1.381399] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.394661] mmc0: new high speed SDHC card at address aaaa
[ 1.401747] mmcblk0: mmc0:aaaa ACLCD 29.7 GiB
[ 1.411302] mmcblk0: p1 p2
[ 1.454826] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 100 kHz
[ 1.460523] mmc1: MAN_BKOPS_EN bit is not set
[ 1.466199] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[ 1.472932] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[ 1.479170] mmc1: new high speed MMC card at address 0001
[ 1.485076] vdd_mpu: supplied by vbat
[ 1.492393] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[ 1.499398] mmcblk1: mmc1:0001 MMC04G 3.52 GiB
[ 1.504417] mmcblk1boot0: mmc1:0001 MMC04G partition 1 16.0 MiB
[ 1.511556] hctosys: unable to open rtc device (rtc0)
[ 1.520908] mmcblk1boot1: mmc1:0001 MMC04G partition 2 16.0 MiB
[ 1.527817] ALSA device list:
[ 1.530806] No soundcards found.
[ 1.535732] mmcblk1: p1 p2
[ 1.581331] EXT4-fs (mmcblk0p2): warning: maximal mount count reached, running e2fsck is recommended
[ 1.596107] EXT4-fs (mmcblk0p2): recovery complete
[ 1.605548] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.613778] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.630560] devtmpfs: mounted
[ 1.633996] Freeing unused kernel memory: 264K (c08c6000 - c0908000)
[ 1.640377] This architecture does not have kernel memory protection.
[ 1.870803] random: systemd: uninitialized urandom read (16 bytes read, 25 bits of entropy available)
[ 1.893841] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
[ 1.907662] systemd[1]: Detected architecture 'arm'.