Bug#818059: linux-image-4.4.0-1-armmp-lpae: Missing usb-power-supply in DTB for OlinuXino-A20-LIME2

2016-03-13 Thread Ian Campbell
Control: tag -1 +upstream

On Sun, 2016-03-13 at 09:17 +0100, Michael Haas wrote:
> 
> 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.

Please report it (or, better, send a patch) to the linux-sunxi mailing
list[0]. I'd also recommend copying this subset of the output of get-
maintainer.pl:

$ ./scripts/get_maintainer.pl -f arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
[...]
Maxime Ripard  (maintainer:ARM/Allwinner 
sunXi SoC support)
Chen-Yu Tsai  (maintainer:ARM/Allwinner sunXi SoC support)
[...]
linux-arm-ker...@lists.infradead.org (moderated list:ARM PORT)
[...]

Once it is on its way to mainline (i.e. in Maxime's tree would be
sufficient) please let us know and we can add it to the Debian kernel.

Ian.

[0] http://linux-sunxi.org/Mailing_list



Processed: Re: Bug#818059: linux-image-4.4.0-1-armmp-lpae: Missing usb-power-supply in DTB for OlinuXino-A20-LIME2

2016-03-13 Thread Debian Bug Tracking System
Processing control commands:

> tag -1 +upstream
Bug #818059 [src:linux] linux-image-4.4.0-1-armmp-lpae: Missing 
usb-power-supply in DTB for OlinuXino-A20-LIME2
Added tag(s) upstream.

-- 
818059: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818059
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#818059: linux-image-4.4.0-1-armmp-lpae: Missing usb-power-supply in DTB for OlinuXino-A20-LIME2

2016-03-13 Thread Michael Haas
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@01c0/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 1c5.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]