@bodhi Yes, the power led flashes green even before setting pin 6 and no change after setting pin 6 active. Whilst posting latest result from cycling the gpio is pin 48 sets the fans to highby richjn - Debian
@bodhi Yes, they are unlit until pin 6 is active after which they appear to function as expected.by richjn - Debian
@bodhi Yes, each HDD has its own led. I am still cycling through gpio pins so may hit more later (currently at 32) QuoteEthernet LEDs are not GPIO driven. They turn on amber or green when the ethernet PHY is active and working. OK but just for clarity the led's I'm referring to are on the front of the NAS there are no led's on the nic's themselves.by richjn - Debian
@bodhi My main target today is the fans but whilst cycling the gpio I hit upon leds first at pin 6. Pre setting this pin we have a single falshing green power light at Debian login after setting the pin active we get; 1) Green ethernet light on the correct nic and disconnecting / reconnecting works as does nic 2 2) Green HDD light on drive 1 removing and reinserting the disk works. 3)by richjn - Debian
@bodhi I will get on with that and whilst I'm cycling the pins I will keep an eye on the led's as well. It's Mothers day here in Australia and I have family arriving soon so will have to leave this till tomorrow.by richjn - Debian
@bodhi Understood, Sometimes my brain is ahead of what I actually type! or maybe the other way round :) From my i2cdump posted above I can't see any value that I can read or write to but I'm very conscious that my knowledge is severely lacking here. Is there something I'm missing in probing the i2c ? As far as the gpio pins are concerned I was just wondering if you thougby richjn - Debian
@bodhi I'm probably using the tools incorrectly but for what its worth. root@debian:~# i2cdetect -l i2c-0 i2c mv64xxx_i2c adapter I2C adapter root@debian:~# i2cdetect 0 WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0. I will probe address range 0x03-0x77. Continue? y 0 1 2 3 4 5by richjn - Debian
@bodhi lm-sensors should detect i2c but of course it may not be a recognized chip or it may need to be powered up first ? Is it worth me cycling the gpio pins again and checking for new sensors at each iteration ?by richjn - Debian
@bodhi I installed lm-sensors and did a sensors-detect and got zero sensors detected. A quick look on my stock RS816 looks like the fans are controlled via a script which uses the HDD temps to control the fans speed. There is an xml config file at /usr/syno/etc/scemd.xml broken down by hardware versions example below <scemd> <fan_config hibernation_speed="UNKNOWN" tby richjn - Debian
@bodhi The fans were previously listed in the DTS which I removed to avoid gpio conflicts with no apparent change in the fans behavior. I will have a hunt around on my other rs816 which is still stock and see if I can fathom what it is doing. Stock includes software control to run three profiles quiet, cool and max (or something like that) I will make a start and report back.by richjn - Debian
@bodhi Doh!! That worked! Thanks for the pointer I might have missed that for quite some time :) and the 5V section was just a complete oversight on my part. I actually added a 12V section as well just because it had one for sata0. I removed my alias addition and we are now on version 7 which I attach here. @1000001101000 Yes, that's what I had done and discovered pin 37 was the oneby richjn - Debian
@bodhi Hmm still no go, my new sata regulator looks like this. reg_sata1: pwr-sata1 { compatible = "regulator-fixed"; regulator-name = "pwr_en_sata1"; regulator-min-microvolt = <12000000>; regulator-max-microvolt = <12000000>; enable-active-high; regulator-boot-on; gpio = <&gpio1 37 GPIO_ACTIVE_HIGH>; }; And when that didnby richjn - Debian
@bodhi Spotted it myself 37 is in gpio1. Will try again nowby richjn - Debian
@bodhi I did as you suggested but it didn't work, maybe I missed something. I have attached armada-385-synology-rs816-v6.dts if you could check for me please.by richjn - Debian
@bodhi v5 with the gpio led and fans removed. I posted it further up this page but re-attaching here. Edit Just noticed I had typo above, actual command was "out" not "on"by richjn - Debian
@bodhi root@debian:~# df -h Filesystem Size Used Avail Use% Mounted on udev 497M 0 497M 0% /dev tmpfs 101M 1.2M 100M 2% /run /dev/sdb1 1.8T 2.6G 1.7T 1% / tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 468M 0 468M 0% /run/shm tmpfs 501M 0 501M 0% /tmp /dev/sda1 1.8T 69M 1.7T 1% /root/1by richjn - Debian
@bodhi Disks formating will take a couple of minutes. Command used echo 37 > /sys/class/gpio/export echo "on" > /sys/class/gpio/gpio37/direction echo 1 > /sys/class/gpio/gpio37/value udevadm trigger dmesg [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.1.0-tld-1 (root@debian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #by richjn - Debian
@bodhi I zeroed the disks previous to trying this. I will setup some partitions now, mount, write data and report back here shortly.by richjn - Debian
@bodhi All thought of fixing stock dtb discarded :-) The pin we need is 37 root@debian:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 1 1.8T 0 disk sdb 8:16 1 1.8T 0 disk |-sdb1 8:17 1 1.8T 0 part / `-sdb2 8:18 1 1.3G 0 part sdc 8:32 1 1.8T 0 disk sdd 8:48 1 1.8T 0 disk mtdblock0 31:0 0by richjn - Debian
@bodhi Just ran again this time with the dtb pulled from flash and we revert to the same initramfs prompt as on previous kernels. There is something happening that I just can't see / don't understand or maybe my synology-rs816-stock.dtb had not compiled correctly I will go back and check / rebuild it. Edit Tried to rebuild and get a host of warnings but no errors although the foby richjn - Debian
@bodhi I was conscious that I hadn't tried the synology-rs816-stock.dtb on linux-5.1 so gave it a try. On previous kernels this got as far as not finding the rootfs (no drives in /dev/) and dumping to an initramfs prompt. A bit different on linux-5.1 with a very early kernel panic at kernel BUG at drivers/irqchip/irq-armada-370-xp.c:658! Not sure what to make of that ? The completeby richjn - Debian
@bodhi I have removed the gpio-leds section altogether from the dts the listed pin 13 wasn't doing anything and besides for now I don't care about the leds. I have also removed the gpio-fans section which I tested one pin entry at a time but in all cases the fans (there are 3 on the rs816) still appear to function normally. This only leaves sata pin 15 and usb pins 58 & 59 acby richjn - Debian
@bodhi I will get onto this Saturday, work is very inconsiderate of my time allocation sometimes :-)by richjn - Debian
@bodhi I've looked back at zifxify efforts with the gpio which seemed to be on the right track but no conclusive solution at the end of it. I have dumped debugfs for the gpio pins output below. root@debian:~# cat /sys/kernel/debug/gpio gpiochip0: GPIOs 0-31, parent: platform/f1018100.gpio, f1018100.gpio: gpio-13 (ds116:orange:disk ) out lo gpio-15 (pwr-sata0 ) out hiby richjn - Debian
@bodhi Tried pcie 2 and 3 enabled then pcie 2, 3 and 4 enabled but still only 2 sata ports brought up on both trials with the rootfs displayed as /dev/sdb in drive 1 viewed from from front, left to right.by richjn - Debian
@bodhi Understood on the DTB, guess we just need to find out what we are missing. My build environment is all good uname -a Linux debian 5.1.0-tld-1 #1 SMP PREEMPT Tue May 7 12:34:41 PDT 2019 armv7l GNU/Linux But no change in sata ports lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 1 1.8T 0 disk sdb 8:16 1 1.8T 0 disk |-sdb1 8:17by richjn - Debian
@bohdi I have run armada-385-synology-rs816-v2.dtb (note the v2) which is the last version you provided with just pcie2 enabled expecting to see the drive the rootfs is reported on changed or even needing to move the HDD to drive 3 or 4 before its seen but basically nothing changed drive 1 is still seen as /dev/sdb and drive 2 as /dev/sda I'm starting to wonder if the DTB is having much iby richjn - Debian
@bohdi >One things that bothers me is why I could not find any trace of the RS 816-specific patch in the GPL kernel >source code on Synology web site. Perhaps it is not up to date. The RS816 was released August 2016, the RS815 was released April 2015 and used the same armada-38x with the only meaningful difference between the two models being a bump in speed from 1.33 Ghz to 1.8Ghz. Allby richjn - Debian
@bodhi I have installed Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 to HDD but will stick with tftp for kernel / dtb files as its easier to swap them out if we are testing things. Just as a reminder to boot linux-4.12.4-mvebu-tld-1 we need to use ds116.dtb and that only brings up one sata port, so I have upgraded to to linux-4.20.6-mvebu-tld-1 and then using your amarda-385-synology-816.by richjn - Debian
@bodhi Just as a follow up on my last post I was thinking the way I would probably like to proceed is to just forget about Synology altogether and do the following. 1) Decide if we want to upgrade uboot 2) Blow away the Synology mtd's and install vanilla Debian with /boot on the mtd and / on whatever disk Debian installer can see. 3) Work on getting the other ports up. Apart froby richjn - Debian