--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: linux-image-4.4.0-1-armmp-lpae: Missing usb-power-supply in DTB for OlinuXino-A20-LIME2
- From: Michael Haas <michael.haas+debian@mailbox.org>
- Date: Sun, 13 Mar 2016 09:17:41 +0100
- Message-id: <20160313081741.32463.37995.reportbug@ivanov.home.mhaas.info>
Package: src:linux
Version: 4.4.4-2
Severity: important
Dear Maintainer,
*** Reporter, please consider answering these questions, where appropriate ***
* What led up to the situation?
* What exactly did you do (or not do) that was effective (or
ineffective)?
* What was the outcome of this action?
* What outcome did you expect instead?
*** End of the template - remove these template lines ***
I have an Olimex OlinuXino-A20-Lime2 which does not report power statistics
(voltage, current) in /sys/class/power_supply
This is remedied decompiling the DTB to DTS in boot, applying the following patch and
recompiling into a DTC:
laga@ivanov:~/tmp$ diff -u dtb-4.4.0-1-armmp-lpae.dts.vanilla dtb-4.4.0-1-armmp-lpae.dts.patched
--- dtb-4.4.0-1-armmp-lpae.dts.vanilla 2016-03-13 09:06:15.313484530 +0100
+++ dtb-4.4.0-1-armmp-lpae.dts.patched 2016-03-13 09:06:05.901511409 +0100
@@ -1380,6 +1380,10 @@
regulator-always-on;
};
};
+
+ usb-power-supply {
+ compatible = "x-powers,axp202-usb-power-supply";
+ };
};
};
On the following reboot, axp20x_usb_power.ko will be loaded and /sys/class/power_supply will be there:
laga@ivanov:~/tmp$ ls -al /sys/class/power_supply/axp20x-usb
lrwxrwxrwx 1 root root 0 Mar 13 09:01 /sys/class/power_supply/axp20x-usb -> ../../devices/platform/soc@01c00000/1c2ac00.i2c/i2c-0/0-0034/axp20x-usb-power-supply/power_supply/axp20x-usb
laga@ivanov:~/tmp$ cat /sys/class/power_supply/axp20x-usb/current_now
273000
laga@ivanov:~/tmp$ cat /sys/class/power_supply/axp20x-usb/voltage_now
4620600
I presume this would need to be fixed upstream in arch/arm/boot/dts/un7i-a20-olinuxino-lime2.dts
but I don't know where to direct that specific bug report.
The specific file affected in the Debian package is /usr/lib/linux-image-4.4.0-1-armmp-lpae/sun7i-a20-olinuxino-lime2.dtb.
See Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt for documentation on the bindings introduced.
-- Package-specific info:
** Version:
Linux version 4.4.0-1-armmp-lpae (debian-kernel@lists.debian.org) (gcc version 4.9.3 (Debian 4.9.3-12) ) #1 SMP Debian 4.4.4-2 (2016-03-09)
** Command line:
console=ttyS0,115200 quiet
** Not tainted
** Kernel log:
[ 1.611274] sun7i-dwmac 1c50000.ethernet: no reset control found
[ 1.611287] Ring mode enabled
[ 1.611295] No HW DMA feature register supported
[ 1.611302] Normal descriptors
[ 1.611324] TX Checksum insertion supported
[ 1.622884] libphy: stmmac: probed
[ 1.622911] eth0: PHY ID 001cc912 at 1 IRQ POLL (stmmac-0:01) active
[ 1.667233] ahci-sunxi 1c18000.sata: controller can't do PMP, turning off CAP_PMP
[ 1.667276] ahci-sunxi 1c18000.sata: forcing PORTS_IMPL to 0x1
[ 1.667358] ahci-sunxi 1c18000.sata: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
[ 1.667377] ahci-sunxi 1c18000.sata: flags: ncq sntf pm led clo only pio slum part ccc
[ 1.668512] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.674821] mmc0: new high speed SDHC card at address e624
[ 1.678643] scsi host0: ahci-sunxi
[ 1.679294] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 31
[ 1.683170] mmcblk0: mmc0:e624 SU32G 29.7 GiB
[ 1.689684] mmcblk0: p1 p2 p3 < p5 >
[ 1.999029] ata1: SATA link down (SStatus 0 SControl 300)
[ 2.048890] PM: Starting manual resume from disk
[ 2.048927] PM: Hibernation image partition 179:5 present
[ 2.048935] PM: Looking for hibernation image.
[ 2.050437] PM: Image not found (code -22)
[ 2.050452] PM: Hibernation image not present or could not be loaded.
[ 2.293758] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 3.214577] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
[ 3.417963] EXT4-fs (mmcblk0p2): re-mounted. Opts: errors=remount-ro
[ 3.648043] systemd-udevd[163]: starting version 215
[ 4.125087] sunxi-wdt 1c20c90.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 4.149941] sun4i-ss 1c15000.crypto-engine: no reset control found
[ 4.151612] sun4i-ss 1c15000.crypto-engine: Die ID 0
[ 4.205089] axp20x 0-0034: AXP20x variant AXP209 found
[ 4.225129] axp20x 0-0034: AXP20X driver loaded
[ 4.276406] usbcore: registered new interface driver usbfs
[ 4.276525] usbcore: registered new interface driver hub
[ 4.276706] usbcore: registered new device driver usb
[ 4.313485] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 4.324232] ehci-platform: EHCI generic platform driver
[ 4.324430] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 4.324765] ehci-platform 1c14000.usb: EHCI Host Controller
[ 4.324824] ehci-platform 1c14000.usb: new USB bus registered, assigned bus number 1
[ 4.325025] ehci-platform 1c14000.usb: irq 28, io mem 0x01c14000
[ 4.331794] ohci-platform: OHCI generic platform driver
[ 4.339091] ehci-platform 1c14000.usb: USB 2.0 started, EHCI 1.00
[ 4.340019] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.340041] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.340051] usb usb1: Product: EHCI Host Controller
[ 4.340062] usb usb1: Manufacturer: Linux 4.4.0-1-armmp-lpae ehci_hcd
[ 4.340072] usb usb1: SerialNumber: 1c14000.usb
[ 4.342920] hub 1-0:1.0: USB hub found
[ 4.343540] hub 1-0:1.0: 1 port detected
[ 4.344662] ohci-platform 1c14400.usb: Generic Platform OHCI controller
[ 4.344727] ohci-platform 1c14400.usb: new USB bus registered, assigned bus number 2
[ 4.344971] ohci-platform 1c14400.usb: irq 29, io mem 0x01c14400
[ 4.404983] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[ 4.405008] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.405018] usb usb2: Product: Generic Platform OHCI controller
[ 4.405029] usb usb2: Manufacturer: Linux 4.4.0-1-armmp-lpae ohci_hcd
[ 4.405039] usb usb2: SerialNumber: 1c14400.usb
[ 4.406149] hub 2-0:1.0: USB hub found
[ 4.406250] hub 2-0:1.0: 1 port detected
[ 4.407405] ehci-platform 1c1c000.usb: EHCI Host Controller
[ 4.407469] ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 3
[ 4.407697] ehci-platform 1c1c000.usb: irq 32, io mem 0x01c1c000
[ 4.419138] ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
[ 4.420089] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.420110] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.420120] usb usb3: Product: EHCI Host Controller
[ 4.420130] usb usb3: Manufacturer: Linux 4.4.0-1-armmp-lpae ehci_hcd
[ 4.420140] usb usb3: SerialNumber: 1c1c000.usb
[ 4.428716] hub 3-0:1.0: USB hub found
[ 4.431184] hub 3-0:1.0: 1 port detected
[ 4.432410] ohci-platform 1c1c400.usb: Generic Platform OHCI controller
[ 4.432467] ohci-platform 1c1c400.usb: new USB bus registered, assigned bus number 4
[ 4.432700] ohci-platform 1c1c400.usb: irq 33, io mem 0x01c1c400
[ 4.483996] at24 1-0050: 2048 byte 24c16 EEPROM, writable, 16 bytes/write
[ 4.495369] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
[ 4.495397] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.495409] usb usb4: Product: Generic Platform OHCI controller
[ 4.495419] usb usb4: Manufacturer: Linux 4.4.0-1-armmp-lpae ohci_hcd
[ 4.495429] usb usb4: SerialNumber: 1c1c400.usb
[ 4.496588] hub 4-0:1.0: USB hub found
[ 4.496695] hub 4-0:1.0: 1 port detected
[ 4.581804] input: axp20x-pek as /devices/platform/soc@01c00000/1c2ac00.i2c/i2c-0/0-0034/axp20x-pek/input/input0
[ 4.630559] Adding 1357820k swap on /dev/mmcblk0p5. Priority:-1 extents:1 across:1357820k SSFS
[ 4.818637] EXT4-fs (mmcblk0p1): mounting ext2 file system using the ext4 subsystem
[ 4.825788] EXT4-fs (mmcblk0p1): mounted filesystem without journal. Opts: (null)
[ 4.892149] systemd-journald[165]: Received request to flush runtime journal from PID 1
[ 5.610067] RX IPC Checksum Offload disabled
[ 5.610096] No MAC Management Counters available
[ 6.213204] RPC: Registered named UNIX socket transport module.
[ 6.213229] RPC: Registered udp transport module.
[ 6.213237] RPC: Registered tcp transport module.
[ 6.213244] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 6.240560] FS-Cache: Loaded
[ 6.291729] FS-Cache: Netfs 'nfs' registered for caching
[ 6.353740] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 7.599509] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 9.181022] random: nonblocking pool is initialized
[ 36.606655] sun7i-dwmac 1c50000.ethernet eth0: Link is Down
[ 39.604915] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
** Model information
Hardware : Allwinner sun7i (A20) Family
Revision : 0000
Device Tree model: Olimex A20-OLinuXino-LIME2
** Loaded modules:
binfmt_misc
cpufreq_conservative
cpufreq_powersave
cpufreq_userspace
cpufreq_ondemand
cpufreq_stats
nfsd
auth_rpcgss
oid_registry
nfs_acl
nfs
lockd
grace
fscache
sunrpc
evdev
axp20x_regulator
axp20x_pek
axp20x_usb_power
at24
ohci_platform
ehci_platform
ohci_hcd
ehci_hcd
usbcore
usb_common
sun4i_ts
i2c_mv64xxx
sun4i_ss
sunxi_wdt
des_generic
leds_gpio
cpufreq_dt
autofs4
ext4
crc16
mbcache
jbd2
realtek
ahci_sunxi
libahci_platform
libahci
dwmac_sunxi
libata
stmmac_platform
stmmac
scsi_mod
phy_sun4i_usb
extcon
sunxi_mmc
** PCI devices:
** USB devices:
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
-- System Information:
Debian Release: 8.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable')
Architecture: armhf (armv7l)
Kernel: Linux 4.4.0-1-armmp-lpae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=locale: Cannot set LC_ALL to default locale: No such file or directory
UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages linux-image-4.4.0-1-armmp-lpae depends on:
ii debconf [debconf-2.0] 1.5.56
ii initramfs-tools [linux-initramfs-tool] 0.120
ii kmod 18-3
ii linux-base 3.5
Versions of packages linux-image-4.4.0-1-armmp-lpae recommends:
ii firmware-linux-free 3.3
ii irqbalance 1.0.6-3
Versions of packages linux-image-4.4.0-1-armmp-lpae suggests:
pn debian-kernel-handbook <none>
pn fdutils <none>
pn linux-doc-4.4 <none>
Versions of packages linux-image-4.4.0-1-armmp-lpae is related to:
ii firmware-atheros 0.43
pn firmware-bnx2 <none>
pn firmware-bnx2x <none>
pn firmware-brcm80211 <none>
pn firmware-intelwimax <none>
pn firmware-ipw2x00 <none>
pn firmware-ivtv <none>
pn firmware-iwlwifi <none>
pn firmware-libertas <none>
pn firmware-linux <none>
pn firmware-linux-nonfree <none>
pn firmware-myricom <none>
pn firmware-netxen <none>
pn firmware-qlogic <none>
pn firmware-ralink <none>
pn firmware-realtek <none>
pn xen-hypervisor <none>
-- debconf information:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_TIME = "de_DE.UTF-8",
LC_MONETARY = "de_DE.UTF-8",
LC_ADDRESS = "de_DE.UTF-8",
LC_TELEPHONE = "de_DE.UTF-8",
LC_NAME = "de_DE.UTF-8",
LC_MEASUREMENT = "de_DE.UTF-8",
LC_IDENTIFICATION = "de_DE.UTF-8",
LC_NUMERIC = "de_DE.UTF-8",
LC_PAPER = "de_DE.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
linux-image-4.4.0-1-armmp-lpae/prerm/removing-running-kernel-4.4.0-1-armmp-lpae: true
--- End Message ---