openbmc / linux

OpenBMC Linux kernel source tree
Other
49 stars 132 forks source link

ast2400 w83795 no effect #193

Open wws66 opened 4 years ago

wws66 commented 4 years ago

Hello everyone, here I add a w83795adg and two temperature sensors on it, but they have no effect.I checked the experience of other people in the list and found that my / sys / class / hwmon did not generate files similar to hwmon10. I found the following problems through udevadm, but I don't know why he made mistakes. Please help me to see why.

root@palmetto:~#  udevadm test /sys/class/hwmon/hwmon0
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

Parsed configuration file /lib/systemd/network/99-default.link
Created link configuration context.
Reading rules file: /lib/udev/rules.d/50-udev-default.rules
Reading rules file: /lib/udev/rules.d/60-block.rules
Reading rules file: /lib/udev/rules.d/60-cdrom_id.rules
Reading rules file: /lib/udev/rules.d/60-drm.rules
Reading rules file: /lib/udev/rules.d/60-evdev.rules
Reading rules file: /lib/udev/rules.d/60-input-id.rules
Reading rules file: /lib/udev/rules.d/60-persistent-alsa.rules
Reading rules file: /lib/udev/rules.d/60-persistent-input.rules
Reading rules file: /lib/udev/rules.d/60-persistent-storage-tape.rules
Reading rules file: /lib/udev/rules.d/60-persistent-storage.rules
Reading rules file: /lib/udev/rules.d/60-persistent-v4l.rules
Reading rules file: /lib/udev/rules.d/60-sensor.rules
Reading rules file: /lib/udev/rules.d/60-serial.rules
Reading rules file: /lib/udev/rules.d/61-aspeed-vuart.rules
Reading rules file: /lib/udev/rules.d/64-btrfs.rules
Reading rules file: /lib/udev/rules.d/70-hwmon.rules
Reading rules file: /lib/udev/rules.d/70-iio.rules
Reading rules file: /lib/udev/rules.d/70-joystick.rules
Reading rules file: /lib/udev/rules.d/70-leds.rules
Reading rules file: /lib/udev/rules.d/70-mouse.rules
Reading rules file: /lib/udev/rules.d/70-touchpad.rules
Reading rules file: /lib/udev/rules.d/75-net-description.rules
Reading rules file: /lib/udev/rules.d/75-probe_mtd.rules
Reading rules file: /lib/udev/rules.d/76-aspeed-mtd-partitions.rules
Reading rules file: /lib/udev/rules.d/78-sound-card.rules
Reading rules file: /lib/udev/rules.d/80-drivers.rules
/lib/udev/rules.d/80-drivers.rules:5: RUN{builtin}: 'kmod load $env{MODALIAS}' unknown, ignoring
/lib/udev/rules.d/80-drivers.rules:6: RUN{builtin}: 'kmod load tifm_sd' unknown, ignoring
/lib/udev/rules.d/80-drivers.rules:7: RUN{builtin}: 'kmod load tifm_ms' unknown, ignoring
/lib/udev/rules.d/80-drivers.rules:8: RUN{builtin}: 'kmod load ms_block mspro_block' unknown, ignoring
/lib/udev/rules.d/80-drivers.rules:9: RUN{builtin}: 'kmod load i2o_block' unknown, ignoring
/lib/udev/rules.d/80-drivers.rules:10: RUN{builtin}: 'kmod load ppdev' unknown, ignoring
/lib/udev/rules.d/80-drivers.rules:11: RUN{builtin}: 'kmod load sm_ftl' unknown, ignoring
Reading rules file: /lib/udev/rules.d/80-net-setup-link.rules
Reading rules file: /lib/udev/rules.d/99-aspeed-lpc-ctrl.rules
Reading rules file: /lib/udev/rules.d/99-systemd.rules
Reading rules file: /etc/udev/rules.d/touchscreen.rules
Rules contain 24576 bytes tokens (2048 * 12 bytes), 9735 bytes strings
1349 strings (17099 bytes), 880 de-duplicated (7834 bytes), 470 trie nodes used
Failed to open device '/sys/class/hwmon/hwmon0': No such device
Unloaded link configuration context.
mdmillerii commented 4 years ago

No device driver found the desired hardware. Look at the kernel log for error message. Look under /sys/bus/ by connection type if your device is not present. Check the device tree for the description of your device.

wws66 commented 4 years ago

Hello, I checked the kernel log. There is no description of 83795. The watchdog error has always existed. It is not caused by adding sensor operation. You can see w83795adg under / sys / bus. I checked the related problems, for example: #3519 I added the description of w83795adg in the device tree, and added the related .conf and .Bbappend file, but I didn't generate hwmon related things. Would you like to know whether it is automatically instantiated or what other configuration I need to add to generate it.

kernel log

root@palmetto:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.3.15-c008a29 (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 Tue Apr 21 07:41:48 UTC 2020
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Palmetto BMC
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 57344
[    0.000000]   Normal zone: 448 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 57344 pages, LIFO batch:15
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 56896
[    0.000000] Kernel command line: console=ttyS4,115200n8 root=/dev/ram rw
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 215988K/229376K available (6144K kernel code, 363K rwdata, 1196K rodata, 1024K init, 143K bss, 13388K reserved, 0K cma-reserved)
[    0.000000] random: get_random_u32 called from cache_alloc_refill+0x3ec/0x8ec with crng_init=0
[    0.000000] ftrace: allocating 18705 entries in 37 pages
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] i2c controller registered, irq 16
[    0.000000] clocksource: FTTMR010-TIMER2: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 39817925974 ns
[    0.000024] sched_clock: 32 bits at 48MHz, resolution 20ns, wraps every 44739242997ns
[    0.000124] Switching to timer-based delay loop, resolution 20ns
[    0.002401] Calibrating delay loop (skipped), value calculated using timer frequency.. 96.00 BogoMIPS (lpj=480000)
[    0.002472] pid_max: default: 32768 minimum: 301
[    0.003614] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.003674] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.006279] CPU: Testing write buffer coherency: ok
[    0.008652] Setting up static identity map for 0x40100000 - 0x40100058
[    0.014935] devtmpfs: initialized
[    0.039859] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.039930] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.040361] pinctrl core: initialized pinctrl subsystem
[    0.041756] NET: Registered protocol family 16
[    0.042848] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.104081] clocksource: Switched to clocksource FTTMR010-TIMER2
[    0.177140] NET: Registered protocol family 2
[    0.179083] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.179195] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.179295] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.179381] TCP: Hash tables configured (established 2048 bind 2048)
[    0.179667] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.179744] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.180441] NET: Registered protocol family 1
[    0.181531] Unpacking initramfs...
[    2.554143] random: fast init done
[    3.924655] Freeing initrd memory: 1496K
[    3.928423] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    3.929110] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.929155] jffs2: version 2.2. (SUMMARY)  漏 2001-2006 Red Hat, Inc.
[    3.930254] NET: Registered protocol family 38
[    3.933235] ipmi-bt-host 1e789140.ibt: Found bt bmc device
[    3.934427] ipmi-bt-host 1e789140.ibt: Using IRQ 30
[    3.942598] Serial: 8250/16550 driver, 6 ports, IRQ sharing enabled
[    3.949555] 1e787000.serial: ttyS5 at MMIO 0x1e787000 (irq = 30, base_baud = 3000000) is a 16550A
[    3.953455] 1e783000.serial: ttyS0 at MMIO 0x1e783000 (irq = 28, base_baud = 1500000) is a 16550A
[    3.955892] 1e784000.serial: ttyS4 at MMIO 0x1e784000 (irq = 29, base_baud = 1500000) is a 16550A
[    4.302484] printk: console [ttyS4] enabled
[    4.310049] timeriomem_rng 1e6e2078.hwrng: 32bits from 0x(ptrval) @ 1us
[    4.323332] random: crng init done
[    4.359639] loop: module loaded
[    4.372541] aspeed-smc 1e620000.spi: Using 50 MHz SPI frequency
[    4.378770] aspeed-smc 1e620000.spi: mx25l25635e (32768 Kbytes)
[    4.384863] aspeed-smc 1e620000.spi: CE0 window [ 0x20000000 - 0x22000000 ] 32MB
[    4.392297] aspeed-smc 1e620000.spi: CE1 window [ 0x22000000 - 0x26000000 ] 64MB
[    4.399818] aspeed-smc 1e620000.spi: read control register: 203c0e41
[    4.865135] 5 fixed-partitions partitions found on MTD device bmc
[    4.871256] Creating 5 MTD partitions on "bmc":
[    4.875973] 0x000000000000-0x000000060000 : "u-boot"
[    4.891361] 0x000000060000-0x000000080000 : "u-boot-env"
[    4.903156] 0x000000080000-0x0000004c0000 : "kernel"
[    4.911838] 0x0000004c0000-0x000001c00000 : "rofs"
[    4.920433] 0x000001c00000-0x000002000000 : "rwfs"
[    4.932189] libphy: Fixed MDIO Bus: probed
[    4.937922] ftgmac100 1e660000.ethernet: Generated random MAC address f6:a2:a3:ca:0a:eb
[    4.947016] Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=POLL)
[    4.958777] ftgmac100 1e660000.ethernet eth0: irq 19, mapped at 14da415b
[    4.966722] i2c /dev entries driver
[    4.973588] aspeed-i2c-bus 1e78a040.i2c-bus: i2c bus 0 registered, irq 31
[    4.982274] aspeed-i2c-bus 1e78a080.i2c-bus: i2c bus 1 registered, irq 32
[    4.992205] aspeed-i2c-bus 1e78a0c0.i2c-bus: i2c bus 2 registered, irq 33
[    5.001601] aspeed-i2c-bus 1e78a100.i2c-bus: i2c bus 3 registered, irq 34
[    5.010465] aspeed-i2c-bus 1e78a140.i2c-bus: i2c bus 4 registered, irq 35
[    5.019280] aspeed-i2c-bus 1e78a180.i2c-bus: i2c bus 5 registered, irq 36
[    5.028128] aspeed-i2c-bus 1e78a1c0.i2c-bus: i2c bus 6 registered, irq 37
[    5.037475] aspeed-i2c-bus 1e78a300.i2c-bus: i2c bus 7 registered, irq 38
[    5.045275] Driver for 1-wire Dallas network protocol.
[    5.054241] tmp421 2-004c: Could not read configuration register (-6)
[    5.061667] occ-hwmon 3-0050: failed to get OCC poll response: -5
[    5.067968] occ-hwmon: probe of 3-0050 failed with error -5
[    5.081437] fsi-master-acf gpio-fsi: ColdFire initialized, firmware v31102 API v81.180 (trace enabled)
[    5.090912] fsi-master-acf gpio-fsi: Unsupported coprocessor API version !
[    5.101586] NET: Registered protocol family 10
[    5.109671] Segment Routing with IPv6
[    5.114469] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    5.122655] NET: Registered protocol family 17
[    5.127322] 8021q: 802.1Q VLAN Support v1.8
[    5.144915] printk: console [netcon0] enabled
[    5.149296] netconsole: network logging started
[    5.154396] hctosys: unable to open rtc device (rtc0)
[    5.170591] Freeing unused kernel memory: 1024K
[    5.178345] Checked W+X mappings: passed, no W+X pages found
[    5.184037] Run /init as init process
[    6.360035] jffs2: notice: (76) jffs2_build_xattr_subsystem: complete building xattr subsystem, 22 of xdatum (15 unchecked, 2 orphan) and 45 of xref (1 dead, 1 orphan) found.
[    6.418772] overlayfs: upper fs does not support tmpfile.
[   10.592896] systemd[1]: System time before build time, advancing clock.
[   10.809083] systemd[1]: systemd 242-19-gdb2e367+ running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR -SMACK +SYSVINIT -UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS -KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)
[   10.834306] systemd[1]: Detected architecture arm.
[   11.008783] systemd[1]: Set hostname to <palmetto>.
[   12.231872] systemd[1]: File /lib/systemd/system/systemd-journald.service:12 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[   12.249294] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[   15.751137] systemd[1]: /lib/systemd/system/phosphor-ipmi-net@.socket:3: Invalid interface name, ignoring: sys-subsystem-net-devices-%i.device
[   15.793926] systemd[1]: /lib/systemd/system/dbus.socket:4: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket 鈫?/run/dbus/system_bus_socket; please update the unit file accordingly.
[   15.992619] systemd[1]: Created slice system-phosphor\x2dreset\x2dsensor\x2dstates.slice.
[   16.037476] systemd[1]: Created slice system-op\x2dreset\x2dchassis\x2don.slice.
[   16.077495] systemd[1]: Created slice system-phosphor\x2dreset\x2dhost\x2drunning.slice.
[   16.115153] systemd[1]: Reached target Slices.
[   16.157411] systemd[1]: Created slice system-org.openbmc.control.Host.slice.
[   16.205100] systemd[1]: Listening on udev Kernel Socket.
[   16.247332] systemd[1]: Created slice system-obmc\x2dconsole.slice.
[   16.286408] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[   16.327463] systemd[1]: Created slice system-serial\x2dgetty.slice.
[   16.367720] systemd[1]: Listening on Journal Socket (/dev/log).
[   19.418448] systemd[108]: systemd-udevd.service: ProtectHostname=yes is configured, but the kernel does not support UTS namespaces, ignoring namespace setup.
[   20.457926] systemd-journald[106]: Received request to flush runtime journal from PID 1
[   26.645809] Generic PHY fixed-0:00: PHY advertising (00,00000200,000062f0) more modes than genphy supports, some modes not advertised.
[   26.658148] ftgmac100 1e660000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   26.725829] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   93.124210] ------------[ cut here ]------------
[   93.128920] WARNING: CPU: 0 PID: 186 at net/sched/sch_generic.c:447 dev_watchdog+0x270/0x290
[   93.137519] NETDEV WATCHDOG: eth0 (ftgmac100): transmit queue 0 timed out
[   93.144459] CPU: 0 PID: 186 Comm: login Not tainted 5.3.15-c008a29 #1
[   93.150917] Hardware name: Generic DT based system
[   93.155810] Backtrace: 
[   93.158349] [<80107754>] (dump_backtrace) from [<801079a8>] (show_stack+0x20/0x24)
[   93.166061]  r7:80a12b20 r6:00000000 r5:8c8ad794 r4:00000009
[   93.171797] [<80107988>] (show_stack) from [<8061d300>] (dump_stack+0x20/0x28)
[   93.179191] [<8061d2e0>] (dump_stack) from [<80114008>] (__warn.part.0+0xb4/0xdc)
[   93.186834] [<80113f54>] (__warn.part.0) from [<801140a4>] (warn_slowpath_fmt+0x74/0x9c)
[   93.195064]  r6:8051ff3c r5:000001bf r4:8080c0ec
[   93.199741] [<80114030>] (warn_slowpath_fmt) from [<8051ff3c>] (dev_watchdog+0x270/0x290)
[   93.208049]  r3:8c117800 r2:8080c0b0
[   93.211660]  r6:00000000 r5:8c103780 r4:8c117a2c
[   93.216433] [<8051fccc>] (dev_watchdog) from [<8015b33c>] (call_timer_fn+0x40/0x124)
[   93.224332]  r9:00000122 r8:ffffaf30 r7:00000100 r6:8051fccc r5:8c117a2c r4:8c117a2c
[   93.232127] [<8015b2fc>] (call_timer_fn) from [<8015b4c8>] (expire_timers+0xa8/0xec)
[   93.240014]  r8:ffffaf30 r7:80a13840 r6:8c8ad85c r5:8c8ad85c r4:8c117a2c
[   93.246864] [<8015b420>] (expire_timers) from [<8015b5b4>] (run_timer_softirq+0xa8/0x1b8)
[   93.255190]  r10:00000002 r9:00000100 r8:80a12b20 r7:80a13840 r6:80a13840 r5:8c8ad85c
[   93.263106]  r4:8c8ad85c r3:ffffaf31
[   93.266841] [<8015b50c>] (run_timer_softirq) from [<80102284>] (__do_softirq+0xe4/0x328)
[   93.275077]  r8:00000000 r7:8c8ac000 r6:80a5b50c r5:00000001 r4:00000002
[   93.281835] [<801021a0>] (__do_softirq) from [<80118144>] (irq_exit+0xac/0xe4)
[   93.289201]  r10:8b8e86dc r9:8c8ac000 r8:00000000 r7:8d40f600 r6:00000001 r5:80a45908
[   93.297153]  r4:00000000
[   93.299761] [<80118098>] (irq_exit) from [<8014d128>] (__handle_domain_irq+0x60/0xb4)
[   93.307761] [<8014d0c8>] (__handle_domain_irq) from [<80102184>] (avic_handle_irq+0x58/0x74)
[   93.316348]  r9:8c8ac000 r8:00000003 r7:8c8ad974 r6:ffffffff r5:8c8ad940 r4:8d402e40
[   93.324239] [<8010212c>] (avic_handle_irq) from [<80101a68>] (__irq_svc+0x68/0x84)
[   93.331835] Exception stack(0x8c8ad940 to 0x8c8ad988)
[   93.337034] d940: 15be7520 0000006f 00000000 0c4f2fa6 8b8e8000 00000008 8b8e800a 000003e2
[   93.345355] d960: 00000003 0000006e 8b8e86dc 8c8ad9bc 00000000 8c8ad990 00000098 803afcf0
[   93.353554] d980: 20000013 ffffffff
[   93.357168]  r5:20000013 r4:803afcf0
[   93.360831] [<803afc70>] (lzma_main) from [<803b0bb8>] (xz_dec_lzma2_run+0x660/0x7fc)
[   93.368819]  r10:00000000 r9:00000000 r8:8b8ee000 r7:8b8eeee8 r6:00000234 r5:8b9ad584
[   93.376777]  r4:8b8e8000 r3:0000021f
[   93.380430] [<803b0558>] (xz_dec_lzma2_run) from [<803af1c8>] (xz_dec_run+0x2f0/0xa58)
[   93.388502]  r10:00000000 r9:00000000 r8:8b9ad584 r7:8d626000 r6:00000001 r5:0000000c
[   93.396457]  r4:8d6260a8
[   93.399074] [<803aeed8>] (xz_dec_run) from [<802bdc20>] (squashfs_xz_uncompress+0x84/0x228)
[   93.407583]  r10:8b9ad584 r9:00000000 r8:00000001 r7:8b9ad980 r6:0000001a r5:8ba0d400
[   93.415531]  r4:8b9ad580
[   93.418135] [<802bdb9c>] (squashfs_xz_uncompress) from [<802bdb48>] (squashfs_decompress+0x68/0xa0)
[   93.427329]  r10:8b9ad980 r9:8b9adc20 r8:8b9adc24 r7:000001cc r6:0000001a r5:802bdb9c
[   93.435332]  r4:8c126280
[   93.437940] [<802bdae0>] (squashfs_decompress) from [<802b9698>] (squashfs_read_data+0x400/0x72c)
[   93.446961]  r10:00000000 r9:8ba0d464 r8:8b9ad980 r7:8ba0d3fc r6:0000001a r5:000001cc
[   93.454914]  r4:0000001a
[   93.457510] [<802b9298>] (squashfs_read_data) from [<802b9cf0>] (squashfs_cache_get+0x188/0x370)
[   93.466438]  r10:00000000 r9:8c137b80 r8:8c165810 r7:00000000 r6:002e89cc r5:8c1657a0
[   93.474386]  r4:00000002
[   93.476982] [<802b9b68>] (squashfs_cache_get) from [<802ba354>] (squashfs_get_fragment+0x2c/0x34)
[   93.486000]  r10:8df22460 r9:00000004 r8:8c8adcd4 r7:ffffffff r6:8c74d3d8 r5:8c74d3d8
[   93.493854]  r4:00000000
[   93.496545] [<802ba328>] (squashfs_get_fragment) from [<802bb108>] (squashfs_readpage+0xf4/0x95c)
[   93.505586] [<802bb014>] (squashfs_readpage) from [<802013c4>] (read_pages+0x108/0x15c)
[   93.513631]  r10:00112cca r9:00000004 r8:8c8adcd4 r7:8c74d4c0 r6:00000000 r5:8df22460
[   93.521593]  r4:8df22464
[   93.524301] [<802012bc>] (read_pages) from [<802017a8>] (__do_page_cache_readahead+0x1bc/0x1dc)
[   93.533045]  r10:8c74d4c4 r9:00112cca r8:8c8adcd4 r7:00000003 r6:00000003 r5:00000004
[   93.540999]  r4:00000003
[   93.543600] [<802015ec>] (__do_page_cache_readahead) from [<802019e0>] (ondemand_readahead+0x218/0x288)
[   93.553137]  r10:00000000 r9:8cc00cc0 r8:00000000 r7:8c74d4c0 r6:00000000 r5:00000003
[   93.561075]  r4:8cc00d18
[   93.563684] [<802017c8>] (ondemand_readahead) from [<80201bd0>] (page_cache_sync_readahead+0x5c/0x7c)
[   93.573044]  r10:8c8adec0 r9:8c8addd8 r8:00000000 r7:00000000 r6:00000000 r5:8cc00cc0
[   93.580982]  r4:8c74d4c0
[   93.583588] [<80201b74>] (page_cache_sync_readahead) from [<801f9294>] (generic_file_read_iter+0x694/0x954)
[   93.593510] [<801f8c00>] (generic_file_read_iter) from [<8023e630>] (do_iter_readv_writev+0x150/0x1e0)
[   93.602961]  r10:00000000 r9:8c8adec0 r8:00000000 r7:8c8adee0 r6:00000000 r5:00000000
[   93.610899]  r4:8cc00cc0
[   93.613500] [<8023e4e0>] (do_iter_readv_writev) from [<8023f070>] (do_iter_read+0xf4/0x1a8)
[   93.621994]  r10:00000000 r9:00000001 r8:8c8adee0 r7:00000000 r6:8c8adec0 r5:8cc00cc0
[   93.629943]  r4:00000000
[   93.632544] [<8023ef7c>] (do_iter_read) from [<802404a0>] (vfs_iter_read+0x28/0x34)
[   93.640349]  r10:00000000 r9:00000000 r8:00000200 r7:8cc00360 r6:8c8adec0 r5:8c8aded8
[   93.648302]  r4:8d6bde00
[   93.650916] [<80240478>] (vfs_iter_read) from [<803154c8>] (ovl_read_iter+0xc0/0x114)
[   93.658928] [<80315408>] (ovl_read_iter) from [<8023fa18>] (__vfs_read+0x150/0x1d8)
[   93.666731]  r7:00000000 r6:00000000 r5:8c8adf60 r4:8cc00360
[   93.672454] [<8023f8c8>] (__vfs_read) from [<8023fb40>] (vfs_read+0xa0/0x120)
[   93.679733]  r9:00000000 r8:00000001 r7:8c8adf60 r6:7ea216a0 r5:8cc00360 r4:00000200
[   93.687629] [<8023faa0>] (vfs_read) from [<8023ffc0>] (ksys_read+0x70/0xf8)
[   93.694736]  r9:00000000 r8:00000000 r7:00000200 r6:7ea216a0 r5:8cc00360 r4:8cc00360
[   93.702533] [<8023ff50>] (ksys_read) from [<80240060>] (sys_read+0x18/0x1c)
[   93.709639]  r9:8c8ac000 r8:801011e4 r7:00000003 r6:7ea2169c r5:00000000 r4:006c08f8
[   93.717555] [<80240048>] (sys_read) from [<80101000>] (ret_fast_syscall+0x0/0x50)
[   93.725178] Exception stack(0x8c8adfa8 to 0x8c8adff0)
[   93.730274] dfa0:                   006c08f8 00000000 00000005 7ea216a0 00000200 7ea216a0
[   93.738589] dfc0: 006c08f8 00000000 7ea2169c 00000003 00000002 00000000 00000000 7ea21654
[   93.746895] dfe0: 481908d0 7ea215fc 481671dc 4817a0ac
[   93.751977] ---[ end trace 2e252d79f5269b9b ]---

deviceTree

&i2c2 {
        status = "okay";

        tmp423@4c {
                compatible = "ti,tmp423";
                reg = <0x4c>;
        };

        w83795adg@2c {
                compatible = "nuvoton,w83795adg";
                reg = <0x2c>;
                status = "okay";
        };

};

conf file in /etc/default/obmc/

root@palmetto:~# cat /etc/default/obmc/hwmon/ahb/apb/bus\@1e78a000/i2c-bus\@c0/w83795adg\@2c.conf 
MODE_temp4="label"
LABEL_temp4=aaa
WARNLO_temp4=10000
WARNHI_temp4=40000

MODE_temp2="label"
LABEL_temp2=bbb
WARNLO_temp2=10000
WARNHI_temp2=40000

/sys/bus

root@palmetto:~# cat /sys/bus/platform/devices/1e78a0c0.i2c-bus/i2c-2/2-002c/of_node/compatible 
nuvoton,w83795adg
root@palmetto:~# cat /sys/bus/platform/devices/1e78a0c0.i2c-bus/i2c-2/2-002c/of_node/name       
w83795adg
root@palmetto:~# cat /sys/bus/platform/devices/1e78a0c0.i2c-bus/i2c-2/2-002c/of_node/reg 
,
mdmillerii commented 4 years ago

Do you have CONIFG_SENSORS_W83795=y in your kernel config? Yocto uses small cfg snippets to enable drivers that exist on your hardware.

wws66 commented 4 years ago

Hello, I wrote the configuration in the following file,But it still has no hwmon related instantiation.

/meta-ibm/meta-palmetto/recipes-kernel/linux/linux-aspeed/palmetto.cfg

CONFIG_SENSORS_NCT7904=y
CONFIG_EEPROM_AT24=y
CONFIG_SENSORS_TMP421=y
CONFIG_SENSORS_W83795=y
mdmillerii commented 4 years ago

All I can say is look at sysfs and dmesg again. You found the device; if the driver is bound you should find a driver symlink. If not look for errors or why the compatible string doesn't match.

229024527 commented 4 years ago

I also have w83795, but webui can't display value ,under /sys/class/hwmon/hwmon/device can read value

mdmillerii commented 4 years ago

https://github.com/openbmc/docs/blob/master/development/add-new-system.md#hwmon-sensors